generated-configure.sh revision 2718:2806b44e4eab
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
666STLPORT_LIB
667LIBZIP_CAN_USE_MMAP
668LIBDL
669LIBM
670USE_EXTERNAL_LCMS
671LCMS_LIBS
672LCMS_CFLAGS
673USE_EXTERNAL_LIBZ
674USE_EXTERNAL_LIBPNG
675PNG_LIBS
676PNG_CFLAGS
677USE_EXTERNAL_LIBGIF
678USE_EXTERNAL_LIBJPEG
679LLVM_LIBS
680LLVM_LDFLAGS
681LLVM_CFLAGS
682LLVM_CONFIG
683LIBFFI_LIB_FILE
684ENABLE_LIBFFI_BUNDLING
685LIBFFI_LIBS
686LIBFFI_CFLAGS
687ALSA_LIBS
688ALSA_CFLAGS
689FREETYPE_BUNDLE_LIB_PATH
690FREETYPE_LIBS
691FREETYPE_CFLAGS
692CUPS_CFLAGS
693X_EXTRA_LIBS
694X_LIBS
695X_PRE_LIBS
696X_CFLAGS
697XMKMF
698MSVCP_DLL
699MSVCR_DLL
700LIBCXX
701FIXPATH_DETACH_FLAG
702FIXPATH
703BUILD_GTEST
704ENABLE_AOT
705GCOV_ENABLED
706ZIP_EXTERNAL_DEBUG_SYMBOLS
707COPY_DEBUG_SYMBOLS
708COMPILE_WITH_DEBUG_SYMBOLS
709CFLAGS_WARNINGS_ARE_ERRORS
710BUILD_CC_DISABLE_WARNING_PREFIX
711DISABLE_WARNING_PREFIX
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714LDFLAGS_TESTEXE
715LDFLAGS_TESTLIB
716CXXFLAGS_TESTEXE
717CXXFLAGS_TESTLIB
718CFLAGS_TESTEXE
719CFLAGS_TESTLIB
720OPENJDK_BUILD_JVM_LIBS
721OPENJDK_BUILD_JVM_ASFLAGS
722OPENJDK_BUILD_JVM_LDFLAGS
723OPENJDK_BUILD_JVM_CFLAGS
724OPENJDK_BUILD_LDFLAGS_HASH_STYLE
725OPENJDK_BUILD_LDFLAGS_CXX_JDK
726OPENJDK_BUILD_JDKEXE_LIBS
727OPENJDK_BUILD_JDKLIB_LIBS
728OPENJDK_BUILD_LDFLAGS_JDKEXE
729OPENJDK_BUILD_LDFLAGS_JDKLIB
730OPENJDK_BUILD_CXXFLAGS_JDKEXE
731OPENJDK_BUILD_CXXFLAGS_JDKLIB
732OPENJDK_BUILD_CFLAGS_JDKEXE
733OPENJDK_BUILD_CFLAGS_JDKLIB
734OPENJDK_BUILD_CXXSTD_CXXFLAG
735JVM_LIBS
736JVM_ASFLAGS
737JVM_LDFLAGS
738JVM_CFLAGS
739LDFLAGS_HASH_STYLE
740LDFLAGS_CXX_JDK
741JDKEXE_LIBS
742JDKLIB_LIBS
743LDFLAGS_JDKEXE
744LDFLAGS_JDKLIB
745CXXFLAGS_JDKEXE
746CXXFLAGS_JDKLIB
747CFLAGS_JDKEXE
748CFLAGS_JDKLIB
749MACOSX_VERSION_MIN
750CXXSTD_CXXFLAG
751JDK_ARCH_ABI_PROP_NAME
752CXX_O_FLAG_SIZE
753CXX_O_FLAG_NONE
754CXX_O_FLAG_DEBUG
755CXX_O_FLAG_NORM
756CXX_O_FLAG_HI
757CXX_O_FLAG_HIGHEST
758CXX_O_FLAG_HIGHEST_JVM
759C_O_FLAG_SIZE
760C_O_FLAG_NONE
761C_O_FLAG_DEBUG
762C_O_FLAG_NORM
763C_O_FLAG_HI
764C_O_FLAG_HIGHEST
765C_O_FLAG_HIGHEST_JVM
766JVM_CFLAGS_SYMBOLS
767CXXFLAGS_DEBUG_SYMBOLS
768CFLAGS_DEBUG_SYMBOLS
769CXX_FLAG_DEPS
770C_FLAG_DEPS
771SHARED_LIBRARY_FLAGS
772SET_SHARED_LIBRARY_MAPFILE
773SET_SHARED_LIBRARY_NAME
774SET_SHARED_LIBRARY_ORIGIN
775SET_EXECUTABLE_ORIGIN
776CXX_FLAG_REORDER
777C_FLAG_REORDER
778JVM_RCFLAGS
779RC_FLAGS
780AR_OUT_OPTION
781LD_OUT_OPTION
782EXE_OUT_OPTION
783CC_OUT_OPTION
784STRIPFLAGS
785ARFLAGS
786COMPILER_BINDCMD_FILE_FLAG
787COMPILER_COMMAND_FILE_FLAG
788COMPILER_TARGET_BITS_FLAG
789JIB_JAR
790JT_HOME
791JTREGEXE
792HOTSPOT_TOOLCHAIN_TYPE
793USING_BROKEN_SUSE_LD
794PACKAGE_PATH
795BUILD_AS
796BUILD_LDCXX
797BUILD_LD
798BUILD_STRIP
799BUILD_OBJCOPY
800BUILD_AR
801BUILD_NM
802BUILD_CXX
803BUILD_CC
804BUILD_SYSROOT_LDFLAGS
805BUILD_SYSROOT_CFLAGS
806ac_ct_OBJDUMP
807OBJDUMP
808ac_ct_OBJCOPY
809OBJCOPY
810ac_ct_NM
811ac_ct_STRIP
812GNM
813NM
814STRIP
815MSBUILD
816DUMPBIN
817RC
818MT
819LIPO
820ac_ct_AR
821AR
822AS
823LDCXX
824LD
825CXXCPP
826CPP
827CXX_VERSION_NUMBER
828CC_VERSION_NUMBER
829ac_ct_CXX
830CXXFLAGS
831CXX
832TOOLCHAIN_PATH_CXX
833POTENTIAL_CXX
834OBJEXT
835EXEEXT
836ac_ct_CC
837CPPFLAGS
838LDFLAGS
839CFLAGS
840CC
841TOOLCHAIN_PATH_CC
842POTENTIAL_CC
843TOOLCHAIN_VERSION
844VS_LIB
845VS_INCLUDE
846VS_PATH
847CYGWIN_LINK
848SYSROOT_LDFLAGS
849SYSROOT_CFLAGS
850EXTRA_LDFLAGS
851EXTRA_CXXFLAGS
852EXTRA_CFLAGS
853EXE_SUFFIX
854OBJ_SUFFIX
855STATIC_LIBRARY
856SHARED_LIBRARY
857STATIC_LIBRARY_SUFFIX
858SHARED_LIBRARY_SUFFIX
859LIBRARY_PREFIX
860TOOLCHAIN_TYPE
861STATIC_BUILD
862IMPORT_MODULES_MAKE
863IMPORT_MODULES_SRC
864IMPORT_MODULES_MAN
865IMPORT_MODULES_LEGAL
866IMPORT_MODULES_CONF
867IMPORT_MODULES_LIBS
868IMPORT_MODULES_CMDS
869IMPORT_MODULES_CLASSES
870BUILD_OUTPUT
871JDK_TOPDIR
872NASHORN_TOPDIR
873HOTSPOT_TOPDIR
874JAXWS_TOPDIR
875JAXP_TOPDIR
876CORBA_TOPDIR
877LANGTOOLS_TOPDIR
878EXTERNAL_BUILDJDK
879BUILD_JDK
880CREATE_BUILDJDK
881JLINK
882JMOD
883JAVAC_FLAGS
884BOOT_JDK_MODULAR
885BOOT_JDK_SOURCETARGET
886JARSIGNER
887JAR
888JAVAH
889JAVAC
890JAVA
891BOOT_JDK
892JAVA_CHECK
893JAVAC_CHECK
894VERSION_IS_GA
895VERSION_SHORT
896VERSION_STRING
897VERSION_NUMBER_FOUR_POSITIONS
898VERSION_NUMBER
899VERSION_OPT
900VERSION_BUILD
901VERSION_PRE
902VERSION_PATCH
903VERSION_SECURITY
904VERSION_MINOR
905VERSION_MAJOR
906MACOSX_BUNDLE_ID_BASE
907MACOSX_BUNDLE_NAME_BASE
908HOTSPOT_VM_DISTRO
909COMPANY_NAME
910JDK_RC_PLATFORM_NAME
911PRODUCT_SUFFIX
912PRODUCT_NAME
913LAUNCHER_NAME
914JLINK_KEEP_PACKAGED_MODULES
915COPYRIGHT_YEAR
916COMPRESS_JARS
917INCLUDE_SA
918UNLIMITED_CRYPTO
919CACERTS_FILE
920ENABLE_HEADLESS_ONLY
921DEFAULT_MAKE_TARGET
922OS_VERSION_MICRO
923OS_VERSION_MINOR
924OS_VERSION_MAJOR
925PKG_CONFIG
926BASH_ARGS
927SETFILE
928CODESIGN
929XATTR
930DSYMUTIL
931IS_GNU_TIME
932PATCH
933DTRACE
934TIME
935STAT
936HG
937READELF
938OTOOL
939LDD
940ZIPEXE
941UNZIP
942TAR_SUPPORTS_TRANSFORM
943TAR_INCLUDE_PARAM
944TAR_CREATE_EXTRA_PARAM
945TAR_TYPE
946FIND_DELETE
947OUTPUT_SYNC
948OUTPUT_SYNC_SUPPORTED
949CHECK_TOOLSDIR_MAKE
950CHECK_TOOLSDIR_GMAKE
951CHECK_MAKE
952CHECK_GMAKE
953MAKE
954PKGHANDLER
955CONFIGURESUPPORT_OUTPUTDIR
956OUTPUT_ROOT
957CONF_NAME
958SPEC
959SDKROOT
960XCODEBUILD
961JVM_VARIANT_MAIN
962VALID_JVM_VARIANTS
963JVM_VARIANTS
964DEBUG_LEVEL
965HOTSPOT_DEBUG_LEVEL
966JDK_VARIANT
967USERNAME
968CANONICAL_TOPDIR
969ORIGINAL_TOPDIR
970TOPDIR
971PATH_SEP
972HOTSPOT_BUILD_CPU_DEFINE
973HOTSPOT_BUILD_CPU_ARCH
974HOTSPOT_BUILD_CPU
975HOTSPOT_BUILD_OS_TYPE
976HOTSPOT_BUILD_OS
977OPENJDK_BUILD_BUNDLE_PLATFORM
978OPENJDK_BUILD_OS_EXPORT_DIR
979OPENJDK_BUILD_CPU_OSARCH
980OPENJDK_BUILD_CPU_ISADIR
981OPENJDK_BUILD_CPU_LEGACY_LIB
982OPENJDK_BUILD_CPU_LEGACY
983HOTSPOT_TARGET_CPU_DEFINE
984HOTSPOT_TARGET_CPU_ARCH
985HOTSPOT_TARGET_CPU
986HOTSPOT_TARGET_OS_TYPE
987HOTSPOT_TARGET_OS
988DEFINE_CROSS_COMPILE_ARCH
989OPENJDK_TARGET_BUNDLE_PLATFORM
990OPENJDK_TARGET_OS_EXPORT_DIR
991OPENJDK_TARGET_CPU_OSARCH
992OPENJDK_TARGET_CPU_ISADIR
993OPENJDK_TARGET_CPU_LEGACY_LIB
994OPENJDK_TARGET_CPU_LEGACY
995REQUIRED_OS_VERSION
996REQUIRED_OS_NAME
997COMPILE_TYPE
998OPENJDK_TARGET_CPU_ENDIAN
999OPENJDK_TARGET_CPU_BITS
1000OPENJDK_TARGET_CPU_ARCH
1001OPENJDK_TARGET_CPU
1002OPENJDK_TARGET_OS_ENV
1003OPENJDK_TARGET_OS_TYPE
1004OPENJDK_TARGET_OS
1005OPENJDK_BUILD_CPU_ENDIAN
1006OPENJDK_BUILD_CPU_BITS
1007OPENJDK_BUILD_CPU_ARCH
1008OPENJDK_BUILD_CPU
1009OPENJDK_BUILD_OS_ENV
1010OPENJDK_BUILD_OS_TYPE
1011OPENJDK_BUILD_OS
1012OPENJDK_BUILD_AUTOCONF_NAME
1013OPENJDK_TARGET_AUTOCONF_NAME
1014target_os
1015target_vendor
1016target_cpu
1017target
1018host_os
1019host_vendor
1020host_cpu
1021host
1022build_os
1023build_vendor
1024build_cpu
1025build
1026PANDOC
1027NICE
1028CPIO
1029DF
1030READLINK
1031CYGPATH
1032SED
1033FGREP
1034EGREP
1035GREP
1036AWK
1037XARGS
1038WHICH
1039WC
1040UNIQ
1041UNAME
1042TR
1043TOUCH
1044TEE
1045TAR
1046TAIL
1047SORT
1048SH
1049RMDIR
1050RM
1051PRINTF
1052NAWK
1053MV
1054MKTEMP
1055MKDIR
1056LS
1057LN
1058GZIP
1059GUNZIP
1060HEAD
1061FIND
1062FILE
1063EXPR
1064ECHO
1065DIRNAME
1066DIFF
1067DATE
1068CUT
1069CP
1070COMM
1071CMP
1072CHMOD
1073CAT
1074BASH
1075BASENAME
1076DATE_WHEN_CONFIGURED
1077ORIGINAL_PATH
1078CONFIGURE_COMMAND_LINE
1079target_alias
1080host_alias
1081build_alias
1082LIBS
1083ECHO_T
1084ECHO_N
1085ECHO_C
1086DEFS
1087mandir
1088localedir
1089libdir
1090psdir
1091pdfdir
1092dvidir
1093htmldir
1094infodir
1095docdir
1096oldincludedir
1097includedir
1098localstatedir
1099sharedstatedir
1100sysconfdir
1101datadir
1102datarootdir
1103libexecdir
1104sbindir
1105bindir
1106program_transform_name
1107prefix
1108exec_prefix
1109PACKAGE_URL
1110PACKAGE_BUGREPORT
1111PACKAGE_STRING
1112PACKAGE_VERSION
1113PACKAGE_TARNAME
1114PACKAGE_NAME
1115PATH_SEPARATOR
1116SHELL'
1117ac_subst_files=''
1118ac_user_opts='
1119enable_option_checking
1120with_target_bits
1121enable_openjdk_only
1122with_custom_make_dir
1123with_jdk_variant
1124enable_debug
1125with_debug_level
1126with_jvm_variants
1127with_cpu_port
1128with_devkit
1129with_sys_root
1130with_sysroot
1131with_tools_dir
1132with_toolchain_path
1133with_extra_path
1134with_sdk_name
1135with_conf_name
1136with_output_sync
1137with_default_make_target
1138enable_headless_only
1139with_cacerts_file
1140enable_unlimited_crypto
1141with_copyright_year
1142enable_keep_packaged_modules
1143with_milestone
1144with_update_version
1145with_user_release_suffix
1146with_build_number
1147with_version_string
1148with_version_pre
1149with_version_opt
1150with_version_build
1151with_version_major
1152with_version_minor
1153with_version_security
1154with_version_patch
1155with_boot_jdk
1156with_build_jdk
1157with_add_source_root
1158with_override_source_root
1159with_adds_and_overrides
1160with_override_langtools
1161with_override_corba
1162with_override_jaxp
1163with_override_jaxws
1164with_override_hotspot
1165with_override_nashorn
1166with_override_jdk
1167with_import_hotspot
1168with_import_modules
1169enable_static_build
1170with_toolchain_type
1171with_extra_cflags
1172with_extra_cxxflags
1173with_extra_ldflags
1174with_toolchain_version
1175with_build_devkit
1176with_jtreg
1177with_jib
1178with_abi_profile
1179enable_warnings_as_errors
1180with_native_debug_symbols
1181enable_debug_symbols
1182enable_zip_debug_info
1183enable_native_coverage
1184enable_dtrace
1185enable_aot
1186enable_hotspot_gtest
1187with_stdc__lib
1188with_msvcr_dll
1189with_msvcp_dll
1190with_x
1191with_cups
1192with_cups_include
1193with_freetype
1194with_freetype_include
1195with_freetype_lib
1196with_freetype_src
1197enable_freetype_bundling
1198with_alsa
1199with_alsa_include
1200with_alsa_lib
1201with_libffi
1202with_libffi_include
1203with_libffi_lib
1204enable_libffi_bundling
1205with_libjpeg
1206with_giflib
1207with_libpng
1208with_zlib
1209with_lcms
1210with_dxsdk
1211with_dxsdk_lib
1212with_dxsdk_include
1213with_jvm_features
1214with_jvm_interpreter
1215enable_jtreg_failure_handler
1216enable_generate_classlist
1217with_num_cores
1218with_memory_size
1219with_jobs
1220with_test_jobs
1221with_boot_jdk_jvmargs
1222with_sjavac_server_java
1223enable_sjavac
1224enable_javac_server
1225enable_icecc
1226enable_precompiled_headers
1227enable_ccache
1228with_ccache_dir
1229'
1230      ac_precious_vars='build_alias
1231host_alias
1232target_alias
1233BASENAME
1234BASH
1235CAT
1236CHMOD
1237CMP
1238COMM
1239CP
1240CUT
1241DATE
1242DIFF
1243DIRNAME
1244ECHO
1245EXPR
1246FILE
1247FIND
1248HEAD
1249GUNZIP
1250GZIP
1251LN
1252LS
1253MKDIR
1254MKTEMP
1255MV
1256NAWK
1257PRINTF
1258RM
1259RMDIR
1260SH
1261SORT
1262TAIL
1263TAR
1264TEE
1265TOUCH
1266TR
1267UNAME
1268UNIQ
1269WC
1270WHICH
1271XARGS
1272AWK
1273GREP
1274EGREP
1275FGREP
1276SED
1277CYGPATH
1278READLINK
1279DF
1280CPIO
1281NICE
1282PANDOC
1283MAKE
1284UNZIP
1285ZIPEXE
1286LDD
1287OTOOL
1288READELF
1289HG
1290STAT
1291TIME
1292DTRACE
1293PATCH
1294DSYMUTIL
1295XATTR
1296CODESIGN
1297SETFILE
1298PKG_CONFIG
1299JAVA
1300JAVAC
1301JAVAH
1302JAR
1303JARSIGNER
1304CC
1305CFLAGS
1306LDFLAGS
1307LIBS
1308CPPFLAGS
1309CXX
1310CXXFLAGS
1311CCC
1312CPP
1313CXXCPP
1314AS
1315AR
1316LIPO
1317STRIP
1318NM
1319GNM
1320OBJCOPY
1321OBJDUMP
1322BUILD_CC
1323BUILD_CXX
1324BUILD_NM
1325BUILD_AR
1326BUILD_OBJCOPY
1327BUILD_STRIP
1328JTREGEXE
1329XMKMF
1330FREETYPE_CFLAGS
1331FREETYPE_LIBS
1332ALSA_CFLAGS
1333ALSA_LIBS
1334LIBFFI_CFLAGS
1335LIBFFI_LIBS
1336PNG_CFLAGS
1337PNG_LIBS
1338LCMS_CFLAGS
1339LCMS_LIBS
1340ICECC_CMD
1341ICECC_CREATE_ENV
1342ICECC_WRAPPER
1343CCACHE'
1344
1345
1346# Initialize some variables set by options.
1347ac_init_help=
1348ac_init_version=false
1349ac_unrecognized_opts=
1350ac_unrecognized_sep=
1351# The variables have the same names as the options, with
1352# dashes changed to underlines.
1353cache_file=/dev/null
1354exec_prefix=NONE
1355no_create=
1356no_recursion=
1357prefix=NONE
1358program_prefix=NONE
1359program_suffix=NONE
1360program_transform_name=s,x,x,
1361silent=
1362site=
1363srcdir=
1364verbose=
1365x_includes=NONE
1366x_libraries=NONE
1367
1368# Installation directory options.
1369# These are left unexpanded so users can "make install exec_prefix=/foo"
1370# and all the variables that are supposed to be based on exec_prefix
1371# by default will actually change.
1372# Use braces instead of parens because sh, perl, etc. also accept them.
1373# (The list follows the same order as the GNU Coding Standards.)
1374bindir='${exec_prefix}/bin'
1375sbindir='${exec_prefix}/sbin'
1376libexecdir='${exec_prefix}/libexec'
1377datarootdir='${prefix}/share'
1378datadir='${datarootdir}'
1379sysconfdir='${prefix}/etc'
1380sharedstatedir='${prefix}/com'
1381localstatedir='${prefix}/var'
1382includedir='${prefix}/include'
1383oldincludedir='/usr/include'
1384docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1385infodir='${datarootdir}/info'
1386htmldir='${docdir}'
1387dvidir='${docdir}'
1388pdfdir='${docdir}'
1389psdir='${docdir}'
1390libdir='${exec_prefix}/lib'
1391localedir='${datarootdir}/locale'
1392mandir='${datarootdir}/man'
1393
1394ac_prev=
1395ac_dashdash=
1396for ac_option
1397do
1398  # If the previous option needs an argument, assign it.
1399  if test -n "$ac_prev"; then
1400    eval $ac_prev=\$ac_option
1401    ac_prev=
1402    continue
1403  fi
1404
1405  case $ac_option in
1406  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1407  *=)   ac_optarg= ;;
1408  *)    ac_optarg=yes ;;
1409  esac
1410
1411  # Accept the important Cygnus configure options, so we can diagnose typos.
1412
1413  case $ac_dashdash$ac_option in
1414  --)
1415    ac_dashdash=yes ;;
1416
1417  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1418    ac_prev=bindir ;;
1419  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1420    bindir=$ac_optarg ;;
1421
1422  -build | --build | --buil | --bui | --bu)
1423    ac_prev=build_alias ;;
1424  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1425    build_alias=$ac_optarg ;;
1426
1427  -cache-file | --cache-file | --cache-fil | --cache-fi \
1428  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1429    ac_prev=cache_file ;;
1430  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1431  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1432    cache_file=$ac_optarg ;;
1433
1434  --config-cache | -C)
1435    cache_file=config.cache ;;
1436
1437  -datadir | --datadir | --datadi | --datad)
1438    ac_prev=datadir ;;
1439  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1440    datadir=$ac_optarg ;;
1441
1442  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1443  | --dataroo | --dataro | --datar)
1444    ac_prev=datarootdir ;;
1445  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1446  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1447    datarootdir=$ac_optarg ;;
1448
1449  -disable-* | --disable-*)
1450    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1451    # Reject names that are not valid shell variable names.
1452    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1453      as_fn_error $? "invalid feature name: $ac_useropt"
1454    ac_useropt_orig=$ac_useropt
1455    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1456    case $ac_user_opts in
1457      *"
1458"enable_$ac_useropt"
1459"*) ;;
1460      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1461	 ac_unrecognized_sep=', ';;
1462    esac
1463    eval enable_$ac_useropt=no ;;
1464
1465  -docdir | --docdir | --docdi | --doc | --do)
1466    ac_prev=docdir ;;
1467  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1468    docdir=$ac_optarg ;;
1469
1470  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1471    ac_prev=dvidir ;;
1472  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1473    dvidir=$ac_optarg ;;
1474
1475  -enable-* | --enable-*)
1476    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1477    # Reject names that are not valid shell variable names.
1478    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1479      as_fn_error $? "invalid feature name: $ac_useropt"
1480    ac_useropt_orig=$ac_useropt
1481    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1482    case $ac_user_opts in
1483      *"
1484"enable_$ac_useropt"
1485"*) ;;
1486      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1487	 ac_unrecognized_sep=', ';;
1488    esac
1489    eval enable_$ac_useropt=\$ac_optarg ;;
1490
1491  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1492  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1493  | --exec | --exe | --ex)
1494    ac_prev=exec_prefix ;;
1495  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1496  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1497  | --exec=* | --exe=* | --ex=*)
1498    exec_prefix=$ac_optarg ;;
1499
1500  -gas | --gas | --ga | --g)
1501    # Obsolete; use --with-gas.
1502    with_gas=yes ;;
1503
1504  -help | --help | --hel | --he | -h)
1505    ac_init_help=long ;;
1506  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1507    ac_init_help=recursive ;;
1508  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1509    ac_init_help=short ;;
1510
1511  -host | --host | --hos | --ho)
1512    ac_prev=host_alias ;;
1513  -host=* | --host=* | --hos=* | --ho=*)
1514    host_alias=$ac_optarg ;;
1515
1516  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1517    ac_prev=htmldir ;;
1518  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1519  | --ht=*)
1520    htmldir=$ac_optarg ;;
1521
1522  -includedir | --includedir | --includedi | --included | --include \
1523  | --includ | --inclu | --incl | --inc)
1524    ac_prev=includedir ;;
1525  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1526  | --includ=* | --inclu=* | --incl=* | --inc=*)
1527    includedir=$ac_optarg ;;
1528
1529  -infodir | --infodir | --infodi | --infod | --info | --inf)
1530    ac_prev=infodir ;;
1531  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1532    infodir=$ac_optarg ;;
1533
1534  -libdir | --libdir | --libdi | --libd)
1535    ac_prev=libdir ;;
1536  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1537    libdir=$ac_optarg ;;
1538
1539  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1540  | --libexe | --libex | --libe)
1541    ac_prev=libexecdir ;;
1542  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1543  | --libexe=* | --libex=* | --libe=*)
1544    libexecdir=$ac_optarg ;;
1545
1546  -localedir | --localedir | --localedi | --localed | --locale)
1547    ac_prev=localedir ;;
1548  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1549    localedir=$ac_optarg ;;
1550
1551  -localstatedir | --localstatedir | --localstatedi | --localstated \
1552  | --localstate | --localstat | --localsta | --localst | --locals)
1553    ac_prev=localstatedir ;;
1554  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1555  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1556    localstatedir=$ac_optarg ;;
1557
1558  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1559    ac_prev=mandir ;;
1560  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1561    mandir=$ac_optarg ;;
1562
1563  -nfp | --nfp | --nf)
1564    # Obsolete; use --without-fp.
1565    with_fp=no ;;
1566
1567  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1568  | --no-cr | --no-c | -n)
1569    no_create=yes ;;
1570
1571  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1572  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1573    no_recursion=yes ;;
1574
1575  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1576  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1577  | --oldin | --oldi | --old | --ol | --o)
1578    ac_prev=oldincludedir ;;
1579  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1580  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1581  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1582    oldincludedir=$ac_optarg ;;
1583
1584  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1585    ac_prev=prefix ;;
1586  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1587    prefix=$ac_optarg ;;
1588
1589  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1590  | --program-pre | --program-pr | --program-p)
1591    ac_prev=program_prefix ;;
1592  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1593  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1594    program_prefix=$ac_optarg ;;
1595
1596  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1597  | --program-suf | --program-su | --program-s)
1598    ac_prev=program_suffix ;;
1599  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1600  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1601    program_suffix=$ac_optarg ;;
1602
1603  -program-transform-name | --program-transform-name \
1604  | --program-transform-nam | --program-transform-na \
1605  | --program-transform-n | --program-transform- \
1606  | --program-transform | --program-transfor \
1607  | --program-transfo | --program-transf \
1608  | --program-trans | --program-tran \
1609  | --progr-tra | --program-tr | --program-t)
1610    ac_prev=program_transform_name ;;
1611  -program-transform-name=* | --program-transform-name=* \
1612  | --program-transform-nam=* | --program-transform-na=* \
1613  | --program-transform-n=* | --program-transform-=* \
1614  | --program-transform=* | --program-transfor=* \
1615  | --program-transfo=* | --program-transf=* \
1616  | --program-trans=* | --program-tran=* \
1617  | --progr-tra=* | --program-tr=* | --program-t=*)
1618    program_transform_name=$ac_optarg ;;
1619
1620  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1621    ac_prev=pdfdir ;;
1622  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1623    pdfdir=$ac_optarg ;;
1624
1625  -psdir | --psdir | --psdi | --psd | --ps)
1626    ac_prev=psdir ;;
1627  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1628    psdir=$ac_optarg ;;
1629
1630  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1631  | -silent | --silent | --silen | --sile | --sil)
1632    silent=yes ;;
1633
1634  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1635    ac_prev=sbindir ;;
1636  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1637  | --sbi=* | --sb=*)
1638    sbindir=$ac_optarg ;;
1639
1640  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1641  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1642  | --sharedst | --shareds | --shared | --share | --shar \
1643  | --sha | --sh)
1644    ac_prev=sharedstatedir ;;
1645  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1646  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1647  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1648  | --sha=* | --sh=*)
1649    sharedstatedir=$ac_optarg ;;
1650
1651  -site | --site | --sit)
1652    ac_prev=site ;;
1653  -site=* | --site=* | --sit=*)
1654    site=$ac_optarg ;;
1655
1656  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1657    ac_prev=srcdir ;;
1658  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1659    srcdir=$ac_optarg ;;
1660
1661  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1662  | --syscon | --sysco | --sysc | --sys | --sy)
1663    ac_prev=sysconfdir ;;
1664  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1665  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1666    sysconfdir=$ac_optarg ;;
1667
1668  -target | --target | --targe | --targ | --tar | --ta | --t)
1669    ac_prev=target_alias ;;
1670  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1671    target_alias=$ac_optarg ;;
1672
1673  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1674    verbose=yes ;;
1675
1676  -version | --version | --versio | --versi | --vers | -V)
1677    ac_init_version=: ;;
1678
1679  -with-* | --with-*)
1680    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1681    # Reject names that are not valid shell variable names.
1682    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1683      as_fn_error $? "invalid package name: $ac_useropt"
1684    ac_useropt_orig=$ac_useropt
1685    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1686    case $ac_user_opts in
1687      *"
1688"with_$ac_useropt"
1689"*) ;;
1690      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1691	 ac_unrecognized_sep=', ';;
1692    esac
1693    eval with_$ac_useropt=\$ac_optarg ;;
1694
1695  -without-* | --without-*)
1696    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1697    # Reject names that are not valid shell variable names.
1698    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1699      as_fn_error $? "invalid package name: $ac_useropt"
1700    ac_useropt_orig=$ac_useropt
1701    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1702    case $ac_user_opts in
1703      *"
1704"with_$ac_useropt"
1705"*) ;;
1706      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1707	 ac_unrecognized_sep=', ';;
1708    esac
1709    eval with_$ac_useropt=no ;;
1710
1711  --x)
1712    # Obsolete; use --with-x.
1713    with_x=yes ;;
1714
1715  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1716  | --x-incl | --x-inc | --x-in | --x-i)
1717    ac_prev=x_includes ;;
1718  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1719  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1720    x_includes=$ac_optarg ;;
1721
1722  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1723  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1724    ac_prev=x_libraries ;;
1725  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1726  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1727    x_libraries=$ac_optarg ;;
1728
1729  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1730Try \`$0 --help' for more information"
1731    ;;
1732
1733  *=*)
1734    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1735    # Reject names that are not valid shell variable names.
1736    case $ac_envvar in #(
1737      '' | [0-9]* | *[!_$as_cr_alnum]* )
1738      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1739    esac
1740    eval $ac_envvar=\$ac_optarg
1741    export $ac_envvar ;;
1742
1743  *)
1744    # FIXME: should be removed in autoconf 3.0.
1745    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1746    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1747      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1748    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1749    ;;
1750
1751  esac
1752done
1753
1754if test -n "$ac_prev"; then
1755  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1756  as_fn_error $? "missing argument to $ac_option"
1757fi
1758
1759if test -n "$ac_unrecognized_opts"; then
1760  case $enable_option_checking in
1761    no) ;;
1762    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1763    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1764  esac
1765fi
1766
1767# Check all directory arguments for consistency.
1768for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1769		datadir sysconfdir sharedstatedir localstatedir includedir \
1770		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1771		libdir localedir mandir
1772do
1773  eval ac_val=\$$ac_var
1774  # Remove trailing slashes.
1775  case $ac_val in
1776    */ )
1777      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1778      eval $ac_var=\$ac_val;;
1779  esac
1780  # Be sure to have absolute directory names.
1781  case $ac_val in
1782    [\\/$]* | ?:[\\/]* )  continue;;
1783    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1784  esac
1785  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1786done
1787
1788# There might be people who depend on the old broken behavior: `$host'
1789# used to hold the argument of --host etc.
1790# FIXME: To remove some day.
1791build=$build_alias
1792host=$host_alias
1793target=$target_alias
1794
1795# FIXME: To remove some day.
1796if test "x$host_alias" != x; then
1797  if test "x$build_alias" = x; then
1798    cross_compiling=maybe
1799  elif test "x$build_alias" != "x$host_alias"; then
1800    cross_compiling=yes
1801  fi
1802fi
1803
1804ac_tool_prefix=
1805test -n "$host_alias" && ac_tool_prefix=$host_alias-
1806
1807test "$silent" = yes && exec 6>/dev/null
1808
1809
1810ac_pwd=`pwd` && test -n "$ac_pwd" &&
1811ac_ls_di=`ls -di .` &&
1812ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1813  as_fn_error $? "working directory cannot be determined"
1814test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1815  as_fn_error $? "pwd does not report name of working directory"
1816
1817
1818# Find the source files, if location was not specified.
1819if test -z "$srcdir"; then
1820  ac_srcdir_defaulted=yes
1821  # Try the directory containing this script, then the parent directory.
1822  ac_confdir=`$as_dirname -- "$as_myself" ||
1823$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1824	 X"$as_myself" : 'X\(//\)[^/]' \| \
1825	 X"$as_myself" : 'X\(//\)$' \| \
1826	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1827$as_echo X"$as_myself" |
1828    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1829	    s//\1/
1830	    q
1831	  }
1832	  /^X\(\/\/\)[^/].*/{
1833	    s//\1/
1834	    q
1835	  }
1836	  /^X\(\/\/\)$/{
1837	    s//\1/
1838	    q
1839	  }
1840	  /^X\(\/\).*/{
1841	    s//\1/
1842	    q
1843	  }
1844	  s/.*/./; q'`
1845  srcdir=$ac_confdir
1846  if test ! -r "$srcdir/$ac_unique_file"; then
1847    srcdir=..
1848  fi
1849else
1850  ac_srcdir_defaulted=no
1851fi
1852if test ! -r "$srcdir/$ac_unique_file"; then
1853  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1854  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1855fi
1856ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1857ac_abs_confdir=`(
1858	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1859	pwd)`
1860# When building in place, set srcdir=.
1861if test "$ac_abs_confdir" = "$ac_pwd"; then
1862  srcdir=.
1863fi
1864# Remove unnecessary trailing slashes from srcdir.
1865# Double slashes in file names in object file debugging info
1866# mess up M-x gdb in Emacs.
1867case $srcdir in
1868*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1869esac
1870for ac_var in $ac_precious_vars; do
1871  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1872  eval ac_env_${ac_var}_value=\$${ac_var}
1873  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1874  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1875done
1876
1877#
1878# Report the --help message.
1879#
1880if test "$ac_init_help" = "long"; then
1881  # Omit some internal or obsolete options to make the list less imposing.
1882  # This message is too long to be a string in the A/UX 3.1 sh.
1883  cat <<_ACEOF
1884\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1885
1886Usage: $0 [OPTION]... [VAR=VALUE]...
1887
1888To assign environment variables (e.g., CC, CFLAGS...), specify them as
1889VAR=VALUE.  See below for descriptions of some of the useful variables.
1890
1891Defaults for the options are specified in brackets.
1892
1893Configuration:
1894  -h, --help              display this help and exit
1895      --help=short        display options specific to this package
1896      --help=recursive    display the short help of all the included packages
1897  -V, --version           display version information and exit
1898  -q, --quiet, --silent   do not print \`checking ...' messages
1899      --cache-file=FILE   cache test results in FILE [disabled]
1900  -C, --config-cache      alias for \`--cache-file=config.cache'
1901  -n, --no-create         do not create output files
1902      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1903
1904Installation directories:
1905  --prefix=PREFIX         install architecture-independent files in PREFIX
1906                          [$ac_default_prefix]
1907  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1908                          [PREFIX]
1909
1910By default, \`make install' will install all the files in
1911\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1912an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1913for instance \`--prefix=\$HOME'.
1914
1915For better control, use the options below.
1916
1917Fine tuning of the installation directories:
1918  --bindir=DIR            user executables [EPREFIX/bin]
1919  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1920  --libexecdir=DIR        program executables [EPREFIX/libexec]
1921  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1922  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1923  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1924  --libdir=DIR            object code libraries [EPREFIX/lib]
1925  --includedir=DIR        C header files [PREFIX/include]
1926  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1927  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1928  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1929  --infodir=DIR           info documentation [DATAROOTDIR/info]
1930  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1931  --mandir=DIR            man documentation [DATAROOTDIR/man]
1932  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1933  --htmldir=DIR           html documentation [DOCDIR]
1934  --dvidir=DIR            dvi documentation [DOCDIR]
1935  --pdfdir=DIR            pdf documentation [DOCDIR]
1936  --psdir=DIR             ps documentation [DOCDIR]
1937_ACEOF
1938
1939  cat <<\_ACEOF
1940
1941X features:
1942  --x-includes=DIR    X include files are in DIR
1943  --x-libraries=DIR   X library files are in DIR
1944
1945System types:
1946  --build=BUILD     configure for building on BUILD [guessed]
1947  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1948  --target=TARGET   configure for building compilers for TARGET [HOST]
1949_ACEOF
1950fi
1951
1952if test -n "$ac_init_help"; then
1953  case $ac_init_help in
1954     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1955   esac
1956  cat <<\_ACEOF
1957
1958Optional Features:
1959  --disable-option-checking  ignore unrecognized --enable/--with options
1960  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1961  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1962  --enable-openjdk-only   suppress building custom source even if present
1963                          [disabled]
1964  --enable-debug          set the debug level to fastdebug (shorthand for
1965                          --with-debug-level=fastdebug) [disabled]
1966  --enable-headless-only  only build headless (no GUI) support [disabled]
1967  --disable-unlimited-crypto
1968                          Disable unlimited crypto policy [enabled]
1969  --disable-keep-packaged-modules
1970                          Do not keep packaged modules in jdk image [enable]
1971  --enable-static-build   enable static library build [disabled]
1972  --disable-warnings-as-errors
1973                          do not consider native warnings to be an error
1974                          [enabled]
1975  --enable-debug-symbols  Deprecated. Option is kept for backwards
1976                          compatibility and is ignored
1977  --enable-zip-debug-info Deprecated. Option is kept for backwards
1978                          compatibility and is ignored
1979  --enable-native-coverage
1980                          enable native compilation with code coverage
1981                          data[disabled]
1982  --enable-dtrace[=yes/no/auto]
1983                          enable dtrace. Default is auto, where dtrace is
1984                          enabled if all dependencies are present.
1985  --enable-aot[=yes/no/auto]
1986                          enable ahead of time compilation feature. Default is
1987                          auto, where aot is enabled if all dependencies are
1988                          present.
1989  --disable-hotspot-gtest Disables building of the Hotspot unit tests
1990  --disable-freetype-bundling
1991                          disable bundling of the freetype library with the
1992                          build result [enabled on Windows or when using
1993                          --with-freetype, disabled otherwise]
1994  --enable-libffi-bundling
1995                          enable bundling of libffi.so to make the built JDK
1996                          runnable on more systems
1997  --enable-jtreg-failure-handler
1998                          forces build of the jtreg failure handler to be
1999                          enabled, missing dependencies become fatal errors.
2000                          Default is auto, where the failure handler is built
2001                          if all dependencies are present and otherwise just
2002                          disabled.
2003  --disable-generate-classlist
2004                          forces enabling or disabling of the generation of a
2005                          CDS classlist at build time. Default is to generate
2006                          it when either the server or client JVMs are built.
2007  --enable-sjavac         use sjavac to do fast incremental compiles
2008                          [disabled]
2009  --disable-javac-server  disable javac server [enabled]
2010  --enable-icecc          enable distribted compilation of native code using
2011                          icecc/icecream [disabled]
2012  --disable-precompiled-headers
2013                          disable using precompiled headers when compiling C++
2014                          [enabled]
2015  --enable-ccache         enable using ccache to speed up recompilations
2016                          [disabled]
2017
2018Optional Packages:
2019  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2020  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2021  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2022                          support it), e.g. --with-target-bits=32 [guessed]
2023  --with-custom-make-dir  Deprecated. Option is kept for backwards
2024                          compatibility and is ignored
2025  --with-jdk-variant      JDK variant to build (normal) [normal]
2026  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2027                          optimized) [release]
2028  --with-jvm-variants     JVM variants (separated by commas) to build
2029                          (server,client,minimal,core,zero,zeroshark,custom)
2030                          [server]
2031  --with-cpu-port         specify sources to use for Hotspot 64-bit ARM port
2032                          (arm64,aarch64) [aarch64]
2033  --with-devkit           use this devkit for compilers, tools and resources
2034  --with-sys-root         alias for --with-sysroot for backwards compatability
2035  --with-sysroot          use this directory as sysroot
2036  --with-tools-dir        alias for --with-toolchain-path for backwards
2037                          compatibility
2038  --with-toolchain-path   prepend these directories when searching for
2039                          toolchain binaries (compilers etc)
2040  --with-extra-path       prepend these directories to the default path
2041  --with-sdk-name         use the platform SDK of the given name. [macosx]
2042  --with-conf-name        use this as the name of the configuration [generated
2043                          from important configuration options]
2044  --with-output-sync      set make output sync type if supported by make.
2045                          [recurse]
2046  --with-default-make-target
2047                          set the default make target [exploded-image]
2048  --with-cacerts-file     specify alternative cacerts file
2049  --with-copyright-year   Set copyright year value for build [current year]
2050  --with-milestone        Deprecated. Option is kept for backwards
2051                          compatibility and is ignored
2052  --with-update-version   Deprecated. Option is kept for backwards
2053                          compatibility and is ignored
2054  --with-user-release-suffix
2055                          Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-build-number     Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-version-string   Set version string [calculated]
2060  --with-version-pre      Set the base part of the version 'PRE' field
2061                          (pre-release identifier) ['internal']
2062  --with-version-opt      Set version 'OPT' field (build metadata)
2063                          [<timestamp>.<user>.<dirname>]
2064  --with-version-build    Set version 'BUILD' field (build number) [not
2065                          specified]
2066  --with-version-major    Set version 'MAJOR' field (first number) [current
2067                          source value]
2068  --with-version-minor    Set version 'MINOR' field (second number) [current
2069                          source value]
2070  --with-version-security Set version 'SECURITY' field (third number) [current
2071                          source value]
2072  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2073                          specified]
2074  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2075  --with-build-jdk        path to JDK of same version as is being built[the
2076                          newly built JDK]
2077  --with-add-source-root  Deprecated. Option is kept for backwards
2078                          compatibility and is ignored
2079  --with-override-source-root
2080                          Deprecated. Option is kept for backwards
2081                          compatibility and is ignored
2082  --with-adds-and-overrides
2083                          Deprecated. Option is kept for backwards
2084                          compatibility and is ignored
2085  --with-override-langtools
2086                          Deprecated. Option is kept for backwards
2087                          compatibility and is ignored
2088  --with-override-corba   Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-jaxp    Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-jaxws   Deprecated. Option is kept for backwards
2093                          compatibility and is ignored
2094  --with-override-hotspot Deprecated. Option is kept for backwards
2095                          compatibility and is ignored
2096  --with-override-nashorn Deprecated. Option is kept for backwards
2097                          compatibility and is ignored
2098  --with-override-jdk     Deprecated. Option is kept for backwards
2099                          compatibility and is ignored
2100  --with-import_hotspot   Deprecated. Option is kept for backwards
2101                          compatibility and is ignored
2102  --with-import-modules   import a set of prebuilt modules either as a zip
2103                          file or an exploded directory
2104  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2105                          to show possible values [platform dependent]
2106  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2107  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2108  --with-extra-ldflags    extra flags to be used when linking jdk
2109  --with-toolchain-version
2110                          the version of the toolchain to look for, use
2111                          '--help' to show possible values [platform
2112                          dependent]
2113  --with-build-devkit     Devkit to use for the build platform toolchain
2114  --with-jtreg            Regression Test Harness [probed]
2115  --with-jib              Jib dependency management tool [not used]
2116  --with-abi-profile      specify ABI profile for ARM builds
2117                          (arm-vfp-sflt,arm-vfp-hflt,arm-sflt,
2118                          armv5-vfp-sflt,armv6-vfp-hflt,arm64,aarch64)
2119                          [toolchain dependent]
2120  --with-native-debug-symbols
2121                          set the native debug symbol configuration (none,
2122                          internal, external, zipped) [varying]
2123  --with-stdc++lib=<static>,<dynamic>,<default>
2124                          force linking of the C++ runtime on Linux to either
2125                          static or dynamic, default is static with dynamic as
2126                          fallback
2127  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2128                          (Windows only) [probed]
2129  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2130                          (Windows only) [probed]
2131  --with-x                use the X Window System
2132  --with-cups             specify prefix directory for the cups package
2133                          (expecting the headers under PATH/include)
2134  --with-cups-include     specify directory for the cups include files
2135  --with-freetype         specify prefix directory for the freetype package
2136                          (expecting the libraries under PATH/lib and the
2137                          headers under PATH/include)
2138  --with-freetype-include specify directory for the freetype include files
2139  --with-freetype-lib     specify directory for the freetype library
2140  --with-freetype-src     specify directory with freetype sources to
2141                          automatically build the library (experimental,
2142                          Windows-only)
2143  --with-alsa             specify prefix directory for the alsa package
2144                          (expecting the libraries under PATH/lib and the
2145                          headers under PATH/include)
2146  --with-alsa-include     specify directory for the alsa include files
2147  --with-alsa-lib         specify directory for the alsa library
2148  --with-libffi           specify prefix directory for the libffi package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-libffi-include   specify directory for the libffi include files
2152  --with-libffi-lib       specify directory for the libffi library
2153  --with-libjpeg          use libjpeg from build system or OpenJDK source
2154                          (system, bundled) [bundled]
2155  --with-giflib           use giflib from build system or OpenJDK source
2156                          (system, bundled) [bundled]
2157  --with-libpng           use libpng from build system or OpenJDK source
2158                          (system, bundled) [bundled]
2159  --with-zlib             use zlib from build system or OpenJDK source
2160                          (system, bundled) [bundled]
2161  --with-lcms             use lcms2 from build system or OpenJDK source
2162                          (system, bundled) [bundled]
2163  --with-dxsdk            Deprecated. Option is kept for backwards
2164                          compatibility and is ignored
2165  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2166                          compatibility and is ignored
2167  --with-dxsdk-include    Deprecated. Option is kept for backwards
2168                          compatibility and is ignored
2169  --with-jvm-features     additional JVM features to enable (separated by
2170                          comma), use '--help' to show possible values [none]
2171  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2172                          compatibility and is ignored
2173  --with-num-cores        number of cores in the build system, e.g.
2174                          --with-num-cores=8 [probed]
2175  --with-memory-size      memory (in MB) available in the build system, e.g.
2176                          --with-memory-size=1024 [probed]
2177  --with-jobs             number of parallel jobs to let make run [calculated
2178                          based on cores and memory]
2179  --with-test-jobs        number of parallel tests jobs to run [based on build
2180                          jobs]
2181  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2182                          invocations of boot JDK, overriding the default
2183                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2184                          -enableassertions"
2185  --with-sjavac-server-java
2186                          use this java binary for running the sjavac
2187                          background server [Boot JDK java]
2188  --with-ccache-dir       where to store ccache files [~/.ccache]
2189
2190Some influential environment variables:
2191  BASENAME    Override default value for BASENAME
2192  BASH        Override default value for BASH
2193  CAT         Override default value for CAT
2194  CHMOD       Override default value for CHMOD
2195  CMP         Override default value for CMP
2196  COMM        Override default value for COMM
2197  CP          Override default value for CP
2198  CUT         Override default value for CUT
2199  DATE        Override default value for DATE
2200  DIFF        Override default value for DIFF
2201  DIRNAME     Override default value for DIRNAME
2202  ECHO        Override default value for ECHO
2203  EXPR        Override default value for EXPR
2204  FILE        Override default value for FILE
2205  FIND        Override default value for FIND
2206  HEAD        Override default value for HEAD
2207  GUNZIP      Override default value for GUNZIP
2208  GZIP        Override default value for GZIP
2209  LN          Override default value for LN
2210  LS          Override default value for LS
2211  MKDIR       Override default value for MKDIR
2212  MKTEMP      Override default value for MKTEMP
2213  MV          Override default value for MV
2214  NAWK        Override default value for NAWK
2215  PRINTF      Override default value for PRINTF
2216  RM          Override default value for RM
2217  RMDIR       Override default value for RMDIR
2218  SH          Override default value for SH
2219  SORT        Override default value for SORT
2220  TAIL        Override default value for TAIL
2221  TAR         Override default value for TAR
2222  TEE         Override default value for TEE
2223  TOUCH       Override default value for TOUCH
2224  TR          Override default value for TR
2225  UNAME       Override default value for UNAME
2226  UNIQ        Override default value for UNIQ
2227  WC          Override default value for WC
2228  WHICH       Override default value for WHICH
2229  XARGS       Override default value for XARGS
2230  AWK         Override default value for AWK
2231  GREP        Override default value for GREP
2232  EGREP       Override default value for EGREP
2233  FGREP       Override default value for FGREP
2234  SED         Override default value for SED
2235  CYGPATH     Override default value for CYGPATH
2236  READLINK    Override default value for READLINK
2237  DF          Override default value for DF
2238  CPIO        Override default value for CPIO
2239  NICE        Override default value for NICE
2240  PANDOC      Override default value for PANDOC
2241  MAKE        Override default value for MAKE
2242  UNZIP       Override default value for UNZIP
2243  ZIPEXE      Override default value for ZIPEXE
2244  LDD         Override default value for LDD
2245  OTOOL       Override default value for OTOOL
2246  READELF     Override default value for READELF
2247  HG          Override default value for HG
2248  STAT        Override default value for STAT
2249  TIME        Override default value for TIME
2250  DTRACE      Override default value for DTRACE
2251  PATCH       Override default value for PATCH
2252  DSYMUTIL    Override default value for DSYMUTIL
2253  XATTR       Override default value for XATTR
2254  CODESIGN    Override default value for CODESIGN
2255  SETFILE     Override default value for SETFILE
2256  PKG_CONFIG  path to pkg-config utility
2257  JAVA        Override default value for JAVA
2258  JAVAC       Override default value for JAVAC
2259  JAVAH       Override default value for JAVAH
2260  JAR         Override default value for JAR
2261  JARSIGNER   Override default value for JARSIGNER
2262  CC          C compiler command
2263  CFLAGS      C compiler flags
2264  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2265              nonstandard directory <lib dir>
2266  LIBS        libraries to pass to the linker, e.g. -l<library>
2267  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2268              you have headers in a nonstandard directory <include dir>
2269  CXX         C++ compiler command
2270  CXXFLAGS    C++ compiler flags
2271  CPP         C preprocessor
2272  CXXCPP      C++ preprocessor
2273  AS          Override default value for AS
2274  AR          Override default value for AR
2275  LIPO        Override default value for LIPO
2276  STRIP       Override default value for STRIP
2277  NM          Override default value for NM
2278  GNM         Override default value for GNM
2279  OBJCOPY     Override default value for OBJCOPY
2280  OBJDUMP     Override default value for OBJDUMP
2281  BUILD_CC    Override default value for BUILD_CC
2282  BUILD_CXX   Override default value for BUILD_CXX
2283  BUILD_NM    Override default value for BUILD_NM
2284  BUILD_AR    Override default value for BUILD_AR
2285  BUILD_OBJCOPY
2286              Override default value for BUILD_OBJCOPY
2287  BUILD_STRIP Override default value for BUILD_STRIP
2288  JTREGEXE    Override default value for JTREGEXE
2289  XMKMF       Path to xmkmf, Makefile generator for X Window System
2290  FREETYPE_CFLAGS
2291              C compiler flags for FREETYPE, overriding pkg-config
2292  FREETYPE_LIBS
2293              linker flags for FREETYPE, overriding pkg-config
2294  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2295  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2296  LIBFFI_CFLAGS
2297              C compiler flags for LIBFFI, overriding pkg-config
2298  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2299  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2300  PNG_LIBS    linker flags for PNG, overriding pkg-config
2301  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2302  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2303  ICECC_CMD   Override default value for ICECC_CMD
2304  ICECC_CREATE_ENV
2305              Override default value for ICECC_CREATE_ENV
2306  ICECC_WRAPPER
2307              Override default value for ICECC_WRAPPER
2308  CCACHE      Override default value for CCACHE
2309
2310Use these variables to override the choices made by `configure' or to help
2311it to find libraries and programs with nonstandard names/locations.
2312
2313Report bugs to <build-dev@openjdk.java.net>.
2314OpenJDK home page: <http://openjdk.java.net>.
2315_ACEOF
2316ac_status=$?
2317fi
2318
2319if test "$ac_init_help" = "recursive"; then
2320  # If there are subdirs, report their specific --help.
2321  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2322    test -d "$ac_dir" ||
2323      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2324      continue
2325    ac_builddir=.
2326
2327case "$ac_dir" in
2328.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2329*)
2330  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2331  # A ".." for each directory in $ac_dir_suffix.
2332  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2333  case $ac_top_builddir_sub in
2334  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2335  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2336  esac ;;
2337esac
2338ac_abs_top_builddir=$ac_pwd
2339ac_abs_builddir=$ac_pwd$ac_dir_suffix
2340# for backward compatibility:
2341ac_top_builddir=$ac_top_build_prefix
2342
2343case $srcdir in
2344  .)  # We are building in place.
2345    ac_srcdir=.
2346    ac_top_srcdir=$ac_top_builddir_sub
2347    ac_abs_top_srcdir=$ac_pwd ;;
2348  [\\/]* | ?:[\\/]* )  # Absolute name.
2349    ac_srcdir=$srcdir$ac_dir_suffix;
2350    ac_top_srcdir=$srcdir
2351    ac_abs_top_srcdir=$srcdir ;;
2352  *) # Relative name.
2353    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2354    ac_top_srcdir=$ac_top_build_prefix$srcdir
2355    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2356esac
2357ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2358
2359    cd "$ac_dir" || { ac_status=$?; continue; }
2360    # Check for guested configure.
2361    if test -f "$ac_srcdir/configure.gnu"; then
2362      echo &&
2363      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2364    elif test -f "$ac_srcdir/configure"; then
2365      echo &&
2366      $SHELL "$ac_srcdir/configure" --help=recursive
2367    else
2368      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2369    fi || ac_status=$?
2370    cd "$ac_pwd" || { ac_status=$?; break; }
2371  done
2372fi
2373
2374test -n "$ac_init_help" && exit $ac_status
2375if $ac_init_version; then
2376  cat <<\_ACEOF
2377OpenJDK configure jdk9
2378generated by GNU Autoconf 2.69
2379
2380Copyright (C) 2012 Free Software Foundation, Inc.
2381This configure script is free software; the Free Software Foundation
2382gives unlimited permission to copy, distribute and modify it.
2383_ACEOF
2384  exit
2385fi
2386
2387## ------------------------ ##
2388## Autoconf initialization. ##
2389## ------------------------ ##
2390
2391# ac_fn_c_try_compile LINENO
2392# --------------------------
2393# Try to compile conftest.$ac_ext, and return whether this succeeded.
2394ac_fn_c_try_compile ()
2395{
2396  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2397  rm -f conftest.$ac_objext
2398  if { { ac_try="$ac_compile"
2399case "(($ac_try" in
2400  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2401  *) ac_try_echo=$ac_try;;
2402esac
2403eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2404$as_echo "$ac_try_echo"; } >&5
2405  (eval "$ac_compile") 2>conftest.err
2406  ac_status=$?
2407  if test -s conftest.err; then
2408    grep -v '^ *+' conftest.err >conftest.er1
2409    cat conftest.er1 >&5
2410    mv -f conftest.er1 conftest.err
2411  fi
2412  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2413  test $ac_status = 0; } && {
2414	 test -z "$ac_c_werror_flag" ||
2415	 test ! -s conftest.err
2416       } && test -s conftest.$ac_objext; then :
2417  ac_retval=0
2418else
2419  $as_echo "$as_me: failed program was:" >&5
2420sed 's/^/| /' conftest.$ac_ext >&5
2421
2422	ac_retval=1
2423fi
2424  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2425  as_fn_set_status $ac_retval
2426
2427} # ac_fn_c_try_compile
2428
2429# ac_fn_cxx_try_compile LINENO
2430# ----------------------------
2431# Try to compile conftest.$ac_ext, and return whether this succeeded.
2432ac_fn_cxx_try_compile ()
2433{
2434  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2435  rm -f conftest.$ac_objext
2436  if { { ac_try="$ac_compile"
2437case "(($ac_try" in
2438  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2439  *) ac_try_echo=$ac_try;;
2440esac
2441eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2442$as_echo "$ac_try_echo"; } >&5
2443  (eval "$ac_compile") 2>conftest.err
2444  ac_status=$?
2445  if test -s conftest.err; then
2446    grep -v '^ *+' conftest.err >conftest.er1
2447    cat conftest.er1 >&5
2448    mv -f conftest.er1 conftest.err
2449  fi
2450  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2451  test $ac_status = 0; } && {
2452	 test -z "$ac_cxx_werror_flag" ||
2453	 test ! -s conftest.err
2454       } && test -s conftest.$ac_objext; then :
2455  ac_retval=0
2456else
2457  $as_echo "$as_me: failed program was:" >&5
2458sed 's/^/| /' conftest.$ac_ext >&5
2459
2460	ac_retval=1
2461fi
2462  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2463  as_fn_set_status $ac_retval
2464
2465} # ac_fn_cxx_try_compile
2466
2467# ac_fn_c_try_cpp LINENO
2468# ----------------------
2469# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2470ac_fn_c_try_cpp ()
2471{
2472  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2473  if { { ac_try="$ac_cpp conftest.$ac_ext"
2474case "(($ac_try" in
2475  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2476  *) ac_try_echo=$ac_try;;
2477esac
2478eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2479$as_echo "$ac_try_echo"; } >&5
2480  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2481  ac_status=$?
2482  if test -s conftest.err; then
2483    grep -v '^ *+' conftest.err >conftest.er1
2484    cat conftest.er1 >&5
2485    mv -f conftest.er1 conftest.err
2486  fi
2487  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2488  test $ac_status = 0; } > conftest.i && {
2489	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2490	 test ! -s conftest.err
2491       }; then :
2492  ac_retval=0
2493else
2494  $as_echo "$as_me: failed program was:" >&5
2495sed 's/^/| /' conftest.$ac_ext >&5
2496
2497    ac_retval=1
2498fi
2499  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2500  as_fn_set_status $ac_retval
2501
2502} # ac_fn_c_try_cpp
2503
2504# ac_fn_cxx_try_cpp LINENO
2505# ------------------------
2506# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2507ac_fn_cxx_try_cpp ()
2508{
2509  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2510  if { { ac_try="$ac_cpp conftest.$ac_ext"
2511case "(($ac_try" in
2512  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2513  *) ac_try_echo=$ac_try;;
2514esac
2515eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2516$as_echo "$ac_try_echo"; } >&5
2517  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2518  ac_status=$?
2519  if test -s conftest.err; then
2520    grep -v '^ *+' conftest.err >conftest.er1
2521    cat conftest.er1 >&5
2522    mv -f conftest.er1 conftest.err
2523  fi
2524  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2525  test $ac_status = 0; } > conftest.i && {
2526	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2527	 test ! -s conftest.err
2528       }; then :
2529  ac_retval=0
2530else
2531  $as_echo "$as_me: failed program was:" >&5
2532sed 's/^/| /' conftest.$ac_ext >&5
2533
2534    ac_retval=1
2535fi
2536  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2537  as_fn_set_status $ac_retval
2538
2539} # ac_fn_cxx_try_cpp
2540
2541# ac_fn_c_try_link LINENO
2542# -----------------------
2543# Try to link conftest.$ac_ext, and return whether this succeeded.
2544ac_fn_c_try_link ()
2545{
2546  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2547  rm -f conftest.$ac_objext conftest$ac_exeext
2548  if { { ac_try="$ac_link"
2549case "(($ac_try" in
2550  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2551  *) ac_try_echo=$ac_try;;
2552esac
2553eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2554$as_echo "$ac_try_echo"; } >&5
2555  (eval "$ac_link") 2>conftest.err
2556  ac_status=$?
2557  if test -s conftest.err; then
2558    grep -v '^ *+' conftest.err >conftest.er1
2559    cat conftest.er1 >&5
2560    mv -f conftest.er1 conftest.err
2561  fi
2562  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2563  test $ac_status = 0; } && {
2564	 test -z "$ac_c_werror_flag" ||
2565	 test ! -s conftest.err
2566       } && test -s conftest$ac_exeext && {
2567	 test "$cross_compiling" = yes ||
2568	 test -x conftest$ac_exeext
2569       }; then :
2570  ac_retval=0
2571else
2572  $as_echo "$as_me: failed program was:" >&5
2573sed 's/^/| /' conftest.$ac_ext >&5
2574
2575	ac_retval=1
2576fi
2577  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2578  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2579  # interfere with the next link command; also delete a directory that is
2580  # left behind by Apple's compiler.  We do this before executing the actions.
2581  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2582  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2583  as_fn_set_status $ac_retval
2584
2585} # ac_fn_c_try_link
2586
2587# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2588# ---------------------------------------------------------
2589# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2590# the include files in INCLUDES and setting the cache variable VAR
2591# accordingly.
2592ac_fn_cxx_check_header_mongrel ()
2593{
2594  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2595  if eval \${$3+:} false; then :
2596  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2597$as_echo_n "checking for $2... " >&6; }
2598if eval \${$3+:} false; then :
2599  $as_echo_n "(cached) " >&6
2600fi
2601eval ac_res=\$$3
2602	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2603$as_echo "$ac_res" >&6; }
2604else
2605  # Is the header compilable?
2606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2607$as_echo_n "checking $2 usability... " >&6; }
2608cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2609/* end confdefs.h.  */
2610$4
2611#include <$2>
2612_ACEOF
2613if ac_fn_cxx_try_compile "$LINENO"; then :
2614  ac_header_compiler=yes
2615else
2616  ac_header_compiler=no
2617fi
2618rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2619{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2620$as_echo "$ac_header_compiler" >&6; }
2621
2622# Is the header present?
2623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2624$as_echo_n "checking $2 presence... " >&6; }
2625cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2626/* end confdefs.h.  */
2627#include <$2>
2628_ACEOF
2629if ac_fn_cxx_try_cpp "$LINENO"; then :
2630  ac_header_preproc=yes
2631else
2632  ac_header_preproc=no
2633fi
2634rm -f conftest.err conftest.i conftest.$ac_ext
2635{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2636$as_echo "$ac_header_preproc" >&6; }
2637
2638# So?  What about this header?
2639case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2640  yes:no: )
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2642$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2644$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2645    ;;
2646  no:yes:* )
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2648$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2650$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2652$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2654$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2656$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2657( $as_echo "## ----------------------------------------- ##
2658## Report this to build-dev@openjdk.java.net ##
2659## ----------------------------------------- ##"
2660     ) | sed "s/^/$as_me: WARNING:     /" >&2
2661    ;;
2662esac
2663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2664$as_echo_n "checking for $2... " >&6; }
2665if eval \${$3+:} false; then :
2666  $as_echo_n "(cached) " >&6
2667else
2668  eval "$3=\$ac_header_compiler"
2669fi
2670eval ac_res=\$$3
2671	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2672$as_echo "$ac_res" >&6; }
2673fi
2674  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2675
2676} # ac_fn_cxx_check_header_mongrel
2677
2678# ac_fn_cxx_try_run LINENO
2679# ------------------------
2680# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2681# that executables *can* be run.
2682ac_fn_cxx_try_run ()
2683{
2684  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2685  if { { ac_try="$ac_link"
2686case "(($ac_try" in
2687  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2688  *) ac_try_echo=$ac_try;;
2689esac
2690eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2691$as_echo "$ac_try_echo"; } >&5
2692  (eval "$ac_link") 2>&5
2693  ac_status=$?
2694  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2695  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2696  { { case "(($ac_try" in
2697  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2698  *) ac_try_echo=$ac_try;;
2699esac
2700eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2701$as_echo "$ac_try_echo"; } >&5
2702  (eval "$ac_try") 2>&5
2703  ac_status=$?
2704  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2705  test $ac_status = 0; }; }; then :
2706  ac_retval=0
2707else
2708  $as_echo "$as_me: program exited with status $ac_status" >&5
2709       $as_echo "$as_me: failed program was:" >&5
2710sed 's/^/| /' conftest.$ac_ext >&5
2711
2712       ac_retval=$ac_status
2713fi
2714  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2715  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2716  as_fn_set_status $ac_retval
2717
2718} # ac_fn_cxx_try_run
2719
2720# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2721# ---------------------------------------------------------
2722# Tests whether HEADER exists and can be compiled using the include files in
2723# INCLUDES, setting the cache variable VAR accordingly.
2724ac_fn_cxx_check_header_compile ()
2725{
2726  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2728$as_echo_n "checking for $2... " >&6; }
2729if eval \${$3+:} false; then :
2730  $as_echo_n "(cached) " >&6
2731else
2732  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2733/* end confdefs.h.  */
2734$4
2735#include <$2>
2736_ACEOF
2737if ac_fn_cxx_try_compile "$LINENO"; then :
2738  eval "$3=yes"
2739else
2740  eval "$3=no"
2741fi
2742rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2743fi
2744eval ac_res=\$$3
2745	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2746$as_echo "$ac_res" >&6; }
2747  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2748
2749} # ac_fn_cxx_check_header_compile
2750
2751# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2752# ----------------------------------------------
2753# Tries to find the compile-time value of EXPR in a program that includes
2754# INCLUDES, setting VAR accordingly. Returns whether the value could be
2755# computed
2756ac_fn_cxx_compute_int ()
2757{
2758  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2759  if test "$cross_compiling" = yes; then
2760    # Depending upon the size, compute the lo and hi bounds.
2761cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2762/* end confdefs.h.  */
2763$4
2764int
2765main ()
2766{
2767static int test_array [1 - 2 * !(($2) >= 0)];
2768test_array [0] = 0;
2769return test_array [0];
2770
2771  ;
2772  return 0;
2773}
2774_ACEOF
2775if ac_fn_cxx_try_compile "$LINENO"; then :
2776  ac_lo=0 ac_mid=0
2777  while :; do
2778    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2779/* end confdefs.h.  */
2780$4
2781int
2782main ()
2783{
2784static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2785test_array [0] = 0;
2786return test_array [0];
2787
2788  ;
2789  return 0;
2790}
2791_ACEOF
2792if ac_fn_cxx_try_compile "$LINENO"; then :
2793  ac_hi=$ac_mid; break
2794else
2795  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2796			if test $ac_lo -le $ac_mid; then
2797			  ac_lo= ac_hi=
2798			  break
2799			fi
2800			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2801fi
2802rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2803  done
2804else
2805  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2806/* end confdefs.h.  */
2807$4
2808int
2809main ()
2810{
2811static int test_array [1 - 2 * !(($2) < 0)];
2812test_array [0] = 0;
2813return test_array [0];
2814
2815  ;
2816  return 0;
2817}
2818_ACEOF
2819if ac_fn_cxx_try_compile "$LINENO"; then :
2820  ac_hi=-1 ac_mid=-1
2821  while :; do
2822    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2823/* end confdefs.h.  */
2824$4
2825int
2826main ()
2827{
2828static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2829test_array [0] = 0;
2830return test_array [0];
2831
2832  ;
2833  return 0;
2834}
2835_ACEOF
2836if ac_fn_cxx_try_compile "$LINENO"; then :
2837  ac_lo=$ac_mid; break
2838else
2839  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2840			if test $ac_mid -le $ac_hi; then
2841			  ac_lo= ac_hi=
2842			  break
2843			fi
2844			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2845fi
2846rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2847  done
2848else
2849  ac_lo= ac_hi=
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854# Binary search between lo and hi bounds.
2855while test "x$ac_lo" != "x$ac_hi"; do
2856  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2857  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2858/* end confdefs.h.  */
2859$4
2860int
2861main ()
2862{
2863static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2864test_array [0] = 0;
2865return test_array [0];
2866
2867  ;
2868  return 0;
2869}
2870_ACEOF
2871if ac_fn_cxx_try_compile "$LINENO"; then :
2872  ac_hi=$ac_mid
2873else
2874  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2875fi
2876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2877done
2878case $ac_lo in #((
2879?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2880'') ac_retval=1 ;;
2881esac
2882  else
2883    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2884/* end confdefs.h.  */
2885$4
2886static long int longval () { return $2; }
2887static unsigned long int ulongval () { return $2; }
2888#include <stdio.h>
2889#include <stdlib.h>
2890int
2891main ()
2892{
2893
2894  FILE *f = fopen ("conftest.val", "w");
2895  if (! f)
2896    return 1;
2897  if (($2) < 0)
2898    {
2899      long int i = longval ();
2900      if (i != ($2))
2901	return 1;
2902      fprintf (f, "%ld", i);
2903    }
2904  else
2905    {
2906      unsigned long int i = ulongval ();
2907      if (i != ($2))
2908	return 1;
2909      fprintf (f, "%lu", i);
2910    }
2911  /* Do not output a trailing newline, as this causes \r\n confusion
2912     on some platforms.  */
2913  return ferror (f) || fclose (f) != 0;
2914
2915  ;
2916  return 0;
2917}
2918_ACEOF
2919if ac_fn_cxx_try_run "$LINENO"; then :
2920  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2921else
2922  ac_retval=1
2923fi
2924rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2925  conftest.$ac_objext conftest.beam conftest.$ac_ext
2926rm -f conftest.val
2927
2928  fi
2929  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2930  as_fn_set_status $ac_retval
2931
2932} # ac_fn_cxx_compute_int
2933
2934# ac_fn_cxx_try_link LINENO
2935# -------------------------
2936# Try to link conftest.$ac_ext, and return whether this succeeded.
2937ac_fn_cxx_try_link ()
2938{
2939  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2940  rm -f conftest.$ac_objext conftest$ac_exeext
2941  if { { ac_try="$ac_link"
2942case "(($ac_try" in
2943  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2944  *) ac_try_echo=$ac_try;;
2945esac
2946eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2947$as_echo "$ac_try_echo"; } >&5
2948  (eval "$ac_link") 2>conftest.err
2949  ac_status=$?
2950  if test -s conftest.err; then
2951    grep -v '^ *+' conftest.err >conftest.er1
2952    cat conftest.er1 >&5
2953    mv -f conftest.er1 conftest.err
2954  fi
2955  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2956  test $ac_status = 0; } && {
2957	 test -z "$ac_cxx_werror_flag" ||
2958	 test ! -s conftest.err
2959       } && test -s conftest$ac_exeext && {
2960	 test "$cross_compiling" = yes ||
2961	 test -x conftest$ac_exeext
2962       }; then :
2963  ac_retval=0
2964else
2965  $as_echo "$as_me: failed program was:" >&5
2966sed 's/^/| /' conftest.$ac_ext >&5
2967
2968	ac_retval=1
2969fi
2970  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2971  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2972  # interfere with the next link command; also delete a directory that is
2973  # left behind by Apple's compiler.  We do this before executing the actions.
2974  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2975  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2976  as_fn_set_status $ac_retval
2977
2978} # ac_fn_cxx_try_link
2979
2980# ac_fn_cxx_check_func LINENO FUNC VAR
2981# ------------------------------------
2982# Tests whether FUNC exists, setting the cache variable VAR accordingly
2983ac_fn_cxx_check_func ()
2984{
2985  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2986  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2987$as_echo_n "checking for $2... " >&6; }
2988if eval \${$3+:} false; then :
2989  $as_echo_n "(cached) " >&6
2990else
2991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2992/* end confdefs.h.  */
2993/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2994   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2995#define $2 innocuous_$2
2996
2997/* System header to define __stub macros and hopefully few prototypes,
2998    which can conflict with char $2 (); below.
2999    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3000    <limits.h> exists even on freestanding compilers.  */
3001
3002#ifdef __STDC__
3003# include <limits.h>
3004#else
3005# include <assert.h>
3006#endif
3007
3008#undef $2
3009
3010/* Override any GCC internal prototype to avoid an error.
3011   Use char because int might match the return type of a GCC
3012   builtin and then its argument prototype would still apply.  */
3013#ifdef __cplusplus
3014extern "C"
3015#endif
3016char $2 ();
3017/* The GNU C library defines this for functions which it implements
3018    to always fail with ENOSYS.  Some functions are actually named
3019    something starting with __ and the normal name is an alias.  */
3020#if defined __stub_$2 || defined __stub___$2
3021choke me
3022#endif
3023
3024int
3025main ()
3026{
3027return $2 ();
3028  ;
3029  return 0;
3030}
3031_ACEOF
3032if ac_fn_cxx_try_link "$LINENO"; then :
3033  eval "$3=yes"
3034else
3035  eval "$3=no"
3036fi
3037rm -f core conftest.err conftest.$ac_objext \
3038    conftest$ac_exeext conftest.$ac_ext
3039fi
3040eval ac_res=\$$3
3041	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3042$as_echo "$ac_res" >&6; }
3043  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3044
3045} # ac_fn_cxx_check_func
3046
3047# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3048# -------------------------------------------------------
3049# Tests whether HEADER exists and can be compiled using the include files in
3050# INCLUDES, setting the cache variable VAR accordingly.
3051ac_fn_c_check_header_compile ()
3052{
3053  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3054  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3055$as_echo_n "checking for $2... " >&6; }
3056if eval \${$3+:} false; then :
3057  $as_echo_n "(cached) " >&6
3058else
3059  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3060/* end confdefs.h.  */
3061$4
3062#include <$2>
3063_ACEOF
3064if ac_fn_c_try_compile "$LINENO"; then :
3065  eval "$3=yes"
3066else
3067  eval "$3=no"
3068fi
3069rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3070fi
3071eval ac_res=\$$3
3072	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3073$as_echo "$ac_res" >&6; }
3074  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3075
3076} # ac_fn_c_check_header_compile
3077cat >config.log <<_ACEOF
3078This file contains any messages produced by compilers while
3079running configure, to aid debugging if configure makes a mistake.
3080
3081It was created by OpenJDK $as_me jdk9, which was
3082generated by GNU Autoconf 2.69.  Invocation command line was
3083
3084  $ $0 $@
3085
3086_ACEOF
3087exec 5>>config.log
3088{
3089cat <<_ASUNAME
3090## --------- ##
3091## Platform. ##
3092## --------- ##
3093
3094hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3095uname -m = `(uname -m) 2>/dev/null || echo unknown`
3096uname -r = `(uname -r) 2>/dev/null || echo unknown`
3097uname -s = `(uname -s) 2>/dev/null || echo unknown`
3098uname -v = `(uname -v) 2>/dev/null || echo unknown`
3099
3100/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3101/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3102
3103/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3104/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3105/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3106/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3107/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3108/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3109/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3110
3111_ASUNAME
3112
3113as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3114for as_dir in $PATH
3115do
3116  IFS=$as_save_IFS
3117  test -z "$as_dir" && as_dir=.
3118    $as_echo "PATH: $as_dir"
3119  done
3120IFS=$as_save_IFS
3121
3122} >&5
3123
3124cat >&5 <<_ACEOF
3125
3126
3127## ----------- ##
3128## Core tests. ##
3129## ----------- ##
3130
3131_ACEOF
3132
3133
3134# Keep a trace of the command line.
3135# Strip out --no-create and --no-recursion so they do not pile up.
3136# Strip out --silent because we don't want to record it for future runs.
3137# Also quote any args containing shell meta-characters.
3138# Make two passes to allow for proper duplicate-argument suppression.
3139ac_configure_args=
3140ac_configure_args0=
3141ac_configure_args1=
3142ac_must_keep_next=false
3143for ac_pass in 1 2
3144do
3145  for ac_arg
3146  do
3147    case $ac_arg in
3148    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3149    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3150    | -silent | --silent | --silen | --sile | --sil)
3151      continue ;;
3152    *\'*)
3153      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3154    esac
3155    case $ac_pass in
3156    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3157    2)
3158      as_fn_append ac_configure_args1 " '$ac_arg'"
3159      if test $ac_must_keep_next = true; then
3160	ac_must_keep_next=false # Got value, back to normal.
3161      else
3162	case $ac_arg in
3163	  *=* | --config-cache | -C | -disable-* | --disable-* \
3164	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3165	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3166	  | -with-* | --with-* | -without-* | --without-* | --x)
3167	    case "$ac_configure_args0 " in
3168	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3169	    esac
3170	    ;;
3171	  -* ) ac_must_keep_next=true ;;
3172	esac
3173      fi
3174      as_fn_append ac_configure_args " '$ac_arg'"
3175      ;;
3176    esac
3177  done
3178done
3179{ ac_configure_args0=; unset ac_configure_args0;}
3180{ ac_configure_args1=; unset ac_configure_args1;}
3181
3182# When interrupted or exit'd, cleanup temporary files, and complete
3183# config.log.  We remove comments because anyway the quotes in there
3184# would cause problems or look ugly.
3185# WARNING: Use '\'' to represent an apostrophe within the trap.
3186# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3187trap 'exit_status=$?
3188  # Save into config.log some information that might help in debugging.
3189  {
3190    echo
3191
3192    $as_echo "## ---------------- ##
3193## Cache variables. ##
3194## ---------------- ##"
3195    echo
3196    # The following way of writing the cache mishandles newlines in values,
3197(
3198  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3199    eval ac_val=\$$ac_var
3200    case $ac_val in #(
3201    *${as_nl}*)
3202      case $ac_var in #(
3203      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3204$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3205      esac
3206      case $ac_var in #(
3207      _ | IFS | as_nl) ;; #(
3208      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3209      *) { eval $ac_var=; unset $ac_var;} ;;
3210      esac ;;
3211    esac
3212  done
3213  (set) 2>&1 |
3214    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3215    *${as_nl}ac_space=\ *)
3216      sed -n \
3217	"s/'\''/'\''\\\\'\'''\''/g;
3218	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3219      ;; #(
3220    *)
3221      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3222      ;;
3223    esac |
3224    sort
3225)
3226    echo
3227
3228    $as_echo "## ----------------- ##
3229## Output variables. ##
3230## ----------------- ##"
3231    echo
3232    for ac_var in $ac_subst_vars
3233    do
3234      eval ac_val=\$$ac_var
3235      case $ac_val in
3236      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3237      esac
3238      $as_echo "$ac_var='\''$ac_val'\''"
3239    done | sort
3240    echo
3241
3242    if test -n "$ac_subst_files"; then
3243      $as_echo "## ------------------- ##
3244## File substitutions. ##
3245## ------------------- ##"
3246      echo
3247      for ac_var in $ac_subst_files
3248      do
3249	eval ac_val=\$$ac_var
3250	case $ac_val in
3251	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3252	esac
3253	$as_echo "$ac_var='\''$ac_val'\''"
3254      done | sort
3255      echo
3256    fi
3257
3258    if test -s confdefs.h; then
3259      $as_echo "## ----------- ##
3260## confdefs.h. ##
3261## ----------- ##"
3262      echo
3263      cat confdefs.h
3264      echo
3265    fi
3266    test "$ac_signal" != 0 &&
3267      $as_echo "$as_me: caught signal $ac_signal"
3268    $as_echo "$as_me: exit $exit_status"
3269  } >&5
3270  rm -f core *.core core.conftest.* &&
3271    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3272    exit $exit_status
3273' 0
3274for ac_signal in 1 2 13 15; do
3275  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3276done
3277ac_signal=0
3278
3279# confdefs.h avoids OS command line length limits that DEFS can exceed.
3280rm -f -r conftest* confdefs.h
3281
3282$as_echo "/* confdefs.h */" > confdefs.h
3283
3284# Predefined preprocessor variables.
3285
3286cat >>confdefs.h <<_ACEOF
3287#define PACKAGE_NAME "$PACKAGE_NAME"
3288_ACEOF
3289
3290cat >>confdefs.h <<_ACEOF
3291#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3292_ACEOF
3293
3294cat >>confdefs.h <<_ACEOF
3295#define PACKAGE_VERSION "$PACKAGE_VERSION"
3296_ACEOF
3297
3298cat >>confdefs.h <<_ACEOF
3299#define PACKAGE_STRING "$PACKAGE_STRING"
3300_ACEOF
3301
3302cat >>confdefs.h <<_ACEOF
3303#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3304_ACEOF
3305
3306cat >>confdefs.h <<_ACEOF
3307#define PACKAGE_URL "$PACKAGE_URL"
3308_ACEOF
3309
3310
3311# Let the site file select an alternate cache file if it wants to.
3312# Prefer an explicitly selected file to automatically selected ones.
3313ac_site_file1=NONE
3314ac_site_file2=NONE
3315if test -n "$CONFIG_SITE"; then
3316  # We do not want a PATH search for config.site.
3317  case $CONFIG_SITE in #((
3318    -*)  ac_site_file1=./$CONFIG_SITE;;
3319    */*) ac_site_file1=$CONFIG_SITE;;
3320    *)   ac_site_file1=./$CONFIG_SITE;;
3321  esac
3322elif test "x$prefix" != xNONE; then
3323  ac_site_file1=$prefix/share/config.site
3324  ac_site_file2=$prefix/etc/config.site
3325else
3326  ac_site_file1=$ac_default_prefix/share/config.site
3327  ac_site_file2=$ac_default_prefix/etc/config.site
3328fi
3329for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3330do
3331  test "x$ac_site_file" = xNONE && continue
3332  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3333    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3334$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3335    sed 's/^/| /' "$ac_site_file" >&5
3336    . "$ac_site_file" \
3337      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3338$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3339as_fn_error $? "failed to load site script $ac_site_file
3340See \`config.log' for more details" "$LINENO" 5; }
3341  fi
3342done
3343
3344if test -r "$cache_file"; then
3345  # Some versions of bash will fail to source /dev/null (special files
3346  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3347  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3348    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3349$as_echo "$as_me: loading cache $cache_file" >&6;}
3350    case $cache_file in
3351      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3352      *)                      . "./$cache_file";;
3353    esac
3354  fi
3355else
3356  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3357$as_echo "$as_me: creating cache $cache_file" >&6;}
3358  >$cache_file
3359fi
3360
3361# Check that the precious variables saved in the cache have kept the same
3362# value.
3363ac_cache_corrupted=false
3364for ac_var in $ac_precious_vars; do
3365  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3366  eval ac_new_set=\$ac_env_${ac_var}_set
3367  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3368  eval ac_new_val=\$ac_env_${ac_var}_value
3369  case $ac_old_set,$ac_new_set in
3370    set,)
3371      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3372$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3373      ac_cache_corrupted=: ;;
3374    ,set)
3375      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3376$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3377      ac_cache_corrupted=: ;;
3378    ,);;
3379    *)
3380      if test "x$ac_old_val" != "x$ac_new_val"; then
3381	# differences in whitespace do not lead to failure.
3382	ac_old_val_w=`echo x $ac_old_val`
3383	ac_new_val_w=`echo x $ac_new_val`
3384	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3385	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3386$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3387	  ac_cache_corrupted=:
3388	else
3389	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3390$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3391	  eval $ac_var=\$ac_old_val
3392	fi
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3394$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3396$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3397      fi;;
3398  esac
3399  # Pass precious variables to config.status.
3400  if test "$ac_new_set" = set; then
3401    case $ac_new_val in
3402    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3403    *) ac_arg=$ac_var=$ac_new_val ;;
3404    esac
3405    case " $ac_configure_args " in
3406      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3407      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3408    esac
3409  fi
3410done
3411if $ac_cache_corrupted; then
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3413$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3415$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3416  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3417fi
3418## -------------------- ##
3419## Main body of script. ##
3420## -------------------- ##
3421
3422ac_ext=c
3423ac_cpp='$CPP $CPPFLAGS'
3424ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3425ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3426ac_compiler_gnu=$ac_cv_c_compiler_gnu
3427
3428
3429
3430ac_aux_dir=
3431for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3432  if test -f "$ac_dir/install-sh"; then
3433    ac_aux_dir=$ac_dir
3434    ac_install_sh="$ac_aux_dir/install-sh -c"
3435    break
3436  elif test -f "$ac_dir/install.sh"; then
3437    ac_aux_dir=$ac_dir
3438    ac_install_sh="$ac_aux_dir/install.sh -c"
3439    break
3440  elif test -f "$ac_dir/shtool"; then
3441    ac_aux_dir=$ac_dir
3442    ac_install_sh="$ac_aux_dir/shtool install -c"
3443    break
3444  fi
3445done
3446if test -z "$ac_aux_dir"; then
3447  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
3448fi
3449
3450# These three variables are undocumented and unsupported,
3451# and are intended to be withdrawn in a future Autoconf release.
3452# They can cause serious problems if a builder's source tree is in a directory
3453# whose full name contains unusual characters.
3454ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3455ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3456ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3457
3458
3459# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3460
3461#
3462# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3463# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3464#
3465# This code is free software; you can redistribute it and/or modify it
3466# under the terms of the GNU General Public License version 2 only, as
3467# published by the Free Software Foundation.  Oracle designates this
3468# particular file as subject to the "Classpath" exception as provided
3469# by Oracle in the LICENSE file that accompanied this code.
3470#
3471# This code is distributed in the hope that it will be useful, but WITHOUT
3472# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3473# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3474# version 2 for more details (a copy is included in the LICENSE file that
3475# accompanied this code).
3476#
3477# You should have received a copy of the GNU General Public License version
3478# 2 along with this work; if not, write to the Free Software Foundation,
3479# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3480#
3481# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3482# or visit www.oracle.com if you need additional information or have any
3483# questions.
3484#
3485
3486#
3487# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3488#
3489# This program is free software; you can redistribute it and/or modify
3490# it under the terms of the GNU General Public License as published by
3491# the Free Software Foundation; either version 2 of the License, or
3492# (at your option) any later version.
3493#
3494# This program is distributed in the hope that it will be useful, but
3495# WITHOUT ANY WARRANTY; without even the implied warranty of
3496# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3497# General Public License for more details.
3498#
3499# You should have received a copy of the GNU General Public License
3500# along with this program; if not, write to the Free Software
3501# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3502#
3503# As a special exception to the GNU General Public License, if you
3504# distribute this file as part of a program that contains a
3505# configuration script generated by Autoconf, you may include it under
3506# the same distribution terms that you use for the rest of that program.
3507
3508# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3509# ----------------------------------
3510# PKG_PROG_PKG_CONFIG
3511
3512# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3513#
3514# Check to see whether a particular set of modules exists.  Similar
3515# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3516#
3517#
3518# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3519# this or PKG_CHECK_MODULES is called, or make sure to call
3520# PKG_CHECK_EXISTS manually
3521# --------------------------------------------------------------
3522
3523
3524
3525# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3526# ---------------------------------------------
3527# _PKG_CONFIG
3528
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530# -----------------------------
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532
3533
3534# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3535# [ACTION-IF-NOT-FOUND])
3536#
3537#
3538# Note that if there is a possibility the first call to
3539# PKG_CHECK_MODULES might not happen, you should be sure to include an
3540# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3541#
3542#
3543# --------------------------------------------------------------
3544# PKG_CHECK_MODULES
3545
3546
3547# Include these first...
3548#
3549# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3550# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3551#
3552# This code is free software; you can redistribute it and/or modify it
3553# under the terms of the GNU General Public License version 2 only, as
3554# published by the Free Software Foundation.  Oracle designates this
3555# particular file as subject to the "Classpath" exception as provided
3556# by Oracle in the LICENSE file that accompanied this code.
3557#
3558# This code is distributed in the hope that it will be useful, but WITHOUT
3559# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3560# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3561# version 2 for more details (a copy is included in the LICENSE file that
3562# accompanied this code).
3563#
3564# You should have received a copy of the GNU General Public License version
3565# 2 along with this work; if not, write to the Free Software Foundation,
3566# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3567#
3568# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3569# or visit www.oracle.com if you need additional information or have any
3570# questions.
3571#
3572
3573# Create a function/macro that takes a series of named arguments. The call is
3574# similar to AC_DEFUN, but the setup of the function looks like this:
3575# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3576# ... do something
3577#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3578# ])
3579# A star (*) in front of a named argument means that it is required and it's
3580# presence will be verified. To pass e.g. the first value as a normal indexed
3581# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3582# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3583# "ARG_FOO".
3584#
3585# The generated function can be called like this:
3586# MYFUNC(FOO: [foo-val],
3587#     BAR: [
3588#         $ECHO hello world
3589#     ])
3590# Note that the argument value must start on the same line as the argument name.
3591#
3592# Argument 1: Name of the function to define
3593# Argument 2: List of legal named arguments, with a * prefix for required arguments
3594# Argument 3: Argument array to treat as named, typically $@
3595# Argument 4: The main function body
3596
3597
3598# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3599# If so, then append $1 to $2 \
3600# Also set JVM_ARG_OK to true/false depending on outcome.
3601
3602
3603# Appends a string to a path variable, only adding the : when needed.
3604
3605
3606# Prepends a string to a path variable, only adding the : when needed.
3607
3608
3609# This will make sure the given variable points to a full and proper
3610# path. This means:
3611# 1) There will be no spaces in the path. On unix platforms,
3612#    spaces in the path will result in an error. On Windows,
3613#    the path will be rewritten using short-style to be space-free.
3614# 2) The path will be absolute, and it will be in unix-style (on
3615#     cygwin).
3616# $1: The name of the variable to fix
3617
3618
3619# This will make sure the given variable points to a executable
3620# with a full and proper path. This means:
3621# 1) There will be no spaces in the path. On unix platforms,
3622#    spaces in the path will result in an error. On Windows,
3623#    the path will be rewritten using short-style to be space-free.
3624# 2) The path will be absolute, and it will be in unix-style (on
3625#     cygwin).
3626# Any arguments given to the executable is preserved.
3627# If the input variable does not have a directory specification, then
3628# it need to be in the PATH.
3629# $1: The name of the variable to fix
3630
3631
3632
3633
3634# Register a --with argument but mark it as deprecated
3635# $1: The name of the with argument to deprecate, not including --with-
3636
3637
3638# Register a --enable argument but mark it as deprecated
3639# $1: The name of the with argument to deprecate, not including --enable-
3640# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3641# $3: Messages to user.
3642
3643
3644
3645
3646# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3647# $1: variable to check
3648
3649
3650# Check that there are no unprocessed overridden variables left.
3651# If so, they are an incorrect argument and we will exit with an error.
3652
3653
3654# Setup a tool for the given variable. If correctly specified by the user,
3655# use that value, otherwise search for the tool using the supplied code snippet.
3656# $1: variable to set
3657# $2: code snippet to call to look for the tool
3658# $3: code snippet to call if variable was used to find tool
3659
3660
3661# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3662# $1: variable to set
3663# $2: executable name (or list of names) to look for
3664# $3: [path]
3665
3666
3667# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3668# $1: variable to set
3669# $2: executable name (or list of names) to look for
3670
3671
3672# Like BASIC_PATH_PROGS but fails if no tool was found.
3673# $1: variable to set
3674# $2: executable name (or list of names) to look for
3675# $3: [path]
3676
3677
3678# Like BASIC_SETUP_TOOL but fails if no tool was found.
3679# $1: variable to set
3680# $2: autoconf macro to call to look for the special tool
3681
3682
3683# Setup the most fundamental tools that relies on not much else to set up,
3684# but is used by much of the early bootstrap code.
3685
3686
3687# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3688
3689
3690# Evaluates platform specific overrides for devkit variables.
3691# $1: Name of variable
3692
3693
3694
3695
3696
3697
3698#%%% Simple tools %%%
3699
3700# Check if we have found a usable version of make
3701# $1: the path to a potential make binary (or empty)
3702# $2: the description on how we found this
3703
3704
3705
3706
3707# Goes looking for a usable version of GNU make.
3708
3709
3710
3711
3712
3713
3714
3715
3716
3717
3718# Check if build directory is on local disk. If not possible to determine,
3719# we prefer to claim it's local.
3720# Argument 1: directory to test
3721# Argument 2: what to do if it is on local disk
3722# Argument 3: what to do otherwise (remote disk or failure)
3723
3724
3725# Check that source files have basic read permissions set. This might
3726# not be the case in cygwin in certain conditions.
3727
3728
3729
3730
3731# Check for support for specific options in bash
3732
3733
3734################################################################################
3735#
3736# Default make target
3737#
3738
3739
3740# Code to run after AC_OUTPUT
3741
3742
3743#
3744# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3745# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3746#
3747# This code is free software; you can redistribute it and/or modify it
3748# under the terms of the GNU General Public License version 2 only, as
3749# published by the Free Software Foundation.  Oracle designates this
3750# particular file as subject to the "Classpath" exception as provided
3751# by Oracle in the LICENSE file that accompanied this code.
3752#
3753# This code is distributed in the hope that it will be useful, but WITHOUT
3754# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3755# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3756# version 2 for more details (a copy is included in the LICENSE file that
3757# accompanied this code).
3758#
3759# You should have received a copy of the GNU General Public License version
3760# 2 along with this work; if not, write to the Free Software Foundation,
3761# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3762#
3763# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3764# or visit www.oracle.com if you need additional information or have any
3765# questions.
3766#
3767
3768
3769
3770
3771
3772# Helper function which possibly converts a path using DOS-style short mode.
3773# If so, the updated path is stored in $new_path.
3774# $1: The path to check
3775
3776
3777# Helper function which possibly converts a path using DOS-style short mode.
3778# If so, the updated path is stored in $new_path.
3779# $1: The path to check
3780
3781
3782# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3783# and could probably be heavily simplified. However, all changes in this
3784# area tend to need lot of testing in different scenarios, and in lack of
3785# proper unit testing, cleaning this up has not been deemed worth the effort
3786# at the moment.
3787
3788
3789
3790
3791
3792
3793
3794
3795
3796# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3797
3798
3799
3800
3801# ... then the rest
3802#
3803# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3804# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3805#
3806# This code is free software; you can redistribute it and/or modify it
3807# under the terms of the GNU General Public License version 2 only, as
3808# published by the Free Software Foundation.  Oracle designates this
3809# particular file as subject to the "Classpath" exception as provided
3810# by Oracle in the LICENSE file that accompanied this code.
3811#
3812# This code is distributed in the hope that it will be useful, but WITHOUT
3813# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3814# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3815# version 2 for more details (a copy is included in the LICENSE file that
3816# accompanied this code).
3817#
3818# You should have received a copy of the GNU General Public License version
3819# 2 along with this work; if not, write to the Free Software Foundation,
3820# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3821#
3822# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3823# or visit www.oracle.com if you need additional information or have any
3824# questions.
3825#
3826
3827########################################################################
3828# This file handles detection of the Boot JDK. The Boot JDK detection
3829# process has been developed as a response to solve a complex real-world
3830# problem. Initially, it was simple, but it has grown as platform after
3831# platform, idiosyncracy after idiosyncracy has been supported.
3832#
3833# The basic idea is this:
3834# 1) You need an acceptable *) JDK to use as a Boot JDK
3835# 2) There are several ways to locate a JDK, that are mostly platform
3836#    dependent **)
3837# 3) You can have multiple JDKs installed
3838# 4) If possible, configure should try to dig out an acceptable JDK
3839#    automatically, without having to resort to command-line options
3840#
3841# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3842#     javac) and not a JRE, etc.
3843#
3844# **) On Windows we typically use a well-known path.
3845#     On MacOSX we typically use the tool java_home.
3846#     On Linux we typically find javac in the $PATH, and then follow a
3847#     chain of symlinks that often ends up in a real JDK.
3848#
3849# This leads to the code where we check in different ways to locate a
3850# JDK, and if one is found, check if it is acceptable. If not, we print
3851# our reasons for rejecting it (useful when debugging non-working
3852# configure situations) and continue checking the next one.
3853########################################################################
3854
3855# Execute the check given as argument, and verify the result
3856# If the Boot JDK was previously found, do nothing
3857# $1 A command line (typically autoconf macro) to execute
3858
3859
3860# Test: Is bootjdk explicitly set by command line arguments?
3861
3862
3863# Test: Is $JAVA_HOME set?
3864
3865
3866# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3867
3868
3869# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3870# $1: Argument to the java_home binary (optional)
3871
3872
3873# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3874
3875
3876# Look for a jdk in the given path. If there are multiple, try to select the newest.
3877# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3878# $1 = Path to directory containing jdk installations.
3879# $2 = String to append to the found JDK directory to get the proper JDK home
3880
3881
3882# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3883# environmental variable as base for where to look.
3884# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3885
3886
3887# Test: Is there a JDK installed in default, well-known locations?
3888
3889
3890# Check that a command-line tool in the Boot JDK is correct
3891# $1 = name of variable to assign
3892# $2 = name of binary
3893
3894
3895###############################################################################
3896#
3897# We need a Boot JDK to bootstrap the build.
3898#
3899
3900
3901
3902
3903
3904# BUILD_JDK: the location of the latest JDK that can run
3905#   on the host system and supports the target class file version
3906#   generated in this JDK build.  This variable should only be
3907#   used after the launchers are built.
3908#
3909
3910# Execute the check given as argument, and verify the result.
3911# If the JDK was previously found, do nothing.
3912# $1 A command line (typically autoconf macro) to execute
3913
3914
3915# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3916# is different than the host system doing the build (e.g. cross-compilation),
3917# a special BUILD_JDK is built as part of the build process.  An external
3918# prebuilt BUILD_JDK can also be supplied.
3919
3920
3921#
3922# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3923# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3924#
3925# This code is free software; you can redistribute it and/or modify it
3926# under the terms of the GNU General Public License version 2 only, as
3927# published by the Free Software Foundation.  Oracle designates this
3928# particular file as subject to the "Classpath" exception as provided
3929# by Oracle in the LICENSE file that accompanied this code.
3930#
3931# This code is distributed in the hope that it will be useful, but WITHOUT
3932# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3933# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3934# version 2 for more details (a copy is included in the LICENSE file that
3935# accompanied this code).
3936#
3937# You should have received a copy of the GNU General Public License version
3938# 2 along with this work; if not, write to the Free Software Foundation,
3939# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3940#
3941# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3942# or visit www.oracle.com if you need additional information or have any
3943# questions.
3944#
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960
3961
3962################################################################################
3963#
3964# Runs icecc-create-env once and prints the error if it fails
3965#
3966# $1: arguments to icecc-create-env
3967# $2: log file
3968#
3969
3970
3971################################################################################
3972#
3973# Optionally enable distributed compilation of native code using icecc/icecream
3974#
3975
3976
3977
3978
3979
3980
3981
3982#
3983# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
3984# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3985#
3986# This code is free software; you can redistribute it and/or modify it
3987# under the terms of the GNU General Public License version 2 only, as
3988# published by the Free Software Foundation.  Oracle designates this
3989# particular file as subject to the "Classpath" exception as provided
3990# by Oracle in the LICENSE file that accompanied this code.
3991#
3992# This code is distributed in the hope that it will be useful, but WITHOUT
3993# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3994# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3995# version 2 for more details (a copy is included in the LICENSE file that
3996# accompanied this code).
3997#
3998# You should have received a copy of the GNU General Public License version
3999# 2 along with this work; if not, write to the Free Software Foundation,
4000# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4001#
4002# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4003# or visit www.oracle.com if you need additional information or have any
4004# questions.
4005#
4006
4007################################################################################
4008#
4009# Setup ABI profile (for arm)
4010#
4011
4012
4013# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4014# corresponding configure arguments instead
4015
4016
4017# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4018# that configure can use them while detecting compilers.
4019# TOOLCHAIN_TYPE is available here.
4020# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4021
4022
4023
4024
4025
4026
4027# Documentation on common flags used for solstudio in HIGHEST.
4028#
4029# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4030#          done with care, there are some assumptions below that need to
4031#          be understood about the use of pointers, and IEEE behavior.
4032#
4033# -fns: Use non-standard floating point mode (not IEEE 754)
4034# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4035# -fsingle: Use single precision floating point with 'float'
4036# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4037#   (Source with excessing pointer casting and data access with mixed
4038#    pointer types are not recommended)
4039# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4040#   (If you expect perfect errno behavior, do not use this)
4041# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4042# -xrestrict: Pointer parameters to functions do not overlap
4043#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4044#    If you pass in multiple pointers to the same data, do not use this)
4045# -xlibmil: Inline some library routines
4046#   (If you expect perfect errno behavior, do not use this)
4047# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4048#   (If you expect perfect errno behavior, do not use this)
4049#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4050
4051    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4052    # Bug?
4053    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4054    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4055    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4056    #fi
4057
4058
4059
4060
4061
4062
4063################################################################################
4064# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4065#      conditionals against.
4066# $2 - Optional prefix for each variable defined.
4067
4068
4069# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                  IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C compiler supports an argument
4073
4074
4075
4076
4077# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                    IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C++ compiler supports an argument
4081
4082
4083
4084
4085# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the C and C++ compilers support an argument
4089
4090
4091
4092
4093# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4094#                                   IF_FALSE: [RUN-IF-FALSE])
4095# ------------------------------------------------------------
4096# Check that the linker support an argument
4097
4098
4099
4100
4101
4102
4103# FLAGS_SETUP_GCC6_COMPILER_FLAGS([PREFIX])
4104# Arguments:
4105# $1 - Optional prefix for each variable defined.
4106
4107
4108#
4109# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4110# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4111#
4112# This code is free software; you can redistribute it and/or modify it
4113# under the terms of the GNU General Public License version 2 only, as
4114# published by the Free Software Foundation.  Oracle designates this
4115# particular file as subject to the "Classpath" exception as provided
4116# by Oracle in the LICENSE file that accompanied this code.
4117#
4118# This code is distributed in the hope that it will be useful, but WITHOUT
4119# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4120# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4121# version 2 for more details (a copy is included in the LICENSE file that
4122# accompanied this code).
4123#
4124# You should have received a copy of the GNU General Public License version
4125# 2 along with this work; if not, write to the Free Software Foundation,
4126# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4127#
4128# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4129# or visit www.oracle.com if you need additional information or have any
4130# questions.
4131#
4132
4133
4134
4135
4136
4137cygwin_help() {
4138  case $1 in
4139    unzip)
4140      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4141      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4142      ;;
4143    zip)
4144      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4145      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4146      ;;
4147    make)
4148      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4149      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4150      ;;
4151    freetype)
4152      HELP_MSG="
4153The freetype library can now be build during the configure process.
4154Download the freetype sources and unpack them into an arbitrary directory:
4155
4156wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4157tar -xzf freetype-2.5.3.tar.gz
4158
4159Then run configure with '--with-freetype-src=<freetype_src>'. This will
4160automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4161builds or into '<freetype_src>/lib32' for 32-bit builds.
4162Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4163and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4164
4165Alternatively you can unpack the sources like this to use the default directory:
4166
4167tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4168      ;;
4169  esac
4170}
4171
4172msys_help() {
4173  PKGHANDLER_COMMAND=""
4174}
4175
4176apt_help() {
4177  case $1 in
4178    reduced)
4179      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4180    devkit)
4181      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4182    openjdk)
4183      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4184    alsa)
4185      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4186    cups)
4187      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4188    freetype)
4189      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4190    ffi)
4191      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4192    x11)
4193      PKGHANDLER_COMMAND="sudo apt-get install libx11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4194    ccache)
4195      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4196    dtrace)
4197      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4198    elf)
4199      PKGHANDLER_COMMAND="sudo apt-get install libelf-dev" ;;
4200  esac
4201}
4202
4203yum_help() {
4204  case $1 in
4205    devkit)
4206      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4207    openjdk)
4208      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4209    alsa)
4210      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4211    cups)
4212      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4213    freetype)
4214      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4215    x11)
4216      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4217    ccache)
4218      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4219    elf)
4220      PKGHANDLER_COMMAND="sudo yum install elfutils-libelf-devel" ;;
4221  esac
4222}
4223
4224brew_help() {
4225  case $1 in
4226    openjdk)
4227      PKGHANDLER_COMMAND="brew cask install java" ;;
4228    freetype)
4229      PKGHANDLER_COMMAND="brew install freetype" ;;
4230    ccache)
4231      PKGHANDLER_COMMAND="brew install ccache" ;;
4232  esac
4233}
4234
4235port_help() {
4236  PKGHANDLER_COMMAND=""
4237}
4238
4239pkgutil_help() {
4240  PKGHANDLER_COMMAND=""
4241}
4242
4243pkgadd_help() {
4244  PKGHANDLER_COMMAND=""
4245}
4246
4247# This function will check if we're called from the "configure" wrapper while
4248# printing --help. If so, we will print out additional information that can
4249# only be extracted within the autoconf script, and then exit. This must be
4250# called at the very beginning in configure.ac.
4251
4252
4253
4254
4255
4256
4257#
4258# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4259# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4260#
4261# This code is free software; you can redistribute it and/or modify it
4262# under the terms of the GNU General Public License version 2 only, as
4263# published by the Free Software Foundation.  Oracle designates this
4264# particular file as subject to the "Classpath" exception as provided
4265# by Oracle in the LICENSE file that accompanied this code.
4266#
4267# This code is distributed in the hope that it will be useful, but WITHOUT
4268# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4269# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4270# version 2 for more details (a copy is included in the LICENSE file that
4271# accompanied this code).
4272#
4273# You should have received a copy of the GNU General Public License version
4274# 2 along with this work; if not, write to the Free Software Foundation,
4275# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4276#
4277# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4278# or visit www.oracle.com if you need additional information or have any
4279# questions.
4280#
4281
4282# All valid JVM features, regardless of platform
4283VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4284    graal fprof vm-structs jni-check services management all-gcs nmt cds \
4285    static-build link-time-opt aot"
4286
4287# All valid JVM variants
4288VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4289
4290###############################################################################
4291# Check if the specified JVM variant should be built. To be used in shell if
4292# constructs, like this:
4293# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4294#
4295# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4296
4297# Definition kept in one line to allow inlining in if statements.
4298# Additional [] needed to keep m4 from mangling shell constructs.
4299
4300
4301###############################################################################
4302# Check if the specified JVM features are explicitly enabled. To be used in
4303# shell if constructs, like this:
4304# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4305#
4306# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4307
4308# Definition kept in one line to allow inlining in if statements.
4309# Additional [] needed to keep m4 from mangling shell constructs.
4310
4311
4312###############################################################################
4313# Check which variants of the JVM that we want to build. Available variants are:
4314#   server: normal interpreter, and a tiered C1/C2 compiler
4315#   client: normal interpreter, and C1 (no C2 compiler)
4316#   minimal: reduced form of client with optional features stripped out
4317#   core: normal interpreter only, no compiler
4318#   zero: C++ based interpreter only, no compiler
4319#   zeroshark: C++ based interpreter, and a llvm-based compiler
4320#   custom: baseline JVM with no default features
4321#
4322
4323
4324###############################################################################
4325# Check if dtrace should be enabled and has all prerequisites present.
4326#
4327
4328
4329################################################################################
4330# Check if AOT should be enabled
4331#
4332
4333
4334###############################################################################
4335# Set up all JVM features for each JVM variant.
4336#
4337
4338
4339###############################################################################
4340# Validate JVM features once all setup is complete, including custom setup.
4341#
4342
4343
4344################################################################################
4345#
4346# Specify which sources will be used to build the 64-bit ARM port
4347#
4348# --with-cpu-port=arm64   will use hotspot/src/cpu/arm
4349# --with-cpu-port=aarch64 will use hotspot/src/cpu/aarch64
4350#
4351
4352
4353
4354################################################################################
4355# Check if gtest should be built
4356#
4357
4358
4359#
4360# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4361# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4362#
4363# This code is free software; you can redistribute it and/or modify it
4364# under the terms of the GNU General Public License version 2 only, as
4365# published by the Free Software Foundation.  Oracle designates this
4366# particular file as subject to the "Classpath" exception as provided
4367# by Oracle in the LICENSE file that accompanied this code.
4368#
4369# This code is distributed in the hope that it will be useful, but WITHOUT
4370# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4371# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4372# version 2 for more details (a copy is included in the LICENSE file that
4373# accompanied this code).
4374#
4375# You should have received a copy of the GNU General Public License version
4376# 2 along with this work; if not, write to the Free Software Foundation,
4377# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4378#
4379# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4380# or visit www.oracle.com if you need additional information or have any
4381# questions.
4382#
4383
4384###############################################################################
4385# Check which variant of the JDK that we want to build.
4386# Currently we have:
4387#    normal:   standard edition
4388# but the custom make system may add other variants
4389#
4390# Effectively the JDK variant gives a name to a specific set of
4391# modules to compile into the JDK.
4392
4393
4394###############################################################################
4395# Set the debug level
4396#    release: no debug information, all optimizations, no asserts.
4397#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4398#    fastdebug: debug information (-g), all optimizations, all asserts
4399#    slowdebug: debug information (-g), no optimizations, all asserts
4400
4401
4402###############################################################################
4403#
4404# Should we build only OpenJDK even if closed sources are present?
4405#
4406
4407
4408
4409
4410###############################################################################
4411#
4412# Enable or disable the elliptic curve crypto implementation
4413#
4414
4415
4416
4417
4418################################################################################
4419#
4420# Gcov coverage data for hotspot
4421#
4422
4423
4424################################################################################
4425#
4426# Static build support.  When enabled will generate static
4427# libraries instead of shared libraries for all JDK libs.
4428#
4429
4430
4431################################################################################
4432#
4433# jlink options.
4434# We always keep packaged modules in JDK image.
4435#
4436
4437
4438################################################################################
4439#
4440# Check if building of the jtreg failure handler should be enabled.
4441#
4442
4443
4444################################################################################
4445#
4446# Enable or disable generation of the classlist at build time
4447#
4448
4449
4450#
4451# Copyright (c) 2015, 2016, Oracle and/or its affiliates. All rights reserved.
4452# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4453#
4454# This code is free software; you can redistribute it and/or modify it
4455# under the terms of the GNU General Public License version 2 only, as
4456# published by the Free Software Foundation.  Oracle designates this
4457# particular file as subject to the "Classpath" exception as provided
4458# by Oracle in the LICENSE file that accompanied this code.
4459#
4460# This code is distributed in the hope that it will be useful, but WITHOUT
4461# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4462# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4463# version 2 for more details (a copy is included in the LICENSE file that
4464# accompanied this code).
4465#
4466# You should have received a copy of the GNU General Public License version
4467# 2 along with this work; if not, write to the Free Software Foundation,
4468# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4469#
4470# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4471# or visit www.oracle.com if you need additional information or have any
4472# questions.
4473#
4474
4475###############################################################################
4476#
4477# Setup version numbers
4478#
4479
4480# Verify that a given string represents a valid version number, and assign it
4481# to a variable.
4482
4483# Argument 1: the variable to assign to
4484# Argument 2: the value given by the user
4485
4486
4487
4488
4489#
4490# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4491# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4492#
4493# This code is free software; you can redistribute it and/or modify it
4494# under the terms of the GNU General Public License version 2 only, as
4495# published by the Free Software Foundation.  Oracle designates this
4496# particular file as subject to the "Classpath" exception as provided
4497# by Oracle in the LICENSE file that accompanied this code.
4498#
4499# This code is distributed in the hope that it will be useful, but WITHOUT
4500# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4501# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4502# version 2 for more details (a copy is included in the LICENSE file that
4503# accompanied this code).
4504#
4505# You should have received a copy of the GNU General Public License version
4506# 2 along with this work; if not, write to the Free Software Foundation,
4507# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4508#
4509# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4510# or visit www.oracle.com if you need additional information or have any
4511# questions.
4512#
4513
4514# Major library component reside in separate files.
4515#
4516# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4517# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4518#
4519# This code is free software; you can redistribute it and/or modify it
4520# under the terms of the GNU General Public License version 2 only, as
4521# published by the Free Software Foundation.  Oracle designates this
4522# particular file as subject to the "Classpath" exception as provided
4523# by Oracle in the LICENSE file that accompanied this code.
4524#
4525# This code is distributed in the hope that it will be useful, but WITHOUT
4526# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4527# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4528# version 2 for more details (a copy is included in the LICENSE file that
4529# accompanied this code).
4530#
4531# You should have received a copy of the GNU General Public License version
4532# 2 along with this work; if not, write to the Free Software Foundation,
4533# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4534#
4535# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4536# or visit www.oracle.com if you need additional information or have any
4537# questions.
4538#
4539
4540################################################################################
4541# Setup alsa (Advanced Linux Sound Architecture)
4542################################################################################
4543
4544
4545#
4546# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4547# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4548#
4549# This code is free software; you can redistribute it and/or modify it
4550# under the terms of the GNU General Public License version 2 only, as
4551# published by the Free Software Foundation.  Oracle designates this
4552# particular file as subject to the "Classpath" exception as provided
4553# by Oracle in the LICENSE file that accompanied this code.
4554#
4555# This code is distributed in the hope that it will be useful, but WITHOUT
4556# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4557# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4558# version 2 for more details (a copy is included in the LICENSE file that
4559# accompanied this code).
4560#
4561# You should have received a copy of the GNU General Public License version
4562# 2 along with this work; if not, write to the Free Software Foundation,
4563# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4564#
4565# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4566# or visit www.oracle.com if you need additional information or have any
4567# questions.
4568#
4569
4570################################################################################
4571# Setup bundled libraries.
4572#
4573# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4574# OpenJDK repository. Default is to use these libraries as bundled, but they
4575# might be replaced by en external version by the user.
4576################################################################################
4577
4578
4579################################################################################
4580# Setup libjpeg
4581################################################################################
4582
4583
4584################################################################################
4585# Setup giflib
4586################################################################################
4587
4588
4589################################################################################
4590# Setup libpng
4591################################################################################
4592
4593
4594################################################################################
4595# Setup zlib
4596################################################################################
4597
4598
4599################################################################################
4600# Setup lcms (Little CMS)
4601################################################################################
4602
4603
4604#
4605# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4606# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4607#
4608# This code is free software; you can redistribute it and/or modify it
4609# under the terms of the GNU General Public License version 2 only, as
4610# published by the Free Software Foundation.  Oracle designates this
4611# particular file as subject to the "Classpath" exception as provided
4612# by Oracle in the LICENSE file that accompanied this code.
4613#
4614# This code is distributed in the hope that it will be useful, but WITHOUT
4615# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4616# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4617# version 2 for more details (a copy is included in the LICENSE file that
4618# accompanied this code).
4619#
4620# You should have received a copy of the GNU General Public License version
4621# 2 along with this work; if not, write to the Free Software Foundation,
4622# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4623#
4624# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4625# or visit www.oracle.com if you need additional information or have any
4626# questions.
4627#
4628
4629################################################################################
4630# Setup cups (Common Unix Printing System)
4631################################################################################
4632
4633
4634#
4635# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4636# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4637#
4638# This code is free software; you can redistribute it and/or modify it
4639# under the terms of the GNU General Public License version 2 only, as
4640# published by the Free Software Foundation.  Oracle designates this
4641# particular file as subject to the "Classpath" exception as provided
4642# by Oracle in the LICENSE file that accompanied this code.
4643#
4644# This code is distributed in the hope that it will be useful, but WITHOUT
4645# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4646# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4647# version 2 for more details (a copy is included in the LICENSE file that
4648# accompanied this code).
4649#
4650# You should have received a copy of the GNU General Public License version
4651# 2 along with this work; if not, write to the Free Software Foundation,
4652# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4653#
4654# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4655# or visit www.oracle.com if you need additional information or have any
4656# questions.
4657#
4658
4659################################################################################
4660# Setup libffi (Foreign Function Interface)
4661################################################################################
4662
4663
4664#
4665# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4666# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4667#
4668# This code is free software; you can redistribute it and/or modify it
4669# under the terms of the GNU General Public License version 2 only, as
4670# published by the Free Software Foundation.  Oracle designates this
4671# particular file as subject to the "Classpath" exception as provided
4672# by Oracle in the LICENSE file that accompanied this code.
4673#
4674# This code is distributed in the hope that it will be useful, but WITHOUT
4675# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4676# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4677# version 2 for more details (a copy is included in the LICENSE file that
4678# accompanied this code).
4679#
4680# You should have received a copy of the GNU General Public License version
4681# 2 along with this work; if not, write to the Free Software Foundation,
4682# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4683#
4684# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4685# or visit www.oracle.com if you need additional information or have any
4686# questions.
4687#
4688
4689################################################################################
4690# Build the freetype lib from source
4691################################################################################
4692
4693
4694################################################################################
4695# Check if a potential freeype library match is correct and usable
4696################################################################################
4697
4698
4699################################################################################
4700# Setup freetype (The FreeType2 font rendering library)
4701################################################################################
4702
4703
4704#
4705# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4706# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4707#
4708# This code is free software; you can redistribute it and/or modify it
4709# under the terms of the GNU General Public License version 2 only, as
4710# published by the Free Software Foundation.  Oracle designates this
4711# particular file as subject to the "Classpath" exception as provided
4712# by Oracle in the LICENSE file that accompanied this code.
4713#
4714# This code is distributed in the hope that it will be useful, but WITHOUT
4715# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4716# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4717# version 2 for more details (a copy is included in the LICENSE file that
4718# accompanied this code).
4719#
4720# You should have received a copy of the GNU General Public License version
4721# 2 along with this work; if not, write to the Free Software Foundation,
4722# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4723#
4724# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4725# or visit www.oracle.com if you need additional information or have any
4726# questions.
4727#
4728
4729################################################################################
4730# Setup the standard C/C++ runtime libraries.
4731#
4732# Most importantly, determine if stdc++ should be linked statically or
4733# dynamically.
4734################################################################################
4735
4736
4737#
4738# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4739# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4740#
4741# This code is free software; you can redistribute it and/or modify it
4742# under the terms of the GNU General Public License version 2 only, as
4743# published by the Free Software Foundation.  Oracle designates this
4744# particular file as subject to the "Classpath" exception as provided
4745# by Oracle in the LICENSE file that accompanied this code.
4746#
4747# This code is distributed in the hope that it will be useful, but WITHOUT
4748# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4749# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4750# version 2 for more details (a copy is included in the LICENSE file that
4751# accompanied this code).
4752#
4753# You should have received a copy of the GNU General Public License version
4754# 2 along with this work; if not, write to the Free Software Foundation,
4755# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4756#
4757# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4758# or visit www.oracle.com if you need additional information or have any
4759# questions.
4760#
4761
4762################################################################################
4763# Setup X11 Windows system
4764################################################################################
4765
4766
4767
4768################################################################################
4769# Determine which libraries are needed for this configuration
4770################################################################################
4771
4772
4773################################################################################
4774# Parse library options, and setup needed libraries
4775################################################################################
4776
4777
4778################################################################################
4779# Setup llvm (Low-Level VM)
4780################################################################################
4781
4782
4783################################################################################
4784# Setup various libraries, typically small system libraries
4785################################################################################
4786
4787
4788################################################################################
4789# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4790# redistribute it in the test image.
4791################################################################################
4792
4793
4794
4795#
4796# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4797# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4798#
4799# This code is free software; you can redistribute it and/or modify it
4800# under the terms of the GNU General Public License version 2 only, as
4801# published by the Free Software Foundation.  Oracle designates this
4802# particular file as subject to the "Classpath" exception as provided
4803# by Oracle in the LICENSE file that accompanied this code.
4804#
4805# This code is distributed in the hope that it will be useful, but WITHOUT
4806# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4807# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4808# version 2 for more details (a copy is included in the LICENSE file that
4809# accompanied this code).
4810#
4811# You should have received a copy of the GNU General Public License version
4812# 2 along with this work; if not, write to the Free Software Foundation,
4813# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4814#
4815# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4816# or visit www.oracle.com if you need additional information or have any
4817# questions.
4818#
4819
4820# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4821# Converts autoconf style CPU name to OpenJDK style, into
4822# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4823
4824
4825# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4826# Converts autoconf style OS name to OpenJDK style, into
4827# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4828
4829
4830# Expects $host_os $host_cpu $build_os and $build_cpu
4831# and $with_target_bits to have been setup!
4832#
4833# Translate the standard triplet(quadruplet) definition
4834# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4835# OPENJDK_BUILD_OS, etc.
4836
4837
4838# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4839# accordingly. Must be done after setting up build and target system, but before
4840# doing anything else with these values.
4841
4842
4843# Setup the legacy variables, for controlling the old makefiles.
4844#
4845
4846
4847# $1 - Either TARGET or BUILD to setup the variables for.
4848
4849
4850
4851
4852#%%% Build and target systems %%%
4853
4854
4855
4856
4857# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4858# Add -mX to various FLAGS variables.
4859
4860
4861
4862
4863
4864
4865#
4866# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4867# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4868#
4869# This code is free software; you can redistribute it and/or modify it
4870# under the terms of the GNU General Public License version 2 only, as
4871# published by the Free Software Foundation.  Oracle designates this
4872# particular file as subject to the "Classpath" exception as provided
4873# by Oracle in the LICENSE file that accompanied this code.
4874#
4875# This code is distributed in the hope that it will be useful, but WITHOUT
4876# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4877# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4878# version 2 for more details (a copy is included in the LICENSE file that
4879# accompanied this code).
4880#
4881# You should have received a copy of the GNU General Public License version
4882# 2 along with this work; if not, write to the Free Software Foundation,
4883# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4884#
4885# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4886# or visit www.oracle.com if you need additional information or have any
4887# questions.
4888#
4889
4890
4891
4892
4893
4894
4895
4896################################################################################
4897# Define a mechanism for importing extra prebuilt modules
4898#
4899
4900
4901
4902#
4903# Copyright (c) 2011, 2017, Oracle and/or its affiliates. All rights reserved.
4904# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4905#
4906# This code is free software; you can redistribute it and/or modify it
4907# under the terms of the GNU General Public License version 2 only, as
4908# published by the Free Software Foundation.  Oracle designates this
4909# particular file as subject to the "Classpath" exception as provided
4910# by Oracle in the LICENSE file that accompanied this code.
4911#
4912# This code is distributed in the hope that it will be useful, but WITHOUT
4913# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4914# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4915# version 2 for more details (a copy is included in the LICENSE file that
4916# accompanied this code).
4917#
4918# You should have received a copy of the GNU General Public License version
4919# 2 along with this work; if not, write to the Free Software Foundation,
4920# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4921#
4922# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4923# or visit www.oracle.com if you need additional information or have any
4924# questions.
4925#
4926
4927########################################################################
4928# This file is responsible for detecting, verifying and setting up the
4929# toolchain, i.e. the compiler, linker and related utilities. It will setup
4930# proper paths to the binaries, but it will not setup any flags.
4931#
4932# The binaries used is determined by the toolchain type, which is the family of
4933# compilers and related tools that are used.
4934########################################################################
4935
4936
4937# All valid toolchains, regardless of platform (used by help.m4)
4938VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4939
4940# These toolchains are valid on different platforms
4941VALID_TOOLCHAINS_linux="gcc clang"
4942VALID_TOOLCHAINS_solaris="solstudio"
4943VALID_TOOLCHAINS_macosx="gcc clang"
4944VALID_TOOLCHAINS_aix="xlc"
4945VALID_TOOLCHAINS_windows="microsoft"
4946
4947# Toolchain descriptions
4948TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4949TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4950TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4951TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4952TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4953
4954# Minimum supported versions, empty means unspecified
4955TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4956TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4957TOOLCHAIN_MINIMUM_VERSION_microsoft="16.00.30319.01" # VS2010
4958TOOLCHAIN_MINIMUM_VERSION_solstudio="5.13"
4959TOOLCHAIN_MINIMUM_VERSION_xlc=""
4960
4961# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4962# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4963# $1 - optional variable prefix for compiler and version variables (BUILD_)
4964# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4965
4966
4967# Check if the configured compiler (C and C++) is of a specific version or
4968# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4969#
4970# Arguments:
4971#   VERSION:   The version string to check against the found version
4972#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4973#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4974#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4975
4976
4977
4978
4979# Setup a number of variables describing how native output files are
4980# named on this platform/toolchain.
4981
4982
4983# Determine which toolchain type to use, and make sure it is valid for this
4984# platform. Setup various information about the selected toolchain.
4985
4986
4987# Before we start detecting the toolchain executables, we might need some
4988# special setup, e.g. additional paths etc.
4989
4990
4991# Restore path, etc
4992
4993
4994# Check if a compiler is of the toolchain type we expect, and save the version
4995# information from it. If the compiler does not match the expected type,
4996# this function will abort using AC_MSG_ERROR. If it matches, the version will
4997# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4998# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4999#
5000# $1 = compiler to test (CC or CXX)
5001# $2 = human readable name of compiler (C or C++)
5002
5003
5004# Try to locate the given C or C++ compiler in the path, or otherwise.
5005#
5006# $1 = compiler to test (CC or CXX)
5007# $2 = human readable name of compiler (C or C++)
5008# $3 = compiler name to search for
5009
5010
5011# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
5012# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
5013# archiver (AR). Verify that the compilers are correct according to the
5014# toolchain type.
5015
5016
5017# Setup additional tools that is considered a part of the toolchain, but not the
5018# core part. Many of these are highly platform-specific and do not exist,
5019# and/or are not needed on all platforms.
5020
5021
5022# Setup the build tools (i.e, the compiler and linker used to build programs
5023# that should be run on the build platform, not the target platform, as a build
5024# helper). Since the non-cross-compile case uses the normal, target compilers
5025# for this, we can only do this after these have been setup.
5026
5027
5028# Do some additional checks on the detected tools.
5029
5030
5031# Setup the JTReg Regression Test Harness.
5032
5033
5034# Setup the JIB dependency resolver
5035
5036
5037#
5038# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
5039# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
5040#
5041# This code is free software; you can redistribute it and/or modify it
5042# under the terms of the GNU General Public License version 2 only, as
5043# published by the Free Software Foundation.  Oracle designates this
5044# particular file as subject to the "Classpath" exception as provided
5045# by Oracle in the LICENSE file that accompanied this code.
5046#
5047# This code is distributed in the hope that it will be useful, but WITHOUT
5048# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5049# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5050# version 2 for more details (a copy is included in the LICENSE file that
5051# accompanied this code).
5052#
5053# You should have received a copy of the GNU General Public License version
5054# 2 along with this work; if not, write to the Free Software Foundation,
5055# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5056#
5057# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5058# or visit www.oracle.com if you need additional information or have any
5059# questions.
5060#
5061
5062################################################################################
5063# The order of these defines the priority by which we try to find them.
5064VALID_VS_VERSIONS="2013 2012 2010"
5065
5066VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5067VS_VERSION_INTERNAL_2010=100
5068VS_MSVCR_2010=msvcr100.dll
5069# We don't use msvcp on Visual Studio 2010
5070#VS_MSVCP_2010=msvcp100.dll
5071VS_ENVVAR_2010="VS100COMNTOOLS"
5072VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5073VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5074VS_VS_PLATFORM_NAME_2010="v100"
5075VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5076
5077VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5078VS_VERSION_INTERNAL_2012=110
5079VS_MSVCR_2012=msvcr110.dll
5080VS_MSVCP_2012=msvcp110.dll
5081VS_ENVVAR_2012="VS110COMNTOOLS"
5082VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5083VS_SDK_INSTALLDIR_2012=
5084VS_VS_PLATFORM_NAME_2012="v110"
5085VS_SDK_PLATFORM_NAME_2012=
5086
5087VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5088VS_VERSION_INTERNAL_2013=120
5089VS_MSVCR_2013=msvcr120.dll
5090VS_MSVCP_2013=msvcp120.dll
5091VS_ENVVAR_2013="VS120COMNTOOLS"
5092VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5093VS_SDK_INSTALLDIR_2013=
5094VS_VS_PLATFORM_NAME_2013="v120"
5095VS_SDK_PLATFORM_NAME_2013=
5096
5097################################################################################
5098
5099
5100
5101################################################################################
5102
5103
5104
5105################################################################################
5106# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5107# build environment and assigns it to VS_ENV_CMD
5108
5109
5110################################################################################
5111
5112
5113
5114################################################################################
5115# Check if the VS env variables were setup prior to running configure.
5116# If not, then find vcvarsall.bat and run it automatically, and integrate
5117# the set env variables into the spec file.
5118
5119
5120
5121
5122
5123
5124
5125
5126
5127
5128
5129
5130
5131
5132# This line needs to be here, verbatim, after all includes and the dummy hook
5133# definitions. It is replaced with custom functionality when building
5134# custom sources.
5135#CUSTOM_AUTOCONF_INCLUDE
5136
5137# Do not change or remove the following line, it is needed for consistency checks:
5138DATE_WHEN_GENERATED=1489707635
5139
5140###############################################################################
5141#
5142# Initialization / Boot-strapping
5143#
5144# The bootstrapping process needs to solve the "chicken or the egg" problem,
5145# thus it jumps back and forth, each time gaining something needed later on.
5146#
5147###############################################################################
5148
5149# If we are requested to print additional help, do that and then exit.
5150# This must be the very first call.
5151
5152  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5153
5154    # Print available toolchains
5155    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5156    $PRINTF "Which are valid to use depends on the build platform.\n"
5157    for toolchain in $VALID_TOOLCHAINS_all; do
5158      # Use indirect variable referencing
5159      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5160      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5161      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5162    done
5163    $PRINTF "\n"
5164
5165    # Print available jvm features
5166    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5167    $PRINTF "Which are valid to use depends on the target platform.\n  "
5168    $PRINTF "%s " $VALID_JVM_FEATURES
5169    $PRINTF "\n"
5170
5171    # And now exit directly
5172    exit 0
5173  fi
5174
5175
5176# Basic initialization that must happen first of all in the normal process.
5177
5178  # Save the original command line. This is passed to us by the wrapper configure script.
5179
5180  # Save the path variable before it gets changed
5181  ORIGINAL_PATH="$PATH"
5182
5183  DATE_WHEN_CONFIGURED=`LANG=C date`
5184
5185  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5186$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5187  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5188$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5189
5190
5191  # Start with tools that do not need have cross compilation support
5192  # and can be expected to be found in the default PATH. These tools are
5193  # used by configure.
5194
5195  # First are all the simple required tools.
5196
5197
5198
5199  # Publish this variable in the help.
5200
5201
5202  if [ -z "${BASENAME+x}" ]; then
5203    # The variable is not set by user, try to locate tool using the code snippet
5204    for ac_prog in basename
5205do
5206  # Extract the first word of "$ac_prog", so it can be a program name with args.
5207set dummy $ac_prog; ac_word=$2
5208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5209$as_echo_n "checking for $ac_word... " >&6; }
5210if ${ac_cv_path_BASENAME+:} false; then :
5211  $as_echo_n "(cached) " >&6
5212else
5213  case $BASENAME in
5214  [\\/]* | ?:[\\/]*)
5215  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5216  ;;
5217  *)
5218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5219for as_dir in $PATH
5220do
5221  IFS=$as_save_IFS
5222  test -z "$as_dir" && as_dir=.
5223    for ac_exec_ext in '' $ac_executable_extensions; do
5224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5225    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5227    break 2
5228  fi
5229done
5230  done
5231IFS=$as_save_IFS
5232
5233  ;;
5234esac
5235fi
5236BASENAME=$ac_cv_path_BASENAME
5237if test -n "$BASENAME"; then
5238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5239$as_echo "$BASENAME" >&6; }
5240else
5241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5242$as_echo "no" >&6; }
5243fi
5244
5245
5246  test -n "$BASENAME" && break
5247done
5248
5249  else
5250    # The variable is set, but is it from the command line or the environment?
5251
5252    # Try to remove the string !BASENAME! from our list.
5253    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5254    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5255      # If it failed, the variable was not from the command line. Ignore it,
5256      # but warn the user (except for BASH, which is always set by the calling BASH).
5257      if test "xBASENAME" != xBASH; then
5258        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5259$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5260      fi
5261      # Try to locate tool using the code snippet
5262      for ac_prog in basename
5263do
5264  # Extract the first word of "$ac_prog", so it can be a program name with args.
5265set dummy $ac_prog; ac_word=$2
5266{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5267$as_echo_n "checking for $ac_word... " >&6; }
5268if ${ac_cv_path_BASENAME+:} false; then :
5269  $as_echo_n "(cached) " >&6
5270else
5271  case $BASENAME in
5272  [\\/]* | ?:[\\/]*)
5273  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5274  ;;
5275  *)
5276  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5277for as_dir in $PATH
5278do
5279  IFS=$as_save_IFS
5280  test -z "$as_dir" && as_dir=.
5281    for ac_exec_ext in '' $ac_executable_extensions; do
5282  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5283    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5284    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5285    break 2
5286  fi
5287done
5288  done
5289IFS=$as_save_IFS
5290
5291  ;;
5292esac
5293fi
5294BASENAME=$ac_cv_path_BASENAME
5295if test -n "$BASENAME"; then
5296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5297$as_echo "$BASENAME" >&6; }
5298else
5299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5300$as_echo "no" >&6; }
5301fi
5302
5303
5304  test -n "$BASENAME" && break
5305done
5306
5307    else
5308      # If it succeeded, then it was overridden by the user. We will use it
5309      # for the tool.
5310
5311      # First remove it from the list of overridden variables, so we can test
5312      # for unknown variables in the end.
5313      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5314
5315      # Check if we try to supply an empty value
5316      if test "x$BASENAME" = x; then
5317        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5318$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5319        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5320$as_echo_n "checking for BASENAME... " >&6; }
5321        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5322$as_echo "disabled" >&6; }
5323      else
5324        # Check if the provided tool contains a complete path.
5325        tool_specified="$BASENAME"
5326        tool_basename="${tool_specified##*/}"
5327        if test "x$tool_basename" = "x$tool_specified"; then
5328          # A command without a complete path is provided, search $PATH.
5329          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5330$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5331          # Extract the first word of "$tool_basename", so it can be a program name with args.
5332set dummy $tool_basename; ac_word=$2
5333{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5334$as_echo_n "checking for $ac_word... " >&6; }
5335if ${ac_cv_path_BASENAME+:} false; then :
5336  $as_echo_n "(cached) " >&6
5337else
5338  case $BASENAME in
5339  [\\/]* | ?:[\\/]*)
5340  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5341  ;;
5342  *)
5343  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5344for as_dir in $PATH
5345do
5346  IFS=$as_save_IFS
5347  test -z "$as_dir" && as_dir=.
5348    for ac_exec_ext in '' $ac_executable_extensions; do
5349  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5350    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5351    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5352    break 2
5353  fi
5354done
5355  done
5356IFS=$as_save_IFS
5357
5358  ;;
5359esac
5360fi
5361BASENAME=$ac_cv_path_BASENAME
5362if test -n "$BASENAME"; then
5363  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5364$as_echo "$BASENAME" >&6; }
5365else
5366  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5367$as_echo "no" >&6; }
5368fi
5369
5370
5371          if test "x$BASENAME" = x; then
5372            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5373          fi
5374        else
5375          # Otherwise we believe it is a complete path. Use it as it is.
5376          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5377$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5378          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5379$as_echo_n "checking for BASENAME... " >&6; }
5380          if test ! -x "$tool_specified"; then
5381            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5382$as_echo "not found" >&6; }
5383            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5384          fi
5385          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5386$as_echo "$tool_specified" >&6; }
5387        fi
5388      fi
5389    fi
5390
5391  fi
5392
5393
5394
5395  if test "x$BASENAME" = x; then
5396    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5397  fi
5398
5399
5400
5401
5402
5403  # Publish this variable in the help.
5404
5405
5406  if [ -z "${BASH+x}" ]; then
5407    # The variable is not set by user, try to locate tool using the code snippet
5408    for ac_prog in bash
5409do
5410  # Extract the first word of "$ac_prog", so it can be a program name with args.
5411set dummy $ac_prog; ac_word=$2
5412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5413$as_echo_n "checking for $ac_word... " >&6; }
5414if ${ac_cv_path_BASH+:} false; then :
5415  $as_echo_n "(cached) " >&6
5416else
5417  case $BASH in
5418  [\\/]* | ?:[\\/]*)
5419  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5420  ;;
5421  *)
5422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5423for as_dir in $PATH
5424do
5425  IFS=$as_save_IFS
5426  test -z "$as_dir" && as_dir=.
5427    for ac_exec_ext in '' $ac_executable_extensions; do
5428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5429    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5431    break 2
5432  fi
5433done
5434  done
5435IFS=$as_save_IFS
5436
5437  ;;
5438esac
5439fi
5440BASH=$ac_cv_path_BASH
5441if test -n "$BASH"; then
5442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5443$as_echo "$BASH" >&6; }
5444else
5445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5446$as_echo "no" >&6; }
5447fi
5448
5449
5450  test -n "$BASH" && break
5451done
5452
5453  else
5454    # The variable is set, but is it from the command line or the environment?
5455
5456    # Try to remove the string !BASH! from our list.
5457    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5458    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5459      # If it failed, the variable was not from the command line. Ignore it,
5460      # but warn the user (except for BASH, which is always set by the calling BASH).
5461      if test "xBASH" != xBASH; then
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5463$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5464      fi
5465      # Try to locate tool using the code snippet
5466      for ac_prog in bash
5467do
5468  # Extract the first word of "$ac_prog", so it can be a program name with args.
5469set dummy $ac_prog; ac_word=$2
5470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5471$as_echo_n "checking for $ac_word... " >&6; }
5472if ${ac_cv_path_BASH+:} false; then :
5473  $as_echo_n "(cached) " >&6
5474else
5475  case $BASH in
5476  [\\/]* | ?:[\\/]*)
5477  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5478  ;;
5479  *)
5480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5481for as_dir in $PATH
5482do
5483  IFS=$as_save_IFS
5484  test -z "$as_dir" && as_dir=.
5485    for ac_exec_ext in '' $ac_executable_extensions; do
5486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5487    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5489    break 2
5490  fi
5491done
5492  done
5493IFS=$as_save_IFS
5494
5495  ;;
5496esac
5497fi
5498BASH=$ac_cv_path_BASH
5499if test -n "$BASH"; then
5500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5501$as_echo "$BASH" >&6; }
5502else
5503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5504$as_echo "no" >&6; }
5505fi
5506
5507
5508  test -n "$BASH" && break
5509done
5510
5511    else
5512      # If it succeeded, then it was overridden by the user. We will use it
5513      # for the tool.
5514
5515      # First remove it from the list of overridden variables, so we can test
5516      # for unknown variables in the end.
5517      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5518
5519      # Check if we try to supply an empty value
5520      if test "x$BASH" = x; then
5521        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5522$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5523        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5524$as_echo_n "checking for BASH... " >&6; }
5525        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5526$as_echo "disabled" >&6; }
5527      else
5528        # Check if the provided tool contains a complete path.
5529        tool_specified="$BASH"
5530        tool_basename="${tool_specified##*/}"
5531        if test "x$tool_basename" = "x$tool_specified"; then
5532          # A command without a complete path is provided, search $PATH.
5533          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5534$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5535          # Extract the first word of "$tool_basename", so it can be a program name with args.
5536set dummy $tool_basename; ac_word=$2
5537{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5538$as_echo_n "checking for $ac_word... " >&6; }
5539if ${ac_cv_path_BASH+:} false; then :
5540  $as_echo_n "(cached) " >&6
5541else
5542  case $BASH in
5543  [\\/]* | ?:[\\/]*)
5544  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5545  ;;
5546  *)
5547  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5548for as_dir in $PATH
5549do
5550  IFS=$as_save_IFS
5551  test -z "$as_dir" && as_dir=.
5552    for ac_exec_ext in '' $ac_executable_extensions; do
5553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5554    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5556    break 2
5557  fi
5558done
5559  done
5560IFS=$as_save_IFS
5561
5562  ;;
5563esac
5564fi
5565BASH=$ac_cv_path_BASH
5566if test -n "$BASH"; then
5567  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5568$as_echo "$BASH" >&6; }
5569else
5570  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5571$as_echo "no" >&6; }
5572fi
5573
5574
5575          if test "x$BASH" = x; then
5576            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5577          fi
5578        else
5579          # Otherwise we believe it is a complete path. Use it as it is.
5580          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5581$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5582          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5583$as_echo_n "checking for BASH... " >&6; }
5584          if test ! -x "$tool_specified"; then
5585            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5586$as_echo "not found" >&6; }
5587            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5588          fi
5589          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5590$as_echo "$tool_specified" >&6; }
5591        fi
5592      fi
5593    fi
5594
5595  fi
5596
5597
5598
5599  if test "x$BASH" = x; then
5600    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5601  fi
5602
5603
5604
5605
5606
5607  # Publish this variable in the help.
5608
5609
5610  if [ -z "${CAT+x}" ]; then
5611    # The variable is not set by user, try to locate tool using the code snippet
5612    for ac_prog in cat
5613do
5614  # Extract the first word of "$ac_prog", so it can be a program name with args.
5615set dummy $ac_prog; ac_word=$2
5616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5617$as_echo_n "checking for $ac_word... " >&6; }
5618if ${ac_cv_path_CAT+:} false; then :
5619  $as_echo_n "(cached) " >&6
5620else
5621  case $CAT in
5622  [\\/]* | ?:[\\/]*)
5623  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5624  ;;
5625  *)
5626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5627for as_dir in $PATH
5628do
5629  IFS=$as_save_IFS
5630  test -z "$as_dir" && as_dir=.
5631    for ac_exec_ext in '' $ac_executable_extensions; do
5632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5633    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5635    break 2
5636  fi
5637done
5638  done
5639IFS=$as_save_IFS
5640
5641  ;;
5642esac
5643fi
5644CAT=$ac_cv_path_CAT
5645if test -n "$CAT"; then
5646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5647$as_echo "$CAT" >&6; }
5648else
5649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5650$as_echo "no" >&6; }
5651fi
5652
5653
5654  test -n "$CAT" && break
5655done
5656
5657  else
5658    # The variable is set, but is it from the command line or the environment?
5659
5660    # Try to remove the string !CAT! from our list.
5661    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5662    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5663      # If it failed, the variable was not from the command line. Ignore it,
5664      # but warn the user (except for BASH, which is always set by the calling BASH).
5665      if test "xCAT" != xBASH; then
5666        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5667$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5668      fi
5669      # Try to locate tool using the code snippet
5670      for ac_prog in cat
5671do
5672  # Extract the first word of "$ac_prog", so it can be a program name with args.
5673set dummy $ac_prog; ac_word=$2
5674{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5675$as_echo_n "checking for $ac_word... " >&6; }
5676if ${ac_cv_path_CAT+:} false; then :
5677  $as_echo_n "(cached) " >&6
5678else
5679  case $CAT in
5680  [\\/]* | ?:[\\/]*)
5681  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5682  ;;
5683  *)
5684  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5685for as_dir in $PATH
5686do
5687  IFS=$as_save_IFS
5688  test -z "$as_dir" && as_dir=.
5689    for ac_exec_ext in '' $ac_executable_extensions; do
5690  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5691    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5692    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5693    break 2
5694  fi
5695done
5696  done
5697IFS=$as_save_IFS
5698
5699  ;;
5700esac
5701fi
5702CAT=$ac_cv_path_CAT
5703if test -n "$CAT"; then
5704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5705$as_echo "$CAT" >&6; }
5706else
5707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5708$as_echo "no" >&6; }
5709fi
5710
5711
5712  test -n "$CAT" && break
5713done
5714
5715    else
5716      # If it succeeded, then it was overridden by the user. We will use it
5717      # for the tool.
5718
5719      # First remove it from the list of overridden variables, so we can test
5720      # for unknown variables in the end.
5721      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5722
5723      # Check if we try to supply an empty value
5724      if test "x$CAT" = x; then
5725        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5726$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5727        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5728$as_echo_n "checking for CAT... " >&6; }
5729        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5730$as_echo "disabled" >&6; }
5731      else
5732        # Check if the provided tool contains a complete path.
5733        tool_specified="$CAT"
5734        tool_basename="${tool_specified##*/}"
5735        if test "x$tool_basename" = "x$tool_specified"; then
5736          # A command without a complete path is provided, search $PATH.
5737          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5738$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5739          # Extract the first word of "$tool_basename", so it can be a program name with args.
5740set dummy $tool_basename; ac_word=$2
5741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5742$as_echo_n "checking for $ac_word... " >&6; }
5743if ${ac_cv_path_CAT+:} false; then :
5744  $as_echo_n "(cached) " >&6
5745else
5746  case $CAT in
5747  [\\/]* | ?:[\\/]*)
5748  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5749  ;;
5750  *)
5751  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5752for as_dir in $PATH
5753do
5754  IFS=$as_save_IFS
5755  test -z "$as_dir" && as_dir=.
5756    for ac_exec_ext in '' $ac_executable_extensions; do
5757  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5758    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5759    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5760    break 2
5761  fi
5762done
5763  done
5764IFS=$as_save_IFS
5765
5766  ;;
5767esac
5768fi
5769CAT=$ac_cv_path_CAT
5770if test -n "$CAT"; then
5771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5772$as_echo "$CAT" >&6; }
5773else
5774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5775$as_echo "no" >&6; }
5776fi
5777
5778
5779          if test "x$CAT" = x; then
5780            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5781          fi
5782        else
5783          # Otherwise we believe it is a complete path. Use it as it is.
5784          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5785$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5786          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5787$as_echo_n "checking for CAT... " >&6; }
5788          if test ! -x "$tool_specified"; then
5789            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5790$as_echo "not found" >&6; }
5791            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5792          fi
5793          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5794$as_echo "$tool_specified" >&6; }
5795        fi
5796      fi
5797    fi
5798
5799  fi
5800
5801
5802
5803  if test "x$CAT" = x; then
5804    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5805  fi
5806
5807
5808
5809
5810
5811  # Publish this variable in the help.
5812
5813
5814  if [ -z "${CHMOD+x}" ]; then
5815    # The variable is not set by user, try to locate tool using the code snippet
5816    for ac_prog in chmod
5817do
5818  # Extract the first word of "$ac_prog", so it can be a program name with args.
5819set dummy $ac_prog; ac_word=$2
5820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5821$as_echo_n "checking for $ac_word... " >&6; }
5822if ${ac_cv_path_CHMOD+:} false; then :
5823  $as_echo_n "(cached) " >&6
5824else
5825  case $CHMOD in
5826  [\\/]* | ?:[\\/]*)
5827  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5828  ;;
5829  *)
5830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5831for as_dir in $PATH
5832do
5833  IFS=$as_save_IFS
5834  test -z "$as_dir" && as_dir=.
5835    for ac_exec_ext in '' $ac_executable_extensions; do
5836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5837    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5839    break 2
5840  fi
5841done
5842  done
5843IFS=$as_save_IFS
5844
5845  ;;
5846esac
5847fi
5848CHMOD=$ac_cv_path_CHMOD
5849if test -n "$CHMOD"; then
5850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5851$as_echo "$CHMOD" >&6; }
5852else
5853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5854$as_echo "no" >&6; }
5855fi
5856
5857
5858  test -n "$CHMOD" && break
5859done
5860
5861  else
5862    # The variable is set, but is it from the command line or the environment?
5863
5864    # Try to remove the string !CHMOD! from our list.
5865    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5866    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5867      # If it failed, the variable was not from the command line. Ignore it,
5868      # but warn the user (except for BASH, which is always set by the calling BASH).
5869      if test "xCHMOD" != xBASH; then
5870        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5871$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5872      fi
5873      # Try to locate tool using the code snippet
5874      for ac_prog in chmod
5875do
5876  # Extract the first word of "$ac_prog", so it can be a program name with args.
5877set dummy $ac_prog; ac_word=$2
5878{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5879$as_echo_n "checking for $ac_word... " >&6; }
5880if ${ac_cv_path_CHMOD+:} false; then :
5881  $as_echo_n "(cached) " >&6
5882else
5883  case $CHMOD in
5884  [\\/]* | ?:[\\/]*)
5885  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5886  ;;
5887  *)
5888  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5889for as_dir in $PATH
5890do
5891  IFS=$as_save_IFS
5892  test -z "$as_dir" && as_dir=.
5893    for ac_exec_ext in '' $ac_executable_extensions; do
5894  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5895    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5896    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5897    break 2
5898  fi
5899done
5900  done
5901IFS=$as_save_IFS
5902
5903  ;;
5904esac
5905fi
5906CHMOD=$ac_cv_path_CHMOD
5907if test -n "$CHMOD"; then
5908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5909$as_echo "$CHMOD" >&6; }
5910else
5911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5912$as_echo "no" >&6; }
5913fi
5914
5915
5916  test -n "$CHMOD" && break
5917done
5918
5919    else
5920      # If it succeeded, then it was overridden by the user. We will use it
5921      # for the tool.
5922
5923      # First remove it from the list of overridden variables, so we can test
5924      # for unknown variables in the end.
5925      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5926
5927      # Check if we try to supply an empty value
5928      if test "x$CHMOD" = x; then
5929        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5930$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5931        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5932$as_echo_n "checking for CHMOD... " >&6; }
5933        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5934$as_echo "disabled" >&6; }
5935      else
5936        # Check if the provided tool contains a complete path.
5937        tool_specified="$CHMOD"
5938        tool_basename="${tool_specified##*/}"
5939        if test "x$tool_basename" = "x$tool_specified"; then
5940          # A command without a complete path is provided, search $PATH.
5941          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5942$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5943          # Extract the first word of "$tool_basename", so it can be a program name with args.
5944set dummy $tool_basename; ac_word=$2
5945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5946$as_echo_n "checking for $ac_word... " >&6; }
5947if ${ac_cv_path_CHMOD+:} false; then :
5948  $as_echo_n "(cached) " >&6
5949else
5950  case $CHMOD in
5951  [\\/]* | ?:[\\/]*)
5952  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5953  ;;
5954  *)
5955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5956for as_dir in $PATH
5957do
5958  IFS=$as_save_IFS
5959  test -z "$as_dir" && as_dir=.
5960    for ac_exec_ext in '' $ac_executable_extensions; do
5961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5962    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5964    break 2
5965  fi
5966done
5967  done
5968IFS=$as_save_IFS
5969
5970  ;;
5971esac
5972fi
5973CHMOD=$ac_cv_path_CHMOD
5974if test -n "$CHMOD"; then
5975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5976$as_echo "$CHMOD" >&6; }
5977else
5978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5979$as_echo "no" >&6; }
5980fi
5981
5982
5983          if test "x$CHMOD" = x; then
5984            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5985          fi
5986        else
5987          # Otherwise we believe it is a complete path. Use it as it is.
5988          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5989$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5990          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5991$as_echo_n "checking for CHMOD... " >&6; }
5992          if test ! -x "$tool_specified"; then
5993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5994$as_echo "not found" >&6; }
5995            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5996          fi
5997          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5998$as_echo "$tool_specified" >&6; }
5999        fi
6000      fi
6001    fi
6002
6003  fi
6004
6005
6006
6007  if test "x$CHMOD" = x; then
6008    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
6009  fi
6010
6011
6012
6013
6014
6015  # Publish this variable in the help.
6016
6017
6018  if [ -z "${CMP+x}" ]; then
6019    # The variable is not set by user, try to locate tool using the code snippet
6020    for ac_prog in cmp
6021do
6022  # Extract the first word of "$ac_prog", so it can be a program name with args.
6023set dummy $ac_prog; ac_word=$2
6024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6025$as_echo_n "checking for $ac_word... " >&6; }
6026if ${ac_cv_path_CMP+:} false; then :
6027  $as_echo_n "(cached) " >&6
6028else
6029  case $CMP in
6030  [\\/]* | ?:[\\/]*)
6031  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6032  ;;
6033  *)
6034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6035for as_dir in $PATH
6036do
6037  IFS=$as_save_IFS
6038  test -z "$as_dir" && as_dir=.
6039    for ac_exec_ext in '' $ac_executable_extensions; do
6040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6041    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6043    break 2
6044  fi
6045done
6046  done
6047IFS=$as_save_IFS
6048
6049  ;;
6050esac
6051fi
6052CMP=$ac_cv_path_CMP
6053if test -n "$CMP"; then
6054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6055$as_echo "$CMP" >&6; }
6056else
6057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6058$as_echo "no" >&6; }
6059fi
6060
6061
6062  test -n "$CMP" && break
6063done
6064
6065  else
6066    # The variable is set, but is it from the command line or the environment?
6067
6068    # Try to remove the string !CMP! from our list.
6069    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6070    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6071      # If it failed, the variable was not from the command line. Ignore it,
6072      # but warn the user (except for BASH, which is always set by the calling BASH).
6073      if test "xCMP" != xBASH; then
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6075$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6076      fi
6077      # Try to locate tool using the code snippet
6078      for ac_prog in cmp
6079do
6080  # Extract the first word of "$ac_prog", so it can be a program name with args.
6081set dummy $ac_prog; ac_word=$2
6082{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6083$as_echo_n "checking for $ac_word... " >&6; }
6084if ${ac_cv_path_CMP+:} false; then :
6085  $as_echo_n "(cached) " >&6
6086else
6087  case $CMP in
6088  [\\/]* | ?:[\\/]*)
6089  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6090  ;;
6091  *)
6092  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6093for as_dir in $PATH
6094do
6095  IFS=$as_save_IFS
6096  test -z "$as_dir" && as_dir=.
6097    for ac_exec_ext in '' $ac_executable_extensions; do
6098  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6099    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6100    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6101    break 2
6102  fi
6103done
6104  done
6105IFS=$as_save_IFS
6106
6107  ;;
6108esac
6109fi
6110CMP=$ac_cv_path_CMP
6111if test -n "$CMP"; then
6112  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6113$as_echo "$CMP" >&6; }
6114else
6115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6116$as_echo "no" >&6; }
6117fi
6118
6119
6120  test -n "$CMP" && break
6121done
6122
6123    else
6124      # If it succeeded, then it was overridden by the user. We will use it
6125      # for the tool.
6126
6127      # First remove it from the list of overridden variables, so we can test
6128      # for unknown variables in the end.
6129      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6130
6131      # Check if we try to supply an empty value
6132      if test "x$CMP" = x; then
6133        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6134$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6135        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6136$as_echo_n "checking for CMP... " >&6; }
6137        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6138$as_echo "disabled" >&6; }
6139      else
6140        # Check if the provided tool contains a complete path.
6141        tool_specified="$CMP"
6142        tool_basename="${tool_specified##*/}"
6143        if test "x$tool_basename" = "x$tool_specified"; then
6144          # A command without a complete path is provided, search $PATH.
6145          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6146$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6147          # Extract the first word of "$tool_basename", so it can be a program name with args.
6148set dummy $tool_basename; ac_word=$2
6149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6150$as_echo_n "checking for $ac_word... " >&6; }
6151if ${ac_cv_path_CMP+:} false; then :
6152  $as_echo_n "(cached) " >&6
6153else
6154  case $CMP in
6155  [\\/]* | ?:[\\/]*)
6156  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6157  ;;
6158  *)
6159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6160for as_dir in $PATH
6161do
6162  IFS=$as_save_IFS
6163  test -z "$as_dir" && as_dir=.
6164    for ac_exec_ext in '' $ac_executable_extensions; do
6165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6166    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6168    break 2
6169  fi
6170done
6171  done
6172IFS=$as_save_IFS
6173
6174  ;;
6175esac
6176fi
6177CMP=$ac_cv_path_CMP
6178if test -n "$CMP"; then
6179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6180$as_echo "$CMP" >&6; }
6181else
6182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6183$as_echo "no" >&6; }
6184fi
6185
6186
6187          if test "x$CMP" = x; then
6188            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6189          fi
6190        else
6191          # Otherwise we believe it is a complete path. Use it as it is.
6192          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6193$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6194          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6195$as_echo_n "checking for CMP... " >&6; }
6196          if test ! -x "$tool_specified"; then
6197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6198$as_echo "not found" >&6; }
6199            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6200          fi
6201          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6202$as_echo "$tool_specified" >&6; }
6203        fi
6204      fi
6205    fi
6206
6207  fi
6208
6209
6210
6211  if test "x$CMP" = x; then
6212    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6213  fi
6214
6215
6216
6217
6218
6219  # Publish this variable in the help.
6220
6221
6222  if [ -z "${COMM+x}" ]; then
6223    # The variable is not set by user, try to locate tool using the code snippet
6224    for ac_prog in comm
6225do
6226  # Extract the first word of "$ac_prog", so it can be a program name with args.
6227set dummy $ac_prog; ac_word=$2
6228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6229$as_echo_n "checking for $ac_word... " >&6; }
6230if ${ac_cv_path_COMM+:} false; then :
6231  $as_echo_n "(cached) " >&6
6232else
6233  case $COMM in
6234  [\\/]* | ?:[\\/]*)
6235  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6236  ;;
6237  *)
6238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6239for as_dir in $PATH
6240do
6241  IFS=$as_save_IFS
6242  test -z "$as_dir" && as_dir=.
6243    for ac_exec_ext in '' $ac_executable_extensions; do
6244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6245    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6247    break 2
6248  fi
6249done
6250  done
6251IFS=$as_save_IFS
6252
6253  ;;
6254esac
6255fi
6256COMM=$ac_cv_path_COMM
6257if test -n "$COMM"; then
6258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6259$as_echo "$COMM" >&6; }
6260else
6261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6262$as_echo "no" >&6; }
6263fi
6264
6265
6266  test -n "$COMM" && break
6267done
6268
6269  else
6270    # The variable is set, but is it from the command line or the environment?
6271
6272    # Try to remove the string !COMM! from our list.
6273    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6274    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6275      # If it failed, the variable was not from the command line. Ignore it,
6276      # but warn the user (except for BASH, which is always set by the calling BASH).
6277      if test "xCOMM" != xBASH; then
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6279$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6280      fi
6281      # Try to locate tool using the code snippet
6282      for ac_prog in comm
6283do
6284  # Extract the first word of "$ac_prog", so it can be a program name with args.
6285set dummy $ac_prog; ac_word=$2
6286{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6287$as_echo_n "checking for $ac_word... " >&6; }
6288if ${ac_cv_path_COMM+:} false; then :
6289  $as_echo_n "(cached) " >&6
6290else
6291  case $COMM in
6292  [\\/]* | ?:[\\/]*)
6293  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6294  ;;
6295  *)
6296  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6297for as_dir in $PATH
6298do
6299  IFS=$as_save_IFS
6300  test -z "$as_dir" && as_dir=.
6301    for ac_exec_ext in '' $ac_executable_extensions; do
6302  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6303    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6304    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6305    break 2
6306  fi
6307done
6308  done
6309IFS=$as_save_IFS
6310
6311  ;;
6312esac
6313fi
6314COMM=$ac_cv_path_COMM
6315if test -n "$COMM"; then
6316  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6317$as_echo "$COMM" >&6; }
6318else
6319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6320$as_echo "no" >&6; }
6321fi
6322
6323
6324  test -n "$COMM" && break
6325done
6326
6327    else
6328      # If it succeeded, then it was overridden by the user. We will use it
6329      # for the tool.
6330
6331      # First remove it from the list of overridden variables, so we can test
6332      # for unknown variables in the end.
6333      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6334
6335      # Check if we try to supply an empty value
6336      if test "x$COMM" = x; then
6337        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6338$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6339        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6340$as_echo_n "checking for COMM... " >&6; }
6341        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6342$as_echo "disabled" >&6; }
6343      else
6344        # Check if the provided tool contains a complete path.
6345        tool_specified="$COMM"
6346        tool_basename="${tool_specified##*/}"
6347        if test "x$tool_basename" = "x$tool_specified"; then
6348          # A command without a complete path is provided, search $PATH.
6349          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6350$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6351          # Extract the first word of "$tool_basename", so it can be a program name with args.
6352set dummy $tool_basename; ac_word=$2
6353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6354$as_echo_n "checking for $ac_word... " >&6; }
6355if ${ac_cv_path_COMM+:} false; then :
6356  $as_echo_n "(cached) " >&6
6357else
6358  case $COMM in
6359  [\\/]* | ?:[\\/]*)
6360  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6361  ;;
6362  *)
6363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6364for as_dir in $PATH
6365do
6366  IFS=$as_save_IFS
6367  test -z "$as_dir" && as_dir=.
6368    for ac_exec_ext in '' $ac_executable_extensions; do
6369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6370    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6372    break 2
6373  fi
6374done
6375  done
6376IFS=$as_save_IFS
6377
6378  ;;
6379esac
6380fi
6381COMM=$ac_cv_path_COMM
6382if test -n "$COMM"; then
6383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6384$as_echo "$COMM" >&6; }
6385else
6386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6387$as_echo "no" >&6; }
6388fi
6389
6390
6391          if test "x$COMM" = x; then
6392            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6393          fi
6394        else
6395          # Otherwise we believe it is a complete path. Use it as it is.
6396          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6397$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6398          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6399$as_echo_n "checking for COMM... " >&6; }
6400          if test ! -x "$tool_specified"; then
6401            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6402$as_echo "not found" >&6; }
6403            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6404          fi
6405          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6406$as_echo "$tool_specified" >&6; }
6407        fi
6408      fi
6409    fi
6410
6411  fi
6412
6413
6414
6415  if test "x$COMM" = x; then
6416    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6417  fi
6418
6419
6420
6421
6422
6423  # Publish this variable in the help.
6424
6425
6426  if [ -z "${CP+x}" ]; then
6427    # The variable is not set by user, try to locate tool using the code snippet
6428    for ac_prog in cp
6429do
6430  # Extract the first word of "$ac_prog", so it can be a program name with args.
6431set dummy $ac_prog; ac_word=$2
6432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6433$as_echo_n "checking for $ac_word... " >&6; }
6434if ${ac_cv_path_CP+:} false; then :
6435  $as_echo_n "(cached) " >&6
6436else
6437  case $CP in
6438  [\\/]* | ?:[\\/]*)
6439  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6440  ;;
6441  *)
6442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6443for as_dir in $PATH
6444do
6445  IFS=$as_save_IFS
6446  test -z "$as_dir" && as_dir=.
6447    for ac_exec_ext in '' $ac_executable_extensions; do
6448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6449    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6451    break 2
6452  fi
6453done
6454  done
6455IFS=$as_save_IFS
6456
6457  ;;
6458esac
6459fi
6460CP=$ac_cv_path_CP
6461if test -n "$CP"; then
6462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6463$as_echo "$CP" >&6; }
6464else
6465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6466$as_echo "no" >&6; }
6467fi
6468
6469
6470  test -n "$CP" && break
6471done
6472
6473  else
6474    # The variable is set, but is it from the command line or the environment?
6475
6476    # Try to remove the string !CP! from our list.
6477    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6478    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6479      # If it failed, the variable was not from the command line. Ignore it,
6480      # but warn the user (except for BASH, which is always set by the calling BASH).
6481      if test "xCP" != xBASH; then
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6483$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6484      fi
6485      # Try to locate tool using the code snippet
6486      for ac_prog in cp
6487do
6488  # Extract the first word of "$ac_prog", so it can be a program name with args.
6489set dummy $ac_prog; ac_word=$2
6490{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6491$as_echo_n "checking for $ac_word... " >&6; }
6492if ${ac_cv_path_CP+:} false; then :
6493  $as_echo_n "(cached) " >&6
6494else
6495  case $CP in
6496  [\\/]* | ?:[\\/]*)
6497  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6498  ;;
6499  *)
6500  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6501for as_dir in $PATH
6502do
6503  IFS=$as_save_IFS
6504  test -z "$as_dir" && as_dir=.
6505    for ac_exec_ext in '' $ac_executable_extensions; do
6506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6507    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6509    break 2
6510  fi
6511done
6512  done
6513IFS=$as_save_IFS
6514
6515  ;;
6516esac
6517fi
6518CP=$ac_cv_path_CP
6519if test -n "$CP"; then
6520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6521$as_echo "$CP" >&6; }
6522else
6523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6524$as_echo "no" >&6; }
6525fi
6526
6527
6528  test -n "$CP" && break
6529done
6530
6531    else
6532      # If it succeeded, then it was overridden by the user. We will use it
6533      # for the tool.
6534
6535      # First remove it from the list of overridden variables, so we can test
6536      # for unknown variables in the end.
6537      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6538
6539      # Check if we try to supply an empty value
6540      if test "x$CP" = x; then
6541        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6542$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6543        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6544$as_echo_n "checking for CP... " >&6; }
6545        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6546$as_echo "disabled" >&6; }
6547      else
6548        # Check if the provided tool contains a complete path.
6549        tool_specified="$CP"
6550        tool_basename="${tool_specified##*/}"
6551        if test "x$tool_basename" = "x$tool_specified"; then
6552          # A command without a complete path is provided, search $PATH.
6553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6554$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6555          # Extract the first word of "$tool_basename", so it can be a program name with args.
6556set dummy $tool_basename; ac_word=$2
6557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6558$as_echo_n "checking for $ac_word... " >&6; }
6559if ${ac_cv_path_CP+:} false; then :
6560  $as_echo_n "(cached) " >&6
6561else
6562  case $CP in
6563  [\\/]* | ?:[\\/]*)
6564  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6565  ;;
6566  *)
6567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6568for as_dir in $PATH
6569do
6570  IFS=$as_save_IFS
6571  test -z "$as_dir" && as_dir=.
6572    for ac_exec_ext in '' $ac_executable_extensions; do
6573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6574    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6576    break 2
6577  fi
6578done
6579  done
6580IFS=$as_save_IFS
6581
6582  ;;
6583esac
6584fi
6585CP=$ac_cv_path_CP
6586if test -n "$CP"; then
6587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6588$as_echo "$CP" >&6; }
6589else
6590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6591$as_echo "no" >&6; }
6592fi
6593
6594
6595          if test "x$CP" = x; then
6596            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6597          fi
6598        else
6599          # Otherwise we believe it is a complete path. Use it as it is.
6600          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6601$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6602          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6603$as_echo_n "checking for CP... " >&6; }
6604          if test ! -x "$tool_specified"; then
6605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6606$as_echo "not found" >&6; }
6607            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6608          fi
6609          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6610$as_echo "$tool_specified" >&6; }
6611        fi
6612      fi
6613    fi
6614
6615  fi
6616
6617
6618
6619  if test "x$CP" = x; then
6620    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6621  fi
6622
6623
6624
6625
6626
6627  # Publish this variable in the help.
6628
6629
6630  if [ -z "${CUT+x}" ]; then
6631    # The variable is not set by user, try to locate tool using the code snippet
6632    for ac_prog in cut
6633do
6634  # Extract the first word of "$ac_prog", so it can be a program name with args.
6635set dummy $ac_prog; ac_word=$2
6636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6637$as_echo_n "checking for $ac_word... " >&6; }
6638if ${ac_cv_path_CUT+:} false; then :
6639  $as_echo_n "(cached) " >&6
6640else
6641  case $CUT in
6642  [\\/]* | ?:[\\/]*)
6643  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6644  ;;
6645  *)
6646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6647for as_dir in $PATH
6648do
6649  IFS=$as_save_IFS
6650  test -z "$as_dir" && as_dir=.
6651    for ac_exec_ext in '' $ac_executable_extensions; do
6652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6653    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6655    break 2
6656  fi
6657done
6658  done
6659IFS=$as_save_IFS
6660
6661  ;;
6662esac
6663fi
6664CUT=$ac_cv_path_CUT
6665if test -n "$CUT"; then
6666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6667$as_echo "$CUT" >&6; }
6668else
6669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6670$as_echo "no" >&6; }
6671fi
6672
6673
6674  test -n "$CUT" && break
6675done
6676
6677  else
6678    # The variable is set, but is it from the command line or the environment?
6679
6680    # Try to remove the string !CUT! from our list.
6681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6683      # If it failed, the variable was not from the command line. Ignore it,
6684      # but warn the user (except for BASH, which is always set by the calling BASH).
6685      if test "xCUT" != xBASH; then
6686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6687$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6688      fi
6689      # Try to locate tool using the code snippet
6690      for ac_prog in cut
6691do
6692  # Extract the first word of "$ac_prog", so it can be a program name with args.
6693set dummy $ac_prog; ac_word=$2
6694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6695$as_echo_n "checking for $ac_word... " >&6; }
6696if ${ac_cv_path_CUT+:} false; then :
6697  $as_echo_n "(cached) " >&6
6698else
6699  case $CUT in
6700  [\\/]* | ?:[\\/]*)
6701  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6702  ;;
6703  *)
6704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6705for as_dir in $PATH
6706do
6707  IFS=$as_save_IFS
6708  test -z "$as_dir" && as_dir=.
6709    for ac_exec_ext in '' $ac_executable_extensions; do
6710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6711    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6713    break 2
6714  fi
6715done
6716  done
6717IFS=$as_save_IFS
6718
6719  ;;
6720esac
6721fi
6722CUT=$ac_cv_path_CUT
6723if test -n "$CUT"; then
6724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6725$as_echo "$CUT" >&6; }
6726else
6727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6728$as_echo "no" >&6; }
6729fi
6730
6731
6732  test -n "$CUT" && break
6733done
6734
6735    else
6736      # If it succeeded, then it was overridden by the user. We will use it
6737      # for the tool.
6738
6739      # First remove it from the list of overridden variables, so we can test
6740      # for unknown variables in the end.
6741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6742
6743      # Check if we try to supply an empty value
6744      if test "x$CUT" = x; then
6745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6746$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6748$as_echo_n "checking for CUT... " >&6; }
6749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6750$as_echo "disabled" >&6; }
6751      else
6752        # Check if the provided tool contains a complete path.
6753        tool_specified="$CUT"
6754        tool_basename="${tool_specified##*/}"
6755        if test "x$tool_basename" = "x$tool_specified"; then
6756          # A command without a complete path is provided, search $PATH.
6757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6758$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6759          # Extract the first word of "$tool_basename", so it can be a program name with args.
6760set dummy $tool_basename; ac_word=$2
6761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6762$as_echo_n "checking for $ac_word... " >&6; }
6763if ${ac_cv_path_CUT+:} false; then :
6764  $as_echo_n "(cached) " >&6
6765else
6766  case $CUT in
6767  [\\/]* | ?:[\\/]*)
6768  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6769  ;;
6770  *)
6771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6772for as_dir in $PATH
6773do
6774  IFS=$as_save_IFS
6775  test -z "$as_dir" && as_dir=.
6776    for ac_exec_ext in '' $ac_executable_extensions; do
6777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6778    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6780    break 2
6781  fi
6782done
6783  done
6784IFS=$as_save_IFS
6785
6786  ;;
6787esac
6788fi
6789CUT=$ac_cv_path_CUT
6790if test -n "$CUT"; then
6791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6792$as_echo "$CUT" >&6; }
6793else
6794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6795$as_echo "no" >&6; }
6796fi
6797
6798
6799          if test "x$CUT" = x; then
6800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6801          fi
6802        else
6803          # Otherwise we believe it is a complete path. Use it as it is.
6804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6805$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6807$as_echo_n "checking for CUT... " >&6; }
6808          if test ! -x "$tool_specified"; then
6809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6810$as_echo "not found" >&6; }
6811            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6812          fi
6813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6814$as_echo "$tool_specified" >&6; }
6815        fi
6816      fi
6817    fi
6818
6819  fi
6820
6821
6822
6823  if test "x$CUT" = x; then
6824    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6825  fi
6826
6827
6828
6829
6830
6831  # Publish this variable in the help.
6832
6833
6834  if [ -z "${DATE+x}" ]; then
6835    # The variable is not set by user, try to locate tool using the code snippet
6836    for ac_prog in date
6837do
6838  # Extract the first word of "$ac_prog", so it can be a program name with args.
6839set dummy $ac_prog; ac_word=$2
6840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6841$as_echo_n "checking for $ac_word... " >&6; }
6842if ${ac_cv_path_DATE+:} false; then :
6843  $as_echo_n "(cached) " >&6
6844else
6845  case $DATE in
6846  [\\/]* | ?:[\\/]*)
6847  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6848  ;;
6849  *)
6850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6851for as_dir in $PATH
6852do
6853  IFS=$as_save_IFS
6854  test -z "$as_dir" && as_dir=.
6855    for ac_exec_ext in '' $ac_executable_extensions; do
6856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6857    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6859    break 2
6860  fi
6861done
6862  done
6863IFS=$as_save_IFS
6864
6865  ;;
6866esac
6867fi
6868DATE=$ac_cv_path_DATE
6869if test -n "$DATE"; then
6870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6871$as_echo "$DATE" >&6; }
6872else
6873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6874$as_echo "no" >&6; }
6875fi
6876
6877
6878  test -n "$DATE" && break
6879done
6880
6881  else
6882    # The variable is set, but is it from the command line or the environment?
6883
6884    # Try to remove the string !DATE! from our list.
6885    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6886    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6887      # If it failed, the variable was not from the command line. Ignore it,
6888      # but warn the user (except for BASH, which is always set by the calling BASH).
6889      if test "xDATE" != xBASH; then
6890        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6891$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6892      fi
6893      # Try to locate tool using the code snippet
6894      for ac_prog in date
6895do
6896  # Extract the first word of "$ac_prog", so it can be a program name with args.
6897set dummy $ac_prog; ac_word=$2
6898{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6899$as_echo_n "checking for $ac_word... " >&6; }
6900if ${ac_cv_path_DATE+:} false; then :
6901  $as_echo_n "(cached) " >&6
6902else
6903  case $DATE in
6904  [\\/]* | ?:[\\/]*)
6905  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6906  ;;
6907  *)
6908  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6909for as_dir in $PATH
6910do
6911  IFS=$as_save_IFS
6912  test -z "$as_dir" && as_dir=.
6913    for ac_exec_ext in '' $ac_executable_extensions; do
6914  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6915    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6916    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6917    break 2
6918  fi
6919done
6920  done
6921IFS=$as_save_IFS
6922
6923  ;;
6924esac
6925fi
6926DATE=$ac_cv_path_DATE
6927if test -n "$DATE"; then
6928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6929$as_echo "$DATE" >&6; }
6930else
6931  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6932$as_echo "no" >&6; }
6933fi
6934
6935
6936  test -n "$DATE" && break
6937done
6938
6939    else
6940      # If it succeeded, then it was overridden by the user. We will use it
6941      # for the tool.
6942
6943      # First remove it from the list of overridden variables, so we can test
6944      # for unknown variables in the end.
6945      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6946
6947      # Check if we try to supply an empty value
6948      if test "x$DATE" = x; then
6949        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6950$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6951        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6952$as_echo_n "checking for DATE... " >&6; }
6953        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6954$as_echo "disabled" >&6; }
6955      else
6956        # Check if the provided tool contains a complete path.
6957        tool_specified="$DATE"
6958        tool_basename="${tool_specified##*/}"
6959        if test "x$tool_basename" = "x$tool_specified"; then
6960          # A command without a complete path is provided, search $PATH.
6961          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6962$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6963          # Extract the first word of "$tool_basename", so it can be a program name with args.
6964set dummy $tool_basename; ac_word=$2
6965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6966$as_echo_n "checking for $ac_word... " >&6; }
6967if ${ac_cv_path_DATE+:} false; then :
6968  $as_echo_n "(cached) " >&6
6969else
6970  case $DATE in
6971  [\\/]* | ?:[\\/]*)
6972  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6973  ;;
6974  *)
6975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6976for as_dir in $PATH
6977do
6978  IFS=$as_save_IFS
6979  test -z "$as_dir" && as_dir=.
6980    for ac_exec_ext in '' $ac_executable_extensions; do
6981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6982    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6984    break 2
6985  fi
6986done
6987  done
6988IFS=$as_save_IFS
6989
6990  ;;
6991esac
6992fi
6993DATE=$ac_cv_path_DATE
6994if test -n "$DATE"; then
6995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6996$as_echo "$DATE" >&6; }
6997else
6998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6999$as_echo "no" >&6; }
7000fi
7001
7002
7003          if test "x$DATE" = x; then
7004            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7005          fi
7006        else
7007          # Otherwise we believe it is a complete path. Use it as it is.
7008          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
7009$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
7010          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
7011$as_echo_n "checking for DATE... " >&6; }
7012          if test ! -x "$tool_specified"; then
7013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7014$as_echo "not found" >&6; }
7015            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
7016          fi
7017          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7018$as_echo "$tool_specified" >&6; }
7019        fi
7020      fi
7021    fi
7022
7023  fi
7024
7025
7026
7027  if test "x$DATE" = x; then
7028    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
7029  fi
7030
7031
7032
7033
7034
7035  # Publish this variable in the help.
7036
7037
7038  if [ -z "${DIFF+x}" ]; then
7039    # The variable is not set by user, try to locate tool using the code snippet
7040    for ac_prog in gdiff diff
7041do
7042  # Extract the first word of "$ac_prog", so it can be a program name with args.
7043set dummy $ac_prog; ac_word=$2
7044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7045$as_echo_n "checking for $ac_word... " >&6; }
7046if ${ac_cv_path_DIFF+:} false; then :
7047  $as_echo_n "(cached) " >&6
7048else
7049  case $DIFF in
7050  [\\/]* | ?:[\\/]*)
7051  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7052  ;;
7053  *)
7054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7055for as_dir in $PATH
7056do
7057  IFS=$as_save_IFS
7058  test -z "$as_dir" && as_dir=.
7059    for ac_exec_ext in '' $ac_executable_extensions; do
7060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7061    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7063    break 2
7064  fi
7065done
7066  done
7067IFS=$as_save_IFS
7068
7069  ;;
7070esac
7071fi
7072DIFF=$ac_cv_path_DIFF
7073if test -n "$DIFF"; then
7074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7075$as_echo "$DIFF" >&6; }
7076else
7077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7078$as_echo "no" >&6; }
7079fi
7080
7081
7082  test -n "$DIFF" && break
7083done
7084
7085  else
7086    # The variable is set, but is it from the command line or the environment?
7087
7088    # Try to remove the string !DIFF! from our list.
7089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7091      # If it failed, the variable was not from the command line. Ignore it,
7092      # but warn the user (except for BASH, which is always set by the calling BASH).
7093      if test "xDIFF" != xBASH; then
7094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7095$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7096      fi
7097      # Try to locate tool using the code snippet
7098      for ac_prog in gdiff diff
7099do
7100  # Extract the first word of "$ac_prog", so it can be a program name with args.
7101set dummy $ac_prog; ac_word=$2
7102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7103$as_echo_n "checking for $ac_word... " >&6; }
7104if ${ac_cv_path_DIFF+:} false; then :
7105  $as_echo_n "(cached) " >&6
7106else
7107  case $DIFF in
7108  [\\/]* | ?:[\\/]*)
7109  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7110  ;;
7111  *)
7112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7113for as_dir in $PATH
7114do
7115  IFS=$as_save_IFS
7116  test -z "$as_dir" && as_dir=.
7117    for ac_exec_ext in '' $ac_executable_extensions; do
7118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7119    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7121    break 2
7122  fi
7123done
7124  done
7125IFS=$as_save_IFS
7126
7127  ;;
7128esac
7129fi
7130DIFF=$ac_cv_path_DIFF
7131if test -n "$DIFF"; then
7132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7133$as_echo "$DIFF" >&6; }
7134else
7135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7136$as_echo "no" >&6; }
7137fi
7138
7139
7140  test -n "$DIFF" && break
7141done
7142
7143    else
7144      # If it succeeded, then it was overridden by the user. We will use it
7145      # for the tool.
7146
7147      # First remove it from the list of overridden variables, so we can test
7148      # for unknown variables in the end.
7149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7150
7151      # Check if we try to supply an empty value
7152      if test "x$DIFF" = x; then
7153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7154$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7156$as_echo_n "checking for DIFF... " >&6; }
7157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7158$as_echo "disabled" >&6; }
7159      else
7160        # Check if the provided tool contains a complete path.
7161        tool_specified="$DIFF"
7162        tool_basename="${tool_specified##*/}"
7163        if test "x$tool_basename" = "x$tool_specified"; then
7164          # A command without a complete path is provided, search $PATH.
7165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7166$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7167          # Extract the first word of "$tool_basename", so it can be a program name with args.
7168set dummy $tool_basename; ac_word=$2
7169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7170$as_echo_n "checking for $ac_word... " >&6; }
7171if ${ac_cv_path_DIFF+:} false; then :
7172  $as_echo_n "(cached) " >&6
7173else
7174  case $DIFF in
7175  [\\/]* | ?:[\\/]*)
7176  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7177  ;;
7178  *)
7179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7180for as_dir in $PATH
7181do
7182  IFS=$as_save_IFS
7183  test -z "$as_dir" && as_dir=.
7184    for ac_exec_ext in '' $ac_executable_extensions; do
7185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7186    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7188    break 2
7189  fi
7190done
7191  done
7192IFS=$as_save_IFS
7193
7194  ;;
7195esac
7196fi
7197DIFF=$ac_cv_path_DIFF
7198if test -n "$DIFF"; then
7199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7200$as_echo "$DIFF" >&6; }
7201else
7202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7203$as_echo "no" >&6; }
7204fi
7205
7206
7207          if test "x$DIFF" = x; then
7208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7209          fi
7210        else
7211          # Otherwise we believe it is a complete path. Use it as it is.
7212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7213$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7215$as_echo_n "checking for DIFF... " >&6; }
7216          if test ! -x "$tool_specified"; then
7217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7218$as_echo "not found" >&6; }
7219            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7220          fi
7221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7222$as_echo "$tool_specified" >&6; }
7223        fi
7224      fi
7225    fi
7226
7227  fi
7228
7229
7230
7231  if test "x$DIFF" = x; then
7232    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7233  fi
7234
7235
7236
7237
7238
7239  # Publish this variable in the help.
7240
7241
7242  if [ -z "${DIRNAME+x}" ]; then
7243    # The variable is not set by user, try to locate tool using the code snippet
7244    for ac_prog in dirname
7245do
7246  # Extract the first word of "$ac_prog", so it can be a program name with args.
7247set dummy $ac_prog; ac_word=$2
7248{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7249$as_echo_n "checking for $ac_word... " >&6; }
7250if ${ac_cv_path_DIRNAME+:} false; then :
7251  $as_echo_n "(cached) " >&6
7252else
7253  case $DIRNAME in
7254  [\\/]* | ?:[\\/]*)
7255  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7256  ;;
7257  *)
7258  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7259for as_dir in $PATH
7260do
7261  IFS=$as_save_IFS
7262  test -z "$as_dir" && as_dir=.
7263    for ac_exec_ext in '' $ac_executable_extensions; do
7264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7265    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7267    break 2
7268  fi
7269done
7270  done
7271IFS=$as_save_IFS
7272
7273  ;;
7274esac
7275fi
7276DIRNAME=$ac_cv_path_DIRNAME
7277if test -n "$DIRNAME"; then
7278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7279$as_echo "$DIRNAME" >&6; }
7280else
7281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7282$as_echo "no" >&6; }
7283fi
7284
7285
7286  test -n "$DIRNAME" && break
7287done
7288
7289  else
7290    # The variable is set, but is it from the command line or the environment?
7291
7292    # Try to remove the string !DIRNAME! from our list.
7293    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7294    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7295      # If it failed, the variable was not from the command line. Ignore it,
7296      # but warn the user (except for BASH, which is always set by the calling BASH).
7297      if test "xDIRNAME" != xBASH; then
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7299$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7300      fi
7301      # Try to locate tool using the code snippet
7302      for ac_prog in dirname
7303do
7304  # Extract the first word of "$ac_prog", so it can be a program name with args.
7305set dummy $ac_prog; ac_word=$2
7306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7307$as_echo_n "checking for $ac_word... " >&6; }
7308if ${ac_cv_path_DIRNAME+:} false; then :
7309  $as_echo_n "(cached) " >&6
7310else
7311  case $DIRNAME in
7312  [\\/]* | ?:[\\/]*)
7313  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7314  ;;
7315  *)
7316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7317for as_dir in $PATH
7318do
7319  IFS=$as_save_IFS
7320  test -z "$as_dir" && as_dir=.
7321    for ac_exec_ext in '' $ac_executable_extensions; do
7322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7323    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7325    break 2
7326  fi
7327done
7328  done
7329IFS=$as_save_IFS
7330
7331  ;;
7332esac
7333fi
7334DIRNAME=$ac_cv_path_DIRNAME
7335if test -n "$DIRNAME"; then
7336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7337$as_echo "$DIRNAME" >&6; }
7338else
7339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7340$as_echo "no" >&6; }
7341fi
7342
7343
7344  test -n "$DIRNAME" && break
7345done
7346
7347    else
7348      # If it succeeded, then it was overridden by the user. We will use it
7349      # for the tool.
7350
7351      # First remove it from the list of overridden variables, so we can test
7352      # for unknown variables in the end.
7353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7354
7355      # Check if we try to supply an empty value
7356      if test "x$DIRNAME" = x; then
7357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7358$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7360$as_echo_n "checking for DIRNAME... " >&6; }
7361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7362$as_echo "disabled" >&6; }
7363      else
7364        # Check if the provided tool contains a complete path.
7365        tool_specified="$DIRNAME"
7366        tool_basename="${tool_specified##*/}"
7367        if test "x$tool_basename" = "x$tool_specified"; then
7368          # A command without a complete path is provided, search $PATH.
7369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7370$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7371          # Extract the first word of "$tool_basename", so it can be a program name with args.
7372set dummy $tool_basename; ac_word=$2
7373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7374$as_echo_n "checking for $ac_word... " >&6; }
7375if ${ac_cv_path_DIRNAME+:} false; then :
7376  $as_echo_n "(cached) " >&6
7377else
7378  case $DIRNAME in
7379  [\\/]* | ?:[\\/]*)
7380  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7381  ;;
7382  *)
7383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7384for as_dir in $PATH
7385do
7386  IFS=$as_save_IFS
7387  test -z "$as_dir" && as_dir=.
7388    for ac_exec_ext in '' $ac_executable_extensions; do
7389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7390    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7392    break 2
7393  fi
7394done
7395  done
7396IFS=$as_save_IFS
7397
7398  ;;
7399esac
7400fi
7401DIRNAME=$ac_cv_path_DIRNAME
7402if test -n "$DIRNAME"; then
7403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7404$as_echo "$DIRNAME" >&6; }
7405else
7406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7407$as_echo "no" >&6; }
7408fi
7409
7410
7411          if test "x$DIRNAME" = x; then
7412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7413          fi
7414        else
7415          # Otherwise we believe it is a complete path. Use it as it is.
7416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7417$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7419$as_echo_n "checking for DIRNAME... " >&6; }
7420          if test ! -x "$tool_specified"; then
7421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7422$as_echo "not found" >&6; }
7423            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7424          fi
7425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7426$as_echo "$tool_specified" >&6; }
7427        fi
7428      fi
7429    fi
7430
7431  fi
7432
7433
7434
7435  if test "x$DIRNAME" = x; then
7436    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7437  fi
7438
7439
7440
7441
7442
7443  # Publish this variable in the help.
7444
7445
7446  if [ -z "${ECHO+x}" ]; then
7447    # The variable is not set by user, try to locate tool using the code snippet
7448    for ac_prog in echo
7449do
7450  # Extract the first word of "$ac_prog", so it can be a program name with args.
7451set dummy $ac_prog; ac_word=$2
7452{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7453$as_echo_n "checking for $ac_word... " >&6; }
7454if ${ac_cv_path_ECHO+:} false; then :
7455  $as_echo_n "(cached) " >&6
7456else
7457  case $ECHO in
7458  [\\/]* | ?:[\\/]*)
7459  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7460  ;;
7461  *)
7462  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7463for as_dir in $PATH
7464do
7465  IFS=$as_save_IFS
7466  test -z "$as_dir" && as_dir=.
7467    for ac_exec_ext in '' $ac_executable_extensions; do
7468  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7469    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7470    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7471    break 2
7472  fi
7473done
7474  done
7475IFS=$as_save_IFS
7476
7477  ;;
7478esac
7479fi
7480ECHO=$ac_cv_path_ECHO
7481if test -n "$ECHO"; then
7482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7483$as_echo "$ECHO" >&6; }
7484else
7485  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7486$as_echo "no" >&6; }
7487fi
7488
7489
7490  test -n "$ECHO" && break
7491done
7492
7493  else
7494    # The variable is set, but is it from the command line or the environment?
7495
7496    # Try to remove the string !ECHO! from our list.
7497    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7498    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7499      # If it failed, the variable was not from the command line. Ignore it,
7500      # but warn the user (except for BASH, which is always set by the calling BASH).
7501      if test "xECHO" != xBASH; then
7502        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7503$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7504      fi
7505      # Try to locate tool using the code snippet
7506      for ac_prog in echo
7507do
7508  # Extract the first word of "$ac_prog", so it can be a program name with args.
7509set dummy $ac_prog; ac_word=$2
7510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7511$as_echo_n "checking for $ac_word... " >&6; }
7512if ${ac_cv_path_ECHO+:} false; then :
7513  $as_echo_n "(cached) " >&6
7514else
7515  case $ECHO in
7516  [\\/]* | ?:[\\/]*)
7517  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7518  ;;
7519  *)
7520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7521for as_dir in $PATH
7522do
7523  IFS=$as_save_IFS
7524  test -z "$as_dir" && as_dir=.
7525    for ac_exec_ext in '' $ac_executable_extensions; do
7526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7527    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7529    break 2
7530  fi
7531done
7532  done
7533IFS=$as_save_IFS
7534
7535  ;;
7536esac
7537fi
7538ECHO=$ac_cv_path_ECHO
7539if test -n "$ECHO"; then
7540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7541$as_echo "$ECHO" >&6; }
7542else
7543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7544$as_echo "no" >&6; }
7545fi
7546
7547
7548  test -n "$ECHO" && break
7549done
7550
7551    else
7552      # If it succeeded, then it was overridden by the user. We will use it
7553      # for the tool.
7554
7555      # First remove it from the list of overridden variables, so we can test
7556      # for unknown variables in the end.
7557      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7558
7559      # Check if we try to supply an empty value
7560      if test "x$ECHO" = x; then
7561        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7562$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7563        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7564$as_echo_n "checking for ECHO... " >&6; }
7565        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7566$as_echo "disabled" >&6; }
7567      else
7568        # Check if the provided tool contains a complete path.
7569        tool_specified="$ECHO"
7570        tool_basename="${tool_specified##*/}"
7571        if test "x$tool_basename" = "x$tool_specified"; then
7572          # A command without a complete path is provided, search $PATH.
7573          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7574$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7575          # Extract the first word of "$tool_basename", so it can be a program name with args.
7576set dummy $tool_basename; ac_word=$2
7577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7578$as_echo_n "checking for $ac_word... " >&6; }
7579if ${ac_cv_path_ECHO+:} false; then :
7580  $as_echo_n "(cached) " >&6
7581else
7582  case $ECHO in
7583  [\\/]* | ?:[\\/]*)
7584  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7585  ;;
7586  *)
7587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7588for as_dir in $PATH
7589do
7590  IFS=$as_save_IFS
7591  test -z "$as_dir" && as_dir=.
7592    for ac_exec_ext in '' $ac_executable_extensions; do
7593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7594    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7596    break 2
7597  fi
7598done
7599  done
7600IFS=$as_save_IFS
7601
7602  ;;
7603esac
7604fi
7605ECHO=$ac_cv_path_ECHO
7606if test -n "$ECHO"; then
7607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7608$as_echo "$ECHO" >&6; }
7609else
7610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7611$as_echo "no" >&6; }
7612fi
7613
7614
7615          if test "x$ECHO" = x; then
7616            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7617          fi
7618        else
7619          # Otherwise we believe it is a complete path. Use it as it is.
7620          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7621$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7622          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7623$as_echo_n "checking for ECHO... " >&6; }
7624          if test ! -x "$tool_specified"; then
7625            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7626$as_echo "not found" >&6; }
7627            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7628          fi
7629          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7630$as_echo "$tool_specified" >&6; }
7631        fi
7632      fi
7633    fi
7634
7635  fi
7636
7637
7638
7639  if test "x$ECHO" = x; then
7640    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7641  fi
7642
7643
7644
7645
7646
7647  # Publish this variable in the help.
7648
7649
7650  if [ -z "${EXPR+x}" ]; then
7651    # The variable is not set by user, try to locate tool using the code snippet
7652    for ac_prog in expr
7653do
7654  # Extract the first word of "$ac_prog", so it can be a program name with args.
7655set dummy $ac_prog; ac_word=$2
7656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7657$as_echo_n "checking for $ac_word... " >&6; }
7658if ${ac_cv_path_EXPR+:} false; then :
7659  $as_echo_n "(cached) " >&6
7660else
7661  case $EXPR in
7662  [\\/]* | ?:[\\/]*)
7663  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7664  ;;
7665  *)
7666  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7667for as_dir in $PATH
7668do
7669  IFS=$as_save_IFS
7670  test -z "$as_dir" && as_dir=.
7671    for ac_exec_ext in '' $ac_executable_extensions; do
7672  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7673    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7674    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7675    break 2
7676  fi
7677done
7678  done
7679IFS=$as_save_IFS
7680
7681  ;;
7682esac
7683fi
7684EXPR=$ac_cv_path_EXPR
7685if test -n "$EXPR"; then
7686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7687$as_echo "$EXPR" >&6; }
7688else
7689  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7690$as_echo "no" >&6; }
7691fi
7692
7693
7694  test -n "$EXPR" && break
7695done
7696
7697  else
7698    # The variable is set, but is it from the command line or the environment?
7699
7700    # Try to remove the string !EXPR! from our list.
7701    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7702    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7703      # If it failed, the variable was not from the command line. Ignore it,
7704      # but warn the user (except for BASH, which is always set by the calling BASH).
7705      if test "xEXPR" != xBASH; then
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7707$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7708      fi
7709      # Try to locate tool using the code snippet
7710      for ac_prog in expr
7711do
7712  # Extract the first word of "$ac_prog", so it can be a program name with args.
7713set dummy $ac_prog; ac_word=$2
7714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7715$as_echo_n "checking for $ac_word... " >&6; }
7716if ${ac_cv_path_EXPR+:} false; then :
7717  $as_echo_n "(cached) " >&6
7718else
7719  case $EXPR in
7720  [\\/]* | ?:[\\/]*)
7721  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7722  ;;
7723  *)
7724  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7725for as_dir in $PATH
7726do
7727  IFS=$as_save_IFS
7728  test -z "$as_dir" && as_dir=.
7729    for ac_exec_ext in '' $ac_executable_extensions; do
7730  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7731    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7732    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7733    break 2
7734  fi
7735done
7736  done
7737IFS=$as_save_IFS
7738
7739  ;;
7740esac
7741fi
7742EXPR=$ac_cv_path_EXPR
7743if test -n "$EXPR"; then
7744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7745$as_echo "$EXPR" >&6; }
7746else
7747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7748$as_echo "no" >&6; }
7749fi
7750
7751
7752  test -n "$EXPR" && break
7753done
7754
7755    else
7756      # If it succeeded, then it was overridden by the user. We will use it
7757      # for the tool.
7758
7759      # First remove it from the list of overridden variables, so we can test
7760      # for unknown variables in the end.
7761      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7762
7763      # Check if we try to supply an empty value
7764      if test "x$EXPR" = x; then
7765        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7766$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7767        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7768$as_echo_n "checking for EXPR... " >&6; }
7769        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7770$as_echo "disabled" >&6; }
7771      else
7772        # Check if the provided tool contains a complete path.
7773        tool_specified="$EXPR"
7774        tool_basename="${tool_specified##*/}"
7775        if test "x$tool_basename" = "x$tool_specified"; then
7776          # A command without a complete path is provided, search $PATH.
7777          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7778$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7779          # Extract the first word of "$tool_basename", so it can be a program name with args.
7780set dummy $tool_basename; ac_word=$2
7781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7782$as_echo_n "checking for $ac_word... " >&6; }
7783if ${ac_cv_path_EXPR+:} false; then :
7784  $as_echo_n "(cached) " >&6
7785else
7786  case $EXPR in
7787  [\\/]* | ?:[\\/]*)
7788  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7789  ;;
7790  *)
7791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7792for as_dir in $PATH
7793do
7794  IFS=$as_save_IFS
7795  test -z "$as_dir" && as_dir=.
7796    for ac_exec_ext in '' $ac_executable_extensions; do
7797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7798    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7800    break 2
7801  fi
7802done
7803  done
7804IFS=$as_save_IFS
7805
7806  ;;
7807esac
7808fi
7809EXPR=$ac_cv_path_EXPR
7810if test -n "$EXPR"; then
7811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7812$as_echo "$EXPR" >&6; }
7813else
7814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7815$as_echo "no" >&6; }
7816fi
7817
7818
7819          if test "x$EXPR" = x; then
7820            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7821          fi
7822        else
7823          # Otherwise we believe it is a complete path. Use it as it is.
7824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7825$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7826          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7827$as_echo_n "checking for EXPR... " >&6; }
7828          if test ! -x "$tool_specified"; then
7829            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7830$as_echo "not found" >&6; }
7831            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7832          fi
7833          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7834$as_echo "$tool_specified" >&6; }
7835        fi
7836      fi
7837    fi
7838
7839  fi
7840
7841
7842
7843  if test "x$EXPR" = x; then
7844    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7845  fi
7846
7847
7848
7849
7850
7851  # Publish this variable in the help.
7852
7853
7854  if [ -z "${FILE+x}" ]; then
7855    # The variable is not set by user, try to locate tool using the code snippet
7856    for ac_prog in file
7857do
7858  # Extract the first word of "$ac_prog", so it can be a program name with args.
7859set dummy $ac_prog; ac_word=$2
7860{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7861$as_echo_n "checking for $ac_word... " >&6; }
7862if ${ac_cv_path_FILE+:} false; then :
7863  $as_echo_n "(cached) " >&6
7864else
7865  case $FILE in
7866  [\\/]* | ?:[\\/]*)
7867  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7868  ;;
7869  *)
7870  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7871for as_dir in $PATH
7872do
7873  IFS=$as_save_IFS
7874  test -z "$as_dir" && as_dir=.
7875    for ac_exec_ext in '' $ac_executable_extensions; do
7876  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7877    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7878    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7879    break 2
7880  fi
7881done
7882  done
7883IFS=$as_save_IFS
7884
7885  ;;
7886esac
7887fi
7888FILE=$ac_cv_path_FILE
7889if test -n "$FILE"; then
7890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7891$as_echo "$FILE" >&6; }
7892else
7893  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7894$as_echo "no" >&6; }
7895fi
7896
7897
7898  test -n "$FILE" && break
7899done
7900
7901  else
7902    # The variable is set, but is it from the command line or the environment?
7903
7904    # Try to remove the string !FILE! from our list.
7905    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7906    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7907      # If it failed, the variable was not from the command line. Ignore it,
7908      # but warn the user (except for BASH, which is always set by the calling BASH).
7909      if test "xFILE" != xBASH; then
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7911$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7912      fi
7913      # Try to locate tool using the code snippet
7914      for ac_prog in file
7915do
7916  # Extract the first word of "$ac_prog", so it can be a program name with args.
7917set dummy $ac_prog; ac_word=$2
7918{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7919$as_echo_n "checking for $ac_word... " >&6; }
7920if ${ac_cv_path_FILE+:} false; then :
7921  $as_echo_n "(cached) " >&6
7922else
7923  case $FILE in
7924  [\\/]* | ?:[\\/]*)
7925  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7926  ;;
7927  *)
7928  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7929for as_dir in $PATH
7930do
7931  IFS=$as_save_IFS
7932  test -z "$as_dir" && as_dir=.
7933    for ac_exec_ext in '' $ac_executable_extensions; do
7934  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7935    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7936    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7937    break 2
7938  fi
7939done
7940  done
7941IFS=$as_save_IFS
7942
7943  ;;
7944esac
7945fi
7946FILE=$ac_cv_path_FILE
7947if test -n "$FILE"; then
7948  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7949$as_echo "$FILE" >&6; }
7950else
7951  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7952$as_echo "no" >&6; }
7953fi
7954
7955
7956  test -n "$FILE" && break
7957done
7958
7959    else
7960      # If it succeeded, then it was overridden by the user. We will use it
7961      # for the tool.
7962
7963      # First remove it from the list of overridden variables, so we can test
7964      # for unknown variables in the end.
7965      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7966
7967      # Check if we try to supply an empty value
7968      if test "x$FILE" = x; then
7969        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7970$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7971        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7972$as_echo_n "checking for FILE... " >&6; }
7973        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7974$as_echo "disabled" >&6; }
7975      else
7976        # Check if the provided tool contains a complete path.
7977        tool_specified="$FILE"
7978        tool_basename="${tool_specified##*/}"
7979        if test "x$tool_basename" = "x$tool_specified"; then
7980          # A command without a complete path is provided, search $PATH.
7981          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7982$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7983          # Extract the first word of "$tool_basename", so it can be a program name with args.
7984set dummy $tool_basename; ac_word=$2
7985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7986$as_echo_n "checking for $ac_word... " >&6; }
7987if ${ac_cv_path_FILE+:} false; then :
7988  $as_echo_n "(cached) " >&6
7989else
7990  case $FILE in
7991  [\\/]* | ?:[\\/]*)
7992  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7993  ;;
7994  *)
7995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7996for as_dir in $PATH
7997do
7998  IFS=$as_save_IFS
7999  test -z "$as_dir" && as_dir=.
8000    for ac_exec_ext in '' $ac_executable_extensions; do
8001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8002    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
8003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8004    break 2
8005  fi
8006done
8007  done
8008IFS=$as_save_IFS
8009
8010  ;;
8011esac
8012fi
8013FILE=$ac_cv_path_FILE
8014if test -n "$FILE"; then
8015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
8016$as_echo "$FILE" >&6; }
8017else
8018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8019$as_echo "no" >&6; }
8020fi
8021
8022
8023          if test "x$FILE" = x; then
8024            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8025          fi
8026        else
8027          # Otherwise we believe it is a complete path. Use it as it is.
8028          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
8029$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
8030          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
8031$as_echo_n "checking for FILE... " >&6; }
8032          if test ! -x "$tool_specified"; then
8033            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8034$as_echo "not found" >&6; }
8035            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
8036          fi
8037          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8038$as_echo "$tool_specified" >&6; }
8039        fi
8040      fi
8041    fi
8042
8043  fi
8044
8045
8046
8047  if test "x$FILE" = x; then
8048    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8049  fi
8050
8051
8052
8053
8054
8055  # Publish this variable in the help.
8056
8057
8058  if [ -z "${FIND+x}" ]; then
8059    # The variable is not set by user, try to locate tool using the code snippet
8060    for ac_prog in find
8061do
8062  # Extract the first word of "$ac_prog", so it can be a program name with args.
8063set dummy $ac_prog; ac_word=$2
8064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8065$as_echo_n "checking for $ac_word... " >&6; }
8066if ${ac_cv_path_FIND+:} false; then :
8067  $as_echo_n "(cached) " >&6
8068else
8069  case $FIND in
8070  [\\/]* | ?:[\\/]*)
8071  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8072  ;;
8073  *)
8074  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8075for as_dir in $PATH
8076do
8077  IFS=$as_save_IFS
8078  test -z "$as_dir" && as_dir=.
8079    for ac_exec_ext in '' $ac_executable_extensions; do
8080  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8081    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8082    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8083    break 2
8084  fi
8085done
8086  done
8087IFS=$as_save_IFS
8088
8089  ;;
8090esac
8091fi
8092FIND=$ac_cv_path_FIND
8093if test -n "$FIND"; then
8094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8095$as_echo "$FIND" >&6; }
8096else
8097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8098$as_echo "no" >&6; }
8099fi
8100
8101
8102  test -n "$FIND" && break
8103done
8104
8105  else
8106    # The variable is set, but is it from the command line or the environment?
8107
8108    # Try to remove the string !FIND! from our list.
8109    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8110    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8111      # If it failed, the variable was not from the command line. Ignore it,
8112      # but warn the user (except for BASH, which is always set by the calling BASH).
8113      if test "xFIND" != xBASH; then
8114        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8115$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8116      fi
8117      # Try to locate tool using the code snippet
8118      for ac_prog in find
8119do
8120  # Extract the first word of "$ac_prog", so it can be a program name with args.
8121set dummy $ac_prog; ac_word=$2
8122{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8123$as_echo_n "checking for $ac_word... " >&6; }
8124if ${ac_cv_path_FIND+:} false; then :
8125  $as_echo_n "(cached) " >&6
8126else
8127  case $FIND in
8128  [\\/]* | ?:[\\/]*)
8129  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8130  ;;
8131  *)
8132  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8133for as_dir in $PATH
8134do
8135  IFS=$as_save_IFS
8136  test -z "$as_dir" && as_dir=.
8137    for ac_exec_ext in '' $ac_executable_extensions; do
8138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8139    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8141    break 2
8142  fi
8143done
8144  done
8145IFS=$as_save_IFS
8146
8147  ;;
8148esac
8149fi
8150FIND=$ac_cv_path_FIND
8151if test -n "$FIND"; then
8152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8153$as_echo "$FIND" >&6; }
8154else
8155  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8156$as_echo "no" >&6; }
8157fi
8158
8159
8160  test -n "$FIND" && break
8161done
8162
8163    else
8164      # If it succeeded, then it was overridden by the user. We will use it
8165      # for the tool.
8166
8167      # First remove it from the list of overridden variables, so we can test
8168      # for unknown variables in the end.
8169      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8170
8171      # Check if we try to supply an empty value
8172      if test "x$FIND" = x; then
8173        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8174$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8175        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8176$as_echo_n "checking for FIND... " >&6; }
8177        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8178$as_echo "disabled" >&6; }
8179      else
8180        # Check if the provided tool contains a complete path.
8181        tool_specified="$FIND"
8182        tool_basename="${tool_specified##*/}"
8183        if test "x$tool_basename" = "x$tool_specified"; then
8184          # A command without a complete path is provided, search $PATH.
8185          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8186$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8187          # Extract the first word of "$tool_basename", so it can be a program name with args.
8188set dummy $tool_basename; ac_word=$2
8189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8190$as_echo_n "checking for $ac_word... " >&6; }
8191if ${ac_cv_path_FIND+:} false; then :
8192  $as_echo_n "(cached) " >&6
8193else
8194  case $FIND in
8195  [\\/]* | ?:[\\/]*)
8196  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8197  ;;
8198  *)
8199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8200for as_dir in $PATH
8201do
8202  IFS=$as_save_IFS
8203  test -z "$as_dir" && as_dir=.
8204    for ac_exec_ext in '' $ac_executable_extensions; do
8205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8206    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8208    break 2
8209  fi
8210done
8211  done
8212IFS=$as_save_IFS
8213
8214  ;;
8215esac
8216fi
8217FIND=$ac_cv_path_FIND
8218if test -n "$FIND"; then
8219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8220$as_echo "$FIND" >&6; }
8221else
8222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8223$as_echo "no" >&6; }
8224fi
8225
8226
8227          if test "x$FIND" = x; then
8228            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8229          fi
8230        else
8231          # Otherwise we believe it is a complete path. Use it as it is.
8232          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8233$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8234          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8235$as_echo_n "checking for FIND... " >&6; }
8236          if test ! -x "$tool_specified"; then
8237            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8238$as_echo "not found" >&6; }
8239            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8240          fi
8241          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8242$as_echo "$tool_specified" >&6; }
8243        fi
8244      fi
8245    fi
8246
8247  fi
8248
8249
8250
8251  if test "x$FIND" = x; then
8252    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8253  fi
8254
8255
8256
8257
8258
8259  # Publish this variable in the help.
8260
8261
8262  if [ -z "${HEAD+x}" ]; then
8263    # The variable is not set by user, try to locate tool using the code snippet
8264    for ac_prog in head
8265do
8266  # Extract the first word of "$ac_prog", so it can be a program name with args.
8267set dummy $ac_prog; ac_word=$2
8268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8269$as_echo_n "checking for $ac_word... " >&6; }
8270if ${ac_cv_path_HEAD+:} false; then :
8271  $as_echo_n "(cached) " >&6
8272else
8273  case $HEAD in
8274  [\\/]* | ?:[\\/]*)
8275  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8276  ;;
8277  *)
8278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8279for as_dir in $PATH
8280do
8281  IFS=$as_save_IFS
8282  test -z "$as_dir" && as_dir=.
8283    for ac_exec_ext in '' $ac_executable_extensions; do
8284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8285    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8287    break 2
8288  fi
8289done
8290  done
8291IFS=$as_save_IFS
8292
8293  ;;
8294esac
8295fi
8296HEAD=$ac_cv_path_HEAD
8297if test -n "$HEAD"; then
8298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8299$as_echo "$HEAD" >&6; }
8300else
8301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8302$as_echo "no" >&6; }
8303fi
8304
8305
8306  test -n "$HEAD" && break
8307done
8308
8309  else
8310    # The variable is set, but is it from the command line or the environment?
8311
8312    # Try to remove the string !HEAD! from our list.
8313    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8314    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8315      # If it failed, the variable was not from the command line. Ignore it,
8316      # but warn the user (except for BASH, which is always set by the calling BASH).
8317      if test "xHEAD" != xBASH; then
8318        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8319$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8320      fi
8321      # Try to locate tool using the code snippet
8322      for ac_prog in head
8323do
8324  # Extract the first word of "$ac_prog", so it can be a program name with args.
8325set dummy $ac_prog; ac_word=$2
8326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8327$as_echo_n "checking for $ac_word... " >&6; }
8328if ${ac_cv_path_HEAD+:} false; then :
8329  $as_echo_n "(cached) " >&6
8330else
8331  case $HEAD in
8332  [\\/]* | ?:[\\/]*)
8333  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8334  ;;
8335  *)
8336  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8337for as_dir in $PATH
8338do
8339  IFS=$as_save_IFS
8340  test -z "$as_dir" && as_dir=.
8341    for ac_exec_ext in '' $ac_executable_extensions; do
8342  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8343    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8344    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8345    break 2
8346  fi
8347done
8348  done
8349IFS=$as_save_IFS
8350
8351  ;;
8352esac
8353fi
8354HEAD=$ac_cv_path_HEAD
8355if test -n "$HEAD"; then
8356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8357$as_echo "$HEAD" >&6; }
8358else
8359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8360$as_echo "no" >&6; }
8361fi
8362
8363
8364  test -n "$HEAD" && break
8365done
8366
8367    else
8368      # If it succeeded, then it was overridden by the user. We will use it
8369      # for the tool.
8370
8371      # First remove it from the list of overridden variables, so we can test
8372      # for unknown variables in the end.
8373      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8374
8375      # Check if we try to supply an empty value
8376      if test "x$HEAD" = x; then
8377        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8378$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8379        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8380$as_echo_n "checking for HEAD... " >&6; }
8381        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8382$as_echo "disabled" >&6; }
8383      else
8384        # Check if the provided tool contains a complete path.
8385        tool_specified="$HEAD"
8386        tool_basename="${tool_specified##*/}"
8387        if test "x$tool_basename" = "x$tool_specified"; then
8388          # A command without a complete path is provided, search $PATH.
8389          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8390$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8391          # Extract the first word of "$tool_basename", so it can be a program name with args.
8392set dummy $tool_basename; ac_word=$2
8393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8394$as_echo_n "checking for $ac_word... " >&6; }
8395if ${ac_cv_path_HEAD+:} false; then :
8396  $as_echo_n "(cached) " >&6
8397else
8398  case $HEAD in
8399  [\\/]* | ?:[\\/]*)
8400  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8401  ;;
8402  *)
8403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8404for as_dir in $PATH
8405do
8406  IFS=$as_save_IFS
8407  test -z "$as_dir" && as_dir=.
8408    for ac_exec_ext in '' $ac_executable_extensions; do
8409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8410    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8412    break 2
8413  fi
8414done
8415  done
8416IFS=$as_save_IFS
8417
8418  ;;
8419esac
8420fi
8421HEAD=$ac_cv_path_HEAD
8422if test -n "$HEAD"; then
8423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8424$as_echo "$HEAD" >&6; }
8425else
8426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8427$as_echo "no" >&6; }
8428fi
8429
8430
8431          if test "x$HEAD" = x; then
8432            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8433          fi
8434        else
8435          # Otherwise we believe it is a complete path. Use it as it is.
8436          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8437$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8438          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8439$as_echo_n "checking for HEAD... " >&6; }
8440          if test ! -x "$tool_specified"; then
8441            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8442$as_echo "not found" >&6; }
8443            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8444          fi
8445          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8446$as_echo "$tool_specified" >&6; }
8447        fi
8448      fi
8449    fi
8450
8451  fi
8452
8453
8454
8455  if test "x$HEAD" = x; then
8456    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8457  fi
8458
8459
8460
8461
8462
8463  # Publish this variable in the help.
8464
8465
8466  if [ -z "${GUNZIP+x}" ]; then
8467    # The variable is not set by user, try to locate tool using the code snippet
8468    for ac_prog in gunzip
8469do
8470  # Extract the first word of "$ac_prog", so it can be a program name with args.
8471set dummy $ac_prog; ac_word=$2
8472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8473$as_echo_n "checking for $ac_word... " >&6; }
8474if ${ac_cv_path_GUNZIP+:} false; then :
8475  $as_echo_n "(cached) " >&6
8476else
8477  case $GUNZIP in
8478  [\\/]* | ?:[\\/]*)
8479  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8480  ;;
8481  *)
8482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8483for as_dir in $PATH
8484do
8485  IFS=$as_save_IFS
8486  test -z "$as_dir" && as_dir=.
8487    for ac_exec_ext in '' $ac_executable_extensions; do
8488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8489    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8491    break 2
8492  fi
8493done
8494  done
8495IFS=$as_save_IFS
8496
8497  ;;
8498esac
8499fi
8500GUNZIP=$ac_cv_path_GUNZIP
8501if test -n "$GUNZIP"; then
8502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8503$as_echo "$GUNZIP" >&6; }
8504else
8505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8506$as_echo "no" >&6; }
8507fi
8508
8509
8510  test -n "$GUNZIP" && break
8511done
8512
8513  else
8514    # The variable is set, but is it from the command line or the environment?
8515
8516    # Try to remove the string !GUNZIP! from our list.
8517    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8518    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8519      # If it failed, the variable was not from the command line. Ignore it,
8520      # but warn the user (except for BASH, which is always set by the calling BASH).
8521      if test "xGUNZIP" != xBASH; then
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8523$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8524      fi
8525      # Try to locate tool using the code snippet
8526      for ac_prog in gunzip
8527do
8528  # Extract the first word of "$ac_prog", so it can be a program name with args.
8529set dummy $ac_prog; ac_word=$2
8530{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8531$as_echo_n "checking for $ac_word... " >&6; }
8532if ${ac_cv_path_GUNZIP+:} false; then :
8533  $as_echo_n "(cached) " >&6
8534else
8535  case $GUNZIP in
8536  [\\/]* | ?:[\\/]*)
8537  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8538  ;;
8539  *)
8540  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8541for as_dir in $PATH
8542do
8543  IFS=$as_save_IFS
8544  test -z "$as_dir" && as_dir=.
8545    for ac_exec_ext in '' $ac_executable_extensions; do
8546  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8547    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8548    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8549    break 2
8550  fi
8551done
8552  done
8553IFS=$as_save_IFS
8554
8555  ;;
8556esac
8557fi
8558GUNZIP=$ac_cv_path_GUNZIP
8559if test -n "$GUNZIP"; then
8560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8561$as_echo "$GUNZIP" >&6; }
8562else
8563  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8564$as_echo "no" >&6; }
8565fi
8566
8567
8568  test -n "$GUNZIP" && break
8569done
8570
8571    else
8572      # If it succeeded, then it was overridden by the user. We will use it
8573      # for the tool.
8574
8575      # First remove it from the list of overridden variables, so we can test
8576      # for unknown variables in the end.
8577      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8578
8579      # Check if we try to supply an empty value
8580      if test "x$GUNZIP" = x; then
8581        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8582$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8583        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8584$as_echo_n "checking for GUNZIP... " >&6; }
8585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8586$as_echo "disabled" >&6; }
8587      else
8588        # Check if the provided tool contains a complete path.
8589        tool_specified="$GUNZIP"
8590        tool_basename="${tool_specified##*/}"
8591        if test "x$tool_basename" = "x$tool_specified"; then
8592          # A command without a complete path is provided, search $PATH.
8593          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8594$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8595          # Extract the first word of "$tool_basename", so it can be a program name with args.
8596set dummy $tool_basename; ac_word=$2
8597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8598$as_echo_n "checking for $ac_word... " >&6; }
8599if ${ac_cv_path_GUNZIP+:} false; then :
8600  $as_echo_n "(cached) " >&6
8601else
8602  case $GUNZIP in
8603  [\\/]* | ?:[\\/]*)
8604  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8605  ;;
8606  *)
8607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8608for as_dir in $PATH
8609do
8610  IFS=$as_save_IFS
8611  test -z "$as_dir" && as_dir=.
8612    for ac_exec_ext in '' $ac_executable_extensions; do
8613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8614    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8616    break 2
8617  fi
8618done
8619  done
8620IFS=$as_save_IFS
8621
8622  ;;
8623esac
8624fi
8625GUNZIP=$ac_cv_path_GUNZIP
8626if test -n "$GUNZIP"; then
8627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8628$as_echo "$GUNZIP" >&6; }
8629else
8630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8631$as_echo "no" >&6; }
8632fi
8633
8634
8635          if test "x$GUNZIP" = x; then
8636            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8637          fi
8638        else
8639          # Otherwise we believe it is a complete path. Use it as it is.
8640          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8641$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8642          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8643$as_echo_n "checking for GUNZIP... " >&6; }
8644          if test ! -x "$tool_specified"; then
8645            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8646$as_echo "not found" >&6; }
8647            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8648          fi
8649          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8650$as_echo "$tool_specified" >&6; }
8651        fi
8652      fi
8653    fi
8654
8655  fi
8656
8657
8658
8659  if test "x$GUNZIP" = x; then
8660    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8661  fi
8662
8663
8664
8665
8666
8667  # Publish this variable in the help.
8668
8669
8670  if [ -z "${GZIP+x}" ]; then
8671    # The variable is not set by user, try to locate tool using the code snippet
8672    for ac_prog in pigz gzip
8673do
8674  # Extract the first word of "$ac_prog", so it can be a program name with args.
8675set dummy $ac_prog; ac_word=$2
8676{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8677$as_echo_n "checking for $ac_word... " >&6; }
8678if ${ac_cv_path_GZIP+:} false; then :
8679  $as_echo_n "(cached) " >&6
8680else
8681  case $GZIP in
8682  [\\/]* | ?:[\\/]*)
8683  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8684  ;;
8685  *)
8686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8687for as_dir in $PATH
8688do
8689  IFS=$as_save_IFS
8690  test -z "$as_dir" && as_dir=.
8691    for ac_exec_ext in '' $ac_executable_extensions; do
8692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8693    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8695    break 2
8696  fi
8697done
8698  done
8699IFS=$as_save_IFS
8700
8701  ;;
8702esac
8703fi
8704GZIP=$ac_cv_path_GZIP
8705if test -n "$GZIP"; then
8706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8707$as_echo "$GZIP" >&6; }
8708else
8709  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8710$as_echo "no" >&6; }
8711fi
8712
8713
8714  test -n "$GZIP" && break
8715done
8716
8717  else
8718    # The variable is set, but is it from the command line or the environment?
8719
8720    # Try to remove the string !GZIP! from our list.
8721    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8722    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8723      # If it failed, the variable was not from the command line. Ignore it,
8724      # but warn the user (except for BASH, which is always set by the calling BASH).
8725      if test "xGZIP" != xBASH; then
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8727$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8728      fi
8729      # Try to locate tool using the code snippet
8730      for ac_prog in pigz gzip
8731do
8732  # Extract the first word of "$ac_prog", so it can be a program name with args.
8733set dummy $ac_prog; ac_word=$2
8734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8735$as_echo_n "checking for $ac_word... " >&6; }
8736if ${ac_cv_path_GZIP+:} false; then :
8737  $as_echo_n "(cached) " >&6
8738else
8739  case $GZIP in
8740  [\\/]* | ?:[\\/]*)
8741  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8742  ;;
8743  *)
8744  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8745for as_dir in $PATH
8746do
8747  IFS=$as_save_IFS
8748  test -z "$as_dir" && as_dir=.
8749    for ac_exec_ext in '' $ac_executable_extensions; do
8750  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8751    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8752    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8753    break 2
8754  fi
8755done
8756  done
8757IFS=$as_save_IFS
8758
8759  ;;
8760esac
8761fi
8762GZIP=$ac_cv_path_GZIP
8763if test -n "$GZIP"; then
8764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8765$as_echo "$GZIP" >&6; }
8766else
8767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8768$as_echo "no" >&6; }
8769fi
8770
8771
8772  test -n "$GZIP" && break
8773done
8774
8775    else
8776      # If it succeeded, then it was overridden by the user. We will use it
8777      # for the tool.
8778
8779      # First remove it from the list of overridden variables, so we can test
8780      # for unknown variables in the end.
8781      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8782
8783      # Check if we try to supply an empty value
8784      if test "x$GZIP" = x; then
8785        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8786$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8787        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8788$as_echo_n "checking for GZIP... " >&6; }
8789        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8790$as_echo "disabled" >&6; }
8791      else
8792        # Check if the provided tool contains a complete path.
8793        tool_specified="$GZIP"
8794        tool_basename="${tool_specified##*/}"
8795        if test "x$tool_basename" = "x$tool_specified"; then
8796          # A command without a complete path is provided, search $PATH.
8797          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8798$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8799          # Extract the first word of "$tool_basename", so it can be a program name with args.
8800set dummy $tool_basename; ac_word=$2
8801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8802$as_echo_n "checking for $ac_word... " >&6; }
8803if ${ac_cv_path_GZIP+:} false; then :
8804  $as_echo_n "(cached) " >&6
8805else
8806  case $GZIP in
8807  [\\/]* | ?:[\\/]*)
8808  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8809  ;;
8810  *)
8811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8812for as_dir in $PATH
8813do
8814  IFS=$as_save_IFS
8815  test -z "$as_dir" && as_dir=.
8816    for ac_exec_ext in '' $ac_executable_extensions; do
8817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8818    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8820    break 2
8821  fi
8822done
8823  done
8824IFS=$as_save_IFS
8825
8826  ;;
8827esac
8828fi
8829GZIP=$ac_cv_path_GZIP
8830if test -n "$GZIP"; then
8831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8832$as_echo "$GZIP" >&6; }
8833else
8834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8835$as_echo "no" >&6; }
8836fi
8837
8838
8839          if test "x$GZIP" = x; then
8840            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8841          fi
8842        else
8843          # Otherwise we believe it is a complete path. Use it as it is.
8844          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8845$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8846          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8847$as_echo_n "checking for GZIP... " >&6; }
8848          if test ! -x "$tool_specified"; then
8849            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8850$as_echo "not found" >&6; }
8851            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8852          fi
8853          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8854$as_echo "$tool_specified" >&6; }
8855        fi
8856      fi
8857    fi
8858
8859  fi
8860
8861
8862
8863  if test "x$GZIP" = x; then
8864    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8865  fi
8866
8867
8868
8869
8870
8871  # Publish this variable in the help.
8872
8873
8874  if [ -z "${LN+x}" ]; then
8875    # The variable is not set by user, try to locate tool using the code snippet
8876    for ac_prog in ln
8877do
8878  # Extract the first word of "$ac_prog", so it can be a program name with args.
8879set dummy $ac_prog; ac_word=$2
8880{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8881$as_echo_n "checking for $ac_word... " >&6; }
8882if ${ac_cv_path_LN+:} false; then :
8883  $as_echo_n "(cached) " >&6
8884else
8885  case $LN in
8886  [\\/]* | ?:[\\/]*)
8887  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8888  ;;
8889  *)
8890  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8891for as_dir in $PATH
8892do
8893  IFS=$as_save_IFS
8894  test -z "$as_dir" && as_dir=.
8895    for ac_exec_ext in '' $ac_executable_extensions; do
8896  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8897    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8898    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8899    break 2
8900  fi
8901done
8902  done
8903IFS=$as_save_IFS
8904
8905  ;;
8906esac
8907fi
8908LN=$ac_cv_path_LN
8909if test -n "$LN"; then
8910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8911$as_echo "$LN" >&6; }
8912else
8913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8914$as_echo "no" >&6; }
8915fi
8916
8917
8918  test -n "$LN" && break
8919done
8920
8921  else
8922    # The variable is set, but is it from the command line or the environment?
8923
8924    # Try to remove the string !LN! from our list.
8925    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8926    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8927      # If it failed, the variable was not from the command line. Ignore it,
8928      # but warn the user (except for BASH, which is always set by the calling BASH).
8929      if test "xLN" != xBASH; then
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8931$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8932      fi
8933      # Try to locate tool using the code snippet
8934      for ac_prog in ln
8935do
8936  # Extract the first word of "$ac_prog", so it can be a program name with args.
8937set dummy $ac_prog; ac_word=$2
8938{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8939$as_echo_n "checking for $ac_word... " >&6; }
8940if ${ac_cv_path_LN+:} false; then :
8941  $as_echo_n "(cached) " >&6
8942else
8943  case $LN in
8944  [\\/]* | ?:[\\/]*)
8945  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8946  ;;
8947  *)
8948  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8949for as_dir in $PATH
8950do
8951  IFS=$as_save_IFS
8952  test -z "$as_dir" && as_dir=.
8953    for ac_exec_ext in '' $ac_executable_extensions; do
8954  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8955    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8956    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8957    break 2
8958  fi
8959done
8960  done
8961IFS=$as_save_IFS
8962
8963  ;;
8964esac
8965fi
8966LN=$ac_cv_path_LN
8967if test -n "$LN"; then
8968  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8969$as_echo "$LN" >&6; }
8970else
8971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8972$as_echo "no" >&6; }
8973fi
8974
8975
8976  test -n "$LN" && break
8977done
8978
8979    else
8980      # If it succeeded, then it was overridden by the user. We will use it
8981      # for the tool.
8982
8983      # First remove it from the list of overridden variables, so we can test
8984      # for unknown variables in the end.
8985      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8986
8987      # Check if we try to supply an empty value
8988      if test "x$LN" = x; then
8989        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8990$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8991        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8992$as_echo_n "checking for LN... " >&6; }
8993        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8994$as_echo "disabled" >&6; }
8995      else
8996        # Check if the provided tool contains a complete path.
8997        tool_specified="$LN"
8998        tool_basename="${tool_specified##*/}"
8999        if test "x$tool_basename" = "x$tool_specified"; then
9000          # A command without a complete path is provided, search $PATH.
9001          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
9002$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
9003          # Extract the first word of "$tool_basename", so it can be a program name with args.
9004set dummy $tool_basename; ac_word=$2
9005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9006$as_echo_n "checking for $ac_word... " >&6; }
9007if ${ac_cv_path_LN+:} false; then :
9008  $as_echo_n "(cached) " >&6
9009else
9010  case $LN in
9011  [\\/]* | ?:[\\/]*)
9012  ac_cv_path_LN="$LN" # Let the user override the test with a path.
9013  ;;
9014  *)
9015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9016for as_dir in $PATH
9017do
9018  IFS=$as_save_IFS
9019  test -z "$as_dir" && as_dir=.
9020    for ac_exec_ext in '' $ac_executable_extensions; do
9021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9022    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
9023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9024    break 2
9025  fi
9026done
9027  done
9028IFS=$as_save_IFS
9029
9030  ;;
9031esac
9032fi
9033LN=$ac_cv_path_LN
9034if test -n "$LN"; then
9035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
9036$as_echo "$LN" >&6; }
9037else
9038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9039$as_echo "no" >&6; }
9040fi
9041
9042
9043          if test "x$LN" = x; then
9044            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9045          fi
9046        else
9047          # Otherwise we believe it is a complete path. Use it as it is.
9048          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9049$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9050          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9051$as_echo_n "checking for LN... " >&6; }
9052          if test ! -x "$tool_specified"; then
9053            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9054$as_echo "not found" >&6; }
9055            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9056          fi
9057          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9058$as_echo "$tool_specified" >&6; }
9059        fi
9060      fi
9061    fi
9062
9063  fi
9064
9065
9066
9067  if test "x$LN" = x; then
9068    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9069  fi
9070
9071
9072
9073
9074
9075  # Publish this variable in the help.
9076
9077
9078  if [ -z "${LS+x}" ]; then
9079    # The variable is not set by user, try to locate tool using the code snippet
9080    for ac_prog in ls
9081do
9082  # Extract the first word of "$ac_prog", so it can be a program name with args.
9083set dummy $ac_prog; ac_word=$2
9084{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9085$as_echo_n "checking for $ac_word... " >&6; }
9086if ${ac_cv_path_LS+:} false; then :
9087  $as_echo_n "(cached) " >&6
9088else
9089  case $LS in
9090  [\\/]* | ?:[\\/]*)
9091  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9092  ;;
9093  *)
9094  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9095for as_dir in $PATH
9096do
9097  IFS=$as_save_IFS
9098  test -z "$as_dir" && as_dir=.
9099    for ac_exec_ext in '' $ac_executable_extensions; do
9100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9101    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9103    break 2
9104  fi
9105done
9106  done
9107IFS=$as_save_IFS
9108
9109  ;;
9110esac
9111fi
9112LS=$ac_cv_path_LS
9113if test -n "$LS"; then
9114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9115$as_echo "$LS" >&6; }
9116else
9117  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9118$as_echo "no" >&6; }
9119fi
9120
9121
9122  test -n "$LS" && break
9123done
9124
9125  else
9126    # The variable is set, but is it from the command line or the environment?
9127
9128    # Try to remove the string !LS! from our list.
9129    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9130    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9131      # If it failed, the variable was not from the command line. Ignore it,
9132      # but warn the user (except for BASH, which is always set by the calling BASH).
9133      if test "xLS" != xBASH; then
9134        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9135$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9136      fi
9137      # Try to locate tool using the code snippet
9138      for ac_prog in ls
9139do
9140  # Extract the first word of "$ac_prog", so it can be a program name with args.
9141set dummy $ac_prog; ac_word=$2
9142{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9143$as_echo_n "checking for $ac_word... " >&6; }
9144if ${ac_cv_path_LS+:} false; then :
9145  $as_echo_n "(cached) " >&6
9146else
9147  case $LS in
9148  [\\/]* | ?:[\\/]*)
9149  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9150  ;;
9151  *)
9152  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9153for as_dir in $PATH
9154do
9155  IFS=$as_save_IFS
9156  test -z "$as_dir" && as_dir=.
9157    for ac_exec_ext in '' $ac_executable_extensions; do
9158  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9159    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9160    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9161    break 2
9162  fi
9163done
9164  done
9165IFS=$as_save_IFS
9166
9167  ;;
9168esac
9169fi
9170LS=$ac_cv_path_LS
9171if test -n "$LS"; then
9172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9173$as_echo "$LS" >&6; }
9174else
9175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9176$as_echo "no" >&6; }
9177fi
9178
9179
9180  test -n "$LS" && break
9181done
9182
9183    else
9184      # If it succeeded, then it was overridden by the user. We will use it
9185      # for the tool.
9186
9187      # First remove it from the list of overridden variables, so we can test
9188      # for unknown variables in the end.
9189      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9190
9191      # Check if we try to supply an empty value
9192      if test "x$LS" = x; then
9193        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9194$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9195        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9196$as_echo_n "checking for LS... " >&6; }
9197        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9198$as_echo "disabled" >&6; }
9199      else
9200        # Check if the provided tool contains a complete path.
9201        tool_specified="$LS"
9202        tool_basename="${tool_specified##*/}"
9203        if test "x$tool_basename" = "x$tool_specified"; then
9204          # A command without a complete path is provided, search $PATH.
9205          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9206$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9207          # Extract the first word of "$tool_basename", so it can be a program name with args.
9208set dummy $tool_basename; ac_word=$2
9209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9210$as_echo_n "checking for $ac_word... " >&6; }
9211if ${ac_cv_path_LS+:} false; then :
9212  $as_echo_n "(cached) " >&6
9213else
9214  case $LS in
9215  [\\/]* | ?:[\\/]*)
9216  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9217  ;;
9218  *)
9219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9220for as_dir in $PATH
9221do
9222  IFS=$as_save_IFS
9223  test -z "$as_dir" && as_dir=.
9224    for ac_exec_ext in '' $ac_executable_extensions; do
9225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9226    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9228    break 2
9229  fi
9230done
9231  done
9232IFS=$as_save_IFS
9233
9234  ;;
9235esac
9236fi
9237LS=$ac_cv_path_LS
9238if test -n "$LS"; then
9239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9240$as_echo "$LS" >&6; }
9241else
9242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9243$as_echo "no" >&6; }
9244fi
9245
9246
9247          if test "x$LS" = x; then
9248            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9249          fi
9250        else
9251          # Otherwise we believe it is a complete path. Use it as it is.
9252          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9253$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9254          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9255$as_echo_n "checking for LS... " >&6; }
9256          if test ! -x "$tool_specified"; then
9257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9258$as_echo "not found" >&6; }
9259            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9260          fi
9261          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9262$as_echo "$tool_specified" >&6; }
9263        fi
9264      fi
9265    fi
9266
9267  fi
9268
9269
9270
9271  if test "x$LS" = x; then
9272    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9273  fi
9274
9275
9276
9277
9278
9279  # Publish this variable in the help.
9280
9281
9282  if [ -z "${MKDIR+x}" ]; then
9283    # The variable is not set by user, try to locate tool using the code snippet
9284    for ac_prog in mkdir
9285do
9286  # Extract the first word of "$ac_prog", so it can be a program name with args.
9287set dummy $ac_prog; ac_word=$2
9288{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9289$as_echo_n "checking for $ac_word... " >&6; }
9290if ${ac_cv_path_MKDIR+:} false; then :
9291  $as_echo_n "(cached) " >&6
9292else
9293  case $MKDIR in
9294  [\\/]* | ?:[\\/]*)
9295  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9296  ;;
9297  *)
9298  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9299for as_dir in $PATH
9300do
9301  IFS=$as_save_IFS
9302  test -z "$as_dir" && as_dir=.
9303    for ac_exec_ext in '' $ac_executable_extensions; do
9304  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9305    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9306    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9307    break 2
9308  fi
9309done
9310  done
9311IFS=$as_save_IFS
9312
9313  ;;
9314esac
9315fi
9316MKDIR=$ac_cv_path_MKDIR
9317if test -n "$MKDIR"; then
9318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9319$as_echo "$MKDIR" >&6; }
9320else
9321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9322$as_echo "no" >&6; }
9323fi
9324
9325
9326  test -n "$MKDIR" && break
9327done
9328
9329  else
9330    # The variable is set, but is it from the command line or the environment?
9331
9332    # Try to remove the string !MKDIR! from our list.
9333    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9334    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9335      # If it failed, the variable was not from the command line. Ignore it,
9336      # but warn the user (except for BASH, which is always set by the calling BASH).
9337      if test "xMKDIR" != xBASH; then
9338        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9339$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9340      fi
9341      # Try to locate tool using the code snippet
9342      for ac_prog in mkdir
9343do
9344  # Extract the first word of "$ac_prog", so it can be a program name with args.
9345set dummy $ac_prog; ac_word=$2
9346{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9347$as_echo_n "checking for $ac_word... " >&6; }
9348if ${ac_cv_path_MKDIR+:} false; then :
9349  $as_echo_n "(cached) " >&6
9350else
9351  case $MKDIR in
9352  [\\/]* | ?:[\\/]*)
9353  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9354  ;;
9355  *)
9356  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9357for as_dir in $PATH
9358do
9359  IFS=$as_save_IFS
9360  test -z "$as_dir" && as_dir=.
9361    for ac_exec_ext in '' $ac_executable_extensions; do
9362  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9363    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9364    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9365    break 2
9366  fi
9367done
9368  done
9369IFS=$as_save_IFS
9370
9371  ;;
9372esac
9373fi
9374MKDIR=$ac_cv_path_MKDIR
9375if test -n "$MKDIR"; then
9376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9377$as_echo "$MKDIR" >&6; }
9378else
9379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9380$as_echo "no" >&6; }
9381fi
9382
9383
9384  test -n "$MKDIR" && break
9385done
9386
9387    else
9388      # If it succeeded, then it was overridden by the user. We will use it
9389      # for the tool.
9390
9391      # First remove it from the list of overridden variables, so we can test
9392      # for unknown variables in the end.
9393      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9394
9395      # Check if we try to supply an empty value
9396      if test "x$MKDIR" = x; then
9397        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9398$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9399        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9400$as_echo_n "checking for MKDIR... " >&6; }
9401        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9402$as_echo "disabled" >&6; }
9403      else
9404        # Check if the provided tool contains a complete path.
9405        tool_specified="$MKDIR"
9406        tool_basename="${tool_specified##*/}"
9407        if test "x$tool_basename" = "x$tool_specified"; then
9408          # A command without a complete path is provided, search $PATH.
9409          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9410$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9411          # Extract the first word of "$tool_basename", so it can be a program name with args.
9412set dummy $tool_basename; ac_word=$2
9413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9414$as_echo_n "checking for $ac_word... " >&6; }
9415if ${ac_cv_path_MKDIR+:} false; then :
9416  $as_echo_n "(cached) " >&6
9417else
9418  case $MKDIR in
9419  [\\/]* | ?:[\\/]*)
9420  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9421  ;;
9422  *)
9423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9424for as_dir in $PATH
9425do
9426  IFS=$as_save_IFS
9427  test -z "$as_dir" && as_dir=.
9428    for ac_exec_ext in '' $ac_executable_extensions; do
9429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9430    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9432    break 2
9433  fi
9434done
9435  done
9436IFS=$as_save_IFS
9437
9438  ;;
9439esac
9440fi
9441MKDIR=$ac_cv_path_MKDIR
9442if test -n "$MKDIR"; then
9443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9444$as_echo "$MKDIR" >&6; }
9445else
9446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9447$as_echo "no" >&6; }
9448fi
9449
9450
9451          if test "x$MKDIR" = x; then
9452            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9453          fi
9454        else
9455          # Otherwise we believe it is a complete path. Use it as it is.
9456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9457$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9458          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9459$as_echo_n "checking for MKDIR... " >&6; }
9460          if test ! -x "$tool_specified"; then
9461            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9462$as_echo "not found" >&6; }
9463            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9464          fi
9465          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9466$as_echo "$tool_specified" >&6; }
9467        fi
9468      fi
9469    fi
9470
9471  fi
9472
9473
9474
9475  if test "x$MKDIR" = x; then
9476    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9477  fi
9478
9479
9480
9481
9482
9483  # Publish this variable in the help.
9484
9485
9486  if [ -z "${MKTEMP+x}" ]; then
9487    # The variable is not set by user, try to locate tool using the code snippet
9488    for ac_prog in mktemp
9489do
9490  # Extract the first word of "$ac_prog", so it can be a program name with args.
9491set dummy $ac_prog; ac_word=$2
9492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9493$as_echo_n "checking for $ac_word... " >&6; }
9494if ${ac_cv_path_MKTEMP+:} false; then :
9495  $as_echo_n "(cached) " >&6
9496else
9497  case $MKTEMP in
9498  [\\/]* | ?:[\\/]*)
9499  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9500  ;;
9501  *)
9502  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9503for as_dir in $PATH
9504do
9505  IFS=$as_save_IFS
9506  test -z "$as_dir" && as_dir=.
9507    for ac_exec_ext in '' $ac_executable_extensions; do
9508  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9509    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9510    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9511    break 2
9512  fi
9513done
9514  done
9515IFS=$as_save_IFS
9516
9517  ;;
9518esac
9519fi
9520MKTEMP=$ac_cv_path_MKTEMP
9521if test -n "$MKTEMP"; then
9522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9523$as_echo "$MKTEMP" >&6; }
9524else
9525  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9526$as_echo "no" >&6; }
9527fi
9528
9529
9530  test -n "$MKTEMP" && break
9531done
9532
9533  else
9534    # The variable is set, but is it from the command line or the environment?
9535
9536    # Try to remove the string !MKTEMP! from our list.
9537    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9538    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9539      # If it failed, the variable was not from the command line. Ignore it,
9540      # but warn the user (except for BASH, which is always set by the calling BASH).
9541      if test "xMKTEMP" != xBASH; then
9542        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9543$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9544      fi
9545      # Try to locate tool using the code snippet
9546      for ac_prog in mktemp
9547do
9548  # Extract the first word of "$ac_prog", so it can be a program name with args.
9549set dummy $ac_prog; ac_word=$2
9550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9551$as_echo_n "checking for $ac_word... " >&6; }
9552if ${ac_cv_path_MKTEMP+:} false; then :
9553  $as_echo_n "(cached) " >&6
9554else
9555  case $MKTEMP in
9556  [\\/]* | ?:[\\/]*)
9557  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9558  ;;
9559  *)
9560  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9561for as_dir in $PATH
9562do
9563  IFS=$as_save_IFS
9564  test -z "$as_dir" && as_dir=.
9565    for ac_exec_ext in '' $ac_executable_extensions; do
9566  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9567    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9568    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9569    break 2
9570  fi
9571done
9572  done
9573IFS=$as_save_IFS
9574
9575  ;;
9576esac
9577fi
9578MKTEMP=$ac_cv_path_MKTEMP
9579if test -n "$MKTEMP"; then
9580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9581$as_echo "$MKTEMP" >&6; }
9582else
9583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9584$as_echo "no" >&6; }
9585fi
9586
9587
9588  test -n "$MKTEMP" && break
9589done
9590
9591    else
9592      # If it succeeded, then it was overridden by the user. We will use it
9593      # for the tool.
9594
9595      # First remove it from the list of overridden variables, so we can test
9596      # for unknown variables in the end.
9597      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9598
9599      # Check if we try to supply an empty value
9600      if test "x$MKTEMP" = x; then
9601        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9602$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9603        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9604$as_echo_n "checking for MKTEMP... " >&6; }
9605        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9606$as_echo "disabled" >&6; }
9607      else
9608        # Check if the provided tool contains a complete path.
9609        tool_specified="$MKTEMP"
9610        tool_basename="${tool_specified##*/}"
9611        if test "x$tool_basename" = "x$tool_specified"; then
9612          # A command without a complete path is provided, search $PATH.
9613          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9614$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9615          # Extract the first word of "$tool_basename", so it can be a program name with args.
9616set dummy $tool_basename; ac_word=$2
9617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9618$as_echo_n "checking for $ac_word... " >&6; }
9619if ${ac_cv_path_MKTEMP+:} false; then :
9620  $as_echo_n "(cached) " >&6
9621else
9622  case $MKTEMP in
9623  [\\/]* | ?:[\\/]*)
9624  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9625  ;;
9626  *)
9627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9628for as_dir in $PATH
9629do
9630  IFS=$as_save_IFS
9631  test -z "$as_dir" && as_dir=.
9632    for ac_exec_ext in '' $ac_executable_extensions; do
9633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9634    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9636    break 2
9637  fi
9638done
9639  done
9640IFS=$as_save_IFS
9641
9642  ;;
9643esac
9644fi
9645MKTEMP=$ac_cv_path_MKTEMP
9646if test -n "$MKTEMP"; then
9647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9648$as_echo "$MKTEMP" >&6; }
9649else
9650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9651$as_echo "no" >&6; }
9652fi
9653
9654
9655          if test "x$MKTEMP" = x; then
9656            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9657          fi
9658        else
9659          # Otherwise we believe it is a complete path. Use it as it is.
9660          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9661$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9662          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9663$as_echo_n "checking for MKTEMP... " >&6; }
9664          if test ! -x "$tool_specified"; then
9665            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9666$as_echo "not found" >&6; }
9667            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9668          fi
9669          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9670$as_echo "$tool_specified" >&6; }
9671        fi
9672      fi
9673    fi
9674
9675  fi
9676
9677
9678
9679  if test "x$MKTEMP" = x; then
9680    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9681  fi
9682
9683
9684
9685
9686
9687  # Publish this variable in the help.
9688
9689
9690  if [ -z "${MV+x}" ]; then
9691    # The variable is not set by user, try to locate tool using the code snippet
9692    for ac_prog in mv
9693do
9694  # Extract the first word of "$ac_prog", so it can be a program name with args.
9695set dummy $ac_prog; ac_word=$2
9696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9697$as_echo_n "checking for $ac_word... " >&6; }
9698if ${ac_cv_path_MV+:} false; then :
9699  $as_echo_n "(cached) " >&6
9700else
9701  case $MV in
9702  [\\/]* | ?:[\\/]*)
9703  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9704  ;;
9705  *)
9706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9707for as_dir in $PATH
9708do
9709  IFS=$as_save_IFS
9710  test -z "$as_dir" && as_dir=.
9711    for ac_exec_ext in '' $ac_executable_extensions; do
9712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9713    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9715    break 2
9716  fi
9717done
9718  done
9719IFS=$as_save_IFS
9720
9721  ;;
9722esac
9723fi
9724MV=$ac_cv_path_MV
9725if test -n "$MV"; then
9726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9727$as_echo "$MV" >&6; }
9728else
9729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9730$as_echo "no" >&6; }
9731fi
9732
9733
9734  test -n "$MV" && break
9735done
9736
9737  else
9738    # The variable is set, but is it from the command line or the environment?
9739
9740    # Try to remove the string !MV! from our list.
9741    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9742    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9743      # If it failed, the variable was not from the command line. Ignore it,
9744      # but warn the user (except for BASH, which is always set by the calling BASH).
9745      if test "xMV" != xBASH; then
9746        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9747$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9748      fi
9749      # Try to locate tool using the code snippet
9750      for ac_prog in mv
9751do
9752  # Extract the first word of "$ac_prog", so it can be a program name with args.
9753set dummy $ac_prog; ac_word=$2
9754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9755$as_echo_n "checking for $ac_word... " >&6; }
9756if ${ac_cv_path_MV+:} false; then :
9757  $as_echo_n "(cached) " >&6
9758else
9759  case $MV in
9760  [\\/]* | ?:[\\/]*)
9761  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9762  ;;
9763  *)
9764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9765for as_dir in $PATH
9766do
9767  IFS=$as_save_IFS
9768  test -z "$as_dir" && as_dir=.
9769    for ac_exec_ext in '' $ac_executable_extensions; do
9770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9771    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9773    break 2
9774  fi
9775done
9776  done
9777IFS=$as_save_IFS
9778
9779  ;;
9780esac
9781fi
9782MV=$ac_cv_path_MV
9783if test -n "$MV"; then
9784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9785$as_echo "$MV" >&6; }
9786else
9787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9788$as_echo "no" >&6; }
9789fi
9790
9791
9792  test -n "$MV" && break
9793done
9794
9795    else
9796      # If it succeeded, then it was overridden by the user. We will use it
9797      # for the tool.
9798
9799      # First remove it from the list of overridden variables, so we can test
9800      # for unknown variables in the end.
9801      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9802
9803      # Check if we try to supply an empty value
9804      if test "x$MV" = x; then
9805        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9806$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9807        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9808$as_echo_n "checking for MV... " >&6; }
9809        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9810$as_echo "disabled" >&6; }
9811      else
9812        # Check if the provided tool contains a complete path.
9813        tool_specified="$MV"
9814        tool_basename="${tool_specified##*/}"
9815        if test "x$tool_basename" = "x$tool_specified"; then
9816          # A command without a complete path is provided, search $PATH.
9817          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9818$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9819          # Extract the first word of "$tool_basename", so it can be a program name with args.
9820set dummy $tool_basename; ac_word=$2
9821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9822$as_echo_n "checking for $ac_word... " >&6; }
9823if ${ac_cv_path_MV+:} false; then :
9824  $as_echo_n "(cached) " >&6
9825else
9826  case $MV in
9827  [\\/]* | ?:[\\/]*)
9828  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9829  ;;
9830  *)
9831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9832for as_dir in $PATH
9833do
9834  IFS=$as_save_IFS
9835  test -z "$as_dir" && as_dir=.
9836    for ac_exec_ext in '' $ac_executable_extensions; do
9837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9838    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9840    break 2
9841  fi
9842done
9843  done
9844IFS=$as_save_IFS
9845
9846  ;;
9847esac
9848fi
9849MV=$ac_cv_path_MV
9850if test -n "$MV"; then
9851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9852$as_echo "$MV" >&6; }
9853else
9854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9855$as_echo "no" >&6; }
9856fi
9857
9858
9859          if test "x$MV" = x; then
9860            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9861          fi
9862        else
9863          # Otherwise we believe it is a complete path. Use it as it is.
9864          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9865$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9866          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9867$as_echo_n "checking for MV... " >&6; }
9868          if test ! -x "$tool_specified"; then
9869            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9870$as_echo "not found" >&6; }
9871            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9872          fi
9873          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9874$as_echo "$tool_specified" >&6; }
9875        fi
9876      fi
9877    fi
9878
9879  fi
9880
9881
9882
9883  if test "x$MV" = x; then
9884    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9885  fi
9886
9887
9888
9889
9890
9891  # Publish this variable in the help.
9892
9893
9894  if [ -z "${NAWK+x}" ]; then
9895    # The variable is not set by user, try to locate tool using the code snippet
9896    for ac_prog in nawk gawk awk
9897do
9898  # Extract the first word of "$ac_prog", so it can be a program name with args.
9899set dummy $ac_prog; ac_word=$2
9900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9901$as_echo_n "checking for $ac_word... " >&6; }
9902if ${ac_cv_path_NAWK+:} false; then :
9903  $as_echo_n "(cached) " >&6
9904else
9905  case $NAWK in
9906  [\\/]* | ?:[\\/]*)
9907  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9908  ;;
9909  *)
9910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9911for as_dir in $PATH
9912do
9913  IFS=$as_save_IFS
9914  test -z "$as_dir" && as_dir=.
9915    for ac_exec_ext in '' $ac_executable_extensions; do
9916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9917    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9919    break 2
9920  fi
9921done
9922  done
9923IFS=$as_save_IFS
9924
9925  ;;
9926esac
9927fi
9928NAWK=$ac_cv_path_NAWK
9929if test -n "$NAWK"; then
9930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9931$as_echo "$NAWK" >&6; }
9932else
9933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9934$as_echo "no" >&6; }
9935fi
9936
9937
9938  test -n "$NAWK" && break
9939done
9940
9941  else
9942    # The variable is set, but is it from the command line or the environment?
9943
9944    # Try to remove the string !NAWK! from our list.
9945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9947      # If it failed, the variable was not from the command line. Ignore it,
9948      # but warn the user (except for BASH, which is always set by the calling BASH).
9949      if test "xNAWK" != xBASH; then
9950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9951$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9952      fi
9953      # Try to locate tool using the code snippet
9954      for ac_prog in nawk gawk awk
9955do
9956  # Extract the first word of "$ac_prog", so it can be a program name with args.
9957set dummy $ac_prog; ac_word=$2
9958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9959$as_echo_n "checking for $ac_word... " >&6; }
9960if ${ac_cv_path_NAWK+:} false; then :
9961  $as_echo_n "(cached) " >&6
9962else
9963  case $NAWK in
9964  [\\/]* | ?:[\\/]*)
9965  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9966  ;;
9967  *)
9968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9969for as_dir in $PATH
9970do
9971  IFS=$as_save_IFS
9972  test -z "$as_dir" && as_dir=.
9973    for ac_exec_ext in '' $ac_executable_extensions; do
9974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9975    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9977    break 2
9978  fi
9979done
9980  done
9981IFS=$as_save_IFS
9982
9983  ;;
9984esac
9985fi
9986NAWK=$ac_cv_path_NAWK
9987if test -n "$NAWK"; then
9988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9989$as_echo "$NAWK" >&6; }
9990else
9991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9992$as_echo "no" >&6; }
9993fi
9994
9995
9996  test -n "$NAWK" && break
9997done
9998
9999    else
10000      # If it succeeded, then it was overridden by the user. We will use it
10001      # for the tool.
10002
10003      # First remove it from the list of overridden variables, so we can test
10004      # for unknown variables in the end.
10005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10006
10007      # Check if we try to supply an empty value
10008      if test "x$NAWK" = x; then
10009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
10010$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
10011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10012$as_echo_n "checking for NAWK... " >&6; }
10013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10014$as_echo "disabled" >&6; }
10015      else
10016        # Check if the provided tool contains a complete path.
10017        tool_specified="$NAWK"
10018        tool_basename="${tool_specified##*/}"
10019        if test "x$tool_basename" = "x$tool_specified"; then
10020          # A command without a complete path is provided, search $PATH.
10021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
10022$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
10023          # Extract the first word of "$tool_basename", so it can be a program name with args.
10024set dummy $tool_basename; ac_word=$2
10025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10026$as_echo_n "checking for $ac_word... " >&6; }
10027if ${ac_cv_path_NAWK+:} false; then :
10028  $as_echo_n "(cached) " >&6
10029else
10030  case $NAWK in
10031  [\\/]* | ?:[\\/]*)
10032  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
10033  ;;
10034  *)
10035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10036for as_dir in $PATH
10037do
10038  IFS=$as_save_IFS
10039  test -z "$as_dir" && as_dir=.
10040    for ac_exec_ext in '' $ac_executable_extensions; do
10041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10042    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10044    break 2
10045  fi
10046done
10047  done
10048IFS=$as_save_IFS
10049
10050  ;;
10051esac
10052fi
10053NAWK=$ac_cv_path_NAWK
10054if test -n "$NAWK"; then
10055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10056$as_echo "$NAWK" >&6; }
10057else
10058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10059$as_echo "no" >&6; }
10060fi
10061
10062
10063          if test "x$NAWK" = x; then
10064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10065          fi
10066        else
10067          # Otherwise we believe it is a complete path. Use it as it is.
10068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10069$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10071$as_echo_n "checking for NAWK... " >&6; }
10072          if test ! -x "$tool_specified"; then
10073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10074$as_echo "not found" >&6; }
10075            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10076          fi
10077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10078$as_echo "$tool_specified" >&6; }
10079        fi
10080      fi
10081    fi
10082
10083  fi
10084
10085
10086
10087  if test "x$NAWK" = x; then
10088    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10089  fi
10090
10091
10092
10093
10094
10095  # Publish this variable in the help.
10096
10097
10098  if [ -z "${PRINTF+x}" ]; then
10099    # The variable is not set by user, try to locate tool using the code snippet
10100    for ac_prog in printf
10101do
10102  # Extract the first word of "$ac_prog", so it can be a program name with args.
10103set dummy $ac_prog; ac_word=$2
10104{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10105$as_echo_n "checking for $ac_word... " >&6; }
10106if ${ac_cv_path_PRINTF+:} false; then :
10107  $as_echo_n "(cached) " >&6
10108else
10109  case $PRINTF in
10110  [\\/]* | ?:[\\/]*)
10111  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10112  ;;
10113  *)
10114  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10115for as_dir in $PATH
10116do
10117  IFS=$as_save_IFS
10118  test -z "$as_dir" && as_dir=.
10119    for ac_exec_ext in '' $ac_executable_extensions; do
10120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10121    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10123    break 2
10124  fi
10125done
10126  done
10127IFS=$as_save_IFS
10128
10129  ;;
10130esac
10131fi
10132PRINTF=$ac_cv_path_PRINTF
10133if test -n "$PRINTF"; then
10134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10135$as_echo "$PRINTF" >&6; }
10136else
10137  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10138$as_echo "no" >&6; }
10139fi
10140
10141
10142  test -n "$PRINTF" && break
10143done
10144
10145  else
10146    # The variable is set, but is it from the command line or the environment?
10147
10148    # Try to remove the string !PRINTF! from our list.
10149    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10150    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10151      # If it failed, the variable was not from the command line. Ignore it,
10152      # but warn the user (except for BASH, which is always set by the calling BASH).
10153      if test "xPRINTF" != xBASH; then
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10155$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10156      fi
10157      # Try to locate tool using the code snippet
10158      for ac_prog in printf
10159do
10160  # Extract the first word of "$ac_prog", so it can be a program name with args.
10161set dummy $ac_prog; ac_word=$2
10162{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10163$as_echo_n "checking for $ac_word... " >&6; }
10164if ${ac_cv_path_PRINTF+:} false; then :
10165  $as_echo_n "(cached) " >&6
10166else
10167  case $PRINTF in
10168  [\\/]* | ?:[\\/]*)
10169  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10170  ;;
10171  *)
10172  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10173for as_dir in $PATH
10174do
10175  IFS=$as_save_IFS
10176  test -z "$as_dir" && as_dir=.
10177    for ac_exec_ext in '' $ac_executable_extensions; do
10178  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10179    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10180    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10181    break 2
10182  fi
10183done
10184  done
10185IFS=$as_save_IFS
10186
10187  ;;
10188esac
10189fi
10190PRINTF=$ac_cv_path_PRINTF
10191if test -n "$PRINTF"; then
10192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10193$as_echo "$PRINTF" >&6; }
10194else
10195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10196$as_echo "no" >&6; }
10197fi
10198
10199
10200  test -n "$PRINTF" && break
10201done
10202
10203    else
10204      # If it succeeded, then it was overridden by the user. We will use it
10205      # for the tool.
10206
10207      # First remove it from the list of overridden variables, so we can test
10208      # for unknown variables in the end.
10209      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10210
10211      # Check if we try to supply an empty value
10212      if test "x$PRINTF" = x; then
10213        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10214$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10215        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10216$as_echo_n "checking for PRINTF... " >&6; }
10217        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10218$as_echo "disabled" >&6; }
10219      else
10220        # Check if the provided tool contains a complete path.
10221        tool_specified="$PRINTF"
10222        tool_basename="${tool_specified##*/}"
10223        if test "x$tool_basename" = "x$tool_specified"; then
10224          # A command without a complete path is provided, search $PATH.
10225          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10226$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10227          # Extract the first word of "$tool_basename", so it can be a program name with args.
10228set dummy $tool_basename; ac_word=$2
10229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10230$as_echo_n "checking for $ac_word... " >&6; }
10231if ${ac_cv_path_PRINTF+:} false; then :
10232  $as_echo_n "(cached) " >&6
10233else
10234  case $PRINTF in
10235  [\\/]* | ?:[\\/]*)
10236  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10237  ;;
10238  *)
10239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10240for as_dir in $PATH
10241do
10242  IFS=$as_save_IFS
10243  test -z "$as_dir" && as_dir=.
10244    for ac_exec_ext in '' $ac_executable_extensions; do
10245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10246    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10248    break 2
10249  fi
10250done
10251  done
10252IFS=$as_save_IFS
10253
10254  ;;
10255esac
10256fi
10257PRINTF=$ac_cv_path_PRINTF
10258if test -n "$PRINTF"; then
10259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10260$as_echo "$PRINTF" >&6; }
10261else
10262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10263$as_echo "no" >&6; }
10264fi
10265
10266
10267          if test "x$PRINTF" = x; then
10268            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10269          fi
10270        else
10271          # Otherwise we believe it is a complete path. Use it as it is.
10272          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10273$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10274          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10275$as_echo_n "checking for PRINTF... " >&6; }
10276          if test ! -x "$tool_specified"; then
10277            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10278$as_echo "not found" >&6; }
10279            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10280          fi
10281          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10282$as_echo "$tool_specified" >&6; }
10283        fi
10284      fi
10285    fi
10286
10287  fi
10288
10289
10290
10291  if test "x$PRINTF" = x; then
10292    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10293  fi
10294
10295
10296
10297
10298
10299  # Publish this variable in the help.
10300
10301
10302  if [ -z "${RM+x}" ]; then
10303    # The variable is not set by user, try to locate tool using the code snippet
10304    for ac_prog in rm
10305do
10306  # Extract the first word of "$ac_prog", so it can be a program name with args.
10307set dummy $ac_prog; ac_word=$2
10308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10309$as_echo_n "checking for $ac_word... " >&6; }
10310if ${ac_cv_path_RM+:} false; then :
10311  $as_echo_n "(cached) " >&6
10312else
10313  case $RM in
10314  [\\/]* | ?:[\\/]*)
10315  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10316  ;;
10317  *)
10318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10319for as_dir in $PATH
10320do
10321  IFS=$as_save_IFS
10322  test -z "$as_dir" && as_dir=.
10323    for ac_exec_ext in '' $ac_executable_extensions; do
10324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10325    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10327    break 2
10328  fi
10329done
10330  done
10331IFS=$as_save_IFS
10332
10333  ;;
10334esac
10335fi
10336RM=$ac_cv_path_RM
10337if test -n "$RM"; then
10338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10339$as_echo "$RM" >&6; }
10340else
10341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10342$as_echo "no" >&6; }
10343fi
10344
10345
10346  test -n "$RM" && break
10347done
10348
10349  else
10350    # The variable is set, but is it from the command line or the environment?
10351
10352    # Try to remove the string !RM! from our list.
10353    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10354    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10355      # If it failed, the variable was not from the command line. Ignore it,
10356      # but warn the user (except for BASH, which is always set by the calling BASH).
10357      if test "xRM" != xBASH; then
10358        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10359$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10360      fi
10361      # Try to locate tool using the code snippet
10362      for ac_prog in rm
10363do
10364  # Extract the first word of "$ac_prog", so it can be a program name with args.
10365set dummy $ac_prog; ac_word=$2
10366{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10367$as_echo_n "checking for $ac_word... " >&6; }
10368if ${ac_cv_path_RM+:} false; then :
10369  $as_echo_n "(cached) " >&6
10370else
10371  case $RM in
10372  [\\/]* | ?:[\\/]*)
10373  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10374  ;;
10375  *)
10376  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10377for as_dir in $PATH
10378do
10379  IFS=$as_save_IFS
10380  test -z "$as_dir" && as_dir=.
10381    for ac_exec_ext in '' $ac_executable_extensions; do
10382  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10383    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10384    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10385    break 2
10386  fi
10387done
10388  done
10389IFS=$as_save_IFS
10390
10391  ;;
10392esac
10393fi
10394RM=$ac_cv_path_RM
10395if test -n "$RM"; then
10396  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10397$as_echo "$RM" >&6; }
10398else
10399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10400$as_echo "no" >&6; }
10401fi
10402
10403
10404  test -n "$RM" && break
10405done
10406
10407    else
10408      # If it succeeded, then it was overridden by the user. We will use it
10409      # for the tool.
10410
10411      # First remove it from the list of overridden variables, so we can test
10412      # for unknown variables in the end.
10413      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10414
10415      # Check if we try to supply an empty value
10416      if test "x$RM" = x; then
10417        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10418$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10419        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10420$as_echo_n "checking for RM... " >&6; }
10421        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10422$as_echo "disabled" >&6; }
10423      else
10424        # Check if the provided tool contains a complete path.
10425        tool_specified="$RM"
10426        tool_basename="${tool_specified##*/}"
10427        if test "x$tool_basename" = "x$tool_specified"; then
10428          # A command without a complete path is provided, search $PATH.
10429          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10430$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10431          # Extract the first word of "$tool_basename", so it can be a program name with args.
10432set dummy $tool_basename; ac_word=$2
10433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10434$as_echo_n "checking for $ac_word... " >&6; }
10435if ${ac_cv_path_RM+:} false; then :
10436  $as_echo_n "(cached) " >&6
10437else
10438  case $RM in
10439  [\\/]* | ?:[\\/]*)
10440  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10441  ;;
10442  *)
10443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10444for as_dir in $PATH
10445do
10446  IFS=$as_save_IFS
10447  test -z "$as_dir" && as_dir=.
10448    for ac_exec_ext in '' $ac_executable_extensions; do
10449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10450    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10452    break 2
10453  fi
10454done
10455  done
10456IFS=$as_save_IFS
10457
10458  ;;
10459esac
10460fi
10461RM=$ac_cv_path_RM
10462if test -n "$RM"; then
10463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10464$as_echo "$RM" >&6; }
10465else
10466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10467$as_echo "no" >&6; }
10468fi
10469
10470
10471          if test "x$RM" = x; then
10472            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10473          fi
10474        else
10475          # Otherwise we believe it is a complete path. Use it as it is.
10476          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10477$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10478          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10479$as_echo_n "checking for RM... " >&6; }
10480          if test ! -x "$tool_specified"; then
10481            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10482$as_echo "not found" >&6; }
10483            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10484          fi
10485          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10486$as_echo "$tool_specified" >&6; }
10487        fi
10488      fi
10489    fi
10490
10491  fi
10492
10493
10494
10495  if test "x$RM" = x; then
10496    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10497  fi
10498
10499
10500
10501
10502
10503  # Publish this variable in the help.
10504
10505
10506  if [ -z "${RMDIR+x}" ]; then
10507    # The variable is not set by user, try to locate tool using the code snippet
10508    for ac_prog in rmdir
10509do
10510  # Extract the first word of "$ac_prog", so it can be a program name with args.
10511set dummy $ac_prog; ac_word=$2
10512{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10513$as_echo_n "checking for $ac_word... " >&6; }
10514if ${ac_cv_path_RMDIR+:} false; then :
10515  $as_echo_n "(cached) " >&6
10516else
10517  case $RMDIR in
10518  [\\/]* | ?:[\\/]*)
10519  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10520  ;;
10521  *)
10522  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10523for as_dir in $PATH
10524do
10525  IFS=$as_save_IFS
10526  test -z "$as_dir" && as_dir=.
10527    for ac_exec_ext in '' $ac_executable_extensions; do
10528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10529    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10531    break 2
10532  fi
10533done
10534  done
10535IFS=$as_save_IFS
10536
10537  ;;
10538esac
10539fi
10540RMDIR=$ac_cv_path_RMDIR
10541if test -n "$RMDIR"; then
10542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10543$as_echo "$RMDIR" >&6; }
10544else
10545  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10546$as_echo "no" >&6; }
10547fi
10548
10549
10550  test -n "$RMDIR" && break
10551done
10552
10553  else
10554    # The variable is set, but is it from the command line or the environment?
10555
10556    # Try to remove the string !RMDIR! from our list.
10557    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10558    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10559      # If it failed, the variable was not from the command line. Ignore it,
10560      # but warn the user (except for BASH, which is always set by the calling BASH).
10561      if test "xRMDIR" != xBASH; then
10562        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10563$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10564      fi
10565      # Try to locate tool using the code snippet
10566      for ac_prog in rmdir
10567do
10568  # Extract the first word of "$ac_prog", so it can be a program name with args.
10569set dummy $ac_prog; ac_word=$2
10570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10571$as_echo_n "checking for $ac_word... " >&6; }
10572if ${ac_cv_path_RMDIR+:} false; then :
10573  $as_echo_n "(cached) " >&6
10574else
10575  case $RMDIR in
10576  [\\/]* | ?:[\\/]*)
10577  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10578  ;;
10579  *)
10580  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10581for as_dir in $PATH
10582do
10583  IFS=$as_save_IFS
10584  test -z "$as_dir" && as_dir=.
10585    for ac_exec_ext in '' $ac_executable_extensions; do
10586  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10587    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10588    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10589    break 2
10590  fi
10591done
10592  done
10593IFS=$as_save_IFS
10594
10595  ;;
10596esac
10597fi
10598RMDIR=$ac_cv_path_RMDIR
10599if test -n "$RMDIR"; then
10600  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10601$as_echo "$RMDIR" >&6; }
10602else
10603  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10604$as_echo "no" >&6; }
10605fi
10606
10607
10608  test -n "$RMDIR" && break
10609done
10610
10611    else
10612      # If it succeeded, then it was overridden by the user. We will use it
10613      # for the tool.
10614
10615      # First remove it from the list of overridden variables, so we can test
10616      # for unknown variables in the end.
10617      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10618
10619      # Check if we try to supply an empty value
10620      if test "x$RMDIR" = x; then
10621        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10622$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10623        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10624$as_echo_n "checking for RMDIR... " >&6; }
10625        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10626$as_echo "disabled" >&6; }
10627      else
10628        # Check if the provided tool contains a complete path.
10629        tool_specified="$RMDIR"
10630        tool_basename="${tool_specified##*/}"
10631        if test "x$tool_basename" = "x$tool_specified"; then
10632          # A command without a complete path is provided, search $PATH.
10633          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10634$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10635          # Extract the first word of "$tool_basename", so it can be a program name with args.
10636set dummy $tool_basename; ac_word=$2
10637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10638$as_echo_n "checking for $ac_word... " >&6; }
10639if ${ac_cv_path_RMDIR+:} false; then :
10640  $as_echo_n "(cached) " >&6
10641else
10642  case $RMDIR in
10643  [\\/]* | ?:[\\/]*)
10644  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10645  ;;
10646  *)
10647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10648for as_dir in $PATH
10649do
10650  IFS=$as_save_IFS
10651  test -z "$as_dir" && as_dir=.
10652    for ac_exec_ext in '' $ac_executable_extensions; do
10653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10654    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10656    break 2
10657  fi
10658done
10659  done
10660IFS=$as_save_IFS
10661
10662  ;;
10663esac
10664fi
10665RMDIR=$ac_cv_path_RMDIR
10666if test -n "$RMDIR"; then
10667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10668$as_echo "$RMDIR" >&6; }
10669else
10670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10671$as_echo "no" >&6; }
10672fi
10673
10674
10675          if test "x$RMDIR" = x; then
10676            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10677          fi
10678        else
10679          # Otherwise we believe it is a complete path. Use it as it is.
10680          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10681$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10682          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10683$as_echo_n "checking for RMDIR... " >&6; }
10684          if test ! -x "$tool_specified"; then
10685            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10686$as_echo "not found" >&6; }
10687            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10688          fi
10689          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10690$as_echo "$tool_specified" >&6; }
10691        fi
10692      fi
10693    fi
10694
10695  fi
10696
10697
10698
10699  if test "x$RMDIR" = x; then
10700    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10701  fi
10702
10703
10704
10705
10706
10707  # Publish this variable in the help.
10708
10709
10710  if [ -z "${SH+x}" ]; then
10711    # The variable is not set by user, try to locate tool using the code snippet
10712    for ac_prog in sh
10713do
10714  # Extract the first word of "$ac_prog", so it can be a program name with args.
10715set dummy $ac_prog; ac_word=$2
10716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10717$as_echo_n "checking for $ac_word... " >&6; }
10718if ${ac_cv_path_SH+:} false; then :
10719  $as_echo_n "(cached) " >&6
10720else
10721  case $SH in
10722  [\\/]* | ?:[\\/]*)
10723  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10724  ;;
10725  *)
10726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10727for as_dir in $PATH
10728do
10729  IFS=$as_save_IFS
10730  test -z "$as_dir" && as_dir=.
10731    for ac_exec_ext in '' $ac_executable_extensions; do
10732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10733    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10735    break 2
10736  fi
10737done
10738  done
10739IFS=$as_save_IFS
10740
10741  ;;
10742esac
10743fi
10744SH=$ac_cv_path_SH
10745if test -n "$SH"; then
10746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10747$as_echo "$SH" >&6; }
10748else
10749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10750$as_echo "no" >&6; }
10751fi
10752
10753
10754  test -n "$SH" && break
10755done
10756
10757  else
10758    # The variable is set, but is it from the command line or the environment?
10759
10760    # Try to remove the string !SH! from our list.
10761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10763      # If it failed, the variable was not from the command line. Ignore it,
10764      # but warn the user (except for BASH, which is always set by the calling BASH).
10765      if test "xSH" != xBASH; then
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10767$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10768      fi
10769      # Try to locate tool using the code snippet
10770      for ac_prog in sh
10771do
10772  # Extract the first word of "$ac_prog", so it can be a program name with args.
10773set dummy $ac_prog; ac_word=$2
10774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10775$as_echo_n "checking for $ac_word... " >&6; }
10776if ${ac_cv_path_SH+:} false; then :
10777  $as_echo_n "(cached) " >&6
10778else
10779  case $SH in
10780  [\\/]* | ?:[\\/]*)
10781  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10782  ;;
10783  *)
10784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10785for as_dir in $PATH
10786do
10787  IFS=$as_save_IFS
10788  test -z "$as_dir" && as_dir=.
10789    for ac_exec_ext in '' $ac_executable_extensions; do
10790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10791    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10793    break 2
10794  fi
10795done
10796  done
10797IFS=$as_save_IFS
10798
10799  ;;
10800esac
10801fi
10802SH=$ac_cv_path_SH
10803if test -n "$SH"; then
10804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10805$as_echo "$SH" >&6; }
10806else
10807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10808$as_echo "no" >&6; }
10809fi
10810
10811
10812  test -n "$SH" && break
10813done
10814
10815    else
10816      # If it succeeded, then it was overridden by the user. We will use it
10817      # for the tool.
10818
10819      # First remove it from the list of overridden variables, so we can test
10820      # for unknown variables in the end.
10821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10822
10823      # Check if we try to supply an empty value
10824      if test "x$SH" = x; then
10825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10826$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10828$as_echo_n "checking for SH... " >&6; }
10829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10830$as_echo "disabled" >&6; }
10831      else
10832        # Check if the provided tool contains a complete path.
10833        tool_specified="$SH"
10834        tool_basename="${tool_specified##*/}"
10835        if test "x$tool_basename" = "x$tool_specified"; then
10836          # A command without a complete path is provided, search $PATH.
10837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10838$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10839          # Extract the first word of "$tool_basename", so it can be a program name with args.
10840set dummy $tool_basename; ac_word=$2
10841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10842$as_echo_n "checking for $ac_word... " >&6; }
10843if ${ac_cv_path_SH+:} false; then :
10844  $as_echo_n "(cached) " >&6
10845else
10846  case $SH in
10847  [\\/]* | ?:[\\/]*)
10848  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10849  ;;
10850  *)
10851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10852for as_dir in $PATH
10853do
10854  IFS=$as_save_IFS
10855  test -z "$as_dir" && as_dir=.
10856    for ac_exec_ext in '' $ac_executable_extensions; do
10857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10858    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10860    break 2
10861  fi
10862done
10863  done
10864IFS=$as_save_IFS
10865
10866  ;;
10867esac
10868fi
10869SH=$ac_cv_path_SH
10870if test -n "$SH"; then
10871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10872$as_echo "$SH" >&6; }
10873else
10874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10875$as_echo "no" >&6; }
10876fi
10877
10878
10879          if test "x$SH" = x; then
10880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10881          fi
10882        else
10883          # Otherwise we believe it is a complete path. Use it as it is.
10884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10885$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10887$as_echo_n "checking for SH... " >&6; }
10888          if test ! -x "$tool_specified"; then
10889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10890$as_echo "not found" >&6; }
10891            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10892          fi
10893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10894$as_echo "$tool_specified" >&6; }
10895        fi
10896      fi
10897    fi
10898
10899  fi
10900
10901
10902
10903  if test "x$SH" = x; then
10904    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10905  fi
10906
10907
10908
10909
10910
10911  # Publish this variable in the help.
10912
10913
10914  if [ -z "${SORT+x}" ]; then
10915    # The variable is not set by user, try to locate tool using the code snippet
10916    for ac_prog in sort
10917do
10918  # Extract the first word of "$ac_prog", so it can be a program name with args.
10919set dummy $ac_prog; ac_word=$2
10920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10921$as_echo_n "checking for $ac_word... " >&6; }
10922if ${ac_cv_path_SORT+:} false; then :
10923  $as_echo_n "(cached) " >&6
10924else
10925  case $SORT in
10926  [\\/]* | ?:[\\/]*)
10927  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10928  ;;
10929  *)
10930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10931for as_dir in $PATH
10932do
10933  IFS=$as_save_IFS
10934  test -z "$as_dir" && as_dir=.
10935    for ac_exec_ext in '' $ac_executable_extensions; do
10936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10937    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10939    break 2
10940  fi
10941done
10942  done
10943IFS=$as_save_IFS
10944
10945  ;;
10946esac
10947fi
10948SORT=$ac_cv_path_SORT
10949if test -n "$SORT"; then
10950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10951$as_echo "$SORT" >&6; }
10952else
10953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10954$as_echo "no" >&6; }
10955fi
10956
10957
10958  test -n "$SORT" && break
10959done
10960
10961  else
10962    # The variable is set, but is it from the command line or the environment?
10963
10964    # Try to remove the string !SORT! from our list.
10965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10967      # If it failed, the variable was not from the command line. Ignore it,
10968      # but warn the user (except for BASH, which is always set by the calling BASH).
10969      if test "xSORT" != xBASH; then
10970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10971$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10972      fi
10973      # Try to locate tool using the code snippet
10974      for ac_prog in sort
10975do
10976  # Extract the first word of "$ac_prog", so it can be a program name with args.
10977set dummy $ac_prog; ac_word=$2
10978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10979$as_echo_n "checking for $ac_word... " >&6; }
10980if ${ac_cv_path_SORT+:} false; then :
10981  $as_echo_n "(cached) " >&6
10982else
10983  case $SORT in
10984  [\\/]* | ?:[\\/]*)
10985  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10986  ;;
10987  *)
10988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10989for as_dir in $PATH
10990do
10991  IFS=$as_save_IFS
10992  test -z "$as_dir" && as_dir=.
10993    for ac_exec_ext in '' $ac_executable_extensions; do
10994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10995    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10997    break 2
10998  fi
10999done
11000  done
11001IFS=$as_save_IFS
11002
11003  ;;
11004esac
11005fi
11006SORT=$ac_cv_path_SORT
11007if test -n "$SORT"; then
11008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11009$as_echo "$SORT" >&6; }
11010else
11011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11012$as_echo "no" >&6; }
11013fi
11014
11015
11016  test -n "$SORT" && break
11017done
11018
11019    else
11020      # If it succeeded, then it was overridden by the user. We will use it
11021      # for the tool.
11022
11023      # First remove it from the list of overridden variables, so we can test
11024      # for unknown variables in the end.
11025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11026
11027      # Check if we try to supply an empty value
11028      if test "x$SORT" = x; then
11029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
11030$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
11031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11032$as_echo_n "checking for SORT... " >&6; }
11033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11034$as_echo "disabled" >&6; }
11035      else
11036        # Check if the provided tool contains a complete path.
11037        tool_specified="$SORT"
11038        tool_basename="${tool_specified##*/}"
11039        if test "x$tool_basename" = "x$tool_specified"; then
11040          # A command without a complete path is provided, search $PATH.
11041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11042$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11043          # Extract the first word of "$tool_basename", so it can be a program name with args.
11044set dummy $tool_basename; ac_word=$2
11045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11046$as_echo_n "checking for $ac_word... " >&6; }
11047if ${ac_cv_path_SORT+:} false; then :
11048  $as_echo_n "(cached) " >&6
11049else
11050  case $SORT in
11051  [\\/]* | ?:[\\/]*)
11052  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11053  ;;
11054  *)
11055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11056for as_dir in $PATH
11057do
11058  IFS=$as_save_IFS
11059  test -z "$as_dir" && as_dir=.
11060    for ac_exec_ext in '' $ac_executable_extensions; do
11061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11062    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11064    break 2
11065  fi
11066done
11067  done
11068IFS=$as_save_IFS
11069
11070  ;;
11071esac
11072fi
11073SORT=$ac_cv_path_SORT
11074if test -n "$SORT"; then
11075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11076$as_echo "$SORT" >&6; }
11077else
11078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11079$as_echo "no" >&6; }
11080fi
11081
11082
11083          if test "x$SORT" = x; then
11084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11085          fi
11086        else
11087          # Otherwise we believe it is a complete path. Use it as it is.
11088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11089$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11091$as_echo_n "checking for SORT... " >&6; }
11092          if test ! -x "$tool_specified"; then
11093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11094$as_echo "not found" >&6; }
11095            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11096          fi
11097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11098$as_echo "$tool_specified" >&6; }
11099        fi
11100      fi
11101    fi
11102
11103  fi
11104
11105
11106
11107  if test "x$SORT" = x; then
11108    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11109  fi
11110
11111
11112
11113
11114
11115  # Publish this variable in the help.
11116
11117
11118  if [ -z "${TAIL+x}" ]; then
11119    # The variable is not set by user, try to locate tool using the code snippet
11120    for ac_prog in tail
11121do
11122  # Extract the first word of "$ac_prog", so it can be a program name with args.
11123set dummy $ac_prog; ac_word=$2
11124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11125$as_echo_n "checking for $ac_word... " >&6; }
11126if ${ac_cv_path_TAIL+:} false; then :
11127  $as_echo_n "(cached) " >&6
11128else
11129  case $TAIL in
11130  [\\/]* | ?:[\\/]*)
11131  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11132  ;;
11133  *)
11134  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11135for as_dir in $PATH
11136do
11137  IFS=$as_save_IFS
11138  test -z "$as_dir" && as_dir=.
11139    for ac_exec_ext in '' $ac_executable_extensions; do
11140  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11141    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11142    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11143    break 2
11144  fi
11145done
11146  done
11147IFS=$as_save_IFS
11148
11149  ;;
11150esac
11151fi
11152TAIL=$ac_cv_path_TAIL
11153if test -n "$TAIL"; then
11154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11155$as_echo "$TAIL" >&6; }
11156else
11157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11158$as_echo "no" >&6; }
11159fi
11160
11161
11162  test -n "$TAIL" && break
11163done
11164
11165  else
11166    # The variable is set, but is it from the command line or the environment?
11167
11168    # Try to remove the string !TAIL! from our list.
11169    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11170    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11171      # If it failed, the variable was not from the command line. Ignore it,
11172      # but warn the user (except for BASH, which is always set by the calling BASH).
11173      if test "xTAIL" != xBASH; then
11174        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11175$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11176      fi
11177      # Try to locate tool using the code snippet
11178      for ac_prog in tail
11179do
11180  # Extract the first word of "$ac_prog", so it can be a program name with args.
11181set dummy $ac_prog; ac_word=$2
11182{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11183$as_echo_n "checking for $ac_word... " >&6; }
11184if ${ac_cv_path_TAIL+:} false; then :
11185  $as_echo_n "(cached) " >&6
11186else
11187  case $TAIL in
11188  [\\/]* | ?:[\\/]*)
11189  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11190  ;;
11191  *)
11192  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11193for as_dir in $PATH
11194do
11195  IFS=$as_save_IFS
11196  test -z "$as_dir" && as_dir=.
11197    for ac_exec_ext in '' $ac_executable_extensions; do
11198  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11199    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11200    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11201    break 2
11202  fi
11203done
11204  done
11205IFS=$as_save_IFS
11206
11207  ;;
11208esac
11209fi
11210TAIL=$ac_cv_path_TAIL
11211if test -n "$TAIL"; then
11212  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11213$as_echo "$TAIL" >&6; }
11214else
11215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11216$as_echo "no" >&6; }
11217fi
11218
11219
11220  test -n "$TAIL" && break
11221done
11222
11223    else
11224      # If it succeeded, then it was overridden by the user. We will use it
11225      # for the tool.
11226
11227      # First remove it from the list of overridden variables, so we can test
11228      # for unknown variables in the end.
11229      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11230
11231      # Check if we try to supply an empty value
11232      if test "x$TAIL" = x; then
11233        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11234$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11235        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11236$as_echo_n "checking for TAIL... " >&6; }
11237        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11238$as_echo "disabled" >&6; }
11239      else
11240        # Check if the provided tool contains a complete path.
11241        tool_specified="$TAIL"
11242        tool_basename="${tool_specified##*/}"
11243        if test "x$tool_basename" = "x$tool_specified"; then
11244          # A command without a complete path is provided, search $PATH.
11245          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11246$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11247          # Extract the first word of "$tool_basename", so it can be a program name with args.
11248set dummy $tool_basename; ac_word=$2
11249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11250$as_echo_n "checking for $ac_word... " >&6; }
11251if ${ac_cv_path_TAIL+:} false; then :
11252  $as_echo_n "(cached) " >&6
11253else
11254  case $TAIL in
11255  [\\/]* | ?:[\\/]*)
11256  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11257  ;;
11258  *)
11259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11260for as_dir in $PATH
11261do
11262  IFS=$as_save_IFS
11263  test -z "$as_dir" && as_dir=.
11264    for ac_exec_ext in '' $ac_executable_extensions; do
11265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11266    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11268    break 2
11269  fi
11270done
11271  done
11272IFS=$as_save_IFS
11273
11274  ;;
11275esac
11276fi
11277TAIL=$ac_cv_path_TAIL
11278if test -n "$TAIL"; then
11279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11280$as_echo "$TAIL" >&6; }
11281else
11282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11283$as_echo "no" >&6; }
11284fi
11285
11286
11287          if test "x$TAIL" = x; then
11288            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11289          fi
11290        else
11291          # Otherwise we believe it is a complete path. Use it as it is.
11292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11293$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11294          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11295$as_echo_n "checking for TAIL... " >&6; }
11296          if test ! -x "$tool_specified"; then
11297            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11298$as_echo "not found" >&6; }
11299            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11300          fi
11301          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11302$as_echo "$tool_specified" >&6; }
11303        fi
11304      fi
11305    fi
11306
11307  fi
11308
11309
11310
11311  if test "x$TAIL" = x; then
11312    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11313  fi
11314
11315
11316
11317
11318
11319  # Publish this variable in the help.
11320
11321
11322  if [ -z "${TAR+x}" ]; then
11323    # The variable is not set by user, try to locate tool using the code snippet
11324    for ac_prog in gtar tar
11325do
11326  # Extract the first word of "$ac_prog", so it can be a program name with args.
11327set dummy $ac_prog; ac_word=$2
11328{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11329$as_echo_n "checking for $ac_word... " >&6; }
11330if ${ac_cv_path_TAR+:} false; then :
11331  $as_echo_n "(cached) " >&6
11332else
11333  case $TAR in
11334  [\\/]* | ?:[\\/]*)
11335  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11336  ;;
11337  *)
11338  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11339for as_dir in $PATH
11340do
11341  IFS=$as_save_IFS
11342  test -z "$as_dir" && as_dir=.
11343    for ac_exec_ext in '' $ac_executable_extensions; do
11344  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11345    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11346    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11347    break 2
11348  fi
11349done
11350  done
11351IFS=$as_save_IFS
11352
11353  ;;
11354esac
11355fi
11356TAR=$ac_cv_path_TAR
11357if test -n "$TAR"; then
11358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11359$as_echo "$TAR" >&6; }
11360else
11361  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11362$as_echo "no" >&6; }
11363fi
11364
11365
11366  test -n "$TAR" && break
11367done
11368
11369  else
11370    # The variable is set, but is it from the command line or the environment?
11371
11372    # Try to remove the string !TAR! from our list.
11373    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11374    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11375      # If it failed, the variable was not from the command line. Ignore it,
11376      # but warn the user (except for BASH, which is always set by the calling BASH).
11377      if test "xTAR" != xBASH; then
11378        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11379$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11380      fi
11381      # Try to locate tool using the code snippet
11382      for ac_prog in gtar tar
11383do
11384  # Extract the first word of "$ac_prog", so it can be a program name with args.
11385set dummy $ac_prog; ac_word=$2
11386{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11387$as_echo_n "checking for $ac_word... " >&6; }
11388if ${ac_cv_path_TAR+:} false; then :
11389  $as_echo_n "(cached) " >&6
11390else
11391  case $TAR in
11392  [\\/]* | ?:[\\/]*)
11393  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11394  ;;
11395  *)
11396  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11397for as_dir in $PATH
11398do
11399  IFS=$as_save_IFS
11400  test -z "$as_dir" && as_dir=.
11401    for ac_exec_ext in '' $ac_executable_extensions; do
11402  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11403    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11404    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11405    break 2
11406  fi
11407done
11408  done
11409IFS=$as_save_IFS
11410
11411  ;;
11412esac
11413fi
11414TAR=$ac_cv_path_TAR
11415if test -n "$TAR"; then
11416  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11417$as_echo "$TAR" >&6; }
11418else
11419  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11420$as_echo "no" >&6; }
11421fi
11422
11423
11424  test -n "$TAR" && break
11425done
11426
11427    else
11428      # If it succeeded, then it was overridden by the user. We will use it
11429      # for the tool.
11430
11431      # First remove it from the list of overridden variables, so we can test
11432      # for unknown variables in the end.
11433      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11434
11435      # Check if we try to supply an empty value
11436      if test "x$TAR" = x; then
11437        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11438$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11439        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11440$as_echo_n "checking for TAR... " >&6; }
11441        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11442$as_echo "disabled" >&6; }
11443      else
11444        # Check if the provided tool contains a complete path.
11445        tool_specified="$TAR"
11446        tool_basename="${tool_specified##*/}"
11447        if test "x$tool_basename" = "x$tool_specified"; then
11448          # A command without a complete path is provided, search $PATH.
11449          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11450$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11451          # Extract the first word of "$tool_basename", so it can be a program name with args.
11452set dummy $tool_basename; ac_word=$2
11453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11454$as_echo_n "checking for $ac_word... " >&6; }
11455if ${ac_cv_path_TAR+:} false; then :
11456  $as_echo_n "(cached) " >&6
11457else
11458  case $TAR in
11459  [\\/]* | ?:[\\/]*)
11460  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11461  ;;
11462  *)
11463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11464for as_dir in $PATH
11465do
11466  IFS=$as_save_IFS
11467  test -z "$as_dir" && as_dir=.
11468    for ac_exec_ext in '' $ac_executable_extensions; do
11469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11470    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11472    break 2
11473  fi
11474done
11475  done
11476IFS=$as_save_IFS
11477
11478  ;;
11479esac
11480fi
11481TAR=$ac_cv_path_TAR
11482if test -n "$TAR"; then
11483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11484$as_echo "$TAR" >&6; }
11485else
11486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11487$as_echo "no" >&6; }
11488fi
11489
11490
11491          if test "x$TAR" = x; then
11492            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11493          fi
11494        else
11495          # Otherwise we believe it is a complete path. Use it as it is.
11496          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11497$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11498          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11499$as_echo_n "checking for TAR... " >&6; }
11500          if test ! -x "$tool_specified"; then
11501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11502$as_echo "not found" >&6; }
11503            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11504          fi
11505          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11506$as_echo "$tool_specified" >&6; }
11507        fi
11508      fi
11509    fi
11510
11511  fi
11512
11513
11514
11515  if test "x$TAR" = x; then
11516    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11517  fi
11518
11519
11520
11521
11522
11523  # Publish this variable in the help.
11524
11525
11526  if [ -z "${TEE+x}" ]; then
11527    # The variable is not set by user, try to locate tool using the code snippet
11528    for ac_prog in tee
11529do
11530  # Extract the first word of "$ac_prog", so it can be a program name with args.
11531set dummy $ac_prog; ac_word=$2
11532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11533$as_echo_n "checking for $ac_word... " >&6; }
11534if ${ac_cv_path_TEE+:} false; then :
11535  $as_echo_n "(cached) " >&6
11536else
11537  case $TEE in
11538  [\\/]* | ?:[\\/]*)
11539  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11540  ;;
11541  *)
11542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11543for as_dir in $PATH
11544do
11545  IFS=$as_save_IFS
11546  test -z "$as_dir" && as_dir=.
11547    for ac_exec_ext in '' $ac_executable_extensions; do
11548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11549    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11551    break 2
11552  fi
11553done
11554  done
11555IFS=$as_save_IFS
11556
11557  ;;
11558esac
11559fi
11560TEE=$ac_cv_path_TEE
11561if test -n "$TEE"; then
11562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11563$as_echo "$TEE" >&6; }
11564else
11565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11566$as_echo "no" >&6; }
11567fi
11568
11569
11570  test -n "$TEE" && break
11571done
11572
11573  else
11574    # The variable is set, but is it from the command line or the environment?
11575
11576    # Try to remove the string !TEE! from our list.
11577    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11578    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11579      # If it failed, the variable was not from the command line. Ignore it,
11580      # but warn the user (except for BASH, which is always set by the calling BASH).
11581      if test "xTEE" != xBASH; then
11582        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11583$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11584      fi
11585      # Try to locate tool using the code snippet
11586      for ac_prog in tee
11587do
11588  # Extract the first word of "$ac_prog", so it can be a program name with args.
11589set dummy $ac_prog; ac_word=$2
11590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11591$as_echo_n "checking for $ac_word... " >&6; }
11592if ${ac_cv_path_TEE+:} false; then :
11593  $as_echo_n "(cached) " >&6
11594else
11595  case $TEE in
11596  [\\/]* | ?:[\\/]*)
11597  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11598  ;;
11599  *)
11600  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11601for as_dir in $PATH
11602do
11603  IFS=$as_save_IFS
11604  test -z "$as_dir" && as_dir=.
11605    for ac_exec_ext in '' $ac_executable_extensions; do
11606  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11607    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11608    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11609    break 2
11610  fi
11611done
11612  done
11613IFS=$as_save_IFS
11614
11615  ;;
11616esac
11617fi
11618TEE=$ac_cv_path_TEE
11619if test -n "$TEE"; then
11620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11621$as_echo "$TEE" >&6; }
11622else
11623  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11624$as_echo "no" >&6; }
11625fi
11626
11627
11628  test -n "$TEE" && break
11629done
11630
11631    else
11632      # If it succeeded, then it was overridden by the user. We will use it
11633      # for the tool.
11634
11635      # First remove it from the list of overridden variables, so we can test
11636      # for unknown variables in the end.
11637      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11638
11639      # Check if we try to supply an empty value
11640      if test "x$TEE" = x; then
11641        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11642$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11643        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11644$as_echo_n "checking for TEE... " >&6; }
11645        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11646$as_echo "disabled" >&6; }
11647      else
11648        # Check if the provided tool contains a complete path.
11649        tool_specified="$TEE"
11650        tool_basename="${tool_specified##*/}"
11651        if test "x$tool_basename" = "x$tool_specified"; then
11652          # A command without a complete path is provided, search $PATH.
11653          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11654$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11655          # Extract the first word of "$tool_basename", so it can be a program name with args.
11656set dummy $tool_basename; ac_word=$2
11657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11658$as_echo_n "checking for $ac_word... " >&6; }
11659if ${ac_cv_path_TEE+:} false; then :
11660  $as_echo_n "(cached) " >&6
11661else
11662  case $TEE in
11663  [\\/]* | ?:[\\/]*)
11664  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11665  ;;
11666  *)
11667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11668for as_dir in $PATH
11669do
11670  IFS=$as_save_IFS
11671  test -z "$as_dir" && as_dir=.
11672    for ac_exec_ext in '' $ac_executable_extensions; do
11673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11674    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11676    break 2
11677  fi
11678done
11679  done
11680IFS=$as_save_IFS
11681
11682  ;;
11683esac
11684fi
11685TEE=$ac_cv_path_TEE
11686if test -n "$TEE"; then
11687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11688$as_echo "$TEE" >&6; }
11689else
11690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11691$as_echo "no" >&6; }
11692fi
11693
11694
11695          if test "x$TEE" = x; then
11696            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11697          fi
11698        else
11699          # Otherwise we believe it is a complete path. Use it as it is.
11700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11701$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11702          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11703$as_echo_n "checking for TEE... " >&6; }
11704          if test ! -x "$tool_specified"; then
11705            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11706$as_echo "not found" >&6; }
11707            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11708          fi
11709          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11710$as_echo "$tool_specified" >&6; }
11711        fi
11712      fi
11713    fi
11714
11715  fi
11716
11717
11718
11719  if test "x$TEE" = x; then
11720    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11721  fi
11722
11723
11724
11725
11726
11727  # Publish this variable in the help.
11728
11729
11730  if [ -z "${TOUCH+x}" ]; then
11731    # The variable is not set by user, try to locate tool using the code snippet
11732    for ac_prog in touch
11733do
11734  # Extract the first word of "$ac_prog", so it can be a program name with args.
11735set dummy $ac_prog; ac_word=$2
11736{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11737$as_echo_n "checking for $ac_word... " >&6; }
11738if ${ac_cv_path_TOUCH+:} false; then :
11739  $as_echo_n "(cached) " >&6
11740else
11741  case $TOUCH in
11742  [\\/]* | ?:[\\/]*)
11743  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11744  ;;
11745  *)
11746  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11747for as_dir in $PATH
11748do
11749  IFS=$as_save_IFS
11750  test -z "$as_dir" && as_dir=.
11751    for ac_exec_ext in '' $ac_executable_extensions; do
11752  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11753    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11754    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11755    break 2
11756  fi
11757done
11758  done
11759IFS=$as_save_IFS
11760
11761  ;;
11762esac
11763fi
11764TOUCH=$ac_cv_path_TOUCH
11765if test -n "$TOUCH"; then
11766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11767$as_echo "$TOUCH" >&6; }
11768else
11769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11770$as_echo "no" >&6; }
11771fi
11772
11773
11774  test -n "$TOUCH" && break
11775done
11776
11777  else
11778    # The variable is set, but is it from the command line or the environment?
11779
11780    # Try to remove the string !TOUCH! from our list.
11781    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11782    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11783      # If it failed, the variable was not from the command line. Ignore it,
11784      # but warn the user (except for BASH, which is always set by the calling BASH).
11785      if test "xTOUCH" != xBASH; then
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11787$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11788      fi
11789      # Try to locate tool using the code snippet
11790      for ac_prog in touch
11791do
11792  # Extract the first word of "$ac_prog", so it can be a program name with args.
11793set dummy $ac_prog; ac_word=$2
11794{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11795$as_echo_n "checking for $ac_word... " >&6; }
11796if ${ac_cv_path_TOUCH+:} false; then :
11797  $as_echo_n "(cached) " >&6
11798else
11799  case $TOUCH in
11800  [\\/]* | ?:[\\/]*)
11801  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11802  ;;
11803  *)
11804  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11805for as_dir in $PATH
11806do
11807  IFS=$as_save_IFS
11808  test -z "$as_dir" && as_dir=.
11809    for ac_exec_ext in '' $ac_executable_extensions; do
11810  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11811    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11812    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11813    break 2
11814  fi
11815done
11816  done
11817IFS=$as_save_IFS
11818
11819  ;;
11820esac
11821fi
11822TOUCH=$ac_cv_path_TOUCH
11823if test -n "$TOUCH"; then
11824  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11825$as_echo "$TOUCH" >&6; }
11826else
11827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11828$as_echo "no" >&6; }
11829fi
11830
11831
11832  test -n "$TOUCH" && break
11833done
11834
11835    else
11836      # If it succeeded, then it was overridden by the user. We will use it
11837      # for the tool.
11838
11839      # First remove it from the list of overridden variables, so we can test
11840      # for unknown variables in the end.
11841      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11842
11843      # Check if we try to supply an empty value
11844      if test "x$TOUCH" = x; then
11845        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11846$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11847        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11848$as_echo_n "checking for TOUCH... " >&6; }
11849        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11850$as_echo "disabled" >&6; }
11851      else
11852        # Check if the provided tool contains a complete path.
11853        tool_specified="$TOUCH"
11854        tool_basename="${tool_specified##*/}"
11855        if test "x$tool_basename" = "x$tool_specified"; then
11856          # A command without a complete path is provided, search $PATH.
11857          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11858$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11859          # Extract the first word of "$tool_basename", so it can be a program name with args.
11860set dummy $tool_basename; ac_word=$2
11861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11862$as_echo_n "checking for $ac_word... " >&6; }
11863if ${ac_cv_path_TOUCH+:} false; then :
11864  $as_echo_n "(cached) " >&6
11865else
11866  case $TOUCH in
11867  [\\/]* | ?:[\\/]*)
11868  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11869  ;;
11870  *)
11871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11872for as_dir in $PATH
11873do
11874  IFS=$as_save_IFS
11875  test -z "$as_dir" && as_dir=.
11876    for ac_exec_ext in '' $ac_executable_extensions; do
11877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11878    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11880    break 2
11881  fi
11882done
11883  done
11884IFS=$as_save_IFS
11885
11886  ;;
11887esac
11888fi
11889TOUCH=$ac_cv_path_TOUCH
11890if test -n "$TOUCH"; then
11891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11892$as_echo "$TOUCH" >&6; }
11893else
11894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11895$as_echo "no" >&6; }
11896fi
11897
11898
11899          if test "x$TOUCH" = x; then
11900            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11901          fi
11902        else
11903          # Otherwise we believe it is a complete path. Use it as it is.
11904          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11905$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11906          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11907$as_echo_n "checking for TOUCH... " >&6; }
11908          if test ! -x "$tool_specified"; then
11909            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11910$as_echo "not found" >&6; }
11911            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11912          fi
11913          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11914$as_echo "$tool_specified" >&6; }
11915        fi
11916      fi
11917    fi
11918
11919  fi
11920
11921
11922
11923  if test "x$TOUCH" = x; then
11924    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11925  fi
11926
11927
11928
11929
11930
11931  # Publish this variable in the help.
11932
11933
11934  if [ -z "${TR+x}" ]; then
11935    # The variable is not set by user, try to locate tool using the code snippet
11936    for ac_prog in tr
11937do
11938  # Extract the first word of "$ac_prog", so it can be a program name with args.
11939set dummy $ac_prog; ac_word=$2
11940{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11941$as_echo_n "checking for $ac_word... " >&6; }
11942if ${ac_cv_path_TR+:} false; then :
11943  $as_echo_n "(cached) " >&6
11944else
11945  case $TR in
11946  [\\/]* | ?:[\\/]*)
11947  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11948  ;;
11949  *)
11950  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11951for as_dir in $PATH
11952do
11953  IFS=$as_save_IFS
11954  test -z "$as_dir" && as_dir=.
11955    for ac_exec_ext in '' $ac_executable_extensions; do
11956  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11957    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11958    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11959    break 2
11960  fi
11961done
11962  done
11963IFS=$as_save_IFS
11964
11965  ;;
11966esac
11967fi
11968TR=$ac_cv_path_TR
11969if test -n "$TR"; then
11970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11971$as_echo "$TR" >&6; }
11972else
11973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11974$as_echo "no" >&6; }
11975fi
11976
11977
11978  test -n "$TR" && break
11979done
11980
11981  else
11982    # The variable is set, but is it from the command line or the environment?
11983
11984    # Try to remove the string !TR! from our list.
11985    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11986    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11987      # If it failed, the variable was not from the command line. Ignore it,
11988      # but warn the user (except for BASH, which is always set by the calling BASH).
11989      if test "xTR" != xBASH; then
11990        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11991$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11992      fi
11993      # Try to locate tool using the code snippet
11994      for ac_prog in tr
11995do
11996  # Extract the first word of "$ac_prog", so it can be a program name with args.
11997set dummy $ac_prog; ac_word=$2
11998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11999$as_echo_n "checking for $ac_word... " >&6; }
12000if ${ac_cv_path_TR+:} false; then :
12001  $as_echo_n "(cached) " >&6
12002else
12003  case $TR in
12004  [\\/]* | ?:[\\/]*)
12005  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12006  ;;
12007  *)
12008  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12009for as_dir in $PATH
12010do
12011  IFS=$as_save_IFS
12012  test -z "$as_dir" && as_dir=.
12013    for ac_exec_ext in '' $ac_executable_extensions; do
12014  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12015    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12016    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12017    break 2
12018  fi
12019done
12020  done
12021IFS=$as_save_IFS
12022
12023  ;;
12024esac
12025fi
12026TR=$ac_cv_path_TR
12027if test -n "$TR"; then
12028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12029$as_echo "$TR" >&6; }
12030else
12031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12032$as_echo "no" >&6; }
12033fi
12034
12035
12036  test -n "$TR" && break
12037done
12038
12039    else
12040      # If it succeeded, then it was overridden by the user. We will use it
12041      # for the tool.
12042
12043      # First remove it from the list of overridden variables, so we can test
12044      # for unknown variables in the end.
12045      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12046
12047      # Check if we try to supply an empty value
12048      if test "x$TR" = x; then
12049        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12050$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12051        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12052$as_echo_n "checking for TR... " >&6; }
12053        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12054$as_echo "disabled" >&6; }
12055      else
12056        # Check if the provided tool contains a complete path.
12057        tool_specified="$TR"
12058        tool_basename="${tool_specified##*/}"
12059        if test "x$tool_basename" = "x$tool_specified"; then
12060          # A command without a complete path is provided, search $PATH.
12061          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12062$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12063          # Extract the first word of "$tool_basename", so it can be a program name with args.
12064set dummy $tool_basename; ac_word=$2
12065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12066$as_echo_n "checking for $ac_word... " >&6; }
12067if ${ac_cv_path_TR+:} false; then :
12068  $as_echo_n "(cached) " >&6
12069else
12070  case $TR in
12071  [\\/]* | ?:[\\/]*)
12072  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12073  ;;
12074  *)
12075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12076for as_dir in $PATH
12077do
12078  IFS=$as_save_IFS
12079  test -z "$as_dir" && as_dir=.
12080    for ac_exec_ext in '' $ac_executable_extensions; do
12081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12082    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12084    break 2
12085  fi
12086done
12087  done
12088IFS=$as_save_IFS
12089
12090  ;;
12091esac
12092fi
12093TR=$ac_cv_path_TR
12094if test -n "$TR"; then
12095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12096$as_echo "$TR" >&6; }
12097else
12098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12099$as_echo "no" >&6; }
12100fi
12101
12102
12103          if test "x$TR" = x; then
12104            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12105          fi
12106        else
12107          # Otherwise we believe it is a complete path. Use it as it is.
12108          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12109$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12110          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12111$as_echo_n "checking for TR... " >&6; }
12112          if test ! -x "$tool_specified"; then
12113            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12114$as_echo "not found" >&6; }
12115            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12116          fi
12117          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12118$as_echo "$tool_specified" >&6; }
12119        fi
12120      fi
12121    fi
12122
12123  fi
12124
12125
12126
12127  if test "x$TR" = x; then
12128    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12129  fi
12130
12131
12132
12133
12134
12135  # Publish this variable in the help.
12136
12137
12138  if [ -z "${UNAME+x}" ]; then
12139    # The variable is not set by user, try to locate tool using the code snippet
12140    for ac_prog in uname
12141do
12142  # Extract the first word of "$ac_prog", so it can be a program name with args.
12143set dummy $ac_prog; ac_word=$2
12144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12145$as_echo_n "checking for $ac_word... " >&6; }
12146if ${ac_cv_path_UNAME+:} false; then :
12147  $as_echo_n "(cached) " >&6
12148else
12149  case $UNAME in
12150  [\\/]* | ?:[\\/]*)
12151  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12152  ;;
12153  *)
12154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12155for as_dir in $PATH
12156do
12157  IFS=$as_save_IFS
12158  test -z "$as_dir" && as_dir=.
12159    for ac_exec_ext in '' $ac_executable_extensions; do
12160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12161    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12163    break 2
12164  fi
12165done
12166  done
12167IFS=$as_save_IFS
12168
12169  ;;
12170esac
12171fi
12172UNAME=$ac_cv_path_UNAME
12173if test -n "$UNAME"; then
12174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12175$as_echo "$UNAME" >&6; }
12176else
12177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12178$as_echo "no" >&6; }
12179fi
12180
12181
12182  test -n "$UNAME" && break
12183done
12184
12185  else
12186    # The variable is set, but is it from the command line or the environment?
12187
12188    # Try to remove the string !UNAME! from our list.
12189    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12190    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12191      # If it failed, the variable was not from the command line. Ignore it,
12192      # but warn the user (except for BASH, which is always set by the calling BASH).
12193      if test "xUNAME" != xBASH; then
12194        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12195$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12196      fi
12197      # Try to locate tool using the code snippet
12198      for ac_prog in uname
12199do
12200  # Extract the first word of "$ac_prog", so it can be a program name with args.
12201set dummy $ac_prog; ac_word=$2
12202{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12203$as_echo_n "checking for $ac_word... " >&6; }
12204if ${ac_cv_path_UNAME+:} false; then :
12205  $as_echo_n "(cached) " >&6
12206else
12207  case $UNAME in
12208  [\\/]* | ?:[\\/]*)
12209  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12210  ;;
12211  *)
12212  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12213for as_dir in $PATH
12214do
12215  IFS=$as_save_IFS
12216  test -z "$as_dir" && as_dir=.
12217    for ac_exec_ext in '' $ac_executable_extensions; do
12218  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12219    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12220    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12221    break 2
12222  fi
12223done
12224  done
12225IFS=$as_save_IFS
12226
12227  ;;
12228esac
12229fi
12230UNAME=$ac_cv_path_UNAME
12231if test -n "$UNAME"; then
12232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12233$as_echo "$UNAME" >&6; }
12234else
12235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12236$as_echo "no" >&6; }
12237fi
12238
12239
12240  test -n "$UNAME" && break
12241done
12242
12243    else
12244      # If it succeeded, then it was overridden by the user. We will use it
12245      # for the tool.
12246
12247      # First remove it from the list of overridden variables, so we can test
12248      # for unknown variables in the end.
12249      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12250
12251      # Check if we try to supply an empty value
12252      if test "x$UNAME" = x; then
12253        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12254$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12255        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12256$as_echo_n "checking for UNAME... " >&6; }
12257        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12258$as_echo "disabled" >&6; }
12259      else
12260        # Check if the provided tool contains a complete path.
12261        tool_specified="$UNAME"
12262        tool_basename="${tool_specified##*/}"
12263        if test "x$tool_basename" = "x$tool_specified"; then
12264          # A command without a complete path is provided, search $PATH.
12265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12266$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12267          # Extract the first word of "$tool_basename", so it can be a program name with args.
12268set dummy $tool_basename; ac_word=$2
12269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12270$as_echo_n "checking for $ac_word... " >&6; }
12271if ${ac_cv_path_UNAME+:} false; then :
12272  $as_echo_n "(cached) " >&6
12273else
12274  case $UNAME in
12275  [\\/]* | ?:[\\/]*)
12276  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12277  ;;
12278  *)
12279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12280for as_dir in $PATH
12281do
12282  IFS=$as_save_IFS
12283  test -z "$as_dir" && as_dir=.
12284    for ac_exec_ext in '' $ac_executable_extensions; do
12285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12286    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12288    break 2
12289  fi
12290done
12291  done
12292IFS=$as_save_IFS
12293
12294  ;;
12295esac
12296fi
12297UNAME=$ac_cv_path_UNAME
12298if test -n "$UNAME"; then
12299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12300$as_echo "$UNAME" >&6; }
12301else
12302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12303$as_echo "no" >&6; }
12304fi
12305
12306
12307          if test "x$UNAME" = x; then
12308            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12309          fi
12310        else
12311          # Otherwise we believe it is a complete path. Use it as it is.
12312          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12313$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12314          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12315$as_echo_n "checking for UNAME... " >&6; }
12316          if test ! -x "$tool_specified"; then
12317            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12318$as_echo "not found" >&6; }
12319            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12320          fi
12321          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12322$as_echo "$tool_specified" >&6; }
12323        fi
12324      fi
12325    fi
12326
12327  fi
12328
12329
12330
12331  if test "x$UNAME" = x; then
12332    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12333  fi
12334
12335
12336
12337
12338
12339  # Publish this variable in the help.
12340
12341
12342  if [ -z "${UNIQ+x}" ]; then
12343    # The variable is not set by user, try to locate tool using the code snippet
12344    for ac_prog in uniq
12345do
12346  # Extract the first word of "$ac_prog", so it can be a program name with args.
12347set dummy $ac_prog; ac_word=$2
12348{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12349$as_echo_n "checking for $ac_word... " >&6; }
12350if ${ac_cv_path_UNIQ+:} false; then :
12351  $as_echo_n "(cached) " >&6
12352else
12353  case $UNIQ in
12354  [\\/]* | ?:[\\/]*)
12355  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12356  ;;
12357  *)
12358  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12359for as_dir in $PATH
12360do
12361  IFS=$as_save_IFS
12362  test -z "$as_dir" && as_dir=.
12363    for ac_exec_ext in '' $ac_executable_extensions; do
12364  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12365    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12366    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12367    break 2
12368  fi
12369done
12370  done
12371IFS=$as_save_IFS
12372
12373  ;;
12374esac
12375fi
12376UNIQ=$ac_cv_path_UNIQ
12377if test -n "$UNIQ"; then
12378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12379$as_echo "$UNIQ" >&6; }
12380else
12381  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12382$as_echo "no" >&6; }
12383fi
12384
12385
12386  test -n "$UNIQ" && break
12387done
12388
12389  else
12390    # The variable is set, but is it from the command line or the environment?
12391
12392    # Try to remove the string !UNIQ! from our list.
12393    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12394    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12395      # If it failed, the variable was not from the command line. Ignore it,
12396      # but warn the user (except for BASH, which is always set by the calling BASH).
12397      if test "xUNIQ" != xBASH; then
12398        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12399$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12400      fi
12401      # Try to locate tool using the code snippet
12402      for ac_prog in uniq
12403do
12404  # Extract the first word of "$ac_prog", so it can be a program name with args.
12405set dummy $ac_prog; ac_word=$2
12406{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12407$as_echo_n "checking for $ac_word... " >&6; }
12408if ${ac_cv_path_UNIQ+:} false; then :
12409  $as_echo_n "(cached) " >&6
12410else
12411  case $UNIQ in
12412  [\\/]* | ?:[\\/]*)
12413  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12414  ;;
12415  *)
12416  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12417for as_dir in $PATH
12418do
12419  IFS=$as_save_IFS
12420  test -z "$as_dir" && as_dir=.
12421    for ac_exec_ext in '' $ac_executable_extensions; do
12422  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12423    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12424    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12425    break 2
12426  fi
12427done
12428  done
12429IFS=$as_save_IFS
12430
12431  ;;
12432esac
12433fi
12434UNIQ=$ac_cv_path_UNIQ
12435if test -n "$UNIQ"; then
12436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12437$as_echo "$UNIQ" >&6; }
12438else
12439  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12440$as_echo "no" >&6; }
12441fi
12442
12443
12444  test -n "$UNIQ" && break
12445done
12446
12447    else
12448      # If it succeeded, then it was overridden by the user. We will use it
12449      # for the tool.
12450
12451      # First remove it from the list of overridden variables, so we can test
12452      # for unknown variables in the end.
12453      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12454
12455      # Check if we try to supply an empty value
12456      if test "x$UNIQ" = x; then
12457        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12458$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12459        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12460$as_echo_n "checking for UNIQ... " >&6; }
12461        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12462$as_echo "disabled" >&6; }
12463      else
12464        # Check if the provided tool contains a complete path.
12465        tool_specified="$UNIQ"
12466        tool_basename="${tool_specified##*/}"
12467        if test "x$tool_basename" = "x$tool_specified"; then
12468          # A command without a complete path is provided, search $PATH.
12469          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12470$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12471          # Extract the first word of "$tool_basename", so it can be a program name with args.
12472set dummy $tool_basename; ac_word=$2
12473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12474$as_echo_n "checking for $ac_word... " >&6; }
12475if ${ac_cv_path_UNIQ+:} false; then :
12476  $as_echo_n "(cached) " >&6
12477else
12478  case $UNIQ in
12479  [\\/]* | ?:[\\/]*)
12480  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12481  ;;
12482  *)
12483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12484for as_dir in $PATH
12485do
12486  IFS=$as_save_IFS
12487  test -z "$as_dir" && as_dir=.
12488    for ac_exec_ext in '' $ac_executable_extensions; do
12489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12490    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12492    break 2
12493  fi
12494done
12495  done
12496IFS=$as_save_IFS
12497
12498  ;;
12499esac
12500fi
12501UNIQ=$ac_cv_path_UNIQ
12502if test -n "$UNIQ"; then
12503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12504$as_echo "$UNIQ" >&6; }
12505else
12506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12507$as_echo "no" >&6; }
12508fi
12509
12510
12511          if test "x$UNIQ" = x; then
12512            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12513          fi
12514        else
12515          # Otherwise we believe it is a complete path. Use it as it is.
12516          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12517$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12518          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12519$as_echo_n "checking for UNIQ... " >&6; }
12520          if test ! -x "$tool_specified"; then
12521            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12522$as_echo "not found" >&6; }
12523            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12524          fi
12525          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12526$as_echo "$tool_specified" >&6; }
12527        fi
12528      fi
12529    fi
12530
12531  fi
12532
12533
12534
12535  if test "x$UNIQ" = x; then
12536    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12537  fi
12538
12539
12540
12541
12542
12543  # Publish this variable in the help.
12544
12545
12546  if [ -z "${WC+x}" ]; then
12547    # The variable is not set by user, try to locate tool using the code snippet
12548    for ac_prog in wc
12549do
12550  # Extract the first word of "$ac_prog", so it can be a program name with args.
12551set dummy $ac_prog; ac_word=$2
12552{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12553$as_echo_n "checking for $ac_word... " >&6; }
12554if ${ac_cv_path_WC+:} false; then :
12555  $as_echo_n "(cached) " >&6
12556else
12557  case $WC in
12558  [\\/]* | ?:[\\/]*)
12559  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12560  ;;
12561  *)
12562  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12563for as_dir in $PATH
12564do
12565  IFS=$as_save_IFS
12566  test -z "$as_dir" && as_dir=.
12567    for ac_exec_ext in '' $ac_executable_extensions; do
12568  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12569    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12570    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12571    break 2
12572  fi
12573done
12574  done
12575IFS=$as_save_IFS
12576
12577  ;;
12578esac
12579fi
12580WC=$ac_cv_path_WC
12581if test -n "$WC"; then
12582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12583$as_echo "$WC" >&6; }
12584else
12585  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12586$as_echo "no" >&6; }
12587fi
12588
12589
12590  test -n "$WC" && break
12591done
12592
12593  else
12594    # The variable is set, but is it from the command line or the environment?
12595
12596    # Try to remove the string !WC! from our list.
12597    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12598    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12599      # If it failed, the variable was not from the command line. Ignore it,
12600      # but warn the user (except for BASH, which is always set by the calling BASH).
12601      if test "xWC" != xBASH; then
12602        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12603$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12604      fi
12605      # Try to locate tool using the code snippet
12606      for ac_prog in wc
12607do
12608  # Extract the first word of "$ac_prog", so it can be a program name with args.
12609set dummy $ac_prog; ac_word=$2
12610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12611$as_echo_n "checking for $ac_word... " >&6; }
12612if ${ac_cv_path_WC+:} false; then :
12613  $as_echo_n "(cached) " >&6
12614else
12615  case $WC in
12616  [\\/]* | ?:[\\/]*)
12617  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12618  ;;
12619  *)
12620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12621for as_dir in $PATH
12622do
12623  IFS=$as_save_IFS
12624  test -z "$as_dir" && as_dir=.
12625    for ac_exec_ext in '' $ac_executable_extensions; do
12626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12627    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12629    break 2
12630  fi
12631done
12632  done
12633IFS=$as_save_IFS
12634
12635  ;;
12636esac
12637fi
12638WC=$ac_cv_path_WC
12639if test -n "$WC"; then
12640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12641$as_echo "$WC" >&6; }
12642else
12643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12644$as_echo "no" >&6; }
12645fi
12646
12647
12648  test -n "$WC" && break
12649done
12650
12651    else
12652      # If it succeeded, then it was overridden by the user. We will use it
12653      # for the tool.
12654
12655      # First remove it from the list of overridden variables, so we can test
12656      # for unknown variables in the end.
12657      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12658
12659      # Check if we try to supply an empty value
12660      if test "x$WC" = x; then
12661        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12662$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12663        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12664$as_echo_n "checking for WC... " >&6; }
12665        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12666$as_echo "disabled" >&6; }
12667      else
12668        # Check if the provided tool contains a complete path.
12669        tool_specified="$WC"
12670        tool_basename="${tool_specified##*/}"
12671        if test "x$tool_basename" = "x$tool_specified"; then
12672          # A command without a complete path is provided, search $PATH.
12673          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12674$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12675          # Extract the first word of "$tool_basename", so it can be a program name with args.
12676set dummy $tool_basename; ac_word=$2
12677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12678$as_echo_n "checking for $ac_word... " >&6; }
12679if ${ac_cv_path_WC+:} false; then :
12680  $as_echo_n "(cached) " >&6
12681else
12682  case $WC in
12683  [\\/]* | ?:[\\/]*)
12684  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12685  ;;
12686  *)
12687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12688for as_dir in $PATH
12689do
12690  IFS=$as_save_IFS
12691  test -z "$as_dir" && as_dir=.
12692    for ac_exec_ext in '' $ac_executable_extensions; do
12693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12694    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12696    break 2
12697  fi
12698done
12699  done
12700IFS=$as_save_IFS
12701
12702  ;;
12703esac
12704fi
12705WC=$ac_cv_path_WC
12706if test -n "$WC"; then
12707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12708$as_echo "$WC" >&6; }
12709else
12710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12711$as_echo "no" >&6; }
12712fi
12713
12714
12715          if test "x$WC" = x; then
12716            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12717          fi
12718        else
12719          # Otherwise we believe it is a complete path. Use it as it is.
12720          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12721$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12722          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12723$as_echo_n "checking for WC... " >&6; }
12724          if test ! -x "$tool_specified"; then
12725            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12726$as_echo "not found" >&6; }
12727            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12728          fi
12729          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12730$as_echo "$tool_specified" >&6; }
12731        fi
12732      fi
12733    fi
12734
12735  fi
12736
12737
12738
12739  if test "x$WC" = x; then
12740    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12741  fi
12742
12743
12744
12745
12746
12747  # Publish this variable in the help.
12748
12749
12750  if [ -z "${WHICH+x}" ]; then
12751    # The variable is not set by user, try to locate tool using the code snippet
12752    for ac_prog in which
12753do
12754  # Extract the first word of "$ac_prog", so it can be a program name with args.
12755set dummy $ac_prog; ac_word=$2
12756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12757$as_echo_n "checking for $ac_word... " >&6; }
12758if ${ac_cv_path_WHICH+:} false; then :
12759  $as_echo_n "(cached) " >&6
12760else
12761  case $WHICH in
12762  [\\/]* | ?:[\\/]*)
12763  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12764  ;;
12765  *)
12766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12767for as_dir in $PATH
12768do
12769  IFS=$as_save_IFS
12770  test -z "$as_dir" && as_dir=.
12771    for ac_exec_ext in '' $ac_executable_extensions; do
12772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12773    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12775    break 2
12776  fi
12777done
12778  done
12779IFS=$as_save_IFS
12780
12781  ;;
12782esac
12783fi
12784WHICH=$ac_cv_path_WHICH
12785if test -n "$WHICH"; then
12786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12787$as_echo "$WHICH" >&6; }
12788else
12789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12790$as_echo "no" >&6; }
12791fi
12792
12793
12794  test -n "$WHICH" && break
12795done
12796
12797  else
12798    # The variable is set, but is it from the command line or the environment?
12799
12800    # Try to remove the string !WHICH! from our list.
12801    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12802    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12803      # If it failed, the variable was not from the command line. Ignore it,
12804      # but warn the user (except for BASH, which is always set by the calling BASH).
12805      if test "xWHICH" != xBASH; then
12806        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12807$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12808      fi
12809      # Try to locate tool using the code snippet
12810      for ac_prog in which
12811do
12812  # Extract the first word of "$ac_prog", so it can be a program name with args.
12813set dummy $ac_prog; ac_word=$2
12814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12815$as_echo_n "checking for $ac_word... " >&6; }
12816if ${ac_cv_path_WHICH+:} false; then :
12817  $as_echo_n "(cached) " >&6
12818else
12819  case $WHICH in
12820  [\\/]* | ?:[\\/]*)
12821  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12822  ;;
12823  *)
12824  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12825for as_dir in $PATH
12826do
12827  IFS=$as_save_IFS
12828  test -z "$as_dir" && as_dir=.
12829    for ac_exec_ext in '' $ac_executable_extensions; do
12830  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12831    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12832    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12833    break 2
12834  fi
12835done
12836  done
12837IFS=$as_save_IFS
12838
12839  ;;
12840esac
12841fi
12842WHICH=$ac_cv_path_WHICH
12843if test -n "$WHICH"; then
12844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12845$as_echo "$WHICH" >&6; }
12846else
12847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12848$as_echo "no" >&6; }
12849fi
12850
12851
12852  test -n "$WHICH" && break
12853done
12854
12855    else
12856      # If it succeeded, then it was overridden by the user. We will use it
12857      # for the tool.
12858
12859      # First remove it from the list of overridden variables, so we can test
12860      # for unknown variables in the end.
12861      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12862
12863      # Check if we try to supply an empty value
12864      if test "x$WHICH" = x; then
12865        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12866$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12867        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12868$as_echo_n "checking for WHICH... " >&6; }
12869        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12870$as_echo "disabled" >&6; }
12871      else
12872        # Check if the provided tool contains a complete path.
12873        tool_specified="$WHICH"
12874        tool_basename="${tool_specified##*/}"
12875        if test "x$tool_basename" = "x$tool_specified"; then
12876          # A command without a complete path is provided, search $PATH.
12877          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12878$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12879          # Extract the first word of "$tool_basename", so it can be a program name with args.
12880set dummy $tool_basename; ac_word=$2
12881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12882$as_echo_n "checking for $ac_word... " >&6; }
12883if ${ac_cv_path_WHICH+:} false; then :
12884  $as_echo_n "(cached) " >&6
12885else
12886  case $WHICH in
12887  [\\/]* | ?:[\\/]*)
12888  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12889  ;;
12890  *)
12891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12892for as_dir in $PATH
12893do
12894  IFS=$as_save_IFS
12895  test -z "$as_dir" && as_dir=.
12896    for ac_exec_ext in '' $ac_executable_extensions; do
12897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12898    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12900    break 2
12901  fi
12902done
12903  done
12904IFS=$as_save_IFS
12905
12906  ;;
12907esac
12908fi
12909WHICH=$ac_cv_path_WHICH
12910if test -n "$WHICH"; then
12911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12912$as_echo "$WHICH" >&6; }
12913else
12914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12915$as_echo "no" >&6; }
12916fi
12917
12918
12919          if test "x$WHICH" = x; then
12920            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12921          fi
12922        else
12923          # Otherwise we believe it is a complete path. Use it as it is.
12924          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12925$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12926          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12927$as_echo_n "checking for WHICH... " >&6; }
12928          if test ! -x "$tool_specified"; then
12929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12930$as_echo "not found" >&6; }
12931            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12932          fi
12933          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12934$as_echo "$tool_specified" >&6; }
12935        fi
12936      fi
12937    fi
12938
12939  fi
12940
12941
12942
12943  if test "x$WHICH" = x; then
12944    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12945  fi
12946
12947
12948
12949
12950
12951  # Publish this variable in the help.
12952
12953
12954  if [ -z "${XARGS+x}" ]; then
12955    # The variable is not set by user, try to locate tool using the code snippet
12956    for ac_prog in xargs
12957do
12958  # Extract the first word of "$ac_prog", so it can be a program name with args.
12959set dummy $ac_prog; ac_word=$2
12960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12961$as_echo_n "checking for $ac_word... " >&6; }
12962if ${ac_cv_path_XARGS+:} false; then :
12963  $as_echo_n "(cached) " >&6
12964else
12965  case $XARGS in
12966  [\\/]* | ?:[\\/]*)
12967  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12968  ;;
12969  *)
12970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12971for as_dir in $PATH
12972do
12973  IFS=$as_save_IFS
12974  test -z "$as_dir" && as_dir=.
12975    for ac_exec_ext in '' $ac_executable_extensions; do
12976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12977    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12979    break 2
12980  fi
12981done
12982  done
12983IFS=$as_save_IFS
12984
12985  ;;
12986esac
12987fi
12988XARGS=$ac_cv_path_XARGS
12989if test -n "$XARGS"; then
12990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12991$as_echo "$XARGS" >&6; }
12992else
12993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12994$as_echo "no" >&6; }
12995fi
12996
12997
12998  test -n "$XARGS" && break
12999done
13000
13001  else
13002    # The variable is set, but is it from the command line or the environment?
13003
13004    # Try to remove the string !XARGS! from our list.
13005    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
13006    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13007      # If it failed, the variable was not from the command line. Ignore it,
13008      # but warn the user (except for BASH, which is always set by the calling BASH).
13009      if test "xXARGS" != xBASH; then
13010        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
13011$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
13012      fi
13013      # Try to locate tool using the code snippet
13014      for ac_prog in xargs
13015do
13016  # Extract the first word of "$ac_prog", so it can be a program name with args.
13017set dummy $ac_prog; ac_word=$2
13018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13019$as_echo_n "checking for $ac_word... " >&6; }
13020if ${ac_cv_path_XARGS+:} false; then :
13021  $as_echo_n "(cached) " >&6
13022else
13023  case $XARGS in
13024  [\\/]* | ?:[\\/]*)
13025  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13026  ;;
13027  *)
13028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13029for as_dir in $PATH
13030do
13031  IFS=$as_save_IFS
13032  test -z "$as_dir" && as_dir=.
13033    for ac_exec_ext in '' $ac_executable_extensions; do
13034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13035    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13037    break 2
13038  fi
13039done
13040  done
13041IFS=$as_save_IFS
13042
13043  ;;
13044esac
13045fi
13046XARGS=$ac_cv_path_XARGS
13047if test -n "$XARGS"; then
13048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13049$as_echo "$XARGS" >&6; }
13050else
13051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13052$as_echo "no" >&6; }
13053fi
13054
13055
13056  test -n "$XARGS" && break
13057done
13058
13059    else
13060      # If it succeeded, then it was overridden by the user. We will use it
13061      # for the tool.
13062
13063      # First remove it from the list of overridden variables, so we can test
13064      # for unknown variables in the end.
13065      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13066
13067      # Check if we try to supply an empty value
13068      if test "x$XARGS" = x; then
13069        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13070$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13071        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13072$as_echo_n "checking for XARGS... " >&6; }
13073        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13074$as_echo "disabled" >&6; }
13075      else
13076        # Check if the provided tool contains a complete path.
13077        tool_specified="$XARGS"
13078        tool_basename="${tool_specified##*/}"
13079        if test "x$tool_basename" = "x$tool_specified"; then
13080          # A command without a complete path is provided, search $PATH.
13081          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13082$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13083          # Extract the first word of "$tool_basename", so it can be a program name with args.
13084set dummy $tool_basename; ac_word=$2
13085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13086$as_echo_n "checking for $ac_word... " >&6; }
13087if ${ac_cv_path_XARGS+:} false; then :
13088  $as_echo_n "(cached) " >&6
13089else
13090  case $XARGS in
13091  [\\/]* | ?:[\\/]*)
13092  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13093  ;;
13094  *)
13095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13096for as_dir in $PATH
13097do
13098  IFS=$as_save_IFS
13099  test -z "$as_dir" && as_dir=.
13100    for ac_exec_ext in '' $ac_executable_extensions; do
13101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13102    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13104    break 2
13105  fi
13106done
13107  done
13108IFS=$as_save_IFS
13109
13110  ;;
13111esac
13112fi
13113XARGS=$ac_cv_path_XARGS
13114if test -n "$XARGS"; then
13115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13116$as_echo "$XARGS" >&6; }
13117else
13118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13119$as_echo "no" >&6; }
13120fi
13121
13122
13123          if test "x$XARGS" = x; then
13124            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13125          fi
13126        else
13127          # Otherwise we believe it is a complete path. Use it as it is.
13128          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13129$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13130          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13131$as_echo_n "checking for XARGS... " >&6; }
13132          if test ! -x "$tool_specified"; then
13133            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13134$as_echo "not found" >&6; }
13135            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13136          fi
13137          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13138$as_echo "$tool_specified" >&6; }
13139        fi
13140      fi
13141    fi
13142
13143  fi
13144
13145
13146
13147  if test "x$XARGS" = x; then
13148    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13149  fi
13150
13151
13152
13153  # Then required tools that require some special treatment.
13154
13155
13156  # Publish this variable in the help.
13157
13158
13159  if [ -z "${AWK+x}" ]; then
13160    # The variable is not set by user, try to locate tool using the code snippet
13161    for ac_prog in gawk mawk nawk awk
13162do
13163  # Extract the first word of "$ac_prog", so it can be a program name with args.
13164set dummy $ac_prog; ac_word=$2
13165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13166$as_echo_n "checking for $ac_word... " >&6; }
13167if ${ac_cv_prog_AWK+:} false; then :
13168  $as_echo_n "(cached) " >&6
13169else
13170  if test -n "$AWK"; then
13171  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13172else
13173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13174for as_dir in $PATH
13175do
13176  IFS=$as_save_IFS
13177  test -z "$as_dir" && as_dir=.
13178    for ac_exec_ext in '' $ac_executable_extensions; do
13179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13180    ac_cv_prog_AWK="$ac_prog"
13181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13182    break 2
13183  fi
13184done
13185  done
13186IFS=$as_save_IFS
13187
13188fi
13189fi
13190AWK=$ac_cv_prog_AWK
13191if test -n "$AWK"; then
13192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13193$as_echo "$AWK" >&6; }
13194else
13195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13196$as_echo "no" >&6; }
13197fi
13198
13199
13200  test -n "$AWK" && break
13201done
13202
13203  else
13204    # The variable is set, but is it from the command line or the environment?
13205
13206    # Try to remove the string !AWK! from our list.
13207    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13208    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13209      # If it failed, the variable was not from the command line. Ignore it,
13210      # but warn the user (except for BASH, which is always set by the calling BASH).
13211      if test "xAWK" != xBASH; then
13212        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13213$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13214      fi
13215      # Try to locate tool using the code snippet
13216      for ac_prog in gawk mawk nawk awk
13217do
13218  # Extract the first word of "$ac_prog", so it can be a program name with args.
13219set dummy $ac_prog; ac_word=$2
13220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13221$as_echo_n "checking for $ac_word... " >&6; }
13222if ${ac_cv_prog_AWK+:} false; then :
13223  $as_echo_n "(cached) " >&6
13224else
13225  if test -n "$AWK"; then
13226  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13227else
13228as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13229for as_dir in $PATH
13230do
13231  IFS=$as_save_IFS
13232  test -z "$as_dir" && as_dir=.
13233    for ac_exec_ext in '' $ac_executable_extensions; do
13234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13235    ac_cv_prog_AWK="$ac_prog"
13236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13237    break 2
13238  fi
13239done
13240  done
13241IFS=$as_save_IFS
13242
13243fi
13244fi
13245AWK=$ac_cv_prog_AWK
13246if test -n "$AWK"; then
13247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13248$as_echo "$AWK" >&6; }
13249else
13250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13251$as_echo "no" >&6; }
13252fi
13253
13254
13255  test -n "$AWK" && break
13256done
13257
13258    else
13259      # If it succeeded, then it was overridden by the user. We will use it
13260      # for the tool.
13261
13262      # First remove it from the list of overridden variables, so we can test
13263      # for unknown variables in the end.
13264      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13265
13266      # Check if we try to supply an empty value
13267      if test "x$AWK" = x; then
13268        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13269$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13270        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13271$as_echo_n "checking for AWK... " >&6; }
13272        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13273$as_echo "disabled" >&6; }
13274      else
13275        # Check if the provided tool contains a complete path.
13276        tool_specified="$AWK"
13277        tool_basename="${tool_specified##*/}"
13278        if test "x$tool_basename" = "x$tool_specified"; then
13279          # A command without a complete path is provided, search $PATH.
13280          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13281$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13282          # Extract the first word of "$tool_basename", so it can be a program name with args.
13283set dummy $tool_basename; ac_word=$2
13284{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13285$as_echo_n "checking for $ac_word... " >&6; }
13286if ${ac_cv_path_AWK+:} false; then :
13287  $as_echo_n "(cached) " >&6
13288else
13289  case $AWK in
13290  [\\/]* | ?:[\\/]*)
13291  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13292  ;;
13293  *)
13294  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13295for as_dir in $PATH
13296do
13297  IFS=$as_save_IFS
13298  test -z "$as_dir" && as_dir=.
13299    for ac_exec_ext in '' $ac_executable_extensions; do
13300  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13301    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13302    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13303    break 2
13304  fi
13305done
13306  done
13307IFS=$as_save_IFS
13308
13309  ;;
13310esac
13311fi
13312AWK=$ac_cv_path_AWK
13313if test -n "$AWK"; then
13314  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13315$as_echo "$AWK" >&6; }
13316else
13317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13318$as_echo "no" >&6; }
13319fi
13320
13321
13322          if test "x$AWK" = x; then
13323            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13324          fi
13325        else
13326          # Otherwise we believe it is a complete path. Use it as it is.
13327          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13328$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13329          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13330$as_echo_n "checking for AWK... " >&6; }
13331          if test ! -x "$tool_specified"; then
13332            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13333$as_echo "not found" >&6; }
13334            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13335          fi
13336          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13337$as_echo "$tool_specified" >&6; }
13338        fi
13339      fi
13340    fi
13341
13342  fi
13343
13344
13345  if test "x$AWK" = x; then
13346    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13347  fi
13348
13349
13350
13351
13352  # Publish this variable in the help.
13353
13354
13355  if [ -z "${GREP+x}" ]; then
13356    # The variable is not set by user, try to locate tool using the code snippet
13357    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13358$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13359if ${ac_cv_path_GREP+:} false; then :
13360  $as_echo_n "(cached) " >&6
13361else
13362  if test -z "$GREP"; then
13363  ac_path_GREP_found=false
13364  # Loop through the user's path and test for each of PROGNAME-LIST
13365  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13366for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13367do
13368  IFS=$as_save_IFS
13369  test -z "$as_dir" && as_dir=.
13370    for ac_prog in grep ggrep; do
13371    for ac_exec_ext in '' $ac_executable_extensions; do
13372      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13373      as_fn_executable_p "$ac_path_GREP" || continue
13374# Check for GNU ac_path_GREP and select it if it is found.
13375  # Check for GNU $ac_path_GREP
13376case `"$ac_path_GREP" --version 2>&1` in
13377*GNU*)
13378  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13379*)
13380  ac_count=0
13381  $as_echo_n 0123456789 >"conftest.in"
13382  while :
13383  do
13384    cat "conftest.in" "conftest.in" >"conftest.tmp"
13385    mv "conftest.tmp" "conftest.in"
13386    cp "conftest.in" "conftest.nl"
13387    $as_echo 'GREP' >> "conftest.nl"
13388    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13389    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13390    as_fn_arith $ac_count + 1 && ac_count=$as_val
13391    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13392      # Best one so far, save it but keep looking for a better one
13393      ac_cv_path_GREP="$ac_path_GREP"
13394      ac_path_GREP_max=$ac_count
13395    fi
13396    # 10*(2^10) chars as input seems more than enough
13397    test $ac_count -gt 10 && break
13398  done
13399  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13400esac
13401
13402      $ac_path_GREP_found && break 3
13403    done
13404  done
13405  done
13406IFS=$as_save_IFS
13407  if test -z "$ac_cv_path_GREP"; then
13408    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13409  fi
13410else
13411  ac_cv_path_GREP=$GREP
13412fi
13413
13414fi
13415{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13416$as_echo "$ac_cv_path_GREP" >&6; }
13417 GREP="$ac_cv_path_GREP"
13418
13419
13420  else
13421    # The variable is set, but is it from the command line or the environment?
13422
13423    # Try to remove the string !GREP! from our list.
13424    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13425    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13426      # If it failed, the variable was not from the command line. Ignore it,
13427      # but warn the user (except for BASH, which is always set by the calling BASH).
13428      if test "xGREP" != xBASH; then
13429        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13430$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13431      fi
13432      # Try to locate tool using the code snippet
13433      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13434$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13435if ${ac_cv_path_GREP+:} false; then :
13436  $as_echo_n "(cached) " >&6
13437else
13438  if test -z "$GREP"; then
13439  ac_path_GREP_found=false
13440  # Loop through the user's path and test for each of PROGNAME-LIST
13441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13442for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13443do
13444  IFS=$as_save_IFS
13445  test -z "$as_dir" && as_dir=.
13446    for ac_prog in grep ggrep; do
13447    for ac_exec_ext in '' $ac_executable_extensions; do
13448      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13449      as_fn_executable_p "$ac_path_GREP" || continue
13450# Check for GNU ac_path_GREP and select it if it is found.
13451  # Check for GNU $ac_path_GREP
13452case `"$ac_path_GREP" --version 2>&1` in
13453*GNU*)
13454  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13455*)
13456  ac_count=0
13457  $as_echo_n 0123456789 >"conftest.in"
13458  while :
13459  do
13460    cat "conftest.in" "conftest.in" >"conftest.tmp"
13461    mv "conftest.tmp" "conftest.in"
13462    cp "conftest.in" "conftest.nl"
13463    $as_echo 'GREP' >> "conftest.nl"
13464    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13465    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13466    as_fn_arith $ac_count + 1 && ac_count=$as_val
13467    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13468      # Best one so far, save it but keep looking for a better one
13469      ac_cv_path_GREP="$ac_path_GREP"
13470      ac_path_GREP_max=$ac_count
13471    fi
13472    # 10*(2^10) chars as input seems more than enough
13473    test $ac_count -gt 10 && break
13474  done
13475  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13476esac
13477
13478      $ac_path_GREP_found && break 3
13479    done
13480  done
13481  done
13482IFS=$as_save_IFS
13483  if test -z "$ac_cv_path_GREP"; then
13484    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13485  fi
13486else
13487  ac_cv_path_GREP=$GREP
13488fi
13489
13490fi
13491{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13492$as_echo "$ac_cv_path_GREP" >&6; }
13493 GREP="$ac_cv_path_GREP"
13494
13495
13496    else
13497      # If it succeeded, then it was overridden by the user. We will use it
13498      # for the tool.
13499
13500      # First remove it from the list of overridden variables, so we can test
13501      # for unknown variables in the end.
13502      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13503
13504      # Check if we try to supply an empty value
13505      if test "x$GREP" = x; then
13506        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13507$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13508        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13509$as_echo_n "checking for GREP... " >&6; }
13510        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13511$as_echo "disabled" >&6; }
13512      else
13513        # Check if the provided tool contains a complete path.
13514        tool_specified="$GREP"
13515        tool_basename="${tool_specified##*/}"
13516        if test "x$tool_basename" = "x$tool_specified"; then
13517          # A command without a complete path is provided, search $PATH.
13518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13519$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13520          # Extract the first word of "$tool_basename", so it can be a program name with args.
13521set dummy $tool_basename; ac_word=$2
13522{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13523$as_echo_n "checking for $ac_word... " >&6; }
13524if ${ac_cv_path_GREP+:} false; then :
13525  $as_echo_n "(cached) " >&6
13526else
13527  case $GREP in
13528  [\\/]* | ?:[\\/]*)
13529  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13530  ;;
13531  *)
13532  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13533for as_dir in $PATH
13534do
13535  IFS=$as_save_IFS
13536  test -z "$as_dir" && as_dir=.
13537    for ac_exec_ext in '' $ac_executable_extensions; do
13538  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13539    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13540    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13541    break 2
13542  fi
13543done
13544  done
13545IFS=$as_save_IFS
13546
13547  ;;
13548esac
13549fi
13550GREP=$ac_cv_path_GREP
13551if test -n "$GREP"; then
13552  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13553$as_echo "$GREP" >&6; }
13554else
13555  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13556$as_echo "no" >&6; }
13557fi
13558
13559
13560          if test "x$GREP" = x; then
13561            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13562          fi
13563        else
13564          # Otherwise we believe it is a complete path. Use it as it is.
13565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13566$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13567          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13568$as_echo_n "checking for GREP... " >&6; }
13569          if test ! -x "$tool_specified"; then
13570            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13571$as_echo "not found" >&6; }
13572            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13573          fi
13574          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13575$as_echo "$tool_specified" >&6; }
13576        fi
13577      fi
13578    fi
13579
13580  fi
13581
13582
13583  if test "x$GREP" = x; then
13584    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13585  fi
13586
13587
13588
13589
13590  # Publish this variable in the help.
13591
13592
13593  if [ -z "${EGREP+x}" ]; then
13594    # The variable is not set by user, try to locate tool using the code snippet
13595    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13596$as_echo_n "checking for egrep... " >&6; }
13597if ${ac_cv_path_EGREP+:} false; then :
13598  $as_echo_n "(cached) " >&6
13599else
13600  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13601   then ac_cv_path_EGREP="$GREP -E"
13602   else
13603     if test -z "$EGREP"; then
13604  ac_path_EGREP_found=false
13605  # Loop through the user's path and test for each of PROGNAME-LIST
13606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13607for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13608do
13609  IFS=$as_save_IFS
13610  test -z "$as_dir" && as_dir=.
13611    for ac_prog in egrep; do
13612    for ac_exec_ext in '' $ac_executable_extensions; do
13613      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13614      as_fn_executable_p "$ac_path_EGREP" || continue
13615# Check for GNU ac_path_EGREP and select it if it is found.
13616  # Check for GNU $ac_path_EGREP
13617case `"$ac_path_EGREP" --version 2>&1` in
13618*GNU*)
13619  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13620*)
13621  ac_count=0
13622  $as_echo_n 0123456789 >"conftest.in"
13623  while :
13624  do
13625    cat "conftest.in" "conftest.in" >"conftest.tmp"
13626    mv "conftest.tmp" "conftest.in"
13627    cp "conftest.in" "conftest.nl"
13628    $as_echo 'EGREP' >> "conftest.nl"
13629    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13630    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13631    as_fn_arith $ac_count + 1 && ac_count=$as_val
13632    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13633      # Best one so far, save it but keep looking for a better one
13634      ac_cv_path_EGREP="$ac_path_EGREP"
13635      ac_path_EGREP_max=$ac_count
13636    fi
13637    # 10*(2^10) chars as input seems more than enough
13638    test $ac_count -gt 10 && break
13639  done
13640  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13641esac
13642
13643      $ac_path_EGREP_found && break 3
13644    done
13645  done
13646  done
13647IFS=$as_save_IFS
13648  if test -z "$ac_cv_path_EGREP"; then
13649    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13650  fi
13651else
13652  ac_cv_path_EGREP=$EGREP
13653fi
13654
13655   fi
13656fi
13657{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13658$as_echo "$ac_cv_path_EGREP" >&6; }
13659 EGREP="$ac_cv_path_EGREP"
13660
13661
13662  else
13663    # The variable is set, but is it from the command line or the environment?
13664
13665    # Try to remove the string !EGREP! from our list.
13666    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13667    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13668      # If it failed, the variable was not from the command line. Ignore it,
13669      # but warn the user (except for BASH, which is always set by the calling BASH).
13670      if test "xEGREP" != xBASH; then
13671        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13672$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13673      fi
13674      # Try to locate tool using the code snippet
13675      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13676$as_echo_n "checking for egrep... " >&6; }
13677if ${ac_cv_path_EGREP+:} false; then :
13678  $as_echo_n "(cached) " >&6
13679else
13680  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13681   then ac_cv_path_EGREP="$GREP -E"
13682   else
13683     if test -z "$EGREP"; then
13684  ac_path_EGREP_found=false
13685  # Loop through the user's path and test for each of PROGNAME-LIST
13686  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13687for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13688do
13689  IFS=$as_save_IFS
13690  test -z "$as_dir" && as_dir=.
13691    for ac_prog in egrep; do
13692    for ac_exec_ext in '' $ac_executable_extensions; do
13693      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13694      as_fn_executable_p "$ac_path_EGREP" || continue
13695# Check for GNU ac_path_EGREP and select it if it is found.
13696  # Check for GNU $ac_path_EGREP
13697case `"$ac_path_EGREP" --version 2>&1` in
13698*GNU*)
13699  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13700*)
13701  ac_count=0
13702  $as_echo_n 0123456789 >"conftest.in"
13703  while :
13704  do
13705    cat "conftest.in" "conftest.in" >"conftest.tmp"
13706    mv "conftest.tmp" "conftest.in"
13707    cp "conftest.in" "conftest.nl"
13708    $as_echo 'EGREP' >> "conftest.nl"
13709    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13710    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13711    as_fn_arith $ac_count + 1 && ac_count=$as_val
13712    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13713      # Best one so far, save it but keep looking for a better one
13714      ac_cv_path_EGREP="$ac_path_EGREP"
13715      ac_path_EGREP_max=$ac_count
13716    fi
13717    # 10*(2^10) chars as input seems more than enough
13718    test $ac_count -gt 10 && break
13719  done
13720  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13721esac
13722
13723      $ac_path_EGREP_found && break 3
13724    done
13725  done
13726  done
13727IFS=$as_save_IFS
13728  if test -z "$ac_cv_path_EGREP"; then
13729    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13730  fi
13731else
13732  ac_cv_path_EGREP=$EGREP
13733fi
13734
13735   fi
13736fi
13737{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13738$as_echo "$ac_cv_path_EGREP" >&6; }
13739 EGREP="$ac_cv_path_EGREP"
13740
13741
13742    else
13743      # If it succeeded, then it was overridden by the user. We will use it
13744      # for the tool.
13745
13746      # First remove it from the list of overridden variables, so we can test
13747      # for unknown variables in the end.
13748      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13749
13750      # Check if we try to supply an empty value
13751      if test "x$EGREP" = x; then
13752        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13753$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13754        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13755$as_echo_n "checking for EGREP... " >&6; }
13756        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13757$as_echo "disabled" >&6; }
13758      else
13759        # Check if the provided tool contains a complete path.
13760        tool_specified="$EGREP"
13761        tool_basename="${tool_specified##*/}"
13762        if test "x$tool_basename" = "x$tool_specified"; then
13763          # A command without a complete path is provided, search $PATH.
13764          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13765$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13766          # Extract the first word of "$tool_basename", so it can be a program name with args.
13767set dummy $tool_basename; ac_word=$2
13768{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13769$as_echo_n "checking for $ac_word... " >&6; }
13770if ${ac_cv_path_EGREP+:} false; then :
13771  $as_echo_n "(cached) " >&6
13772else
13773  case $EGREP in
13774  [\\/]* | ?:[\\/]*)
13775  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13776  ;;
13777  *)
13778  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13779for as_dir in $PATH
13780do
13781  IFS=$as_save_IFS
13782  test -z "$as_dir" && as_dir=.
13783    for ac_exec_ext in '' $ac_executable_extensions; do
13784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13785    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13787    break 2
13788  fi
13789done
13790  done
13791IFS=$as_save_IFS
13792
13793  ;;
13794esac
13795fi
13796EGREP=$ac_cv_path_EGREP
13797if test -n "$EGREP"; then
13798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13799$as_echo "$EGREP" >&6; }
13800else
13801  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13802$as_echo "no" >&6; }
13803fi
13804
13805
13806          if test "x$EGREP" = x; then
13807            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13808          fi
13809        else
13810          # Otherwise we believe it is a complete path. Use it as it is.
13811          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13812$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13813          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13814$as_echo_n "checking for EGREP... " >&6; }
13815          if test ! -x "$tool_specified"; then
13816            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13817$as_echo "not found" >&6; }
13818            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13819          fi
13820          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13821$as_echo "$tool_specified" >&6; }
13822        fi
13823      fi
13824    fi
13825
13826  fi
13827
13828
13829  if test "x$EGREP" = x; then
13830    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13831  fi
13832
13833
13834
13835
13836  # Publish this variable in the help.
13837
13838
13839  if [ -z "${FGREP+x}" ]; then
13840    # The variable is not set by user, try to locate tool using the code snippet
13841    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13842$as_echo_n "checking for fgrep... " >&6; }
13843if ${ac_cv_path_FGREP+:} false; then :
13844  $as_echo_n "(cached) " >&6
13845else
13846  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13847   then ac_cv_path_FGREP="$GREP -F"
13848   else
13849     if test -z "$FGREP"; then
13850  ac_path_FGREP_found=false
13851  # Loop through the user's path and test for each of PROGNAME-LIST
13852  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13853for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13854do
13855  IFS=$as_save_IFS
13856  test -z "$as_dir" && as_dir=.
13857    for ac_prog in fgrep; do
13858    for ac_exec_ext in '' $ac_executable_extensions; do
13859      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13860      as_fn_executable_p "$ac_path_FGREP" || continue
13861# Check for GNU ac_path_FGREP and select it if it is found.
13862  # Check for GNU $ac_path_FGREP
13863case `"$ac_path_FGREP" --version 2>&1` in
13864*GNU*)
13865  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13866*)
13867  ac_count=0
13868  $as_echo_n 0123456789 >"conftest.in"
13869  while :
13870  do
13871    cat "conftest.in" "conftest.in" >"conftest.tmp"
13872    mv "conftest.tmp" "conftest.in"
13873    cp "conftest.in" "conftest.nl"
13874    $as_echo 'FGREP' >> "conftest.nl"
13875    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13876    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13877    as_fn_arith $ac_count + 1 && ac_count=$as_val
13878    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13879      # Best one so far, save it but keep looking for a better one
13880      ac_cv_path_FGREP="$ac_path_FGREP"
13881      ac_path_FGREP_max=$ac_count
13882    fi
13883    # 10*(2^10) chars as input seems more than enough
13884    test $ac_count -gt 10 && break
13885  done
13886  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13887esac
13888
13889      $ac_path_FGREP_found && break 3
13890    done
13891  done
13892  done
13893IFS=$as_save_IFS
13894  if test -z "$ac_cv_path_FGREP"; then
13895    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13896  fi
13897else
13898  ac_cv_path_FGREP=$FGREP
13899fi
13900
13901   fi
13902fi
13903{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13904$as_echo "$ac_cv_path_FGREP" >&6; }
13905 FGREP="$ac_cv_path_FGREP"
13906
13907
13908  else
13909    # The variable is set, but is it from the command line or the environment?
13910
13911    # Try to remove the string !FGREP! from our list.
13912    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13913    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13914      # If it failed, the variable was not from the command line. Ignore it,
13915      # but warn the user (except for BASH, which is always set by the calling BASH).
13916      if test "xFGREP" != xBASH; then
13917        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13918$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13919      fi
13920      # Try to locate tool using the code snippet
13921      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13922$as_echo_n "checking for fgrep... " >&6; }
13923if ${ac_cv_path_FGREP+:} false; then :
13924  $as_echo_n "(cached) " >&6
13925else
13926  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13927   then ac_cv_path_FGREP="$GREP -F"
13928   else
13929     if test -z "$FGREP"; then
13930  ac_path_FGREP_found=false
13931  # Loop through the user's path and test for each of PROGNAME-LIST
13932  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13933for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13934do
13935  IFS=$as_save_IFS
13936  test -z "$as_dir" && as_dir=.
13937    for ac_prog in fgrep; do
13938    for ac_exec_ext in '' $ac_executable_extensions; do
13939      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13940      as_fn_executable_p "$ac_path_FGREP" || continue
13941# Check for GNU ac_path_FGREP and select it if it is found.
13942  # Check for GNU $ac_path_FGREP
13943case `"$ac_path_FGREP" --version 2>&1` in
13944*GNU*)
13945  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13946*)
13947  ac_count=0
13948  $as_echo_n 0123456789 >"conftest.in"
13949  while :
13950  do
13951    cat "conftest.in" "conftest.in" >"conftest.tmp"
13952    mv "conftest.tmp" "conftest.in"
13953    cp "conftest.in" "conftest.nl"
13954    $as_echo 'FGREP' >> "conftest.nl"
13955    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13956    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13957    as_fn_arith $ac_count + 1 && ac_count=$as_val
13958    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13959      # Best one so far, save it but keep looking for a better one
13960      ac_cv_path_FGREP="$ac_path_FGREP"
13961      ac_path_FGREP_max=$ac_count
13962    fi
13963    # 10*(2^10) chars as input seems more than enough
13964    test $ac_count -gt 10 && break
13965  done
13966  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13967esac
13968
13969      $ac_path_FGREP_found && break 3
13970    done
13971  done
13972  done
13973IFS=$as_save_IFS
13974  if test -z "$ac_cv_path_FGREP"; then
13975    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13976  fi
13977else
13978  ac_cv_path_FGREP=$FGREP
13979fi
13980
13981   fi
13982fi
13983{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13984$as_echo "$ac_cv_path_FGREP" >&6; }
13985 FGREP="$ac_cv_path_FGREP"
13986
13987
13988    else
13989      # If it succeeded, then it was overridden by the user. We will use it
13990      # for the tool.
13991
13992      # First remove it from the list of overridden variables, so we can test
13993      # for unknown variables in the end.
13994      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13995
13996      # Check if we try to supply an empty value
13997      if test "x$FGREP" = x; then
13998        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13999$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
14000        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14001$as_echo_n "checking for FGREP... " >&6; }
14002        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14003$as_echo "disabled" >&6; }
14004      else
14005        # Check if the provided tool contains a complete path.
14006        tool_specified="$FGREP"
14007        tool_basename="${tool_specified##*/}"
14008        if test "x$tool_basename" = "x$tool_specified"; then
14009          # A command without a complete path is provided, search $PATH.
14010          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
14011$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
14012          # Extract the first word of "$tool_basename", so it can be a program name with args.
14013set dummy $tool_basename; ac_word=$2
14014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14015$as_echo_n "checking for $ac_word... " >&6; }
14016if ${ac_cv_path_FGREP+:} false; then :
14017  $as_echo_n "(cached) " >&6
14018else
14019  case $FGREP in
14020  [\\/]* | ?:[\\/]*)
14021  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
14022  ;;
14023  *)
14024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14025for as_dir in $PATH
14026do
14027  IFS=$as_save_IFS
14028  test -z "$as_dir" && as_dir=.
14029    for ac_exec_ext in '' $ac_executable_extensions; do
14030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14031    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
14032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14033    break 2
14034  fi
14035done
14036  done
14037IFS=$as_save_IFS
14038
14039  ;;
14040esac
14041fi
14042FGREP=$ac_cv_path_FGREP
14043if test -n "$FGREP"; then
14044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14045$as_echo "$FGREP" >&6; }
14046else
14047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14048$as_echo "no" >&6; }
14049fi
14050
14051
14052          if test "x$FGREP" = x; then
14053            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14054          fi
14055        else
14056          # Otherwise we believe it is a complete path. Use it as it is.
14057          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14058$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14059          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14060$as_echo_n "checking for FGREP... " >&6; }
14061          if test ! -x "$tool_specified"; then
14062            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14063$as_echo "not found" >&6; }
14064            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14065          fi
14066          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14067$as_echo "$tool_specified" >&6; }
14068        fi
14069      fi
14070    fi
14071
14072  fi
14073
14074
14075  if test "x$FGREP" = x; then
14076    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14077  fi
14078
14079
14080
14081
14082  # Publish this variable in the help.
14083
14084
14085  if [ -z "${SED+x}" ]; then
14086    # The variable is not set by user, try to locate tool using the code snippet
14087    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14088$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14089if ${ac_cv_path_SED+:} false; then :
14090  $as_echo_n "(cached) " >&6
14091else
14092            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14093     for ac_i in 1 2 3 4 5 6 7; do
14094       ac_script="$ac_script$as_nl$ac_script"
14095     done
14096     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14097     { ac_script=; unset ac_script;}
14098     if test -z "$SED"; then
14099  ac_path_SED_found=false
14100  # Loop through the user's path and test for each of PROGNAME-LIST
14101  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14102for as_dir in $PATH
14103do
14104  IFS=$as_save_IFS
14105  test -z "$as_dir" && as_dir=.
14106    for ac_prog in sed gsed; do
14107    for ac_exec_ext in '' $ac_executable_extensions; do
14108      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14109      as_fn_executable_p "$ac_path_SED" || continue
14110# Check for GNU ac_path_SED and select it if it is found.
14111  # Check for GNU $ac_path_SED
14112case `"$ac_path_SED" --version 2>&1` in
14113*GNU*)
14114  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14115*)
14116  ac_count=0
14117  $as_echo_n 0123456789 >"conftest.in"
14118  while :
14119  do
14120    cat "conftest.in" "conftest.in" >"conftest.tmp"
14121    mv "conftest.tmp" "conftest.in"
14122    cp "conftest.in" "conftest.nl"
14123    $as_echo '' >> "conftest.nl"
14124    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14125    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14126    as_fn_arith $ac_count + 1 && ac_count=$as_val
14127    if test $ac_count -gt ${ac_path_SED_max-0}; then
14128      # Best one so far, save it but keep looking for a better one
14129      ac_cv_path_SED="$ac_path_SED"
14130      ac_path_SED_max=$ac_count
14131    fi
14132    # 10*(2^10) chars as input seems more than enough
14133    test $ac_count -gt 10 && break
14134  done
14135  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14136esac
14137
14138      $ac_path_SED_found && break 3
14139    done
14140  done
14141  done
14142IFS=$as_save_IFS
14143  if test -z "$ac_cv_path_SED"; then
14144    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14145  fi
14146else
14147  ac_cv_path_SED=$SED
14148fi
14149
14150fi
14151{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14152$as_echo "$ac_cv_path_SED" >&6; }
14153 SED="$ac_cv_path_SED"
14154  rm -f conftest.sed
14155
14156  else
14157    # The variable is set, but is it from the command line or the environment?
14158
14159    # Try to remove the string !SED! from our list.
14160    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14161    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14162      # If it failed, the variable was not from the command line. Ignore it,
14163      # but warn the user (except for BASH, which is always set by the calling BASH).
14164      if test "xSED" != xBASH; then
14165        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14166$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14167      fi
14168      # Try to locate tool using the code snippet
14169      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14170$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14171if ${ac_cv_path_SED+:} false; then :
14172  $as_echo_n "(cached) " >&6
14173else
14174            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14175     for ac_i in 1 2 3 4 5 6 7; do
14176       ac_script="$ac_script$as_nl$ac_script"
14177     done
14178     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14179     { ac_script=; unset ac_script;}
14180     if test -z "$SED"; then
14181  ac_path_SED_found=false
14182  # Loop through the user's path and test for each of PROGNAME-LIST
14183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14184for as_dir in $PATH
14185do
14186  IFS=$as_save_IFS
14187  test -z "$as_dir" && as_dir=.
14188    for ac_prog in sed gsed; do
14189    for ac_exec_ext in '' $ac_executable_extensions; do
14190      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14191      as_fn_executable_p "$ac_path_SED" || continue
14192# Check for GNU ac_path_SED and select it if it is found.
14193  # Check for GNU $ac_path_SED
14194case `"$ac_path_SED" --version 2>&1` in
14195*GNU*)
14196  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14197*)
14198  ac_count=0
14199  $as_echo_n 0123456789 >"conftest.in"
14200  while :
14201  do
14202    cat "conftest.in" "conftest.in" >"conftest.tmp"
14203    mv "conftest.tmp" "conftest.in"
14204    cp "conftest.in" "conftest.nl"
14205    $as_echo '' >> "conftest.nl"
14206    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14207    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14208    as_fn_arith $ac_count + 1 && ac_count=$as_val
14209    if test $ac_count -gt ${ac_path_SED_max-0}; then
14210      # Best one so far, save it but keep looking for a better one
14211      ac_cv_path_SED="$ac_path_SED"
14212      ac_path_SED_max=$ac_count
14213    fi
14214    # 10*(2^10) chars as input seems more than enough
14215    test $ac_count -gt 10 && break
14216  done
14217  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14218esac
14219
14220      $ac_path_SED_found && break 3
14221    done
14222  done
14223  done
14224IFS=$as_save_IFS
14225  if test -z "$ac_cv_path_SED"; then
14226    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14227  fi
14228else
14229  ac_cv_path_SED=$SED
14230fi
14231
14232fi
14233{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14234$as_echo "$ac_cv_path_SED" >&6; }
14235 SED="$ac_cv_path_SED"
14236  rm -f conftest.sed
14237
14238    else
14239      # If it succeeded, then it was overridden by the user. We will use it
14240      # for the tool.
14241
14242      # First remove it from the list of overridden variables, so we can test
14243      # for unknown variables in the end.
14244      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14245
14246      # Check if we try to supply an empty value
14247      if test "x$SED" = x; then
14248        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14249$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14250        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14251$as_echo_n "checking for SED... " >&6; }
14252        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14253$as_echo "disabled" >&6; }
14254      else
14255        # Check if the provided tool contains a complete path.
14256        tool_specified="$SED"
14257        tool_basename="${tool_specified##*/}"
14258        if test "x$tool_basename" = "x$tool_specified"; then
14259          # A command without a complete path is provided, search $PATH.
14260          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14261$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14262          # Extract the first word of "$tool_basename", so it can be a program name with args.
14263set dummy $tool_basename; ac_word=$2
14264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14265$as_echo_n "checking for $ac_word... " >&6; }
14266if ${ac_cv_path_SED+:} false; then :
14267  $as_echo_n "(cached) " >&6
14268else
14269  case $SED in
14270  [\\/]* | ?:[\\/]*)
14271  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14272  ;;
14273  *)
14274  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14275for as_dir in $PATH
14276do
14277  IFS=$as_save_IFS
14278  test -z "$as_dir" && as_dir=.
14279    for ac_exec_ext in '' $ac_executable_extensions; do
14280  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14281    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14282    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14283    break 2
14284  fi
14285done
14286  done
14287IFS=$as_save_IFS
14288
14289  ;;
14290esac
14291fi
14292SED=$ac_cv_path_SED
14293if test -n "$SED"; then
14294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14295$as_echo "$SED" >&6; }
14296else
14297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14298$as_echo "no" >&6; }
14299fi
14300
14301
14302          if test "x$SED" = x; then
14303            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14304          fi
14305        else
14306          # Otherwise we believe it is a complete path. Use it as it is.
14307          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14308$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14309          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14310$as_echo_n "checking for SED... " >&6; }
14311          if test ! -x "$tool_specified"; then
14312            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14313$as_echo "not found" >&6; }
14314            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14315          fi
14316          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14317$as_echo "$tool_specified" >&6; }
14318        fi
14319      fi
14320    fi
14321
14322  fi
14323
14324
14325  if test "x$SED" = x; then
14326    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14327  fi
14328
14329
14330
14331  # Always force rm.
14332  RM="$RM -f"
14333
14334  # pwd behaves differently on various platforms and some don't support the -L flag.
14335  # Always use the bash builtin pwd to get uniform behavior.
14336  THEPWDCMD=pwd
14337
14338  # These are not required on all platforms
14339
14340
14341  # Publish this variable in the help.
14342
14343
14344  if [ -z "${CYGPATH+x}" ]; then
14345    # The variable is not set by user, try to locate tool using the code snippet
14346    for ac_prog in cygpath
14347do
14348  # Extract the first word of "$ac_prog", so it can be a program name with args.
14349set dummy $ac_prog; ac_word=$2
14350{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14351$as_echo_n "checking for $ac_word... " >&6; }
14352if ${ac_cv_path_CYGPATH+:} false; then :
14353  $as_echo_n "(cached) " >&6
14354else
14355  case $CYGPATH in
14356  [\\/]* | ?:[\\/]*)
14357  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14358  ;;
14359  *)
14360  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14361for as_dir in $PATH
14362do
14363  IFS=$as_save_IFS
14364  test -z "$as_dir" && as_dir=.
14365    for ac_exec_ext in '' $ac_executable_extensions; do
14366  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14367    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14368    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14369    break 2
14370  fi
14371done
14372  done
14373IFS=$as_save_IFS
14374
14375  ;;
14376esac
14377fi
14378CYGPATH=$ac_cv_path_CYGPATH
14379if test -n "$CYGPATH"; then
14380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14381$as_echo "$CYGPATH" >&6; }
14382else
14383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14384$as_echo "no" >&6; }
14385fi
14386
14387
14388  test -n "$CYGPATH" && break
14389done
14390
14391  else
14392    # The variable is set, but is it from the command line or the environment?
14393
14394    # Try to remove the string !CYGPATH! from our list.
14395    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14396    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14397      # If it failed, the variable was not from the command line. Ignore it,
14398      # but warn the user (except for BASH, which is always set by the calling BASH).
14399      if test "xCYGPATH" != xBASH; then
14400        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14401$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14402      fi
14403      # Try to locate tool using the code snippet
14404      for ac_prog in cygpath
14405do
14406  # Extract the first word of "$ac_prog", so it can be a program name with args.
14407set dummy $ac_prog; ac_word=$2
14408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14409$as_echo_n "checking for $ac_word... " >&6; }
14410if ${ac_cv_path_CYGPATH+:} false; then :
14411  $as_echo_n "(cached) " >&6
14412else
14413  case $CYGPATH in
14414  [\\/]* | ?:[\\/]*)
14415  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14416  ;;
14417  *)
14418  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14419for as_dir in $PATH
14420do
14421  IFS=$as_save_IFS
14422  test -z "$as_dir" && as_dir=.
14423    for ac_exec_ext in '' $ac_executable_extensions; do
14424  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14425    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14426    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14427    break 2
14428  fi
14429done
14430  done
14431IFS=$as_save_IFS
14432
14433  ;;
14434esac
14435fi
14436CYGPATH=$ac_cv_path_CYGPATH
14437if test -n "$CYGPATH"; then
14438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14439$as_echo "$CYGPATH" >&6; }
14440else
14441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14442$as_echo "no" >&6; }
14443fi
14444
14445
14446  test -n "$CYGPATH" && break
14447done
14448
14449    else
14450      # If it succeeded, then it was overridden by the user. We will use it
14451      # for the tool.
14452
14453      # First remove it from the list of overridden variables, so we can test
14454      # for unknown variables in the end.
14455      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14456
14457      # Check if we try to supply an empty value
14458      if test "x$CYGPATH" = x; then
14459        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14460$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14461        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14462$as_echo_n "checking for CYGPATH... " >&6; }
14463        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14464$as_echo "disabled" >&6; }
14465      else
14466        # Check if the provided tool contains a complete path.
14467        tool_specified="$CYGPATH"
14468        tool_basename="${tool_specified##*/}"
14469        if test "x$tool_basename" = "x$tool_specified"; then
14470          # A command without a complete path is provided, search $PATH.
14471          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14472$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14473          # Extract the first word of "$tool_basename", so it can be a program name with args.
14474set dummy $tool_basename; ac_word=$2
14475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14476$as_echo_n "checking for $ac_word... " >&6; }
14477if ${ac_cv_path_CYGPATH+:} false; then :
14478  $as_echo_n "(cached) " >&6
14479else
14480  case $CYGPATH in
14481  [\\/]* | ?:[\\/]*)
14482  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14483  ;;
14484  *)
14485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14486for as_dir in $PATH
14487do
14488  IFS=$as_save_IFS
14489  test -z "$as_dir" && as_dir=.
14490    for ac_exec_ext in '' $ac_executable_extensions; do
14491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14492    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14494    break 2
14495  fi
14496done
14497  done
14498IFS=$as_save_IFS
14499
14500  ;;
14501esac
14502fi
14503CYGPATH=$ac_cv_path_CYGPATH
14504if test -n "$CYGPATH"; then
14505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14506$as_echo "$CYGPATH" >&6; }
14507else
14508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14509$as_echo "no" >&6; }
14510fi
14511
14512
14513          if test "x$CYGPATH" = x; then
14514            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14515          fi
14516        else
14517          # Otherwise we believe it is a complete path. Use it as it is.
14518          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14519$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14520          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14521$as_echo_n "checking for CYGPATH... " >&6; }
14522          if test ! -x "$tool_specified"; then
14523            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14524$as_echo "not found" >&6; }
14525            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14526          fi
14527          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14528$as_echo "$tool_specified" >&6; }
14529        fi
14530      fi
14531    fi
14532
14533  fi
14534
14535
14536
14537
14538  # Publish this variable in the help.
14539
14540
14541  if [ -z "${READLINK+x}" ]; then
14542    # The variable is not set by user, try to locate tool using the code snippet
14543    for ac_prog in greadlink readlink
14544do
14545  # Extract the first word of "$ac_prog", so it can be a program name with args.
14546set dummy $ac_prog; ac_word=$2
14547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14548$as_echo_n "checking for $ac_word... " >&6; }
14549if ${ac_cv_path_READLINK+:} false; then :
14550  $as_echo_n "(cached) " >&6
14551else
14552  case $READLINK in
14553  [\\/]* | ?:[\\/]*)
14554  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14555  ;;
14556  *)
14557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14558for as_dir in $PATH
14559do
14560  IFS=$as_save_IFS
14561  test -z "$as_dir" && as_dir=.
14562    for ac_exec_ext in '' $ac_executable_extensions; do
14563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14564    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14566    break 2
14567  fi
14568done
14569  done
14570IFS=$as_save_IFS
14571
14572  ;;
14573esac
14574fi
14575READLINK=$ac_cv_path_READLINK
14576if test -n "$READLINK"; then
14577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14578$as_echo "$READLINK" >&6; }
14579else
14580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14581$as_echo "no" >&6; }
14582fi
14583
14584
14585  test -n "$READLINK" && break
14586done
14587
14588  else
14589    # The variable is set, but is it from the command line or the environment?
14590
14591    # Try to remove the string !READLINK! from our list.
14592    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14593    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14594      # If it failed, the variable was not from the command line. Ignore it,
14595      # but warn the user (except for BASH, which is always set by the calling BASH).
14596      if test "xREADLINK" != xBASH; then
14597        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14598$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14599      fi
14600      # Try to locate tool using the code snippet
14601      for ac_prog in greadlink readlink
14602do
14603  # Extract the first word of "$ac_prog", so it can be a program name with args.
14604set dummy $ac_prog; ac_word=$2
14605{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14606$as_echo_n "checking for $ac_word... " >&6; }
14607if ${ac_cv_path_READLINK+:} false; then :
14608  $as_echo_n "(cached) " >&6
14609else
14610  case $READLINK in
14611  [\\/]* | ?:[\\/]*)
14612  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14613  ;;
14614  *)
14615  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14616for as_dir in $PATH
14617do
14618  IFS=$as_save_IFS
14619  test -z "$as_dir" && as_dir=.
14620    for ac_exec_ext in '' $ac_executable_extensions; do
14621  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14622    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14623    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14624    break 2
14625  fi
14626done
14627  done
14628IFS=$as_save_IFS
14629
14630  ;;
14631esac
14632fi
14633READLINK=$ac_cv_path_READLINK
14634if test -n "$READLINK"; then
14635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14636$as_echo "$READLINK" >&6; }
14637else
14638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14639$as_echo "no" >&6; }
14640fi
14641
14642
14643  test -n "$READLINK" && break
14644done
14645
14646    else
14647      # If it succeeded, then it was overridden by the user. We will use it
14648      # for the tool.
14649
14650      # First remove it from the list of overridden variables, so we can test
14651      # for unknown variables in the end.
14652      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14653
14654      # Check if we try to supply an empty value
14655      if test "x$READLINK" = x; then
14656        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14657$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14658        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14659$as_echo_n "checking for READLINK... " >&6; }
14660        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14661$as_echo "disabled" >&6; }
14662      else
14663        # Check if the provided tool contains a complete path.
14664        tool_specified="$READLINK"
14665        tool_basename="${tool_specified##*/}"
14666        if test "x$tool_basename" = "x$tool_specified"; then
14667          # A command without a complete path is provided, search $PATH.
14668          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14669$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14670          # Extract the first word of "$tool_basename", so it can be a program name with args.
14671set dummy $tool_basename; ac_word=$2
14672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14673$as_echo_n "checking for $ac_word... " >&6; }
14674if ${ac_cv_path_READLINK+:} false; then :
14675  $as_echo_n "(cached) " >&6
14676else
14677  case $READLINK in
14678  [\\/]* | ?:[\\/]*)
14679  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14680  ;;
14681  *)
14682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14683for as_dir in $PATH
14684do
14685  IFS=$as_save_IFS
14686  test -z "$as_dir" && as_dir=.
14687    for ac_exec_ext in '' $ac_executable_extensions; do
14688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14689    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14691    break 2
14692  fi
14693done
14694  done
14695IFS=$as_save_IFS
14696
14697  ;;
14698esac
14699fi
14700READLINK=$ac_cv_path_READLINK
14701if test -n "$READLINK"; then
14702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14703$as_echo "$READLINK" >&6; }
14704else
14705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14706$as_echo "no" >&6; }
14707fi
14708
14709
14710          if test "x$READLINK" = x; then
14711            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14712          fi
14713        else
14714          # Otherwise we believe it is a complete path. Use it as it is.
14715          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14716$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14717          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14718$as_echo_n "checking for READLINK... " >&6; }
14719          if test ! -x "$tool_specified"; then
14720            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14721$as_echo "not found" >&6; }
14722            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14723          fi
14724          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14725$as_echo "$tool_specified" >&6; }
14726        fi
14727      fi
14728    fi
14729
14730  fi
14731
14732
14733
14734
14735  # Publish this variable in the help.
14736
14737
14738  if [ -z "${DF+x}" ]; then
14739    # The variable is not set by user, try to locate tool using the code snippet
14740    for ac_prog in df
14741do
14742  # Extract the first word of "$ac_prog", so it can be a program name with args.
14743set dummy $ac_prog; ac_word=$2
14744{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14745$as_echo_n "checking for $ac_word... " >&6; }
14746if ${ac_cv_path_DF+:} false; then :
14747  $as_echo_n "(cached) " >&6
14748else
14749  case $DF in
14750  [\\/]* | ?:[\\/]*)
14751  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14752  ;;
14753  *)
14754  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14755for as_dir in $PATH
14756do
14757  IFS=$as_save_IFS
14758  test -z "$as_dir" && as_dir=.
14759    for ac_exec_ext in '' $ac_executable_extensions; do
14760  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14761    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14762    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14763    break 2
14764  fi
14765done
14766  done
14767IFS=$as_save_IFS
14768
14769  ;;
14770esac
14771fi
14772DF=$ac_cv_path_DF
14773if test -n "$DF"; then
14774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14775$as_echo "$DF" >&6; }
14776else
14777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14778$as_echo "no" >&6; }
14779fi
14780
14781
14782  test -n "$DF" && break
14783done
14784
14785  else
14786    # The variable is set, but is it from the command line or the environment?
14787
14788    # Try to remove the string !DF! from our list.
14789    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14790    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14791      # If it failed, the variable was not from the command line. Ignore it,
14792      # but warn the user (except for BASH, which is always set by the calling BASH).
14793      if test "xDF" != xBASH; then
14794        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14795$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14796      fi
14797      # Try to locate tool using the code snippet
14798      for ac_prog in df
14799do
14800  # Extract the first word of "$ac_prog", so it can be a program name with args.
14801set dummy $ac_prog; ac_word=$2
14802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14803$as_echo_n "checking for $ac_word... " >&6; }
14804if ${ac_cv_path_DF+:} false; then :
14805  $as_echo_n "(cached) " >&6
14806else
14807  case $DF in
14808  [\\/]* | ?:[\\/]*)
14809  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14810  ;;
14811  *)
14812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14813for as_dir in $PATH
14814do
14815  IFS=$as_save_IFS
14816  test -z "$as_dir" && as_dir=.
14817    for ac_exec_ext in '' $ac_executable_extensions; do
14818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14819    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14821    break 2
14822  fi
14823done
14824  done
14825IFS=$as_save_IFS
14826
14827  ;;
14828esac
14829fi
14830DF=$ac_cv_path_DF
14831if test -n "$DF"; then
14832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14833$as_echo "$DF" >&6; }
14834else
14835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14836$as_echo "no" >&6; }
14837fi
14838
14839
14840  test -n "$DF" && break
14841done
14842
14843    else
14844      # If it succeeded, then it was overridden by the user. We will use it
14845      # for the tool.
14846
14847      # First remove it from the list of overridden variables, so we can test
14848      # for unknown variables in the end.
14849      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14850
14851      # Check if we try to supply an empty value
14852      if test "x$DF" = x; then
14853        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14854$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14855        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14856$as_echo_n "checking for DF... " >&6; }
14857        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14858$as_echo "disabled" >&6; }
14859      else
14860        # Check if the provided tool contains a complete path.
14861        tool_specified="$DF"
14862        tool_basename="${tool_specified##*/}"
14863        if test "x$tool_basename" = "x$tool_specified"; then
14864          # A command without a complete path is provided, search $PATH.
14865          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14866$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14867          # Extract the first word of "$tool_basename", so it can be a program name with args.
14868set dummy $tool_basename; ac_word=$2
14869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14870$as_echo_n "checking for $ac_word... " >&6; }
14871if ${ac_cv_path_DF+:} false; then :
14872  $as_echo_n "(cached) " >&6
14873else
14874  case $DF in
14875  [\\/]* | ?:[\\/]*)
14876  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14877  ;;
14878  *)
14879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14880for as_dir in $PATH
14881do
14882  IFS=$as_save_IFS
14883  test -z "$as_dir" && as_dir=.
14884    for ac_exec_ext in '' $ac_executable_extensions; do
14885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14886    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14888    break 2
14889  fi
14890done
14891  done
14892IFS=$as_save_IFS
14893
14894  ;;
14895esac
14896fi
14897DF=$ac_cv_path_DF
14898if test -n "$DF"; then
14899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14900$as_echo "$DF" >&6; }
14901else
14902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14903$as_echo "no" >&6; }
14904fi
14905
14906
14907          if test "x$DF" = x; then
14908            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14909          fi
14910        else
14911          # Otherwise we believe it is a complete path. Use it as it is.
14912          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14913$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14914          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14915$as_echo_n "checking for DF... " >&6; }
14916          if test ! -x "$tool_specified"; then
14917            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14918$as_echo "not found" >&6; }
14919            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14920          fi
14921          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14922$as_echo "$tool_specified" >&6; }
14923        fi
14924      fi
14925    fi
14926
14927  fi
14928
14929
14930
14931
14932  # Publish this variable in the help.
14933
14934
14935  if [ -z "${CPIO+x}" ]; then
14936    # The variable is not set by user, try to locate tool using the code snippet
14937    for ac_prog in cpio bsdcpio
14938do
14939  # Extract the first word of "$ac_prog", so it can be a program name with args.
14940set dummy $ac_prog; ac_word=$2
14941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14942$as_echo_n "checking for $ac_word... " >&6; }
14943if ${ac_cv_path_CPIO+:} false; then :
14944  $as_echo_n "(cached) " >&6
14945else
14946  case $CPIO in
14947  [\\/]* | ?:[\\/]*)
14948  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14949  ;;
14950  *)
14951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14952for as_dir in $PATH
14953do
14954  IFS=$as_save_IFS
14955  test -z "$as_dir" && as_dir=.
14956    for ac_exec_ext in '' $ac_executable_extensions; do
14957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14958    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14960    break 2
14961  fi
14962done
14963  done
14964IFS=$as_save_IFS
14965
14966  ;;
14967esac
14968fi
14969CPIO=$ac_cv_path_CPIO
14970if test -n "$CPIO"; then
14971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14972$as_echo "$CPIO" >&6; }
14973else
14974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14975$as_echo "no" >&6; }
14976fi
14977
14978
14979  test -n "$CPIO" && break
14980done
14981
14982  else
14983    # The variable is set, but is it from the command line or the environment?
14984
14985    # Try to remove the string !CPIO! from our list.
14986    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14987    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14988      # If it failed, the variable was not from the command line. Ignore it,
14989      # but warn the user (except for BASH, which is always set by the calling BASH).
14990      if test "xCPIO" != xBASH; then
14991        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14992$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14993      fi
14994      # Try to locate tool using the code snippet
14995      for ac_prog in cpio bsdcpio
14996do
14997  # Extract the first word of "$ac_prog", so it can be a program name with args.
14998set dummy $ac_prog; ac_word=$2
14999{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15000$as_echo_n "checking for $ac_word... " >&6; }
15001if ${ac_cv_path_CPIO+:} false; then :
15002  $as_echo_n "(cached) " >&6
15003else
15004  case $CPIO in
15005  [\\/]* | ?:[\\/]*)
15006  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15007  ;;
15008  *)
15009  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15010for as_dir in $PATH
15011do
15012  IFS=$as_save_IFS
15013  test -z "$as_dir" && as_dir=.
15014    for ac_exec_ext in '' $ac_executable_extensions; do
15015  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15016    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15017    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15018    break 2
15019  fi
15020done
15021  done
15022IFS=$as_save_IFS
15023
15024  ;;
15025esac
15026fi
15027CPIO=$ac_cv_path_CPIO
15028if test -n "$CPIO"; then
15029  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15030$as_echo "$CPIO" >&6; }
15031else
15032  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15033$as_echo "no" >&6; }
15034fi
15035
15036
15037  test -n "$CPIO" && break
15038done
15039
15040    else
15041      # If it succeeded, then it was overridden by the user. We will use it
15042      # for the tool.
15043
15044      # First remove it from the list of overridden variables, so we can test
15045      # for unknown variables in the end.
15046      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15047
15048      # Check if we try to supply an empty value
15049      if test "x$CPIO" = x; then
15050        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15051$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15052        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15053$as_echo_n "checking for CPIO... " >&6; }
15054        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15055$as_echo "disabled" >&6; }
15056      else
15057        # Check if the provided tool contains a complete path.
15058        tool_specified="$CPIO"
15059        tool_basename="${tool_specified##*/}"
15060        if test "x$tool_basename" = "x$tool_specified"; then
15061          # A command without a complete path is provided, search $PATH.
15062          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15063$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15064          # Extract the first word of "$tool_basename", so it can be a program name with args.
15065set dummy $tool_basename; ac_word=$2
15066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15067$as_echo_n "checking for $ac_word... " >&6; }
15068if ${ac_cv_path_CPIO+:} false; then :
15069  $as_echo_n "(cached) " >&6
15070else
15071  case $CPIO in
15072  [\\/]* | ?:[\\/]*)
15073  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15074  ;;
15075  *)
15076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15077for as_dir in $PATH
15078do
15079  IFS=$as_save_IFS
15080  test -z "$as_dir" && as_dir=.
15081    for ac_exec_ext in '' $ac_executable_extensions; do
15082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15083    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15085    break 2
15086  fi
15087done
15088  done
15089IFS=$as_save_IFS
15090
15091  ;;
15092esac
15093fi
15094CPIO=$ac_cv_path_CPIO
15095if test -n "$CPIO"; then
15096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15097$as_echo "$CPIO" >&6; }
15098else
15099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15100$as_echo "no" >&6; }
15101fi
15102
15103
15104          if test "x$CPIO" = x; then
15105            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15106          fi
15107        else
15108          # Otherwise we believe it is a complete path. Use it as it is.
15109          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15110$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15111          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15112$as_echo_n "checking for CPIO... " >&6; }
15113          if test ! -x "$tool_specified"; then
15114            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15115$as_echo "not found" >&6; }
15116            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15117          fi
15118          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15119$as_echo "$tool_specified" >&6; }
15120        fi
15121      fi
15122    fi
15123
15124  fi
15125
15126
15127
15128
15129  # Publish this variable in the help.
15130
15131
15132  if [ -z "${NICE+x}" ]; then
15133    # The variable is not set by user, try to locate tool using the code snippet
15134    for ac_prog in nice
15135do
15136  # Extract the first word of "$ac_prog", so it can be a program name with args.
15137set dummy $ac_prog; ac_word=$2
15138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15139$as_echo_n "checking for $ac_word... " >&6; }
15140if ${ac_cv_path_NICE+:} false; then :
15141  $as_echo_n "(cached) " >&6
15142else
15143  case $NICE in
15144  [\\/]* | ?:[\\/]*)
15145  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15146  ;;
15147  *)
15148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15149for as_dir in $PATH
15150do
15151  IFS=$as_save_IFS
15152  test -z "$as_dir" && as_dir=.
15153    for ac_exec_ext in '' $ac_executable_extensions; do
15154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15155    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15157    break 2
15158  fi
15159done
15160  done
15161IFS=$as_save_IFS
15162
15163  ;;
15164esac
15165fi
15166NICE=$ac_cv_path_NICE
15167if test -n "$NICE"; then
15168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15169$as_echo "$NICE" >&6; }
15170else
15171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15172$as_echo "no" >&6; }
15173fi
15174
15175
15176  test -n "$NICE" && break
15177done
15178
15179  else
15180    # The variable is set, but is it from the command line or the environment?
15181
15182    # Try to remove the string !NICE! from our list.
15183    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15184    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15185      # If it failed, the variable was not from the command line. Ignore it,
15186      # but warn the user (except for BASH, which is always set by the calling BASH).
15187      if test "xNICE" != xBASH; then
15188        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15189$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15190      fi
15191      # Try to locate tool using the code snippet
15192      for ac_prog in nice
15193do
15194  # Extract the first word of "$ac_prog", so it can be a program name with args.
15195set dummy $ac_prog; ac_word=$2
15196{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15197$as_echo_n "checking for $ac_word... " >&6; }
15198if ${ac_cv_path_NICE+:} false; then :
15199  $as_echo_n "(cached) " >&6
15200else
15201  case $NICE in
15202  [\\/]* | ?:[\\/]*)
15203  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15204  ;;
15205  *)
15206  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15207for as_dir in $PATH
15208do
15209  IFS=$as_save_IFS
15210  test -z "$as_dir" && as_dir=.
15211    for ac_exec_ext in '' $ac_executable_extensions; do
15212  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15213    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15214    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15215    break 2
15216  fi
15217done
15218  done
15219IFS=$as_save_IFS
15220
15221  ;;
15222esac
15223fi
15224NICE=$ac_cv_path_NICE
15225if test -n "$NICE"; then
15226  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15227$as_echo "$NICE" >&6; }
15228else
15229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15230$as_echo "no" >&6; }
15231fi
15232
15233
15234  test -n "$NICE" && break
15235done
15236
15237    else
15238      # If it succeeded, then it was overridden by the user. We will use it
15239      # for the tool.
15240
15241      # First remove it from the list of overridden variables, so we can test
15242      # for unknown variables in the end.
15243      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15244
15245      # Check if we try to supply an empty value
15246      if test "x$NICE" = x; then
15247        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15248$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15249        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15250$as_echo_n "checking for NICE... " >&6; }
15251        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15252$as_echo "disabled" >&6; }
15253      else
15254        # Check if the provided tool contains a complete path.
15255        tool_specified="$NICE"
15256        tool_basename="${tool_specified##*/}"
15257        if test "x$tool_basename" = "x$tool_specified"; then
15258          # A command without a complete path is provided, search $PATH.
15259          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15260$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15261          # Extract the first word of "$tool_basename", so it can be a program name with args.
15262set dummy $tool_basename; ac_word=$2
15263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15264$as_echo_n "checking for $ac_word... " >&6; }
15265if ${ac_cv_path_NICE+:} false; then :
15266  $as_echo_n "(cached) " >&6
15267else
15268  case $NICE in
15269  [\\/]* | ?:[\\/]*)
15270  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15271  ;;
15272  *)
15273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15274for as_dir in $PATH
15275do
15276  IFS=$as_save_IFS
15277  test -z "$as_dir" && as_dir=.
15278    for ac_exec_ext in '' $ac_executable_extensions; do
15279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15280    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15282    break 2
15283  fi
15284done
15285  done
15286IFS=$as_save_IFS
15287
15288  ;;
15289esac
15290fi
15291NICE=$ac_cv_path_NICE
15292if test -n "$NICE"; then
15293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15294$as_echo "$NICE" >&6; }
15295else
15296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15297$as_echo "no" >&6; }
15298fi
15299
15300
15301          if test "x$NICE" = x; then
15302            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15303          fi
15304        else
15305          # Otherwise we believe it is a complete path. Use it as it is.
15306          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15307$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15308          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15309$as_echo_n "checking for NICE... " >&6; }
15310          if test ! -x "$tool_specified"; then
15311            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15312$as_echo "not found" >&6; }
15313            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15314          fi
15315          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15316$as_echo "$tool_specified" >&6; }
15317        fi
15318      fi
15319    fi
15320
15321  fi
15322
15323
15324
15325
15326  # Publish this variable in the help.
15327
15328
15329  if [ -z "${PANDOC+x}" ]; then
15330    # The variable is not set by user, try to locate tool using the code snippet
15331    for ac_prog in pandoc
15332do
15333  # Extract the first word of "$ac_prog", so it can be a program name with args.
15334set dummy $ac_prog; ac_word=$2
15335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15336$as_echo_n "checking for $ac_word... " >&6; }
15337if ${ac_cv_path_PANDOC+:} false; then :
15338  $as_echo_n "(cached) " >&6
15339else
15340  case $PANDOC in
15341  [\\/]* | ?:[\\/]*)
15342  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15343  ;;
15344  *)
15345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15346for as_dir in $PATH
15347do
15348  IFS=$as_save_IFS
15349  test -z "$as_dir" && as_dir=.
15350    for ac_exec_ext in '' $ac_executable_extensions; do
15351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15352    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15354    break 2
15355  fi
15356done
15357  done
15358IFS=$as_save_IFS
15359
15360  ;;
15361esac
15362fi
15363PANDOC=$ac_cv_path_PANDOC
15364if test -n "$PANDOC"; then
15365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15366$as_echo "$PANDOC" >&6; }
15367else
15368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15369$as_echo "no" >&6; }
15370fi
15371
15372
15373  test -n "$PANDOC" && break
15374done
15375
15376  else
15377    # The variable is set, but is it from the command line or the environment?
15378
15379    # Try to remove the string !PANDOC! from our list.
15380    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PANDOC!/}
15381    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15382      # If it failed, the variable was not from the command line. Ignore it,
15383      # but warn the user (except for BASH, which is always set by the calling BASH).
15384      if test "xPANDOC" != xBASH; then
15385        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&5
15386$as_echo "$as_me: WARNING: Ignoring value of PANDOC from the environment. Use command line variables instead." >&2;}
15387      fi
15388      # Try to locate tool using the code snippet
15389      for ac_prog in pandoc
15390do
15391  # Extract the first word of "$ac_prog", so it can be a program name with args.
15392set dummy $ac_prog; ac_word=$2
15393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15394$as_echo_n "checking for $ac_word... " >&6; }
15395if ${ac_cv_path_PANDOC+:} false; then :
15396  $as_echo_n "(cached) " >&6
15397else
15398  case $PANDOC in
15399  [\\/]* | ?:[\\/]*)
15400  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15401  ;;
15402  *)
15403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15404for as_dir in $PATH
15405do
15406  IFS=$as_save_IFS
15407  test -z "$as_dir" && as_dir=.
15408    for ac_exec_ext in '' $ac_executable_extensions; do
15409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15410    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15412    break 2
15413  fi
15414done
15415  done
15416IFS=$as_save_IFS
15417
15418  ;;
15419esac
15420fi
15421PANDOC=$ac_cv_path_PANDOC
15422if test -n "$PANDOC"; then
15423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15424$as_echo "$PANDOC" >&6; }
15425else
15426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15427$as_echo "no" >&6; }
15428fi
15429
15430
15431  test -n "$PANDOC" && break
15432done
15433
15434    else
15435      # If it succeeded, then it was overridden by the user. We will use it
15436      # for the tool.
15437
15438      # First remove it from the list of overridden variables, so we can test
15439      # for unknown variables in the end.
15440      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15441
15442      # Check if we try to supply an empty value
15443      if test "x$PANDOC" = x; then
15444        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PANDOC= (no value)" >&5
15445$as_echo "$as_me: Setting user supplied tool PANDOC= (no value)" >&6;}
15446        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15447$as_echo_n "checking for PANDOC... " >&6; }
15448        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15449$as_echo "disabled" >&6; }
15450      else
15451        # Check if the provided tool contains a complete path.
15452        tool_specified="$PANDOC"
15453        tool_basename="${tool_specified##*/}"
15454        if test "x$tool_basename" = "x$tool_specified"; then
15455          # A command without a complete path is provided, search $PATH.
15456          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PANDOC=$tool_basename" >&5
15457$as_echo "$as_me: Will search for user supplied tool PANDOC=$tool_basename" >&6;}
15458          # Extract the first word of "$tool_basename", so it can be a program name with args.
15459set dummy $tool_basename; ac_word=$2
15460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15461$as_echo_n "checking for $ac_word... " >&6; }
15462if ${ac_cv_path_PANDOC+:} false; then :
15463  $as_echo_n "(cached) " >&6
15464else
15465  case $PANDOC in
15466  [\\/]* | ?:[\\/]*)
15467  ac_cv_path_PANDOC="$PANDOC" # Let the user override the test with a path.
15468  ;;
15469  *)
15470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15471for as_dir in $PATH
15472do
15473  IFS=$as_save_IFS
15474  test -z "$as_dir" && as_dir=.
15475    for ac_exec_ext in '' $ac_executable_extensions; do
15476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15477    ac_cv_path_PANDOC="$as_dir/$ac_word$ac_exec_ext"
15478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15479    break 2
15480  fi
15481done
15482  done
15483IFS=$as_save_IFS
15484
15485  ;;
15486esac
15487fi
15488PANDOC=$ac_cv_path_PANDOC
15489if test -n "$PANDOC"; then
15490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PANDOC" >&5
15491$as_echo "$PANDOC" >&6; }
15492else
15493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15494$as_echo "no" >&6; }
15495fi
15496
15497
15498          if test "x$PANDOC" = x; then
15499            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15500          fi
15501        else
15502          # Otherwise we believe it is a complete path. Use it as it is.
15503          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PANDOC=$tool_specified" >&5
15504$as_echo "$as_me: Will use user supplied tool PANDOC=$tool_specified" >&6;}
15505          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PANDOC" >&5
15506$as_echo_n "checking for PANDOC... " >&6; }
15507          if test ! -x "$tool_specified"; then
15508            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15509$as_echo "not found" >&6; }
15510            as_fn_error $? "User supplied tool PANDOC=$tool_specified does not exist or is not executable" "$LINENO" 5
15511          fi
15512          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15513$as_echo "$tool_specified" >&6; }
15514        fi
15515      fi
15516    fi
15517
15518  fi
15519
15520
15521
15522
15523# Now we can determine OpenJDK build and target platforms. This is required to
15524# have early on.
15525# Make sure we can run config.sub.
15526$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15527  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15528
15529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15530$as_echo_n "checking build system type... " >&6; }
15531if ${ac_cv_build+:} false; then :
15532  $as_echo_n "(cached) " >&6
15533else
15534  ac_build_alias=$build_alias
15535test "x$ac_build_alias" = x &&
15536  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15537test "x$ac_build_alias" = x &&
15538  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15539ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15540  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15541
15542fi
15543{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15544$as_echo "$ac_cv_build" >&6; }
15545case $ac_cv_build in
15546*-*-*) ;;
15547*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15548esac
15549build=$ac_cv_build
15550ac_save_IFS=$IFS; IFS='-'
15551set x $ac_cv_build
15552shift
15553build_cpu=$1
15554build_vendor=$2
15555shift; shift
15556# Remember, the first character of IFS is used to create $*,
15557# except with old shells:
15558build_os=$*
15559IFS=$ac_save_IFS
15560case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15561
15562
15563{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15564$as_echo_n "checking host system type... " >&6; }
15565if ${ac_cv_host+:} false; then :
15566  $as_echo_n "(cached) " >&6
15567else
15568  if test "x$host_alias" = x; then
15569  ac_cv_host=$ac_cv_build
15570else
15571  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15572    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15573fi
15574
15575fi
15576{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15577$as_echo "$ac_cv_host" >&6; }
15578case $ac_cv_host in
15579*-*-*) ;;
15580*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15581esac
15582host=$ac_cv_host
15583ac_save_IFS=$IFS; IFS='-'
15584set x $ac_cv_host
15585shift
15586host_cpu=$1
15587host_vendor=$2
15588shift; shift
15589# Remember, the first character of IFS is used to create $*,
15590# except with old shells:
15591host_os=$*
15592IFS=$ac_save_IFS
15593case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15594
15595
15596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15597$as_echo_n "checking target system type... " >&6; }
15598if ${ac_cv_target+:} false; then :
15599  $as_echo_n "(cached) " >&6
15600else
15601  if test "x$target_alias" = x; then
15602  ac_cv_target=$ac_cv_host
15603else
15604  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15605    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15606fi
15607
15608fi
15609{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15610$as_echo "$ac_cv_target" >&6; }
15611case $ac_cv_target in
15612*-*-*) ;;
15613*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15614esac
15615target=$ac_cv_target
15616ac_save_IFS=$IFS; IFS='-'
15617set x $ac_cv_target
15618shift
15619target_cpu=$1
15620target_vendor=$2
15621shift; shift
15622# Remember, the first character of IFS is used to create $*,
15623# except with old shells:
15624target_os=$*
15625IFS=$ac_save_IFS
15626case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15627
15628
15629# The aliases save the names the user supplied, while $host etc.
15630# will get canonicalized.
15631test -n "$target_alias" &&
15632  test "$program_prefix$program_suffix$program_transform_name" = \
15633    NONENONEs,x,x, &&
15634  program_prefix=${target_alias}-
15635
15636  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15637  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15638  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15639  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15640  # to use the configure naming style.
15641
15642
15643
15644
15645
15646  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15647  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15648  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15649  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15650  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15651  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15652
15653
15654
15655  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15656
15657  case "$build_os" in
15658    *linux*)
15659      VAR_OS=linux
15660      VAR_OS_TYPE=unix
15661      ;;
15662    *solaris*)
15663      VAR_OS=solaris
15664      VAR_OS_TYPE=unix
15665      ;;
15666    *darwin*)
15667      VAR_OS=macosx
15668      VAR_OS_TYPE=unix
15669      ;;
15670    *bsd*)
15671      VAR_OS=bsd
15672      VAR_OS_TYPE=unix
15673      ;;
15674    *cygwin*)
15675      VAR_OS=windows
15676      VAR_OS_ENV=windows.cygwin
15677      ;;
15678    *mingw*)
15679      VAR_OS=windows
15680      VAR_OS_ENV=windows.msys
15681      ;;
15682    *aix*)
15683      VAR_OS=aix
15684      VAR_OS_TYPE=unix
15685      ;;
15686    *)
15687      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15688      ;;
15689  esac
15690
15691
15692  # First argument is the cpu name from the trip/quad
15693  case "$build_cpu" in
15694    x86_64)
15695      VAR_CPU=x86_64
15696      VAR_CPU_ARCH=x86
15697      VAR_CPU_BITS=64
15698      VAR_CPU_ENDIAN=little
15699      ;;
15700    i?86)
15701      VAR_CPU=x86
15702      VAR_CPU_ARCH=x86
15703      VAR_CPU_BITS=32
15704      VAR_CPU_ENDIAN=little
15705      ;;
15706    arm*)
15707      VAR_CPU=arm
15708      VAR_CPU_ARCH=arm
15709      VAR_CPU_BITS=32
15710      VAR_CPU_ENDIAN=little
15711      ;;
15712    aarch64)
15713      VAR_CPU=aarch64
15714      VAR_CPU_ARCH=aarch64
15715      VAR_CPU_BITS=64
15716      VAR_CPU_ENDIAN=little
15717      ;;
15718    powerpc)
15719      VAR_CPU=ppc
15720      VAR_CPU_ARCH=ppc
15721      VAR_CPU_BITS=32
15722      VAR_CPU_ENDIAN=big
15723      ;;
15724    powerpc64)
15725      VAR_CPU=ppc64
15726      VAR_CPU_ARCH=ppc
15727      VAR_CPU_BITS=64
15728      VAR_CPU_ENDIAN=big
15729      ;;
15730    powerpc64le)
15731      VAR_CPU=ppc64le
15732      VAR_CPU_ARCH=ppc
15733      VAR_CPU_BITS=64
15734      VAR_CPU_ENDIAN=little
15735      ;;
15736    s390)
15737      VAR_CPU=s390
15738      VAR_CPU_ARCH=s390
15739      VAR_CPU_BITS=32
15740      VAR_CPU_ENDIAN=big
15741      ;;
15742    s390x)
15743      VAR_CPU=s390x
15744      VAR_CPU_ARCH=s390
15745      VAR_CPU_BITS=64
15746      VAR_CPU_ENDIAN=big
15747      ;;
15748    sparc)
15749      VAR_CPU=sparc
15750      VAR_CPU_ARCH=sparc
15751      VAR_CPU_BITS=32
15752      VAR_CPU_ENDIAN=big
15753      ;;
15754    sparcv9|sparc64)
15755      VAR_CPU=sparcv9
15756      VAR_CPU_ARCH=sparc
15757      VAR_CPU_BITS=64
15758      VAR_CPU_ENDIAN=big
15759      ;;
15760    *)
15761      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15762      ;;
15763  esac
15764
15765  # ..and setup our own variables. (Do this explicitly to facilitate searching)
15766  OPENJDK_BUILD_OS="$VAR_OS"
15767  if test "x$VAR_OS_TYPE" != x; then
15768    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15769  else
15770    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15771  fi
15772  if test "x$VAR_OS_ENV" != x; then
15773    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15774  else
15775    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15776  fi
15777  OPENJDK_BUILD_CPU="$VAR_CPU"
15778  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15779  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15780  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15781
15782
15783
15784
15785
15786
15787
15788
15789  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15790$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15792$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15793
15794  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15795
15796  case "$host_os" in
15797    *linux*)
15798      VAR_OS=linux
15799      VAR_OS_TYPE=unix
15800      ;;
15801    *solaris*)
15802      VAR_OS=solaris
15803      VAR_OS_TYPE=unix
15804      ;;
15805    *darwin*)
15806      VAR_OS=macosx
15807      VAR_OS_TYPE=unix
15808      ;;
15809    *bsd*)
15810      VAR_OS=bsd
15811      VAR_OS_TYPE=unix
15812      ;;
15813    *cygwin*)
15814      VAR_OS=windows
15815      VAR_OS_ENV=windows.cygwin
15816      ;;
15817    *mingw*)
15818      VAR_OS=windows
15819      VAR_OS_ENV=windows.msys
15820      ;;
15821    *aix*)
15822      VAR_OS=aix
15823      VAR_OS_TYPE=unix
15824      ;;
15825    *)
15826      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15827      ;;
15828  esac
15829
15830
15831  # First argument is the cpu name from the trip/quad
15832  case "$host_cpu" in
15833    x86_64)
15834      VAR_CPU=x86_64
15835      VAR_CPU_ARCH=x86
15836      VAR_CPU_BITS=64
15837      VAR_CPU_ENDIAN=little
15838      ;;
15839    i?86)
15840      VAR_CPU=x86
15841      VAR_CPU_ARCH=x86
15842      VAR_CPU_BITS=32
15843      VAR_CPU_ENDIAN=little
15844      ;;
15845    arm*)
15846      VAR_CPU=arm
15847      VAR_CPU_ARCH=arm
15848      VAR_CPU_BITS=32
15849      VAR_CPU_ENDIAN=little
15850      ;;
15851    aarch64)
15852      VAR_CPU=aarch64
15853      VAR_CPU_ARCH=aarch64
15854      VAR_CPU_BITS=64
15855      VAR_CPU_ENDIAN=little
15856      ;;
15857    powerpc)
15858      VAR_CPU=ppc
15859      VAR_CPU_ARCH=ppc
15860      VAR_CPU_BITS=32
15861      VAR_CPU_ENDIAN=big
15862      ;;
15863    powerpc64)
15864      VAR_CPU=ppc64
15865      VAR_CPU_ARCH=ppc
15866      VAR_CPU_BITS=64
15867      VAR_CPU_ENDIAN=big
15868      ;;
15869    powerpc64le)
15870      VAR_CPU=ppc64le
15871      VAR_CPU_ARCH=ppc
15872      VAR_CPU_BITS=64
15873      VAR_CPU_ENDIAN=little
15874      ;;
15875    s390)
15876      VAR_CPU=s390
15877      VAR_CPU_ARCH=s390
15878      VAR_CPU_BITS=32
15879      VAR_CPU_ENDIAN=big
15880      ;;
15881    s390x)
15882      VAR_CPU=s390x
15883      VAR_CPU_ARCH=s390
15884      VAR_CPU_BITS=64
15885      VAR_CPU_ENDIAN=big
15886      ;;
15887    sparc)
15888      VAR_CPU=sparc
15889      VAR_CPU_ARCH=sparc
15890      VAR_CPU_BITS=32
15891      VAR_CPU_ENDIAN=big
15892      ;;
15893    sparcv9|sparc64)
15894      VAR_CPU=sparcv9
15895      VAR_CPU_ARCH=sparc
15896      VAR_CPU_BITS=64
15897      VAR_CPU_ENDIAN=big
15898      ;;
15899    *)
15900      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15901      ;;
15902  esac
15903
15904  # ... and setup our own variables. (Do this explicitly to facilitate searching)
15905  OPENJDK_TARGET_OS="$VAR_OS"
15906  if test "x$VAR_OS_TYPE" != x; then
15907    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15908  else
15909    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15910  fi
15911  if test "x$VAR_OS_ENV" != x; then
15912    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15913  else
15914    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15915  fi
15916  OPENJDK_TARGET_CPU="$VAR_CPU"
15917  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15918  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15919  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15920
15921
15922
15923
15924
15925
15926
15927
15928  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15929$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15931$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15932
15933
15934
15935# Check whether --with-target-bits was given.
15936if test "${with_target_bits+set}" = set; then :
15937  withval=$with_target_bits;
15938fi
15939
15940
15941  # We have three types of compiles:
15942  # native  == normal compilation, target system == build system
15943  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15944  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15945  #
15946  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15947    # We're doing a proper cross-compilation
15948    COMPILE_TYPE="cross"
15949  else
15950    COMPILE_TYPE="native"
15951  fi
15952
15953  if test "x$with_target_bits" != x; then
15954    if test "x$COMPILE_TYPE" = "xcross"; then
15955      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15956    fi
15957
15958    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15959      # A reduced build is requested
15960      COMPILE_TYPE="reduced"
15961      OPENJDK_TARGET_CPU_BITS=32
15962      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15963        OPENJDK_TARGET_CPU=x86
15964      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15965        OPENJDK_TARGET_CPU=sparc
15966      else
15967        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15968      fi
15969    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15970      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
15971    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15972      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15973$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15974    else
15975      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15976    fi
15977  fi
15978
15979
15980  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15981$as_echo_n "checking compilation type... " >&6; }
15982  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15983$as_echo "$COMPILE_TYPE" >&6; }
15984
15985
15986  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15987    REQUIRED_OS_NAME=SunOS
15988    REQUIRED_OS_VERSION=5.10
15989  fi
15990  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15991    REQUIRED_OS_NAME=Linux
15992    REQUIRED_OS_VERSION=2.6
15993  fi
15994  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15995    REQUIRED_OS_NAME=Windows
15996    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15997      REQUIRED_OS_VERSION=5.2
15998    else
15999      REQUIRED_OS_VERSION=5.1
16000    fi
16001  fi
16002  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
16003    REQUIRED_OS_NAME=Darwin
16004    REQUIRED_OS_VERSION=11.2
16005  fi
16006  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
16007    REQUIRED_OS_NAME=AIX
16008    REQUIRED_OS_VERSION=7.1
16009  fi
16010
16011
16012
16013
16014
16015
16016  # Also store the legacy naming of the cpu.
16017  # Ie i586 and amd64 instead of x86 and x86_64
16018  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
16019  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16020    OPENJDK_TARGET_CPU_LEGACY="i586"
16021  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16022    # On all platforms except MacOSX replace x86_64 with amd64.
16023    OPENJDK_TARGET_CPU_LEGACY="amd64"
16024  fi
16025
16026
16027  # And the second legacy naming of the cpu.
16028  # Ie i386 and amd64 instead of x86 and x86_64.
16029  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
16030  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16031    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
16032  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16033    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
16034  fi
16035
16036
16037  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16038  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16039  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
16040  OPENJDK_TARGET_CPU_ISADIR=""
16041  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
16042    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16043      OPENJDK_TARGET_CPU_ISADIR="/amd64"
16044    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16045      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
16046    fi
16047  fi
16048
16049
16050  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
16051  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
16052  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
16053    # On linux only, we replace x86 with i386.
16054    OPENJDK_TARGET_CPU_OSARCH="i386"
16055  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16056    # On all platforms except macosx, we replace x86_64 with amd64.
16057    OPENJDK_TARGET_CPU_OSARCH="amd64"
16058  fi
16059
16060
16061  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
16062  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16063    OPENJDK_TARGET_CPU_JLI="i386"
16064  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16065    # On all platforms except macosx, we replace x86_64 with amd64.
16066    OPENJDK_TARGET_CPU_JLI="amd64"
16067  fi
16068
16069  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16070      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
16071  else
16072      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
16073  fi
16074
16075
16076  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16077  # Macosx is osx and x86_64 is x64
16078  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16079    OPENJDK_TARGET_OS_BUNDLE="osx"
16080  else
16081    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
16082  fi
16083  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16084    OPENJDK_TARGET_CPU_BUNDLE="x64"
16085  else
16086    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
16087  fi
16088  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
16089
16090
16091  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
16092    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16093    # unpack200.exe. This variable is used in
16094    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16095    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
16096      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
16097    fi
16098  fi
16099
16100  if test "x$COMPILE_TYPE" = "xcross"; then
16101    # FIXME: ... or should this include reduced builds..?
16102    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
16103  else
16104    DEFINE_CROSS_COMPILE_ARCH=""
16105  fi
16106
16107
16108  # Convert openjdk platform names to hotspot names
16109
16110  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
16111  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
16112    HOTSPOT_TARGET_OS=bsd
16113  fi
16114
16115
16116  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
16117  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
16118    HOTSPOT_TARGET_OS_TYPE=posix
16119  fi
16120
16121
16122  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
16123  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16124    HOTSPOT_TARGET_CPU=x86_32
16125  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16126    HOTSPOT_TARGET_CPU=sparc
16127  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16128    HOTSPOT_TARGET_CPU=ppc_64
16129  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16130    HOTSPOT_TARGET_CPU=ppc_64
16131  fi
16132
16133
16134  # This is identical with OPENJDK_*, but define anyway for consistency.
16135  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
16136
16137
16138  # Setup HOTSPOT_TARGET_CPU_DEFINE
16139  if test "x$OPENJDK_TARGET_CPU" = xx86; then
16140    HOTSPOT_TARGET_CPU_DEFINE=IA32
16141  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
16142    HOTSPOT_TARGET_CPU_DEFINE=AMD64
16143  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
16144    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16145  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
16146    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
16147  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
16148    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16149  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
16150    HOTSPOT_TARGET_CPU_DEFINE=PPC64
16151
16152  # The cpu defines below are for zero, we don't support them directly.
16153  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
16154    HOTSPOT_TARGET_CPU_DEFINE=SPARC
16155  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
16156    HOTSPOT_TARGET_CPU_DEFINE=PPC32
16157  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
16158    HOTSPOT_TARGET_CPU_DEFINE=S390
16159  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
16160    HOTSPOT_TARGET_CPU_DEFINE=S390
16161  elif test "x$OPENJDK_TARGET_CPU" != x; then
16162    HOTSPOT_TARGET_CPU_DEFINE=$(echo $OPENJDK_TARGET_CPU | tr a-z A-Z)
16163  fi
16164
16165
16166
16167
16168  # Also store the legacy naming of the cpu.
16169  # Ie i586 and amd64 instead of x86 and x86_64
16170  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
16171  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16172    OPENJDK_BUILD_CPU_LEGACY="i586"
16173  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16174    # On all platforms except MacOSX replace x86_64 with amd64.
16175    OPENJDK_BUILD_CPU_LEGACY="amd64"
16176  fi
16177
16178
16179  # And the second legacy naming of the cpu.
16180  # Ie i386 and amd64 instead of x86 and x86_64.
16181  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
16182  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16183    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
16184  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16185    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
16186  fi
16187
16188
16189  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
16190  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
16191  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
16192  OPENJDK_BUILD_CPU_ISADIR=""
16193  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16194    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16195      OPENJDK_BUILD_CPU_ISADIR="/amd64"
16196    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16197      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
16198    fi
16199  fi
16200
16201
16202  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
16203  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
16204  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
16205    # On linux only, we replace x86 with i386.
16206    OPENJDK_BUILD_CPU_OSARCH="i386"
16207  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16208    # On all platforms except macosx, we replace x86_64 with amd64.
16209    OPENJDK_BUILD_CPU_OSARCH="amd64"
16210  fi
16211
16212
16213  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16214  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16215    OPENJDK_BUILD_CPU_JLI="i386"
16216  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16217    # On all platforms except macosx, we replace x86_64 with amd64.
16218    OPENJDK_BUILD_CPU_JLI="amd64"
16219  fi
16220
16221  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16222      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16223  else
16224      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16225  fi
16226
16227
16228  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16229  # Macosx is osx and x86_64 is x64
16230  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16231    OPENJDK_BUILD_OS_BUNDLE="osx"
16232  else
16233    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16234  fi
16235  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16236    OPENJDK_BUILD_CPU_BUNDLE="x64"
16237  else
16238    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16239  fi
16240  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16241
16242
16243  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16244    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16245    # unpack200.exe. This variable is used in
16246    # FLAGS_SETUP_COMPILER_FLAGS_FOR_JDK_HELPER.
16247    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16248      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16249    fi
16250  fi
16251
16252  if test "x$COMPILE_TYPE" = "xcross"; then
16253    # FIXME: ... or should this include reduced builds..?
16254    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16255  else
16256    DEFINE_CROSS_COMPILE_ARCH=""
16257  fi
16258
16259
16260  # Convert openjdk platform names to hotspot names
16261
16262  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16263  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16264    HOTSPOT_BUILD_OS=bsd
16265  fi
16266
16267
16268  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16269  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16270    HOTSPOT_BUILD_OS_TYPE=posix
16271  fi
16272
16273
16274  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16275  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16276    HOTSPOT_BUILD_CPU=x86_32
16277  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16278    HOTSPOT_BUILD_CPU=sparc
16279  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16280    HOTSPOT_BUILD_CPU=ppc_64
16281  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16282    HOTSPOT_BUILD_CPU=ppc_64
16283  fi
16284
16285
16286  # This is identical with OPENJDK_*, but define anyway for consistency.
16287  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16288
16289
16290  # Setup HOTSPOT_BUILD_CPU_DEFINE
16291  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16292    HOTSPOT_BUILD_CPU_DEFINE=IA32
16293  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16294    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16295  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16296    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16297  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16298    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16299  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16300    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16301  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16302    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16303
16304  # The cpu defines below are for zero, we don't support them directly.
16305  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16306    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16307  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16308    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16309  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16310    HOTSPOT_BUILD_CPU_DEFINE=S390
16311  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16312    HOTSPOT_BUILD_CPU_DEFINE=S390
16313  elif test "x$OPENJDK_BUILD_CPU" != x; then
16314    HOTSPOT_BUILD_CPU_DEFINE=$(echo $OPENJDK_BUILD_CPU | tr a-z A-Z)
16315  fi
16316
16317
16318
16319
16320
16321
16322# Continue setting up basic stuff. Most remaining code require fundamental tools.
16323
16324  # Save the current directory this script was started from
16325  CURDIR="$PWD"
16326
16327  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16328  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16329  # was not available at that time.
16330  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16331  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16332    ORIGINAL_PATH="$REWRITTEN_PATH"
16333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16334$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16335  fi
16336
16337  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16338    PATH_SEP=";"
16339
16340  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16341  if test $SRC_ROOT_LENGTH -gt 100; then
16342    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16343  fi
16344
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16347$as_echo_n "checking cygwin release... " >&6; }
16348    CYGWIN_VERSION=`$UNAME -r`
16349    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16350$as_echo "$CYGWIN_VERSION" >&6; }
16351    WINDOWS_ENV_VENDOR='cygwin'
16352    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16353
16354    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16355    if test "x$CYGWIN_VERSION_OLD" != x; then
16356      { $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
16357$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;}
16358      as_fn_error $? "Cannot continue" "$LINENO" 5
16359    fi
16360    if test "x$CYGPATH" = x; then
16361      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16362    fi
16363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16364$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16365    # The cmd output ends with Windows line endings (CR/LF)
16366    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
16367    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16368    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16369    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16370$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16371    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16372    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16373    if test "x$test_cygdrive_prefix" = x; then
16374      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16375    fi
16376  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16377    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16378$as_echo_n "checking msys release... " >&6; }
16379    MSYS_VERSION=`$UNAME -r`
16380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16381$as_echo "$MSYS_VERSION" >&6; }
16382
16383    WINDOWS_ENV_VENDOR='msys'
16384    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16385
16386    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16387$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16388    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16389    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16390
16391  windows_path="$MSYS_ROOT_PATH"
16392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393    unix_path=`$CYGPATH -u "$windows_path"`
16394    MSYS_ROOT_PATH="$unix_path"
16395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16397    MSYS_ROOT_PATH="$unix_path"
16398  fi
16399
16400    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16401$as_echo "$MSYS_ROOT_PATH" >&6; }
16402    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16403  else
16404    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16405  fi
16406
16407  # Test if windows or unix (cygwin/msys) find is first in path.
16408  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16409$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16410  FIND_BINARY_OUTPUT=`find --version 2>&1`
16411  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16412    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16413$as_echo "unix style" >&6; }
16414  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16416$as_echo "Windows" >&6; }
16417    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16418$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16419    { $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
16420$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16421    as_fn_error $? "Cannot continue" "$LINENO" 5
16422  else
16423    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16424$as_echo "unknown" >&6; }
16425    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16426$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16427  fi
16428
16429  else
16430    PATH_SEP=":"
16431  fi
16432
16433
16434  # We get the top-level directory from the supporting wrappers.
16435  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16436$as_echo_n "checking for top-level directory... " >&6; }
16437  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16438$as_echo "$TOPDIR" >&6; }
16439
16440
16441  # Save the original version of TOPDIR for string comparisons
16442  ORIGINAL_TOPDIR="$TOPDIR"
16443
16444
16445  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16446
16447  # Only process if variable expands to non-empty
16448
16449  if test "x$CURDIR" != x; then
16450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16451
16452  # Input might be given as Windows format, start by converting to
16453  # unix format.
16454  path="$CURDIR"
16455  new_path=`$CYGPATH -u "$path"`
16456
16457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16460  # "foo.exe" is OK but "foo" is an error.
16461  #
16462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16463  # It is also a way to make sure we got the proper file name for the real test later on.
16464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16465  if test "x$test_shortpath" = x; then
16466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16467$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16468    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16469  fi
16470
16471  # Call helper function which possibly converts this using DOS-style short mode.
16472  # If so, the updated path is stored in $new_path.
16473
16474  input_path="$new_path"
16475  # Check if we need to convert this using DOS-style short mode. If the path
16476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16477  # take no chances and rewrite it.
16478  # Note: m4 eats our [], so we need to use [ and ] instead.
16479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16480  if test "x$has_forbidden_chars" != x; then
16481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16485      # Going to short mode and back again did indeed matter. Since short mode is
16486      # case insensitive, let's make it lowercase to improve readability.
16487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16488      # Now convert it back to Unix-style (cygpath)
16489      input_path=`$CYGPATH -u "$shortmode_path"`
16490      new_path="$input_path"
16491    fi
16492  fi
16493
16494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16495  if test "x$test_cygdrive_prefix" = x; then
16496    # As a simple fix, exclude /usr/bin since it's not a real path.
16497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16499      # a path prefixed by /cygdrive for fixpath to work.
16500      new_path="$CYGWIN_ROOT_PATH$input_path"
16501    fi
16502  fi
16503
16504
16505  if test "x$path" != "x$new_path"; then
16506    CURDIR="$new_path"
16507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16508$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16509  fi
16510
16511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16512
16513  path="$CURDIR"
16514  has_colon=`$ECHO $path | $GREP ^.:`
16515  new_path="$path"
16516  if test "x$has_colon" = x; then
16517    # Not in mixed or Windows style, start by that.
16518    new_path=`cmd //c echo $path`
16519  fi
16520
16521
16522  input_path="$new_path"
16523  # Check if we need to convert this using DOS-style short mode. If the path
16524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16525  # take no chances and rewrite it.
16526  # Note: m4 eats our [], so we need to use [ and ] instead.
16527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16528  if test "x$has_forbidden_chars" != x; then
16529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16531  fi
16532
16533
16534  windows_path="$new_path"
16535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16536    unix_path=`$CYGPATH -u "$windows_path"`
16537    new_path="$unix_path"
16538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16540    new_path="$unix_path"
16541  fi
16542
16543  if test "x$path" != "x$new_path"; then
16544    CURDIR="$new_path"
16545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16546$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16547  fi
16548
16549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16551
16552    else
16553      # We're on a unix platform. Hooray! :)
16554      path="$CURDIR"
16555      has_space=`$ECHO "$path" | $GREP " "`
16556      if test "x$has_space" != x; then
16557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16558$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16559        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16560      fi
16561
16562      # Use eval to expand a potential ~
16563      eval path="$path"
16564      if test ! -f "$path" && test ! -d "$path"; then
16565        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16566      fi
16567
16568      if test -d "$path"; then
16569        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16570      else
16571        dir="`$DIRNAME "$path"`"
16572        base="`$BASENAME "$path"`"
16573        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16574      fi
16575    fi
16576  fi
16577
16578
16579  # Only process if variable expands to non-empty
16580
16581  if test "x$TOPDIR" != x; then
16582    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16583
16584  # Input might be given as Windows format, start by converting to
16585  # unix format.
16586  path="$TOPDIR"
16587  new_path=`$CYGPATH -u "$path"`
16588
16589  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16590  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16591  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16592  # "foo.exe" is OK but "foo" is an error.
16593  #
16594  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16595  # It is also a way to make sure we got the proper file name for the real test later on.
16596  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16597  if test "x$test_shortpath" = x; then
16598    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16599$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16600    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16601  fi
16602
16603  # Call helper function which possibly converts this using DOS-style short mode.
16604  # If so, the updated path is stored in $new_path.
16605
16606  input_path="$new_path"
16607  # Check if we need to convert this using DOS-style short mode. If the path
16608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16609  # take no chances and rewrite it.
16610  # Note: m4 eats our [], so we need to use [ and ] instead.
16611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16612  if test "x$has_forbidden_chars" != x; then
16613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16617      # Going to short mode and back again did indeed matter. Since short mode is
16618      # case insensitive, let's make it lowercase to improve readability.
16619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16620      # Now convert it back to Unix-style (cygpath)
16621      input_path=`$CYGPATH -u "$shortmode_path"`
16622      new_path="$input_path"
16623    fi
16624  fi
16625
16626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16627  if test "x$test_cygdrive_prefix" = x; then
16628    # As a simple fix, exclude /usr/bin since it's not a real path.
16629    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16631      # a path prefixed by /cygdrive for fixpath to work.
16632      new_path="$CYGWIN_ROOT_PATH$input_path"
16633    fi
16634  fi
16635
16636
16637  if test "x$path" != "x$new_path"; then
16638    TOPDIR="$new_path"
16639    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16640$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16641  fi
16642
16643    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16644
16645  path="$TOPDIR"
16646  has_colon=`$ECHO $path | $GREP ^.:`
16647  new_path="$path"
16648  if test "x$has_colon" = x; then
16649    # Not in mixed or Windows style, start by that.
16650    new_path=`cmd //c echo $path`
16651  fi
16652
16653
16654  input_path="$new_path"
16655  # Check if we need to convert this using DOS-style short mode. If the path
16656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16657  # take no chances and rewrite it.
16658  # Note: m4 eats our [], so we need to use [ and ] instead.
16659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16660  if test "x$has_forbidden_chars" != x; then
16661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16662    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16663  fi
16664
16665
16666  windows_path="$new_path"
16667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16668    unix_path=`$CYGPATH -u "$windows_path"`
16669    new_path="$unix_path"
16670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16671    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16672    new_path="$unix_path"
16673  fi
16674
16675  if test "x$path" != "x$new_path"; then
16676    TOPDIR="$new_path"
16677    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16678$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16679  fi
16680
16681  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16682  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16683
16684    else
16685      # We're on a unix platform. Hooray! :)
16686      path="$TOPDIR"
16687      has_space=`$ECHO "$path" | $GREP " "`
16688      if test "x$has_space" != x; then
16689        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16690$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16691        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16692      fi
16693
16694      # Use eval to expand a potential ~
16695      eval path="$path"
16696      if test ! -f "$path" && test ! -d "$path"; then
16697        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16698      fi
16699
16700      if test -d "$path"; then
16701        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16702      else
16703        dir="`$DIRNAME "$path"`"
16704        base="`$BASENAME "$path"`"
16705        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16706      fi
16707    fi
16708  fi
16709
16710  # SRC_ROOT is a traditional alias for TOPDIR.
16711  SRC_ROOT=$TOPDIR
16712
16713  # Calculate a canonical version of TOPDIR for string comparisons
16714  CANONICAL_TOPDIR=$TOPDIR
16715
16716  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16717    # Follow a chain of symbolic links. Use readlink
16718    # where it exists, else fall back to horribly
16719    # complicated shell code.
16720    if test "x$READLINK_TESTED" != yes; then
16721      # On MacOSX there is a readlink tool with a different
16722      # purpose than the GNU readlink tool. Check the found readlink.
16723      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16724      if test "x$ISGNU" = x; then
16725        # A readlink that we do not know how to use.
16726        # Are there other non-GNU readlinks out there?
16727        READLINK_TESTED=yes
16728        READLINK=
16729      fi
16730    fi
16731
16732    if test "x$READLINK" != x; then
16733      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16734    else
16735      # Save the current directory for restoring afterwards
16736      STARTDIR=$PWD
16737      COUNTER=0
16738      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16739      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16740      cd $sym_link_dir
16741      # Use -P flag to resolve symlinks in directories.
16742      cd `$THEPWDCMD -P`
16743      sym_link_dir=`$THEPWDCMD -P`
16744      # Resolve file symlinks
16745      while test $COUNTER -lt 20; do
16746        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16747        if test "x$ISLINK" == x; then
16748          # This is not a symbolic link! We are done!
16749          break
16750        fi
16751        # Again resolve directory symlinks since the target of the just found
16752        # link could be in a different directory
16753        cd `$DIRNAME $ISLINK`
16754        sym_link_dir=`$THEPWDCMD -P`
16755        sym_link_file=`$BASENAME $ISLINK`
16756        let COUNTER=COUNTER+1
16757      done
16758      cd $STARTDIR
16759      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16760    fi
16761  fi
16762
16763
16764
16765  # Locate the directory of this script.
16766  AUTOCONF_DIR=$TOPDIR/common/autoconf
16767
16768  # Setup username (for use in adhoc version strings etc)
16769  # Outer [ ] to quote m4.
16770   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16771
16772
16773
16774# Check if it's a pure open build or if custom sources are to be used.
16775
16776  # Check whether --enable-openjdk-only was given.
16777if test "${enable_openjdk_only+set}" = set; then :
16778  enableval=$enable_openjdk_only;
16779else
16780  enable_openjdk_only="no"
16781fi
16782
16783
16784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if custom source is suppressed (openjdk-only)" >&5
16785$as_echo_n "checking if custom source is suppressed (openjdk-only)... " >&6; }
16786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_openjdk_only" >&5
16787$as_echo "$enable_openjdk_only" >&6; }
16788  if test "x$enable_openjdk_only" = "xyes"; then
16789    SUPPRESS_CUSTOM_EXTENSIONS="true"
16790  elif test "x$enable_openjdk_only" = "xno"; then
16791    SUPPRESS_CUSTOM_EXTENSIONS="false"
16792  else
16793    as_fn_error $? "Invalid value for --enable-openjdk-only: $enable_openjdk_only" "$LINENO" 5
16794  fi
16795
16796  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16797  # the IncludeCustomExtension macro.
16798
16799
16800# Check whether --with-custom-make-dir was given.
16801if test "${with_custom_make_dir+set}" = set; then :
16802  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
16803$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16804fi
16805
16806
16807
16808
16809# These are needed to be able to create a configuration name (and thus the output directory)
16810
16811  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16812$as_echo_n "checking which variant of the JDK to build... " >&6; }
16813
16814# Check whether --with-jdk-variant was given.
16815if test "${with_jdk_variant+set}" = set; then :
16816  withval=$with_jdk_variant;
16817fi
16818
16819
16820  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16821    JDK_VARIANT="normal"
16822  else
16823    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16824  fi
16825
16826
16827
16828  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16829$as_echo "$JDK_VARIANT" >&6; }
16830
16831
16832  DEBUG_LEVEL="release"
16833  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16834$as_echo_n "checking which debug level to use... " >&6; }
16835  # Check whether --enable-debug was given.
16836if test "${enable_debug+set}" = set; then :
16837  enableval=$enable_debug;
16838        ENABLE_DEBUG="${enableval}"
16839        DEBUG_LEVEL="fastdebug"
16840
16841else
16842  ENABLE_DEBUG="no"
16843fi
16844
16845
16846
16847# Check whether --with-debug-level was given.
16848if test "${with_debug_level+set}" = set; then :
16849  withval=$with_debug_level;
16850        DEBUG_LEVEL="${withval}"
16851        if test "x$ENABLE_DEBUG" = xyes; then
16852          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16853        fi
16854
16855fi
16856
16857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16858$as_echo "$DEBUG_LEVEL" >&6; }
16859
16860  if test "x$DEBUG_LEVEL" != xrelease && \
16861      test "x$DEBUG_LEVEL" != xoptimized && \
16862      test "x$DEBUG_LEVEL" != xfastdebug && \
16863      test "x$DEBUG_LEVEL" != xslowdebug; then
16864    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16865  fi
16866
16867  # Translate DEBUG_LEVEL to debug level used by Hotspot
16868  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16869  if test "x$DEBUG_LEVEL" = xrelease; then
16870    HOTSPOT_DEBUG_LEVEL="product"
16871  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16872    HOTSPOT_DEBUG_LEVEL="debug"
16873  fi
16874
16875  if test "x$DEBUG_LEVEL" = xoptimized; then
16876    # The debug level 'optimized' is a little special because it is currently only
16877    # applicable to the HotSpot build where it means to build a completely
16878    # optimized version of the VM without any debugging code (like for the
16879    # 'release' debug level which is called 'product' in the HotSpot build) but
16880    # with the exception that it can contain additional code which is otherwise
16881    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16882    # test new and/or experimental features which are not intended for customer
16883    # shipment. Because these new features need to be tested and benchmarked in
16884    # real world scenarios, we want to build the containing JDK at the 'release'
16885    # debug level.
16886    DEBUG_LEVEL="release"
16887  fi
16888
16889
16890
16891
16892
16893
16894# Check whether --with-jvm-variants was given.
16895if test "${with_jvm_variants+set}" = set; then :
16896  withval=$with_jvm_variants;
16897fi
16898
16899
16900
16901
16902# Check whether --with-cpu-port was given.
16903if test "${with_cpu_port+set}" = set; then :
16904  withval=$with_cpu_port;
16905fi
16906
16907
16908  if test "x$with_cpu_port" != x; then
16909    if test "x$OPENJDK_TARGET_CPU" != xaarch64; then
16910      as_fn_error $? "--with-cpu-port only available on aarch64" "$LINENO" 5
16911    fi
16912    if test "x$with_cpu_port" != xarm64 && \
16913        test "x$with_cpu_port" != xaarch64; then
16914      as_fn_error $? "--with-cpu-port must specify arm64 or aarch64" "$LINENO" 5
16915    fi
16916    HOTSPOT_TARGET_CPU_PORT="$with_cpu_port"
16917  fi
16918
16919
16920  if test "x$with_jvm_variants" = x; then
16921    with_jvm_variants="server"
16922  fi
16923  JVM_VARIANTS_OPT="$with_jvm_variants"
16924
16925  # Has the user listed more than one variant?
16926  # Additional [] needed to keep m4 from mangling shell constructs.
16927  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16928    BUILDING_MULTIPLE_JVM_VARIANTS=true
16929  else
16930    BUILDING_MULTIPLE_JVM_VARIANTS=false
16931  fi
16932  # Replace the commas with AND for use in the build directory name.
16933  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16934
16935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16936$as_echo_n "checking which variants of the JVM to build... " >&6; }
16937  # JVM_VARIANTS is a space-separated list.
16938  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16939  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16940  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16941$as_echo "$JVM_VARIANTS" >&6; }
16942
16943  # Check that the selected variants are valid
16944
16945  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16946  # Notice that the original variant failes on SLES 10 and 11
16947  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16948  STACK=${JVM_VARIANTS// /$'\n'}
16949  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16950  if test "x$INVALID_VARIANTS" != x; then
16951    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16952$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16953    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16954  fi
16955
16956  # All "special" variants share the same output directory ("server")
16957  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16958  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16959  STACK=${JVM_VARIANTS// /$'\n'}
16960  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16961  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16962    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16963  fi
16964
16965  # The "main" variant is the one used by other libs to link against during the
16966  # build.
16967  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
16968    MAIN_VARIANT_PRIO_ORDER="server client minimal"
16969    for variant in $MAIN_VARIANT_PRIO_ORDER; do
16970      if   [[ " $JVM_VARIANTS " =~ " $variant " ]]  ; then
16971        JVM_VARIANT_MAIN="$variant"
16972        break
16973      fi
16974    done
16975  else
16976    JVM_VARIANT_MAIN="$JVM_VARIANTS"
16977  fi
16978
16979
16980
16981
16982
16983  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16984    # zero behaves as a platform and rewrites these values. This is really weird. :(
16985    # We are guaranteed that we do not build any other variants when building zero.
16986    HOTSPOT_TARGET_CPU=zero
16987    HOTSPOT_TARGET_CPU_ARCH=zero
16988  fi
16989
16990
16991# With basic setup done, call the custom early hook.
16992
16993
16994# Check if we have devkits, extra paths or sysroot set.
16995
16996
16997# Check whether --with-devkit was given.
16998if test "${with_devkit+set}" = set; then :
16999  withval=$with_devkit;
17000
17001  # Only process if variable expands to non-empty
17002
17003  if test "x$with_devkit" != x; then
17004    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17005
17006  # Input might be given as Windows format, start by converting to
17007  # unix format.
17008  path="$with_devkit"
17009  new_path=`$CYGPATH -u "$path"`
17010
17011  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17012  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17013  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17014  # "foo.exe" is OK but "foo" is an error.
17015  #
17016  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17017  # It is also a way to make sure we got the proper file name for the real test later on.
17018  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17019  if test "x$test_shortpath" = x; then
17020    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17021$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17022    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
17023  fi
17024
17025  # Call helper function which possibly converts this using DOS-style short mode.
17026  # If so, the updated path is stored in $new_path.
17027
17028  input_path="$new_path"
17029  # Check if we need to convert this using DOS-style short mode. If the path
17030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17031  # take no chances and rewrite it.
17032  # Note: m4 eats our [], so we need to use [ and ] instead.
17033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17034  if test "x$has_forbidden_chars" != x; then
17035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17039      # Going to short mode and back again did indeed matter. Since short mode is
17040      # case insensitive, let's make it lowercase to improve readability.
17041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17042      # Now convert it back to Unix-style (cygpath)
17043      input_path=`$CYGPATH -u "$shortmode_path"`
17044      new_path="$input_path"
17045    fi
17046  fi
17047
17048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17049  if test "x$test_cygdrive_prefix" = x; then
17050    # As a simple fix, exclude /usr/bin since it's not a real path.
17051    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17053      # a path prefixed by /cygdrive for fixpath to work.
17054      new_path="$CYGWIN_ROOT_PATH$input_path"
17055    fi
17056  fi
17057
17058
17059  if test "x$path" != "x$new_path"; then
17060    with_devkit="$new_path"
17061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17062$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17063  fi
17064
17065    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17066
17067  path="$with_devkit"
17068  has_colon=`$ECHO $path | $GREP ^.:`
17069  new_path="$path"
17070  if test "x$has_colon" = x; then
17071    # Not in mixed or Windows style, start by that.
17072    new_path=`cmd //c echo $path`
17073  fi
17074
17075
17076  input_path="$new_path"
17077  # Check if we need to convert this using DOS-style short mode. If the path
17078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17079  # take no chances and rewrite it.
17080  # Note: m4 eats our [], so we need to use [ and ] instead.
17081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17082  if test "x$has_forbidden_chars" != x; then
17083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17084    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17085  fi
17086
17087
17088  windows_path="$new_path"
17089  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17090    unix_path=`$CYGPATH -u "$windows_path"`
17091    new_path="$unix_path"
17092  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17093    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17094    new_path="$unix_path"
17095  fi
17096
17097  if test "x$path" != "x$new_path"; then
17098    with_devkit="$new_path"
17099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
17100$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
17101  fi
17102
17103  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17104  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17105
17106    else
17107      # We're on a unix platform. Hooray! :)
17108      path="$with_devkit"
17109      has_space=`$ECHO "$path" | $GREP " "`
17110      if test "x$has_space" != x; then
17111        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
17112$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
17113        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17114      fi
17115
17116      # Use eval to expand a potential ~
17117      eval path="$path"
17118      if test ! -f "$path" && test ! -d "$path"; then
17119        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
17120      fi
17121
17122      if test -d "$path"; then
17123        with_devkit="`cd "$path"; $THEPWDCMD -L`"
17124      else
17125        dir="`$DIRNAME "$path"`"
17126        base="`$BASENAME "$path"`"
17127        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
17128      fi
17129    fi
17130  fi
17131
17132        DEVKIT_ROOT="$with_devkit"
17133        # Check for a meta data info file in the root of the devkit
17134        if test -f "$DEVKIT_ROOT/devkit.info"; then
17135          . $DEVKIT_ROOT/devkit.info
17136          # This potentially sets the following:
17137          # A descriptive name of the devkit
17138
17139  if test "x$DEVKIT_NAME" = x; then
17140    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
17141  fi
17142
17143          # Corresponds to --with-extra-path
17144
17145  if test "x$DEVKIT_EXTRA_PATH" = x; then
17146    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
17147  fi
17148
17149          # Corresponds to --with-toolchain-path
17150
17151  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17152    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
17153  fi
17154
17155          # Corresponds to --with-sysroot
17156
17157  if test "x$DEVKIT_SYSROOT" = x; then
17158    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
17159  fi
17160
17161
17162          # Identifies the Visual Studio version in the devkit
17163
17164  if test "x$DEVKIT_VS_VERSION" = x; then
17165    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
17166  fi
17167
17168          # The Visual Studio include environment variable
17169
17170  if test "x$DEVKIT_VS_INCLUDE" = x; then
17171    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
17172  fi
17173
17174          # The Visual Studio lib environment variable
17175
17176  if test "x$DEVKIT_VS_LIB" = x; then
17177    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
17178  fi
17179
17180          # Corresponds to --with-msvcr-dll
17181
17182  if test "x$DEVKIT_MSVCR_DLL" = x; then
17183    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
17184  fi
17185
17186          # Corresponds to --with-msvcp-dll
17187
17188  if test "x$DEVKIT_MSVCP_DLL" = x; then
17189    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
17190  fi
17191
17192        fi
17193
17194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
17195$as_echo_n "checking for devkit... " >&6; }
17196        if test "x$DEVKIT_NAME" != x; then
17197          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
17198$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
17199        else
17200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17201$as_echo "$DEVKIT_ROOT" >&6; }
17202        fi
17203
17204
17205  if test "x$DEVKIT_EXTRA_PATH" != x; then
17206    if test "x$EXTRA_PATH" = x; then
17207      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17208    else
17209      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17210    fi
17211  fi
17212
17213
17214        # Fallback default of just /bin if DEVKIT_PATH is not defined
17215        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17216          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17217        fi
17218
17219  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17220    if test "x$TOOLCHAIN_PATH" = x; then
17221      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17222    else
17223      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17224    fi
17225  fi
17226
17227
17228        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17229        # places for backwards compatiblity.
17230        if test "x$DEVKIT_SYSROOT" != x; then
17231          SYSROOT="$DEVKIT_SYSROOT"
17232        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17233          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17234        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17235          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17236        fi
17237
17238
17239fi
17240
17241
17242  # You can force the sysroot if the sysroot encoded into the compiler tools
17243  # is not correct.
17244
17245# Check whether --with-sys-root was given.
17246if test "${with_sys_root+set}" = set; then :
17247  withval=$with_sys_root; SYSROOT=$with_sys_root
17248
17249fi
17250
17251
17252
17253# Check whether --with-sysroot was given.
17254if test "${with_sysroot+set}" = set; then :
17255  withval=$with_sysroot; SYSROOT=$with_sysroot
17256
17257fi
17258
17259
17260
17261# Check whether --with-tools-dir was given.
17262if test "${with_tools_dir+set}" = set; then :
17263  withval=$with_tools_dir;
17264  if test "x$with_tools_dir" != x; then
17265    if test "x$TOOLCHAIN_PATH" = x; then
17266      TOOLCHAIN_PATH="$with_tools_dir"
17267    else
17268      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17269    fi
17270  fi
17271
17272
17273fi
17274
17275
17276
17277# Check whether --with-toolchain-path was given.
17278if test "${with_toolchain_path+set}" = set; then :
17279  withval=$with_toolchain_path;
17280  if test "x$with_toolchain_path" != x; then
17281    if test "x$TOOLCHAIN_PATH" = x; then
17282      TOOLCHAIN_PATH="$with_toolchain_path"
17283    else
17284      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17285    fi
17286  fi
17287
17288
17289fi
17290
17291
17292
17293# Check whether --with-extra-path was given.
17294if test "${with_extra_path+set}" = set; then :
17295  withval=$with_extra_path;
17296  if test "x$with_extra_path" != x; then
17297    if test "x$EXTRA_PATH" = x; then
17298      EXTRA_PATH="$with_extra_path"
17299    else
17300      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17301    fi
17302  fi
17303
17304
17305fi
17306
17307
17308  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17309    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17310    # If not, detect if Xcode is installed by running xcodebuild -version
17311    # if no Xcode installed, xcodebuild exits with 1
17312    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17313    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17314      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17315      # fall back on the stub binary in /usr/bin/xcodebuild
17316      # Extract the first word of "xcodebuild", so it can be a program name with args.
17317set dummy xcodebuild; ac_word=$2
17318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17319$as_echo_n "checking for $ac_word... " >&6; }
17320if ${ac_cv_path_XCODEBUILD+:} false; then :
17321  $as_echo_n "(cached) " >&6
17322else
17323  case $XCODEBUILD in
17324  [\\/]* | ?:[\\/]*)
17325  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17326  ;;
17327  *)
17328  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17329for as_dir in $TOOLCHAIN_PATH
17330do
17331  IFS=$as_save_IFS
17332  test -z "$as_dir" && as_dir=.
17333    for ac_exec_ext in '' $ac_executable_extensions; do
17334  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17335    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17336    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17337    break 2
17338  fi
17339done
17340  done
17341IFS=$as_save_IFS
17342
17343  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17344  ;;
17345esac
17346fi
17347XCODEBUILD=$ac_cv_path_XCODEBUILD
17348if test -n "$XCODEBUILD"; then
17349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17350$as_echo "$XCODEBUILD" >&6; }
17351else
17352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17353$as_echo "no" >&6; }
17354fi
17355
17356
17357    else
17358      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17359      # when only the command line tools are installed there are no SDKs, so headers
17360      # are copied into the system frameworks
17361      XCODEBUILD=
17362
17363    fi
17364
17365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17366$as_echo_n "checking for sdk name... " >&6; }
17367
17368# Check whether --with-sdk-name was given.
17369if test "${with_sdk_name+set}" = set; then :
17370  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17371
17372fi
17373
17374    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17375$as_echo "$SDKNAME" >&6; }
17376
17377    # if toolchain path is specified then don't rely on system headers, they may not compile
17378    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17379    test -z "$TOOLCHAIN_PATH" && \
17380      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17381
17382    if test -z "$SYSROOT"; then
17383      if test -n "$XCODEBUILD"; then
17384        # if we don't have system headers, use default SDK name (last resort)
17385        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17386          SDKNAME=${SDKNAME:-macosx}
17387        fi
17388
17389        if test -n "$SDKNAME"; then
17390          # Call xcodebuild to determine SYSROOT
17391          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17392        fi
17393      else
17394        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17395          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
17396        fi
17397      fi
17398    else
17399      # warn user if --with-sdk-name was also set
17400      if test -n "$with_sdk_name"; then
17401        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17402$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17403      fi
17404    fi
17405
17406    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17407      # If no system framework headers, then SYSROOT must be set, or we won't build
17408      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
17409    fi
17410
17411    # Perform a basic sanity test
17412    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17413      if test -z "$SYSROOT"; then
17414        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
17415      else
17416        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17417      fi
17418    fi
17419
17420    # set SDKROOT too, Xcode tools will pick it up
17421    SDKROOT="$SYSROOT"
17422
17423  fi
17424
17425  # Prepend the extra path to the global path
17426
17427  if test "x$EXTRA_PATH" != x; then
17428    if test "x$PATH" = x; then
17429      PATH="$EXTRA_PATH"
17430    else
17431      PATH="$EXTRA_PATH:$PATH"
17432    fi
17433  fi
17434
17435
17436  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17437$as_echo_n "checking for sysroot... " >&6; }
17438  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17439$as_echo "$SYSROOT" >&6; }
17440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17441$as_echo_n "checking for toolchain path... " >&6; }
17442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17443$as_echo "$TOOLCHAIN_PATH" >&6; }
17444  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17445$as_echo_n "checking for extra path... " >&6; }
17446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17447$as_echo "$EXTRA_PATH" >&6; }
17448
17449
17450# To properly create a configuration name, we need to have the OpenJDK target
17451# and options (variants and debug level) parsed.
17452
17453
17454
17455# Check whether --with-conf-name was given.
17456if test "${with_conf_name+set}" = set; then :
17457  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17458fi
17459
17460
17461  # Test from where we are running configure, in or outside of src root.
17462  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17463$as_echo_n "checking where to store configuration... " >&6; }
17464  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17465      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17466      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17467    # We are running configure from the src root.
17468    # Create a default ./build/target-variant-debuglevel output root.
17469    if test "x${CONF_NAME}" = x; then
17470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17471$as_echo "in default location" >&6; }
17472      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17473    else
17474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17475$as_echo "in build directory with custom name" >&6; }
17476    fi
17477    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17478    $MKDIR -p "$OUTPUT_ROOT"
17479    if test ! -d "$OUTPUT_ROOT"; then
17480      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17481    fi
17482  else
17483    # We are running configure from outside of the src dir.
17484    # Then use the current directory as output dir!
17485    # If configuration is situated in normal build directory, just use the build
17486    # directory name as configuration name, otherwise use the complete path.
17487    if test "x${CONF_NAME}" = x; then
17488      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17489    fi
17490    OUTPUT_ROOT="$CURDIR"
17491    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17492$as_echo "in current directory" >&6; }
17493
17494    # WARNING: This might be a bad thing to do. You need to be sure you want to
17495    # have a configuration in this directory. Do some sanity checks!
17496
17497    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17498      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17499      # other files
17500      files_present=`$LS $OUTPUT_ROOT`
17501      # Configure has already touched config.log and confdefs.h in the current dir when this check
17502      # is performed.
17503      filtered_files=`$ECHO "$files_present" \
17504          | $SED -e 's/config.log//g' \
17505              -e 's/configure.log//g' \
17506              -e 's/confdefs.h//g' \
17507              -e 's/ //g' \
17508          | $TR -d '\n'`
17509      if test "x$filtered_files" != x; then
17510        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17511$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17512        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17513$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17514        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17515$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17516        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17517$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17518        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17519$as_echo "$as_me: seriously mess up just about everything." >&6;}
17520        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17521$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17522        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17523$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17524        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17525      fi
17526    fi
17527  fi
17528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17529$as_echo_n "checking what configuration name to use... " >&6; }
17530  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17531$as_echo "$CONF_NAME" >&6; }
17532
17533
17534  # Only process if variable expands to non-empty
17535
17536  if test "x$OUTPUT_ROOT" != x; then
17537    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17538
17539  # Input might be given as Windows format, start by converting to
17540  # unix format.
17541  path="$OUTPUT_ROOT"
17542  new_path=`$CYGPATH -u "$path"`
17543
17544  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17545  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17546  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17547  # "foo.exe" is OK but "foo" is an error.
17548  #
17549  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17550  # It is also a way to make sure we got the proper file name for the real test later on.
17551  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17552  if test "x$test_shortpath" = x; then
17553    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17554$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17555    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17556  fi
17557
17558  # Call helper function which possibly converts this using DOS-style short mode.
17559  # If so, the updated path is stored in $new_path.
17560
17561  input_path="$new_path"
17562  # Check if we need to convert this using DOS-style short mode. If the path
17563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17564  # take no chances and rewrite it.
17565  # Note: m4 eats our [], so we need to use [ and ] instead.
17566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17567  if test "x$has_forbidden_chars" != x; then
17568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17569    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17570    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17571    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17572      # Going to short mode and back again did indeed matter. Since short mode is
17573      # case insensitive, let's make it lowercase to improve readability.
17574      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17575      # Now convert it back to Unix-style (cygpath)
17576      input_path=`$CYGPATH -u "$shortmode_path"`
17577      new_path="$input_path"
17578    fi
17579  fi
17580
17581  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17582  if test "x$test_cygdrive_prefix" = x; then
17583    # As a simple fix, exclude /usr/bin since it's not a real path.
17584    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17585      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17586      # a path prefixed by /cygdrive for fixpath to work.
17587      new_path="$CYGWIN_ROOT_PATH$input_path"
17588    fi
17589  fi
17590
17591
17592  if test "x$path" != "x$new_path"; then
17593    OUTPUT_ROOT="$new_path"
17594    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17595$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17596  fi
17597
17598    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17599
17600  path="$OUTPUT_ROOT"
17601  has_colon=`$ECHO $path | $GREP ^.:`
17602  new_path="$path"
17603  if test "x$has_colon" = x; then
17604    # Not in mixed or Windows style, start by that.
17605    new_path=`cmd //c echo $path`
17606  fi
17607
17608
17609  input_path="$new_path"
17610  # Check if we need to convert this using DOS-style short mode. If the path
17611  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17612  # take no chances and rewrite it.
17613  # Note: m4 eats our [], so we need to use [ and ] instead.
17614  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17615  if test "x$has_forbidden_chars" != x; then
17616    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17617    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17618  fi
17619
17620
17621  windows_path="$new_path"
17622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17623    unix_path=`$CYGPATH -u "$windows_path"`
17624    new_path="$unix_path"
17625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17627    new_path="$unix_path"
17628  fi
17629
17630  if test "x$path" != "x$new_path"; then
17631    OUTPUT_ROOT="$new_path"
17632    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17633$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17634  fi
17635
17636  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17637  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17638
17639    else
17640      # We're on a unix platform. Hooray! :)
17641      path="$OUTPUT_ROOT"
17642      has_space=`$ECHO "$path" | $GREP " "`
17643      if test "x$has_space" != x; then
17644        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17645$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17646        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17647      fi
17648
17649      # Use eval to expand a potential ~
17650      eval path="$path"
17651      if test ! -f "$path" && test ! -d "$path"; then
17652        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17653      fi
17654
17655      if test -d "$path"; then
17656        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17657      else
17658        dir="`$DIRNAME "$path"`"
17659        base="`$BASENAME "$path"`"
17660        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17661      fi
17662    fi
17663  fi
17664
17665
17666  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17667  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17668
17669  SPEC="$OUTPUT_ROOT/spec.gmk"
17670
17671
17672
17673
17674
17675  # The spec.gmk file contains all variables for the make system.
17676  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17677
17678  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17679  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17680
17681  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17682  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17683
17684  # The compare.sh is used to compare the build output to other builds.
17685  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17686
17687  # The generated Makefile knows where the spec.gmk is and where the source is.
17688  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17689  # which will look for generated configurations
17690  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17691
17692
17693
17694# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17695
17696  for ac_prog in apt-get yum brew port pkgutil pkgadd
17697do
17698  # Extract the first word of "$ac_prog", so it can be a program name with args.
17699set dummy $ac_prog; ac_word=$2
17700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17701$as_echo_n "checking for $ac_word... " >&6; }
17702if ${ac_cv_prog_PKGHANDLER+:} false; then :
17703  $as_echo_n "(cached) " >&6
17704else
17705  if test -n "$PKGHANDLER"; then
17706  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17707else
17708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17709for as_dir in $PATH
17710do
17711  IFS=$as_save_IFS
17712  test -z "$as_dir" && as_dir=.
17713    for ac_exec_ext in '' $ac_executable_extensions; do
17714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17715    ac_cv_prog_PKGHANDLER="$ac_prog"
17716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17717    break 2
17718  fi
17719done
17720  done
17721IFS=$as_save_IFS
17722
17723fi
17724fi
17725PKGHANDLER=$ac_cv_prog_PKGHANDLER
17726if test -n "$PKGHANDLER"; then
17727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17728$as_echo "$PKGHANDLER" >&6; }
17729else
17730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17731$as_echo "no" >&6; }
17732fi
17733
17734
17735  test -n "$PKGHANDLER" && break
17736done
17737
17738
17739
17740# Setup tools that requires more complex handling, or that is not needed by the configure script.
17741
17742
17743
17744  # Publish this variable in the help.
17745
17746
17747  if [ -z "${MAKE+x}" ]; then
17748    # The variable is not set by user, try to locate tool using the code snippet
17749
17750    # Try our hardest to locate a correct version of GNU make
17751    for ac_prog in gmake
17752do
17753  # Extract the first word of "$ac_prog", so it can be a program name with args.
17754set dummy $ac_prog; ac_word=$2
17755{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17756$as_echo_n "checking for $ac_word... " >&6; }
17757if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17758  $as_echo_n "(cached) " >&6
17759else
17760  case $CHECK_GMAKE in
17761  [\\/]* | ?:[\\/]*)
17762  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17763  ;;
17764  *)
17765  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17766for as_dir in $PATH
17767do
17768  IFS=$as_save_IFS
17769  test -z "$as_dir" && as_dir=.
17770    for ac_exec_ext in '' $ac_executable_extensions; do
17771  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17772    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17773    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17774    break 2
17775  fi
17776done
17777  done
17778IFS=$as_save_IFS
17779
17780  ;;
17781esac
17782fi
17783CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17784if test -n "$CHECK_GMAKE"; then
17785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17786$as_echo "$CHECK_GMAKE" >&6; }
17787else
17788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17789$as_echo "no" >&6; }
17790fi
17791
17792
17793  test -n "$CHECK_GMAKE" && break
17794done
17795
17796
17797  MAKE_CANDIDATE=""$CHECK_GMAKE""
17798  DESCRIPTION="gmake in PATH"
17799
17800  # On Cygwin, we require a newer version of make than on other platforms
17801  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17802    MAKE_VERSION_EXPR="-e 4\."
17803    MAKE_REQUIRED_VERSION="4.0"
17804   else
17805    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17806    MAKE_REQUIRED_VERSION="3.81"
17807  fi
17808
17809  if test "x$MAKE_CANDIDATE" != x; then
17810    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17811$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17812    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17813    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17814    if test "x$IS_GNU_MAKE" = x; then
17815      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17816$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17817    else
17818      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17819      if test "x$IS_MODERN_MAKE" = x; then
17820        { $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
17821$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;}
17822      else
17823        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17824          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17825            MAKE_EXPECTED_ENV='cygwin'
17826          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17827            MAKE_EXPECTED_ENV='msys'
17828          else
17829            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17830          fi
17831          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17832          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17833        else
17834          # Not relevant for non-Windows
17835          IS_MAKE_CORRECT_ENV=true
17836        fi
17837        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17838          { $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
17839$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;}
17840        else
17841          FOUND_MAKE=$MAKE_CANDIDATE
17842
17843  # Only process if variable expands to non-empty
17844
17845  if test "x$FOUND_MAKE" != x; then
17846    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17847
17848  # First separate the path from the arguments. This will split at the first
17849  # space.
17850  complete="$FOUND_MAKE"
17851  path="${complete%% *}"
17852  tmp="$complete EOL"
17853  arguments="${tmp#* }"
17854
17855  # Input might be given as Windows format, start by converting to
17856  # unix format.
17857  new_path=`$CYGPATH -u "$path"`
17858
17859  # Now try to locate executable using which
17860  new_path=`$WHICH "$new_path" 2> /dev/null`
17861  # bat and cmd files are not always considered executable in cygwin causing which
17862  # to not find them
17863  if test "x$new_path" = x \
17864      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17865      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17866    new_path=`$CYGPATH -u "$path"`
17867  fi
17868  if test "x$new_path" = x; then
17869    # Oops. Which didn't find the executable.
17870    # The splitting of arguments from the executable at a space might have been incorrect,
17871    # since paths with space are more likely in Windows. Give it another try with the whole
17872    # argument.
17873    path="$complete"
17874    arguments="EOL"
17875    new_path=`$CYGPATH -u "$path"`
17876    new_path=`$WHICH "$new_path" 2> /dev/null`
17877    # bat and cmd files are not always considered executable in cygwin causing which
17878    # to not find them
17879    if test "x$new_path" = x \
17880        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17881        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17882      new_path=`$CYGPATH -u "$path"`
17883    fi
17884    if test "x$new_path" = x; then
17885      # It's still not found. Now this is an unrecoverable error.
17886      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17887$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17888      has_space=`$ECHO "$complete" | $GREP " "`
17889      if test "x$has_space" != x; then
17890        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17891$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17892      fi
17893      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17894    fi
17895  fi
17896
17897  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17898  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17899  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17900  # "foo.exe" is OK but "foo" is an error.
17901  #
17902  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17903  # It is also a way to make sure we got the proper file name for the real test later on.
17904  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17905  if test "x$test_shortpath" = x; then
17906    # Short path failed, file does not exist as specified.
17907    # Try adding .exe or .cmd
17908    if test -f "${new_path}.exe"; then
17909      input_to_shortpath="${new_path}.exe"
17910    elif test -f "${new_path}.cmd"; then
17911      input_to_shortpath="${new_path}.cmd"
17912    else
17913      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17914$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17915      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17916$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17917      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17918    fi
17919  else
17920    input_to_shortpath="$new_path"
17921  fi
17922
17923  # Call helper function which possibly converts this using DOS-style short mode.
17924  # If so, the updated path is stored in $new_path.
17925  new_path="$input_to_shortpath"
17926
17927  input_path="$input_to_shortpath"
17928  # Check if we need to convert this using DOS-style short mode. If the path
17929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17930  # take no chances and rewrite it.
17931  # Note: m4 eats our [], so we need to use [ and ] instead.
17932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17933  if test "x$has_forbidden_chars" != x; then
17934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17935    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17936    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17937    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17938      # Going to short mode and back again did indeed matter. Since short mode is
17939      # case insensitive, let's make it lowercase to improve readability.
17940      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17941      # Now convert it back to Unix-style (cygpath)
17942      input_path=`$CYGPATH -u "$shortmode_path"`
17943      new_path="$input_path"
17944    fi
17945  fi
17946
17947  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17948  if test "x$test_cygdrive_prefix" = x; then
17949    # As a simple fix, exclude /usr/bin since it's not a real path.
17950    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17951      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17952      # a path prefixed by /cygdrive for fixpath to work.
17953      new_path="$CYGWIN_ROOT_PATH$input_path"
17954    fi
17955  fi
17956
17957  # remove trailing .exe if any
17958  new_path="${new_path/%.exe/}"
17959
17960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17961
17962  # First separate the path from the arguments. This will split at the first
17963  # space.
17964  complete="$FOUND_MAKE"
17965  path="${complete%% *}"
17966  tmp="$complete EOL"
17967  arguments="${tmp#* }"
17968
17969  # Input might be given as Windows format, start by converting to
17970  # unix format.
17971  new_path="$path"
17972
17973  windows_path="$new_path"
17974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17975    unix_path=`$CYGPATH -u "$windows_path"`
17976    new_path="$unix_path"
17977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17979    new_path="$unix_path"
17980  fi
17981
17982
17983  # Now try to locate executable using which
17984  new_path=`$WHICH "$new_path" 2> /dev/null`
17985
17986  if test "x$new_path" = x; then
17987    # Oops. Which didn't find the executable.
17988    # The splitting of arguments from the executable at a space might have been incorrect,
17989    # since paths with space are more likely in Windows. Give it another try with the whole
17990    # argument.
17991    path="$complete"
17992    arguments="EOL"
17993    new_path="$path"
17994
17995  windows_path="$new_path"
17996  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17997    unix_path=`$CYGPATH -u "$windows_path"`
17998    new_path="$unix_path"
17999  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18000    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18001    new_path="$unix_path"
18002  fi
18003
18004
18005    new_path=`$WHICH "$new_path" 2> /dev/null`
18006    # bat and cmd files are not always considered executable in MSYS causing which
18007    # to not find them
18008    if test "x$new_path" = x \
18009        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18010        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18011      new_path="$path"
18012
18013  windows_path="$new_path"
18014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015    unix_path=`$CYGPATH -u "$windows_path"`
18016    new_path="$unix_path"
18017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18019    new_path="$unix_path"
18020  fi
18021
18022    fi
18023
18024    if test "x$new_path" = x; then
18025      # It's still not found. Now this is an unrecoverable error.
18026      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18027$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18028      has_space=`$ECHO "$complete" | $GREP " "`
18029      if test "x$has_space" != x; then
18030        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18031$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18032      fi
18033      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18034    fi
18035  fi
18036
18037  # Now new_path has a complete unix path to the binary
18038  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18039    # Keep paths in /bin as-is, but remove trailing .exe if any
18040    new_path="${new_path/%.exe/}"
18041    # Do not save /bin paths to all_fixpath_prefixes!
18042  else
18043    # Not in mixed or Windows style, start by that.
18044    new_path=`cmd //c echo $new_path`
18045
18046  input_path="$new_path"
18047  # Check if we need to convert this using DOS-style short mode. If the path
18048  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18049  # take no chances and rewrite it.
18050  # Note: m4 eats our [], so we need to use [ and ] instead.
18051  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18052  if test "x$has_forbidden_chars" != x; then
18053    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18054    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18055  fi
18056
18057    # Output is in $new_path
18058
18059  windows_path="$new_path"
18060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18061    unix_path=`$CYGPATH -u "$windows_path"`
18062    new_path="$unix_path"
18063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18064    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18065    new_path="$unix_path"
18066  fi
18067
18068    # remove trailing .exe if any
18069    new_path="${new_path/%.exe/}"
18070
18071    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18072    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18073  fi
18074
18075    else
18076      # We're on a unix platform. Hooray! :)
18077      # First separate the path from the arguments. This will split at the first
18078      # space.
18079      complete="$FOUND_MAKE"
18080      path="${complete%% *}"
18081      tmp="$complete EOL"
18082      arguments="${tmp#* }"
18083
18084      # Cannot rely on the command "which" here since it doesn't always work.
18085      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18086      if test -z "$is_absolute_path"; then
18087        # Path to executable is not absolute. Find it.
18088        IFS_save="$IFS"
18089        IFS=:
18090        for p in $PATH; do
18091          if test -f "$p/$path" && test -x "$p/$path"; then
18092            new_path="$p/$path"
18093            break
18094          fi
18095        done
18096        IFS="$IFS_save"
18097      else
18098        # This is an absolute path, we can use it without further modifications.
18099        new_path="$path"
18100      fi
18101
18102      if test "x$new_path" = x; then
18103        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18105        has_space=`$ECHO "$complete" | $GREP " "`
18106        if test "x$has_space" != x; then
18107          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18108$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18109        fi
18110        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18111      fi
18112    fi
18113
18114    # Now join together the path and the arguments once again
18115    if test "x$arguments" != xEOL; then
18116      new_complete="$new_path ${arguments% *}"
18117    else
18118      new_complete="$new_path"
18119    fi
18120
18121    if test "x$complete" != "x$new_complete"; then
18122      FOUND_MAKE="$new_complete"
18123      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18124$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18125    fi
18126  fi
18127
18128        fi
18129      fi
18130    fi
18131  fi
18132
18133
18134    if test "x$FOUND_MAKE" = x; then
18135      for ac_prog in make
18136do
18137  # Extract the first word of "$ac_prog", so it can be a program name with args.
18138set dummy $ac_prog; ac_word=$2
18139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18140$as_echo_n "checking for $ac_word... " >&6; }
18141if ${ac_cv_path_CHECK_MAKE+:} false; then :
18142  $as_echo_n "(cached) " >&6
18143else
18144  case $CHECK_MAKE in
18145  [\\/]* | ?:[\\/]*)
18146  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
18147  ;;
18148  *)
18149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18150for as_dir in $PATH
18151do
18152  IFS=$as_save_IFS
18153  test -z "$as_dir" && as_dir=.
18154    for ac_exec_ext in '' $ac_executable_extensions; do
18155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18156    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
18157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18158    break 2
18159  fi
18160done
18161  done
18162IFS=$as_save_IFS
18163
18164  ;;
18165esac
18166fi
18167CHECK_MAKE=$ac_cv_path_CHECK_MAKE
18168if test -n "$CHECK_MAKE"; then
18169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
18170$as_echo "$CHECK_MAKE" >&6; }
18171else
18172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18173$as_echo "no" >&6; }
18174fi
18175
18176
18177  test -n "$CHECK_MAKE" && break
18178done
18179
18180
18181  MAKE_CANDIDATE=""$CHECK_MAKE""
18182  DESCRIPTION="make in PATH"
18183
18184  # On Cygwin, we require a newer version of make than on other platforms
18185  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18186    MAKE_VERSION_EXPR="-e 4\."
18187    MAKE_REQUIRED_VERSION="4.0"
18188   else
18189    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18190    MAKE_REQUIRED_VERSION="3.81"
18191  fi
18192
18193  if test "x$MAKE_CANDIDATE" != x; then
18194    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18195$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18196    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18197    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18198    if test "x$IS_GNU_MAKE" = x; then
18199      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18200$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18201    else
18202      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18203      if test "x$IS_MODERN_MAKE" = x; then
18204        { $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
18205$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;}
18206      else
18207        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18208          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18209            MAKE_EXPECTED_ENV='cygwin'
18210          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18211            MAKE_EXPECTED_ENV='msys'
18212          else
18213            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18214          fi
18215          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18216          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18217        else
18218          # Not relevant for non-Windows
18219          IS_MAKE_CORRECT_ENV=true
18220        fi
18221        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18222          { $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
18223$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;}
18224        else
18225          FOUND_MAKE=$MAKE_CANDIDATE
18226
18227  # Only process if variable expands to non-empty
18228
18229  if test "x$FOUND_MAKE" != x; then
18230    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18231
18232  # First separate the path from the arguments. This will split at the first
18233  # space.
18234  complete="$FOUND_MAKE"
18235  path="${complete%% *}"
18236  tmp="$complete EOL"
18237  arguments="${tmp#* }"
18238
18239  # Input might be given as Windows format, start by converting to
18240  # unix format.
18241  new_path=`$CYGPATH -u "$path"`
18242
18243  # Now try to locate executable using which
18244  new_path=`$WHICH "$new_path" 2> /dev/null`
18245  # bat and cmd files are not always considered executable in cygwin causing which
18246  # to not find them
18247  if test "x$new_path" = x \
18248      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18249      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18250    new_path=`$CYGPATH -u "$path"`
18251  fi
18252  if test "x$new_path" = x; then
18253    # Oops. Which didn't find the executable.
18254    # The splitting of arguments from the executable at a space might have been incorrect,
18255    # since paths with space are more likely in Windows. Give it another try with the whole
18256    # argument.
18257    path="$complete"
18258    arguments="EOL"
18259    new_path=`$CYGPATH -u "$path"`
18260    new_path=`$WHICH "$new_path" 2> /dev/null`
18261    # bat and cmd files are not always considered executable in cygwin causing which
18262    # to not find them
18263    if test "x$new_path" = x \
18264        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18265        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18266      new_path=`$CYGPATH -u "$path"`
18267    fi
18268    if test "x$new_path" = x; then
18269      # It's still not found. Now this is an unrecoverable error.
18270      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18271$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18272      has_space=`$ECHO "$complete" | $GREP " "`
18273      if test "x$has_space" != x; then
18274        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18275$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18276      fi
18277      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18278    fi
18279  fi
18280
18281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18284  # "foo.exe" is OK but "foo" is an error.
18285  #
18286  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18287  # It is also a way to make sure we got the proper file name for the real test later on.
18288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18289  if test "x$test_shortpath" = x; then
18290    # Short path failed, file does not exist as specified.
18291    # Try adding .exe or .cmd
18292    if test -f "${new_path}.exe"; then
18293      input_to_shortpath="${new_path}.exe"
18294    elif test -f "${new_path}.cmd"; then
18295      input_to_shortpath="${new_path}.cmd"
18296    else
18297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18298$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18299      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18300$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18301      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18302    fi
18303  else
18304    input_to_shortpath="$new_path"
18305  fi
18306
18307  # Call helper function which possibly converts this using DOS-style short mode.
18308  # If so, the updated path is stored in $new_path.
18309  new_path="$input_to_shortpath"
18310
18311  input_path="$input_to_shortpath"
18312  # Check if we need to convert this using DOS-style short mode. If the path
18313  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18314  # take no chances and rewrite it.
18315  # Note: m4 eats our [], so we need to use [ and ] instead.
18316  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18317  if test "x$has_forbidden_chars" != x; then
18318    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18319    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18320    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18321    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18322      # Going to short mode and back again did indeed matter. Since short mode is
18323      # case insensitive, let's make it lowercase to improve readability.
18324      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18325      # Now convert it back to Unix-style (cygpath)
18326      input_path=`$CYGPATH -u "$shortmode_path"`
18327      new_path="$input_path"
18328    fi
18329  fi
18330
18331  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18332  if test "x$test_cygdrive_prefix" = x; then
18333    # As a simple fix, exclude /usr/bin since it's not a real path.
18334    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18335      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18336      # a path prefixed by /cygdrive for fixpath to work.
18337      new_path="$CYGWIN_ROOT_PATH$input_path"
18338    fi
18339  fi
18340
18341  # remove trailing .exe if any
18342  new_path="${new_path/%.exe/}"
18343
18344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18345
18346  # First separate the path from the arguments. This will split at the first
18347  # space.
18348  complete="$FOUND_MAKE"
18349  path="${complete%% *}"
18350  tmp="$complete EOL"
18351  arguments="${tmp#* }"
18352
18353  # Input might be given as Windows format, start by converting to
18354  # unix format.
18355  new_path="$path"
18356
18357  windows_path="$new_path"
18358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18359    unix_path=`$CYGPATH -u "$windows_path"`
18360    new_path="$unix_path"
18361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18363    new_path="$unix_path"
18364  fi
18365
18366
18367  # Now try to locate executable using which
18368  new_path=`$WHICH "$new_path" 2> /dev/null`
18369
18370  if test "x$new_path" = x; then
18371    # Oops. Which didn't find the executable.
18372    # The splitting of arguments from the executable at a space might have been incorrect,
18373    # since paths with space are more likely in Windows. Give it another try with the whole
18374    # argument.
18375    path="$complete"
18376    arguments="EOL"
18377    new_path="$path"
18378
18379  windows_path="$new_path"
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    unix_path=`$CYGPATH -u "$windows_path"`
18382    new_path="$unix_path"
18383  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18384    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18385    new_path="$unix_path"
18386  fi
18387
18388
18389    new_path=`$WHICH "$new_path" 2> /dev/null`
18390    # bat and cmd files are not always considered executable in MSYS causing which
18391    # to not find them
18392    if test "x$new_path" = x \
18393        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18394        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18395      new_path="$path"
18396
18397  windows_path="$new_path"
18398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18399    unix_path=`$CYGPATH -u "$windows_path"`
18400    new_path="$unix_path"
18401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18403    new_path="$unix_path"
18404  fi
18405
18406    fi
18407
18408    if test "x$new_path" = x; then
18409      # It's still not found. Now this is an unrecoverable error.
18410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18412      has_space=`$ECHO "$complete" | $GREP " "`
18413      if test "x$has_space" != x; then
18414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18416      fi
18417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18418    fi
18419  fi
18420
18421  # Now new_path has a complete unix path to the binary
18422  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18423    # Keep paths in /bin as-is, but remove trailing .exe if any
18424    new_path="${new_path/%.exe/}"
18425    # Do not save /bin paths to all_fixpath_prefixes!
18426  else
18427    # Not in mixed or Windows style, start by that.
18428    new_path=`cmd //c echo $new_path`
18429
18430  input_path="$new_path"
18431  # Check if we need to convert this using DOS-style short mode. If the path
18432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18433  # take no chances and rewrite it.
18434  # Note: m4 eats our [], so we need to use [ and ] instead.
18435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18436  if test "x$has_forbidden_chars" != x; then
18437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18439  fi
18440
18441    # Output is in $new_path
18442
18443  windows_path="$new_path"
18444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18445    unix_path=`$CYGPATH -u "$windows_path"`
18446    new_path="$unix_path"
18447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18449    new_path="$unix_path"
18450  fi
18451
18452    # remove trailing .exe if any
18453    new_path="${new_path/%.exe/}"
18454
18455    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18456    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18457  fi
18458
18459    else
18460      # We're on a unix platform. Hooray! :)
18461      # First separate the path from the arguments. This will split at the first
18462      # space.
18463      complete="$FOUND_MAKE"
18464      path="${complete%% *}"
18465      tmp="$complete EOL"
18466      arguments="${tmp#* }"
18467
18468      # Cannot rely on the command "which" here since it doesn't always work.
18469      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18470      if test -z "$is_absolute_path"; then
18471        # Path to executable is not absolute. Find it.
18472        IFS_save="$IFS"
18473        IFS=:
18474        for p in $PATH; do
18475          if test -f "$p/$path" && test -x "$p/$path"; then
18476            new_path="$p/$path"
18477            break
18478          fi
18479        done
18480        IFS="$IFS_save"
18481      else
18482        # This is an absolute path, we can use it without further modifications.
18483        new_path="$path"
18484      fi
18485
18486      if test "x$new_path" = x; then
18487        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18488$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18489        has_space=`$ECHO "$complete" | $GREP " "`
18490        if test "x$has_space" != x; then
18491          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18492$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18493        fi
18494        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18495      fi
18496    fi
18497
18498    # Now join together the path and the arguments once again
18499    if test "x$arguments" != xEOL; then
18500      new_complete="$new_path ${arguments% *}"
18501    else
18502      new_complete="$new_path"
18503    fi
18504
18505    if test "x$complete" != "x$new_complete"; then
18506      FOUND_MAKE="$new_complete"
18507      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18508$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18509    fi
18510  fi
18511
18512        fi
18513      fi
18514    fi
18515  fi
18516
18517    fi
18518
18519    if test "x$FOUND_MAKE" = x; then
18520      if test "x$TOOLCHAIN_PATH" != x; then
18521        # We have a toolchain path, check that as well before giving up.
18522        OLD_PATH=$PATH
18523        PATH=$TOOLCHAIN_PATH:$PATH
18524        for ac_prog in gmake
18525do
18526  # Extract the first word of "$ac_prog", so it can be a program name with args.
18527set dummy $ac_prog; ac_word=$2
18528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18529$as_echo_n "checking for $ac_word... " >&6; }
18530if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18531  $as_echo_n "(cached) " >&6
18532else
18533  case $CHECK_TOOLSDIR_GMAKE in
18534  [\\/]* | ?:[\\/]*)
18535  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18536  ;;
18537  *)
18538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18539for as_dir in $PATH
18540do
18541  IFS=$as_save_IFS
18542  test -z "$as_dir" && as_dir=.
18543    for ac_exec_ext in '' $ac_executable_extensions; do
18544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18545    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18547    break 2
18548  fi
18549done
18550  done
18551IFS=$as_save_IFS
18552
18553  ;;
18554esac
18555fi
18556CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18557if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18559$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18560else
18561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18562$as_echo "no" >&6; }
18563fi
18564
18565
18566  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18567done
18568
18569
18570  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18571  DESCRIPTION="gmake in tools-dir"
18572
18573  # On Cygwin, we require a newer version of make than on other platforms
18574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18575    MAKE_VERSION_EXPR="-e 4\."
18576    MAKE_REQUIRED_VERSION="4.0"
18577   else
18578    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18579    MAKE_REQUIRED_VERSION="3.81"
18580  fi
18581
18582  if test "x$MAKE_CANDIDATE" != x; then
18583    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18584$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18585    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18586    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18587    if test "x$IS_GNU_MAKE" = x; then
18588      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18589$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18590    else
18591      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18592      if test "x$IS_MODERN_MAKE" = x; then
18593        { $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
18594$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;}
18595      else
18596        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18597          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18598            MAKE_EXPECTED_ENV='cygwin'
18599          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18600            MAKE_EXPECTED_ENV='msys'
18601          else
18602            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18603          fi
18604          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18605          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18606        else
18607          # Not relevant for non-Windows
18608          IS_MAKE_CORRECT_ENV=true
18609        fi
18610        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18611          { $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
18612$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;}
18613        else
18614          FOUND_MAKE=$MAKE_CANDIDATE
18615
18616  # Only process if variable expands to non-empty
18617
18618  if test "x$FOUND_MAKE" != x; then
18619    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18620
18621  # First separate the path from the arguments. This will split at the first
18622  # space.
18623  complete="$FOUND_MAKE"
18624  path="${complete%% *}"
18625  tmp="$complete EOL"
18626  arguments="${tmp#* }"
18627
18628  # Input might be given as Windows format, start by converting to
18629  # unix format.
18630  new_path=`$CYGPATH -u "$path"`
18631
18632  # Now try to locate executable using which
18633  new_path=`$WHICH "$new_path" 2> /dev/null`
18634  # bat and cmd files are not always considered executable in cygwin causing which
18635  # to not find them
18636  if test "x$new_path" = x \
18637      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18638      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18639    new_path=`$CYGPATH -u "$path"`
18640  fi
18641  if test "x$new_path" = x; then
18642    # Oops. Which didn't find the executable.
18643    # The splitting of arguments from the executable at a space might have been incorrect,
18644    # since paths with space are more likely in Windows. Give it another try with the whole
18645    # argument.
18646    path="$complete"
18647    arguments="EOL"
18648    new_path=`$CYGPATH -u "$path"`
18649    new_path=`$WHICH "$new_path" 2> /dev/null`
18650    # bat and cmd files are not always considered executable in cygwin causing which
18651    # to not find them
18652    if test "x$new_path" = x \
18653        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18654        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18655      new_path=`$CYGPATH -u "$path"`
18656    fi
18657    if test "x$new_path" = x; then
18658      # It's still not found. Now this is an unrecoverable error.
18659      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18660$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18661      has_space=`$ECHO "$complete" | $GREP " "`
18662      if test "x$has_space" != x; then
18663        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18664$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18665      fi
18666      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18667    fi
18668  fi
18669
18670  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18671  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18672  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18673  # "foo.exe" is OK but "foo" is an error.
18674  #
18675  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18676  # It is also a way to make sure we got the proper file name for the real test later on.
18677  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18678  if test "x$test_shortpath" = x; then
18679    # Short path failed, file does not exist as specified.
18680    # Try adding .exe or .cmd
18681    if test -f "${new_path}.exe"; then
18682      input_to_shortpath="${new_path}.exe"
18683    elif test -f "${new_path}.cmd"; then
18684      input_to_shortpath="${new_path}.cmd"
18685    else
18686      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18687$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18688      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18689$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18690      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18691    fi
18692  else
18693    input_to_shortpath="$new_path"
18694  fi
18695
18696  # Call helper function which possibly converts this using DOS-style short mode.
18697  # If so, the updated path is stored in $new_path.
18698  new_path="$input_to_shortpath"
18699
18700  input_path="$input_to_shortpath"
18701  # Check if we need to convert this using DOS-style short mode. If the path
18702  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18703  # take no chances and rewrite it.
18704  # Note: m4 eats our [], so we need to use [ and ] instead.
18705  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18706  if test "x$has_forbidden_chars" != x; then
18707    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18708    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18709    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18710    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18711      # Going to short mode and back again did indeed matter. Since short mode is
18712      # case insensitive, let's make it lowercase to improve readability.
18713      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18714      # Now convert it back to Unix-style (cygpath)
18715      input_path=`$CYGPATH -u "$shortmode_path"`
18716      new_path="$input_path"
18717    fi
18718  fi
18719
18720  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18721  if test "x$test_cygdrive_prefix" = x; then
18722    # As a simple fix, exclude /usr/bin since it's not a real path.
18723    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18724      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18725      # a path prefixed by /cygdrive for fixpath to work.
18726      new_path="$CYGWIN_ROOT_PATH$input_path"
18727    fi
18728  fi
18729
18730  # remove trailing .exe if any
18731  new_path="${new_path/%.exe/}"
18732
18733    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18734
18735  # First separate the path from the arguments. This will split at the first
18736  # space.
18737  complete="$FOUND_MAKE"
18738  path="${complete%% *}"
18739  tmp="$complete EOL"
18740  arguments="${tmp#* }"
18741
18742  # Input might be given as Windows format, start by converting to
18743  # unix format.
18744  new_path="$path"
18745
18746  windows_path="$new_path"
18747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18748    unix_path=`$CYGPATH -u "$windows_path"`
18749    new_path="$unix_path"
18750  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18751    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18752    new_path="$unix_path"
18753  fi
18754
18755
18756  # Now try to locate executable using which
18757  new_path=`$WHICH "$new_path" 2> /dev/null`
18758
18759  if test "x$new_path" = x; then
18760    # Oops. Which didn't find the executable.
18761    # The splitting of arguments from the executable at a space might have been incorrect,
18762    # since paths with space are more likely in Windows. Give it another try with the whole
18763    # argument.
18764    path="$complete"
18765    arguments="EOL"
18766    new_path="$path"
18767
18768  windows_path="$new_path"
18769  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18770    unix_path=`$CYGPATH -u "$windows_path"`
18771    new_path="$unix_path"
18772  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18773    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18774    new_path="$unix_path"
18775  fi
18776
18777
18778    new_path=`$WHICH "$new_path" 2> /dev/null`
18779    # bat and cmd files are not always considered executable in MSYS causing which
18780    # to not find them
18781    if test "x$new_path" = x \
18782        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18783        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18784      new_path="$path"
18785
18786  windows_path="$new_path"
18787  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18788    unix_path=`$CYGPATH -u "$windows_path"`
18789    new_path="$unix_path"
18790  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18791    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18792    new_path="$unix_path"
18793  fi
18794
18795    fi
18796
18797    if test "x$new_path" = x; then
18798      # It's still not found. Now this is an unrecoverable error.
18799      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18800$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18801      has_space=`$ECHO "$complete" | $GREP " "`
18802      if test "x$has_space" != x; then
18803        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18804$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18805      fi
18806      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18807    fi
18808  fi
18809
18810  # Now new_path has a complete unix path to the binary
18811  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18812    # Keep paths in /bin as-is, but remove trailing .exe if any
18813    new_path="${new_path/%.exe/}"
18814    # Do not save /bin paths to all_fixpath_prefixes!
18815  else
18816    # Not in mixed or Windows style, start by that.
18817    new_path=`cmd //c echo $new_path`
18818
18819  input_path="$new_path"
18820  # Check if we need to convert this using DOS-style short mode. If the path
18821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18822  # take no chances and rewrite it.
18823  # Note: m4 eats our [], so we need to use [ and ] instead.
18824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18825  if test "x$has_forbidden_chars" != x; then
18826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18828  fi
18829
18830    # Output is in $new_path
18831
18832  windows_path="$new_path"
18833  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18834    unix_path=`$CYGPATH -u "$windows_path"`
18835    new_path="$unix_path"
18836  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18837    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18838    new_path="$unix_path"
18839  fi
18840
18841    # remove trailing .exe if any
18842    new_path="${new_path/%.exe/}"
18843
18844    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18845    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18846  fi
18847
18848    else
18849      # We're on a unix platform. Hooray! :)
18850      # First separate the path from the arguments. This will split at the first
18851      # space.
18852      complete="$FOUND_MAKE"
18853      path="${complete%% *}"
18854      tmp="$complete EOL"
18855      arguments="${tmp#* }"
18856
18857      # Cannot rely on the command "which" here since it doesn't always work.
18858      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18859      if test -z "$is_absolute_path"; then
18860        # Path to executable is not absolute. Find it.
18861        IFS_save="$IFS"
18862        IFS=:
18863        for p in $PATH; do
18864          if test -f "$p/$path" && test -x "$p/$path"; then
18865            new_path="$p/$path"
18866            break
18867          fi
18868        done
18869        IFS="$IFS_save"
18870      else
18871        # This is an absolute path, we can use it without further modifications.
18872        new_path="$path"
18873      fi
18874
18875      if test "x$new_path" = x; then
18876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18877$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18878        has_space=`$ECHO "$complete" | $GREP " "`
18879        if test "x$has_space" != x; then
18880          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18881$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18882        fi
18883        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18884      fi
18885    fi
18886
18887    # Now join together the path and the arguments once again
18888    if test "x$arguments" != xEOL; then
18889      new_complete="$new_path ${arguments% *}"
18890    else
18891      new_complete="$new_path"
18892    fi
18893
18894    if test "x$complete" != "x$new_complete"; then
18895      FOUND_MAKE="$new_complete"
18896      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18897$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18898    fi
18899  fi
18900
18901        fi
18902      fi
18903    fi
18904  fi
18905
18906        if test "x$FOUND_MAKE" = x; then
18907          for ac_prog in make
18908do
18909  # Extract the first word of "$ac_prog", so it can be a program name with args.
18910set dummy $ac_prog; ac_word=$2
18911{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18912$as_echo_n "checking for $ac_word... " >&6; }
18913if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18914  $as_echo_n "(cached) " >&6
18915else
18916  case $CHECK_TOOLSDIR_MAKE in
18917  [\\/]* | ?:[\\/]*)
18918  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18919  ;;
18920  *)
18921  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18922for as_dir in $PATH
18923do
18924  IFS=$as_save_IFS
18925  test -z "$as_dir" && as_dir=.
18926    for ac_exec_ext in '' $ac_executable_extensions; do
18927  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18928    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18929    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18930    break 2
18931  fi
18932done
18933  done
18934IFS=$as_save_IFS
18935
18936  ;;
18937esac
18938fi
18939CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18940if test -n "$CHECK_TOOLSDIR_MAKE"; then
18941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18942$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18943else
18944  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18945$as_echo "no" >&6; }
18946fi
18947
18948
18949  test -n "$CHECK_TOOLSDIR_MAKE" && break
18950done
18951
18952
18953  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18954  DESCRIPTION="make in tools-dir"
18955
18956  # On Cygwin, we require a newer version of make than on other platforms
18957  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18958    MAKE_VERSION_EXPR="-e 4\."
18959    MAKE_REQUIRED_VERSION="4.0"
18960   else
18961    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18962    MAKE_REQUIRED_VERSION="3.81"
18963  fi
18964
18965  if test "x$MAKE_CANDIDATE" != x; then
18966    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18967$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18968    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18969    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18970    if test "x$IS_GNU_MAKE" = x; then
18971      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18972$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18973    else
18974      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18975      if test "x$IS_MODERN_MAKE" = x; then
18976        { $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
18977$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;}
18978      else
18979        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18980          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18981            MAKE_EXPECTED_ENV='cygwin'
18982          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18983            MAKE_EXPECTED_ENV='msys'
18984          else
18985            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18986          fi
18987          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18988          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18989        else
18990          # Not relevant for non-Windows
18991          IS_MAKE_CORRECT_ENV=true
18992        fi
18993        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18994          { $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
18995$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;}
18996        else
18997          FOUND_MAKE=$MAKE_CANDIDATE
18998
18999  # Only process if variable expands to non-empty
19000
19001  if test "x$FOUND_MAKE" != x; then
19002    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19003
19004  # First separate the path from the arguments. This will split at the first
19005  # space.
19006  complete="$FOUND_MAKE"
19007  path="${complete%% *}"
19008  tmp="$complete EOL"
19009  arguments="${tmp#* }"
19010
19011  # Input might be given as Windows format, start by converting to
19012  # unix format.
19013  new_path=`$CYGPATH -u "$path"`
19014
19015  # Now try to locate executable using which
19016  new_path=`$WHICH "$new_path" 2> /dev/null`
19017  # bat and cmd files are not always considered executable in cygwin causing which
19018  # to not find them
19019  if test "x$new_path" = x \
19020      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19021      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19022    new_path=`$CYGPATH -u "$path"`
19023  fi
19024  if test "x$new_path" = x; then
19025    # Oops. Which didn't find the executable.
19026    # The splitting of arguments from the executable at a space might have been incorrect,
19027    # since paths with space are more likely in Windows. Give it another try with the whole
19028    # argument.
19029    path="$complete"
19030    arguments="EOL"
19031    new_path=`$CYGPATH -u "$path"`
19032    new_path=`$WHICH "$new_path" 2> /dev/null`
19033    # bat and cmd files are not always considered executable in cygwin causing which
19034    # to not find them
19035    if test "x$new_path" = x \
19036        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19037        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19038      new_path=`$CYGPATH -u "$path"`
19039    fi
19040    if test "x$new_path" = x; then
19041      # It's still not found. Now this is an unrecoverable error.
19042      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19043$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19044      has_space=`$ECHO "$complete" | $GREP " "`
19045      if test "x$has_space" != x; then
19046        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19047$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19048      fi
19049      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19050    fi
19051  fi
19052
19053  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19054  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19055  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19056  # "foo.exe" is OK but "foo" is an error.
19057  #
19058  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19059  # It is also a way to make sure we got the proper file name for the real test later on.
19060  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19061  if test "x$test_shortpath" = x; then
19062    # Short path failed, file does not exist as specified.
19063    # Try adding .exe or .cmd
19064    if test -f "${new_path}.exe"; then
19065      input_to_shortpath="${new_path}.exe"
19066    elif test -f "${new_path}.cmd"; then
19067      input_to_shortpath="${new_path}.cmd"
19068    else
19069      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19070$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19071      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19072$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19073      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19074    fi
19075  else
19076    input_to_shortpath="$new_path"
19077  fi
19078
19079  # Call helper function which possibly converts this using DOS-style short mode.
19080  # If so, the updated path is stored in $new_path.
19081  new_path="$input_to_shortpath"
19082
19083  input_path="$input_to_shortpath"
19084  # Check if we need to convert this using DOS-style short mode. If the path
19085  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19086  # take no chances and rewrite it.
19087  # Note: m4 eats our [], so we need to use [ and ] instead.
19088  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19089  if test "x$has_forbidden_chars" != x; then
19090    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19091    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19092    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19093    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19094      # Going to short mode and back again did indeed matter. Since short mode is
19095      # case insensitive, let's make it lowercase to improve readability.
19096      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19097      # Now convert it back to Unix-style (cygpath)
19098      input_path=`$CYGPATH -u "$shortmode_path"`
19099      new_path="$input_path"
19100    fi
19101  fi
19102
19103  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19104  if test "x$test_cygdrive_prefix" = x; then
19105    # As a simple fix, exclude /usr/bin since it's not a real path.
19106    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19107      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19108      # a path prefixed by /cygdrive for fixpath to work.
19109      new_path="$CYGWIN_ROOT_PATH$input_path"
19110    fi
19111  fi
19112
19113  # remove trailing .exe if any
19114  new_path="${new_path/%.exe/}"
19115
19116    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19117
19118  # First separate the path from the arguments. This will split at the first
19119  # space.
19120  complete="$FOUND_MAKE"
19121  path="${complete%% *}"
19122  tmp="$complete EOL"
19123  arguments="${tmp#* }"
19124
19125  # Input might be given as Windows format, start by converting to
19126  # unix format.
19127  new_path="$path"
19128
19129  windows_path="$new_path"
19130  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19131    unix_path=`$CYGPATH -u "$windows_path"`
19132    new_path="$unix_path"
19133  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19134    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19135    new_path="$unix_path"
19136  fi
19137
19138
19139  # Now try to locate executable using which
19140  new_path=`$WHICH "$new_path" 2> /dev/null`
19141
19142  if test "x$new_path" = x; then
19143    # Oops. Which didn't find the executable.
19144    # The splitting of arguments from the executable at a space might have been incorrect,
19145    # since paths with space are more likely in Windows. Give it another try with the whole
19146    # argument.
19147    path="$complete"
19148    arguments="EOL"
19149    new_path="$path"
19150
19151  windows_path="$new_path"
19152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19153    unix_path=`$CYGPATH -u "$windows_path"`
19154    new_path="$unix_path"
19155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19157    new_path="$unix_path"
19158  fi
19159
19160
19161    new_path=`$WHICH "$new_path" 2> /dev/null`
19162    # bat and cmd files are not always considered executable in MSYS causing which
19163    # to not find them
19164    if test "x$new_path" = x \
19165        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19166        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19167      new_path="$path"
19168
19169  windows_path="$new_path"
19170  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19171    unix_path=`$CYGPATH -u "$windows_path"`
19172    new_path="$unix_path"
19173  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19174    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19175    new_path="$unix_path"
19176  fi
19177
19178    fi
19179
19180    if test "x$new_path" = x; then
19181      # It's still not found. Now this is an unrecoverable error.
19182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19183$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19184      has_space=`$ECHO "$complete" | $GREP " "`
19185      if test "x$has_space" != x; then
19186        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19187$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19188      fi
19189      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19190    fi
19191  fi
19192
19193  # Now new_path has a complete unix path to the binary
19194  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19195    # Keep paths in /bin as-is, but remove trailing .exe if any
19196    new_path="${new_path/%.exe/}"
19197    # Do not save /bin paths to all_fixpath_prefixes!
19198  else
19199    # Not in mixed or Windows style, start by that.
19200    new_path=`cmd //c echo $new_path`
19201
19202  input_path="$new_path"
19203  # Check if we need to convert this using DOS-style short mode. If the path
19204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19205  # take no chances and rewrite it.
19206  # Note: m4 eats our [], so we need to use [ and ] instead.
19207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19208  if test "x$has_forbidden_chars" != x; then
19209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19210    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19211  fi
19212
19213    # Output is in $new_path
19214
19215  windows_path="$new_path"
19216  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19217    unix_path=`$CYGPATH -u "$windows_path"`
19218    new_path="$unix_path"
19219  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19220    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19221    new_path="$unix_path"
19222  fi
19223
19224    # remove trailing .exe if any
19225    new_path="${new_path/%.exe/}"
19226
19227    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19228    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19229  fi
19230
19231    else
19232      # We're on a unix platform. Hooray! :)
19233      # First separate the path from the arguments. This will split at the first
19234      # space.
19235      complete="$FOUND_MAKE"
19236      path="${complete%% *}"
19237      tmp="$complete EOL"
19238      arguments="${tmp#* }"
19239
19240      # Cannot rely on the command "which" here since it doesn't always work.
19241      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19242      if test -z "$is_absolute_path"; then
19243        # Path to executable is not absolute. Find it.
19244        IFS_save="$IFS"
19245        IFS=:
19246        for p in $PATH; do
19247          if test -f "$p/$path" && test -x "$p/$path"; then
19248            new_path="$p/$path"
19249            break
19250          fi
19251        done
19252        IFS="$IFS_save"
19253      else
19254        # This is an absolute path, we can use it without further modifications.
19255        new_path="$path"
19256      fi
19257
19258      if test "x$new_path" = x; then
19259        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19260$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19261        has_space=`$ECHO "$complete" | $GREP " "`
19262        if test "x$has_space" != x; then
19263          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19264$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19265        fi
19266        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19267      fi
19268    fi
19269
19270    # Now join together the path and the arguments once again
19271    if test "x$arguments" != xEOL; then
19272      new_complete="$new_path ${arguments% *}"
19273    else
19274      new_complete="$new_path"
19275    fi
19276
19277    if test "x$complete" != "x$new_complete"; then
19278      FOUND_MAKE="$new_complete"
19279      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19280$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19281    fi
19282  fi
19283
19284        fi
19285      fi
19286    fi
19287  fi
19288
19289        fi
19290        PATH=$OLD_PATH
19291      fi
19292    fi
19293
19294    if test "x$FOUND_MAKE" = x; then
19295      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
19296    fi
19297
19298  else
19299    # The variable is set, but is it from the command line or the environment?
19300
19301    # Try to remove the string !MAKE! from our list.
19302    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19303    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19304      # If it failed, the variable was not from the command line. Ignore it,
19305      # but warn the user (except for BASH, which is always set by the calling BASH).
19306      if test "xMAKE" != xBASH; then
19307        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19308$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19309      fi
19310      # Try to locate tool using the code snippet
19311
19312    # Try our hardest to locate a correct version of GNU make
19313    for ac_prog in gmake
19314do
19315  # Extract the first word of "$ac_prog", so it can be a program name with args.
19316set dummy $ac_prog; ac_word=$2
19317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19318$as_echo_n "checking for $ac_word... " >&6; }
19319if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19320  $as_echo_n "(cached) " >&6
19321else
19322  case $CHECK_GMAKE in
19323  [\\/]* | ?:[\\/]*)
19324  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19325  ;;
19326  *)
19327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19328for as_dir in $PATH
19329do
19330  IFS=$as_save_IFS
19331  test -z "$as_dir" && as_dir=.
19332    for ac_exec_ext in '' $ac_executable_extensions; do
19333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19334    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19336    break 2
19337  fi
19338done
19339  done
19340IFS=$as_save_IFS
19341
19342  ;;
19343esac
19344fi
19345CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19346if test -n "$CHECK_GMAKE"; then
19347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19348$as_echo "$CHECK_GMAKE" >&6; }
19349else
19350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19351$as_echo "no" >&6; }
19352fi
19353
19354
19355  test -n "$CHECK_GMAKE" && break
19356done
19357
19358
19359  MAKE_CANDIDATE=""$CHECK_GMAKE""
19360  DESCRIPTION="gmake in PATH"
19361
19362  # On Cygwin, we require a newer version of make than on other platforms
19363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19364    MAKE_VERSION_EXPR="-e 4\."
19365    MAKE_REQUIRED_VERSION="4.0"
19366   else
19367    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19368    MAKE_REQUIRED_VERSION="3.81"
19369  fi
19370
19371  if test "x$MAKE_CANDIDATE" != x; then
19372    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19373$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19374    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19375    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19376    if test "x$IS_GNU_MAKE" = x; then
19377      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19378$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19379    else
19380      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19381      if test "x$IS_MODERN_MAKE" = x; then
19382        { $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
19383$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;}
19384      else
19385        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19386          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19387            MAKE_EXPECTED_ENV='cygwin'
19388          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19389            MAKE_EXPECTED_ENV='msys'
19390          else
19391            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19392          fi
19393          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19394          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19395        else
19396          # Not relevant for non-Windows
19397          IS_MAKE_CORRECT_ENV=true
19398        fi
19399        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19400          { $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
19401$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;}
19402        else
19403          FOUND_MAKE=$MAKE_CANDIDATE
19404
19405  # Only process if variable expands to non-empty
19406
19407  if test "x$FOUND_MAKE" != x; then
19408    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19409
19410  # First separate the path from the arguments. This will split at the first
19411  # space.
19412  complete="$FOUND_MAKE"
19413  path="${complete%% *}"
19414  tmp="$complete EOL"
19415  arguments="${tmp#* }"
19416
19417  # Input might be given as Windows format, start by converting to
19418  # unix format.
19419  new_path=`$CYGPATH -u "$path"`
19420
19421  # Now try to locate executable using which
19422  new_path=`$WHICH "$new_path" 2> /dev/null`
19423  # bat and cmd files are not always considered executable in cygwin causing which
19424  # to not find them
19425  if test "x$new_path" = x \
19426      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19427      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19428    new_path=`$CYGPATH -u "$path"`
19429  fi
19430  if test "x$new_path" = x; then
19431    # Oops. Which didn't find the executable.
19432    # The splitting of arguments from the executable at a space might have been incorrect,
19433    # since paths with space are more likely in Windows. Give it another try with the whole
19434    # argument.
19435    path="$complete"
19436    arguments="EOL"
19437    new_path=`$CYGPATH -u "$path"`
19438    new_path=`$WHICH "$new_path" 2> /dev/null`
19439    # bat and cmd files are not always considered executable in cygwin causing which
19440    # to not find them
19441    if test "x$new_path" = x \
19442        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19443        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19444      new_path=`$CYGPATH -u "$path"`
19445    fi
19446    if test "x$new_path" = x; then
19447      # It's still not found. Now this is an unrecoverable error.
19448      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19449$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19450      has_space=`$ECHO "$complete" | $GREP " "`
19451      if test "x$has_space" != x; then
19452        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19453$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19454      fi
19455      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19456    fi
19457  fi
19458
19459  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19460  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19461  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19462  # "foo.exe" is OK but "foo" is an error.
19463  #
19464  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19465  # It is also a way to make sure we got the proper file name for the real test later on.
19466  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19467  if test "x$test_shortpath" = x; then
19468    # Short path failed, file does not exist as specified.
19469    # Try adding .exe or .cmd
19470    if test -f "${new_path}.exe"; then
19471      input_to_shortpath="${new_path}.exe"
19472    elif test -f "${new_path}.cmd"; then
19473      input_to_shortpath="${new_path}.cmd"
19474    else
19475      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19476$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19477      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19478$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19479      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19480    fi
19481  else
19482    input_to_shortpath="$new_path"
19483  fi
19484
19485  # Call helper function which possibly converts this using DOS-style short mode.
19486  # If so, the updated path is stored in $new_path.
19487  new_path="$input_to_shortpath"
19488
19489  input_path="$input_to_shortpath"
19490  # Check if we need to convert this using DOS-style short mode. If the path
19491  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19492  # take no chances and rewrite it.
19493  # Note: m4 eats our [], so we need to use [ and ] instead.
19494  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19495  if test "x$has_forbidden_chars" != x; then
19496    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19497    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19498    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19499    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19500      # Going to short mode and back again did indeed matter. Since short mode is
19501      # case insensitive, let's make it lowercase to improve readability.
19502      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19503      # Now convert it back to Unix-style (cygpath)
19504      input_path=`$CYGPATH -u "$shortmode_path"`
19505      new_path="$input_path"
19506    fi
19507  fi
19508
19509  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19510  if test "x$test_cygdrive_prefix" = x; then
19511    # As a simple fix, exclude /usr/bin since it's not a real path.
19512    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19513      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19514      # a path prefixed by /cygdrive for fixpath to work.
19515      new_path="$CYGWIN_ROOT_PATH$input_path"
19516    fi
19517  fi
19518
19519  # remove trailing .exe if any
19520  new_path="${new_path/%.exe/}"
19521
19522    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19523
19524  # First separate the path from the arguments. This will split at the first
19525  # space.
19526  complete="$FOUND_MAKE"
19527  path="${complete%% *}"
19528  tmp="$complete EOL"
19529  arguments="${tmp#* }"
19530
19531  # Input might be given as Windows format, start by converting to
19532  # unix format.
19533  new_path="$path"
19534
19535  windows_path="$new_path"
19536  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19537    unix_path=`$CYGPATH -u "$windows_path"`
19538    new_path="$unix_path"
19539  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19540    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19541    new_path="$unix_path"
19542  fi
19543
19544
19545  # Now try to locate executable using which
19546  new_path=`$WHICH "$new_path" 2> /dev/null`
19547
19548  if test "x$new_path" = x; then
19549    # Oops. Which didn't find the executable.
19550    # The splitting of arguments from the executable at a space might have been incorrect,
19551    # since paths with space are more likely in Windows. Give it another try with the whole
19552    # argument.
19553    path="$complete"
19554    arguments="EOL"
19555    new_path="$path"
19556
19557  windows_path="$new_path"
19558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19559    unix_path=`$CYGPATH -u "$windows_path"`
19560    new_path="$unix_path"
19561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19562    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19563    new_path="$unix_path"
19564  fi
19565
19566
19567    new_path=`$WHICH "$new_path" 2> /dev/null`
19568    # bat and cmd files are not always considered executable in MSYS causing which
19569    # to not find them
19570    if test "x$new_path" = x \
19571        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19572        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19573      new_path="$path"
19574
19575  windows_path="$new_path"
19576  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577    unix_path=`$CYGPATH -u "$windows_path"`
19578    new_path="$unix_path"
19579  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19580    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19581    new_path="$unix_path"
19582  fi
19583
19584    fi
19585
19586    if test "x$new_path" = x; then
19587      # It's still not found. Now this is an unrecoverable error.
19588      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19589$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19590      has_space=`$ECHO "$complete" | $GREP " "`
19591      if test "x$has_space" != x; then
19592        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19593$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19594      fi
19595      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19596    fi
19597  fi
19598
19599  # Now new_path has a complete unix path to the binary
19600  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19601    # Keep paths in /bin as-is, but remove trailing .exe if any
19602    new_path="${new_path/%.exe/}"
19603    # Do not save /bin paths to all_fixpath_prefixes!
19604  else
19605    # Not in mixed or Windows style, start by that.
19606    new_path=`cmd //c echo $new_path`
19607
19608  input_path="$new_path"
19609  # Check if we need to convert this using DOS-style short mode. If the path
19610  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19611  # take no chances and rewrite it.
19612  # Note: m4 eats our [], so we need to use [ and ] instead.
19613  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19614  if test "x$has_forbidden_chars" != x; then
19615    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19616    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19617  fi
19618
19619    # Output is in $new_path
19620
19621  windows_path="$new_path"
19622  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19623    unix_path=`$CYGPATH -u "$windows_path"`
19624    new_path="$unix_path"
19625  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19626    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19627    new_path="$unix_path"
19628  fi
19629
19630    # remove trailing .exe if any
19631    new_path="${new_path/%.exe/}"
19632
19633    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19634    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19635  fi
19636
19637    else
19638      # We're on a unix platform. Hooray! :)
19639      # First separate the path from the arguments. This will split at the first
19640      # space.
19641      complete="$FOUND_MAKE"
19642      path="${complete%% *}"
19643      tmp="$complete EOL"
19644      arguments="${tmp#* }"
19645
19646      # Cannot rely on the command "which" here since it doesn't always work.
19647      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19648      if test -z "$is_absolute_path"; then
19649        # Path to executable is not absolute. Find it.
19650        IFS_save="$IFS"
19651        IFS=:
19652        for p in $PATH; do
19653          if test -f "$p/$path" && test -x "$p/$path"; then
19654            new_path="$p/$path"
19655            break
19656          fi
19657        done
19658        IFS="$IFS_save"
19659      else
19660        # This is an absolute path, we can use it without further modifications.
19661        new_path="$path"
19662      fi
19663
19664      if test "x$new_path" = x; then
19665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19667        has_space=`$ECHO "$complete" | $GREP " "`
19668        if test "x$has_space" != x; then
19669          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19670$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19671        fi
19672        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19673      fi
19674    fi
19675
19676    # Now join together the path and the arguments once again
19677    if test "x$arguments" != xEOL; then
19678      new_complete="$new_path ${arguments% *}"
19679    else
19680      new_complete="$new_path"
19681    fi
19682
19683    if test "x$complete" != "x$new_complete"; then
19684      FOUND_MAKE="$new_complete"
19685      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19686$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19687    fi
19688  fi
19689
19690        fi
19691      fi
19692    fi
19693  fi
19694
19695
19696    if test "x$FOUND_MAKE" = x; then
19697      for ac_prog in make
19698do
19699  # Extract the first word of "$ac_prog", so it can be a program name with args.
19700set dummy $ac_prog; ac_word=$2
19701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19702$as_echo_n "checking for $ac_word... " >&6; }
19703if ${ac_cv_path_CHECK_MAKE+:} false; then :
19704  $as_echo_n "(cached) " >&6
19705else
19706  case $CHECK_MAKE in
19707  [\\/]* | ?:[\\/]*)
19708  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19709  ;;
19710  *)
19711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19712for as_dir in $PATH
19713do
19714  IFS=$as_save_IFS
19715  test -z "$as_dir" && as_dir=.
19716    for ac_exec_ext in '' $ac_executable_extensions; do
19717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19718    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19720    break 2
19721  fi
19722done
19723  done
19724IFS=$as_save_IFS
19725
19726  ;;
19727esac
19728fi
19729CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19730if test -n "$CHECK_MAKE"; then
19731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19732$as_echo "$CHECK_MAKE" >&6; }
19733else
19734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19735$as_echo "no" >&6; }
19736fi
19737
19738
19739  test -n "$CHECK_MAKE" && break
19740done
19741
19742
19743  MAKE_CANDIDATE=""$CHECK_MAKE""
19744  DESCRIPTION="make in PATH"
19745
19746  # On Cygwin, we require a newer version of make than on other platforms
19747  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19748    MAKE_VERSION_EXPR="-e 4\."
19749    MAKE_REQUIRED_VERSION="4.0"
19750   else
19751    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19752    MAKE_REQUIRED_VERSION="3.81"
19753  fi
19754
19755  if test "x$MAKE_CANDIDATE" != x; then
19756    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19757$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19758    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19759    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19760    if test "x$IS_GNU_MAKE" = x; then
19761      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19762$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19763    else
19764      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19765      if test "x$IS_MODERN_MAKE" = x; then
19766        { $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
19767$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;}
19768      else
19769        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19770          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19771            MAKE_EXPECTED_ENV='cygwin'
19772          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19773            MAKE_EXPECTED_ENV='msys'
19774          else
19775            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19776          fi
19777          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19778          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19779        else
19780          # Not relevant for non-Windows
19781          IS_MAKE_CORRECT_ENV=true
19782        fi
19783        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19784          { $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
19785$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;}
19786        else
19787          FOUND_MAKE=$MAKE_CANDIDATE
19788
19789  # Only process if variable expands to non-empty
19790
19791  if test "x$FOUND_MAKE" != x; then
19792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19793
19794  # First separate the path from the arguments. This will split at the first
19795  # space.
19796  complete="$FOUND_MAKE"
19797  path="${complete%% *}"
19798  tmp="$complete EOL"
19799  arguments="${tmp#* }"
19800
19801  # Input might be given as Windows format, start by converting to
19802  # unix format.
19803  new_path=`$CYGPATH -u "$path"`
19804
19805  # Now try to locate executable using which
19806  new_path=`$WHICH "$new_path" 2> /dev/null`
19807  # bat and cmd files are not always considered executable in cygwin causing which
19808  # to not find them
19809  if test "x$new_path" = x \
19810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19812    new_path=`$CYGPATH -u "$path"`
19813  fi
19814  if test "x$new_path" = x; then
19815    # Oops. Which didn't find the executable.
19816    # The splitting of arguments from the executable at a space might have been incorrect,
19817    # since paths with space are more likely in Windows. Give it another try with the whole
19818    # argument.
19819    path="$complete"
19820    arguments="EOL"
19821    new_path=`$CYGPATH -u "$path"`
19822    new_path=`$WHICH "$new_path" 2> /dev/null`
19823    # bat and cmd files are not always considered executable in cygwin causing which
19824    # to not find them
19825    if test "x$new_path" = x \
19826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19828      new_path=`$CYGPATH -u "$path"`
19829    fi
19830    if test "x$new_path" = x; then
19831      # It's still not found. Now this is an unrecoverable error.
19832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19834      has_space=`$ECHO "$complete" | $GREP " "`
19835      if test "x$has_space" != x; then
19836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19838      fi
19839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19840    fi
19841  fi
19842
19843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19846  # "foo.exe" is OK but "foo" is an error.
19847  #
19848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19849  # It is also a way to make sure we got the proper file name for the real test later on.
19850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19851  if test "x$test_shortpath" = x; then
19852    # Short path failed, file does not exist as specified.
19853    # Try adding .exe or .cmd
19854    if test -f "${new_path}.exe"; then
19855      input_to_shortpath="${new_path}.exe"
19856    elif test -f "${new_path}.cmd"; then
19857      input_to_shortpath="${new_path}.cmd"
19858    else
19859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19860$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19863      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19864    fi
19865  else
19866    input_to_shortpath="$new_path"
19867  fi
19868
19869  # Call helper function which possibly converts this using DOS-style short mode.
19870  # If so, the updated path is stored in $new_path.
19871  new_path="$input_to_shortpath"
19872
19873  input_path="$input_to_shortpath"
19874  # Check if we need to convert this using DOS-style short mode. If the path
19875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19876  # take no chances and rewrite it.
19877  # Note: m4 eats our [], so we need to use [ and ] instead.
19878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19879  if test "x$has_forbidden_chars" != x; then
19880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19884      # Going to short mode and back again did indeed matter. Since short mode is
19885      # case insensitive, let's make it lowercase to improve readability.
19886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19887      # Now convert it back to Unix-style (cygpath)
19888      input_path=`$CYGPATH -u "$shortmode_path"`
19889      new_path="$input_path"
19890    fi
19891  fi
19892
19893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19894  if test "x$test_cygdrive_prefix" = x; then
19895    # As a simple fix, exclude /usr/bin since it's not a real path.
19896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19898      # a path prefixed by /cygdrive for fixpath to work.
19899      new_path="$CYGWIN_ROOT_PATH$input_path"
19900    fi
19901  fi
19902
19903  # remove trailing .exe if any
19904  new_path="${new_path/%.exe/}"
19905
19906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19907
19908  # First separate the path from the arguments. This will split at the first
19909  # space.
19910  complete="$FOUND_MAKE"
19911  path="${complete%% *}"
19912  tmp="$complete EOL"
19913  arguments="${tmp#* }"
19914
19915  # Input might be given as Windows format, start by converting to
19916  # unix format.
19917  new_path="$path"
19918
19919  windows_path="$new_path"
19920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19921    unix_path=`$CYGPATH -u "$windows_path"`
19922    new_path="$unix_path"
19923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19925    new_path="$unix_path"
19926  fi
19927
19928
19929  # Now try to locate executable using which
19930  new_path=`$WHICH "$new_path" 2> /dev/null`
19931
19932  if test "x$new_path" = x; then
19933    # Oops. Which didn't find the executable.
19934    # The splitting of arguments from the executable at a space might have been incorrect,
19935    # since paths with space are more likely in Windows. Give it another try with the whole
19936    # argument.
19937    path="$complete"
19938    arguments="EOL"
19939    new_path="$path"
19940
19941  windows_path="$new_path"
19942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943    unix_path=`$CYGPATH -u "$windows_path"`
19944    new_path="$unix_path"
19945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19947    new_path="$unix_path"
19948  fi
19949
19950
19951    new_path=`$WHICH "$new_path" 2> /dev/null`
19952    # bat and cmd files are not always considered executable in MSYS causing which
19953    # to not find them
19954    if test "x$new_path" = x \
19955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19957      new_path="$path"
19958
19959  windows_path="$new_path"
19960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19961    unix_path=`$CYGPATH -u "$windows_path"`
19962    new_path="$unix_path"
19963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19965    new_path="$unix_path"
19966  fi
19967
19968    fi
19969
19970    if test "x$new_path" = x; then
19971      # It's still not found. Now this is an unrecoverable error.
19972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19973$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19974      has_space=`$ECHO "$complete" | $GREP " "`
19975      if test "x$has_space" != x; then
19976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19978      fi
19979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19980    fi
19981  fi
19982
19983  # Now new_path has a complete unix path to the binary
19984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19985    # Keep paths in /bin as-is, but remove trailing .exe if any
19986    new_path="${new_path/%.exe/}"
19987    # Do not save /bin paths to all_fixpath_prefixes!
19988  else
19989    # Not in mixed or Windows style, start by that.
19990    new_path=`cmd //c echo $new_path`
19991
19992  input_path="$new_path"
19993  # Check if we need to convert this using DOS-style short mode. If the path
19994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19995  # take no chances and rewrite it.
19996  # Note: m4 eats our [], so we need to use [ and ] instead.
19997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19998  if test "x$has_forbidden_chars" != x; then
19999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20001  fi
20002
20003    # Output is in $new_path
20004
20005  windows_path="$new_path"
20006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20007    unix_path=`$CYGPATH -u "$windows_path"`
20008    new_path="$unix_path"
20009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20011    new_path="$unix_path"
20012  fi
20013
20014    # remove trailing .exe if any
20015    new_path="${new_path/%.exe/}"
20016
20017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20019  fi
20020
20021    else
20022      # We're on a unix platform. Hooray! :)
20023      # First separate the path from the arguments. This will split at the first
20024      # space.
20025      complete="$FOUND_MAKE"
20026      path="${complete%% *}"
20027      tmp="$complete EOL"
20028      arguments="${tmp#* }"
20029
20030      # Cannot rely on the command "which" here since it doesn't always work.
20031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20032      if test -z "$is_absolute_path"; then
20033        # Path to executable is not absolute. Find it.
20034        IFS_save="$IFS"
20035        IFS=:
20036        for p in $PATH; do
20037          if test -f "$p/$path" && test -x "$p/$path"; then
20038            new_path="$p/$path"
20039            break
20040          fi
20041        done
20042        IFS="$IFS_save"
20043      else
20044        # This is an absolute path, we can use it without further modifications.
20045        new_path="$path"
20046      fi
20047
20048      if test "x$new_path" = x; then
20049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20050$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20051        has_space=`$ECHO "$complete" | $GREP " "`
20052        if test "x$has_space" != x; then
20053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20055        fi
20056        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20057      fi
20058    fi
20059
20060    # Now join together the path and the arguments once again
20061    if test "x$arguments" != xEOL; then
20062      new_complete="$new_path ${arguments% *}"
20063    else
20064      new_complete="$new_path"
20065    fi
20066
20067    if test "x$complete" != "x$new_complete"; then
20068      FOUND_MAKE="$new_complete"
20069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20070$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20071    fi
20072  fi
20073
20074        fi
20075      fi
20076    fi
20077  fi
20078
20079    fi
20080
20081    if test "x$FOUND_MAKE" = x; then
20082      if test "x$TOOLCHAIN_PATH" != x; then
20083        # We have a toolchain path, check that as well before giving up.
20084        OLD_PATH=$PATH
20085        PATH=$TOOLCHAIN_PATH:$PATH
20086        for ac_prog in gmake
20087do
20088  # Extract the first word of "$ac_prog", so it can be a program name with args.
20089set dummy $ac_prog; ac_word=$2
20090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20091$as_echo_n "checking for $ac_word... " >&6; }
20092if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
20093  $as_echo_n "(cached) " >&6
20094else
20095  case $CHECK_TOOLSDIR_GMAKE in
20096  [\\/]* | ?:[\\/]*)
20097  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
20098  ;;
20099  *)
20100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20101for as_dir in $PATH
20102do
20103  IFS=$as_save_IFS
20104  test -z "$as_dir" && as_dir=.
20105    for ac_exec_ext in '' $ac_executable_extensions; do
20106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20107    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
20108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20109    break 2
20110  fi
20111done
20112  done
20113IFS=$as_save_IFS
20114
20115  ;;
20116esac
20117fi
20118CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
20119if test -n "$CHECK_TOOLSDIR_GMAKE"; then
20120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
20121$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
20122else
20123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20124$as_echo "no" >&6; }
20125fi
20126
20127
20128  test -n "$CHECK_TOOLSDIR_GMAKE" && break
20129done
20130
20131
20132  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
20133  DESCRIPTION="gmake in tools-dir"
20134
20135  # On Cygwin, we require a newer version of make than on other platforms
20136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20137    MAKE_VERSION_EXPR="-e 4\."
20138    MAKE_REQUIRED_VERSION="4.0"
20139   else
20140    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20141    MAKE_REQUIRED_VERSION="3.81"
20142  fi
20143
20144  if test "x$MAKE_CANDIDATE" != x; then
20145    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20146$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20147    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20148    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20149    if test "x$IS_GNU_MAKE" = x; then
20150      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20151$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20152    else
20153      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20154      if test "x$IS_MODERN_MAKE" = x; then
20155        { $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
20156$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;}
20157      else
20158        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20159          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20160            MAKE_EXPECTED_ENV='cygwin'
20161          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20162            MAKE_EXPECTED_ENV='msys'
20163          else
20164            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20165          fi
20166          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20167          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20168        else
20169          # Not relevant for non-Windows
20170          IS_MAKE_CORRECT_ENV=true
20171        fi
20172        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20173          { $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
20174$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;}
20175        else
20176          FOUND_MAKE=$MAKE_CANDIDATE
20177
20178  # Only process if variable expands to non-empty
20179
20180  if test "x$FOUND_MAKE" != x; then
20181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20182
20183  # First separate the path from the arguments. This will split at the first
20184  # space.
20185  complete="$FOUND_MAKE"
20186  path="${complete%% *}"
20187  tmp="$complete EOL"
20188  arguments="${tmp#* }"
20189
20190  # Input might be given as Windows format, start by converting to
20191  # unix format.
20192  new_path=`$CYGPATH -u "$path"`
20193
20194  # Now try to locate executable using which
20195  new_path=`$WHICH "$new_path" 2> /dev/null`
20196  # bat and cmd files are not always considered executable in cygwin causing which
20197  # to not find them
20198  if test "x$new_path" = x \
20199      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20200      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20201    new_path=`$CYGPATH -u "$path"`
20202  fi
20203  if test "x$new_path" = x; then
20204    # Oops. Which didn't find the executable.
20205    # The splitting of arguments from the executable at a space might have been incorrect,
20206    # since paths with space are more likely in Windows. Give it another try with the whole
20207    # argument.
20208    path="$complete"
20209    arguments="EOL"
20210    new_path=`$CYGPATH -u "$path"`
20211    new_path=`$WHICH "$new_path" 2> /dev/null`
20212    # bat and cmd files are not always considered executable in cygwin causing which
20213    # to not find them
20214    if test "x$new_path" = x \
20215        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20216        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20217      new_path=`$CYGPATH -u "$path"`
20218    fi
20219    if test "x$new_path" = x; then
20220      # It's still not found. Now this is an unrecoverable error.
20221      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20222$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20223      has_space=`$ECHO "$complete" | $GREP " "`
20224      if test "x$has_space" != x; then
20225        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20226$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20227      fi
20228      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20229    fi
20230  fi
20231
20232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20235  # "foo.exe" is OK but "foo" is an error.
20236  #
20237  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20238  # It is also a way to make sure we got the proper file name for the real test later on.
20239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20240  if test "x$test_shortpath" = x; then
20241    # Short path failed, file does not exist as specified.
20242    # Try adding .exe or .cmd
20243    if test -f "${new_path}.exe"; then
20244      input_to_shortpath="${new_path}.exe"
20245    elif test -f "${new_path}.cmd"; then
20246      input_to_shortpath="${new_path}.cmd"
20247    else
20248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20249$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20250      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20251$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20252      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20253    fi
20254  else
20255    input_to_shortpath="$new_path"
20256  fi
20257
20258  # Call helper function which possibly converts this using DOS-style short mode.
20259  # If so, the updated path is stored in $new_path.
20260  new_path="$input_to_shortpath"
20261
20262  input_path="$input_to_shortpath"
20263  # Check if we need to convert this using DOS-style short mode. If the path
20264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20265  # take no chances and rewrite it.
20266  # Note: m4 eats our [], so we need to use [ and ] instead.
20267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20268  if test "x$has_forbidden_chars" != x; then
20269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20273      # Going to short mode and back again did indeed matter. Since short mode is
20274      # case insensitive, let's make it lowercase to improve readability.
20275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20276      # Now convert it back to Unix-style (cygpath)
20277      input_path=`$CYGPATH -u "$shortmode_path"`
20278      new_path="$input_path"
20279    fi
20280  fi
20281
20282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20283  if test "x$test_cygdrive_prefix" = x; then
20284    # As a simple fix, exclude /usr/bin since it's not a real path.
20285    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20287      # a path prefixed by /cygdrive for fixpath to work.
20288      new_path="$CYGWIN_ROOT_PATH$input_path"
20289    fi
20290  fi
20291
20292  # remove trailing .exe if any
20293  new_path="${new_path/%.exe/}"
20294
20295    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20296
20297  # First separate the path from the arguments. This will split at the first
20298  # space.
20299  complete="$FOUND_MAKE"
20300  path="${complete%% *}"
20301  tmp="$complete EOL"
20302  arguments="${tmp#* }"
20303
20304  # Input might be given as Windows format, start by converting to
20305  # unix format.
20306  new_path="$path"
20307
20308  windows_path="$new_path"
20309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20310    unix_path=`$CYGPATH -u "$windows_path"`
20311    new_path="$unix_path"
20312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20314    new_path="$unix_path"
20315  fi
20316
20317
20318  # Now try to locate executable using which
20319  new_path=`$WHICH "$new_path" 2> /dev/null`
20320
20321  if test "x$new_path" = x; then
20322    # Oops. Which didn't find the executable.
20323    # The splitting of arguments from the executable at a space might have been incorrect,
20324    # since paths with space are more likely in Windows. Give it another try with the whole
20325    # argument.
20326    path="$complete"
20327    arguments="EOL"
20328    new_path="$path"
20329
20330  windows_path="$new_path"
20331  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20332    unix_path=`$CYGPATH -u "$windows_path"`
20333    new_path="$unix_path"
20334  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20335    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20336    new_path="$unix_path"
20337  fi
20338
20339
20340    new_path=`$WHICH "$new_path" 2> /dev/null`
20341    # bat and cmd files are not always considered executable in MSYS causing which
20342    # to not find them
20343    if test "x$new_path" = x \
20344        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20345        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20346      new_path="$path"
20347
20348  windows_path="$new_path"
20349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20350    unix_path=`$CYGPATH -u "$windows_path"`
20351    new_path="$unix_path"
20352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20354    new_path="$unix_path"
20355  fi
20356
20357    fi
20358
20359    if test "x$new_path" = x; then
20360      # It's still not found. Now this is an unrecoverable error.
20361      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20362$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20363      has_space=`$ECHO "$complete" | $GREP " "`
20364      if test "x$has_space" != x; then
20365        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20366$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20367      fi
20368      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20369    fi
20370  fi
20371
20372  # Now new_path has a complete unix path to the binary
20373  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20374    # Keep paths in /bin as-is, but remove trailing .exe if any
20375    new_path="${new_path/%.exe/}"
20376    # Do not save /bin paths to all_fixpath_prefixes!
20377  else
20378    # Not in mixed or Windows style, start by that.
20379    new_path=`cmd //c echo $new_path`
20380
20381  input_path="$new_path"
20382  # Check if we need to convert this using DOS-style short mode. If the path
20383  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20384  # take no chances and rewrite it.
20385  # Note: m4 eats our [], so we need to use [ and ] instead.
20386  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20387  if test "x$has_forbidden_chars" != x; then
20388    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20389    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20390  fi
20391
20392    # Output is in $new_path
20393
20394  windows_path="$new_path"
20395  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20396    unix_path=`$CYGPATH -u "$windows_path"`
20397    new_path="$unix_path"
20398  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20399    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20400    new_path="$unix_path"
20401  fi
20402
20403    # remove trailing .exe if any
20404    new_path="${new_path/%.exe/}"
20405
20406    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20407    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20408  fi
20409
20410    else
20411      # We're on a unix platform. Hooray! :)
20412      # First separate the path from the arguments. This will split at the first
20413      # space.
20414      complete="$FOUND_MAKE"
20415      path="${complete%% *}"
20416      tmp="$complete EOL"
20417      arguments="${tmp#* }"
20418
20419      # Cannot rely on the command "which" here since it doesn't always work.
20420      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20421      if test -z "$is_absolute_path"; then
20422        # Path to executable is not absolute. Find it.
20423        IFS_save="$IFS"
20424        IFS=:
20425        for p in $PATH; do
20426          if test -f "$p/$path" && test -x "$p/$path"; then
20427            new_path="$p/$path"
20428            break
20429          fi
20430        done
20431        IFS="$IFS_save"
20432      else
20433        # This is an absolute path, we can use it without further modifications.
20434        new_path="$path"
20435      fi
20436
20437      if test "x$new_path" = x; then
20438        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20439$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20440        has_space=`$ECHO "$complete" | $GREP " "`
20441        if test "x$has_space" != x; then
20442          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20443$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20444        fi
20445        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20446      fi
20447    fi
20448
20449    # Now join together the path and the arguments once again
20450    if test "x$arguments" != xEOL; then
20451      new_complete="$new_path ${arguments% *}"
20452    else
20453      new_complete="$new_path"
20454    fi
20455
20456    if test "x$complete" != "x$new_complete"; then
20457      FOUND_MAKE="$new_complete"
20458      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20459$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20460    fi
20461  fi
20462
20463        fi
20464      fi
20465    fi
20466  fi
20467
20468        if test "x$FOUND_MAKE" = x; then
20469          for ac_prog in make
20470do
20471  # Extract the first word of "$ac_prog", so it can be a program name with args.
20472set dummy $ac_prog; ac_word=$2
20473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20474$as_echo_n "checking for $ac_word... " >&6; }
20475if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20476  $as_echo_n "(cached) " >&6
20477else
20478  case $CHECK_TOOLSDIR_MAKE in
20479  [\\/]* | ?:[\\/]*)
20480  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20481  ;;
20482  *)
20483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20484for as_dir in $PATH
20485do
20486  IFS=$as_save_IFS
20487  test -z "$as_dir" && as_dir=.
20488    for ac_exec_ext in '' $ac_executable_extensions; do
20489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20490    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20492    break 2
20493  fi
20494done
20495  done
20496IFS=$as_save_IFS
20497
20498  ;;
20499esac
20500fi
20501CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20502if test -n "$CHECK_TOOLSDIR_MAKE"; then
20503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20504$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20505else
20506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20507$as_echo "no" >&6; }
20508fi
20509
20510
20511  test -n "$CHECK_TOOLSDIR_MAKE" && break
20512done
20513
20514
20515  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20516  DESCRIPTION="make in tools-dir"
20517
20518  # On Cygwin, we require a newer version of make than on other platforms
20519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20520    MAKE_VERSION_EXPR="-e 4\."
20521    MAKE_REQUIRED_VERSION="4.0"
20522   else
20523    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20524    MAKE_REQUIRED_VERSION="3.81"
20525  fi
20526
20527  if test "x$MAKE_CANDIDATE" != x; then
20528    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20529$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20530    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20531    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20532    if test "x$IS_GNU_MAKE" = x; then
20533      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20534$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20535    else
20536      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20537      if test "x$IS_MODERN_MAKE" = x; then
20538        { $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
20539$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;}
20540      else
20541        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20542          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20543            MAKE_EXPECTED_ENV='cygwin'
20544          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20545            MAKE_EXPECTED_ENV='msys'
20546          else
20547            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20548          fi
20549          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20550          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20551        else
20552          # Not relevant for non-Windows
20553          IS_MAKE_CORRECT_ENV=true
20554        fi
20555        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20556          { $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
20557$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;}
20558        else
20559          FOUND_MAKE=$MAKE_CANDIDATE
20560
20561  # Only process if variable expands to non-empty
20562
20563  if test "x$FOUND_MAKE" != x; then
20564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20565
20566  # First separate the path from the arguments. This will split at the first
20567  # space.
20568  complete="$FOUND_MAKE"
20569  path="${complete%% *}"
20570  tmp="$complete EOL"
20571  arguments="${tmp#* }"
20572
20573  # Input might be given as Windows format, start by converting to
20574  # unix format.
20575  new_path=`$CYGPATH -u "$path"`
20576
20577  # Now try to locate executable using which
20578  new_path=`$WHICH "$new_path" 2> /dev/null`
20579  # bat and cmd files are not always considered executable in cygwin causing which
20580  # to not find them
20581  if test "x$new_path" = x \
20582      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20583      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20584    new_path=`$CYGPATH -u "$path"`
20585  fi
20586  if test "x$new_path" = x; then
20587    # Oops. Which didn't find the executable.
20588    # The splitting of arguments from the executable at a space might have been incorrect,
20589    # since paths with space are more likely in Windows. Give it another try with the whole
20590    # argument.
20591    path="$complete"
20592    arguments="EOL"
20593    new_path=`$CYGPATH -u "$path"`
20594    new_path=`$WHICH "$new_path" 2> /dev/null`
20595    # bat and cmd files are not always considered executable in cygwin causing which
20596    # to not find them
20597    if test "x$new_path" = x \
20598        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20599        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20600      new_path=`$CYGPATH -u "$path"`
20601    fi
20602    if test "x$new_path" = x; then
20603      # It's still not found. Now this is an unrecoverable error.
20604      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20605$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20606      has_space=`$ECHO "$complete" | $GREP " "`
20607      if test "x$has_space" != x; then
20608        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20609$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20610      fi
20611      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20612    fi
20613  fi
20614
20615  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20616  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20617  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20618  # "foo.exe" is OK but "foo" is an error.
20619  #
20620  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20621  # It is also a way to make sure we got the proper file name for the real test later on.
20622  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20623  if test "x$test_shortpath" = x; then
20624    # Short path failed, file does not exist as specified.
20625    # Try adding .exe or .cmd
20626    if test -f "${new_path}.exe"; then
20627      input_to_shortpath="${new_path}.exe"
20628    elif test -f "${new_path}.cmd"; then
20629      input_to_shortpath="${new_path}.cmd"
20630    else
20631      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20632$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20633      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20634$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20635      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20636    fi
20637  else
20638    input_to_shortpath="$new_path"
20639  fi
20640
20641  # Call helper function which possibly converts this using DOS-style short mode.
20642  # If so, the updated path is stored in $new_path.
20643  new_path="$input_to_shortpath"
20644
20645  input_path="$input_to_shortpath"
20646  # Check if we need to convert this using DOS-style short mode. If the path
20647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20648  # take no chances and rewrite it.
20649  # Note: m4 eats our [], so we need to use [ and ] instead.
20650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20651  if test "x$has_forbidden_chars" != x; then
20652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20656      # Going to short mode and back again did indeed matter. Since short mode is
20657      # case insensitive, let's make it lowercase to improve readability.
20658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20659      # Now convert it back to Unix-style (cygpath)
20660      input_path=`$CYGPATH -u "$shortmode_path"`
20661      new_path="$input_path"
20662    fi
20663  fi
20664
20665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20666  if test "x$test_cygdrive_prefix" = x; then
20667    # As a simple fix, exclude /usr/bin since it's not a real path.
20668    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20670      # a path prefixed by /cygdrive for fixpath to work.
20671      new_path="$CYGWIN_ROOT_PATH$input_path"
20672    fi
20673  fi
20674
20675  # remove trailing .exe if any
20676  new_path="${new_path/%.exe/}"
20677
20678    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20679
20680  # First separate the path from the arguments. This will split at the first
20681  # space.
20682  complete="$FOUND_MAKE"
20683  path="${complete%% *}"
20684  tmp="$complete EOL"
20685  arguments="${tmp#* }"
20686
20687  # Input might be given as Windows format, start by converting to
20688  # unix format.
20689  new_path="$path"
20690
20691  windows_path="$new_path"
20692  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20693    unix_path=`$CYGPATH -u "$windows_path"`
20694    new_path="$unix_path"
20695  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20696    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20697    new_path="$unix_path"
20698  fi
20699
20700
20701  # Now try to locate executable using which
20702  new_path=`$WHICH "$new_path" 2> /dev/null`
20703
20704  if test "x$new_path" = x; then
20705    # Oops. Which didn't find the executable.
20706    # The splitting of arguments from the executable at a space might have been incorrect,
20707    # since paths with space are more likely in Windows. Give it another try with the whole
20708    # argument.
20709    path="$complete"
20710    arguments="EOL"
20711    new_path="$path"
20712
20713  windows_path="$new_path"
20714  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20715    unix_path=`$CYGPATH -u "$windows_path"`
20716    new_path="$unix_path"
20717  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20718    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20719    new_path="$unix_path"
20720  fi
20721
20722
20723    new_path=`$WHICH "$new_path" 2> /dev/null`
20724    # bat and cmd files are not always considered executable in MSYS causing which
20725    # to not find them
20726    if test "x$new_path" = x \
20727        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20728        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20729      new_path="$path"
20730
20731  windows_path="$new_path"
20732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20733    unix_path=`$CYGPATH -u "$windows_path"`
20734    new_path="$unix_path"
20735  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20736    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20737    new_path="$unix_path"
20738  fi
20739
20740    fi
20741
20742    if test "x$new_path" = x; then
20743      # It's still not found. Now this is an unrecoverable error.
20744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20745$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20746      has_space=`$ECHO "$complete" | $GREP " "`
20747      if test "x$has_space" != x; then
20748        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20749$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20750      fi
20751      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20752    fi
20753  fi
20754
20755  # Now new_path has a complete unix path to the binary
20756  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20757    # Keep paths in /bin as-is, but remove trailing .exe if any
20758    new_path="${new_path/%.exe/}"
20759    # Do not save /bin paths to all_fixpath_prefixes!
20760  else
20761    # Not in mixed or Windows style, start by that.
20762    new_path=`cmd //c echo $new_path`
20763
20764  input_path="$new_path"
20765  # Check if we need to convert this using DOS-style short mode. If the path
20766  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20767  # take no chances and rewrite it.
20768  # Note: m4 eats our [], so we need to use [ and ] instead.
20769  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20770  if test "x$has_forbidden_chars" != x; then
20771    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20772    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20773  fi
20774
20775    # Output is in $new_path
20776
20777  windows_path="$new_path"
20778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20779    unix_path=`$CYGPATH -u "$windows_path"`
20780    new_path="$unix_path"
20781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20783    new_path="$unix_path"
20784  fi
20785
20786    # remove trailing .exe if any
20787    new_path="${new_path/%.exe/}"
20788
20789    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20790    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20791  fi
20792
20793    else
20794      # We're on a unix platform. Hooray! :)
20795      # First separate the path from the arguments. This will split at the first
20796      # space.
20797      complete="$FOUND_MAKE"
20798      path="${complete%% *}"
20799      tmp="$complete EOL"
20800      arguments="${tmp#* }"
20801
20802      # Cannot rely on the command "which" here since it doesn't always work.
20803      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20804      if test -z "$is_absolute_path"; then
20805        # Path to executable is not absolute. Find it.
20806        IFS_save="$IFS"
20807        IFS=:
20808        for p in $PATH; do
20809          if test -f "$p/$path" && test -x "$p/$path"; then
20810            new_path="$p/$path"
20811            break
20812          fi
20813        done
20814        IFS="$IFS_save"
20815      else
20816        # This is an absolute path, we can use it without further modifications.
20817        new_path="$path"
20818      fi
20819
20820      if test "x$new_path" = x; then
20821        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20822$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20823        has_space=`$ECHO "$complete" | $GREP " "`
20824        if test "x$has_space" != x; then
20825          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20826$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20827        fi
20828        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20829      fi
20830    fi
20831
20832    # Now join together the path and the arguments once again
20833    if test "x$arguments" != xEOL; then
20834      new_complete="$new_path ${arguments% *}"
20835    else
20836      new_complete="$new_path"
20837    fi
20838
20839    if test "x$complete" != "x$new_complete"; then
20840      FOUND_MAKE="$new_complete"
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20842$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20843    fi
20844  fi
20845
20846        fi
20847      fi
20848    fi
20849  fi
20850
20851        fi
20852        PATH=$OLD_PATH
20853      fi
20854    fi
20855
20856    if test "x$FOUND_MAKE" = x; then
20857      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
20858    fi
20859
20860    else
20861      # If it succeeded, then it was overridden by the user. We will use it
20862      # for the tool.
20863
20864      # First remove it from the list of overridden variables, so we can test
20865      # for unknown variables in the end.
20866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20867
20868      # Check if we try to supply an empty value
20869      if test "x$MAKE" = x; then
20870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20871$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20873$as_echo_n "checking for MAKE... " >&6; }
20874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20875$as_echo "disabled" >&6; }
20876      else
20877        # Check if the provided tool contains a complete path.
20878        tool_specified="$MAKE"
20879        tool_basename="${tool_specified##*/}"
20880        if test "x$tool_basename" = "x$tool_specified"; then
20881          # A command without a complete path is provided, search $PATH.
20882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20883$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20884          # Extract the first word of "$tool_basename", so it can be a program name with args.
20885set dummy $tool_basename; ac_word=$2
20886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20887$as_echo_n "checking for $ac_word... " >&6; }
20888if ${ac_cv_path_MAKE+:} false; then :
20889  $as_echo_n "(cached) " >&6
20890else
20891  case $MAKE in
20892  [\\/]* | ?:[\\/]*)
20893  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20894  ;;
20895  *)
20896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20897for as_dir in $PATH
20898do
20899  IFS=$as_save_IFS
20900  test -z "$as_dir" && as_dir=.
20901    for ac_exec_ext in '' $ac_executable_extensions; do
20902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20903    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20905    break 2
20906  fi
20907done
20908  done
20909IFS=$as_save_IFS
20910
20911  ;;
20912esac
20913fi
20914MAKE=$ac_cv_path_MAKE
20915if test -n "$MAKE"; then
20916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20917$as_echo "$MAKE" >&6; }
20918else
20919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20920$as_echo "no" >&6; }
20921fi
20922
20923
20924          if test "x$MAKE" = x; then
20925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20926          fi
20927        else
20928          # Otherwise we believe it is a complete path. Use it as it is.
20929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20930$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20932$as_echo_n "checking for MAKE... " >&6; }
20933          if test ! -x "$tool_specified"; then
20934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20935$as_echo "not found" >&6; }
20936            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20937          fi
20938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20939$as_echo "$tool_specified" >&6; }
20940        fi
20941      fi
20942    fi
20943
20944    # If MAKE was set by user, verify the version
20945
20946  MAKE_CANDIDATE=""$MAKE""
20947  DESCRIPTION="user supplied MAKE=$MAKE"
20948
20949  # On Cygwin, we require a newer version of make than on other platforms
20950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20951    MAKE_VERSION_EXPR="-e 4\."
20952    MAKE_REQUIRED_VERSION="4.0"
20953   else
20954    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20955    MAKE_REQUIRED_VERSION="3.81"
20956  fi
20957
20958  if test "x$MAKE_CANDIDATE" != x; then
20959    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20960$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20961    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20962    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20963    if test "x$IS_GNU_MAKE" = x; then
20964      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20965$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20966    else
20967      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20968      if test "x$IS_MODERN_MAKE" = x; then
20969        { $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
20970$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;}
20971      else
20972        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20973          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20974            MAKE_EXPECTED_ENV='cygwin'
20975          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20976            MAKE_EXPECTED_ENV='msys'
20977          else
20978            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20979          fi
20980          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20981          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20982        else
20983          # Not relevant for non-Windows
20984          IS_MAKE_CORRECT_ENV=true
20985        fi
20986        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20987          { $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
20988$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;}
20989        else
20990          FOUND_MAKE=$MAKE_CANDIDATE
20991
20992  # Only process if variable expands to non-empty
20993
20994  if test "x$FOUND_MAKE" != x; then
20995    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20996
20997  # First separate the path from the arguments. This will split at the first
20998  # space.
20999  complete="$FOUND_MAKE"
21000  path="${complete%% *}"
21001  tmp="$complete EOL"
21002  arguments="${tmp#* }"
21003
21004  # Input might be given as Windows format, start by converting to
21005  # unix format.
21006  new_path=`$CYGPATH -u "$path"`
21007
21008  # Now try to locate executable using which
21009  new_path=`$WHICH "$new_path" 2> /dev/null`
21010  # bat and cmd files are not always considered executable in cygwin causing which
21011  # to not find them
21012  if test "x$new_path" = x \
21013      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21014      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21015    new_path=`$CYGPATH -u "$path"`
21016  fi
21017  if test "x$new_path" = x; then
21018    # Oops. Which didn't find the executable.
21019    # The splitting of arguments from the executable at a space might have been incorrect,
21020    # since paths with space are more likely in Windows. Give it another try with the whole
21021    # argument.
21022    path="$complete"
21023    arguments="EOL"
21024    new_path=`$CYGPATH -u "$path"`
21025    new_path=`$WHICH "$new_path" 2> /dev/null`
21026    # bat and cmd files are not always considered executable in cygwin causing which
21027    # to not find them
21028    if test "x$new_path" = x \
21029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21031      new_path=`$CYGPATH -u "$path"`
21032    fi
21033    if test "x$new_path" = x; then
21034      # It's still not found. Now this is an unrecoverable error.
21035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21036$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21037      has_space=`$ECHO "$complete" | $GREP " "`
21038      if test "x$has_space" != x; then
21039        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21040$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21041      fi
21042      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21043    fi
21044  fi
21045
21046  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
21047  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
21048  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
21049  # "foo.exe" is OK but "foo" is an error.
21050  #
21051  # This test is therefore slightly more accurate than "test -f" to check for file presence.
21052  # It is also a way to make sure we got the proper file name for the real test later on.
21053  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
21054  if test "x$test_shortpath" = x; then
21055    # Short path failed, file does not exist as specified.
21056    # Try adding .exe or .cmd
21057    if test -f "${new_path}.exe"; then
21058      input_to_shortpath="${new_path}.exe"
21059    elif test -f "${new_path}.cmd"; then
21060      input_to_shortpath="${new_path}.cmd"
21061    else
21062      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
21063$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
21064      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
21065$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
21066      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21067    fi
21068  else
21069    input_to_shortpath="$new_path"
21070  fi
21071
21072  # Call helper function which possibly converts this using DOS-style short mode.
21073  # If so, the updated path is stored in $new_path.
21074  new_path="$input_to_shortpath"
21075
21076  input_path="$input_to_shortpath"
21077  # Check if we need to convert this using DOS-style short mode. If the path
21078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21079  # take no chances and rewrite it.
21080  # Note: m4 eats our [], so we need to use [ and ] instead.
21081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
21082  if test "x$has_forbidden_chars" != x; then
21083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
21085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
21086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
21087      # Going to short mode and back again did indeed matter. Since short mode is
21088      # case insensitive, let's make it lowercase to improve readability.
21089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21090      # Now convert it back to Unix-style (cygpath)
21091      input_path=`$CYGPATH -u "$shortmode_path"`
21092      new_path="$input_path"
21093    fi
21094  fi
21095
21096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
21097  if test "x$test_cygdrive_prefix" = x; then
21098    # As a simple fix, exclude /usr/bin since it's not a real path.
21099    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
21100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
21101      # a path prefixed by /cygdrive for fixpath to work.
21102      new_path="$CYGWIN_ROOT_PATH$input_path"
21103    fi
21104  fi
21105
21106  # remove trailing .exe if any
21107  new_path="${new_path/%.exe/}"
21108
21109    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21110
21111  # First separate the path from the arguments. This will split at the first
21112  # space.
21113  complete="$FOUND_MAKE"
21114  path="${complete%% *}"
21115  tmp="$complete EOL"
21116  arguments="${tmp#* }"
21117
21118  # Input might be given as Windows format, start by converting to
21119  # unix format.
21120  new_path="$path"
21121
21122  windows_path="$new_path"
21123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21124    unix_path=`$CYGPATH -u "$windows_path"`
21125    new_path="$unix_path"
21126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21128    new_path="$unix_path"
21129  fi
21130
21131
21132  # Now try to locate executable using which
21133  new_path=`$WHICH "$new_path" 2> /dev/null`
21134
21135  if test "x$new_path" = x; then
21136    # Oops. Which didn't find the executable.
21137    # The splitting of arguments from the executable at a space might have been incorrect,
21138    # since paths with space are more likely in Windows. Give it another try with the whole
21139    # argument.
21140    path="$complete"
21141    arguments="EOL"
21142    new_path="$path"
21143
21144  windows_path="$new_path"
21145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21146    unix_path=`$CYGPATH -u "$windows_path"`
21147    new_path="$unix_path"
21148  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21149    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21150    new_path="$unix_path"
21151  fi
21152
21153
21154    new_path=`$WHICH "$new_path" 2> /dev/null`
21155    # bat and cmd files are not always considered executable in MSYS causing which
21156    # to not find them
21157    if test "x$new_path" = x \
21158        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
21159        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
21160      new_path="$path"
21161
21162  windows_path="$new_path"
21163  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21164    unix_path=`$CYGPATH -u "$windows_path"`
21165    new_path="$unix_path"
21166  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21167    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21168    new_path="$unix_path"
21169  fi
21170
21171    fi
21172
21173    if test "x$new_path" = x; then
21174      # It's still not found. Now this is an unrecoverable error.
21175      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21176$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21177      has_space=`$ECHO "$complete" | $GREP " "`
21178      if test "x$has_space" != x; then
21179        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
21180$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
21181      fi
21182      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21183    fi
21184  fi
21185
21186  # Now new_path has a complete unix path to the binary
21187  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
21188    # Keep paths in /bin as-is, but remove trailing .exe if any
21189    new_path="${new_path/%.exe/}"
21190    # Do not save /bin paths to all_fixpath_prefixes!
21191  else
21192    # Not in mixed or Windows style, start by that.
21193    new_path=`cmd //c echo $new_path`
21194
21195  input_path="$new_path"
21196  # Check if we need to convert this using DOS-style short mode. If the path
21197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21198  # take no chances and rewrite it.
21199  # Note: m4 eats our [], so we need to use [ and ] instead.
21200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21201  if test "x$has_forbidden_chars" != x; then
21202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21204  fi
21205
21206    # Output is in $new_path
21207
21208  windows_path="$new_path"
21209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21210    unix_path=`$CYGPATH -u "$windows_path"`
21211    new_path="$unix_path"
21212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21214    new_path="$unix_path"
21215  fi
21216
21217    # remove trailing .exe if any
21218    new_path="${new_path/%.exe/}"
21219
21220    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21221    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21222  fi
21223
21224    else
21225      # We're on a unix platform. Hooray! :)
21226      # First separate the path from the arguments. This will split at the first
21227      # space.
21228      complete="$FOUND_MAKE"
21229      path="${complete%% *}"
21230      tmp="$complete EOL"
21231      arguments="${tmp#* }"
21232
21233      # Cannot rely on the command "which" here since it doesn't always work.
21234      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21235      if test -z "$is_absolute_path"; then
21236        # Path to executable is not absolute. Find it.
21237        IFS_save="$IFS"
21238        IFS=:
21239        for p in $PATH; do
21240          if test -f "$p/$path" && test -x "$p/$path"; then
21241            new_path="$p/$path"
21242            break
21243          fi
21244        done
21245        IFS="$IFS_save"
21246      else
21247        # This is an absolute path, we can use it without further modifications.
21248        new_path="$path"
21249      fi
21250
21251      if test "x$new_path" = x; then
21252        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21253$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21254        has_space=`$ECHO "$complete" | $GREP " "`
21255        if test "x$has_space" != x; then
21256          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21257$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21258        fi
21259        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21260      fi
21261    fi
21262
21263    # Now join together the path and the arguments once again
21264    if test "x$arguments" != xEOL; then
21265      new_complete="$new_path ${arguments% *}"
21266    else
21267      new_complete="$new_path"
21268    fi
21269
21270    if test "x$complete" != "x$new_complete"; then
21271      FOUND_MAKE="$new_complete"
21272      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21273$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21274    fi
21275  fi
21276
21277        fi
21278      fi
21279    fi
21280  fi
21281
21282    if test "x$FOUND_MAKE" = x; then
21283      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21284    fi
21285
21286  fi
21287
21288
21289  MAKE=$FOUND_MAKE
21290
21291  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21292$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21293
21294
21295  # Check if make supports the output sync option and if so, setup using it.
21296  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21297$as_echo_n "checking if make --output-sync is supported... " >&6; }
21298  if $MAKE --version -O > /dev/null 2>&1; then
21299    OUTPUT_SYNC_SUPPORTED=true
21300    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21301$as_echo "yes" >&6; }
21302    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21303$as_echo_n "checking for output-sync value... " >&6; }
21304
21305# Check whether --with-output-sync was given.
21306if test "${with_output_sync+set}" = set; then :
21307  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21308fi
21309
21310    if test "x$OUTPUT_SYNC" = "x"; then
21311      OUTPUT_SYNC=none
21312    fi
21313    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21314$as_echo "$OUTPUT_SYNC" >&6; }
21315    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21316      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21317    fi
21318  else
21319    OUTPUT_SYNC_SUPPORTED=false
21320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21321$as_echo "no" >&6; }
21322  fi
21323
21324
21325
21326
21327
21328
21329  # Test if find supports -delete
21330  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21331$as_echo_n "checking if find supports -delete... " >&6; }
21332  FIND_DELETE="-delete"
21333
21334  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21335
21336  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21337
21338  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21339  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21340    # No, it does not.
21341    $RM $DELETEDIR/TestIfFindSupportsDelete
21342    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21343      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21344      FIND_DELETE="-print | $XARGS $RM"
21345    else
21346      FIND_DELETE="-exec $RM \{\} \+"
21347    fi
21348    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21349$as_echo "no" >&6; }
21350  else
21351    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21352$as_echo "yes" >&6; }
21353  fi
21354  $RMDIR $DELETEDIR
21355
21356
21357
21358  # Test which kind of tar was found
21359  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21360    TAR_TYPE="gnu"
21361  elif test "x$($TAR --version | $GREP "bsdtar")" != "x"; then
21362    TAR_TYPE="bsd"
21363  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21364    TAR_TYPE="bsd"
21365  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21366    TAR_TYPE="solaris"
21367  fi
21368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21369$as_echo_n "checking what type of tar was found... " >&6; }
21370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21371$as_echo "$TAR_TYPE" >&6; }
21372
21373  TAR_CREATE_FILE_PARAM=""
21374
21375  if test "x$TAR_TYPE" = "xgnu"; then
21376    TAR_INCLUDE_PARAM="T"
21377    TAR_SUPPORTS_TRANSFORM="true"
21378    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21379      # When using gnu tar for Solaris targets, need to use compatibility mode
21380      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21381    fi
21382  else
21383    TAR_INCLUDE_PARAM="I"
21384    TAR_SUPPORTS_TRANSFORM="false"
21385  fi
21386
21387
21388
21389
21390
21391
21392  # Test that grep supports -Fx with a list of pattern which includes null pattern.
21393  # This is a problem for the grep resident on AIX.
21394  { $as_echo "$as_me:${as_lineno-$LINENO}: checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly" >&5
21395$as_echo_n "checking that grep ($GREP) -Fx handles empty lines in the pattern list correctly... " >&6; }
21396  # Multiple subsequent spaces..
21397  STACK_SPACES='aaa   bbb   ccc'
21398  # ..converted to subsequent newlines, causes STACK_LIST to be a list with some empty
21399  # patterns in it.
21400  STACK_LIST=${STACK_SPACES// /$'\n'}
21401  NEEDLE_SPACES='ccc bbb aaa'
21402  NEEDLE_LIST=${NEEDLE_SPACES// /$'\n'}
21403  RESULT="$($GREP -Fvx "$STACK_LIST" <<< "$NEEDLE_LIST")"
21404  if test "x$RESULT" == "x"; then
21405    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21406$as_echo "yes" >&6; }
21407  else
21408    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21409      ADDINFO="Please make sure you use GNU grep, usually found at /opt/freeware/bin."
21410    fi
21411    as_fn_error $? "grep does not handle -Fx correctly. ${ADDINFO}" "$LINENO" 5
21412  fi
21413
21414
21415  # These tools might not be installed by default,
21416  # need hint on how to install them.
21417
21418
21419
21420  # Publish this variable in the help.
21421
21422
21423  if [ -z "${UNZIP+x}" ]; then
21424    # The variable is not set by user, try to locate tool using the code snippet
21425    for ac_prog in unzip
21426do
21427  # Extract the first word of "$ac_prog", so it can be a program name with args.
21428set dummy $ac_prog; ac_word=$2
21429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21430$as_echo_n "checking for $ac_word... " >&6; }
21431if ${ac_cv_path_UNZIP+:} false; then :
21432  $as_echo_n "(cached) " >&6
21433else
21434  case $UNZIP in
21435  [\\/]* | ?:[\\/]*)
21436  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21437  ;;
21438  *)
21439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21440for as_dir in $PATH
21441do
21442  IFS=$as_save_IFS
21443  test -z "$as_dir" && as_dir=.
21444    for ac_exec_ext in '' $ac_executable_extensions; do
21445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21446    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21448    break 2
21449  fi
21450done
21451  done
21452IFS=$as_save_IFS
21453
21454  ;;
21455esac
21456fi
21457UNZIP=$ac_cv_path_UNZIP
21458if test -n "$UNZIP"; then
21459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21460$as_echo "$UNZIP" >&6; }
21461else
21462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21463$as_echo "no" >&6; }
21464fi
21465
21466
21467  test -n "$UNZIP" && break
21468done
21469
21470  else
21471    # The variable is set, but is it from the command line or the environment?
21472
21473    # Try to remove the string !UNZIP! from our list.
21474    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21475    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21476      # If it failed, the variable was not from the command line. Ignore it,
21477      # but warn the user (except for BASH, which is always set by the calling BASH).
21478      if test "xUNZIP" != xBASH; then
21479        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21480$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21481      fi
21482      # Try to locate tool using the code snippet
21483      for ac_prog in unzip
21484do
21485  # Extract the first word of "$ac_prog", so it can be a program name with args.
21486set dummy $ac_prog; ac_word=$2
21487{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21488$as_echo_n "checking for $ac_word... " >&6; }
21489if ${ac_cv_path_UNZIP+:} false; then :
21490  $as_echo_n "(cached) " >&6
21491else
21492  case $UNZIP in
21493  [\\/]* | ?:[\\/]*)
21494  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21495  ;;
21496  *)
21497  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21498for as_dir in $PATH
21499do
21500  IFS=$as_save_IFS
21501  test -z "$as_dir" && as_dir=.
21502    for ac_exec_ext in '' $ac_executable_extensions; do
21503  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21504    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21505    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21506    break 2
21507  fi
21508done
21509  done
21510IFS=$as_save_IFS
21511
21512  ;;
21513esac
21514fi
21515UNZIP=$ac_cv_path_UNZIP
21516if test -n "$UNZIP"; then
21517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21518$as_echo "$UNZIP" >&6; }
21519else
21520  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21521$as_echo "no" >&6; }
21522fi
21523
21524
21525  test -n "$UNZIP" && break
21526done
21527
21528    else
21529      # If it succeeded, then it was overridden by the user. We will use it
21530      # for the tool.
21531
21532      # First remove it from the list of overridden variables, so we can test
21533      # for unknown variables in the end.
21534      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21535
21536      # Check if we try to supply an empty value
21537      if test "x$UNZIP" = x; then
21538        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21539$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21540        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21541$as_echo_n "checking for UNZIP... " >&6; }
21542        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21543$as_echo "disabled" >&6; }
21544      else
21545        # Check if the provided tool contains a complete path.
21546        tool_specified="$UNZIP"
21547        tool_basename="${tool_specified##*/}"
21548        if test "x$tool_basename" = "x$tool_specified"; then
21549          # A command without a complete path is provided, search $PATH.
21550          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21551$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21552          # Extract the first word of "$tool_basename", so it can be a program name with args.
21553set dummy $tool_basename; ac_word=$2
21554{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21555$as_echo_n "checking for $ac_word... " >&6; }
21556if ${ac_cv_path_UNZIP+:} false; then :
21557  $as_echo_n "(cached) " >&6
21558else
21559  case $UNZIP in
21560  [\\/]* | ?:[\\/]*)
21561  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21562  ;;
21563  *)
21564  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21565for as_dir in $PATH
21566do
21567  IFS=$as_save_IFS
21568  test -z "$as_dir" && as_dir=.
21569    for ac_exec_ext in '' $ac_executable_extensions; do
21570  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21571    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21572    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21573    break 2
21574  fi
21575done
21576  done
21577IFS=$as_save_IFS
21578
21579  ;;
21580esac
21581fi
21582UNZIP=$ac_cv_path_UNZIP
21583if test -n "$UNZIP"; then
21584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21585$as_echo "$UNZIP" >&6; }
21586else
21587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21588$as_echo "no" >&6; }
21589fi
21590
21591
21592          if test "x$UNZIP" = x; then
21593            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21594          fi
21595        else
21596          # Otherwise we believe it is a complete path. Use it as it is.
21597          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21598$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21599          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21600$as_echo_n "checking for UNZIP... " >&6; }
21601          if test ! -x "$tool_specified"; then
21602            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21603$as_echo "not found" >&6; }
21604            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21605          fi
21606          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21607$as_echo "$tool_specified" >&6; }
21608        fi
21609      fi
21610    fi
21611
21612  fi
21613
21614
21615
21616  if test "x$UNZIP" = x; then
21617    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21618  fi
21619
21620
21621  # Since zip uses "ZIP" as a environment variable for passing options, we need
21622  # to name our variable differently, hence ZIPEXE.
21623
21624
21625
21626  # Publish this variable in the help.
21627
21628
21629  if [ -z "${ZIPEXE+x}" ]; then
21630    # The variable is not set by user, try to locate tool using the code snippet
21631    for ac_prog in zip
21632do
21633  # Extract the first word of "$ac_prog", so it can be a program name with args.
21634set dummy $ac_prog; ac_word=$2
21635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21636$as_echo_n "checking for $ac_word... " >&6; }
21637if ${ac_cv_path_ZIPEXE+:} false; then :
21638  $as_echo_n "(cached) " >&6
21639else
21640  case $ZIPEXE in
21641  [\\/]* | ?:[\\/]*)
21642  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21643  ;;
21644  *)
21645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21646for as_dir in $PATH
21647do
21648  IFS=$as_save_IFS
21649  test -z "$as_dir" && as_dir=.
21650    for ac_exec_ext in '' $ac_executable_extensions; do
21651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21652    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21654    break 2
21655  fi
21656done
21657  done
21658IFS=$as_save_IFS
21659
21660  ;;
21661esac
21662fi
21663ZIPEXE=$ac_cv_path_ZIPEXE
21664if test -n "$ZIPEXE"; then
21665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21666$as_echo "$ZIPEXE" >&6; }
21667else
21668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21669$as_echo "no" >&6; }
21670fi
21671
21672
21673  test -n "$ZIPEXE" && break
21674done
21675
21676  else
21677    # The variable is set, but is it from the command line or the environment?
21678
21679    # Try to remove the string !ZIPEXE! from our list.
21680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIPEXE!/}
21681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21682      # If it failed, the variable was not from the command line. Ignore it,
21683      # but warn the user (except for BASH, which is always set by the calling BASH).
21684      if test "xZIPEXE" != xBASH; then
21685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&5
21686$as_echo "$as_me: WARNING: Ignoring value of ZIPEXE from the environment. Use command line variables instead." >&2;}
21687      fi
21688      # Try to locate tool using the code snippet
21689      for ac_prog in zip
21690do
21691  # Extract the first word of "$ac_prog", so it can be a program name with args.
21692set dummy $ac_prog; ac_word=$2
21693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21694$as_echo_n "checking for $ac_word... " >&6; }
21695if ${ac_cv_path_ZIPEXE+:} false; then :
21696  $as_echo_n "(cached) " >&6
21697else
21698  case $ZIPEXE in
21699  [\\/]* | ?:[\\/]*)
21700  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21701  ;;
21702  *)
21703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21704for as_dir in $PATH
21705do
21706  IFS=$as_save_IFS
21707  test -z "$as_dir" && as_dir=.
21708    for ac_exec_ext in '' $ac_executable_extensions; do
21709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21710    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21712    break 2
21713  fi
21714done
21715  done
21716IFS=$as_save_IFS
21717
21718  ;;
21719esac
21720fi
21721ZIPEXE=$ac_cv_path_ZIPEXE
21722if test -n "$ZIPEXE"; then
21723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21724$as_echo "$ZIPEXE" >&6; }
21725else
21726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21727$as_echo "no" >&6; }
21728fi
21729
21730
21731  test -n "$ZIPEXE" && break
21732done
21733
21734    else
21735      # If it succeeded, then it was overridden by the user. We will use it
21736      # for the tool.
21737
21738      # First remove it from the list of overridden variables, so we can test
21739      # for unknown variables in the end.
21740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21741
21742      # Check if we try to supply an empty value
21743      if test "x$ZIPEXE" = x; then
21744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIPEXE= (no value)" >&5
21745$as_echo "$as_me: Setting user supplied tool ZIPEXE= (no value)" >&6;}
21746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21747$as_echo_n "checking for ZIPEXE... " >&6; }
21748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21749$as_echo "disabled" >&6; }
21750      else
21751        # Check if the provided tool contains a complete path.
21752        tool_specified="$ZIPEXE"
21753        tool_basename="${tool_specified##*/}"
21754        if test "x$tool_basename" = "x$tool_specified"; then
21755          # A command without a complete path is provided, search $PATH.
21756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIPEXE=$tool_basename" >&5
21757$as_echo "$as_me: Will search for user supplied tool ZIPEXE=$tool_basename" >&6;}
21758          # Extract the first word of "$tool_basename", so it can be a program name with args.
21759set dummy $tool_basename; ac_word=$2
21760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21761$as_echo_n "checking for $ac_word... " >&6; }
21762if ${ac_cv_path_ZIPEXE+:} false; then :
21763  $as_echo_n "(cached) " >&6
21764else
21765  case $ZIPEXE in
21766  [\\/]* | ?:[\\/]*)
21767  ac_cv_path_ZIPEXE="$ZIPEXE" # Let the user override the test with a path.
21768  ;;
21769  *)
21770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21771for as_dir in $PATH
21772do
21773  IFS=$as_save_IFS
21774  test -z "$as_dir" && as_dir=.
21775    for ac_exec_ext in '' $ac_executable_extensions; do
21776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21777    ac_cv_path_ZIPEXE="$as_dir/$ac_word$ac_exec_ext"
21778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21779    break 2
21780  fi
21781done
21782  done
21783IFS=$as_save_IFS
21784
21785  ;;
21786esac
21787fi
21788ZIPEXE=$ac_cv_path_ZIPEXE
21789if test -n "$ZIPEXE"; then
21790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIPEXE" >&5
21791$as_echo "$ZIPEXE" >&6; }
21792else
21793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21794$as_echo "no" >&6; }
21795fi
21796
21797
21798          if test "x$ZIPEXE" = x; then
21799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21800          fi
21801        else
21802          # Otherwise we believe it is a complete path. Use it as it is.
21803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIPEXE=$tool_specified" >&5
21804$as_echo "$as_me: Will use user supplied tool ZIPEXE=$tool_specified" >&6;}
21805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIPEXE" >&5
21806$as_echo_n "checking for ZIPEXE... " >&6; }
21807          if test ! -x "$tool_specified"; then
21808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21809$as_echo "not found" >&6; }
21810            as_fn_error $? "User supplied tool ZIPEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
21811          fi
21812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21813$as_echo "$tool_specified" >&6; }
21814        fi
21815      fi
21816    fi
21817
21818  fi
21819
21820
21821
21822  if test "x$ZIPEXE" = x; then
21823    as_fn_error $? "Could not find required tool for ZIPEXE" "$LINENO" 5
21824  fi
21825
21826
21827
21828  # Non-required basic tools
21829
21830
21831
21832  # Publish this variable in the help.
21833
21834
21835  if [ -z "${LDD+x}" ]; then
21836    # The variable is not set by user, try to locate tool using the code snippet
21837    for ac_prog in ldd
21838do
21839  # Extract the first word of "$ac_prog", so it can be a program name with args.
21840set dummy $ac_prog; ac_word=$2
21841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21842$as_echo_n "checking for $ac_word... " >&6; }
21843if ${ac_cv_path_LDD+:} false; then :
21844  $as_echo_n "(cached) " >&6
21845else
21846  case $LDD in
21847  [\\/]* | ?:[\\/]*)
21848  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21849  ;;
21850  *)
21851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21852for as_dir in $PATH
21853do
21854  IFS=$as_save_IFS
21855  test -z "$as_dir" && as_dir=.
21856    for ac_exec_ext in '' $ac_executable_extensions; do
21857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21858    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21860    break 2
21861  fi
21862done
21863  done
21864IFS=$as_save_IFS
21865
21866  ;;
21867esac
21868fi
21869LDD=$ac_cv_path_LDD
21870if test -n "$LDD"; then
21871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21872$as_echo "$LDD" >&6; }
21873else
21874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21875$as_echo "no" >&6; }
21876fi
21877
21878
21879  test -n "$LDD" && break
21880done
21881
21882  else
21883    # The variable is set, but is it from the command line or the environment?
21884
21885    # Try to remove the string !LDD! from our list.
21886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21888      # If it failed, the variable was not from the command line. Ignore it,
21889      # but warn the user (except for BASH, which is always set by the calling BASH).
21890      if test "xLDD" != xBASH; then
21891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21892$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21893      fi
21894      # Try to locate tool using the code snippet
21895      for ac_prog in ldd
21896do
21897  # Extract the first word of "$ac_prog", so it can be a program name with args.
21898set dummy $ac_prog; ac_word=$2
21899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21900$as_echo_n "checking for $ac_word... " >&6; }
21901if ${ac_cv_path_LDD+:} false; then :
21902  $as_echo_n "(cached) " >&6
21903else
21904  case $LDD in
21905  [\\/]* | ?:[\\/]*)
21906  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21907  ;;
21908  *)
21909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21910for as_dir in $PATH
21911do
21912  IFS=$as_save_IFS
21913  test -z "$as_dir" && as_dir=.
21914    for ac_exec_ext in '' $ac_executable_extensions; do
21915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21916    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21918    break 2
21919  fi
21920done
21921  done
21922IFS=$as_save_IFS
21923
21924  ;;
21925esac
21926fi
21927LDD=$ac_cv_path_LDD
21928if test -n "$LDD"; then
21929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21930$as_echo "$LDD" >&6; }
21931else
21932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21933$as_echo "no" >&6; }
21934fi
21935
21936
21937  test -n "$LDD" && break
21938done
21939
21940    else
21941      # If it succeeded, then it was overridden by the user. We will use it
21942      # for the tool.
21943
21944      # First remove it from the list of overridden variables, so we can test
21945      # for unknown variables in the end.
21946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21947
21948      # Check if we try to supply an empty value
21949      if test "x$LDD" = x; then
21950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21951$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21953$as_echo_n "checking for LDD... " >&6; }
21954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21955$as_echo "disabled" >&6; }
21956      else
21957        # Check if the provided tool contains a complete path.
21958        tool_specified="$LDD"
21959        tool_basename="${tool_specified##*/}"
21960        if test "x$tool_basename" = "x$tool_specified"; then
21961          # A command without a complete path is provided, search $PATH.
21962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21963$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21964          # Extract the first word of "$tool_basename", so it can be a program name with args.
21965set dummy $tool_basename; ac_word=$2
21966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21967$as_echo_n "checking for $ac_word... " >&6; }
21968if ${ac_cv_path_LDD+:} false; then :
21969  $as_echo_n "(cached) " >&6
21970else
21971  case $LDD in
21972  [\\/]* | ?:[\\/]*)
21973  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21974  ;;
21975  *)
21976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21977for as_dir in $PATH
21978do
21979  IFS=$as_save_IFS
21980  test -z "$as_dir" && as_dir=.
21981    for ac_exec_ext in '' $ac_executable_extensions; do
21982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21983    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21985    break 2
21986  fi
21987done
21988  done
21989IFS=$as_save_IFS
21990
21991  ;;
21992esac
21993fi
21994LDD=$ac_cv_path_LDD
21995if test -n "$LDD"; then
21996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21997$as_echo "$LDD" >&6; }
21998else
21999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22000$as_echo "no" >&6; }
22001fi
22002
22003
22004          if test "x$LDD" = x; then
22005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22006          fi
22007        else
22008          # Otherwise we believe it is a complete path. Use it as it is.
22009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
22010$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
22011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
22012$as_echo_n "checking for LDD... " >&6; }
22013          if test ! -x "$tool_specified"; then
22014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22015$as_echo "not found" >&6; }
22016            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
22017          fi
22018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22019$as_echo "$tool_specified" >&6; }
22020        fi
22021      fi
22022    fi
22023
22024  fi
22025
22026
22027  if test "x$LDD" = "x"; then
22028    # List shared lib dependencies is used for
22029    # debug output and checking for forbidden dependencies.
22030    # We can build without it.
22031    LDD="true"
22032  fi
22033
22034
22035  # Publish this variable in the help.
22036
22037
22038  if [ -z "${OTOOL+x}" ]; then
22039    # The variable is not set by user, try to locate tool using the code snippet
22040    for ac_prog in otool
22041do
22042  # Extract the first word of "$ac_prog", so it can be a program name with args.
22043set dummy $ac_prog; ac_word=$2
22044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22045$as_echo_n "checking for $ac_word... " >&6; }
22046if ${ac_cv_path_OTOOL+:} false; then :
22047  $as_echo_n "(cached) " >&6
22048else
22049  case $OTOOL in
22050  [\\/]* | ?:[\\/]*)
22051  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22052  ;;
22053  *)
22054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22055for as_dir in $PATH
22056do
22057  IFS=$as_save_IFS
22058  test -z "$as_dir" && as_dir=.
22059    for ac_exec_ext in '' $ac_executable_extensions; do
22060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22061    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22063    break 2
22064  fi
22065done
22066  done
22067IFS=$as_save_IFS
22068
22069  ;;
22070esac
22071fi
22072OTOOL=$ac_cv_path_OTOOL
22073if test -n "$OTOOL"; then
22074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22075$as_echo "$OTOOL" >&6; }
22076else
22077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22078$as_echo "no" >&6; }
22079fi
22080
22081
22082  test -n "$OTOOL" && break
22083done
22084
22085  else
22086    # The variable is set, but is it from the command line or the environment?
22087
22088    # Try to remove the string !OTOOL! from our list.
22089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
22090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22091      # If it failed, the variable was not from the command line. Ignore it,
22092      # but warn the user (except for BASH, which is always set by the calling BASH).
22093      if test "xOTOOL" != xBASH; then
22094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
22095$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
22096      fi
22097      # Try to locate tool using the code snippet
22098      for ac_prog in otool
22099do
22100  # Extract the first word of "$ac_prog", so it can be a program name with args.
22101set dummy $ac_prog; ac_word=$2
22102{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22103$as_echo_n "checking for $ac_word... " >&6; }
22104if ${ac_cv_path_OTOOL+:} false; then :
22105  $as_echo_n "(cached) " >&6
22106else
22107  case $OTOOL in
22108  [\\/]* | ?:[\\/]*)
22109  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22110  ;;
22111  *)
22112  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22113for as_dir in $PATH
22114do
22115  IFS=$as_save_IFS
22116  test -z "$as_dir" && as_dir=.
22117    for ac_exec_ext in '' $ac_executable_extensions; do
22118  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22119    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22120    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22121    break 2
22122  fi
22123done
22124  done
22125IFS=$as_save_IFS
22126
22127  ;;
22128esac
22129fi
22130OTOOL=$ac_cv_path_OTOOL
22131if test -n "$OTOOL"; then
22132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22133$as_echo "$OTOOL" >&6; }
22134else
22135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22136$as_echo "no" >&6; }
22137fi
22138
22139
22140  test -n "$OTOOL" && break
22141done
22142
22143    else
22144      # If it succeeded, then it was overridden by the user. We will use it
22145      # for the tool.
22146
22147      # First remove it from the list of overridden variables, so we can test
22148      # for unknown variables in the end.
22149      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22150
22151      # Check if we try to supply an empty value
22152      if test "x$OTOOL" = x; then
22153        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
22154$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
22155        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22156$as_echo_n "checking for OTOOL... " >&6; }
22157        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22158$as_echo "disabled" >&6; }
22159      else
22160        # Check if the provided tool contains a complete path.
22161        tool_specified="$OTOOL"
22162        tool_basename="${tool_specified##*/}"
22163        if test "x$tool_basename" = "x$tool_specified"; then
22164          # A command without a complete path is provided, search $PATH.
22165          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
22166$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
22167          # Extract the first word of "$tool_basename", so it can be a program name with args.
22168set dummy $tool_basename; ac_word=$2
22169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22170$as_echo_n "checking for $ac_word... " >&6; }
22171if ${ac_cv_path_OTOOL+:} false; then :
22172  $as_echo_n "(cached) " >&6
22173else
22174  case $OTOOL in
22175  [\\/]* | ?:[\\/]*)
22176  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
22177  ;;
22178  *)
22179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22180for as_dir in $PATH
22181do
22182  IFS=$as_save_IFS
22183  test -z "$as_dir" && as_dir=.
22184    for ac_exec_ext in '' $ac_executable_extensions; do
22185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22186    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
22187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22188    break 2
22189  fi
22190done
22191  done
22192IFS=$as_save_IFS
22193
22194  ;;
22195esac
22196fi
22197OTOOL=$ac_cv_path_OTOOL
22198if test -n "$OTOOL"; then
22199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
22200$as_echo "$OTOOL" >&6; }
22201else
22202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22203$as_echo "no" >&6; }
22204fi
22205
22206
22207          if test "x$OTOOL" = x; then
22208            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22209          fi
22210        else
22211          # Otherwise we believe it is a complete path. Use it as it is.
22212          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
22213$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
22214          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
22215$as_echo_n "checking for OTOOL... " >&6; }
22216          if test ! -x "$tool_specified"; then
22217            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22218$as_echo "not found" >&6; }
22219            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
22220          fi
22221          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22222$as_echo "$tool_specified" >&6; }
22223        fi
22224      fi
22225    fi
22226
22227  fi
22228
22229
22230  if test "x$OTOOL" = "x"; then
22231    OTOOL="true"
22232  fi
22233
22234
22235  # Publish this variable in the help.
22236
22237
22238  if [ -z "${READELF+x}" ]; then
22239    # The variable is not set by user, try to locate tool using the code snippet
22240    for ac_prog in greadelf readelf
22241do
22242  # Extract the first word of "$ac_prog", so it can be a program name with args.
22243set dummy $ac_prog; ac_word=$2
22244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22245$as_echo_n "checking for $ac_word... " >&6; }
22246if ${ac_cv_path_READELF+:} false; then :
22247  $as_echo_n "(cached) " >&6
22248else
22249  case $READELF in
22250  [\\/]* | ?:[\\/]*)
22251  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22252  ;;
22253  *)
22254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22255for as_dir in $PATH
22256do
22257  IFS=$as_save_IFS
22258  test -z "$as_dir" && as_dir=.
22259    for ac_exec_ext in '' $ac_executable_extensions; do
22260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22261    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22263    break 2
22264  fi
22265done
22266  done
22267IFS=$as_save_IFS
22268
22269  ;;
22270esac
22271fi
22272READELF=$ac_cv_path_READELF
22273if test -n "$READELF"; then
22274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22275$as_echo "$READELF" >&6; }
22276else
22277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22278$as_echo "no" >&6; }
22279fi
22280
22281
22282  test -n "$READELF" && break
22283done
22284
22285  else
22286    # The variable is set, but is it from the command line or the environment?
22287
22288    # Try to remove the string !READELF! from our list.
22289    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22290    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22291      # If it failed, the variable was not from the command line. Ignore it,
22292      # but warn the user (except for BASH, which is always set by the calling BASH).
22293      if test "xREADELF" != xBASH; then
22294        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22295$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22296      fi
22297      # Try to locate tool using the code snippet
22298      for ac_prog in greadelf readelf
22299do
22300  # Extract the first word of "$ac_prog", so it can be a program name with args.
22301set dummy $ac_prog; ac_word=$2
22302{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22303$as_echo_n "checking for $ac_word... " >&6; }
22304if ${ac_cv_path_READELF+:} false; then :
22305  $as_echo_n "(cached) " >&6
22306else
22307  case $READELF in
22308  [\\/]* | ?:[\\/]*)
22309  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22310  ;;
22311  *)
22312  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22313for as_dir in $PATH
22314do
22315  IFS=$as_save_IFS
22316  test -z "$as_dir" && as_dir=.
22317    for ac_exec_ext in '' $ac_executable_extensions; do
22318  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22319    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22321    break 2
22322  fi
22323done
22324  done
22325IFS=$as_save_IFS
22326
22327  ;;
22328esac
22329fi
22330READELF=$ac_cv_path_READELF
22331if test -n "$READELF"; then
22332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22333$as_echo "$READELF" >&6; }
22334else
22335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22336$as_echo "no" >&6; }
22337fi
22338
22339
22340  test -n "$READELF" && break
22341done
22342
22343    else
22344      # If it succeeded, then it was overridden by the user. We will use it
22345      # for the tool.
22346
22347      # First remove it from the list of overridden variables, so we can test
22348      # for unknown variables in the end.
22349      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22350
22351      # Check if we try to supply an empty value
22352      if test "x$READELF" = x; then
22353        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22354$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22355        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22356$as_echo_n "checking for READELF... " >&6; }
22357        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22358$as_echo "disabled" >&6; }
22359      else
22360        # Check if the provided tool contains a complete path.
22361        tool_specified="$READELF"
22362        tool_basename="${tool_specified##*/}"
22363        if test "x$tool_basename" = "x$tool_specified"; then
22364          # A command without a complete path is provided, search $PATH.
22365          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22366$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22367          # Extract the first word of "$tool_basename", so it can be a program name with args.
22368set dummy $tool_basename; ac_word=$2
22369{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22370$as_echo_n "checking for $ac_word... " >&6; }
22371if ${ac_cv_path_READELF+:} false; then :
22372  $as_echo_n "(cached) " >&6
22373else
22374  case $READELF in
22375  [\\/]* | ?:[\\/]*)
22376  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22377  ;;
22378  *)
22379  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22380for as_dir in $PATH
22381do
22382  IFS=$as_save_IFS
22383  test -z "$as_dir" && as_dir=.
22384    for ac_exec_ext in '' $ac_executable_extensions; do
22385  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22386    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22387    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22388    break 2
22389  fi
22390done
22391  done
22392IFS=$as_save_IFS
22393
22394  ;;
22395esac
22396fi
22397READELF=$ac_cv_path_READELF
22398if test -n "$READELF"; then
22399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22400$as_echo "$READELF" >&6; }
22401else
22402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22403$as_echo "no" >&6; }
22404fi
22405
22406
22407          if test "x$READELF" = x; then
22408            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22409          fi
22410        else
22411          # Otherwise we believe it is a complete path. Use it as it is.
22412          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22413$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22414          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22415$as_echo_n "checking for READELF... " >&6; }
22416          if test ! -x "$tool_specified"; then
22417            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22418$as_echo "not found" >&6; }
22419            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22420          fi
22421          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22422$as_echo "$tool_specified" >&6; }
22423        fi
22424      fi
22425    fi
22426
22427  fi
22428
22429
22430
22431
22432  # Publish this variable in the help.
22433
22434
22435  if [ -z "${HG+x}" ]; then
22436    # The variable is not set by user, try to locate tool using the code snippet
22437    for ac_prog in hg
22438do
22439  # Extract the first word of "$ac_prog", so it can be a program name with args.
22440set dummy $ac_prog; ac_word=$2
22441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22442$as_echo_n "checking for $ac_word... " >&6; }
22443if ${ac_cv_path_HG+:} false; then :
22444  $as_echo_n "(cached) " >&6
22445else
22446  case $HG in
22447  [\\/]* | ?:[\\/]*)
22448  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22449  ;;
22450  *)
22451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22452for as_dir in $PATH
22453do
22454  IFS=$as_save_IFS
22455  test -z "$as_dir" && as_dir=.
22456    for ac_exec_ext in '' $ac_executable_extensions; do
22457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22458    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22460    break 2
22461  fi
22462done
22463  done
22464IFS=$as_save_IFS
22465
22466  ;;
22467esac
22468fi
22469HG=$ac_cv_path_HG
22470if test -n "$HG"; then
22471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22472$as_echo "$HG" >&6; }
22473else
22474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22475$as_echo "no" >&6; }
22476fi
22477
22478
22479  test -n "$HG" && break
22480done
22481
22482  else
22483    # The variable is set, but is it from the command line or the environment?
22484
22485    # Try to remove the string !HG! from our list.
22486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22488      # If it failed, the variable was not from the command line. Ignore it,
22489      # but warn the user (except for BASH, which is always set by the calling BASH).
22490      if test "xHG" != xBASH; then
22491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22492$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22493      fi
22494      # Try to locate tool using the code snippet
22495      for ac_prog in hg
22496do
22497  # Extract the first word of "$ac_prog", so it can be a program name with args.
22498set dummy $ac_prog; ac_word=$2
22499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22500$as_echo_n "checking for $ac_word... " >&6; }
22501if ${ac_cv_path_HG+:} false; then :
22502  $as_echo_n "(cached) " >&6
22503else
22504  case $HG in
22505  [\\/]* | ?:[\\/]*)
22506  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22507  ;;
22508  *)
22509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22510for as_dir in $PATH
22511do
22512  IFS=$as_save_IFS
22513  test -z "$as_dir" && as_dir=.
22514    for ac_exec_ext in '' $ac_executable_extensions; do
22515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22516    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22518    break 2
22519  fi
22520done
22521  done
22522IFS=$as_save_IFS
22523
22524  ;;
22525esac
22526fi
22527HG=$ac_cv_path_HG
22528if test -n "$HG"; then
22529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22530$as_echo "$HG" >&6; }
22531else
22532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22533$as_echo "no" >&6; }
22534fi
22535
22536
22537  test -n "$HG" && break
22538done
22539
22540    else
22541      # If it succeeded, then it was overridden by the user. We will use it
22542      # for the tool.
22543
22544      # First remove it from the list of overridden variables, so we can test
22545      # for unknown variables in the end.
22546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22547
22548      # Check if we try to supply an empty value
22549      if test "x$HG" = x; then
22550        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22551$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22553$as_echo_n "checking for HG... " >&6; }
22554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22555$as_echo "disabled" >&6; }
22556      else
22557        # Check if the provided tool contains a complete path.
22558        tool_specified="$HG"
22559        tool_basename="${tool_specified##*/}"
22560        if test "x$tool_basename" = "x$tool_specified"; then
22561          # A command without a complete path is provided, search $PATH.
22562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22563$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22564          # Extract the first word of "$tool_basename", so it can be a program name with args.
22565set dummy $tool_basename; ac_word=$2
22566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22567$as_echo_n "checking for $ac_word... " >&6; }
22568if ${ac_cv_path_HG+:} false; then :
22569  $as_echo_n "(cached) " >&6
22570else
22571  case $HG in
22572  [\\/]* | ?:[\\/]*)
22573  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22574  ;;
22575  *)
22576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22577for as_dir in $PATH
22578do
22579  IFS=$as_save_IFS
22580  test -z "$as_dir" && as_dir=.
22581    for ac_exec_ext in '' $ac_executable_extensions; do
22582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22583    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22585    break 2
22586  fi
22587done
22588  done
22589IFS=$as_save_IFS
22590
22591  ;;
22592esac
22593fi
22594HG=$ac_cv_path_HG
22595if test -n "$HG"; then
22596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22597$as_echo "$HG" >&6; }
22598else
22599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22600$as_echo "no" >&6; }
22601fi
22602
22603
22604          if test "x$HG" = x; then
22605            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22606          fi
22607        else
22608          # Otherwise we believe it is a complete path. Use it as it is.
22609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22610$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22611          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22612$as_echo_n "checking for HG... " >&6; }
22613          if test ! -x "$tool_specified"; then
22614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22615$as_echo "not found" >&6; }
22616            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22617          fi
22618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22619$as_echo "$tool_specified" >&6; }
22620        fi
22621      fi
22622    fi
22623
22624  fi
22625
22626
22627
22628
22629  # Publish this variable in the help.
22630
22631
22632  if [ -z "${STAT+x}" ]; then
22633    # The variable is not set by user, try to locate tool using the code snippet
22634    for ac_prog in stat
22635do
22636  # Extract the first word of "$ac_prog", so it can be a program name with args.
22637set dummy $ac_prog; ac_word=$2
22638{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22639$as_echo_n "checking for $ac_word... " >&6; }
22640if ${ac_cv_path_STAT+:} false; then :
22641  $as_echo_n "(cached) " >&6
22642else
22643  case $STAT in
22644  [\\/]* | ?:[\\/]*)
22645  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22646  ;;
22647  *)
22648  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22649for as_dir in $PATH
22650do
22651  IFS=$as_save_IFS
22652  test -z "$as_dir" && as_dir=.
22653    for ac_exec_ext in '' $ac_executable_extensions; do
22654  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22655    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22656    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22657    break 2
22658  fi
22659done
22660  done
22661IFS=$as_save_IFS
22662
22663  ;;
22664esac
22665fi
22666STAT=$ac_cv_path_STAT
22667if test -n "$STAT"; then
22668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22669$as_echo "$STAT" >&6; }
22670else
22671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22672$as_echo "no" >&6; }
22673fi
22674
22675
22676  test -n "$STAT" && break
22677done
22678
22679  else
22680    # The variable is set, but is it from the command line or the environment?
22681
22682    # Try to remove the string !STAT! from our list.
22683    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22684    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22685      # If it failed, the variable was not from the command line. Ignore it,
22686      # but warn the user (except for BASH, which is always set by the calling BASH).
22687      if test "xSTAT" != xBASH; then
22688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22689$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22690      fi
22691      # Try to locate tool using the code snippet
22692      for ac_prog in stat
22693do
22694  # Extract the first word of "$ac_prog", so it can be a program name with args.
22695set dummy $ac_prog; ac_word=$2
22696{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22697$as_echo_n "checking for $ac_word... " >&6; }
22698if ${ac_cv_path_STAT+:} false; then :
22699  $as_echo_n "(cached) " >&6
22700else
22701  case $STAT in
22702  [\\/]* | ?:[\\/]*)
22703  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22704  ;;
22705  *)
22706  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22707for as_dir in $PATH
22708do
22709  IFS=$as_save_IFS
22710  test -z "$as_dir" && as_dir=.
22711    for ac_exec_ext in '' $ac_executable_extensions; do
22712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22713    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22715    break 2
22716  fi
22717done
22718  done
22719IFS=$as_save_IFS
22720
22721  ;;
22722esac
22723fi
22724STAT=$ac_cv_path_STAT
22725if test -n "$STAT"; then
22726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22727$as_echo "$STAT" >&6; }
22728else
22729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22730$as_echo "no" >&6; }
22731fi
22732
22733
22734  test -n "$STAT" && break
22735done
22736
22737    else
22738      # If it succeeded, then it was overridden by the user. We will use it
22739      # for the tool.
22740
22741      # First remove it from the list of overridden variables, so we can test
22742      # for unknown variables in the end.
22743      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22744
22745      # Check if we try to supply an empty value
22746      if test "x$STAT" = x; then
22747        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22748$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22749        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22750$as_echo_n "checking for STAT... " >&6; }
22751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22752$as_echo "disabled" >&6; }
22753      else
22754        # Check if the provided tool contains a complete path.
22755        tool_specified="$STAT"
22756        tool_basename="${tool_specified##*/}"
22757        if test "x$tool_basename" = "x$tool_specified"; then
22758          # A command without a complete path is provided, search $PATH.
22759          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22760$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22761          # Extract the first word of "$tool_basename", so it can be a program name with args.
22762set dummy $tool_basename; ac_word=$2
22763{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22764$as_echo_n "checking for $ac_word... " >&6; }
22765if ${ac_cv_path_STAT+:} false; then :
22766  $as_echo_n "(cached) " >&6
22767else
22768  case $STAT in
22769  [\\/]* | ?:[\\/]*)
22770  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22771  ;;
22772  *)
22773  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22774for as_dir in $PATH
22775do
22776  IFS=$as_save_IFS
22777  test -z "$as_dir" && as_dir=.
22778    for ac_exec_ext in '' $ac_executable_extensions; do
22779  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22780    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22781    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22782    break 2
22783  fi
22784done
22785  done
22786IFS=$as_save_IFS
22787
22788  ;;
22789esac
22790fi
22791STAT=$ac_cv_path_STAT
22792if test -n "$STAT"; then
22793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22794$as_echo "$STAT" >&6; }
22795else
22796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22797$as_echo "no" >&6; }
22798fi
22799
22800
22801          if test "x$STAT" = x; then
22802            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22803          fi
22804        else
22805          # Otherwise we believe it is a complete path. Use it as it is.
22806          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22807$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22808          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22809$as_echo_n "checking for STAT... " >&6; }
22810          if test ! -x "$tool_specified"; then
22811            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22812$as_echo "not found" >&6; }
22813            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22814          fi
22815          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22816$as_echo "$tool_specified" >&6; }
22817        fi
22818      fi
22819    fi
22820
22821  fi
22822
22823
22824
22825
22826  # Publish this variable in the help.
22827
22828
22829  if [ -z "${TIME+x}" ]; then
22830    # The variable is not set by user, try to locate tool using the code snippet
22831    for ac_prog in time
22832do
22833  # Extract the first word of "$ac_prog", so it can be a program name with args.
22834set dummy $ac_prog; ac_word=$2
22835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22836$as_echo_n "checking for $ac_word... " >&6; }
22837if ${ac_cv_path_TIME+:} false; then :
22838  $as_echo_n "(cached) " >&6
22839else
22840  case $TIME in
22841  [\\/]* | ?:[\\/]*)
22842  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22843  ;;
22844  *)
22845  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22846for as_dir in $PATH
22847do
22848  IFS=$as_save_IFS
22849  test -z "$as_dir" && as_dir=.
22850    for ac_exec_ext in '' $ac_executable_extensions; do
22851  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22852    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22853    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22854    break 2
22855  fi
22856done
22857  done
22858IFS=$as_save_IFS
22859
22860  ;;
22861esac
22862fi
22863TIME=$ac_cv_path_TIME
22864if test -n "$TIME"; then
22865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22866$as_echo "$TIME" >&6; }
22867else
22868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22869$as_echo "no" >&6; }
22870fi
22871
22872
22873  test -n "$TIME" && break
22874done
22875
22876  else
22877    # The variable is set, but is it from the command line or the environment?
22878
22879    # Try to remove the string !TIME! from our list.
22880    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22881    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22882      # If it failed, the variable was not from the command line. Ignore it,
22883      # but warn the user (except for BASH, which is always set by the calling BASH).
22884      if test "xTIME" != xBASH; then
22885        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22886$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22887      fi
22888      # Try to locate tool using the code snippet
22889      for ac_prog in time
22890do
22891  # Extract the first word of "$ac_prog", so it can be a program name with args.
22892set dummy $ac_prog; ac_word=$2
22893{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22894$as_echo_n "checking for $ac_word... " >&6; }
22895if ${ac_cv_path_TIME+:} false; then :
22896  $as_echo_n "(cached) " >&6
22897else
22898  case $TIME in
22899  [\\/]* | ?:[\\/]*)
22900  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22901  ;;
22902  *)
22903  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22904for as_dir in $PATH
22905do
22906  IFS=$as_save_IFS
22907  test -z "$as_dir" && as_dir=.
22908    for ac_exec_ext in '' $ac_executable_extensions; do
22909  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22910    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22911    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22912    break 2
22913  fi
22914done
22915  done
22916IFS=$as_save_IFS
22917
22918  ;;
22919esac
22920fi
22921TIME=$ac_cv_path_TIME
22922if test -n "$TIME"; then
22923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22924$as_echo "$TIME" >&6; }
22925else
22926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22927$as_echo "no" >&6; }
22928fi
22929
22930
22931  test -n "$TIME" && break
22932done
22933
22934    else
22935      # If it succeeded, then it was overridden by the user. We will use it
22936      # for the tool.
22937
22938      # First remove it from the list of overridden variables, so we can test
22939      # for unknown variables in the end.
22940      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22941
22942      # Check if we try to supply an empty value
22943      if test "x$TIME" = x; then
22944        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22945$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22946        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22947$as_echo_n "checking for TIME... " >&6; }
22948        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22949$as_echo "disabled" >&6; }
22950      else
22951        # Check if the provided tool contains a complete path.
22952        tool_specified="$TIME"
22953        tool_basename="${tool_specified##*/}"
22954        if test "x$tool_basename" = "x$tool_specified"; then
22955          # A command without a complete path is provided, search $PATH.
22956          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22957$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22958          # Extract the first word of "$tool_basename", so it can be a program name with args.
22959set dummy $tool_basename; ac_word=$2
22960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22961$as_echo_n "checking for $ac_word... " >&6; }
22962if ${ac_cv_path_TIME+:} false; then :
22963  $as_echo_n "(cached) " >&6
22964else
22965  case $TIME in
22966  [\\/]* | ?:[\\/]*)
22967  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22968  ;;
22969  *)
22970  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22971for as_dir in $PATH
22972do
22973  IFS=$as_save_IFS
22974  test -z "$as_dir" && as_dir=.
22975    for ac_exec_ext in '' $ac_executable_extensions; do
22976  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22977    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22978    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22979    break 2
22980  fi
22981done
22982  done
22983IFS=$as_save_IFS
22984
22985  ;;
22986esac
22987fi
22988TIME=$ac_cv_path_TIME
22989if test -n "$TIME"; then
22990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22991$as_echo "$TIME" >&6; }
22992else
22993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22994$as_echo "no" >&6; }
22995fi
22996
22997
22998          if test "x$TIME" = x; then
22999            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23000          fi
23001        else
23002          # Otherwise we believe it is a complete path. Use it as it is.
23003          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
23004$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
23005          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
23006$as_echo_n "checking for TIME... " >&6; }
23007          if test ! -x "$tool_specified"; then
23008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23009$as_echo "not found" >&6; }
23010            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
23011          fi
23012          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23013$as_echo "$tool_specified" >&6; }
23014        fi
23015      fi
23016    fi
23017
23018  fi
23019
23020
23021  # Dtrace is usually found in /usr/sbin on Solaris, but that directory may not
23022  # be in the user path.
23023
23024
23025  # Publish this variable in the help.
23026
23027
23028  if [ -z "${DTRACE+x}" ]; then
23029    # The variable is not set by user, try to locate tool using the code snippet
23030    for ac_prog in dtrace
23031do
23032  # Extract the first word of "$ac_prog", so it can be a program name with args.
23033set dummy $ac_prog; ac_word=$2
23034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23035$as_echo_n "checking for $ac_word... " >&6; }
23036if ${ac_cv_path_DTRACE+:} false; then :
23037  $as_echo_n "(cached) " >&6
23038else
23039  case $DTRACE in
23040  [\\/]* | ?:[\\/]*)
23041  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23042  ;;
23043  *)
23044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23045as_dummy="$PATH:/usr/sbin"
23046for as_dir in $as_dummy
23047do
23048  IFS=$as_save_IFS
23049  test -z "$as_dir" && as_dir=.
23050    for ac_exec_ext in '' $ac_executable_extensions; do
23051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23052    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23054    break 2
23055  fi
23056done
23057  done
23058IFS=$as_save_IFS
23059
23060  ;;
23061esac
23062fi
23063DTRACE=$ac_cv_path_DTRACE
23064if test -n "$DTRACE"; then
23065  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23066$as_echo "$DTRACE" >&6; }
23067else
23068  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23069$as_echo "no" >&6; }
23070fi
23071
23072
23073  test -n "$DTRACE" && break
23074done
23075
23076  else
23077    # The variable is set, but is it from the command line or the environment?
23078
23079    # Try to remove the string !DTRACE! from our list.
23080    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
23081    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23082      # If it failed, the variable was not from the command line. Ignore it,
23083      # but warn the user (except for BASH, which is always set by the calling BASH).
23084      if test "xDTRACE" != xBASH; then
23085        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
23086$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
23087      fi
23088      # Try to locate tool using the code snippet
23089      for ac_prog in dtrace
23090do
23091  # Extract the first word of "$ac_prog", so it can be a program name with args.
23092set dummy $ac_prog; ac_word=$2
23093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23094$as_echo_n "checking for $ac_word... " >&6; }
23095if ${ac_cv_path_DTRACE+:} false; then :
23096  $as_echo_n "(cached) " >&6
23097else
23098  case $DTRACE in
23099  [\\/]* | ?:[\\/]*)
23100  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23101  ;;
23102  *)
23103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23104as_dummy="$PATH:/usr/sbin"
23105for as_dir in $as_dummy
23106do
23107  IFS=$as_save_IFS
23108  test -z "$as_dir" && as_dir=.
23109    for ac_exec_ext in '' $ac_executable_extensions; do
23110  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23111    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23112    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23113    break 2
23114  fi
23115done
23116  done
23117IFS=$as_save_IFS
23118
23119  ;;
23120esac
23121fi
23122DTRACE=$ac_cv_path_DTRACE
23123if test -n "$DTRACE"; then
23124  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23125$as_echo "$DTRACE" >&6; }
23126else
23127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23128$as_echo "no" >&6; }
23129fi
23130
23131
23132  test -n "$DTRACE" && break
23133done
23134
23135    else
23136      # If it succeeded, then it was overridden by the user. We will use it
23137      # for the tool.
23138
23139      # First remove it from the list of overridden variables, so we can test
23140      # for unknown variables in the end.
23141      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23142
23143      # Check if we try to supply an empty value
23144      if test "x$DTRACE" = x; then
23145        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
23146$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
23147        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23148$as_echo_n "checking for DTRACE... " >&6; }
23149        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23150$as_echo "disabled" >&6; }
23151      else
23152        # Check if the provided tool contains a complete path.
23153        tool_specified="$DTRACE"
23154        tool_basename="${tool_specified##*/}"
23155        if test "x$tool_basename" = "x$tool_specified"; then
23156          # A command without a complete path is provided, search $PATH.
23157          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
23158$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
23159          # Extract the first word of "$tool_basename", so it can be a program name with args.
23160set dummy $tool_basename; ac_word=$2
23161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23162$as_echo_n "checking for $ac_word... " >&6; }
23163if ${ac_cv_path_DTRACE+:} false; then :
23164  $as_echo_n "(cached) " >&6
23165else
23166  case $DTRACE in
23167  [\\/]* | ?:[\\/]*)
23168  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
23169  ;;
23170  *)
23171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23172for as_dir in $PATH
23173do
23174  IFS=$as_save_IFS
23175  test -z "$as_dir" && as_dir=.
23176    for ac_exec_ext in '' $ac_executable_extensions; do
23177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23178    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
23179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23180    break 2
23181  fi
23182done
23183  done
23184IFS=$as_save_IFS
23185
23186  ;;
23187esac
23188fi
23189DTRACE=$ac_cv_path_DTRACE
23190if test -n "$DTRACE"; then
23191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
23192$as_echo "$DTRACE" >&6; }
23193else
23194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23195$as_echo "no" >&6; }
23196fi
23197
23198
23199          if test "x$DTRACE" = x; then
23200            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23201          fi
23202        else
23203          # Otherwise we believe it is a complete path. Use it as it is.
23204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
23205$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
23206          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
23207$as_echo_n "checking for DTRACE... " >&6; }
23208          if test ! -x "$tool_specified"; then
23209            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23210$as_echo "not found" >&6; }
23211            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
23212          fi
23213          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23214$as_echo "$tool_specified" >&6; }
23215        fi
23216      fi
23217    fi
23218
23219  fi
23220
23221
23222
23223
23224  # Publish this variable in the help.
23225
23226
23227  if [ -z "${PATCH+x}" ]; then
23228    # The variable is not set by user, try to locate tool using the code snippet
23229    for ac_prog in gpatch patch
23230do
23231  # Extract the first word of "$ac_prog", so it can be a program name with args.
23232set dummy $ac_prog; ac_word=$2
23233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23234$as_echo_n "checking for $ac_word... " >&6; }
23235if ${ac_cv_path_PATCH+:} false; then :
23236  $as_echo_n "(cached) " >&6
23237else
23238  case $PATCH in
23239  [\\/]* | ?:[\\/]*)
23240  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23241  ;;
23242  *)
23243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23244for as_dir in $PATH
23245do
23246  IFS=$as_save_IFS
23247  test -z "$as_dir" && as_dir=.
23248    for ac_exec_ext in '' $ac_executable_extensions; do
23249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23250    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23252    break 2
23253  fi
23254done
23255  done
23256IFS=$as_save_IFS
23257
23258  ;;
23259esac
23260fi
23261PATCH=$ac_cv_path_PATCH
23262if test -n "$PATCH"; then
23263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23264$as_echo "$PATCH" >&6; }
23265else
23266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23267$as_echo "no" >&6; }
23268fi
23269
23270
23271  test -n "$PATCH" && break
23272done
23273
23274  else
23275    # The variable is set, but is it from the command line or the environment?
23276
23277    # Try to remove the string !PATCH! from our list.
23278    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23279    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23280      # If it failed, the variable was not from the command line. Ignore it,
23281      # but warn the user (except for BASH, which is always set by the calling BASH).
23282      if test "xPATCH" != xBASH; then
23283        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23284$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23285      fi
23286      # Try to locate tool using the code snippet
23287      for ac_prog in gpatch patch
23288do
23289  # Extract the first word of "$ac_prog", so it can be a program name with args.
23290set dummy $ac_prog; ac_word=$2
23291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23292$as_echo_n "checking for $ac_word... " >&6; }
23293if ${ac_cv_path_PATCH+:} false; then :
23294  $as_echo_n "(cached) " >&6
23295else
23296  case $PATCH in
23297  [\\/]* | ?:[\\/]*)
23298  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23299  ;;
23300  *)
23301  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23302for as_dir in $PATH
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_PATCH="$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
23319PATCH=$ac_cv_path_PATCH
23320if test -n "$PATCH"; then
23321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23322$as_echo "$PATCH" >&6; }
23323else
23324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23325$as_echo "no" >&6; }
23326fi
23327
23328
23329  test -n "$PATCH" && break
23330done
23331
23332    else
23333      # If it succeeded, then it was overridden by the user. We will use it
23334      # for the tool.
23335
23336      # First remove it from the list of overridden variables, so we can test
23337      # for unknown variables in the end.
23338      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23339
23340      # Check if we try to supply an empty value
23341      if test "x$PATCH" = x; then
23342        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23343$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23344        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23345$as_echo_n "checking for PATCH... " >&6; }
23346        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23347$as_echo "disabled" >&6; }
23348      else
23349        # Check if the provided tool contains a complete path.
23350        tool_specified="$PATCH"
23351        tool_basename="${tool_specified##*/}"
23352        if test "x$tool_basename" = "x$tool_specified"; then
23353          # A command without a complete path is provided, search $PATH.
23354          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23355$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23356          # Extract the first word of "$tool_basename", so it can be a program name with args.
23357set dummy $tool_basename; ac_word=$2
23358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23359$as_echo_n "checking for $ac_word... " >&6; }
23360if ${ac_cv_path_PATCH+:} false; then :
23361  $as_echo_n "(cached) " >&6
23362else
23363  case $PATCH in
23364  [\\/]* | ?:[\\/]*)
23365  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23366  ;;
23367  *)
23368  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23369for as_dir in $PATH
23370do
23371  IFS=$as_save_IFS
23372  test -z "$as_dir" && as_dir=.
23373    for ac_exec_ext in '' $ac_executable_extensions; do
23374  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23375    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23376    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23377    break 2
23378  fi
23379done
23380  done
23381IFS=$as_save_IFS
23382
23383  ;;
23384esac
23385fi
23386PATCH=$ac_cv_path_PATCH
23387if test -n "$PATCH"; then
23388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23389$as_echo "$PATCH" >&6; }
23390else
23391  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23392$as_echo "no" >&6; }
23393fi
23394
23395
23396          if test "x$PATCH" = x; then
23397            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23398          fi
23399        else
23400          # Otherwise we believe it is a complete path. Use it as it is.
23401          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23402$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23403          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23404$as_echo_n "checking for PATCH... " >&6; }
23405          if test ! -x "$tool_specified"; then
23406            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23407$as_echo "not found" >&6; }
23408            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23409          fi
23410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23411$as_echo "$tool_specified" >&6; }
23412        fi
23413      fi
23414    fi
23415
23416  fi
23417
23418
23419  # Check if it's GNU time
23420  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23421  if test "x$IS_GNU_TIME" != x; then
23422    IS_GNU_TIME=yes
23423  else
23424    IS_GNU_TIME=no
23425  fi
23426
23427
23428  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23429
23430
23431
23432  # Publish this variable in the help.
23433
23434
23435  if [ -z "${DSYMUTIL+x}" ]; then
23436    # The variable is not set by user, try to locate tool using the code snippet
23437    for ac_prog in dsymutil
23438do
23439  # Extract the first word of "$ac_prog", so it can be a program name with args.
23440set dummy $ac_prog; ac_word=$2
23441{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23442$as_echo_n "checking for $ac_word... " >&6; }
23443if ${ac_cv_path_DSYMUTIL+:} false; then :
23444  $as_echo_n "(cached) " >&6
23445else
23446  case $DSYMUTIL in
23447  [\\/]* | ?:[\\/]*)
23448  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23449  ;;
23450  *)
23451  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23452for as_dir in $PATH
23453do
23454  IFS=$as_save_IFS
23455  test -z "$as_dir" && as_dir=.
23456    for ac_exec_ext in '' $ac_executable_extensions; do
23457  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23458    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23459    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23460    break 2
23461  fi
23462done
23463  done
23464IFS=$as_save_IFS
23465
23466  ;;
23467esac
23468fi
23469DSYMUTIL=$ac_cv_path_DSYMUTIL
23470if test -n "$DSYMUTIL"; then
23471  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23472$as_echo "$DSYMUTIL" >&6; }
23473else
23474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23475$as_echo "no" >&6; }
23476fi
23477
23478
23479  test -n "$DSYMUTIL" && break
23480done
23481
23482  else
23483    # The variable is set, but is it from the command line or the environment?
23484
23485    # Try to remove the string !DSYMUTIL! from our list.
23486    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23487    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23488      # If it failed, the variable was not from the command line. Ignore it,
23489      # but warn the user (except for BASH, which is always set by the calling BASH).
23490      if test "xDSYMUTIL" != xBASH; then
23491        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23492$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23493      fi
23494      # Try to locate tool using the code snippet
23495      for ac_prog in dsymutil
23496do
23497  # Extract the first word of "$ac_prog", so it can be a program name with args.
23498set dummy $ac_prog; ac_word=$2
23499{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23500$as_echo_n "checking for $ac_word... " >&6; }
23501if ${ac_cv_path_DSYMUTIL+:} false; then :
23502  $as_echo_n "(cached) " >&6
23503else
23504  case $DSYMUTIL in
23505  [\\/]* | ?:[\\/]*)
23506  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23507  ;;
23508  *)
23509  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23510for as_dir in $PATH
23511do
23512  IFS=$as_save_IFS
23513  test -z "$as_dir" && as_dir=.
23514    for ac_exec_ext in '' $ac_executable_extensions; do
23515  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23516    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23517    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23518    break 2
23519  fi
23520done
23521  done
23522IFS=$as_save_IFS
23523
23524  ;;
23525esac
23526fi
23527DSYMUTIL=$ac_cv_path_DSYMUTIL
23528if test -n "$DSYMUTIL"; then
23529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23530$as_echo "$DSYMUTIL" >&6; }
23531else
23532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23533$as_echo "no" >&6; }
23534fi
23535
23536
23537  test -n "$DSYMUTIL" && break
23538done
23539
23540    else
23541      # If it succeeded, then it was overridden by the user. We will use it
23542      # for the tool.
23543
23544      # First remove it from the list of overridden variables, so we can test
23545      # for unknown variables in the end.
23546      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23547
23548      # Check if we try to supply an empty value
23549      if test "x$DSYMUTIL" = x; then
23550        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23551$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23552        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23553$as_echo_n "checking for DSYMUTIL... " >&6; }
23554        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23555$as_echo "disabled" >&6; }
23556      else
23557        # Check if the provided tool contains a complete path.
23558        tool_specified="$DSYMUTIL"
23559        tool_basename="${tool_specified##*/}"
23560        if test "x$tool_basename" = "x$tool_specified"; then
23561          # A command without a complete path is provided, search $PATH.
23562          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23563$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23564          # Extract the first word of "$tool_basename", so it can be a program name with args.
23565set dummy $tool_basename; ac_word=$2
23566{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23567$as_echo_n "checking for $ac_word... " >&6; }
23568if ${ac_cv_path_DSYMUTIL+:} false; then :
23569  $as_echo_n "(cached) " >&6
23570else
23571  case $DSYMUTIL in
23572  [\\/]* | ?:[\\/]*)
23573  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23574  ;;
23575  *)
23576  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23577for as_dir in $PATH
23578do
23579  IFS=$as_save_IFS
23580  test -z "$as_dir" && as_dir=.
23581    for ac_exec_ext in '' $ac_executable_extensions; do
23582  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23583    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23584    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23585    break 2
23586  fi
23587done
23588  done
23589IFS=$as_save_IFS
23590
23591  ;;
23592esac
23593fi
23594DSYMUTIL=$ac_cv_path_DSYMUTIL
23595if test -n "$DSYMUTIL"; then
23596  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23597$as_echo "$DSYMUTIL" >&6; }
23598else
23599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23600$as_echo "no" >&6; }
23601fi
23602
23603
23604          if test "x$DSYMUTIL" = x; then
23605            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23606          fi
23607        else
23608          # Otherwise we believe it is a complete path. Use it as it is.
23609          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23610$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23611          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23612$as_echo_n "checking for DSYMUTIL... " >&6; }
23613          if test ! -x "$tool_specified"; then
23614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23615$as_echo "not found" >&6; }
23616            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23617          fi
23618          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23619$as_echo "$tool_specified" >&6; }
23620        fi
23621      fi
23622    fi
23623
23624  fi
23625
23626
23627
23628  if test "x$DSYMUTIL" = x; then
23629    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23630  fi
23631
23632
23633
23634
23635
23636  # Publish this variable in the help.
23637
23638
23639  if [ -z "${XATTR+x}" ]; then
23640    # The variable is not set by user, try to locate tool using the code snippet
23641    for ac_prog in xattr
23642do
23643  # Extract the first word of "$ac_prog", so it can be a program name with args.
23644set dummy $ac_prog; ac_word=$2
23645{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23646$as_echo_n "checking for $ac_word... " >&6; }
23647if ${ac_cv_path_XATTR+:} false; then :
23648  $as_echo_n "(cached) " >&6
23649else
23650  case $XATTR in
23651  [\\/]* | ?:[\\/]*)
23652  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23653  ;;
23654  *)
23655  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23656for as_dir in $PATH
23657do
23658  IFS=$as_save_IFS
23659  test -z "$as_dir" && as_dir=.
23660    for ac_exec_ext in '' $ac_executable_extensions; do
23661  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23662    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23663    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23664    break 2
23665  fi
23666done
23667  done
23668IFS=$as_save_IFS
23669
23670  ;;
23671esac
23672fi
23673XATTR=$ac_cv_path_XATTR
23674if test -n "$XATTR"; then
23675  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23676$as_echo "$XATTR" >&6; }
23677else
23678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23679$as_echo "no" >&6; }
23680fi
23681
23682
23683  test -n "$XATTR" && break
23684done
23685
23686  else
23687    # The variable is set, but is it from the command line or the environment?
23688
23689    # Try to remove the string !XATTR! from our list.
23690    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23691    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23692      # If it failed, the variable was not from the command line. Ignore it,
23693      # but warn the user (except for BASH, which is always set by the calling BASH).
23694      if test "xXATTR" != xBASH; then
23695        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23696$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23697      fi
23698      # Try to locate tool using the code snippet
23699      for ac_prog in xattr
23700do
23701  # Extract the first word of "$ac_prog", so it can be a program name with args.
23702set dummy $ac_prog; ac_word=$2
23703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23704$as_echo_n "checking for $ac_word... " >&6; }
23705if ${ac_cv_path_XATTR+:} false; then :
23706  $as_echo_n "(cached) " >&6
23707else
23708  case $XATTR in
23709  [\\/]* | ?:[\\/]*)
23710  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23711  ;;
23712  *)
23713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23714for as_dir in $PATH
23715do
23716  IFS=$as_save_IFS
23717  test -z "$as_dir" && as_dir=.
23718    for ac_exec_ext in '' $ac_executable_extensions; do
23719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23720    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23722    break 2
23723  fi
23724done
23725  done
23726IFS=$as_save_IFS
23727
23728  ;;
23729esac
23730fi
23731XATTR=$ac_cv_path_XATTR
23732if test -n "$XATTR"; then
23733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23734$as_echo "$XATTR" >&6; }
23735else
23736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23737$as_echo "no" >&6; }
23738fi
23739
23740
23741  test -n "$XATTR" && break
23742done
23743
23744    else
23745      # If it succeeded, then it was overridden by the user. We will use it
23746      # for the tool.
23747
23748      # First remove it from the list of overridden variables, so we can test
23749      # for unknown variables in the end.
23750      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23751
23752      # Check if we try to supply an empty value
23753      if test "x$XATTR" = x; then
23754        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23755$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23756        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23757$as_echo_n "checking for XATTR... " >&6; }
23758        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23759$as_echo "disabled" >&6; }
23760      else
23761        # Check if the provided tool contains a complete path.
23762        tool_specified="$XATTR"
23763        tool_basename="${tool_specified##*/}"
23764        if test "x$tool_basename" = "x$tool_specified"; then
23765          # A command without a complete path is provided, search $PATH.
23766          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23767$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23768          # Extract the first word of "$tool_basename", so it can be a program name with args.
23769set dummy $tool_basename; ac_word=$2
23770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23771$as_echo_n "checking for $ac_word... " >&6; }
23772if ${ac_cv_path_XATTR+:} false; then :
23773  $as_echo_n "(cached) " >&6
23774else
23775  case $XATTR in
23776  [\\/]* | ?:[\\/]*)
23777  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23778  ;;
23779  *)
23780  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23781for as_dir in $PATH
23782do
23783  IFS=$as_save_IFS
23784  test -z "$as_dir" && as_dir=.
23785    for ac_exec_ext in '' $ac_executable_extensions; do
23786  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23787    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23788    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23789    break 2
23790  fi
23791done
23792  done
23793IFS=$as_save_IFS
23794
23795  ;;
23796esac
23797fi
23798XATTR=$ac_cv_path_XATTR
23799if test -n "$XATTR"; then
23800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23801$as_echo "$XATTR" >&6; }
23802else
23803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23804$as_echo "no" >&6; }
23805fi
23806
23807
23808          if test "x$XATTR" = x; then
23809            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23810          fi
23811        else
23812          # Otherwise we believe it is a complete path. Use it as it is.
23813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23814$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23815          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23816$as_echo_n "checking for XATTR... " >&6; }
23817          if test ! -x "$tool_specified"; then
23818            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23819$as_echo "not found" >&6; }
23820            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23821          fi
23822          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23823$as_echo "$tool_specified" >&6; }
23824        fi
23825      fi
23826    fi
23827
23828  fi
23829
23830
23831
23832  if test "x$XATTR" = x; then
23833    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23834  fi
23835
23836
23837
23838
23839  # Publish this variable in the help.
23840
23841
23842  if [ -z "${CODESIGN+x}" ]; then
23843    # The variable is not set by user, try to locate tool using the code snippet
23844    for ac_prog in codesign
23845do
23846  # Extract the first word of "$ac_prog", so it can be a program name with args.
23847set dummy $ac_prog; ac_word=$2
23848{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23849$as_echo_n "checking for $ac_word... " >&6; }
23850if ${ac_cv_path_CODESIGN+:} false; then :
23851  $as_echo_n "(cached) " >&6
23852else
23853  case $CODESIGN in
23854  [\\/]* | ?:[\\/]*)
23855  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23856  ;;
23857  *)
23858  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23859for as_dir in $PATH
23860do
23861  IFS=$as_save_IFS
23862  test -z "$as_dir" && as_dir=.
23863    for ac_exec_ext in '' $ac_executable_extensions; do
23864  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23865    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23866    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23867    break 2
23868  fi
23869done
23870  done
23871IFS=$as_save_IFS
23872
23873  ;;
23874esac
23875fi
23876CODESIGN=$ac_cv_path_CODESIGN
23877if test -n "$CODESIGN"; then
23878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23879$as_echo "$CODESIGN" >&6; }
23880else
23881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23882$as_echo "no" >&6; }
23883fi
23884
23885
23886  test -n "$CODESIGN" && break
23887done
23888
23889  else
23890    # The variable is set, but is it from the command line or the environment?
23891
23892    # Try to remove the string !CODESIGN! from our list.
23893    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23894    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23895      # If it failed, the variable was not from the command line. Ignore it,
23896      # but warn the user (except for BASH, which is always set by the calling BASH).
23897      if test "xCODESIGN" != xBASH; then
23898        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23899$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23900      fi
23901      # Try to locate tool using the code snippet
23902      for ac_prog in codesign
23903do
23904  # Extract the first word of "$ac_prog", so it can be a program name with args.
23905set dummy $ac_prog; ac_word=$2
23906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23907$as_echo_n "checking for $ac_word... " >&6; }
23908if ${ac_cv_path_CODESIGN+:} false; then :
23909  $as_echo_n "(cached) " >&6
23910else
23911  case $CODESIGN in
23912  [\\/]* | ?:[\\/]*)
23913  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23914  ;;
23915  *)
23916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23917for as_dir in $PATH
23918do
23919  IFS=$as_save_IFS
23920  test -z "$as_dir" && as_dir=.
23921    for ac_exec_ext in '' $ac_executable_extensions; do
23922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23923    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23925    break 2
23926  fi
23927done
23928  done
23929IFS=$as_save_IFS
23930
23931  ;;
23932esac
23933fi
23934CODESIGN=$ac_cv_path_CODESIGN
23935if test -n "$CODESIGN"; then
23936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23937$as_echo "$CODESIGN" >&6; }
23938else
23939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23940$as_echo "no" >&6; }
23941fi
23942
23943
23944  test -n "$CODESIGN" && break
23945done
23946
23947    else
23948      # If it succeeded, then it was overridden by the user. We will use it
23949      # for the tool.
23950
23951      # First remove it from the list of overridden variables, so we can test
23952      # for unknown variables in the end.
23953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23954
23955      # Check if we try to supply an empty value
23956      if test "x$CODESIGN" = x; then
23957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23958$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23960$as_echo_n "checking for CODESIGN... " >&6; }
23961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23962$as_echo "disabled" >&6; }
23963      else
23964        # Check if the provided tool contains a complete path.
23965        tool_specified="$CODESIGN"
23966        tool_basename="${tool_specified##*/}"
23967        if test "x$tool_basename" = "x$tool_specified"; then
23968          # A command without a complete path is provided, search $PATH.
23969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23970$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23971          # Extract the first word of "$tool_basename", so it can be a program name with args.
23972set dummy $tool_basename; ac_word=$2
23973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23974$as_echo_n "checking for $ac_word... " >&6; }
23975if ${ac_cv_path_CODESIGN+:} false; then :
23976  $as_echo_n "(cached) " >&6
23977else
23978  case $CODESIGN in
23979  [\\/]* | ?:[\\/]*)
23980  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23981  ;;
23982  *)
23983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23984for as_dir in $PATH
23985do
23986  IFS=$as_save_IFS
23987  test -z "$as_dir" && as_dir=.
23988    for ac_exec_ext in '' $ac_executable_extensions; do
23989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23990    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23992    break 2
23993  fi
23994done
23995  done
23996IFS=$as_save_IFS
23997
23998  ;;
23999esac
24000fi
24001CODESIGN=$ac_cv_path_CODESIGN
24002if test -n "$CODESIGN"; then
24003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
24004$as_echo "$CODESIGN" >&6; }
24005else
24006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24007$as_echo "no" >&6; }
24008fi
24009
24010
24011          if test "x$CODESIGN" = x; then
24012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24013          fi
24014        else
24015          # Otherwise we believe it is a complete path. Use it as it is.
24016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
24017$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
24018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
24019$as_echo_n "checking for CODESIGN... " >&6; }
24020          if test ! -x "$tool_specified"; then
24021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24022$as_echo "not found" >&6; }
24023            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
24024          fi
24025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24026$as_echo "$tool_specified" >&6; }
24027        fi
24028      fi
24029    fi
24030
24031  fi
24032
24033
24034    if test "x$CODESIGN" != "x"; then
24035      # Verify that the openjdk_codesign certificate is present
24036      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
24037$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
24038      $RM codesign-testfile
24039      $TOUCH codesign-testfile
24040      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
24041      $RM codesign-testfile
24042      if test "x$CODESIGN" = x; then
24043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24044$as_echo "no" >&6; }
24045      else
24046        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24047$as_echo "yes" >&6; }
24048      fi
24049    fi
24050
24051
24052
24053  # Publish this variable in the help.
24054
24055
24056  if [ -z "${SETFILE+x}" ]; then
24057    # The variable is not set by user, try to locate tool using the code snippet
24058    for ac_prog in SetFile
24059do
24060  # Extract the first word of "$ac_prog", so it can be a program name with args.
24061set dummy $ac_prog; ac_word=$2
24062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24063$as_echo_n "checking for $ac_word... " >&6; }
24064if ${ac_cv_path_SETFILE+:} false; then :
24065  $as_echo_n "(cached) " >&6
24066else
24067  case $SETFILE in
24068  [\\/]* | ?:[\\/]*)
24069  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24070  ;;
24071  *)
24072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24073for as_dir in $PATH
24074do
24075  IFS=$as_save_IFS
24076  test -z "$as_dir" && as_dir=.
24077    for ac_exec_ext in '' $ac_executable_extensions; do
24078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24079    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24081    break 2
24082  fi
24083done
24084  done
24085IFS=$as_save_IFS
24086
24087  ;;
24088esac
24089fi
24090SETFILE=$ac_cv_path_SETFILE
24091if test -n "$SETFILE"; then
24092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24093$as_echo "$SETFILE" >&6; }
24094else
24095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24096$as_echo "no" >&6; }
24097fi
24098
24099
24100  test -n "$SETFILE" && break
24101done
24102
24103  else
24104    # The variable is set, but is it from the command line or the environment?
24105
24106    # Try to remove the string !SETFILE! from our list.
24107    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
24108    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
24109      # If it failed, the variable was not from the command line. Ignore it,
24110      # but warn the user (except for BASH, which is always set by the calling BASH).
24111      if test "xSETFILE" != xBASH; then
24112        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
24113$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
24114      fi
24115      # Try to locate tool using the code snippet
24116      for ac_prog in SetFile
24117do
24118  # Extract the first word of "$ac_prog", so it can be a program name with args.
24119set dummy $ac_prog; ac_word=$2
24120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24121$as_echo_n "checking for $ac_word... " >&6; }
24122if ${ac_cv_path_SETFILE+:} false; then :
24123  $as_echo_n "(cached) " >&6
24124else
24125  case $SETFILE in
24126  [\\/]* | ?:[\\/]*)
24127  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24128  ;;
24129  *)
24130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24131for as_dir in $PATH
24132do
24133  IFS=$as_save_IFS
24134  test -z "$as_dir" && as_dir=.
24135    for ac_exec_ext in '' $ac_executable_extensions; do
24136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24137    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24139    break 2
24140  fi
24141done
24142  done
24143IFS=$as_save_IFS
24144
24145  ;;
24146esac
24147fi
24148SETFILE=$ac_cv_path_SETFILE
24149if test -n "$SETFILE"; then
24150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24151$as_echo "$SETFILE" >&6; }
24152else
24153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24154$as_echo "no" >&6; }
24155fi
24156
24157
24158  test -n "$SETFILE" && break
24159done
24160
24161    else
24162      # If it succeeded, then it was overridden by the user. We will use it
24163      # for the tool.
24164
24165      # First remove it from the list of overridden variables, so we can test
24166      # for unknown variables in the end.
24167      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
24168
24169      # Check if we try to supply an empty value
24170      if test "x$SETFILE" = x; then
24171        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
24172$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
24173        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24174$as_echo_n "checking for SETFILE... " >&6; }
24175        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
24176$as_echo "disabled" >&6; }
24177      else
24178        # Check if the provided tool contains a complete path.
24179        tool_specified="$SETFILE"
24180        tool_basename="${tool_specified##*/}"
24181        if test "x$tool_basename" = "x$tool_specified"; then
24182          # A command without a complete path is provided, search $PATH.
24183          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
24184$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
24185          # Extract the first word of "$tool_basename", so it can be a program name with args.
24186set dummy $tool_basename; ac_word=$2
24187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24188$as_echo_n "checking for $ac_word... " >&6; }
24189if ${ac_cv_path_SETFILE+:} false; then :
24190  $as_echo_n "(cached) " >&6
24191else
24192  case $SETFILE in
24193  [\\/]* | ?:[\\/]*)
24194  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
24195  ;;
24196  *)
24197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24198for as_dir in $PATH
24199do
24200  IFS=$as_save_IFS
24201  test -z "$as_dir" && as_dir=.
24202    for ac_exec_ext in '' $ac_executable_extensions; do
24203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24204    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
24205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24206    break 2
24207  fi
24208done
24209  done
24210IFS=$as_save_IFS
24211
24212  ;;
24213esac
24214fi
24215SETFILE=$ac_cv_path_SETFILE
24216if test -n "$SETFILE"; then
24217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
24218$as_echo "$SETFILE" >&6; }
24219else
24220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24221$as_echo "no" >&6; }
24222fi
24223
24224
24225          if test "x$SETFILE" = x; then
24226            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24227          fi
24228        else
24229          # Otherwise we believe it is a complete path. Use it as it is.
24230          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24231$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24232          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24233$as_echo_n "checking for SETFILE... " >&6; }
24234          if test ! -x "$tool_specified"; then
24235            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24236$as_echo "not found" >&6; }
24237            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24238          fi
24239          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24240$as_echo "$tool_specified" >&6; }
24241        fi
24242      fi
24243    fi
24244
24245  fi
24246
24247
24248
24249  if test "x$SETFILE" = x; then
24250    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24251  fi
24252
24253
24254  fi
24255
24256
24257  # Check bash version
24258  # Extra [ ] to stop m4 mangling
24259   BASH_VER=`$BASH --version | $SED -n  -e 's/^.*bash.*ersion *\([0-9.]*\).*$/\1/ p'`
24260  { $as_echo "$as_me:${as_lineno-$LINENO}: checking bash version" >&5
24261$as_echo_n "checking bash version... " >&6; }
24262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH_VER" >&5
24263$as_echo "$BASH_VER" >&6; }
24264
24265  BASH_MAJOR=`$ECHO $BASH_VER | $CUT -d . -f 1`
24266  BASH_MINOR=`$ECHO $BASH_VER | $CUT -d . -f 2`
24267  if test $BASH_MAJOR -lt 3 || (test $BASH_MAJOR -eq 3 && test $BASH_MINOR -lt 2); then
24268    as_fn_error $? "bash version 3.2 or better is required" "$LINENO" 5
24269  fi
24270
24271  # Test if bash supports pipefail.
24272  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24273$as_echo_n "checking if bash supports pipefail... " >&6; }
24274  if ${BASH} -c 'set -o pipefail'; then
24275    BASH_ARGS="$BASH_ARGS -o pipefail"
24276    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24277$as_echo "yes" >&6; }
24278  else
24279    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24280$as_echo "no" >&6; }
24281  fi
24282
24283  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24284$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24285  if ${BASH} -e -c 'true'; then
24286    BASH_ARGS="$BASH_ARGS -e"
24287    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24288$as_echo "yes" >&6; }
24289  else
24290    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24291$as_echo "no" >&6; }
24292  fi
24293
24294
24295
24296
24297# Check if pkg-config is available.
24298
24299
24300if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24301	if test -n "$ac_tool_prefix"; then
24302  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24303set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24304{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24305$as_echo_n "checking for $ac_word... " >&6; }
24306if ${ac_cv_path_PKG_CONFIG+:} false; then :
24307  $as_echo_n "(cached) " >&6
24308else
24309  case $PKG_CONFIG in
24310  [\\/]* | ?:[\\/]*)
24311  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24312  ;;
24313  *)
24314  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24315for as_dir in $PATH
24316do
24317  IFS=$as_save_IFS
24318  test -z "$as_dir" && as_dir=.
24319    for ac_exec_ext in '' $ac_executable_extensions; do
24320  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24321    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24322    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24323    break 2
24324  fi
24325done
24326  done
24327IFS=$as_save_IFS
24328
24329  ;;
24330esac
24331fi
24332PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24333if test -n "$PKG_CONFIG"; then
24334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24335$as_echo "$PKG_CONFIG" >&6; }
24336else
24337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24338$as_echo "no" >&6; }
24339fi
24340
24341
24342fi
24343if test -z "$ac_cv_path_PKG_CONFIG"; then
24344  ac_pt_PKG_CONFIG=$PKG_CONFIG
24345  # Extract the first word of "pkg-config", so it can be a program name with args.
24346set dummy pkg-config; ac_word=$2
24347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24348$as_echo_n "checking for $ac_word... " >&6; }
24349if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24350  $as_echo_n "(cached) " >&6
24351else
24352  case $ac_pt_PKG_CONFIG in
24353  [\\/]* | ?:[\\/]*)
24354  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24355  ;;
24356  *)
24357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24358for as_dir in $PATH
24359do
24360  IFS=$as_save_IFS
24361  test -z "$as_dir" && as_dir=.
24362    for ac_exec_ext in '' $ac_executable_extensions; do
24363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24364    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24366    break 2
24367  fi
24368done
24369  done
24370IFS=$as_save_IFS
24371
24372  ;;
24373esac
24374fi
24375ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24376if test -n "$ac_pt_PKG_CONFIG"; then
24377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24378$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24379else
24380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24381$as_echo "no" >&6; }
24382fi
24383
24384  if test "x$ac_pt_PKG_CONFIG" = x; then
24385    PKG_CONFIG=""
24386  else
24387    case $cross_compiling:$ac_tool_warned in
24388yes:)
24389{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24390$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24391ac_tool_warned=yes ;;
24392esac
24393    PKG_CONFIG=$ac_pt_PKG_CONFIG
24394  fi
24395else
24396  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24397fi
24398
24399fi
24400if test -n "$PKG_CONFIG"; then
24401	_pkg_min_version=0.9.0
24402	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24403$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24404	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24405		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24406$as_echo "yes" >&6; }
24407	else
24408		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24409$as_echo "no" >&6; }
24410		PKG_CONFIG=""
24411	fi
24412
24413fi
24414
24415# After basic tools have been setup, we can check build os specific details.
24416
24417  ###############################################################################
24418
24419  # Note that this is the build platform OS version!
24420
24421  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24422  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24423  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24424  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24425
24426
24427
24428
24429
24430# Misc basic settings
24431
24432
24433# Check whether --with-default-make-target was given.
24434if test "${with_default_make_target+set}" = set; then :
24435  withval=$with_default_make_target;
24436fi
24437
24438  if test "x$with_default_make_target" = "x" \
24439      || test "x$with_default_make_target" = "xyes"; then
24440    DEFAULT_MAKE_TARGET="exploded-image"
24441  elif test "x$with_default_make_target" = "xno"; then
24442    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24443  else
24444    DEFAULT_MAKE_TARGET="$with_default_make_target"
24445  fi
24446
24447
24448
24449
24450###############################################################################
24451#
24452# Determine OpenJDK variants, options and version numbers.
24453#
24454###############################################################################
24455
24456# We need build & target for this.
24457
24458  # Should we build a JDK without a graphical UI?
24459  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headless only" >&5
24460$as_echo_n "checking headless only... " >&6; }
24461  # Check whether --enable-headless-only was given.
24462if test "${enable_headless_only+set}" = set; then :
24463  enableval=$enable_headless_only;
24464fi
24465
24466
24467  if test "x$enable_headless_only" = "xyes"; then
24468    ENABLE_HEADLESS_ONLY="true"
24469    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24470$as_echo "yes" >&6; }
24471  elif test "x$enable_headless_only" = "xno"; then
24472    ENABLE_HEADLESS_ONLY="false"
24473    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24474$as_echo "no" >&6; }
24475  elif test "x$enable_headless_only" = "x"; then
24476    ENABLE_HEADLESS_ONLY="false"
24477    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24478$as_echo "no" >&6; }
24479  else
24480    as_fn_error $? "--enable-headless-only can only take yes or no" "$LINENO" 5
24481  fi
24482
24483
24484
24485  # Choose cacerts source file
24486
24487# Check whether --with-cacerts-file was given.
24488if test "${with_cacerts_file+set}" = set; then :
24489  withval=$with_cacerts_file;
24490fi
24491
24492  if test "x$with_cacerts_file" != x; then
24493    CACERTS_FILE=$with_cacerts_file
24494  fi
24495
24496
24497  # Enable or disable unlimited crypto
24498  # Check whether --enable-unlimited-crypto was given.
24499if test "${enable_unlimited_crypto+set}" = set; then :
24500  enableval=$enable_unlimited_crypto;
24501else
24502  enable_unlimited_crypto=yes
24503fi
24504
24505  if test "x$enable_unlimited_crypto" = "xyes"; then
24506    UNLIMITED_CRYPTO=true
24507  else
24508    UNLIMITED_CRYPTO=false
24509  fi
24510
24511
24512  # Should we build the serviceability agent (SA)?
24513  INCLUDE_SA=true
24514  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24515    INCLUDE_SA=false
24516  fi
24517  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24518    INCLUDE_SA=false
24519  fi
24520
24521
24522  # Compress jars
24523  COMPRESS_JARS=false
24524
24525
24526
24527  # Setup default copyright year. Mostly overridden when building close to a new year.
24528
24529# Check whether --with-copyright-year was given.
24530if test "${with_copyright_year+set}" = set; then :
24531  withval=$with_copyright_year;
24532fi
24533
24534  if test "x$with_copyright_year" = xyes; then
24535    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24536  elif test "x$with_copyright_year" != x; then
24537    COPYRIGHT_YEAR="$with_copyright_year"
24538  else
24539    COPYRIGHT_YEAR=`$DATE +'%Y'`
24540  fi
24541
24542
24543
24544  # Check whether --enable-keep-packaged-modules was given.
24545if test "${enable_keep_packaged_modules+set}" = set; then :
24546  enableval=$enable_keep_packaged_modules;
24547fi
24548
24549
24550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24551$as_echo_n "checking if packaged modules are kept... " >&6; }
24552  if test "x$enable_keep_packaged_modules" = "xyes"; then
24553    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24554$as_echo "yes" >&6; }
24555    JLINK_KEEP_PACKAGED_MODULES=true
24556  elif test "x$enable_keep_packaged_modules" = "xno"; then
24557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24558$as_echo "no" >&6; }
24559    JLINK_KEEP_PACKAGED_MODULES=false
24560  elif test "x$enable_keep_packaged_modules" = "x"; then
24561    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24562$as_echo "yes (default)" >&6; }
24563    JLINK_KEEP_PACKAGED_MODULES=true
24564  else
24565    { $as_echo "$as_me:${as_lineno-$LINENO}: result: error" >&5
24566$as_echo "error" >&6; }
24567    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24568  fi
24569
24570
24571
24572
24573  # Warn user that old version arguments are deprecated.
24574
24575
24576# Check whether --with-milestone was given.
24577if test "${with_milestone+set}" = set; then :
24578  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24579$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24580fi
24581
24582
24583
24584
24585# Check whether --with-update-version was given.
24586if test "${with_update_version+set}" = set; then :
24587  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24588$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24589fi
24590
24591
24592
24593
24594# Check whether --with-user-release-suffix was given.
24595if test "${with_user_release_suffix+set}" = set; then :
24596  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
24597$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24598fi
24599
24600
24601
24602
24603# Check whether --with-build-number was given.
24604if test "${with_build_number+set}" = set; then :
24605  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24606$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24607fi
24608
24609
24610
24611  # Source the version numbers file
24612  . $AUTOCONF_DIR/version-numbers
24613
24614  # Some non-version number information is set in that file
24615
24616
24617
24618
24619
24620
24621
24622
24623
24624  # Override version from arguments
24625
24626  # If --with-version-string is set, process it first. It is possible to
24627  # override parts with more specific flags, since these are processed later.
24628
24629# Check whether --with-version-string was given.
24630if test "${with_version_string+set}" = set; then :
24631  withval=$with_version_string;
24632fi
24633
24634  if test "x$with_version_string" = xyes; then
24635    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24636  elif test "x$with_version_string" != x; then
24637    # Additional [] needed to keep m4 from mangling shell constructs.
24638    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24639      VERSION_MAJOR=${BASH_REMATCH[1]}
24640      VERSION_MINOR=${BASH_REMATCH[3]}
24641      VERSION_SECURITY=${BASH_REMATCH[5]}
24642      VERSION_PATCH=${BASH_REMATCH[7]}
24643      VERSION_PRE=${BASH_REMATCH[9]}
24644      version_plus_separator=${BASH_REMATCH[11]}
24645      VERSION_BUILD=${BASH_REMATCH[12]}
24646      VERSION_OPT=${BASH_REMATCH[14]}
24647      # Unspecified numerical fields are interpreted as 0.
24648      if test "x$VERSION_MINOR" = x; then
24649        VERSION_MINOR=0
24650      fi
24651      if test "x$VERSION_SECURITY" = x; then
24652        VERSION_SECURITY=0
24653      fi
24654      if test "x$VERSION_PATCH" = x; then
24655        VERSION_PATCH=0
24656      fi
24657      if test "x$version_plus_separator" != x \
24658          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24659        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24660      fi
24661      # Stop the version part process from setting default values.
24662      # We still allow them to explicitly override though.
24663      NO_DEFAULT_VERSION_PARTS=true
24664    else
24665      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24666    fi
24667  fi
24668
24669
24670# Check whether --with-version-pre was given.
24671if test "${with_version_pre+set}" = set; then :
24672  withval=$with_version_pre; with_version_pre_present=true
24673else
24674  with_version_pre_present=false
24675fi
24676
24677
24678  if test "x$with_version_pre_present" = xtrue; then
24679    if test "x$with_version_pre" = xyes; then
24680      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24681    elif test "x$with_version_pre" = xno; then
24682      # Interpret --without-* as empty string instead of the literal "no"
24683      VERSION_PRE=
24684    else
24685      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24686       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24687      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24688        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24689$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24690      fi
24691    fi
24692  else
24693    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24694      # Default is to use "internal" as pre
24695      VERSION_PRE="internal"
24696    fi
24697  fi
24698
24699
24700# Check whether --with-version-opt was given.
24701if test "${with_version_opt+set}" = set; then :
24702  withval=$with_version_opt; with_version_opt_present=true
24703else
24704  with_version_opt_present=false
24705fi
24706
24707
24708  if test "x$with_version_opt_present" = xtrue; then
24709    if test "x$with_version_opt" = xyes; then
24710      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24711    elif test "x$with_version_opt" = xno; then
24712      # Interpret --without-* as empty string instead of the literal "no"
24713      VERSION_OPT=
24714    else
24715      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24716       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24717      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24718        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24719$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24720      fi
24721    fi
24722  else
24723    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24724      # Default is to calculate a string like this 'adhoc.<username>.<base dir name>'
24725      # Outer [ ] to quote m4.
24726       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24727      VERSION_OPT="adhoc.$USERNAME.$basedirname"
24728    fi
24729  fi
24730
24731
24732# Check whether --with-version-build was given.
24733if test "${with_version_build+set}" = set; then :
24734  withval=$with_version_build; with_version_build_present=true
24735else
24736  with_version_build_present=false
24737fi
24738
24739
24740  if test "x$with_version_build_present" = xtrue; then
24741    if test "x$with_version_build" = xyes; then
24742      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24743    elif test "x$with_version_build" = xno; then
24744      # Interpret --without-* as empty string instead of the literal "no"
24745      VERSION_BUILD=
24746    elif test "x$with_version_build" = x; then
24747      VERSION_BUILD=
24748    else
24749
24750  # Additional [] needed to keep m4 from mangling shell constructs.
24751  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24752    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24753  fi
24754  # Extract the version number without leading zeros.
24755  cleaned_value=${BASH_REMATCH[1]}
24756  if test "x$cleaned_value" = x; then
24757    # Special case for zero
24758    cleaned_value=${BASH_REMATCH[2]}
24759  fi
24760
24761  if test $cleaned_value -gt 255; then
24762    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24763  fi
24764  if test "x$cleaned_value" != "x$with_version_build"; then
24765    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24766$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24767  fi
24768  VERSION_BUILD=$cleaned_value
24769
24770    fi
24771  else
24772    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24773      # Default is to not have a build number.
24774      VERSION_BUILD=""
24775      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24776      VERSION_BUILD=0
24777    fi
24778  fi
24779
24780
24781# Check whether --with-version-major was given.
24782if test "${with_version_major+set}" = set; then :
24783  withval=$with_version_major; with_version_major_present=true
24784else
24785  with_version_major_present=false
24786fi
24787
24788
24789  if test "x$with_version_major_present" = xtrue; then
24790    if test "x$with_version_major" = xyes; then
24791      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24792    else
24793
24794  # Additional [] needed to keep m4 from mangling shell constructs.
24795  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24796    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24797  fi
24798  # Extract the version number without leading zeros.
24799  cleaned_value=${BASH_REMATCH[1]}
24800  if test "x$cleaned_value" = x; then
24801    # Special case for zero
24802    cleaned_value=${BASH_REMATCH[2]}
24803  fi
24804
24805  if test $cleaned_value -gt 255; then
24806    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24807  fi
24808  if test "x$cleaned_value" != "x$with_version_major"; then
24809    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24810$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24811  fi
24812  VERSION_MAJOR=$cleaned_value
24813
24814    fi
24815  else
24816    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24817      # Default is to get value from version-numbers
24818      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24819    fi
24820  fi
24821
24822
24823# Check whether --with-version-minor was given.
24824if test "${with_version_minor+set}" = set; then :
24825  withval=$with_version_minor; with_version_minor_present=true
24826else
24827  with_version_minor_present=false
24828fi
24829
24830
24831  if test "x$with_version_minor_present" = xtrue; then
24832    if test "x$with_version_minor" = xyes; then
24833      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24834    elif test "x$with_version_minor" = xno; then
24835      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24836      VERSION_MINOR=0
24837    elif test "x$with_version_minor" = x; then
24838      VERSION_MINOR=0
24839    else
24840
24841  # Additional [] needed to keep m4 from mangling shell constructs.
24842  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24843    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24844  fi
24845  # Extract the version number without leading zeros.
24846  cleaned_value=${BASH_REMATCH[1]}
24847  if test "x$cleaned_value" = x; then
24848    # Special case for zero
24849    cleaned_value=${BASH_REMATCH[2]}
24850  fi
24851
24852  if test $cleaned_value -gt 255; then
24853    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24854  fi
24855  if test "x$cleaned_value" != "x$with_version_minor"; then
24856    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24857$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24858  fi
24859  VERSION_MINOR=$cleaned_value
24860
24861    fi
24862  else
24863    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24864      # Default is 0, if unspecified
24865      VERSION_MINOR=$DEFAULT_VERSION_MINOR
24866    fi
24867  fi
24868
24869
24870# Check whether --with-version-security was given.
24871if test "${with_version_security+set}" = set; then :
24872  withval=$with_version_security; with_version_security_present=true
24873else
24874  with_version_security_present=false
24875fi
24876
24877
24878  if test "x$with_version_security_present" = xtrue; then
24879    if test "x$with_version_security" = xyes; then
24880      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24881    elif test "x$with_version_security" = xno; then
24882      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24883      VERSION_SECURITY=0
24884    elif test "x$with_version_security" = x; then
24885      VERSION_SECURITY=0
24886    else
24887
24888  # Additional [] needed to keep m4 from mangling shell constructs.
24889  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24890    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24891  fi
24892  # Extract the version number without leading zeros.
24893  cleaned_value=${BASH_REMATCH[1]}
24894  if test "x$cleaned_value" = x; then
24895    # Special case for zero
24896    cleaned_value=${BASH_REMATCH[2]}
24897  fi
24898
24899  if test $cleaned_value -gt 255; then
24900    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24901  fi
24902  if test "x$cleaned_value" != "x$with_version_security"; then
24903    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24904$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24905  fi
24906  VERSION_SECURITY=$cleaned_value
24907
24908    fi
24909  else
24910    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24911      # Default is 0, if unspecified
24912      VERSION_SECURITY=$DEFAULT_VERSION_SECURITY
24913    fi
24914  fi
24915
24916
24917# Check whether --with-version-patch was given.
24918if test "${with_version_patch+set}" = set; then :
24919  withval=$with_version_patch; with_version_patch_present=true
24920else
24921  with_version_patch_present=false
24922fi
24923
24924
24925  if test "x$with_version_patch_present" = xtrue; then
24926    if test "x$with_version_patch" = xyes; then
24927      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24928    elif test "x$with_version_patch" = xno; then
24929      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24930      VERSION_PATCH=0
24931    elif test "x$with_version_patch" = x; then
24932      VERSION_PATCH=0
24933    else
24934
24935  # Additional [] needed to keep m4 from mangling shell constructs.
24936  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24937    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24938  fi
24939  # Extract the version number without leading zeros.
24940  cleaned_value=${BASH_REMATCH[1]}
24941  if test "x$cleaned_value" = x; then
24942    # Special case for zero
24943    cleaned_value=${BASH_REMATCH[2]}
24944  fi
24945
24946  if test $cleaned_value -gt 255; then
24947    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24948  fi
24949  if test "x$cleaned_value" != "x$with_version_patch"; then
24950    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24951$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24952  fi
24953  VERSION_PATCH=$cleaned_value
24954
24955    fi
24956  else
24957    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24958      # Default is 0, if unspecified
24959      VERSION_PATCH=$DEFAULT_VERSION_PATCH
24960    fi
24961  fi
24962
24963  # Calculate derived version properties
24964
24965  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24966  if test "x$VERSION_PRE" = x; then
24967    VERSION_IS_GA=true
24968  else
24969    VERSION_IS_GA=false
24970  fi
24971
24972  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24973  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24974
24975  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24976  # Strip trailing zeroes from stripped_version_number
24977  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24978  VERSION_NUMBER=$stripped_version_number
24979
24980  # The complete version string, with additional build information
24981  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24982    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24983  else
24984    # If either build or opt is set, we need a + separator
24985    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24986  fi
24987
24988  # The short version string, just VERSION_NUMBER and PRE, if present.
24989  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24990
24991  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24992$as_echo_n "checking for version string... " >&6; }
24993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24994$as_echo "$VERSION_STRING" >&6; }
24995
24996
24997
24998
24999
25000
25001
25002
25003
25004
25005
25006
25007
25008
25009
25010###############################################################################
25011#
25012# Setup BootJDK, used to bootstrap the build.
25013#
25014###############################################################################
25015
25016
25017  BOOT_JDK_FOUND=no
25018
25019# Check whether --with-boot-jdk was given.
25020if test "${with_boot_jdk+set}" = set; then :
25021  withval=$with_boot_jdk;
25022fi
25023
25024
25025  # We look for the Boot JDK through various means, going from more certain to
25026  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
25027  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
25028  # must check if this is indeed valid; otherwise we'll continue looking.
25029
25030  # Test: Is bootjdk explicitly set by command line arguments?
25031
25032  if test "x$BOOT_JDK_FOUND" = xno; then
25033    # Now execute the test
25034
25035  if test "x$with_boot_jdk" != x; then
25036    BOOT_JDK=$with_boot_jdk
25037    BOOT_JDK_FOUND=maybe
25038    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
25039$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
25040  fi
25041
25042
25043    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25044    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25045      # Do we have a bin/java?
25046      if test ! -x "$BOOT_JDK/bin/java"; then
25047        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25048$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25049        BOOT_JDK_FOUND=no
25050      else
25051        # Do we have a bin/javac?
25052        if test ! -x "$BOOT_JDK/bin/javac"; then
25053          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25054$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25055          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25056$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25057          BOOT_JDK_FOUND=no
25058        else
25059          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25060          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25061
25062          # Extra M4 quote needed to protect [] in grep expression.
25063          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25064          if test "x$FOUND_CORRECT_VERSION" = x; then
25065            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25067            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25068$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25069            BOOT_JDK_FOUND=no
25070          else
25071            # We're done! :-)
25072            BOOT_JDK_FOUND=yes
25073
25074  # Only process if variable expands to non-empty
25075
25076  if test "x$BOOT_JDK" != x; then
25077    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25078
25079  # Input might be given as Windows format, start by converting to
25080  # unix format.
25081  path="$BOOT_JDK"
25082  new_path=`$CYGPATH -u "$path"`
25083
25084  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25085  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25086  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25087  # "foo.exe" is OK but "foo" is an error.
25088  #
25089  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25090  # It is also a way to make sure we got the proper file name for the real test later on.
25091  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25092  if test "x$test_shortpath" = x; then
25093    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25094$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25095    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25096  fi
25097
25098  # Call helper function which possibly converts this using DOS-style short mode.
25099  # If so, the updated path is stored in $new_path.
25100
25101  input_path="$new_path"
25102  # Check if we need to convert this using DOS-style short mode. If the path
25103  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25104  # take no chances and rewrite it.
25105  # Note: m4 eats our [], so we need to use [ and ] instead.
25106  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25107  if test "x$has_forbidden_chars" != x; then
25108    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25109    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25110    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25111    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25112      # Going to short mode and back again did indeed matter. Since short mode is
25113      # case insensitive, let's make it lowercase to improve readability.
25114      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25115      # Now convert it back to Unix-style (cygpath)
25116      input_path=`$CYGPATH -u "$shortmode_path"`
25117      new_path="$input_path"
25118    fi
25119  fi
25120
25121  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25122  if test "x$test_cygdrive_prefix" = x; then
25123    # As a simple fix, exclude /usr/bin since it's not a real path.
25124    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25125      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25126      # a path prefixed by /cygdrive for fixpath to work.
25127      new_path="$CYGWIN_ROOT_PATH$input_path"
25128    fi
25129  fi
25130
25131
25132  if test "x$path" != "x$new_path"; then
25133    BOOT_JDK="$new_path"
25134    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25135$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25136  fi
25137
25138    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25139
25140  path="$BOOT_JDK"
25141  has_colon=`$ECHO $path | $GREP ^.:`
25142  new_path="$path"
25143  if test "x$has_colon" = x; then
25144    # Not in mixed or Windows style, start by that.
25145    new_path=`cmd //c echo $path`
25146  fi
25147
25148
25149  input_path="$new_path"
25150  # Check if we need to convert this using DOS-style short mode. If the path
25151  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25152  # take no chances and rewrite it.
25153  # Note: m4 eats our [], so we need to use [ and ] instead.
25154  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25155  if test "x$has_forbidden_chars" != x; then
25156    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25157    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25158  fi
25159
25160
25161  windows_path="$new_path"
25162  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25163    unix_path=`$CYGPATH -u "$windows_path"`
25164    new_path="$unix_path"
25165  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25166    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25167    new_path="$unix_path"
25168  fi
25169
25170  if test "x$path" != "x$new_path"; then
25171    BOOT_JDK="$new_path"
25172    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25173$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25174  fi
25175
25176  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25177  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25178
25179    else
25180      # We're on a unix platform. Hooray! :)
25181      path="$BOOT_JDK"
25182      has_space=`$ECHO "$path" | $GREP " "`
25183      if test "x$has_space" != x; then
25184        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25185$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25186        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25187      fi
25188
25189      # Use eval to expand a potential ~
25190      eval path="$path"
25191      if test ! -f "$path" && test ! -d "$path"; then
25192        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25193      fi
25194
25195      if test -d "$path"; then
25196        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25197      else
25198        dir="`$DIRNAME "$path"`"
25199        base="`$BASENAME "$path"`"
25200        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25201      fi
25202    fi
25203  fi
25204
25205            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25206$as_echo_n "checking for Boot JDK... " >&6; }
25207            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25208$as_echo "$BOOT_JDK" >&6; }
25209            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25210$as_echo_n "checking Boot JDK version... " >&6; }
25211            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25212            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25213$as_echo "$BOOT_JDK_VERSION" >&6; }
25214          fi # end check jdk version
25215        fi # end check javac
25216      fi # end check java
25217    fi # end check boot jdk found
25218  fi
25219
25220  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
25221    # Having specified an argument which is incorrect will produce an instant failure;
25222    # we should not go on looking
25223    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
25224  fi
25225
25226  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
25227
25228  if test "x$BOOT_JDK_FOUND" = xno; then
25229    # Now execute the test
25230
25231  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25232    # First check at user selected default
25233
25234  if test "x$BOOT_JDK_FOUND" = xno; then
25235    # Now execute the test
25236
25237  if test -x /usr/libexec/java_home; then
25238    BOOT_JDK=`/usr/libexec/java_home `
25239    BOOT_JDK_FOUND=maybe
25240    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25241$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25242  fi
25243
25244
25245    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25246    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25247      # Do we have a bin/java?
25248      if test ! -x "$BOOT_JDK/bin/java"; then
25249        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25250$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25251        BOOT_JDK_FOUND=no
25252      else
25253        # Do we have a bin/javac?
25254        if test ! -x "$BOOT_JDK/bin/javac"; then
25255          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25256$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25257          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25258$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25259          BOOT_JDK_FOUND=no
25260        else
25261          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25262          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25263
25264          # Extra M4 quote needed to protect [] in grep expression.
25265          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25266          if test "x$FOUND_CORRECT_VERSION" = x; then
25267            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25268$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25269            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25270$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25271            BOOT_JDK_FOUND=no
25272          else
25273            # We're done! :-)
25274            BOOT_JDK_FOUND=yes
25275
25276  # Only process if variable expands to non-empty
25277
25278  if test "x$BOOT_JDK" != x; then
25279    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25280
25281  # Input might be given as Windows format, start by converting to
25282  # unix format.
25283  path="$BOOT_JDK"
25284  new_path=`$CYGPATH -u "$path"`
25285
25286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25289  # "foo.exe" is OK but "foo" is an error.
25290  #
25291  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25292  # It is also a way to make sure we got the proper file name for the real test later on.
25293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25294  if test "x$test_shortpath" = x; then
25295    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25296$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25297    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25298  fi
25299
25300  # Call helper function which possibly converts this using DOS-style short mode.
25301  # If so, the updated path is stored in $new_path.
25302
25303  input_path="$new_path"
25304  # Check if we need to convert this using DOS-style short mode. If the path
25305  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25306  # take no chances and rewrite it.
25307  # Note: m4 eats our [], so we need to use [ and ] instead.
25308  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25309  if test "x$has_forbidden_chars" != x; then
25310    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25311    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25312    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25313    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25314      # Going to short mode and back again did indeed matter. Since short mode is
25315      # case insensitive, let's make it lowercase to improve readability.
25316      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25317      # Now convert it back to Unix-style (cygpath)
25318      input_path=`$CYGPATH -u "$shortmode_path"`
25319      new_path="$input_path"
25320    fi
25321  fi
25322
25323  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25324  if test "x$test_cygdrive_prefix" = x; then
25325    # As a simple fix, exclude /usr/bin since it's not a real path.
25326    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25327      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25328      # a path prefixed by /cygdrive for fixpath to work.
25329      new_path="$CYGWIN_ROOT_PATH$input_path"
25330    fi
25331  fi
25332
25333
25334  if test "x$path" != "x$new_path"; then
25335    BOOT_JDK="$new_path"
25336    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25337$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25338  fi
25339
25340    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25341
25342  path="$BOOT_JDK"
25343  has_colon=`$ECHO $path | $GREP ^.:`
25344  new_path="$path"
25345  if test "x$has_colon" = x; then
25346    # Not in mixed or Windows style, start by that.
25347    new_path=`cmd //c echo $path`
25348  fi
25349
25350
25351  input_path="$new_path"
25352  # Check if we need to convert this using DOS-style short mode. If the path
25353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25354  # take no chances and rewrite it.
25355  # Note: m4 eats our [], so we need to use [ and ] instead.
25356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25357  if test "x$has_forbidden_chars" != x; then
25358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25359    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25360  fi
25361
25362
25363  windows_path="$new_path"
25364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25365    unix_path=`$CYGPATH -u "$windows_path"`
25366    new_path="$unix_path"
25367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25369    new_path="$unix_path"
25370  fi
25371
25372  if test "x$path" != "x$new_path"; then
25373    BOOT_JDK="$new_path"
25374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25375$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25376  fi
25377
25378  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25379  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25380
25381    else
25382      # We're on a unix platform. Hooray! :)
25383      path="$BOOT_JDK"
25384      has_space=`$ECHO "$path" | $GREP " "`
25385      if test "x$has_space" != x; then
25386        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25387$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25388        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25389      fi
25390
25391      # Use eval to expand a potential ~
25392      eval path="$path"
25393      if test ! -f "$path" && test ! -d "$path"; then
25394        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25395      fi
25396
25397      if test -d "$path"; then
25398        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25399      else
25400        dir="`$DIRNAME "$path"`"
25401        base="`$BASENAME "$path"`"
25402        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25403      fi
25404    fi
25405  fi
25406
25407            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25408$as_echo_n "checking for Boot JDK... " >&6; }
25409            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25410$as_echo "$BOOT_JDK" >&6; }
25411            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25412$as_echo_n "checking Boot JDK version... " >&6; }
25413            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25415$as_echo "$BOOT_JDK_VERSION" >&6; }
25416          fi # end check jdk version
25417        fi # end check javac
25418      fi # end check java
25419    fi # end check boot jdk found
25420  fi
25421
25422    # If that did not work out (e.g. too old), try explicit versions instead
25423
25424  if test "x$BOOT_JDK_FOUND" = xno; then
25425    # Now execute the test
25426
25427  if test -x /usr/libexec/java_home; then
25428    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25429    BOOT_JDK_FOUND=maybe
25430    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25431$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25432  fi
25433
25434
25435    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25436    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25437      # Do we have a bin/java?
25438      if test ! -x "$BOOT_JDK/bin/java"; then
25439        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25441        BOOT_JDK_FOUND=no
25442      else
25443        # Do we have a bin/javac?
25444        if test ! -x "$BOOT_JDK/bin/javac"; then
25445          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25447          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25448$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25449          BOOT_JDK_FOUND=no
25450        else
25451          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25452          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25453
25454          # Extra M4 quote needed to protect [] in grep expression.
25455          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25456          if test "x$FOUND_CORRECT_VERSION" = x; then
25457            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25458$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25459            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25460$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25461            BOOT_JDK_FOUND=no
25462          else
25463            # We're done! :-)
25464            BOOT_JDK_FOUND=yes
25465
25466  # Only process if variable expands to non-empty
25467
25468  if test "x$BOOT_JDK" != x; then
25469    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25470
25471  # Input might be given as Windows format, start by converting to
25472  # unix format.
25473  path="$BOOT_JDK"
25474  new_path=`$CYGPATH -u "$path"`
25475
25476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25479  # "foo.exe" is OK but "foo" is an error.
25480  #
25481  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25482  # It is also a way to make sure we got the proper file name for the real test later on.
25483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25484  if test "x$test_shortpath" = x; then
25485    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25486$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25487    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25488  fi
25489
25490  # Call helper function which possibly converts this using DOS-style short mode.
25491  # If so, the updated path is stored in $new_path.
25492
25493  input_path="$new_path"
25494  # Check if we need to convert this using DOS-style short mode. If the path
25495  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25496  # take no chances and rewrite it.
25497  # Note: m4 eats our [], so we need to use [ and ] instead.
25498  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25499  if test "x$has_forbidden_chars" != x; then
25500    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25501    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25502    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25503    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25504      # Going to short mode and back again did indeed matter. Since short mode is
25505      # case insensitive, let's make it lowercase to improve readability.
25506      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25507      # Now convert it back to Unix-style (cygpath)
25508      input_path=`$CYGPATH -u "$shortmode_path"`
25509      new_path="$input_path"
25510    fi
25511  fi
25512
25513  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25514  if test "x$test_cygdrive_prefix" = x; then
25515    # As a simple fix, exclude /usr/bin since it's not a real path.
25516    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25517      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25518      # a path prefixed by /cygdrive for fixpath to work.
25519      new_path="$CYGWIN_ROOT_PATH$input_path"
25520    fi
25521  fi
25522
25523
25524  if test "x$path" != "x$new_path"; then
25525    BOOT_JDK="$new_path"
25526    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25527$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25528  fi
25529
25530    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25531
25532  path="$BOOT_JDK"
25533  has_colon=`$ECHO $path | $GREP ^.:`
25534  new_path="$path"
25535  if test "x$has_colon" = x; then
25536    # Not in mixed or Windows style, start by that.
25537    new_path=`cmd //c echo $path`
25538  fi
25539
25540
25541  input_path="$new_path"
25542  # Check if we need to convert this using DOS-style short mode. If the path
25543  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25544  # take no chances and rewrite it.
25545  # Note: m4 eats our [], so we need to use [ and ] instead.
25546  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25547  if test "x$has_forbidden_chars" != x; then
25548    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25549    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25550  fi
25551
25552
25553  windows_path="$new_path"
25554  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25555    unix_path=`$CYGPATH -u "$windows_path"`
25556    new_path="$unix_path"
25557  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25558    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25559    new_path="$unix_path"
25560  fi
25561
25562  if test "x$path" != "x$new_path"; then
25563    BOOT_JDK="$new_path"
25564    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25565$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25566  fi
25567
25568  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25569  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25570
25571    else
25572      # We're on a unix platform. Hooray! :)
25573      path="$BOOT_JDK"
25574      has_space=`$ECHO "$path" | $GREP " "`
25575      if test "x$has_space" != x; then
25576        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25577$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25578        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25579      fi
25580
25581      # Use eval to expand a potential ~
25582      eval path="$path"
25583      if test ! -f "$path" && test ! -d "$path"; then
25584        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25585      fi
25586
25587      if test -d "$path"; then
25588        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25589      else
25590        dir="`$DIRNAME "$path"`"
25591        base="`$BASENAME "$path"`"
25592        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25593      fi
25594    fi
25595  fi
25596
25597            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25598$as_echo_n "checking for Boot JDK... " >&6; }
25599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25600$as_echo "$BOOT_JDK" >&6; }
25601            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25602$as_echo_n "checking Boot JDK version... " >&6; }
25603            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25605$as_echo "$BOOT_JDK_VERSION" >&6; }
25606          fi # end check jdk version
25607        fi # end check javac
25608      fi # end check java
25609    fi # end check boot jdk found
25610  fi
25611
25612
25613  if test "x$BOOT_JDK_FOUND" = xno; then
25614    # Now execute the test
25615
25616  if test -x /usr/libexec/java_home; then
25617    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25618    BOOT_JDK_FOUND=maybe
25619    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25620$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25621  fi
25622
25623
25624    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25625    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25626      # Do we have a bin/java?
25627      if test ! -x "$BOOT_JDK/bin/java"; then
25628        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25629$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25630        BOOT_JDK_FOUND=no
25631      else
25632        # Do we have a bin/javac?
25633        if test ! -x "$BOOT_JDK/bin/javac"; then
25634          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25636          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25637$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25638          BOOT_JDK_FOUND=no
25639        else
25640          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25641          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25642
25643          # Extra M4 quote needed to protect [] in grep expression.
25644          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25645          if test "x$FOUND_CORRECT_VERSION" = x; then
25646            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25647$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25648            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25649$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25650            BOOT_JDK_FOUND=no
25651          else
25652            # We're done! :-)
25653            BOOT_JDK_FOUND=yes
25654
25655  # Only process if variable expands to non-empty
25656
25657  if test "x$BOOT_JDK" != x; then
25658    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25659
25660  # Input might be given as Windows format, start by converting to
25661  # unix format.
25662  path="$BOOT_JDK"
25663  new_path=`$CYGPATH -u "$path"`
25664
25665  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25666  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25667  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25668  # "foo.exe" is OK but "foo" is an error.
25669  #
25670  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25671  # It is also a way to make sure we got the proper file name for the real test later on.
25672  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25673  if test "x$test_shortpath" = x; then
25674    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25675$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25676    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25677  fi
25678
25679  # Call helper function which possibly converts this using DOS-style short mode.
25680  # If so, the updated path is stored in $new_path.
25681
25682  input_path="$new_path"
25683  # Check if we need to convert this using DOS-style short mode. If the path
25684  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25685  # take no chances and rewrite it.
25686  # Note: m4 eats our [], so we need to use [ and ] instead.
25687  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25688  if test "x$has_forbidden_chars" != x; then
25689    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25690    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25691    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25692    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25693      # Going to short mode and back again did indeed matter. Since short mode is
25694      # case insensitive, let's make it lowercase to improve readability.
25695      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25696      # Now convert it back to Unix-style (cygpath)
25697      input_path=`$CYGPATH -u "$shortmode_path"`
25698      new_path="$input_path"
25699    fi
25700  fi
25701
25702  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25703  if test "x$test_cygdrive_prefix" = x; then
25704    # As a simple fix, exclude /usr/bin since it's not a real path.
25705    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25706      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25707      # a path prefixed by /cygdrive for fixpath to work.
25708      new_path="$CYGWIN_ROOT_PATH$input_path"
25709    fi
25710  fi
25711
25712
25713  if test "x$path" != "x$new_path"; then
25714    BOOT_JDK="$new_path"
25715    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25716$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25717  fi
25718
25719    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25720
25721  path="$BOOT_JDK"
25722  has_colon=`$ECHO $path | $GREP ^.:`
25723  new_path="$path"
25724  if test "x$has_colon" = x; then
25725    # Not in mixed or Windows style, start by that.
25726    new_path=`cmd //c echo $path`
25727  fi
25728
25729
25730  input_path="$new_path"
25731  # Check if we need to convert this using DOS-style short mode. If the path
25732  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25733  # take no chances and rewrite it.
25734  # Note: m4 eats our [], so we need to use [ and ] instead.
25735  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25736  if test "x$has_forbidden_chars" != x; then
25737    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25738    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25739  fi
25740
25741
25742  windows_path="$new_path"
25743  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25744    unix_path=`$CYGPATH -u "$windows_path"`
25745    new_path="$unix_path"
25746  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25747    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25748    new_path="$unix_path"
25749  fi
25750
25751  if test "x$path" != "x$new_path"; then
25752    BOOT_JDK="$new_path"
25753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25754$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25755  fi
25756
25757  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25758  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25759
25760    else
25761      # We're on a unix platform. Hooray! :)
25762      path="$BOOT_JDK"
25763      has_space=`$ECHO "$path" | $GREP " "`
25764      if test "x$has_space" != x; then
25765        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25766$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25767        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25768      fi
25769
25770      # Use eval to expand a potential ~
25771      eval path="$path"
25772      if test ! -f "$path" && test ! -d "$path"; then
25773        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25774      fi
25775
25776      if test -d "$path"; then
25777        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25778      else
25779        dir="`$DIRNAME "$path"`"
25780        base="`$BASENAME "$path"`"
25781        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25782      fi
25783    fi
25784  fi
25785
25786            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25787$as_echo_n "checking for Boot JDK... " >&6; }
25788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25789$as_echo "$BOOT_JDK" >&6; }
25790            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25791$as_echo_n "checking Boot JDK version... " >&6; }
25792            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25794$as_echo "$BOOT_JDK_VERSION" >&6; }
25795          fi # end check jdk version
25796        fi # end check javac
25797      fi # end check java
25798    fi # end check boot jdk found
25799  fi
25800
25801
25802  if test "x$BOOT_JDK_FOUND" = xno; then
25803    # Now execute the test
25804
25805  if test -x /usr/libexec/java_home; then
25806    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25807    BOOT_JDK_FOUND=maybe
25808    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25809$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25810  fi
25811
25812
25813    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25814    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25815      # Do we have a bin/java?
25816      if test ! -x "$BOOT_JDK/bin/java"; then
25817        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25818$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25819        BOOT_JDK_FOUND=no
25820      else
25821        # Do we have a bin/javac?
25822        if test ! -x "$BOOT_JDK/bin/javac"; then
25823          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25824$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25825          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25826$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25827          BOOT_JDK_FOUND=no
25828        else
25829          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25830          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25831
25832          # Extra M4 quote needed to protect [] in grep expression.
25833          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25834          if test "x$FOUND_CORRECT_VERSION" = x; then
25835            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25836$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25837            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25838$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25839            BOOT_JDK_FOUND=no
25840          else
25841            # We're done! :-)
25842            BOOT_JDK_FOUND=yes
25843
25844  # Only process if variable expands to non-empty
25845
25846  if test "x$BOOT_JDK" != x; then
25847    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25848
25849  # Input might be given as Windows format, start by converting to
25850  # unix format.
25851  path="$BOOT_JDK"
25852  new_path=`$CYGPATH -u "$path"`
25853
25854  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25855  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25856  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25857  # "foo.exe" is OK but "foo" is an error.
25858  #
25859  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25860  # It is also a way to make sure we got the proper file name for the real test later on.
25861  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25862  if test "x$test_shortpath" = x; then
25863    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25864$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25865    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25866  fi
25867
25868  # Call helper function which possibly converts this using DOS-style short mode.
25869  # If so, the updated path is stored in $new_path.
25870
25871  input_path="$new_path"
25872  # Check if we need to convert this using DOS-style short mode. If the path
25873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25874  # take no chances and rewrite it.
25875  # Note: m4 eats our [], so we need to use [ and ] instead.
25876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25877  if test "x$has_forbidden_chars" != x; then
25878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25879    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25880    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25881    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25882      # Going to short mode and back again did indeed matter. Since short mode is
25883      # case insensitive, let's make it lowercase to improve readability.
25884      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25885      # Now convert it back to Unix-style (cygpath)
25886      input_path=`$CYGPATH -u "$shortmode_path"`
25887      new_path="$input_path"
25888    fi
25889  fi
25890
25891  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25892  if test "x$test_cygdrive_prefix" = x; then
25893    # As a simple fix, exclude /usr/bin since it's not a real path.
25894    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25895      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25896      # a path prefixed by /cygdrive for fixpath to work.
25897      new_path="$CYGWIN_ROOT_PATH$input_path"
25898    fi
25899  fi
25900
25901
25902  if test "x$path" != "x$new_path"; then
25903    BOOT_JDK="$new_path"
25904    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25905$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25906  fi
25907
25908    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25909
25910  path="$BOOT_JDK"
25911  has_colon=`$ECHO $path | $GREP ^.:`
25912  new_path="$path"
25913  if test "x$has_colon" = x; then
25914    # Not in mixed or Windows style, start by that.
25915    new_path=`cmd //c echo $path`
25916  fi
25917
25918
25919  input_path="$new_path"
25920  # Check if we need to convert this using DOS-style short mode. If the path
25921  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25922  # take no chances and rewrite it.
25923  # Note: m4 eats our [], so we need to use [ and ] instead.
25924  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25925  if test "x$has_forbidden_chars" != x; then
25926    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25927    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25928  fi
25929
25930
25931  windows_path="$new_path"
25932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25933    unix_path=`$CYGPATH -u "$windows_path"`
25934    new_path="$unix_path"
25935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25937    new_path="$unix_path"
25938  fi
25939
25940  if test "x$path" != "x$new_path"; then
25941    BOOT_JDK="$new_path"
25942    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25943$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25944  fi
25945
25946  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25947  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25948
25949    else
25950      # We're on a unix platform. Hooray! :)
25951      path="$BOOT_JDK"
25952      has_space=`$ECHO "$path" | $GREP " "`
25953      if test "x$has_space" != x; then
25954        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25955$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25956        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25957      fi
25958
25959      # Use eval to expand a potential ~
25960      eval path="$path"
25961      if test ! -f "$path" && test ! -d "$path"; then
25962        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25963      fi
25964
25965      if test -d "$path"; then
25966        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25967      else
25968        dir="`$DIRNAME "$path"`"
25969        base="`$BASENAME "$path"`"
25970        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25971      fi
25972    fi
25973  fi
25974
25975            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25976$as_echo_n "checking for Boot JDK... " >&6; }
25977            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25978$as_echo "$BOOT_JDK" >&6; }
25979            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25980$as_echo_n "checking Boot JDK version... " >&6; }
25981            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25982            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25983$as_echo "$BOOT_JDK_VERSION" >&6; }
25984          fi # end check jdk version
25985        fi # end check javac
25986      fi # end check java
25987    fi # end check boot jdk found
25988  fi
25989
25990  fi
25991
25992
25993    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25994    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25995      # Do we have a bin/java?
25996      if test ! -x "$BOOT_JDK/bin/java"; then
25997        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25998$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25999        BOOT_JDK_FOUND=no
26000      else
26001        # Do we have a bin/javac?
26002        if test ! -x "$BOOT_JDK/bin/javac"; then
26003          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26004$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26005          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26006$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26007          BOOT_JDK_FOUND=no
26008        else
26009          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26010          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26011
26012          # Extra M4 quote needed to protect [] in grep expression.
26013          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26014          if test "x$FOUND_CORRECT_VERSION" = x; then
26015            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26016$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26017            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26018$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26019            BOOT_JDK_FOUND=no
26020          else
26021            # We're done! :-)
26022            BOOT_JDK_FOUND=yes
26023
26024  # Only process if variable expands to non-empty
26025
26026  if test "x$BOOT_JDK" != x; then
26027    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26028
26029  # Input might be given as Windows format, start by converting to
26030  # unix format.
26031  path="$BOOT_JDK"
26032  new_path=`$CYGPATH -u "$path"`
26033
26034  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26035  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26036  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26037  # "foo.exe" is OK but "foo" is an error.
26038  #
26039  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26040  # It is also a way to make sure we got the proper file name for the real test later on.
26041  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26042  if test "x$test_shortpath" = x; then
26043    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26044$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26045    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26046  fi
26047
26048  # Call helper function which possibly converts this using DOS-style short mode.
26049  # If so, the updated path is stored in $new_path.
26050
26051  input_path="$new_path"
26052  # Check if we need to convert this using DOS-style short mode. If the path
26053  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26054  # take no chances and rewrite it.
26055  # Note: m4 eats our [], so we need to use [ and ] instead.
26056  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26057  if test "x$has_forbidden_chars" != x; then
26058    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26059    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26060    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26061    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26062      # Going to short mode and back again did indeed matter. Since short mode is
26063      # case insensitive, let's make it lowercase to improve readability.
26064      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26065      # Now convert it back to Unix-style (cygpath)
26066      input_path=`$CYGPATH -u "$shortmode_path"`
26067      new_path="$input_path"
26068    fi
26069  fi
26070
26071  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26072  if test "x$test_cygdrive_prefix" = x; then
26073    # As a simple fix, exclude /usr/bin since it's not a real path.
26074    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26075      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26076      # a path prefixed by /cygdrive for fixpath to work.
26077      new_path="$CYGWIN_ROOT_PATH$input_path"
26078    fi
26079  fi
26080
26081
26082  if test "x$path" != "x$new_path"; then
26083    BOOT_JDK="$new_path"
26084    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26085$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26086  fi
26087
26088    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26089
26090  path="$BOOT_JDK"
26091  has_colon=`$ECHO $path | $GREP ^.:`
26092  new_path="$path"
26093  if test "x$has_colon" = x; then
26094    # Not in mixed or Windows style, start by that.
26095    new_path=`cmd //c echo $path`
26096  fi
26097
26098
26099  input_path="$new_path"
26100  # Check if we need to convert this using DOS-style short mode. If the path
26101  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26102  # take no chances and rewrite it.
26103  # Note: m4 eats our [], so we need to use [ and ] instead.
26104  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26105  if test "x$has_forbidden_chars" != x; then
26106    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26107    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26108  fi
26109
26110
26111  windows_path="$new_path"
26112  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26113    unix_path=`$CYGPATH -u "$windows_path"`
26114    new_path="$unix_path"
26115  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26116    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26117    new_path="$unix_path"
26118  fi
26119
26120  if test "x$path" != "x$new_path"; then
26121    BOOT_JDK="$new_path"
26122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26123$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26124  fi
26125
26126  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26127  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26128
26129    else
26130      # We're on a unix platform. Hooray! :)
26131      path="$BOOT_JDK"
26132      has_space=`$ECHO "$path" | $GREP " "`
26133      if test "x$has_space" != x; then
26134        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26135$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26136        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26137      fi
26138
26139      # Use eval to expand a potential ~
26140      eval path="$path"
26141      if test ! -f "$path" && test ! -d "$path"; then
26142        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26143      fi
26144
26145      if test -d "$path"; then
26146        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26147      else
26148        dir="`$DIRNAME "$path"`"
26149        base="`$BASENAME "$path"`"
26150        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26151      fi
26152    fi
26153  fi
26154
26155            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26156$as_echo_n "checking for Boot JDK... " >&6; }
26157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26158$as_echo "$BOOT_JDK" >&6; }
26159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26160$as_echo_n "checking Boot JDK version... " >&6; }
26161            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26162            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26163$as_echo "$BOOT_JDK_VERSION" >&6; }
26164          fi # end check jdk version
26165        fi # end check javac
26166      fi # end check java
26167    fi # end check boot jdk found
26168  fi
26169
26170
26171  # Test: Is $JAVA_HOME set?
26172
26173  if test "x$BOOT_JDK_FOUND" = xno; then
26174    # Now execute the test
26175
26176  if test "x$JAVA_HOME" != x; then
26177    JAVA_HOME_PROCESSED="$JAVA_HOME"
26178
26179  # Only process if variable expands to non-empty
26180
26181  if test "x$JAVA_HOME_PROCESSED" != x; then
26182    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26183
26184  # Input might be given as Windows format, start by converting to
26185  # unix format.
26186  path="$JAVA_HOME_PROCESSED"
26187  new_path=`$CYGPATH -u "$path"`
26188
26189  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26190  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26191  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26192  # "foo.exe" is OK but "foo" is an error.
26193  #
26194  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26195  # It is also a way to make sure we got the proper file name for the real test later on.
26196  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26197  if test "x$test_shortpath" = x; then
26198    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26199$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26200    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
26201  fi
26202
26203  # Call helper function which possibly converts this using DOS-style short mode.
26204  # If so, the updated path is stored in $new_path.
26205
26206  input_path="$new_path"
26207  # Check if we need to convert this using DOS-style short mode. If the path
26208  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26209  # take no chances and rewrite it.
26210  # Note: m4 eats our [], so we need to use [ and ] instead.
26211  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26212  if test "x$has_forbidden_chars" != x; then
26213    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26214    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26215    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26216    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26217      # Going to short mode and back again did indeed matter. Since short mode is
26218      # case insensitive, let's make it lowercase to improve readability.
26219      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26220      # Now convert it back to Unix-style (cygpath)
26221      input_path=`$CYGPATH -u "$shortmode_path"`
26222      new_path="$input_path"
26223    fi
26224  fi
26225
26226  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26227  if test "x$test_cygdrive_prefix" = x; then
26228    # As a simple fix, exclude /usr/bin since it's not a real path.
26229    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26230      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26231      # a path prefixed by /cygdrive for fixpath to work.
26232      new_path="$CYGWIN_ROOT_PATH$input_path"
26233    fi
26234  fi
26235
26236
26237  if test "x$path" != "x$new_path"; then
26238    JAVA_HOME_PROCESSED="$new_path"
26239    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26240$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26241  fi
26242
26243    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26244
26245  path="$JAVA_HOME_PROCESSED"
26246  has_colon=`$ECHO $path | $GREP ^.:`
26247  new_path="$path"
26248  if test "x$has_colon" = x; then
26249    # Not in mixed or Windows style, start by that.
26250    new_path=`cmd //c echo $path`
26251  fi
26252
26253
26254  input_path="$new_path"
26255  # Check if we need to convert this using DOS-style short mode. If the path
26256  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26257  # take no chances and rewrite it.
26258  # Note: m4 eats our [], so we need to use [ and ] instead.
26259  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26260  if test "x$has_forbidden_chars" != x; then
26261    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26262    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26263  fi
26264
26265
26266  windows_path="$new_path"
26267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26268    unix_path=`$CYGPATH -u "$windows_path"`
26269    new_path="$unix_path"
26270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26272    new_path="$unix_path"
26273  fi
26274
26275  if test "x$path" != "x$new_path"; then
26276    JAVA_HOME_PROCESSED="$new_path"
26277    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26278$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26279  fi
26280
26281  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26282  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26283
26284    else
26285      # We're on a unix platform. Hooray! :)
26286      path="$JAVA_HOME_PROCESSED"
26287      has_space=`$ECHO "$path" | $GREP " "`
26288      if test "x$has_space" != x; then
26289        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26290$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26291        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26292      fi
26293
26294      # Use eval to expand a potential ~
26295      eval path="$path"
26296      if test ! -f "$path" && test ! -d "$path"; then
26297        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26298      fi
26299
26300      if test -d "$path"; then
26301        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26302      else
26303        dir="`$DIRNAME "$path"`"
26304        base="`$BASENAME "$path"`"
26305        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26306      fi
26307    fi
26308  fi
26309
26310    if test ! -d "$JAVA_HOME_PROCESSED"; then
26311      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26312$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26313    else
26314      # Aha, the user has set a JAVA_HOME
26315      # let us use that as the Boot JDK.
26316      BOOT_JDK="$JAVA_HOME_PROCESSED"
26317      BOOT_JDK_FOUND=maybe
26318      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26319$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26320    fi
26321  fi
26322
26323
26324    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26325    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26326      # Do we have a bin/java?
26327      if test ! -x "$BOOT_JDK/bin/java"; then
26328        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26329$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26330        BOOT_JDK_FOUND=no
26331      else
26332        # Do we have a bin/javac?
26333        if test ! -x "$BOOT_JDK/bin/javac"; then
26334          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26335$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26336          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26337$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26338          BOOT_JDK_FOUND=no
26339        else
26340          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26341          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26342
26343          # Extra M4 quote needed to protect [] in grep expression.
26344          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26345          if test "x$FOUND_CORRECT_VERSION" = x; then
26346            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26347$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26348            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26349$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26350            BOOT_JDK_FOUND=no
26351          else
26352            # We're done! :-)
26353            BOOT_JDK_FOUND=yes
26354
26355  # Only process if variable expands to non-empty
26356
26357  if test "x$BOOT_JDK" != x; then
26358    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26359
26360  # Input might be given as Windows format, start by converting to
26361  # unix format.
26362  path="$BOOT_JDK"
26363  new_path=`$CYGPATH -u "$path"`
26364
26365  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26366  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26367  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26368  # "foo.exe" is OK but "foo" is an error.
26369  #
26370  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26371  # It is also a way to make sure we got the proper file name for the real test later on.
26372  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26373  if test "x$test_shortpath" = x; then
26374    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26375$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26376    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26377  fi
26378
26379  # Call helper function which possibly converts this using DOS-style short mode.
26380  # If so, the updated path is stored in $new_path.
26381
26382  input_path="$new_path"
26383  # Check if we need to convert this using DOS-style short mode. If the path
26384  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26385  # take no chances and rewrite it.
26386  # Note: m4 eats our [], so we need to use [ and ] instead.
26387  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26388  if test "x$has_forbidden_chars" != x; then
26389    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26390    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26391    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26392    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26393      # Going to short mode and back again did indeed matter. Since short mode is
26394      # case insensitive, let's make it lowercase to improve readability.
26395      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26396      # Now convert it back to Unix-style (cygpath)
26397      input_path=`$CYGPATH -u "$shortmode_path"`
26398      new_path="$input_path"
26399    fi
26400  fi
26401
26402  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26403  if test "x$test_cygdrive_prefix" = x; then
26404    # As a simple fix, exclude /usr/bin since it's not a real path.
26405    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26406      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26407      # a path prefixed by /cygdrive for fixpath to work.
26408      new_path="$CYGWIN_ROOT_PATH$input_path"
26409    fi
26410  fi
26411
26412
26413  if test "x$path" != "x$new_path"; then
26414    BOOT_JDK="$new_path"
26415    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26416$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26417  fi
26418
26419    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26420
26421  path="$BOOT_JDK"
26422  has_colon=`$ECHO $path | $GREP ^.:`
26423  new_path="$path"
26424  if test "x$has_colon" = x; then
26425    # Not in mixed or Windows style, start by that.
26426    new_path=`cmd //c echo $path`
26427  fi
26428
26429
26430  input_path="$new_path"
26431  # Check if we need to convert this using DOS-style short mode. If the path
26432  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26433  # take no chances and rewrite it.
26434  # Note: m4 eats our [], so we need to use [ and ] instead.
26435  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26436  if test "x$has_forbidden_chars" != x; then
26437    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26438    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26439  fi
26440
26441
26442  windows_path="$new_path"
26443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26444    unix_path=`$CYGPATH -u "$windows_path"`
26445    new_path="$unix_path"
26446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26448    new_path="$unix_path"
26449  fi
26450
26451  if test "x$path" != "x$new_path"; then
26452    BOOT_JDK="$new_path"
26453    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26454$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26455  fi
26456
26457  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26458  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26459
26460    else
26461      # We're on a unix platform. Hooray! :)
26462      path="$BOOT_JDK"
26463      has_space=`$ECHO "$path" | $GREP " "`
26464      if test "x$has_space" != x; then
26465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26466$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26467        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26468      fi
26469
26470      # Use eval to expand a potential ~
26471      eval path="$path"
26472      if test ! -f "$path" && test ! -d "$path"; then
26473        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26474      fi
26475
26476      if test -d "$path"; then
26477        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26478      else
26479        dir="`$DIRNAME "$path"`"
26480        base="`$BASENAME "$path"`"
26481        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26482      fi
26483    fi
26484  fi
26485
26486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26487$as_echo_n "checking for Boot JDK... " >&6; }
26488            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26489$as_echo "$BOOT_JDK" >&6; }
26490            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26491$as_echo_n "checking Boot JDK version... " >&6; }
26492            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26493            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26494$as_echo "$BOOT_JDK_VERSION" >&6; }
26495          fi # end check jdk version
26496        fi # end check javac
26497      fi # end check java
26498    fi # end check boot jdk found
26499  fi
26500
26501
26502  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26503
26504  if test "x$BOOT_JDK_FOUND" = xno; then
26505    # Now execute the test
26506
26507  # Extract the first word of "javac", so it can be a program name with args.
26508set dummy javac; ac_word=$2
26509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26510$as_echo_n "checking for $ac_word... " >&6; }
26511if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26512  $as_echo_n "(cached) " >&6
26513else
26514  case $JAVAC_CHECK in
26515  [\\/]* | ?:[\\/]*)
26516  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26517  ;;
26518  *)
26519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26520for as_dir in $PATH
26521do
26522  IFS=$as_save_IFS
26523  test -z "$as_dir" && as_dir=.
26524    for ac_exec_ext in '' $ac_executable_extensions; do
26525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26526    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26528    break 2
26529  fi
26530done
26531  done
26532IFS=$as_save_IFS
26533
26534  ;;
26535esac
26536fi
26537JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26538if test -n "$JAVAC_CHECK"; then
26539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26540$as_echo "$JAVAC_CHECK" >&6; }
26541else
26542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26543$as_echo "no" >&6; }
26544fi
26545
26546
26547  # Extract the first word of "java", so it can be a program name with args.
26548set dummy java; ac_word=$2
26549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26550$as_echo_n "checking for $ac_word... " >&6; }
26551if ${ac_cv_path_JAVA_CHECK+:} false; then :
26552  $as_echo_n "(cached) " >&6
26553else
26554  case $JAVA_CHECK in
26555  [\\/]* | ?:[\\/]*)
26556  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26557  ;;
26558  *)
26559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26560for as_dir in $PATH
26561do
26562  IFS=$as_save_IFS
26563  test -z "$as_dir" && as_dir=.
26564    for ac_exec_ext in '' $ac_executable_extensions; do
26565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26566    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26568    break 2
26569  fi
26570done
26571  done
26572IFS=$as_save_IFS
26573
26574  ;;
26575esac
26576fi
26577JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26578if test -n "$JAVA_CHECK"; then
26579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26580$as_echo "$JAVA_CHECK" >&6; }
26581else
26582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26583$as_echo "no" >&6; }
26584fi
26585
26586
26587  BINARY="$JAVAC_CHECK"
26588  if test "x$JAVAC_CHECK" = x; then
26589    BINARY="$JAVA_CHECK"
26590  fi
26591  if test "x$BINARY" != x; then
26592    # So there is a java(c) binary, it might be part of a JDK.
26593    # Lets find the JDK/JRE directory by following symbolic links.
26594    # Linux/GNU systems often have links from /usr/bin/java to
26595    # /etc/alternatives/java to the real JDK binary.
26596
26597  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26598    # Follow a chain of symbolic links. Use readlink
26599    # where it exists, else fall back to horribly
26600    # complicated shell code.
26601    if test "x$READLINK_TESTED" != yes; then
26602      # On MacOSX there is a readlink tool with a different
26603      # purpose than the GNU readlink tool. Check the found readlink.
26604      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26605      if test "x$ISGNU" = x; then
26606        # A readlink that we do not know how to use.
26607        # Are there other non-GNU readlinks out there?
26608        READLINK_TESTED=yes
26609        READLINK=
26610      fi
26611    fi
26612
26613    if test "x$READLINK" != x; then
26614      BINARY=`$READLINK -f $BINARY`
26615    else
26616      # Save the current directory for restoring afterwards
26617      STARTDIR=$PWD
26618      COUNTER=0
26619      sym_link_dir=`$DIRNAME $BINARY`
26620      sym_link_file=`$BASENAME $BINARY`
26621      cd $sym_link_dir
26622      # Use -P flag to resolve symlinks in directories.
26623      cd `$THEPWDCMD -P`
26624      sym_link_dir=`$THEPWDCMD -P`
26625      # Resolve file symlinks
26626      while test $COUNTER -lt 20; do
26627        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26628        if test "x$ISLINK" == x; then
26629          # This is not a symbolic link! We are done!
26630          break
26631        fi
26632        # Again resolve directory symlinks since the target of the just found
26633        # link could be in a different directory
26634        cd `$DIRNAME $ISLINK`
26635        sym_link_dir=`$THEPWDCMD -P`
26636        sym_link_file=`$BASENAME $ISLINK`
26637        let COUNTER=COUNTER+1
26638      done
26639      cd $STARTDIR
26640      BINARY=$sym_link_dir/$sym_link_file
26641    fi
26642  fi
26643
26644    BOOT_JDK=`dirname "$BINARY"`
26645    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26646    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26647      # Looks like we found ourselves an JDK
26648      BOOT_JDK_FOUND=maybe
26649      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26650$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26651    fi
26652  fi
26653
26654
26655    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26656    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26657      # Do we have a bin/java?
26658      if test ! -x "$BOOT_JDK/bin/java"; then
26659        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26660$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26661        BOOT_JDK_FOUND=no
26662      else
26663        # Do we have a bin/javac?
26664        if test ! -x "$BOOT_JDK/bin/javac"; then
26665          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26667          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26668$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26669          BOOT_JDK_FOUND=no
26670        else
26671          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26672          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26673
26674          # Extra M4 quote needed to protect [] in grep expression.
26675          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26676          if test "x$FOUND_CORRECT_VERSION" = x; then
26677            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26678$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26679            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26680$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26681            BOOT_JDK_FOUND=no
26682          else
26683            # We're done! :-)
26684            BOOT_JDK_FOUND=yes
26685
26686  # Only process if variable expands to non-empty
26687
26688  if test "x$BOOT_JDK" != x; then
26689    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26690
26691  # Input might be given as Windows format, start by converting to
26692  # unix format.
26693  path="$BOOT_JDK"
26694  new_path=`$CYGPATH -u "$path"`
26695
26696  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26697  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26698  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26699  # "foo.exe" is OK but "foo" is an error.
26700  #
26701  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26702  # It is also a way to make sure we got the proper file name for the real test later on.
26703  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26704  if test "x$test_shortpath" = x; then
26705    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26706$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26707    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26708  fi
26709
26710  # Call helper function which possibly converts this using DOS-style short mode.
26711  # If so, the updated path is stored in $new_path.
26712
26713  input_path="$new_path"
26714  # Check if we need to convert this using DOS-style short mode. If the path
26715  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26716  # take no chances and rewrite it.
26717  # Note: m4 eats our [], so we need to use [ and ] instead.
26718  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26719  if test "x$has_forbidden_chars" != x; then
26720    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26721    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26722    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26723    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26724      # Going to short mode and back again did indeed matter. Since short mode is
26725      # case insensitive, let's make it lowercase to improve readability.
26726      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26727      # Now convert it back to Unix-style (cygpath)
26728      input_path=`$CYGPATH -u "$shortmode_path"`
26729      new_path="$input_path"
26730    fi
26731  fi
26732
26733  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26734  if test "x$test_cygdrive_prefix" = x; then
26735    # As a simple fix, exclude /usr/bin since it's not a real path.
26736    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26737      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26738      # a path prefixed by /cygdrive for fixpath to work.
26739      new_path="$CYGWIN_ROOT_PATH$input_path"
26740    fi
26741  fi
26742
26743
26744  if test "x$path" != "x$new_path"; then
26745    BOOT_JDK="$new_path"
26746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26748  fi
26749
26750    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26751
26752  path="$BOOT_JDK"
26753  has_colon=`$ECHO $path | $GREP ^.:`
26754  new_path="$path"
26755  if test "x$has_colon" = x; then
26756    # Not in mixed or Windows style, start by that.
26757    new_path=`cmd //c echo $path`
26758  fi
26759
26760
26761  input_path="$new_path"
26762  # Check if we need to convert this using DOS-style short mode. If the path
26763  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26764  # take no chances and rewrite it.
26765  # Note: m4 eats our [], so we need to use [ and ] instead.
26766  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26767  if test "x$has_forbidden_chars" != x; then
26768    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26769    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26770  fi
26771
26772
26773  windows_path="$new_path"
26774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26775    unix_path=`$CYGPATH -u "$windows_path"`
26776    new_path="$unix_path"
26777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26779    new_path="$unix_path"
26780  fi
26781
26782  if test "x$path" != "x$new_path"; then
26783    BOOT_JDK="$new_path"
26784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26785$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26786  fi
26787
26788  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26789  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26790
26791    else
26792      # We're on a unix platform. Hooray! :)
26793      path="$BOOT_JDK"
26794      has_space=`$ECHO "$path" | $GREP " "`
26795      if test "x$has_space" != x; then
26796        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26797$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26798        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26799      fi
26800
26801      # Use eval to expand a potential ~
26802      eval path="$path"
26803      if test ! -f "$path" && test ! -d "$path"; then
26804        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26805      fi
26806
26807      if test -d "$path"; then
26808        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26809      else
26810        dir="`$DIRNAME "$path"`"
26811        base="`$BASENAME "$path"`"
26812        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26813      fi
26814    fi
26815  fi
26816
26817            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26818$as_echo_n "checking for Boot JDK... " >&6; }
26819            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26820$as_echo "$BOOT_JDK" >&6; }
26821            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26822$as_echo_n "checking Boot JDK version... " >&6; }
26823            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26824            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26825$as_echo "$BOOT_JDK_VERSION" >&6; }
26826          fi # end check jdk version
26827        fi # end check javac
26828      fi # end check java
26829    fi # end check boot jdk found
26830  fi
26831
26832
26833  # Test: Is there a JDK installed in default, well-known locations?
26834
26835  if test "x$BOOT_JDK_FOUND" = xno; then
26836    # Now execute the test
26837
26838  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26839
26840  if test "x$BOOT_JDK_FOUND" = xno; then
26841    # Now execute the test
26842
26843  if test "x$ProgramW6432" != x; then
26844    VIRTUAL_DIR="$ProgramW6432/Java"
26845
26846  windows_path="$VIRTUAL_DIR"
26847  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26848    unix_path=`$CYGPATH -u "$windows_path"`
26849    VIRTUAL_DIR="$unix_path"
26850  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26851    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26852    VIRTUAL_DIR="$unix_path"
26853  fi
26854
26855
26856  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26857  BOOT_JDK_SUFFIX=""
26858  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26859  if test "x$ALL_JDKS_FOUND" != x; then
26860    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26861
26862  if test "x$BOOT_JDK_FOUND" = xno; then
26863    # Now execute the test
26864
26865        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26866        if test -d "$BOOT_JDK"; then
26867          BOOT_JDK_FOUND=maybe
26868          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26869$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26870        fi
26871
26872
26873    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26874    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26875      # Do we have a bin/java?
26876      if test ! -x "$BOOT_JDK/bin/java"; then
26877        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26878$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26879        BOOT_JDK_FOUND=no
26880      else
26881        # Do we have a bin/javac?
26882        if test ! -x "$BOOT_JDK/bin/javac"; then
26883          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26884$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26885          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26886$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26887          BOOT_JDK_FOUND=no
26888        else
26889          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26890          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26891
26892          # Extra M4 quote needed to protect [] in grep expression.
26893          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26894          if test "x$FOUND_CORRECT_VERSION" = x; then
26895            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26896$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26897            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26898$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26899            BOOT_JDK_FOUND=no
26900          else
26901            # We're done! :-)
26902            BOOT_JDK_FOUND=yes
26903
26904  # Only process if variable expands to non-empty
26905
26906  if test "x$BOOT_JDK" != x; then
26907    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26908
26909  # Input might be given as Windows format, start by converting to
26910  # unix format.
26911  path="$BOOT_JDK"
26912  new_path=`$CYGPATH -u "$path"`
26913
26914  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26915  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26916  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26917  # "foo.exe" is OK but "foo" is an error.
26918  #
26919  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26920  # It is also a way to make sure we got the proper file name for the real test later on.
26921  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26922  if test "x$test_shortpath" = x; then
26923    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26924$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26925    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26926  fi
26927
26928  # Call helper function which possibly converts this using DOS-style short mode.
26929  # If so, the updated path is stored in $new_path.
26930
26931  input_path="$new_path"
26932  # Check if we need to convert this using DOS-style short mode. If the path
26933  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26934  # take no chances and rewrite it.
26935  # Note: m4 eats our [], so we need to use [ and ] instead.
26936  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26937  if test "x$has_forbidden_chars" != x; then
26938    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26939    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26940    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26941    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26942      # Going to short mode and back again did indeed matter. Since short mode is
26943      # case insensitive, let's make it lowercase to improve readability.
26944      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26945      # Now convert it back to Unix-style (cygpath)
26946      input_path=`$CYGPATH -u "$shortmode_path"`
26947      new_path="$input_path"
26948    fi
26949  fi
26950
26951  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26952  if test "x$test_cygdrive_prefix" = x; then
26953    # As a simple fix, exclude /usr/bin since it's not a real path.
26954    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26955      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26956      # a path prefixed by /cygdrive for fixpath to work.
26957      new_path="$CYGWIN_ROOT_PATH$input_path"
26958    fi
26959  fi
26960
26961
26962  if test "x$path" != "x$new_path"; then
26963    BOOT_JDK="$new_path"
26964    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26965$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26966  fi
26967
26968    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26969
26970  path="$BOOT_JDK"
26971  has_colon=`$ECHO $path | $GREP ^.:`
26972  new_path="$path"
26973  if test "x$has_colon" = x; then
26974    # Not in mixed or Windows style, start by that.
26975    new_path=`cmd //c echo $path`
26976  fi
26977
26978
26979  input_path="$new_path"
26980  # Check if we need to convert this using DOS-style short mode. If the path
26981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26982  # take no chances and rewrite it.
26983  # Note: m4 eats our [], so we need to use [ and ] instead.
26984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26985  if test "x$has_forbidden_chars" != x; then
26986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26988  fi
26989
26990
26991  windows_path="$new_path"
26992  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26993    unix_path=`$CYGPATH -u "$windows_path"`
26994    new_path="$unix_path"
26995  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26996    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26997    new_path="$unix_path"
26998  fi
26999
27000  if test "x$path" != "x$new_path"; then
27001    BOOT_JDK="$new_path"
27002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27003$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27004  fi
27005
27006  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27007  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27008
27009    else
27010      # We're on a unix platform. Hooray! :)
27011      path="$BOOT_JDK"
27012      has_space=`$ECHO "$path" | $GREP " "`
27013      if test "x$has_space" != x; then
27014        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27015$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27016        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27017      fi
27018
27019      # Use eval to expand a potential ~
27020      eval path="$path"
27021      if test ! -f "$path" && test ! -d "$path"; then
27022        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27023      fi
27024
27025      if test -d "$path"; then
27026        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27027      else
27028        dir="`$DIRNAME "$path"`"
27029        base="`$BASENAME "$path"`"
27030        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27031      fi
27032    fi
27033  fi
27034
27035            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27036$as_echo_n "checking for Boot JDK... " >&6; }
27037            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27038$as_echo "$BOOT_JDK" >&6; }
27039            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27040$as_echo_n "checking Boot JDK version... " >&6; }
27041            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27042            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27043$as_echo "$BOOT_JDK_VERSION" >&6; }
27044          fi # end check jdk version
27045        fi # end check javac
27046      fi # end check java
27047    fi # end check boot jdk found
27048  fi
27049
27050    done
27051  fi
27052
27053  fi
27054
27055
27056    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27057    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27058      # Do we have a bin/java?
27059      if test ! -x "$BOOT_JDK/bin/java"; then
27060        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27061$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27062        BOOT_JDK_FOUND=no
27063      else
27064        # Do we have a bin/javac?
27065        if test ! -x "$BOOT_JDK/bin/javac"; then
27066          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27067$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27068          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27069$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27070          BOOT_JDK_FOUND=no
27071        else
27072          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27073          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27074
27075          # Extra M4 quote needed to protect [] in grep expression.
27076          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27077          if test "x$FOUND_CORRECT_VERSION" = x; then
27078            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27079$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27080            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27081$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27082            BOOT_JDK_FOUND=no
27083          else
27084            # We're done! :-)
27085            BOOT_JDK_FOUND=yes
27086
27087  # Only process if variable expands to non-empty
27088
27089  if test "x$BOOT_JDK" != x; then
27090    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27091
27092  # Input might be given as Windows format, start by converting to
27093  # unix format.
27094  path="$BOOT_JDK"
27095  new_path=`$CYGPATH -u "$path"`
27096
27097  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27098  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27099  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27100  # "foo.exe" is OK but "foo" is an error.
27101  #
27102  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27103  # It is also a way to make sure we got the proper file name for the real test later on.
27104  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27105  if test "x$test_shortpath" = x; then
27106    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27107$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27108    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27109  fi
27110
27111  # Call helper function which possibly converts this using DOS-style short mode.
27112  # If so, the updated path is stored in $new_path.
27113
27114  input_path="$new_path"
27115  # Check if we need to convert this using DOS-style short mode. If the path
27116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27117  # take no chances and rewrite it.
27118  # Note: m4 eats our [], so we need to use [ and ] instead.
27119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27120  if test "x$has_forbidden_chars" != x; then
27121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27122    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27123    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27124    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27125      # Going to short mode and back again did indeed matter. Since short mode is
27126      # case insensitive, let's make it lowercase to improve readability.
27127      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27128      # Now convert it back to Unix-style (cygpath)
27129      input_path=`$CYGPATH -u "$shortmode_path"`
27130      new_path="$input_path"
27131    fi
27132  fi
27133
27134  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27135  if test "x$test_cygdrive_prefix" = x; then
27136    # As a simple fix, exclude /usr/bin since it's not a real path.
27137    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27138      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27139      # a path prefixed by /cygdrive for fixpath to work.
27140      new_path="$CYGWIN_ROOT_PATH$input_path"
27141    fi
27142  fi
27143
27144
27145  if test "x$path" != "x$new_path"; then
27146    BOOT_JDK="$new_path"
27147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27148$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27149  fi
27150
27151    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27152
27153  path="$BOOT_JDK"
27154  has_colon=`$ECHO $path | $GREP ^.:`
27155  new_path="$path"
27156  if test "x$has_colon" = x; then
27157    # Not in mixed or Windows style, start by that.
27158    new_path=`cmd //c echo $path`
27159  fi
27160
27161
27162  input_path="$new_path"
27163  # Check if we need to convert this using DOS-style short mode. If the path
27164  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27165  # take no chances and rewrite it.
27166  # Note: m4 eats our [], so we need to use [ and ] instead.
27167  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27168  if test "x$has_forbidden_chars" != x; then
27169    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27170    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27171  fi
27172
27173
27174  windows_path="$new_path"
27175  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27176    unix_path=`$CYGPATH -u "$windows_path"`
27177    new_path="$unix_path"
27178  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27179    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27180    new_path="$unix_path"
27181  fi
27182
27183  if test "x$path" != "x$new_path"; then
27184    BOOT_JDK="$new_path"
27185    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27186$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27187  fi
27188
27189  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27190  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27191
27192    else
27193      # We're on a unix platform. Hooray! :)
27194      path="$BOOT_JDK"
27195      has_space=`$ECHO "$path" | $GREP " "`
27196      if test "x$has_space" != x; then
27197        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27198$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27199        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27200      fi
27201
27202      # Use eval to expand a potential ~
27203      eval path="$path"
27204      if test ! -f "$path" && test ! -d "$path"; then
27205        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27206      fi
27207
27208      if test -d "$path"; then
27209        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27210      else
27211        dir="`$DIRNAME "$path"`"
27212        base="`$BASENAME "$path"`"
27213        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27214      fi
27215    fi
27216  fi
27217
27218            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27219$as_echo_n "checking for Boot JDK... " >&6; }
27220            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27221$as_echo "$BOOT_JDK" >&6; }
27222            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27223$as_echo_n "checking Boot JDK version... " >&6; }
27224            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27225            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27226$as_echo "$BOOT_JDK_VERSION" >&6; }
27227          fi # end check jdk version
27228        fi # end check javac
27229      fi # end check java
27230    fi # end check boot jdk found
27231  fi
27232
27233
27234  if test "x$BOOT_JDK_FOUND" = xno; then
27235    # Now execute the test
27236
27237  if test "x$PROGRAMW6432" != x; then
27238    VIRTUAL_DIR="$PROGRAMW6432/Java"
27239
27240  windows_path="$VIRTUAL_DIR"
27241  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27242    unix_path=`$CYGPATH -u "$windows_path"`
27243    VIRTUAL_DIR="$unix_path"
27244  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27245    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27246    VIRTUAL_DIR="$unix_path"
27247  fi
27248
27249
27250  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27251  BOOT_JDK_SUFFIX=""
27252  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27253  if test "x$ALL_JDKS_FOUND" != x; then
27254    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27255
27256  if test "x$BOOT_JDK_FOUND" = xno; then
27257    # Now execute the test
27258
27259        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27260        if test -d "$BOOT_JDK"; then
27261          BOOT_JDK_FOUND=maybe
27262          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27263$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27264        fi
27265
27266
27267    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27268    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27269      # Do we have a bin/java?
27270      if test ! -x "$BOOT_JDK/bin/java"; then
27271        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27272$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27273        BOOT_JDK_FOUND=no
27274      else
27275        # Do we have a bin/javac?
27276        if test ! -x "$BOOT_JDK/bin/javac"; then
27277          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27278$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27279          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27280$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27281          BOOT_JDK_FOUND=no
27282        else
27283          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27284          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27285
27286          # Extra M4 quote needed to protect [] in grep expression.
27287          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27288          if test "x$FOUND_CORRECT_VERSION" = x; then
27289            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27290$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27291            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27292$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27293            BOOT_JDK_FOUND=no
27294          else
27295            # We're done! :-)
27296            BOOT_JDK_FOUND=yes
27297
27298  # Only process if variable expands to non-empty
27299
27300  if test "x$BOOT_JDK" != x; then
27301    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27302
27303  # Input might be given as Windows format, start by converting to
27304  # unix format.
27305  path="$BOOT_JDK"
27306  new_path=`$CYGPATH -u "$path"`
27307
27308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27311  # "foo.exe" is OK but "foo" is an error.
27312  #
27313  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27314  # It is also a way to make sure we got the proper file name for the real test later on.
27315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27316  if test "x$test_shortpath" = x; then
27317    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27318$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27319    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27320  fi
27321
27322  # Call helper function which possibly converts this using DOS-style short mode.
27323  # If so, the updated path is stored in $new_path.
27324
27325  input_path="$new_path"
27326  # Check if we need to convert this using DOS-style short mode. If the path
27327  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27328  # take no chances and rewrite it.
27329  # Note: m4 eats our [], so we need to use [ and ] instead.
27330  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27331  if test "x$has_forbidden_chars" != x; then
27332    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27333    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27334    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27335    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27336      # Going to short mode and back again did indeed matter. Since short mode is
27337      # case insensitive, let's make it lowercase to improve readability.
27338      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27339      # Now convert it back to Unix-style (cygpath)
27340      input_path=`$CYGPATH -u "$shortmode_path"`
27341      new_path="$input_path"
27342    fi
27343  fi
27344
27345  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27346  if test "x$test_cygdrive_prefix" = x; then
27347    # As a simple fix, exclude /usr/bin since it's not a real path.
27348    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27349      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27350      # a path prefixed by /cygdrive for fixpath to work.
27351      new_path="$CYGWIN_ROOT_PATH$input_path"
27352    fi
27353  fi
27354
27355
27356  if test "x$path" != "x$new_path"; then
27357    BOOT_JDK="$new_path"
27358    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27359$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27360  fi
27361
27362    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27363
27364  path="$BOOT_JDK"
27365  has_colon=`$ECHO $path | $GREP ^.:`
27366  new_path="$path"
27367  if test "x$has_colon" = x; then
27368    # Not in mixed or Windows style, start by that.
27369    new_path=`cmd //c echo $path`
27370  fi
27371
27372
27373  input_path="$new_path"
27374  # Check if we need to convert this using DOS-style short mode. If the path
27375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27376  # take no chances and rewrite it.
27377  # Note: m4 eats our [], so we need to use [ and ] instead.
27378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27379  if test "x$has_forbidden_chars" != x; then
27380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27381    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27382  fi
27383
27384
27385  windows_path="$new_path"
27386  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27387    unix_path=`$CYGPATH -u "$windows_path"`
27388    new_path="$unix_path"
27389  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27390    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27391    new_path="$unix_path"
27392  fi
27393
27394  if test "x$path" != "x$new_path"; then
27395    BOOT_JDK="$new_path"
27396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27397$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27398  fi
27399
27400  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27401  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27402
27403    else
27404      # We're on a unix platform. Hooray! :)
27405      path="$BOOT_JDK"
27406      has_space=`$ECHO "$path" | $GREP " "`
27407      if test "x$has_space" != x; then
27408        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27409$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27410        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27411      fi
27412
27413      # Use eval to expand a potential ~
27414      eval path="$path"
27415      if test ! -f "$path" && test ! -d "$path"; then
27416        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27417      fi
27418
27419      if test -d "$path"; then
27420        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27421      else
27422        dir="`$DIRNAME "$path"`"
27423        base="`$BASENAME "$path"`"
27424        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27425      fi
27426    fi
27427  fi
27428
27429            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27430$as_echo_n "checking for Boot JDK... " >&6; }
27431            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27432$as_echo "$BOOT_JDK" >&6; }
27433            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27434$as_echo_n "checking Boot JDK version... " >&6; }
27435            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27437$as_echo "$BOOT_JDK_VERSION" >&6; }
27438          fi # end check jdk version
27439        fi # end check javac
27440      fi # end check java
27441    fi # end check boot jdk found
27442  fi
27443
27444    done
27445  fi
27446
27447  fi
27448
27449
27450    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27451    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27452      # Do we have a bin/java?
27453      if test ! -x "$BOOT_JDK/bin/java"; then
27454        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27455$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27456        BOOT_JDK_FOUND=no
27457      else
27458        # Do we have a bin/javac?
27459        if test ! -x "$BOOT_JDK/bin/javac"; then
27460          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27461$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27462          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27463$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27464          BOOT_JDK_FOUND=no
27465        else
27466          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27467          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27468
27469          # Extra M4 quote needed to protect [] in grep expression.
27470          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27471          if test "x$FOUND_CORRECT_VERSION" = x; then
27472            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27473$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27474            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27475$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27476            BOOT_JDK_FOUND=no
27477          else
27478            # We're done! :-)
27479            BOOT_JDK_FOUND=yes
27480
27481  # Only process if variable expands to non-empty
27482
27483  if test "x$BOOT_JDK" != x; then
27484    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27485
27486  # Input might be given as Windows format, start by converting to
27487  # unix format.
27488  path="$BOOT_JDK"
27489  new_path=`$CYGPATH -u "$path"`
27490
27491  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27492  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27493  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27494  # "foo.exe" is OK but "foo" is an error.
27495  #
27496  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27497  # It is also a way to make sure we got the proper file name for the real test later on.
27498  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27499  if test "x$test_shortpath" = x; then
27500    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27501$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27502    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27503  fi
27504
27505  # Call helper function which possibly converts this using DOS-style short mode.
27506  # If so, the updated path is stored in $new_path.
27507
27508  input_path="$new_path"
27509  # Check if we need to convert this using DOS-style short mode. If the path
27510  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27511  # take no chances and rewrite it.
27512  # Note: m4 eats our [], so we need to use [ and ] instead.
27513  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27514  if test "x$has_forbidden_chars" != x; then
27515    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27516    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27517    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27518    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27519      # Going to short mode and back again did indeed matter. Since short mode is
27520      # case insensitive, let's make it lowercase to improve readability.
27521      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27522      # Now convert it back to Unix-style (cygpath)
27523      input_path=`$CYGPATH -u "$shortmode_path"`
27524      new_path="$input_path"
27525    fi
27526  fi
27527
27528  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27529  if test "x$test_cygdrive_prefix" = x; then
27530    # As a simple fix, exclude /usr/bin since it's not a real path.
27531    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27532      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27533      # a path prefixed by /cygdrive for fixpath to work.
27534      new_path="$CYGWIN_ROOT_PATH$input_path"
27535    fi
27536  fi
27537
27538
27539  if test "x$path" != "x$new_path"; then
27540    BOOT_JDK="$new_path"
27541    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27542$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27543  fi
27544
27545    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27546
27547  path="$BOOT_JDK"
27548  has_colon=`$ECHO $path | $GREP ^.:`
27549  new_path="$path"
27550  if test "x$has_colon" = x; then
27551    # Not in mixed or Windows style, start by that.
27552    new_path=`cmd //c echo $path`
27553  fi
27554
27555
27556  input_path="$new_path"
27557  # Check if we need to convert this using DOS-style short mode. If the path
27558  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27559  # take no chances and rewrite it.
27560  # Note: m4 eats our [], so we need to use [ and ] instead.
27561  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27562  if test "x$has_forbidden_chars" != x; then
27563    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27564    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27565  fi
27566
27567
27568  windows_path="$new_path"
27569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27570    unix_path=`$CYGPATH -u "$windows_path"`
27571    new_path="$unix_path"
27572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27574    new_path="$unix_path"
27575  fi
27576
27577  if test "x$path" != "x$new_path"; then
27578    BOOT_JDK="$new_path"
27579    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27580$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27581  fi
27582
27583  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27584  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27585
27586    else
27587      # We're on a unix platform. Hooray! :)
27588      path="$BOOT_JDK"
27589      has_space=`$ECHO "$path" | $GREP " "`
27590      if test "x$has_space" != x; then
27591        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27592$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27593        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27594      fi
27595
27596      # Use eval to expand a potential ~
27597      eval path="$path"
27598      if test ! -f "$path" && test ! -d "$path"; then
27599        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27600      fi
27601
27602      if test -d "$path"; then
27603        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27604      else
27605        dir="`$DIRNAME "$path"`"
27606        base="`$BASENAME "$path"`"
27607        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27608      fi
27609    fi
27610  fi
27611
27612            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27613$as_echo_n "checking for Boot JDK... " >&6; }
27614            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27615$as_echo "$BOOT_JDK" >&6; }
27616            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27617$as_echo_n "checking Boot JDK version... " >&6; }
27618            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27619            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27620$as_echo "$BOOT_JDK_VERSION" >&6; }
27621          fi # end check jdk version
27622        fi # end check javac
27623      fi # end check java
27624    fi # end check boot jdk found
27625  fi
27626
27627
27628  if test "x$BOOT_JDK_FOUND" = xno; then
27629    # Now execute the test
27630
27631  if test "x$PROGRAMFILES" != x; then
27632    VIRTUAL_DIR="$PROGRAMFILES/Java"
27633
27634  windows_path="$VIRTUAL_DIR"
27635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27636    unix_path=`$CYGPATH -u "$windows_path"`
27637    VIRTUAL_DIR="$unix_path"
27638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27640    VIRTUAL_DIR="$unix_path"
27641  fi
27642
27643
27644  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27645  BOOT_JDK_SUFFIX=""
27646  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27647  if test "x$ALL_JDKS_FOUND" != x; then
27648    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27649
27650  if test "x$BOOT_JDK_FOUND" = xno; then
27651    # Now execute the test
27652
27653        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27654        if test -d "$BOOT_JDK"; then
27655          BOOT_JDK_FOUND=maybe
27656          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27657$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27658        fi
27659
27660
27661    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27662    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27663      # Do we have a bin/java?
27664      if test ! -x "$BOOT_JDK/bin/java"; then
27665        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27666$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27667        BOOT_JDK_FOUND=no
27668      else
27669        # Do we have a bin/javac?
27670        if test ! -x "$BOOT_JDK/bin/javac"; then
27671          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27672$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27673          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27674$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27675          BOOT_JDK_FOUND=no
27676        else
27677          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27678          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27679
27680          # Extra M4 quote needed to protect [] in grep expression.
27681          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27682          if test "x$FOUND_CORRECT_VERSION" = x; then
27683            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27684$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27685            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27686$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27687            BOOT_JDK_FOUND=no
27688          else
27689            # We're done! :-)
27690            BOOT_JDK_FOUND=yes
27691
27692  # Only process if variable expands to non-empty
27693
27694  if test "x$BOOT_JDK" != x; then
27695    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27696
27697  # Input might be given as Windows format, start by converting to
27698  # unix format.
27699  path="$BOOT_JDK"
27700  new_path=`$CYGPATH -u "$path"`
27701
27702  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27703  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27704  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27705  # "foo.exe" is OK but "foo" is an error.
27706  #
27707  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27708  # It is also a way to make sure we got the proper file name for the real test later on.
27709  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27710  if test "x$test_shortpath" = x; then
27711    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27712$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27713    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27714  fi
27715
27716  # Call helper function which possibly converts this using DOS-style short mode.
27717  # If so, the updated path is stored in $new_path.
27718
27719  input_path="$new_path"
27720  # Check if we need to convert this using DOS-style short mode. If the path
27721  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27722  # take no chances and rewrite it.
27723  # Note: m4 eats our [], so we need to use [ and ] instead.
27724  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27725  if test "x$has_forbidden_chars" != x; then
27726    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27727    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27728    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27729    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27730      # Going to short mode and back again did indeed matter. Since short mode is
27731      # case insensitive, let's make it lowercase to improve readability.
27732      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27733      # Now convert it back to Unix-style (cygpath)
27734      input_path=`$CYGPATH -u "$shortmode_path"`
27735      new_path="$input_path"
27736    fi
27737  fi
27738
27739  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27740  if test "x$test_cygdrive_prefix" = x; then
27741    # As a simple fix, exclude /usr/bin since it's not a real path.
27742    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27743      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27744      # a path prefixed by /cygdrive for fixpath to work.
27745      new_path="$CYGWIN_ROOT_PATH$input_path"
27746    fi
27747  fi
27748
27749
27750  if test "x$path" != "x$new_path"; then
27751    BOOT_JDK="$new_path"
27752    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27753$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27754  fi
27755
27756    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27757
27758  path="$BOOT_JDK"
27759  has_colon=`$ECHO $path | $GREP ^.:`
27760  new_path="$path"
27761  if test "x$has_colon" = x; then
27762    # Not in mixed or Windows style, start by that.
27763    new_path=`cmd //c echo $path`
27764  fi
27765
27766
27767  input_path="$new_path"
27768  # Check if we need to convert this using DOS-style short mode. If the path
27769  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27770  # take no chances and rewrite it.
27771  # Note: m4 eats our [], so we need to use [ and ] instead.
27772  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27773  if test "x$has_forbidden_chars" != x; then
27774    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27775    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27776  fi
27777
27778
27779  windows_path="$new_path"
27780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27781    unix_path=`$CYGPATH -u "$windows_path"`
27782    new_path="$unix_path"
27783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27785    new_path="$unix_path"
27786  fi
27787
27788  if test "x$path" != "x$new_path"; then
27789    BOOT_JDK="$new_path"
27790    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27791$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27792  fi
27793
27794  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27795  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27796
27797    else
27798      # We're on a unix platform. Hooray! :)
27799      path="$BOOT_JDK"
27800      has_space=`$ECHO "$path" | $GREP " "`
27801      if test "x$has_space" != x; then
27802        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27803$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27804        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27805      fi
27806
27807      # Use eval to expand a potential ~
27808      eval path="$path"
27809      if test ! -f "$path" && test ! -d "$path"; then
27810        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27811      fi
27812
27813      if test -d "$path"; then
27814        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27815      else
27816        dir="`$DIRNAME "$path"`"
27817        base="`$BASENAME "$path"`"
27818        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27819      fi
27820    fi
27821  fi
27822
27823            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27824$as_echo_n "checking for Boot JDK... " >&6; }
27825            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27826$as_echo "$BOOT_JDK" >&6; }
27827            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27828$as_echo_n "checking Boot JDK version... " >&6; }
27829            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27831$as_echo "$BOOT_JDK_VERSION" >&6; }
27832          fi # end check jdk version
27833        fi # end check javac
27834      fi # end check java
27835    fi # end check boot jdk found
27836  fi
27837
27838    done
27839  fi
27840
27841  fi
27842
27843
27844    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27845    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27846      # Do we have a bin/java?
27847      if test ! -x "$BOOT_JDK/bin/java"; then
27848        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27849$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27850        BOOT_JDK_FOUND=no
27851      else
27852        # Do we have a bin/javac?
27853        if test ! -x "$BOOT_JDK/bin/javac"; then
27854          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27855$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27856          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27857$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27858          BOOT_JDK_FOUND=no
27859        else
27860          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27861          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27862
27863          # Extra M4 quote needed to protect [] in grep expression.
27864          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27865          if test "x$FOUND_CORRECT_VERSION" = x; then
27866            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27867$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27868            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27869$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27870            BOOT_JDK_FOUND=no
27871          else
27872            # We're done! :-)
27873            BOOT_JDK_FOUND=yes
27874
27875  # Only process if variable expands to non-empty
27876
27877  if test "x$BOOT_JDK" != x; then
27878    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27879
27880  # Input might be given as Windows format, start by converting to
27881  # unix format.
27882  path="$BOOT_JDK"
27883  new_path=`$CYGPATH -u "$path"`
27884
27885  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27886  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27887  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27888  # "foo.exe" is OK but "foo" is an error.
27889  #
27890  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27891  # It is also a way to make sure we got the proper file name for the real test later on.
27892  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27893  if test "x$test_shortpath" = x; then
27894    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27895$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27896    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27897  fi
27898
27899  # Call helper function which possibly converts this using DOS-style short mode.
27900  # If so, the updated path is stored in $new_path.
27901
27902  input_path="$new_path"
27903  # Check if we need to convert this using DOS-style short mode. If the path
27904  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27905  # take no chances and rewrite it.
27906  # Note: m4 eats our [], so we need to use [ and ] instead.
27907  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27908  if test "x$has_forbidden_chars" != x; then
27909    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27910    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27911    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27912    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27913      # Going to short mode and back again did indeed matter. Since short mode is
27914      # case insensitive, let's make it lowercase to improve readability.
27915      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27916      # Now convert it back to Unix-style (cygpath)
27917      input_path=`$CYGPATH -u "$shortmode_path"`
27918      new_path="$input_path"
27919    fi
27920  fi
27921
27922  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27923  if test "x$test_cygdrive_prefix" = x; then
27924    # As a simple fix, exclude /usr/bin since it's not a real path.
27925    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27926      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27927      # a path prefixed by /cygdrive for fixpath to work.
27928      new_path="$CYGWIN_ROOT_PATH$input_path"
27929    fi
27930  fi
27931
27932
27933  if test "x$path" != "x$new_path"; then
27934    BOOT_JDK="$new_path"
27935    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27936$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27937  fi
27938
27939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27940
27941  path="$BOOT_JDK"
27942  has_colon=`$ECHO $path | $GREP ^.:`
27943  new_path="$path"
27944  if test "x$has_colon" = x; then
27945    # Not in mixed or Windows style, start by that.
27946    new_path=`cmd //c echo $path`
27947  fi
27948
27949
27950  input_path="$new_path"
27951  # Check if we need to convert this using DOS-style short mode. If the path
27952  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27953  # take no chances and rewrite it.
27954  # Note: m4 eats our [], so we need to use [ and ] instead.
27955  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27956  if test "x$has_forbidden_chars" != x; then
27957    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27958    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27959  fi
27960
27961
27962  windows_path="$new_path"
27963  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27964    unix_path=`$CYGPATH -u "$windows_path"`
27965    new_path="$unix_path"
27966  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27967    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27968    new_path="$unix_path"
27969  fi
27970
27971  if test "x$path" != "x$new_path"; then
27972    BOOT_JDK="$new_path"
27973    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27974$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27975  fi
27976
27977  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27978  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27979
27980    else
27981      # We're on a unix platform. Hooray! :)
27982      path="$BOOT_JDK"
27983      has_space=`$ECHO "$path" | $GREP " "`
27984      if test "x$has_space" != x; then
27985        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27986$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27987        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27988      fi
27989
27990      # Use eval to expand a potential ~
27991      eval path="$path"
27992      if test ! -f "$path" && test ! -d "$path"; then
27993        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27994      fi
27995
27996      if test -d "$path"; then
27997        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27998      else
27999        dir="`$DIRNAME "$path"`"
28000        base="`$BASENAME "$path"`"
28001        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28002      fi
28003    fi
28004  fi
28005
28006            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28007$as_echo_n "checking for Boot JDK... " >&6; }
28008            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28009$as_echo "$BOOT_JDK" >&6; }
28010            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28011$as_echo_n "checking Boot JDK version... " >&6; }
28012            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28013            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28014$as_echo "$BOOT_JDK_VERSION" >&6; }
28015          fi # end check jdk version
28016        fi # end check javac
28017      fi # end check java
28018    fi # end check boot jdk found
28019  fi
28020
28021
28022  if test "x$BOOT_JDK_FOUND" = xno; then
28023    # Now execute the test
28024
28025  if test "x$ProgramFiles" != x; then
28026    VIRTUAL_DIR="$ProgramFiles/Java"
28027
28028  windows_path="$VIRTUAL_DIR"
28029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28030    unix_path=`$CYGPATH -u "$windows_path"`
28031    VIRTUAL_DIR="$unix_path"
28032  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28033    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28034    VIRTUAL_DIR="$unix_path"
28035  fi
28036
28037
28038  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
28039  BOOT_JDK_SUFFIX=""
28040  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28041  if test "x$ALL_JDKS_FOUND" != x; then
28042    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28043
28044  if test "x$BOOT_JDK_FOUND" = xno; then
28045    # Now execute the test
28046
28047        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28048        if test -d "$BOOT_JDK"; then
28049          BOOT_JDK_FOUND=maybe
28050          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28051$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28052        fi
28053
28054
28055    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28056    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28057      # Do we have a bin/java?
28058      if test ! -x "$BOOT_JDK/bin/java"; then
28059        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28060$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28061        BOOT_JDK_FOUND=no
28062      else
28063        # Do we have a bin/javac?
28064        if test ! -x "$BOOT_JDK/bin/javac"; then
28065          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28066$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28067          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28068$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28069          BOOT_JDK_FOUND=no
28070        else
28071          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28072          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28073
28074          # Extra M4 quote needed to protect [] in grep expression.
28075          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28076          if test "x$FOUND_CORRECT_VERSION" = x; then
28077            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28078$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28079            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28080$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28081            BOOT_JDK_FOUND=no
28082          else
28083            # We're done! :-)
28084            BOOT_JDK_FOUND=yes
28085
28086  # Only process if variable expands to non-empty
28087
28088  if test "x$BOOT_JDK" != x; then
28089    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28090
28091  # Input might be given as Windows format, start by converting to
28092  # unix format.
28093  path="$BOOT_JDK"
28094  new_path=`$CYGPATH -u "$path"`
28095
28096  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28097  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28098  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28099  # "foo.exe" is OK but "foo" is an error.
28100  #
28101  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28102  # It is also a way to make sure we got the proper file name for the real test later on.
28103  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28104  if test "x$test_shortpath" = x; then
28105    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28106$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28107    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28108  fi
28109
28110  # Call helper function which possibly converts this using DOS-style short mode.
28111  # If so, the updated path is stored in $new_path.
28112
28113  input_path="$new_path"
28114  # Check if we need to convert this using DOS-style short mode. If the path
28115  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28116  # take no chances and rewrite it.
28117  # Note: m4 eats our [], so we need to use [ and ] instead.
28118  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28119  if test "x$has_forbidden_chars" != x; then
28120    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28121    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28122    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28123    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28124      # Going to short mode and back again did indeed matter. Since short mode is
28125      # case insensitive, let's make it lowercase to improve readability.
28126      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28127      # Now convert it back to Unix-style (cygpath)
28128      input_path=`$CYGPATH -u "$shortmode_path"`
28129      new_path="$input_path"
28130    fi
28131  fi
28132
28133  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28134  if test "x$test_cygdrive_prefix" = x; then
28135    # As a simple fix, exclude /usr/bin since it's not a real path.
28136    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28137      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28138      # a path prefixed by /cygdrive for fixpath to work.
28139      new_path="$CYGWIN_ROOT_PATH$input_path"
28140    fi
28141  fi
28142
28143
28144  if test "x$path" != "x$new_path"; then
28145    BOOT_JDK="$new_path"
28146    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28147$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28148  fi
28149
28150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28151
28152  path="$BOOT_JDK"
28153  has_colon=`$ECHO $path | $GREP ^.:`
28154  new_path="$path"
28155  if test "x$has_colon" = x; then
28156    # Not in mixed or Windows style, start by that.
28157    new_path=`cmd //c echo $path`
28158  fi
28159
28160
28161  input_path="$new_path"
28162  # Check if we need to convert this using DOS-style short mode. If the path
28163  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28164  # take no chances and rewrite it.
28165  # Note: m4 eats our [], so we need to use [ and ] instead.
28166  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28167  if test "x$has_forbidden_chars" != x; then
28168    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28169    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28170  fi
28171
28172
28173  windows_path="$new_path"
28174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28175    unix_path=`$CYGPATH -u "$windows_path"`
28176    new_path="$unix_path"
28177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28179    new_path="$unix_path"
28180  fi
28181
28182  if test "x$path" != "x$new_path"; then
28183    BOOT_JDK="$new_path"
28184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28186  fi
28187
28188  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28189  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28190
28191    else
28192      # We're on a unix platform. Hooray! :)
28193      path="$BOOT_JDK"
28194      has_space=`$ECHO "$path" | $GREP " "`
28195      if test "x$has_space" != x; then
28196        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28197$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28198        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28199      fi
28200
28201      # Use eval to expand a potential ~
28202      eval path="$path"
28203      if test ! -f "$path" && test ! -d "$path"; then
28204        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28205      fi
28206
28207      if test -d "$path"; then
28208        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28209      else
28210        dir="`$DIRNAME "$path"`"
28211        base="`$BASENAME "$path"`"
28212        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28213      fi
28214    fi
28215  fi
28216
28217            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28218$as_echo_n "checking for Boot JDK... " >&6; }
28219            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28220$as_echo "$BOOT_JDK" >&6; }
28221            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28222$as_echo_n "checking Boot JDK version... " >&6; }
28223            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28224            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28225$as_echo "$BOOT_JDK_VERSION" >&6; }
28226          fi # end check jdk version
28227        fi # end check javac
28228      fi # end check java
28229    fi # end check boot jdk found
28230  fi
28231
28232    done
28233  fi
28234
28235  fi
28236
28237
28238    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28239    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28240      # Do we have a bin/java?
28241      if test ! -x "$BOOT_JDK/bin/java"; then
28242        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28243$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28244        BOOT_JDK_FOUND=no
28245      else
28246        # Do we have a bin/javac?
28247        if test ! -x "$BOOT_JDK/bin/javac"; then
28248          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28249$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28250          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28251$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28252          BOOT_JDK_FOUND=no
28253        else
28254          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28255          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28256
28257          # Extra M4 quote needed to protect [] in grep expression.
28258          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28259          if test "x$FOUND_CORRECT_VERSION" = x; then
28260            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28261$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28262            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28263$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28264            BOOT_JDK_FOUND=no
28265          else
28266            # We're done! :-)
28267            BOOT_JDK_FOUND=yes
28268
28269  # Only process if variable expands to non-empty
28270
28271  if test "x$BOOT_JDK" != x; then
28272    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28273
28274  # Input might be given as Windows format, start by converting to
28275  # unix format.
28276  path="$BOOT_JDK"
28277  new_path=`$CYGPATH -u "$path"`
28278
28279  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28280  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28281  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28282  # "foo.exe" is OK but "foo" is an error.
28283  #
28284  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28285  # It is also a way to make sure we got the proper file name for the real test later on.
28286  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28287  if test "x$test_shortpath" = x; then
28288    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28289$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28290    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28291  fi
28292
28293  # Call helper function which possibly converts this using DOS-style short mode.
28294  # If so, the updated path is stored in $new_path.
28295
28296  input_path="$new_path"
28297  # Check if we need to convert this using DOS-style short mode. If the path
28298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28299  # take no chances and rewrite it.
28300  # Note: m4 eats our [], so we need to use [ and ] instead.
28301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28302  if test "x$has_forbidden_chars" != x; then
28303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28304    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28305    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28306    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28307      # Going to short mode and back again did indeed matter. Since short mode is
28308      # case insensitive, let's make it lowercase to improve readability.
28309      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28310      # Now convert it back to Unix-style (cygpath)
28311      input_path=`$CYGPATH -u "$shortmode_path"`
28312      new_path="$input_path"
28313    fi
28314  fi
28315
28316  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28317  if test "x$test_cygdrive_prefix" = x; then
28318    # As a simple fix, exclude /usr/bin since it's not a real path.
28319    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28320      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28321      # a path prefixed by /cygdrive for fixpath to work.
28322      new_path="$CYGWIN_ROOT_PATH$input_path"
28323    fi
28324  fi
28325
28326
28327  if test "x$path" != "x$new_path"; then
28328    BOOT_JDK="$new_path"
28329    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28330$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28331  fi
28332
28333    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28334
28335  path="$BOOT_JDK"
28336  has_colon=`$ECHO $path | $GREP ^.:`
28337  new_path="$path"
28338  if test "x$has_colon" = x; then
28339    # Not in mixed or Windows style, start by that.
28340    new_path=`cmd //c echo $path`
28341  fi
28342
28343
28344  input_path="$new_path"
28345  # Check if we need to convert this using DOS-style short mode. If the path
28346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28347  # take no chances and rewrite it.
28348  # Note: m4 eats our [], so we need to use [ and ] instead.
28349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28350  if test "x$has_forbidden_chars" != x; then
28351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28352    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28353  fi
28354
28355
28356  windows_path="$new_path"
28357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28358    unix_path=`$CYGPATH -u "$windows_path"`
28359    new_path="$unix_path"
28360  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28361    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28362    new_path="$unix_path"
28363  fi
28364
28365  if test "x$path" != "x$new_path"; then
28366    BOOT_JDK="$new_path"
28367    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28368$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28369  fi
28370
28371  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28372  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28373
28374    else
28375      # We're on a unix platform. Hooray! :)
28376      path="$BOOT_JDK"
28377      has_space=`$ECHO "$path" | $GREP " "`
28378      if test "x$has_space" != x; then
28379        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28380$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28381        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28382      fi
28383
28384      # Use eval to expand a potential ~
28385      eval path="$path"
28386      if test ! -f "$path" && test ! -d "$path"; then
28387        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28388      fi
28389
28390      if test -d "$path"; then
28391        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28392      else
28393        dir="`$DIRNAME "$path"`"
28394        base="`$BASENAME "$path"`"
28395        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28396      fi
28397    fi
28398  fi
28399
28400            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28401$as_echo_n "checking for Boot JDK... " >&6; }
28402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28403$as_echo "$BOOT_JDK" >&6; }
28404            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28405$as_echo_n "checking Boot JDK version... " >&6; }
28406            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28407            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28408$as_echo "$BOOT_JDK_VERSION" >&6; }
28409          fi # end check jdk version
28410        fi # end check javac
28411      fi # end check java
28412    fi # end check boot jdk found
28413  fi
28414
28415
28416  if test "x$BOOT_JDK_FOUND" = xno; then
28417    # Now execute the test
28418
28419  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28420  BOOT_JDK_SUFFIX=""
28421  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28422  if test "x$ALL_JDKS_FOUND" != x; then
28423    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28424
28425  if test "x$BOOT_JDK_FOUND" = xno; then
28426    # Now execute the test
28427
28428        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28429        if test -d "$BOOT_JDK"; then
28430          BOOT_JDK_FOUND=maybe
28431          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28432$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28433        fi
28434
28435
28436    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28437    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28438      # Do we have a bin/java?
28439      if test ! -x "$BOOT_JDK/bin/java"; then
28440        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28441$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28442        BOOT_JDK_FOUND=no
28443      else
28444        # Do we have a bin/javac?
28445        if test ! -x "$BOOT_JDK/bin/javac"; then
28446          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28447$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28448          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28449$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28450          BOOT_JDK_FOUND=no
28451        else
28452          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28453          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28454
28455          # Extra M4 quote needed to protect [] in grep expression.
28456          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28457          if test "x$FOUND_CORRECT_VERSION" = x; then
28458            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28459$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28460            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28461$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28462            BOOT_JDK_FOUND=no
28463          else
28464            # We're done! :-)
28465            BOOT_JDK_FOUND=yes
28466
28467  # Only process if variable expands to non-empty
28468
28469  if test "x$BOOT_JDK" != x; then
28470    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28471
28472  # Input might be given as Windows format, start by converting to
28473  # unix format.
28474  path="$BOOT_JDK"
28475  new_path=`$CYGPATH -u "$path"`
28476
28477  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28478  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28479  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28480  # "foo.exe" is OK but "foo" is an error.
28481  #
28482  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28483  # It is also a way to make sure we got the proper file name for the real test later on.
28484  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28485  if test "x$test_shortpath" = x; then
28486    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28487$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28488    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28489  fi
28490
28491  # Call helper function which possibly converts this using DOS-style short mode.
28492  # If so, the updated path is stored in $new_path.
28493
28494  input_path="$new_path"
28495  # Check if we need to convert this using DOS-style short mode. If the path
28496  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28497  # take no chances and rewrite it.
28498  # Note: m4 eats our [], so we need to use [ and ] instead.
28499  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28500  if test "x$has_forbidden_chars" != x; then
28501    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28502    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28503    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28504    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28505      # Going to short mode and back again did indeed matter. Since short mode is
28506      # case insensitive, let's make it lowercase to improve readability.
28507      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28508      # Now convert it back to Unix-style (cygpath)
28509      input_path=`$CYGPATH -u "$shortmode_path"`
28510      new_path="$input_path"
28511    fi
28512  fi
28513
28514  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28515  if test "x$test_cygdrive_prefix" = x; then
28516    # As a simple fix, exclude /usr/bin since it's not a real path.
28517    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28518      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28519      # a path prefixed by /cygdrive for fixpath to work.
28520      new_path="$CYGWIN_ROOT_PATH$input_path"
28521    fi
28522  fi
28523
28524
28525  if test "x$path" != "x$new_path"; then
28526    BOOT_JDK="$new_path"
28527    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28528$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28529  fi
28530
28531    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28532
28533  path="$BOOT_JDK"
28534  has_colon=`$ECHO $path | $GREP ^.:`
28535  new_path="$path"
28536  if test "x$has_colon" = x; then
28537    # Not in mixed or Windows style, start by that.
28538    new_path=`cmd //c echo $path`
28539  fi
28540
28541
28542  input_path="$new_path"
28543  # Check if we need to convert this using DOS-style short mode. If the path
28544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28545  # take no chances and rewrite it.
28546  # Note: m4 eats our [], so we need to use [ and ] instead.
28547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28548  if test "x$has_forbidden_chars" != x; then
28549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28550    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28551  fi
28552
28553
28554  windows_path="$new_path"
28555  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28556    unix_path=`$CYGPATH -u "$windows_path"`
28557    new_path="$unix_path"
28558  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28559    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28560    new_path="$unix_path"
28561  fi
28562
28563  if test "x$path" != "x$new_path"; then
28564    BOOT_JDK="$new_path"
28565    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28566$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28567  fi
28568
28569  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28570  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28571
28572    else
28573      # We're on a unix platform. Hooray! :)
28574      path="$BOOT_JDK"
28575      has_space=`$ECHO "$path" | $GREP " "`
28576      if test "x$has_space" != x; then
28577        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28578$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28579        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28580      fi
28581
28582      # Use eval to expand a potential ~
28583      eval path="$path"
28584      if test ! -f "$path" && test ! -d "$path"; then
28585        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28586      fi
28587
28588      if test -d "$path"; then
28589        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28590      else
28591        dir="`$DIRNAME "$path"`"
28592        base="`$BASENAME "$path"`"
28593        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28594      fi
28595    fi
28596  fi
28597
28598            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28599$as_echo_n "checking for Boot JDK... " >&6; }
28600            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28601$as_echo "$BOOT_JDK" >&6; }
28602            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28603$as_echo_n "checking Boot JDK version... " >&6; }
28604            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28605            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28606$as_echo "$BOOT_JDK_VERSION" >&6; }
28607          fi # end check jdk version
28608        fi # end check javac
28609      fi # end check java
28610    fi # end check boot jdk found
28611  fi
28612
28613    done
28614  fi
28615
28616
28617    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28618    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28619      # Do we have a bin/java?
28620      if test ! -x "$BOOT_JDK/bin/java"; then
28621        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28622$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28623        BOOT_JDK_FOUND=no
28624      else
28625        # Do we have a bin/javac?
28626        if test ! -x "$BOOT_JDK/bin/javac"; then
28627          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28628$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28629          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28630$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28631          BOOT_JDK_FOUND=no
28632        else
28633          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28634          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28635
28636          # Extra M4 quote needed to protect [] in grep expression.
28637          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28638          if test "x$FOUND_CORRECT_VERSION" = x; then
28639            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28640$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28641            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28642$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28643            BOOT_JDK_FOUND=no
28644          else
28645            # We're done! :-)
28646            BOOT_JDK_FOUND=yes
28647
28648  # Only process if variable expands to non-empty
28649
28650  if test "x$BOOT_JDK" != x; then
28651    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28652
28653  # Input might be given as Windows format, start by converting to
28654  # unix format.
28655  path="$BOOT_JDK"
28656  new_path=`$CYGPATH -u "$path"`
28657
28658  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28659  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28660  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28661  # "foo.exe" is OK but "foo" is an error.
28662  #
28663  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28664  # It is also a way to make sure we got the proper file name for the real test later on.
28665  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28666  if test "x$test_shortpath" = x; then
28667    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28668$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28669    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28670  fi
28671
28672  # Call helper function which possibly converts this using DOS-style short mode.
28673  # If so, the updated path is stored in $new_path.
28674
28675  input_path="$new_path"
28676  # Check if we need to convert this using DOS-style short mode. If the path
28677  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28678  # take no chances and rewrite it.
28679  # Note: m4 eats our [], so we need to use [ and ] instead.
28680  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28681  if test "x$has_forbidden_chars" != x; then
28682    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28683    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28684    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28685    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28686      # Going to short mode and back again did indeed matter. Since short mode is
28687      # case insensitive, let's make it lowercase to improve readability.
28688      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28689      # Now convert it back to Unix-style (cygpath)
28690      input_path=`$CYGPATH -u "$shortmode_path"`
28691      new_path="$input_path"
28692    fi
28693  fi
28694
28695  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28696  if test "x$test_cygdrive_prefix" = x; then
28697    # As a simple fix, exclude /usr/bin since it's not a real path.
28698    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28699      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28700      # a path prefixed by /cygdrive for fixpath to work.
28701      new_path="$CYGWIN_ROOT_PATH$input_path"
28702    fi
28703  fi
28704
28705
28706  if test "x$path" != "x$new_path"; then
28707    BOOT_JDK="$new_path"
28708    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28709$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28710  fi
28711
28712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28713
28714  path="$BOOT_JDK"
28715  has_colon=`$ECHO $path | $GREP ^.:`
28716  new_path="$path"
28717  if test "x$has_colon" = x; then
28718    # Not in mixed or Windows style, start by that.
28719    new_path=`cmd //c echo $path`
28720  fi
28721
28722
28723  input_path="$new_path"
28724  # Check if we need to convert this using DOS-style short mode. If the path
28725  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28726  # take no chances and rewrite it.
28727  # Note: m4 eats our [], so we need to use [ and ] instead.
28728  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28729  if test "x$has_forbidden_chars" != x; then
28730    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28731    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28732  fi
28733
28734
28735  windows_path="$new_path"
28736  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28737    unix_path=`$CYGPATH -u "$windows_path"`
28738    new_path="$unix_path"
28739  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28740    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28741    new_path="$unix_path"
28742  fi
28743
28744  if test "x$path" != "x$new_path"; then
28745    BOOT_JDK="$new_path"
28746    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28747$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28748  fi
28749
28750  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28751  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28752
28753    else
28754      # We're on a unix platform. Hooray! :)
28755      path="$BOOT_JDK"
28756      has_space=`$ECHO "$path" | $GREP " "`
28757      if test "x$has_space" != x; then
28758        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28759$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28760        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28761      fi
28762
28763      # Use eval to expand a potential ~
28764      eval path="$path"
28765      if test ! -f "$path" && test ! -d "$path"; then
28766        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28767      fi
28768
28769      if test -d "$path"; then
28770        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28771      else
28772        dir="`$DIRNAME "$path"`"
28773        base="`$BASENAME "$path"`"
28774        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28775      fi
28776    fi
28777  fi
28778
28779            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28780$as_echo_n "checking for Boot JDK... " >&6; }
28781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28782$as_echo "$BOOT_JDK" >&6; }
28783            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28784$as_echo_n "checking Boot JDK version... " >&6; }
28785            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28786            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28787$as_echo "$BOOT_JDK_VERSION" >&6; }
28788          fi # end check jdk version
28789        fi # end check javac
28790      fi # end check java
28791    fi # end check boot jdk found
28792  fi
28793
28794  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28795
28796  if test "x$BOOT_JDK_FOUND" = xno; then
28797    # Now execute the test
28798
28799  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28800  BOOT_JDK_SUFFIX="/Contents/Home"
28801  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28802  if test "x$ALL_JDKS_FOUND" != x; then
28803    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28804
28805  if test "x$BOOT_JDK_FOUND" = xno; then
28806    # Now execute the test
28807
28808        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28809        if test -d "$BOOT_JDK"; then
28810          BOOT_JDK_FOUND=maybe
28811          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28812$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28813        fi
28814
28815
28816    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28817    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28818      # Do we have a bin/java?
28819      if test ! -x "$BOOT_JDK/bin/java"; then
28820        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28821$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28822        BOOT_JDK_FOUND=no
28823      else
28824        # Do we have a bin/javac?
28825        if test ! -x "$BOOT_JDK/bin/javac"; then
28826          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28827$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28828          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28829$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28830          BOOT_JDK_FOUND=no
28831        else
28832          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28833          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28834
28835          # Extra M4 quote needed to protect [] in grep expression.
28836          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28837          if test "x$FOUND_CORRECT_VERSION" = x; then
28838            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28839$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28840            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28841$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28842            BOOT_JDK_FOUND=no
28843          else
28844            # We're done! :-)
28845            BOOT_JDK_FOUND=yes
28846
28847  # Only process if variable expands to non-empty
28848
28849  if test "x$BOOT_JDK" != x; then
28850    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28851
28852  # Input might be given as Windows format, start by converting to
28853  # unix format.
28854  path="$BOOT_JDK"
28855  new_path=`$CYGPATH -u "$path"`
28856
28857  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28858  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28859  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28860  # "foo.exe" is OK but "foo" is an error.
28861  #
28862  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28863  # It is also a way to make sure we got the proper file name for the real test later on.
28864  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28865  if test "x$test_shortpath" = x; then
28866    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28867$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28868    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28869  fi
28870
28871  # Call helper function which possibly converts this using DOS-style short mode.
28872  # If so, the updated path is stored in $new_path.
28873
28874  input_path="$new_path"
28875  # Check if we need to convert this using DOS-style short mode. If the path
28876  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28877  # take no chances and rewrite it.
28878  # Note: m4 eats our [], so we need to use [ and ] instead.
28879  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28880  if test "x$has_forbidden_chars" != x; then
28881    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28882    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28883    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28884    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28885      # Going to short mode and back again did indeed matter. Since short mode is
28886      # case insensitive, let's make it lowercase to improve readability.
28887      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28888      # Now convert it back to Unix-style (cygpath)
28889      input_path=`$CYGPATH -u "$shortmode_path"`
28890      new_path="$input_path"
28891    fi
28892  fi
28893
28894  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28895  if test "x$test_cygdrive_prefix" = x; then
28896    # As a simple fix, exclude /usr/bin since it's not a real path.
28897    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28898      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28899      # a path prefixed by /cygdrive for fixpath to work.
28900      new_path="$CYGWIN_ROOT_PATH$input_path"
28901    fi
28902  fi
28903
28904
28905  if test "x$path" != "x$new_path"; then
28906    BOOT_JDK="$new_path"
28907    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28908$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28909  fi
28910
28911    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28912
28913  path="$BOOT_JDK"
28914  has_colon=`$ECHO $path | $GREP ^.:`
28915  new_path="$path"
28916  if test "x$has_colon" = x; then
28917    # Not in mixed or Windows style, start by that.
28918    new_path=`cmd //c echo $path`
28919  fi
28920
28921
28922  input_path="$new_path"
28923  # Check if we need to convert this using DOS-style short mode. If the path
28924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28925  # take no chances and rewrite it.
28926  # Note: m4 eats our [], so we need to use [ and ] instead.
28927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28928  if test "x$has_forbidden_chars" != x; then
28929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28931  fi
28932
28933
28934  windows_path="$new_path"
28935  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28936    unix_path=`$CYGPATH -u "$windows_path"`
28937    new_path="$unix_path"
28938  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28939    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28940    new_path="$unix_path"
28941  fi
28942
28943  if test "x$path" != "x$new_path"; then
28944    BOOT_JDK="$new_path"
28945    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28946$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28947  fi
28948
28949  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28950  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28951
28952    else
28953      # We're on a unix platform. Hooray! :)
28954      path="$BOOT_JDK"
28955      has_space=`$ECHO "$path" | $GREP " "`
28956      if test "x$has_space" != x; then
28957        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28958$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28959        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28960      fi
28961
28962      # Use eval to expand a potential ~
28963      eval path="$path"
28964      if test ! -f "$path" && test ! -d "$path"; then
28965        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28966      fi
28967
28968      if test -d "$path"; then
28969        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28970      else
28971        dir="`$DIRNAME "$path"`"
28972        base="`$BASENAME "$path"`"
28973        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28974      fi
28975    fi
28976  fi
28977
28978            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28979$as_echo_n "checking for Boot JDK... " >&6; }
28980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28981$as_echo "$BOOT_JDK" >&6; }
28982            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28983$as_echo_n "checking Boot JDK version... " >&6; }
28984            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28985            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28986$as_echo "$BOOT_JDK_VERSION" >&6; }
28987          fi # end check jdk version
28988        fi # end check javac
28989      fi # end check java
28990    fi # end check boot jdk found
28991  fi
28992
28993    done
28994  fi
28995
28996
28997    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28998    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28999      # Do we have a bin/java?
29000      if test ! -x "$BOOT_JDK/bin/java"; then
29001        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29002$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29003        BOOT_JDK_FOUND=no
29004      else
29005        # Do we have a bin/javac?
29006        if test ! -x "$BOOT_JDK/bin/javac"; then
29007          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29008$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29009          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29010$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29011          BOOT_JDK_FOUND=no
29012        else
29013          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29014          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29015
29016          # Extra M4 quote needed to protect [] in grep expression.
29017          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29018          if test "x$FOUND_CORRECT_VERSION" = x; then
29019            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29020$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29021            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29022$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29023            BOOT_JDK_FOUND=no
29024          else
29025            # We're done! :-)
29026            BOOT_JDK_FOUND=yes
29027
29028  # Only process if variable expands to non-empty
29029
29030  if test "x$BOOT_JDK" != x; then
29031    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29032
29033  # Input might be given as Windows format, start by converting to
29034  # unix format.
29035  path="$BOOT_JDK"
29036  new_path=`$CYGPATH -u "$path"`
29037
29038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29041  # "foo.exe" is OK but "foo" is an error.
29042  #
29043  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29044  # It is also a way to make sure we got the proper file name for the real test later on.
29045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29046  if test "x$test_shortpath" = x; then
29047    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29048$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29049    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29050  fi
29051
29052  # Call helper function which possibly converts this using DOS-style short mode.
29053  # If so, the updated path is stored in $new_path.
29054
29055  input_path="$new_path"
29056  # Check if we need to convert this using DOS-style short mode. If the path
29057  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29058  # take no chances and rewrite it.
29059  # Note: m4 eats our [], so we need to use [ and ] instead.
29060  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29061  if test "x$has_forbidden_chars" != x; then
29062    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29063    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29064    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29065    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29066      # Going to short mode and back again did indeed matter. Since short mode is
29067      # case insensitive, let's make it lowercase to improve readability.
29068      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29069      # Now convert it back to Unix-style (cygpath)
29070      input_path=`$CYGPATH -u "$shortmode_path"`
29071      new_path="$input_path"
29072    fi
29073  fi
29074
29075  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29076  if test "x$test_cygdrive_prefix" = x; then
29077    # As a simple fix, exclude /usr/bin since it's not a real path.
29078    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29079      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29080      # a path prefixed by /cygdrive for fixpath to work.
29081      new_path="$CYGWIN_ROOT_PATH$input_path"
29082    fi
29083  fi
29084
29085
29086  if test "x$path" != "x$new_path"; then
29087    BOOT_JDK="$new_path"
29088    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29089$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29090  fi
29091
29092    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29093
29094  path="$BOOT_JDK"
29095  has_colon=`$ECHO $path | $GREP ^.:`
29096  new_path="$path"
29097  if test "x$has_colon" = x; then
29098    # Not in mixed or Windows style, start by that.
29099    new_path=`cmd //c echo $path`
29100  fi
29101
29102
29103  input_path="$new_path"
29104  # Check if we need to convert this using DOS-style short mode. If the path
29105  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29106  # take no chances and rewrite it.
29107  # Note: m4 eats our [], so we need to use [ and ] instead.
29108  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29109  if test "x$has_forbidden_chars" != x; then
29110    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29111    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29112  fi
29113
29114
29115  windows_path="$new_path"
29116  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29117    unix_path=`$CYGPATH -u "$windows_path"`
29118    new_path="$unix_path"
29119  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29120    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29121    new_path="$unix_path"
29122  fi
29123
29124  if test "x$path" != "x$new_path"; then
29125    BOOT_JDK="$new_path"
29126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29128  fi
29129
29130  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29131  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29132
29133    else
29134      # We're on a unix platform. Hooray! :)
29135      path="$BOOT_JDK"
29136      has_space=`$ECHO "$path" | $GREP " "`
29137      if test "x$has_space" != x; then
29138        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29139$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29140        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29141      fi
29142
29143      # Use eval to expand a potential ~
29144      eval path="$path"
29145      if test ! -f "$path" && test ! -d "$path"; then
29146        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29147      fi
29148
29149      if test -d "$path"; then
29150        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29151      else
29152        dir="`$DIRNAME "$path"`"
29153        base="`$BASENAME "$path"`"
29154        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29155      fi
29156    fi
29157  fi
29158
29159            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29160$as_echo_n "checking for Boot JDK... " >&6; }
29161            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29162$as_echo "$BOOT_JDK" >&6; }
29163            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29164$as_echo_n "checking Boot JDK version... " >&6; }
29165            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29166            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29167$as_echo "$BOOT_JDK_VERSION" >&6; }
29168          fi # end check jdk version
29169        fi # end check javac
29170      fi # end check java
29171    fi # end check boot jdk found
29172  fi
29173
29174
29175  if test "x$BOOT_JDK_FOUND" = xno; then
29176    # Now execute the test
29177
29178  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
29179  BOOT_JDK_SUFFIX="/Contents/Home"
29180  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29181  if test "x$ALL_JDKS_FOUND" != x; then
29182    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29183
29184  if test "x$BOOT_JDK_FOUND" = xno; then
29185    # Now execute the test
29186
29187        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29188        if test -d "$BOOT_JDK"; then
29189          BOOT_JDK_FOUND=maybe
29190          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29191$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29192        fi
29193
29194
29195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29196    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29197      # Do we have a bin/java?
29198      if test ! -x "$BOOT_JDK/bin/java"; then
29199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29200$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29201        BOOT_JDK_FOUND=no
29202      else
29203        # Do we have a bin/javac?
29204        if test ! -x "$BOOT_JDK/bin/javac"; then
29205          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29206$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29207          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29208$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29209          BOOT_JDK_FOUND=no
29210        else
29211          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29212          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29213
29214          # Extra M4 quote needed to protect [] in grep expression.
29215          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29216          if test "x$FOUND_CORRECT_VERSION" = x; then
29217            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29219            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29220$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29221            BOOT_JDK_FOUND=no
29222          else
29223            # We're done! :-)
29224            BOOT_JDK_FOUND=yes
29225
29226  # Only process if variable expands to non-empty
29227
29228  if test "x$BOOT_JDK" != x; then
29229    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29230
29231  # Input might be given as Windows format, start by converting to
29232  # unix format.
29233  path="$BOOT_JDK"
29234  new_path=`$CYGPATH -u "$path"`
29235
29236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29239  # "foo.exe" is OK but "foo" is an error.
29240  #
29241  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29242  # It is also a way to make sure we got the proper file name for the real test later on.
29243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29244  if test "x$test_shortpath" = x; then
29245    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29246$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29247    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29248  fi
29249
29250  # Call helper function which possibly converts this using DOS-style short mode.
29251  # If so, the updated path is stored in $new_path.
29252
29253  input_path="$new_path"
29254  # Check if we need to convert this using DOS-style short mode. If the path
29255  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29256  # take no chances and rewrite it.
29257  # Note: m4 eats our [], so we need to use [ and ] instead.
29258  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29259  if test "x$has_forbidden_chars" != x; then
29260    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29261    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29262    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29263    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29264      # Going to short mode and back again did indeed matter. Since short mode is
29265      # case insensitive, let's make it lowercase to improve readability.
29266      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29267      # Now convert it back to Unix-style (cygpath)
29268      input_path=`$CYGPATH -u "$shortmode_path"`
29269      new_path="$input_path"
29270    fi
29271  fi
29272
29273  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29274  if test "x$test_cygdrive_prefix" = x; then
29275    # As a simple fix, exclude /usr/bin since it's not a real path.
29276    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29277      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29278      # a path prefixed by /cygdrive for fixpath to work.
29279      new_path="$CYGWIN_ROOT_PATH$input_path"
29280    fi
29281  fi
29282
29283
29284  if test "x$path" != "x$new_path"; then
29285    BOOT_JDK="$new_path"
29286    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29287$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29288  fi
29289
29290    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29291
29292  path="$BOOT_JDK"
29293  has_colon=`$ECHO $path | $GREP ^.:`
29294  new_path="$path"
29295  if test "x$has_colon" = x; then
29296    # Not in mixed or Windows style, start by that.
29297    new_path=`cmd //c echo $path`
29298  fi
29299
29300
29301  input_path="$new_path"
29302  # Check if we need to convert this using DOS-style short mode. If the path
29303  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29304  # take no chances and rewrite it.
29305  # Note: m4 eats our [], so we need to use [ and ] instead.
29306  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29307  if test "x$has_forbidden_chars" != x; then
29308    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29309    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29310  fi
29311
29312
29313  windows_path="$new_path"
29314  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29315    unix_path=`$CYGPATH -u "$windows_path"`
29316    new_path="$unix_path"
29317  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29318    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29319    new_path="$unix_path"
29320  fi
29321
29322  if test "x$path" != "x$new_path"; then
29323    BOOT_JDK="$new_path"
29324    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29325$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29326  fi
29327
29328  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29329  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29330
29331    else
29332      # We're on a unix platform. Hooray! :)
29333      path="$BOOT_JDK"
29334      has_space=`$ECHO "$path" | $GREP " "`
29335      if test "x$has_space" != x; then
29336        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29337$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29338        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29339      fi
29340
29341      # Use eval to expand a potential ~
29342      eval path="$path"
29343      if test ! -f "$path" && test ! -d "$path"; then
29344        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29345      fi
29346
29347      if test -d "$path"; then
29348        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29349      else
29350        dir="`$DIRNAME "$path"`"
29351        base="`$BASENAME "$path"`"
29352        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29353      fi
29354    fi
29355  fi
29356
29357            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29358$as_echo_n "checking for Boot JDK... " >&6; }
29359            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29360$as_echo "$BOOT_JDK" >&6; }
29361            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29362$as_echo_n "checking Boot JDK version... " >&6; }
29363            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29364            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29365$as_echo "$BOOT_JDK_VERSION" >&6; }
29366          fi # end check jdk version
29367        fi # end check javac
29368      fi # end check java
29369    fi # end check boot jdk found
29370  fi
29371
29372    done
29373  fi
29374
29375
29376    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29377    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29378      # Do we have a bin/java?
29379      if test ! -x "$BOOT_JDK/bin/java"; then
29380        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29381$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29382        BOOT_JDK_FOUND=no
29383      else
29384        # Do we have a bin/javac?
29385        if test ! -x "$BOOT_JDK/bin/javac"; then
29386          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29387$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29388          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29389$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29390          BOOT_JDK_FOUND=no
29391        else
29392          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29393          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29394
29395          # Extra M4 quote needed to protect [] in grep expression.
29396          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29397          if test "x$FOUND_CORRECT_VERSION" = x; then
29398            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29399$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29400            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29401$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29402            BOOT_JDK_FOUND=no
29403          else
29404            # We're done! :-)
29405            BOOT_JDK_FOUND=yes
29406
29407  # Only process if variable expands to non-empty
29408
29409  if test "x$BOOT_JDK" != x; then
29410    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29411
29412  # Input might be given as Windows format, start by converting to
29413  # unix format.
29414  path="$BOOT_JDK"
29415  new_path=`$CYGPATH -u "$path"`
29416
29417  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29418  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29419  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29420  # "foo.exe" is OK but "foo" is an error.
29421  #
29422  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29423  # It is also a way to make sure we got the proper file name for the real test later on.
29424  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29425  if test "x$test_shortpath" = x; then
29426    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29427$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29428    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29429  fi
29430
29431  # Call helper function which possibly converts this using DOS-style short mode.
29432  # If so, the updated path is stored in $new_path.
29433
29434  input_path="$new_path"
29435  # Check if we need to convert this using DOS-style short mode. If the path
29436  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29437  # take no chances and rewrite it.
29438  # Note: m4 eats our [], so we need to use [ and ] instead.
29439  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29440  if test "x$has_forbidden_chars" != x; then
29441    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29442    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29443    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29444    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29445      # Going to short mode and back again did indeed matter. Since short mode is
29446      # case insensitive, let's make it lowercase to improve readability.
29447      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29448      # Now convert it back to Unix-style (cygpath)
29449      input_path=`$CYGPATH -u "$shortmode_path"`
29450      new_path="$input_path"
29451    fi
29452  fi
29453
29454  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29455  if test "x$test_cygdrive_prefix" = x; then
29456    # As a simple fix, exclude /usr/bin since it's not a real path.
29457    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29458      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29459      # a path prefixed by /cygdrive for fixpath to work.
29460      new_path="$CYGWIN_ROOT_PATH$input_path"
29461    fi
29462  fi
29463
29464
29465  if test "x$path" != "x$new_path"; then
29466    BOOT_JDK="$new_path"
29467    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29468$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29469  fi
29470
29471    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29472
29473  path="$BOOT_JDK"
29474  has_colon=`$ECHO $path | $GREP ^.:`
29475  new_path="$path"
29476  if test "x$has_colon" = x; then
29477    # Not in mixed or Windows style, start by that.
29478    new_path=`cmd //c echo $path`
29479  fi
29480
29481
29482  input_path="$new_path"
29483  # Check if we need to convert this using DOS-style short mode. If the path
29484  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29485  # take no chances and rewrite it.
29486  # Note: m4 eats our [], so we need to use [ and ] instead.
29487  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29488  if test "x$has_forbidden_chars" != x; then
29489    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29490    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29491  fi
29492
29493
29494  windows_path="$new_path"
29495  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29496    unix_path=`$CYGPATH -u "$windows_path"`
29497    new_path="$unix_path"
29498  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29499    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29500    new_path="$unix_path"
29501  fi
29502
29503  if test "x$path" != "x$new_path"; then
29504    BOOT_JDK="$new_path"
29505    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29506$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29507  fi
29508
29509  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29510  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29511
29512    else
29513      # We're on a unix platform. Hooray! :)
29514      path="$BOOT_JDK"
29515      has_space=`$ECHO "$path" | $GREP " "`
29516      if test "x$has_space" != x; then
29517        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29518$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29519        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29520      fi
29521
29522      # Use eval to expand a potential ~
29523      eval path="$path"
29524      if test ! -f "$path" && test ! -d "$path"; then
29525        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29526      fi
29527
29528      if test -d "$path"; then
29529        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29530      else
29531        dir="`$DIRNAME "$path"`"
29532        base="`$BASENAME "$path"`"
29533        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29534      fi
29535    fi
29536  fi
29537
29538            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29539$as_echo_n "checking for Boot JDK... " >&6; }
29540            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29541$as_echo "$BOOT_JDK" >&6; }
29542            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29543$as_echo_n "checking Boot JDK version... " >&6; }
29544            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29545            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29546$as_echo "$BOOT_JDK_VERSION" >&6; }
29547          fi # end check jdk version
29548        fi # end check javac
29549      fi # end check java
29550    fi # end check boot jdk found
29551  fi
29552
29553  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29554
29555  if test "x$BOOT_JDK_FOUND" = xno; then
29556    # Now execute the test
29557
29558  BOOT_JDK_PREFIX="/usr/lib/jvm"
29559  BOOT_JDK_SUFFIX=""
29560  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29561  if test "x$ALL_JDKS_FOUND" != x; then
29562    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29563
29564  if test "x$BOOT_JDK_FOUND" = xno; then
29565    # Now execute the test
29566
29567        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29568        if test -d "$BOOT_JDK"; then
29569          BOOT_JDK_FOUND=maybe
29570          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29571$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29572        fi
29573
29574
29575    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29576    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29577      # Do we have a bin/java?
29578      if test ! -x "$BOOT_JDK/bin/java"; then
29579        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29580$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29581        BOOT_JDK_FOUND=no
29582      else
29583        # Do we have a bin/javac?
29584        if test ! -x "$BOOT_JDK/bin/javac"; then
29585          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29587          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29588$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29589          BOOT_JDK_FOUND=no
29590        else
29591          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29592          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29593
29594          # Extra M4 quote needed to protect [] in grep expression.
29595          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29596          if test "x$FOUND_CORRECT_VERSION" = x; then
29597            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29598$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29599            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29600$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29601            BOOT_JDK_FOUND=no
29602          else
29603            # We're done! :-)
29604            BOOT_JDK_FOUND=yes
29605
29606  # Only process if variable expands to non-empty
29607
29608  if test "x$BOOT_JDK" != x; then
29609    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29610
29611  # Input might be given as Windows format, start by converting to
29612  # unix format.
29613  path="$BOOT_JDK"
29614  new_path=`$CYGPATH -u "$path"`
29615
29616  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29617  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29618  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29619  # "foo.exe" is OK but "foo" is an error.
29620  #
29621  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29622  # It is also a way to make sure we got the proper file name for the real test later on.
29623  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29624  if test "x$test_shortpath" = x; then
29625    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29626$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29627    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29628  fi
29629
29630  # Call helper function which possibly converts this using DOS-style short mode.
29631  # If so, the updated path is stored in $new_path.
29632
29633  input_path="$new_path"
29634  # Check if we need to convert this using DOS-style short mode. If the path
29635  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29636  # take no chances and rewrite it.
29637  # Note: m4 eats our [], so we need to use [ and ] instead.
29638  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29639  if test "x$has_forbidden_chars" != x; then
29640    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29641    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29642    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29643    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29644      # Going to short mode and back again did indeed matter. Since short mode is
29645      # case insensitive, let's make it lowercase to improve readability.
29646      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29647      # Now convert it back to Unix-style (cygpath)
29648      input_path=`$CYGPATH -u "$shortmode_path"`
29649      new_path="$input_path"
29650    fi
29651  fi
29652
29653  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29654  if test "x$test_cygdrive_prefix" = x; then
29655    # As a simple fix, exclude /usr/bin since it's not a real path.
29656    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29657      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29658      # a path prefixed by /cygdrive for fixpath to work.
29659      new_path="$CYGWIN_ROOT_PATH$input_path"
29660    fi
29661  fi
29662
29663
29664  if test "x$path" != "x$new_path"; then
29665    BOOT_JDK="$new_path"
29666    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29667$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29668  fi
29669
29670    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29671
29672  path="$BOOT_JDK"
29673  has_colon=`$ECHO $path | $GREP ^.:`
29674  new_path="$path"
29675  if test "x$has_colon" = x; then
29676    # Not in mixed or Windows style, start by that.
29677    new_path=`cmd //c echo $path`
29678  fi
29679
29680
29681  input_path="$new_path"
29682  # Check if we need to convert this using DOS-style short mode. If the path
29683  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29684  # take no chances and rewrite it.
29685  # Note: m4 eats our [], so we need to use [ and ] instead.
29686  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29687  if test "x$has_forbidden_chars" != x; then
29688    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29689    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29690  fi
29691
29692
29693  windows_path="$new_path"
29694  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29695    unix_path=`$CYGPATH -u "$windows_path"`
29696    new_path="$unix_path"
29697  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29698    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29699    new_path="$unix_path"
29700  fi
29701
29702  if test "x$path" != "x$new_path"; then
29703    BOOT_JDK="$new_path"
29704    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29705$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29706  fi
29707
29708  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29709  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29710
29711    else
29712      # We're on a unix platform. Hooray! :)
29713      path="$BOOT_JDK"
29714      has_space=`$ECHO "$path" | $GREP " "`
29715      if test "x$has_space" != x; then
29716        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29717$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29718        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29719      fi
29720
29721      # Use eval to expand a potential ~
29722      eval path="$path"
29723      if test ! -f "$path" && test ! -d "$path"; then
29724        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29725      fi
29726
29727      if test -d "$path"; then
29728        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29729      else
29730        dir="`$DIRNAME "$path"`"
29731        base="`$BASENAME "$path"`"
29732        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29733      fi
29734    fi
29735  fi
29736
29737            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29738$as_echo_n "checking for Boot JDK... " >&6; }
29739            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29740$as_echo "$BOOT_JDK" >&6; }
29741            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29742$as_echo_n "checking Boot JDK version... " >&6; }
29743            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29744            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29745$as_echo "$BOOT_JDK_VERSION" >&6; }
29746          fi # end check jdk version
29747        fi # end check javac
29748      fi # end check java
29749    fi # end check boot jdk found
29750  fi
29751
29752    done
29753  fi
29754
29755
29756    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29757    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29758      # Do we have a bin/java?
29759      if test ! -x "$BOOT_JDK/bin/java"; then
29760        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29761$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29762        BOOT_JDK_FOUND=no
29763      else
29764        # Do we have a bin/javac?
29765        if test ! -x "$BOOT_JDK/bin/javac"; then
29766          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29767$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29768          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29769$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29770          BOOT_JDK_FOUND=no
29771        else
29772          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29773          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29774
29775          # Extra M4 quote needed to protect [] in grep expression.
29776          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29777          if test "x$FOUND_CORRECT_VERSION" = x; then
29778            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29779$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29780            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29781$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29782            BOOT_JDK_FOUND=no
29783          else
29784            # We're done! :-)
29785            BOOT_JDK_FOUND=yes
29786
29787  # Only process if variable expands to non-empty
29788
29789  if test "x$BOOT_JDK" != x; then
29790    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29791
29792  # Input might be given as Windows format, start by converting to
29793  # unix format.
29794  path="$BOOT_JDK"
29795  new_path=`$CYGPATH -u "$path"`
29796
29797  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29798  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29799  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29800  # "foo.exe" is OK but "foo" is an error.
29801  #
29802  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29803  # It is also a way to make sure we got the proper file name for the real test later on.
29804  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29805  if test "x$test_shortpath" = x; then
29806    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29807$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29808    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29809  fi
29810
29811  # Call helper function which possibly converts this using DOS-style short mode.
29812  # If so, the updated path is stored in $new_path.
29813
29814  input_path="$new_path"
29815  # Check if we need to convert this using DOS-style short mode. If the path
29816  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29817  # take no chances and rewrite it.
29818  # Note: m4 eats our [], so we need to use [ and ] instead.
29819  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29820  if test "x$has_forbidden_chars" != x; then
29821    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29822    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29823    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29824    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29825      # Going to short mode and back again did indeed matter. Since short mode is
29826      # case insensitive, let's make it lowercase to improve readability.
29827      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29828      # Now convert it back to Unix-style (cygpath)
29829      input_path=`$CYGPATH -u "$shortmode_path"`
29830      new_path="$input_path"
29831    fi
29832  fi
29833
29834  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29835  if test "x$test_cygdrive_prefix" = x; then
29836    # As a simple fix, exclude /usr/bin since it's not a real path.
29837    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29838      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29839      # a path prefixed by /cygdrive for fixpath to work.
29840      new_path="$CYGWIN_ROOT_PATH$input_path"
29841    fi
29842  fi
29843
29844
29845  if test "x$path" != "x$new_path"; then
29846    BOOT_JDK="$new_path"
29847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29848$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29849  fi
29850
29851    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29852
29853  path="$BOOT_JDK"
29854  has_colon=`$ECHO $path | $GREP ^.:`
29855  new_path="$path"
29856  if test "x$has_colon" = x; then
29857    # Not in mixed or Windows style, start by that.
29858    new_path=`cmd //c echo $path`
29859  fi
29860
29861
29862  input_path="$new_path"
29863  # Check if we need to convert this using DOS-style short mode. If the path
29864  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29865  # take no chances and rewrite it.
29866  # Note: m4 eats our [], so we need to use [ and ] instead.
29867  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29868  if test "x$has_forbidden_chars" != x; then
29869    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29870    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29871  fi
29872
29873
29874  windows_path="$new_path"
29875  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29876    unix_path=`$CYGPATH -u "$windows_path"`
29877    new_path="$unix_path"
29878  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29879    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29880    new_path="$unix_path"
29881  fi
29882
29883  if test "x$path" != "x$new_path"; then
29884    BOOT_JDK="$new_path"
29885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29886$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29887  fi
29888
29889  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29890  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29891
29892    else
29893      # We're on a unix platform. Hooray! :)
29894      path="$BOOT_JDK"
29895      has_space=`$ECHO "$path" | $GREP " "`
29896      if test "x$has_space" != x; then
29897        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29898$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29899        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29900      fi
29901
29902      # Use eval to expand a potential ~
29903      eval path="$path"
29904      if test ! -f "$path" && test ! -d "$path"; then
29905        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29906      fi
29907
29908      if test -d "$path"; then
29909        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29910      else
29911        dir="`$DIRNAME "$path"`"
29912        base="`$BASENAME "$path"`"
29913        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29914      fi
29915    fi
29916  fi
29917
29918            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29919$as_echo_n "checking for Boot JDK... " >&6; }
29920            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29921$as_echo "$BOOT_JDK" >&6; }
29922            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29923$as_echo_n "checking Boot JDK version... " >&6; }
29924            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29926$as_echo "$BOOT_JDK_VERSION" >&6; }
29927          fi # end check jdk version
29928        fi # end check javac
29929      fi # end check java
29930    fi # end check boot jdk found
29931  fi
29932
29933  fi
29934
29935
29936    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29937    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29938      # Do we have a bin/java?
29939      if test ! -x "$BOOT_JDK/bin/java"; then
29940        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29941$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29942        BOOT_JDK_FOUND=no
29943      else
29944        # Do we have a bin/javac?
29945        if test ! -x "$BOOT_JDK/bin/javac"; then
29946          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29947$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29948          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29949$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29950          BOOT_JDK_FOUND=no
29951        else
29952          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29953          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29954
29955          # Extra M4 quote needed to protect [] in grep expression.
29956          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29957          if test "x$FOUND_CORRECT_VERSION" = x; then
29958            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29959$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29960            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29961$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29962            BOOT_JDK_FOUND=no
29963          else
29964            # We're done! :-)
29965            BOOT_JDK_FOUND=yes
29966
29967  # Only process if variable expands to non-empty
29968
29969  if test "x$BOOT_JDK" != x; then
29970    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29971
29972  # Input might be given as Windows format, start by converting to
29973  # unix format.
29974  path="$BOOT_JDK"
29975  new_path=`$CYGPATH -u "$path"`
29976
29977  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29978  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29979  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29980  # "foo.exe" is OK but "foo" is an error.
29981  #
29982  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29983  # It is also a way to make sure we got the proper file name for the real test later on.
29984  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29985  if test "x$test_shortpath" = x; then
29986    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29987$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29988    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29989  fi
29990
29991  # Call helper function which possibly converts this using DOS-style short mode.
29992  # If so, the updated path is stored in $new_path.
29993
29994  input_path="$new_path"
29995  # Check if we need to convert this using DOS-style short mode. If the path
29996  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29997  # take no chances and rewrite it.
29998  # Note: m4 eats our [], so we need to use [ and ] instead.
29999  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30000  if test "x$has_forbidden_chars" != x; then
30001    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30002    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30003    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30004    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30005      # Going to short mode and back again did indeed matter. Since short mode is
30006      # case insensitive, let's make it lowercase to improve readability.
30007      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30008      # Now convert it back to Unix-style (cygpath)
30009      input_path=`$CYGPATH -u "$shortmode_path"`
30010      new_path="$input_path"
30011    fi
30012  fi
30013
30014  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30015  if test "x$test_cygdrive_prefix" = x; then
30016    # As a simple fix, exclude /usr/bin since it's not a real path.
30017    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30018      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30019      # a path prefixed by /cygdrive for fixpath to work.
30020      new_path="$CYGWIN_ROOT_PATH$input_path"
30021    fi
30022  fi
30023
30024
30025  if test "x$path" != "x$new_path"; then
30026    BOOT_JDK="$new_path"
30027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30028$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30029  fi
30030
30031    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30032
30033  path="$BOOT_JDK"
30034  has_colon=`$ECHO $path | $GREP ^.:`
30035  new_path="$path"
30036  if test "x$has_colon" = x; then
30037    # Not in mixed or Windows style, start by that.
30038    new_path=`cmd //c echo $path`
30039  fi
30040
30041
30042  input_path="$new_path"
30043  # Check if we need to convert this using DOS-style short mode. If the path
30044  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30045  # take no chances and rewrite it.
30046  # Note: m4 eats our [], so we need to use [ and ] instead.
30047  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30048  if test "x$has_forbidden_chars" != x; then
30049    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30050    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30051  fi
30052
30053
30054  windows_path="$new_path"
30055  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30056    unix_path=`$CYGPATH -u "$windows_path"`
30057    new_path="$unix_path"
30058  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30059    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30060    new_path="$unix_path"
30061  fi
30062
30063  if test "x$path" != "x$new_path"; then
30064    BOOT_JDK="$new_path"
30065    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
30066$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
30067  fi
30068
30069  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30070  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30071
30072    else
30073      # We're on a unix platform. Hooray! :)
30074      path="$BOOT_JDK"
30075      has_space=`$ECHO "$path" | $GREP " "`
30076      if test "x$has_space" != x; then
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
30078$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
30079        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30080      fi
30081
30082      # Use eval to expand a potential ~
30083      eval path="$path"
30084      if test ! -f "$path" && test ! -d "$path"; then
30085        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30086      fi
30087
30088      if test -d "$path"; then
30089        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
30090      else
30091        dir="`$DIRNAME "$path"`"
30092        base="`$BASENAME "$path"`"
30093        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30094      fi
30095    fi
30096  fi
30097
30098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
30099$as_echo_n "checking for Boot JDK... " >&6; }
30100            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
30101$as_echo "$BOOT_JDK" >&6; }
30102            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
30103$as_echo_n "checking Boot JDK version... " >&6; }
30104            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30105            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
30106$as_echo "$BOOT_JDK_VERSION" >&6; }
30107          fi # end check jdk version
30108        fi # end check javac
30109      fi # end check java
30110    fi # end check boot jdk found
30111  fi
30112
30113
30114  # If we haven't found anything yet, we've truly lost. Give up.
30115  if test "x$BOOT_JDK_FOUND" = xno; then
30116
30117  # Print a helpful message on how to acquire the necessary build dependency.
30118  # openjdk is the help tag: freetype, cups, alsa etc
30119  MISSING_DEPENDENCY=openjdk
30120
30121  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30122    cygwin_help $MISSING_DEPENDENCY
30123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30124    msys_help $MISSING_DEPENDENCY
30125  else
30126    PKGHANDLER_COMMAND=
30127
30128    case $PKGHANDLER in
30129      apt-get)
30130        apt_help     $MISSING_DEPENDENCY ;;
30131      yum)
30132        yum_help     $MISSING_DEPENDENCY ;;
30133      brew)
30134        brew_help    $MISSING_DEPENDENCY ;;
30135      port)
30136        port_help    $MISSING_DEPENDENCY ;;
30137      pkgutil)
30138        pkgutil_help $MISSING_DEPENDENCY ;;
30139      pkgadd)
30140        pkgadd_help  $MISSING_DEPENDENCY ;;
30141    esac
30142
30143    if test "x$PKGHANDLER_COMMAND" != x; then
30144      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
30145    fi
30146  fi
30147
30148    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
30149$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
30150    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitly setting --with-boot-jdk" >&5
30151$as_echo "$as_me: This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30152    as_fn_error $? "Cannot continue" "$LINENO" 5
30153  fi
30154
30155
30156
30157  # Setup tools from the Boot JDK.
30158
30159  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30160
30161  # Publish this variable in the help.
30162
30163
30164  if [ -z "${JAVA+x}" ]; then
30165    # The variable is not set by user, try to locate tool using the code snippet
30166
30167      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30168$as_echo_n "checking for java in Boot JDK... " >&6; }
30169      JAVA=$BOOT_JDK/bin/java
30170      if test ! -x $JAVA; then
30171        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30172$as_echo "not found" >&6; }
30173        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30174$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30175        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30176      fi
30177      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30178$as_echo "ok" >&6; }
30179
30180
30181  else
30182    # The variable is set, but is it from the command line or the environment?
30183
30184    # Try to remove the string !JAVA! from our list.
30185    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
30186    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30187      # If it failed, the variable was not from the command line. Ignore it,
30188      # but warn the user (except for BASH, which is always set by the calling BASH).
30189      if test "xJAVA" != xBASH; then
30190        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
30191$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
30192      fi
30193      # Try to locate tool using the code snippet
30194
30195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
30196$as_echo_n "checking for java in Boot JDK... " >&6; }
30197      JAVA=$BOOT_JDK/bin/java
30198      if test ! -x $JAVA; then
30199        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30200$as_echo "not found" >&6; }
30201        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30202$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30203        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
30204      fi
30205      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30206$as_echo "ok" >&6; }
30207
30208
30209    else
30210      # If it succeeded, then it was overridden by the user. We will use it
30211      # for the tool.
30212
30213      # First remove it from the list of overridden variables, so we can test
30214      # for unknown variables in the end.
30215      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30216
30217      # Check if we try to supply an empty value
30218      if test "x$JAVA" = x; then
30219        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
30220$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
30221        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30222$as_echo_n "checking for JAVA... " >&6; }
30223        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30224$as_echo "disabled" >&6; }
30225      else
30226        # Check if the provided tool contains a complete path.
30227        tool_specified="$JAVA"
30228        tool_basename="${tool_specified##*/}"
30229        if test "x$tool_basename" = "x$tool_specified"; then
30230          # A command without a complete path is provided, search $PATH.
30231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
30232$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
30233          # Extract the first word of "$tool_basename", so it can be a program name with args.
30234set dummy $tool_basename; ac_word=$2
30235{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30236$as_echo_n "checking for $ac_word... " >&6; }
30237if ${ac_cv_path_JAVA+:} false; then :
30238  $as_echo_n "(cached) " >&6
30239else
30240  case $JAVA in
30241  [\\/]* | ?:[\\/]*)
30242  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30243  ;;
30244  *)
30245  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30246for as_dir in $PATH
30247do
30248  IFS=$as_save_IFS
30249  test -z "$as_dir" && as_dir=.
30250    for ac_exec_ext in '' $ac_executable_extensions; do
30251  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30252    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30253    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30254    break 2
30255  fi
30256done
30257  done
30258IFS=$as_save_IFS
30259
30260  ;;
30261esac
30262fi
30263JAVA=$ac_cv_path_JAVA
30264if test -n "$JAVA"; then
30265  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30266$as_echo "$JAVA" >&6; }
30267else
30268  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30269$as_echo "no" >&6; }
30270fi
30271
30272
30273          if test "x$JAVA" = x; then
30274            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30275          fi
30276        else
30277          # Otherwise we believe it is a complete path. Use it as it is.
30278          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30279$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30280          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30281$as_echo_n "checking for JAVA... " >&6; }
30282          if test ! -x "$tool_specified"; then
30283            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30284$as_echo "not found" >&6; }
30285            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30286          fi
30287          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30288$as_echo "$tool_specified" >&6; }
30289        fi
30290      fi
30291    fi
30292
30293  fi
30294
30295
30296
30297  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30298
30299  # Publish this variable in the help.
30300
30301
30302  if [ -z "${JAVAC+x}" ]; then
30303    # The variable is not set by user, try to locate tool using the code snippet
30304
30305      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30306$as_echo_n "checking for javac in Boot JDK... " >&6; }
30307      JAVAC=$BOOT_JDK/bin/javac
30308      if test ! -x $JAVAC; then
30309        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30310$as_echo "not found" >&6; }
30311        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30312$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30313        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30314      fi
30315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30316$as_echo "ok" >&6; }
30317
30318
30319  else
30320    # The variable is set, but is it from the command line or the environment?
30321
30322    # Try to remove the string !JAVAC! from our list.
30323    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30324    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30325      # If it failed, the variable was not from the command line. Ignore it,
30326      # but warn the user (except for BASH, which is always set by the calling BASH).
30327      if test "xJAVAC" != xBASH; then
30328        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30329$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30330      fi
30331      # Try to locate tool using the code snippet
30332
30333      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30334$as_echo_n "checking for javac in Boot JDK... " >&6; }
30335      JAVAC=$BOOT_JDK/bin/javac
30336      if test ! -x $JAVAC; then
30337        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30338$as_echo "not found" >&6; }
30339        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30340$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30341        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30342      fi
30343      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30344$as_echo "ok" >&6; }
30345
30346
30347    else
30348      # If it succeeded, then it was overridden by the user. We will use it
30349      # for the tool.
30350
30351      # First remove it from the list of overridden variables, so we can test
30352      # for unknown variables in the end.
30353      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30354
30355      # Check if we try to supply an empty value
30356      if test "x$JAVAC" = x; then
30357        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30358$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30359        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30360$as_echo_n "checking for JAVAC... " >&6; }
30361        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30362$as_echo "disabled" >&6; }
30363      else
30364        # Check if the provided tool contains a complete path.
30365        tool_specified="$JAVAC"
30366        tool_basename="${tool_specified##*/}"
30367        if test "x$tool_basename" = "x$tool_specified"; then
30368          # A command without a complete path is provided, search $PATH.
30369          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30370$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30371          # Extract the first word of "$tool_basename", so it can be a program name with args.
30372set dummy $tool_basename; ac_word=$2
30373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30374$as_echo_n "checking for $ac_word... " >&6; }
30375if ${ac_cv_path_JAVAC+:} false; then :
30376  $as_echo_n "(cached) " >&6
30377else
30378  case $JAVAC in
30379  [\\/]* | ?:[\\/]*)
30380  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30381  ;;
30382  *)
30383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30384for as_dir in $PATH
30385do
30386  IFS=$as_save_IFS
30387  test -z "$as_dir" && as_dir=.
30388    for ac_exec_ext in '' $ac_executable_extensions; do
30389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30390    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30392    break 2
30393  fi
30394done
30395  done
30396IFS=$as_save_IFS
30397
30398  ;;
30399esac
30400fi
30401JAVAC=$ac_cv_path_JAVAC
30402if test -n "$JAVAC"; then
30403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30404$as_echo "$JAVAC" >&6; }
30405else
30406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30407$as_echo "no" >&6; }
30408fi
30409
30410
30411          if test "x$JAVAC" = x; then
30412            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30413          fi
30414        else
30415          # Otherwise we believe it is a complete path. Use it as it is.
30416          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30417$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30418          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30419$as_echo_n "checking for JAVAC... " >&6; }
30420          if test ! -x "$tool_specified"; then
30421            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30422$as_echo "not found" >&6; }
30423            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30424          fi
30425          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30426$as_echo "$tool_specified" >&6; }
30427        fi
30428      fi
30429    fi
30430
30431  fi
30432
30433
30434
30435  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30436
30437  # Publish this variable in the help.
30438
30439
30440  if [ -z "${JAVAH+x}" ]; then
30441    # The variable is not set by user, try to locate tool using the code snippet
30442
30443      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30444$as_echo_n "checking for javah in Boot JDK... " >&6; }
30445      JAVAH=$BOOT_JDK/bin/javah
30446      if test ! -x $JAVAH; then
30447        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30448$as_echo "not found" >&6; }
30449        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30450$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30451        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30452      fi
30453      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30454$as_echo "ok" >&6; }
30455
30456
30457  else
30458    # The variable is set, but is it from the command line or the environment?
30459
30460    # Try to remove the string !JAVAH! from our list.
30461    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30462    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30463      # If it failed, the variable was not from the command line. Ignore it,
30464      # but warn the user (except for BASH, which is always set by the calling BASH).
30465      if test "xJAVAH" != xBASH; then
30466        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30467$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30468      fi
30469      # Try to locate tool using the code snippet
30470
30471      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30472$as_echo_n "checking for javah in Boot JDK... " >&6; }
30473      JAVAH=$BOOT_JDK/bin/javah
30474      if test ! -x $JAVAH; then
30475        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30476$as_echo "not found" >&6; }
30477        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30478$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30479        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30480      fi
30481      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30482$as_echo "ok" >&6; }
30483
30484
30485    else
30486      # If it succeeded, then it was overridden by the user. We will use it
30487      # for the tool.
30488
30489      # First remove it from the list of overridden variables, so we can test
30490      # for unknown variables in the end.
30491      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30492
30493      # Check if we try to supply an empty value
30494      if test "x$JAVAH" = x; then
30495        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30496$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30497        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30498$as_echo_n "checking for JAVAH... " >&6; }
30499        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30500$as_echo "disabled" >&6; }
30501      else
30502        # Check if the provided tool contains a complete path.
30503        tool_specified="$JAVAH"
30504        tool_basename="${tool_specified##*/}"
30505        if test "x$tool_basename" = "x$tool_specified"; then
30506          # A command without a complete path is provided, search $PATH.
30507          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30508$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30509          # Extract the first word of "$tool_basename", so it can be a program name with args.
30510set dummy $tool_basename; ac_word=$2
30511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30512$as_echo_n "checking for $ac_word... " >&6; }
30513if ${ac_cv_path_JAVAH+:} false; then :
30514  $as_echo_n "(cached) " >&6
30515else
30516  case $JAVAH in
30517  [\\/]* | ?:[\\/]*)
30518  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30519  ;;
30520  *)
30521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30522for as_dir in $PATH
30523do
30524  IFS=$as_save_IFS
30525  test -z "$as_dir" && as_dir=.
30526    for ac_exec_ext in '' $ac_executable_extensions; do
30527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30528    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30530    break 2
30531  fi
30532done
30533  done
30534IFS=$as_save_IFS
30535
30536  ;;
30537esac
30538fi
30539JAVAH=$ac_cv_path_JAVAH
30540if test -n "$JAVAH"; then
30541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30542$as_echo "$JAVAH" >&6; }
30543else
30544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30545$as_echo "no" >&6; }
30546fi
30547
30548
30549          if test "x$JAVAH" = x; then
30550            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30551          fi
30552        else
30553          # Otherwise we believe it is a complete path. Use it as it is.
30554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30555$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30556          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30557$as_echo_n "checking for JAVAH... " >&6; }
30558          if test ! -x "$tool_specified"; then
30559            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30560$as_echo "not found" >&6; }
30561            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30562          fi
30563          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30564$as_echo "$tool_specified" >&6; }
30565        fi
30566      fi
30567    fi
30568
30569  fi
30570
30571
30572
30573  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30574
30575  # Publish this variable in the help.
30576
30577
30578  if [ -z "${JAR+x}" ]; then
30579    # The variable is not set by user, try to locate tool using the code snippet
30580
30581      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30582$as_echo_n "checking for jar in Boot JDK... " >&6; }
30583      JAR=$BOOT_JDK/bin/jar
30584      if test ! -x $JAR; then
30585        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30586$as_echo "not found" >&6; }
30587        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30588$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30589        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30590      fi
30591      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30592$as_echo "ok" >&6; }
30593
30594
30595  else
30596    # The variable is set, but is it from the command line or the environment?
30597
30598    # Try to remove the string !JAR! from our list.
30599    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30600    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30601      # If it failed, the variable was not from the command line. Ignore it,
30602      # but warn the user (except for BASH, which is always set by the calling BASH).
30603      if test "xJAR" != xBASH; then
30604        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30605$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30606      fi
30607      # Try to locate tool using the code snippet
30608
30609      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30610$as_echo_n "checking for jar in Boot JDK... " >&6; }
30611      JAR=$BOOT_JDK/bin/jar
30612      if test ! -x $JAR; then
30613        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30614$as_echo "not found" >&6; }
30615        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30616$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30617        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30618      fi
30619      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30620$as_echo "ok" >&6; }
30621
30622
30623    else
30624      # If it succeeded, then it was overridden by the user. We will use it
30625      # for the tool.
30626
30627      # First remove it from the list of overridden variables, so we can test
30628      # for unknown variables in the end.
30629      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30630
30631      # Check if we try to supply an empty value
30632      if test "x$JAR" = x; then
30633        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30634$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30635        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30636$as_echo_n "checking for JAR... " >&6; }
30637        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30638$as_echo "disabled" >&6; }
30639      else
30640        # Check if the provided tool contains a complete path.
30641        tool_specified="$JAR"
30642        tool_basename="${tool_specified##*/}"
30643        if test "x$tool_basename" = "x$tool_specified"; then
30644          # A command without a complete path is provided, search $PATH.
30645          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30646$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30647          # Extract the first word of "$tool_basename", so it can be a program name with args.
30648set dummy $tool_basename; ac_word=$2
30649{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30650$as_echo_n "checking for $ac_word... " >&6; }
30651if ${ac_cv_path_JAR+:} false; then :
30652  $as_echo_n "(cached) " >&6
30653else
30654  case $JAR in
30655  [\\/]* | ?:[\\/]*)
30656  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30657  ;;
30658  *)
30659  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30660for as_dir in $PATH
30661do
30662  IFS=$as_save_IFS
30663  test -z "$as_dir" && as_dir=.
30664    for ac_exec_ext in '' $ac_executable_extensions; do
30665  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30666    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30667    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30668    break 2
30669  fi
30670done
30671  done
30672IFS=$as_save_IFS
30673
30674  ;;
30675esac
30676fi
30677JAR=$ac_cv_path_JAR
30678if test -n "$JAR"; then
30679  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30680$as_echo "$JAR" >&6; }
30681else
30682  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30683$as_echo "no" >&6; }
30684fi
30685
30686
30687          if test "x$JAR" = x; then
30688            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30689          fi
30690        else
30691          # Otherwise we believe it is a complete path. Use it as it is.
30692          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30693$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30694          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30695$as_echo_n "checking for JAR... " >&6; }
30696          if test ! -x "$tool_specified"; then
30697            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30698$as_echo "not found" >&6; }
30699            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30700          fi
30701          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30702$as_echo "$tool_specified" >&6; }
30703        fi
30704      fi
30705    fi
30706
30707  fi
30708
30709
30710
30711  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30712
30713  # Publish this variable in the help.
30714
30715
30716  if [ -z "${JARSIGNER+x}" ]; then
30717    # The variable is not set by user, try to locate tool using the code snippet
30718
30719      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30720$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30721      JARSIGNER=$BOOT_JDK/bin/jarsigner
30722      if test ! -x $JARSIGNER; then
30723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30724$as_echo "not found" >&6; }
30725        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30726$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30727        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30728      fi
30729      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30730$as_echo "ok" >&6; }
30731
30732
30733  else
30734    # The variable is set, but is it from the command line or the environment?
30735
30736    # Try to remove the string !JARSIGNER! from our list.
30737    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30738    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30739      # If it failed, the variable was not from the command line. Ignore it,
30740      # but warn the user (except for BASH, which is always set by the calling BASH).
30741      if test "xJARSIGNER" != xBASH; then
30742        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30743$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30744      fi
30745      # Try to locate tool using the code snippet
30746
30747      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30748$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30749      JARSIGNER=$BOOT_JDK/bin/jarsigner
30750      if test ! -x $JARSIGNER; then
30751        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30752$as_echo "not found" >&6; }
30753        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&5
30754$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitly setting --with-boot-jdk" >&6;}
30755        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30756      fi
30757      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30758$as_echo "ok" >&6; }
30759
30760
30761    else
30762      # If it succeeded, then it was overridden by the user. We will use it
30763      # for the tool.
30764
30765      # First remove it from the list of overridden variables, so we can test
30766      # for unknown variables in the end.
30767      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30768
30769      # Check if we try to supply an empty value
30770      if test "x$JARSIGNER" = x; then
30771        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30772$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30773        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30774$as_echo_n "checking for JARSIGNER... " >&6; }
30775        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30776$as_echo "disabled" >&6; }
30777      else
30778        # Check if the provided tool contains a complete path.
30779        tool_specified="$JARSIGNER"
30780        tool_basename="${tool_specified##*/}"
30781        if test "x$tool_basename" = "x$tool_specified"; then
30782          # A command without a complete path is provided, search $PATH.
30783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30784$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30785          # Extract the first word of "$tool_basename", so it can be a program name with args.
30786set dummy $tool_basename; ac_word=$2
30787{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30788$as_echo_n "checking for $ac_word... " >&6; }
30789if ${ac_cv_path_JARSIGNER+:} false; then :
30790  $as_echo_n "(cached) " >&6
30791else
30792  case $JARSIGNER in
30793  [\\/]* | ?:[\\/]*)
30794  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30795  ;;
30796  *)
30797  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30798for as_dir in $PATH
30799do
30800  IFS=$as_save_IFS
30801  test -z "$as_dir" && as_dir=.
30802    for ac_exec_ext in '' $ac_executable_extensions; do
30803  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30804    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30805    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30806    break 2
30807  fi
30808done
30809  done
30810IFS=$as_save_IFS
30811
30812  ;;
30813esac
30814fi
30815JARSIGNER=$ac_cv_path_JARSIGNER
30816if test -n "$JARSIGNER"; then
30817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30818$as_echo "$JARSIGNER" >&6; }
30819else
30820  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30821$as_echo "no" >&6; }
30822fi
30823
30824
30825          if test "x$JARSIGNER" = x; then
30826            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30827          fi
30828        else
30829          # Otherwise we believe it is a complete path. Use it as it is.
30830          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30831$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30832          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30833$as_echo_n "checking for JARSIGNER... " >&6; }
30834          if test ! -x "$tool_specified"; then
30835            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30836$as_echo "not found" >&6; }
30837            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30838          fi
30839          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30840$as_echo "$tool_specified" >&6; }
30841        fi
30842      fi
30843    fi
30844
30845  fi
30846
30847
30848
30849  # Finally, set some other options...
30850
30851  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30852  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30853
30854
30855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30856$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30857  if "$JAVA" --list-modules > /dev/null 2>&1; then
30858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30859$as_echo "yes" >&6; }
30860    BOOT_JDK_MODULAR="true"
30861  else
30862    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30863$as_echo "no" >&6; }
30864    BOOT_JDK_MODULAR="false"
30865  fi
30866
30867
30868
30869
30870  # Check if the boot jdk is 32 or 64 bit
30871  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30872    BOOT_JDK_BITS="64"
30873  else
30874    BOOT_JDK_BITS="32"
30875  fi
30876  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30877$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30878  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30879$as_echo "$BOOT_JDK_BITS" >&6; }
30880
30881
30882
30883# Check whether --with-build-jdk was given.
30884if test "${with_build_jdk+set}" = set; then :
30885  withval=$with_build_jdk;
30886fi
30887
30888
30889  CREATE_BUILDJDK=false
30890  EXTERNAL_BUILDJDK=false
30891  BUILD_JDK_FOUND="no"
30892  if test "x$with_build_jdk" != "x"; then
30893
30894  if test "x$BUILD_JDK_FOUND" = xno; then
30895    # Execute the test
30896
30897       if test "x$with_build_jdk" != x; then
30898         BUILD_JDK=$with_build_jdk
30899         BUILD_JDK_FOUND=maybe
30900         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30901$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30902       fi
30903
30904    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30905    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30906      # Do we have a bin/java?
30907      if test ! -x "$BUILD_JDK/bin/java"; then
30908        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30909$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30910        BUILD_JDK_FOUND=no
30911      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30912        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30913$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30914        BUILD_JDK_FOUND=no
30915      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30916        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30917$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30918        BUILD_JDK_FOUND=no
30919      elif test ! -x "$BUILD_JDK/bin/javac"; then
30920        # Do we have a bin/javac?
30921        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30922$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30923        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30924$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30925        BUILD_JDK_FOUND=no
30926      else
30927        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30928        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30929
30930        # Extra M4 quote needed to protect [] in grep expression.
30931        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30932        if test "x$FOUND_CORRECT_VERSION" = x; then
30933          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30934$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30935          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30936$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30937          BUILD_JDK_FOUND=no
30938        else
30939          # We're done!
30940          BUILD_JDK_FOUND=yes
30941
30942  # Only process if variable expands to non-empty
30943
30944  if test "x$BUILD_JDK" != x; then
30945    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30946
30947  # Input might be given as Windows format, start by converting to
30948  # unix format.
30949  path="$BUILD_JDK"
30950  new_path=`$CYGPATH -u "$path"`
30951
30952  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30953  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30954  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30955  # "foo.exe" is OK but "foo" is an error.
30956  #
30957  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30958  # It is also a way to make sure we got the proper file name for the real test later on.
30959  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30960  if test "x$test_shortpath" = x; then
30961    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30962$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30963    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30964  fi
30965
30966  # Call helper function which possibly converts this using DOS-style short mode.
30967  # If so, the updated path is stored in $new_path.
30968
30969  input_path="$new_path"
30970  # Check if we need to convert this using DOS-style short mode. If the path
30971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30972  # take no chances and rewrite it.
30973  # Note: m4 eats our [], so we need to use [ and ] instead.
30974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30975  if test "x$has_forbidden_chars" != x; then
30976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30977    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30978    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30979    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30980      # Going to short mode and back again did indeed matter. Since short mode is
30981      # case insensitive, let's make it lowercase to improve readability.
30982      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30983      # Now convert it back to Unix-style (cygpath)
30984      input_path=`$CYGPATH -u "$shortmode_path"`
30985      new_path="$input_path"
30986    fi
30987  fi
30988
30989  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30990  if test "x$test_cygdrive_prefix" = x; then
30991    # As a simple fix, exclude /usr/bin since it's not a real path.
30992    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30993      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30994      # a path prefixed by /cygdrive for fixpath to work.
30995      new_path="$CYGWIN_ROOT_PATH$input_path"
30996    fi
30997  fi
30998
30999
31000  if test "x$path" != "x$new_path"; then
31001    BUILD_JDK="$new_path"
31002    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31003$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31004  fi
31005
31006    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31007
31008  path="$BUILD_JDK"
31009  has_colon=`$ECHO $path | $GREP ^.:`
31010  new_path="$path"
31011  if test "x$has_colon" = x; then
31012    # Not in mixed or Windows style, start by that.
31013    new_path=`cmd //c echo $path`
31014  fi
31015
31016
31017  input_path="$new_path"
31018  # Check if we need to convert this using DOS-style short mode. If the path
31019  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31020  # take no chances and rewrite it.
31021  # Note: m4 eats our [], so we need to use [ and ] instead.
31022  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31023  if test "x$has_forbidden_chars" != x; then
31024    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31025    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31026  fi
31027
31028
31029  windows_path="$new_path"
31030  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31031    unix_path=`$CYGPATH -u "$windows_path"`
31032    new_path="$unix_path"
31033  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31034    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31035    new_path="$unix_path"
31036  fi
31037
31038  if test "x$path" != "x$new_path"; then
31039    BUILD_JDK="$new_path"
31040    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
31041$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
31042  fi
31043
31044  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31045  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31046
31047    else
31048      # We're on a unix platform. Hooray! :)
31049      path="$BUILD_JDK"
31050      has_space=`$ECHO "$path" | $GREP " "`
31051      if test "x$has_space" != x; then
31052        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
31053$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
31054        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31055      fi
31056
31057      # Use eval to expand a potential ~
31058      eval path="$path"
31059      if test ! -f "$path" && test ! -d "$path"; then
31060        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
31061      fi
31062
31063      if test -d "$path"; then
31064        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
31065      else
31066        dir="`$DIRNAME "$path"`"
31067        base="`$BASENAME "$path"`"
31068        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
31069      fi
31070    fi
31071  fi
31072
31073          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31074$as_echo_n "checking for Build JDK... " >&6; }
31075          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
31076$as_echo "$BUILD_JDK" >&6; }
31077          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
31078$as_echo_n "checking Build JDK version... " >&6; }
31079          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
31080          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
31081$as_echo "$BUILD_JDK_VERSION" >&6; }
31082        fi # end check jdk version
31083      fi # end check java
31084    fi # end check build jdk found
31085  fi
31086
31087    EXTERNAL_BUILDJDK=true
31088  else
31089    if test "x$COMPILE_TYPE" = "xcross"; then
31090      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
31091      BUILD_JDK_FOUND=yes
31092      CREATE_BUILDJDK=true
31093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31094$as_echo_n "checking for Build JDK... " >&6; }
31095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
31096$as_echo "yes, will build it for the host platform" >&6; }
31097    else
31098      BUILD_JDK="\$(JDK_OUTPUTDIR)"
31099      BUILD_JDK_FOUND=yes
31100      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31101$as_echo_n "checking for Build JDK... " >&6; }
31102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
31103$as_echo "yes, will use output dir" >&6; }
31104    fi
31105  fi
31106
31107  JMOD="$BUILD_JDK/bin/jmod"
31108  JLINK="$BUILD_JDK/bin/jlink"
31109
31110
31111
31112  if test "x$BUILD_JDK_FOUND" != "xyes"; then
31113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
31114$as_echo_n "checking for Build JDK... " >&6; }
31115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31116$as_echo "no" >&6; }
31117    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
31118  fi
31119
31120
31121
31122
31123
31124
31125###############################################################################
31126#
31127# Configure the sources to use. We can add or override individual directories.
31128#
31129###############################################################################
31130
31131
31132  # Where are the sources.
31133  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
31134  CORBA_TOPDIR="$SRC_ROOT/corba"
31135  JAXP_TOPDIR="$SRC_ROOT/jaxp"
31136  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
31137  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
31138  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
31139  JDK_TOPDIR="$SRC_ROOT/jdk"
31140
31141
31142
31143
31144
31145
31146
31147
31148
31149  # This feature is no longer supported.
31150
31151
31152
31153# Check whether --with-add-source-root was given.
31154if test "${with_add_source_root+set}" = set; then :
31155  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
31156$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
31157fi
31158
31159
31160
31161
31162# Check whether --with-override-source-root was given.
31163if test "${with_override_source_root+set}" = set; then :
31164  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
31165$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
31166fi
31167
31168
31169
31170
31171# Check whether --with-adds-and-overrides was given.
31172if test "${with_adds_and_overrides+set}" = set; then :
31173  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
31174$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
31175fi
31176
31177
31178
31179
31180# Check whether --with-override-langtools was given.
31181if test "${with_override_langtools+set}" = set; then :
31182  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
31183$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
31184fi
31185
31186
31187
31188
31189# Check whether --with-override-corba was given.
31190if test "${with_override_corba+set}" = set; then :
31191  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
31192$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
31193fi
31194
31195
31196
31197
31198# Check whether --with-override-jaxp was given.
31199if test "${with_override_jaxp+set}" = set; then :
31200  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
31201$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
31202fi
31203
31204
31205
31206
31207# Check whether --with-override-jaxws was given.
31208if test "${with_override_jaxws+set}" = set; then :
31209  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
31210$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
31211fi
31212
31213
31214
31215
31216# Check whether --with-override-hotspot was given.
31217if test "${with_override_hotspot+set}" = set; then :
31218  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31219$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31220fi
31221
31222
31223
31224
31225# Check whether --with-override-nashorn was given.
31226if test "${with_override_nashorn+set}" = set; then :
31227  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31228$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31229fi
31230
31231
31232
31233
31234# Check whether --with-override-jdk was given.
31235if test "${with_override_jdk+set}" = set; then :
31236  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31237$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31238fi
31239
31240
31241
31242
31243  BUILD_OUTPUT="$OUTPUT_ROOT"
31244
31245  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31246
31247
31248
31249# Check whether --with-import_hotspot was given.
31250if test "${with_import_hotspot+set}" = set; then :
31251  withval=$with_import_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&5
31252$as_echo "$as_me: WARNING: Option --with-import_hotspot is deprecated and will be ignored." >&2;}
31253fi
31254
31255
31256
31257
31258
31259
31260# Check whether --with-import-modules was given.
31261if test "${with_import_modules+set}" = set; then :
31262  withval=$with_import_modules;
31263fi
31264
31265
31266  if test "x$with_import_modules" != x \
31267      && test "x$with_import_modules" != "xno"; then
31268    if test -d "$with_import_modules"; then
31269      IMPORT_MODULES_TOPDIR="$with_import_modules"
31270
31271  # Only process if variable expands to non-empty
31272
31273  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31275
31276  # Input might be given as Windows format, start by converting to
31277  # unix format.
31278  path="$IMPORT_MODULES_TOPDIR"
31279  new_path=`$CYGPATH -u "$path"`
31280
31281  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31282  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31283  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31284  # "foo.exe" is OK but "foo" is an error.
31285  #
31286  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31287  # It is also a way to make sure we got the proper file name for the real test later on.
31288  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31289  if test "x$test_shortpath" = x; then
31290    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31291$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31292    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31293  fi
31294
31295  # Call helper function which possibly converts this using DOS-style short mode.
31296  # If so, the updated path is stored in $new_path.
31297
31298  input_path="$new_path"
31299  # Check if we need to convert this using DOS-style short mode. If the path
31300  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31301  # take no chances and rewrite it.
31302  # Note: m4 eats our [], so we need to use [ and ] instead.
31303  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31304  if test "x$has_forbidden_chars" != x; then
31305    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31306    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31307    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31308    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31309      # Going to short mode and back again did indeed matter. Since short mode is
31310      # case insensitive, let's make it lowercase to improve readability.
31311      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31312      # Now convert it back to Unix-style (cygpath)
31313      input_path=`$CYGPATH -u "$shortmode_path"`
31314      new_path="$input_path"
31315    fi
31316  fi
31317
31318  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31319  if test "x$test_cygdrive_prefix" = x; then
31320    # As a simple fix, exclude /usr/bin since it's not a real path.
31321    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31322      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31323      # a path prefixed by /cygdrive for fixpath to work.
31324      new_path="$CYGWIN_ROOT_PATH$input_path"
31325    fi
31326  fi
31327
31328
31329  if test "x$path" != "x$new_path"; then
31330    IMPORT_MODULES_TOPDIR="$new_path"
31331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31332$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31333  fi
31334
31335    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31336
31337  path="$IMPORT_MODULES_TOPDIR"
31338  has_colon=`$ECHO $path | $GREP ^.:`
31339  new_path="$path"
31340  if test "x$has_colon" = x; then
31341    # Not in mixed or Windows style, start by that.
31342    new_path=`cmd //c echo $path`
31343  fi
31344
31345
31346  input_path="$new_path"
31347  # Check if we need to convert this using DOS-style short mode. If the path
31348  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31349  # take no chances and rewrite it.
31350  # Note: m4 eats our [], so we need to use [ and ] instead.
31351  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31352  if test "x$has_forbidden_chars" != x; then
31353    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31354    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31355  fi
31356
31357
31358  windows_path="$new_path"
31359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31360    unix_path=`$CYGPATH -u "$windows_path"`
31361    new_path="$unix_path"
31362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31364    new_path="$unix_path"
31365  fi
31366
31367  if test "x$path" != "x$new_path"; then
31368    IMPORT_MODULES_TOPDIR="$new_path"
31369    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31370$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31371  fi
31372
31373  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31374  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31375
31376    else
31377      # We're on a unix platform. Hooray! :)
31378      path="$IMPORT_MODULES_TOPDIR"
31379      has_space=`$ECHO "$path" | $GREP " "`
31380      if test "x$has_space" != x; then
31381        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31382$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31383        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31384      fi
31385
31386      # Use eval to expand a potential ~
31387      eval path="$path"
31388      if test ! -f "$path" && test ! -d "$path"; then
31389        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31390      fi
31391
31392      if test -d "$path"; then
31393        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31394      else
31395        dir="`$DIRNAME "$path"`"
31396        base="`$BASENAME "$path"`"
31397        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31398      fi
31399    fi
31400  fi
31401
31402    elif test -e "$with_import_modules"; then
31403      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31404      $RM -rf "$IMPORT_MODULES_TOPDIR"
31405      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31406      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31407        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31408      fi
31409    else
31410      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31411    fi
31412  fi
31413
31414  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31415    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31416  fi
31417  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31418    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31419  fi
31420  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31421    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31422  fi
31423  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31424    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31425  fi
31426  if test -d "$IMPORT_MODULES_TOPDIR/modules_legal"; then
31427    IMPORT_MODULES_LEGAL="$IMPORT_MODULES_TOPDIR/modules_legal"
31428  fi
31429  if test -d "$IMPORT_MODULES_TOPDIR/modules_man"; then
31430    IMPORT_MODULES_MAN="$IMPORT_MODULES_TOPDIR/modules_man"
31431  fi
31432  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31433    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31434  fi
31435  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31436    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31437  fi
31438
31439
31440
31441
31442
31443
31444
31445
31446
31447
31448
31449###############################################################################
31450#
31451# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31452# native code.
31453#
31454###############################################################################
31455
31456# See if we are doing a complete static build or not
31457
31458  # Check whether --enable-static-build was given.
31459if test "${enable_static_build+set}" = set; then :
31460  enableval=$enable_static_build;
31461fi
31462
31463  STATIC_BUILD=false
31464  if test "x$enable_static_build" = "xyes"; then
31465    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31466$as_echo_n "checking if static build is enabled... " >&6; }
31467    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31468$as_echo "yes" >&6; }
31469    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31470      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31471    fi
31472    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31473    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31474    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31475    STATIC_BUILD=true
31476  elif test "x$enable_static_build" = "xno"; then
31477    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31478$as_echo_n "checking if static build is enabled... " >&6; }
31479    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31480$as_echo "no" >&6; }
31481  elif test "x$enable_static_build" != "x"; then
31482    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31483  fi
31484
31485
31486
31487
31488# First determine the toolchain type (compiler family)
31489
31490
31491# Check whether --with-toolchain-type was given.
31492if test "${with_toolchain_type+set}" = set; then :
31493  withval=$with_toolchain_type;
31494fi
31495
31496
31497  # Use indirect variable referencing
31498  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31499  VALID_TOOLCHAINS=${!toolchain_var_name}
31500
31501  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31502    if test -n "$XCODEBUILD"; then
31503      # On Mac OS X, default toolchain to clang after Xcode 5
31504      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31505      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31506      if test $? -ne 0; then
31507        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31508      fi
31509      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31510          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31511          $CUT -f 1 -d .`
31512      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31513$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31514      if test $XCODE_MAJOR_VERSION -ge 5; then
31515          DEFAULT_TOOLCHAIN="clang"
31516      else
31517          DEFAULT_TOOLCHAIN="gcc"
31518      fi
31519    else
31520      # If Xcode is not installed, but the command line tools are
31521      # then we can't run xcodebuild. On these systems we should
31522      # default to clang
31523      DEFAULT_TOOLCHAIN="clang"
31524    fi
31525  else
31526    # First toolchain type in the list is the default
31527    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31528  fi
31529
31530  if test "x$with_toolchain_type" = xlist; then
31531    # List all toolchains
31532    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31533$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31534    for toolchain in $VALID_TOOLCHAINS; do
31535      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31536      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31537      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31538    done
31539
31540    exit 0
31541  elif test "x$with_toolchain_type" != x; then
31542    # User override; check that it is valid
31543    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31544      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31545$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31546      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31547$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31548      as_fn_error $? "Cannot continue." "$LINENO" 5
31549    fi
31550    TOOLCHAIN_TYPE=$with_toolchain_type
31551  else
31552    # No flag given, use default
31553    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31554  fi
31555
31556
31557  TOOLCHAIN_CC_BINARY_clang="clang"
31558  TOOLCHAIN_CC_BINARY_gcc="gcc"
31559  TOOLCHAIN_CC_BINARY_microsoft="cl"
31560  TOOLCHAIN_CC_BINARY_solstudio="cc"
31561  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31562
31563  TOOLCHAIN_CXX_BINARY_clang="clang++"
31564  TOOLCHAIN_CXX_BINARY_gcc="g++"
31565  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31566  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31567  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31568
31569  # Use indirect variable referencing
31570  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31571  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31572  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31573  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31574  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31575  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31576  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31577  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31578
31579
31580  # Define filename patterns
31581  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31582    LIBRARY_PREFIX=
31583    SHARED_LIBRARY_SUFFIX='.dll'
31584    STATIC_LIBRARY_SUFFIX='.lib'
31585    SHARED_LIBRARY='$1.dll'
31586    STATIC_LIBRARY='$1.lib'
31587    OBJ_SUFFIX='.obj'
31588    EXE_SUFFIX='.exe'
31589  else
31590    LIBRARY_PREFIX=lib
31591    SHARED_LIBRARY_SUFFIX='.so'
31592    STATIC_LIBRARY_SUFFIX='.a'
31593    SHARED_LIBRARY='lib$1.so'
31594    STATIC_LIBRARY='lib$1.a'
31595    OBJ_SUFFIX='.o'
31596    EXE_SUFFIX=''
31597    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31598      # For full static builds, we're overloading the SHARED_LIBRARY
31599      # variables in order to limit the amount of changes required.
31600      # It would be better to remove SHARED and just use LIBRARY and
31601      # LIBRARY_SUFFIX for libraries that can be built either
31602      # shared or static and use STATIC_* for libraries that are
31603      # always built statically.
31604      if test "x$STATIC_BUILD" = xtrue; then
31605        SHARED_LIBRARY='lib$1.a'
31606        SHARED_LIBRARY_SUFFIX='.a'
31607      else
31608        SHARED_LIBRARY='lib$1.dylib'
31609        SHARED_LIBRARY_SUFFIX='.dylib'
31610      fi
31611    fi
31612  fi
31613
31614
31615
31616
31617
31618
31619
31620
31621
31622
31623  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31624    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31625$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31626  else
31627    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31628$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31629  fi
31630
31631
31632# User supplied flags should be used when configure detects compilers
31633
31634  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31635    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31636$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31637  fi
31638
31639  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31640    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31641$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31642  fi
31643
31644  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31646$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31647  fi
31648
31649
31650# Check whether --with-extra-cflags was given.
31651if test "${with_extra_cflags+set}" = set; then :
31652  withval=$with_extra_cflags;
31653fi
31654
31655
31656
31657# Check whether --with-extra-cxxflags was given.
31658if test "${with_extra_cxxflags+set}" = set; then :
31659  withval=$with_extra_cxxflags;
31660fi
31661
31662
31663
31664# Check whether --with-extra-ldflags was given.
31665if test "${with_extra_ldflags+set}" = set; then :
31666  withval=$with_extra_ldflags;
31667fi
31668
31669
31670  EXTRA_CFLAGS="$with_extra_cflags"
31671  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31672  EXTRA_LDFLAGS="$with_extra_ldflags"
31673
31674
31675
31676
31677
31678  # The global CFLAGS and LDLAGS variables are used by configure tests and
31679  # should include the extra parameters
31680  CFLAGS="$EXTRA_CFLAGS"
31681  CXXFLAGS="$EXTRA_CXXFLAGS"
31682  LDFLAGS="$EXTRA_LDFLAGS"
31683  CPPFLAGS=""
31684
31685# The sysroot cflags are needed for configure to be able to run the compilers
31686
31687  if test "x$SYSROOT" != "x"; then
31688    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31689      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31690        # Solaris Studio does not have a concept of sysroot. Instead we must
31691        # make sure the default include and lib dirs are appended to each
31692        # compile and link command line. Must also add -I-xbuiltin to enable
31693        # inlining of system functions and intrinsics.
31694        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31695        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31696            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
31697      fi
31698    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31699      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31700      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31701    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31702      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31703      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31704    fi
31705    # The global CFLAGS and LDFLAGS variables need these for configure to function
31706    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31707    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31708    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31709    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31710  fi
31711
31712  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31713    # We also need -iframework<path>/System/Library/Frameworks
31714    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31715    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31716    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31717    # set this here so it doesn't have to be peppered throughout the forest
31718    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31719    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31720  fi
31721
31722
31723
31724
31725
31726# Then detect the actual binaries needed
31727
31728  # FIXME: Is this needed?
31729  ac_ext=cpp
31730ac_cpp='$CXXCPP $CPPFLAGS'
31731ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31732ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31733ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31734
31735
31736  # Store the CFLAGS etc passed to the configure script.
31737  ORG_CFLAGS="$CFLAGS"
31738  ORG_CXXFLAGS="$CXXFLAGS"
31739
31740  # autoconf magic only relies on PATH, so update it if tools dir is specified
31741  OLD_PATH="$PATH"
31742
31743  # On Windows, we need to detect the visual studio installation first.
31744  # This will change the PATH, but we need to keep that new PATH even
31745  # after toolchain detection is done, since the compiler (on x86) uses
31746  # it for DLL resolution in runtime.
31747  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31748      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31749
31750  # Store path to cygwin link.exe to help excluding it when searching for
31751  # VS linker. This must be done before changing the PATH when looking for VS.
31752  # Extract the first word of "link", so it can be a program name with args.
31753set dummy link; ac_word=$2
31754{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31755$as_echo_n "checking for $ac_word... " >&6; }
31756if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31757  $as_echo_n "(cached) " >&6
31758else
31759  case $CYGWIN_LINK in
31760  [\\/]* | ?:[\\/]*)
31761  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31762  ;;
31763  *)
31764  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31765for as_dir in $PATH
31766do
31767  IFS=$as_save_IFS
31768  test -z "$as_dir" && as_dir=.
31769    for ac_exec_ext in '' $ac_executable_extensions; do
31770  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31771    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31772    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31773    break 2
31774  fi
31775done
31776  done
31777IFS=$as_save_IFS
31778
31779  ;;
31780esac
31781fi
31782CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31783if test -n "$CYGWIN_LINK"; then
31784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31785$as_echo "$CYGWIN_LINK" >&6; }
31786else
31787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31788$as_echo "no" >&6; }
31789fi
31790
31791
31792  if test "x$CYGWIN_LINK" != x; then
31793    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31794$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31795    "$CYGWIN_LINK" --version > /dev/null
31796    if test $? -eq 0 ; then
31797      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31798$as_echo "yes" >&6; }
31799    else
31800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31801$as_echo "no" >&6; }
31802      # This might be the VS linker. Don't exclude it later on.
31803      CYGWIN_LINK=""
31804    fi
31805  fi
31806
31807  # First-hand choice is to locate and run the vsvars bat file.
31808
31809
31810# Check whether --with-toolchain-version was given.
31811if test "${with_toolchain_version+set}" = set; then :
31812  withval=$with_toolchain_version;
31813fi
31814
31815
31816  if test "x$with_toolchain_version" = xlist; then
31817    # List all toolchains
31818    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31819$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31820    for version in $VALID_VS_VERSIONS; do
31821      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31822      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31823    done
31824
31825    exit 0
31826  elif test "x$DEVKIT_VS_VERSION" != x; then
31827    VS_VERSION=$DEVKIT_VS_VERSION
31828    TOOLCHAIN_VERSION=$VS_VERSION
31829    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31830    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31831    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31832    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31833    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31834    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31835
31836    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31837    # can still be exported as INCLUDE for compiler invocations without
31838    # SYSROOT_CFLAGS
31839    OLDIFS="$IFS"
31840    IFS=";"
31841    for i in $DEVKIT_VS_INCLUDE; do
31842      ipath=$i
31843
31844  unix_path="$ipath"
31845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31846    windows_path=`$CYGPATH -m "$unix_path"`
31847    ipath="$windows_path"
31848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31849    windows_path=`cmd //c echo $unix_path`
31850    ipath="$windows_path"
31851  fi
31852
31853      VS_INCLUDE="$VS_INCLUDE;$ipath"
31854    done
31855    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31856    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31857    for i in $DEVKIT_VS_LIB; do
31858      libpath=$i
31859
31860  unix_path="$libpath"
31861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31862    windows_path=`$CYGPATH -m "$unix_path"`
31863    libpath="$windows_path"
31864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31865    windows_path=`cmd //c echo $unix_path`
31866    libpath="$windows_path"
31867  fi
31868
31869      VS_LIB="$VS_LIB;$libpath"
31870    done
31871    IFS="$OLDIFS"
31872
31873    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31874$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31875
31876  elif test "x$with_toolchain_version" != x; then
31877    # User override; check that it is valid
31878    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31879      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31880$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31881      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31882$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31883      as_fn_error $? "Cannot continue." "$LINENO" 5
31884    fi
31885    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31886  else
31887    # No flag given, use default
31888    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31889  fi
31890
31891  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31892
31893  VS_VERSION="$VS_VERSION"
31894  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31895  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31896  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31897  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31898
31899  # When using --with-tools-dir, assume it points to the correct and default
31900  # version of Visual Studio or that --with-toolchain-version was also set.
31901  if test "x$with_tools_dir" != x; then
31902
31903  if test "x$VS_ENV_CMD" = x; then
31904    VS_VERSION="${VS_VERSION}"
31905    VS_BASE="$with_tools_dir/../.."
31906    METHOD="--with-tools-dir"
31907
31908    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31909      VCVARSFILE="vc/bin/vcvars32.bat"
31910    else
31911      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31912    fi
31913
31914
31915  windows_path="$VS_BASE"
31916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31917    unix_path=`$CYGPATH -u "$windows_path"`
31918    VS_BASE="$unix_path"
31919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31921    VS_BASE="$unix_path"
31922  fi
31923
31924    if test -d "$VS_BASE"; then
31925      if test -f "$VS_BASE/$VCVARSFILE"; then
31926        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31927$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31928        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31929        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31930        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31931        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31932      else
31933        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31934$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31935        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31936$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31937      fi
31938    fi
31939  fi
31940
31941
31942  if test "x$VS_ENV_CMD" = x; then
31943    VS_VERSION="${VS_VERSION}"
31944    VS_BASE="$with_tools_dir/../../.."
31945    METHOD="--with-tools-dir"
31946
31947    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31948      VCVARSFILE="vc/bin/vcvars32.bat"
31949    else
31950      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31951    fi
31952
31953
31954  windows_path="$VS_BASE"
31955  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31956    unix_path=`$CYGPATH -u "$windows_path"`
31957    VS_BASE="$unix_path"
31958  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31959    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31960    VS_BASE="$unix_path"
31961  fi
31962
31963    if test -d "$VS_BASE"; then
31964      if test -f "$VS_BASE/$VCVARSFILE"; then
31965        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31966$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31967        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31968        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31969        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31970        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31971      else
31972        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31973$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31974        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31975$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31976      fi
31977    fi
31978  fi
31979
31980    if test "x$VS_ENV_CMD" = x; then
31981      # Having specified an argument which is incorrect will produce an instant failure;
31982      # we should not go on looking
31983      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31984$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31985      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31986$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31987      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31988$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31989      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31990    fi
31991  fi
31992
31993  VS_ENV_CMD=""
31994  VS_ENV_ARGS=""
31995
31996  if test "x$VS_COMNTOOLS" != x; then
31997
31998  if test "x$VS_ENV_CMD" = x; then
31999    VS_VERSION="${VS_VERSION}"
32000    VS_BASE="$VS_COMNTOOLS/../.."
32001    METHOD="$VS_COMNTOOLS_VAR variable"
32002
32003    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32004      VCVARSFILE="vc/bin/vcvars32.bat"
32005    else
32006      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32007    fi
32008
32009
32010  windows_path="$VS_BASE"
32011  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32012    unix_path=`$CYGPATH -u "$windows_path"`
32013    VS_BASE="$unix_path"
32014  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32015    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32016    VS_BASE="$unix_path"
32017  fi
32018
32019    if test -d "$VS_BASE"; then
32020      if test -f "$VS_BASE/$VCVARSFILE"; then
32021        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32022$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32023        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32024        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32025        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32026        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32027      else
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32029$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32030        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32031$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32032      fi
32033    fi
32034  fi
32035
32036  fi
32037  if test "x$PROGRAMFILES" != x; then
32038
32039  if test "x$VS_ENV_CMD" = x; then
32040    VS_VERSION="${VS_VERSION}"
32041    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
32042    METHOD="well-known name"
32043
32044    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32045      VCVARSFILE="vc/bin/vcvars32.bat"
32046    else
32047      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32048    fi
32049
32050
32051  windows_path="$VS_BASE"
32052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32053    unix_path=`$CYGPATH -u "$windows_path"`
32054    VS_BASE="$unix_path"
32055  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32056    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32057    VS_BASE="$unix_path"
32058  fi
32059
32060    if test -d "$VS_BASE"; then
32061      if test -f "$VS_BASE/$VCVARSFILE"; then
32062        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32063$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32064        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32065        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32066        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32067        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32068      else
32069        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32070$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32071        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32072$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32073      fi
32074    fi
32075  fi
32076
32077  fi
32078  # Work around the insanely named ProgramFiles(x86) env variable
32079  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
32080  if test "x$PROGRAMFILES_X86" != x; then
32081
32082  if test "x$VS_ENV_CMD" = x; then
32083    VS_VERSION="${VS_VERSION}"
32084    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
32085    METHOD="well-known name"
32086
32087    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32088      VCVARSFILE="vc/bin/vcvars32.bat"
32089    else
32090      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32091    fi
32092
32093
32094  windows_path="$VS_BASE"
32095  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32096    unix_path=`$CYGPATH -u "$windows_path"`
32097    VS_BASE="$unix_path"
32098  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32099    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32100    VS_BASE="$unix_path"
32101  fi
32102
32103    if test -d "$VS_BASE"; then
32104      if test -f "$VS_BASE/$VCVARSFILE"; then
32105        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32106$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32107        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32108        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32109        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32110        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32111      else
32112        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32113$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32114        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32115$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32116      fi
32117    fi
32118  fi
32119
32120  fi
32121
32122  if test "x$VS_ENV_CMD" = x; then
32123    VS_VERSION="${VS_VERSION}"
32124    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
32125    METHOD="well-known name"
32126
32127    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32128      VCVARSFILE="vc/bin/vcvars32.bat"
32129    else
32130      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32131    fi
32132
32133
32134  windows_path="$VS_BASE"
32135  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32136    unix_path=`$CYGPATH -u "$windows_path"`
32137    VS_BASE="$unix_path"
32138  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32139    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32140    VS_BASE="$unix_path"
32141  fi
32142
32143    if test -d "$VS_BASE"; then
32144      if test -f "$VS_BASE/$VCVARSFILE"; then
32145        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32146$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32147        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32148        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32149        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32150        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32151      else
32152        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32153$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32154        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32155$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32156      fi
32157    fi
32158  fi
32159
32160
32161  if test "x$VS_ENV_CMD" = x; then
32162    VS_VERSION="${VS_VERSION}"
32163    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
32164    METHOD="well-known name"
32165
32166    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32167      VCVARSFILE="vc/bin/vcvars32.bat"
32168    else
32169      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
32170    fi
32171
32172
32173  windows_path="$VS_BASE"
32174  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32175    unix_path=`$CYGPATH -u "$windows_path"`
32176    VS_BASE="$unix_path"
32177  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32178    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32179    VS_BASE="$unix_path"
32180  fi
32181
32182    if test -d "$VS_BASE"; then
32183      if test -f "$VS_BASE/$VCVARSFILE"; then
32184        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32185$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32186        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
32187        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32188        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
32189        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
32190      else
32191        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
32192$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
32193        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32194$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32195      fi
32196    fi
32197  fi
32198
32199
32200  if test "x$SDK_INSTALL_DIR" != x; then
32201    if test "x$ProgramW6432" != x; then
32202
32203  if test "x$VS_ENV_CMD" = x; then
32204    VS_VERSION="${VS_VERSION}"
32205    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32206    METHOD="well-known name"
32207
32208  windows_path="$WIN_SDK_BASE"
32209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32210    unix_path=`$CYGPATH -u "$windows_path"`
32211    WIN_SDK_BASE="$unix_path"
32212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32214    WIN_SDK_BASE="$unix_path"
32215  fi
32216
32217    if test -d "$WIN_SDK_BASE"; then
32218      # There have been cases of partial or broken SDK installations. A missing
32219      # lib dir is not going to work.
32220      if test ! -d "$WIN_SDK_BASE/lib"; then
32221        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32222$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32223        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32224$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32225      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32226        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32227$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32228        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32229        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32230          VS_ENV_ARGS="/x86"
32231        else
32232          VS_ENV_ARGS="/x64"
32233        fi
32234        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32235        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32236        # TODO: improve detection for other versions of SDK
32237        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32238      else
32239        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32240$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32241        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32242$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32243      fi
32244    fi
32245  fi
32246
32247    fi
32248    if test "x$PROGRAMW6432" != x; then
32249
32250  if test "x$VS_ENV_CMD" = x; then
32251    VS_VERSION="${VS_VERSION}"
32252    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32253    METHOD="well-known name"
32254
32255  windows_path="$WIN_SDK_BASE"
32256  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32257    unix_path=`$CYGPATH -u "$windows_path"`
32258    WIN_SDK_BASE="$unix_path"
32259  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32260    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32261    WIN_SDK_BASE="$unix_path"
32262  fi
32263
32264    if test -d "$WIN_SDK_BASE"; then
32265      # There have been cases of partial or broken SDK installations. A missing
32266      # lib dir is not going to work.
32267      if test ! -d "$WIN_SDK_BASE/lib"; then
32268        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32269$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32270        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32271$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32272      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32273        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32274$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32275        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32276        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32277          VS_ENV_ARGS="/x86"
32278        else
32279          VS_ENV_ARGS="/x64"
32280        fi
32281        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32282        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32283        # TODO: improve detection for other versions of SDK
32284        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32285      else
32286        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32287$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32288        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32289$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32290      fi
32291    fi
32292  fi
32293
32294    fi
32295    if test "x$PROGRAMFILES" != x; then
32296
32297  if test "x$VS_ENV_CMD" = x; then
32298    VS_VERSION="${VS_VERSION}"
32299    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32300    METHOD="well-known name"
32301
32302  windows_path="$WIN_SDK_BASE"
32303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32304    unix_path=`$CYGPATH -u "$windows_path"`
32305    WIN_SDK_BASE="$unix_path"
32306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32308    WIN_SDK_BASE="$unix_path"
32309  fi
32310
32311    if test -d "$WIN_SDK_BASE"; then
32312      # There have been cases of partial or broken SDK installations. A missing
32313      # lib dir is not going to work.
32314      if test ! -d "$WIN_SDK_BASE/lib"; then
32315        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32316$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32317        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32318$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32319      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32320        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32321$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32322        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32323        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32324          VS_ENV_ARGS="/x86"
32325        else
32326          VS_ENV_ARGS="/x64"
32327        fi
32328        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32329        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32330        # TODO: improve detection for other versions of SDK
32331        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32332      else
32333        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32334$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32335        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32336$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32337      fi
32338    fi
32339  fi
32340
32341    fi
32342
32343  if test "x$VS_ENV_CMD" = x; then
32344    VS_VERSION="${VS_VERSION}"
32345    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32346    METHOD="well-known name"
32347
32348  windows_path="$WIN_SDK_BASE"
32349  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32350    unix_path=`$CYGPATH -u "$windows_path"`
32351    WIN_SDK_BASE="$unix_path"
32352  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32353    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32354    WIN_SDK_BASE="$unix_path"
32355  fi
32356
32357    if test -d "$WIN_SDK_BASE"; then
32358      # There have been cases of partial or broken SDK installations. A missing
32359      # lib dir is not going to work.
32360      if test ! -d "$WIN_SDK_BASE/lib"; then
32361        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32362$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32363        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32364$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32365      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32366        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32367$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32368        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32369        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32370          VS_ENV_ARGS="/x86"
32371        else
32372          VS_ENV_ARGS="/x64"
32373        fi
32374        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32375        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32376        # TODO: improve detection for other versions of SDK
32377        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32378      else
32379        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32380$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32381        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32382$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32383      fi
32384    fi
32385  fi
32386
32387
32388  if test "x$VS_ENV_CMD" = x; then
32389    VS_VERSION="${VS_VERSION}"
32390    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32391    METHOD="well-known name"
32392
32393  windows_path="$WIN_SDK_BASE"
32394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32395    unix_path=`$CYGPATH -u "$windows_path"`
32396    WIN_SDK_BASE="$unix_path"
32397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32398    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32399    WIN_SDK_BASE="$unix_path"
32400  fi
32401
32402    if test -d "$WIN_SDK_BASE"; then
32403      # There have been cases of partial or broken SDK installations. A missing
32404      # lib dir is not going to work.
32405      if test ! -d "$WIN_SDK_BASE/lib"; then
32406        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32407$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32408        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32409$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32410      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32411        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32412$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32413        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32414        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32415          VS_ENV_ARGS="/x86"
32416        else
32417          VS_ENV_ARGS="/x64"
32418        fi
32419        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32420        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32421        # TODO: improve detection for other versions of SDK
32422        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32423      else
32424        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32425$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32426        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32427$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32428      fi
32429    fi
32430  fi
32431
32432  fi
32433
32434    if test "x$VS_ENV_CMD" != x; then
32435      TOOLCHAIN_VERSION=$VS_VERSION
32436      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32437      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32438      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32439      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32440      # The rest of the variables are already evaled while probing
32441      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32442$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32443      break
32444    fi
32445  done
32446
32447
32448  # If we have a devkit, skip all of the below.
32449  if test "x$DEVKIT_VS_VERSION" = x; then
32450    if test "x$VS_ENV_CMD" != x; then
32451      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32452
32453  # Only process if variable expands to non-empty
32454
32455  if test "x$VS_ENV_CMD" != x; then
32456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32457
32458  # First separate the path from the arguments. This will split at the first
32459  # space.
32460  complete="$VS_ENV_CMD"
32461  path="${complete%% *}"
32462  tmp="$complete EOL"
32463  arguments="${tmp#* }"
32464
32465  # Input might be given as Windows format, start by converting to
32466  # unix format.
32467  new_path=`$CYGPATH -u "$path"`
32468
32469  # Now try to locate executable using which
32470  new_path=`$WHICH "$new_path" 2> /dev/null`
32471  # bat and cmd files are not always considered executable in cygwin causing which
32472  # to not find them
32473  if test "x$new_path" = x \
32474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32476    new_path=`$CYGPATH -u "$path"`
32477  fi
32478  if test "x$new_path" = x; then
32479    # Oops. Which didn't find the executable.
32480    # The splitting of arguments from the executable at a space might have been incorrect,
32481    # since paths with space are more likely in Windows. Give it another try with the whole
32482    # argument.
32483    path="$complete"
32484    arguments="EOL"
32485    new_path=`$CYGPATH -u "$path"`
32486    new_path=`$WHICH "$new_path" 2> /dev/null`
32487    # bat and cmd files are not always considered executable in cygwin causing which
32488    # to not find them
32489    if test "x$new_path" = x \
32490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32492      new_path=`$CYGPATH -u "$path"`
32493    fi
32494    if test "x$new_path" = x; then
32495      # It's still not found. Now this is an unrecoverable error.
32496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32497$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32498      has_space=`$ECHO "$complete" | $GREP " "`
32499      if test "x$has_space" != x; then
32500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32502      fi
32503      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32504    fi
32505  fi
32506
32507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32510  # "foo.exe" is OK but "foo" is an error.
32511  #
32512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32513  # It is also a way to make sure we got the proper file name for the real test later on.
32514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32515  if test "x$test_shortpath" = x; then
32516    # Short path failed, file does not exist as specified.
32517    # Try adding .exe or .cmd
32518    if test -f "${new_path}.exe"; then
32519      input_to_shortpath="${new_path}.exe"
32520    elif test -f "${new_path}.cmd"; then
32521      input_to_shortpath="${new_path}.cmd"
32522    else
32523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32524$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32527      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32528    fi
32529  else
32530    input_to_shortpath="$new_path"
32531  fi
32532
32533  # Call helper function which possibly converts this using DOS-style short mode.
32534  # If so, the updated path is stored in $new_path.
32535  new_path="$input_to_shortpath"
32536
32537  input_path="$input_to_shortpath"
32538  # Check if we need to convert this using DOS-style short mode. If the path
32539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32540  # take no chances and rewrite it.
32541  # Note: m4 eats our [], so we need to use [ and ] instead.
32542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32543  if test "x$has_forbidden_chars" != x; then
32544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32548      # Going to short mode and back again did indeed matter. Since short mode is
32549      # case insensitive, let's make it lowercase to improve readability.
32550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32551      # Now convert it back to Unix-style (cygpath)
32552      input_path=`$CYGPATH -u "$shortmode_path"`
32553      new_path="$input_path"
32554    fi
32555  fi
32556
32557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32558  if test "x$test_cygdrive_prefix" = x; then
32559    # As a simple fix, exclude /usr/bin since it's not a real path.
32560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32562      # a path prefixed by /cygdrive for fixpath to work.
32563      new_path="$CYGWIN_ROOT_PATH$input_path"
32564    fi
32565  fi
32566
32567  # remove trailing .exe if any
32568  new_path="${new_path/%.exe/}"
32569
32570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32571
32572  # First separate the path from the arguments. This will split at the first
32573  # space.
32574  complete="$VS_ENV_CMD"
32575  path="${complete%% *}"
32576  tmp="$complete EOL"
32577  arguments="${tmp#* }"
32578
32579  # Input might be given as Windows format, start by converting to
32580  # unix format.
32581  new_path="$path"
32582
32583  windows_path="$new_path"
32584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32585    unix_path=`$CYGPATH -u "$windows_path"`
32586    new_path="$unix_path"
32587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32589    new_path="$unix_path"
32590  fi
32591
32592
32593  # Now try to locate executable using which
32594  new_path=`$WHICH "$new_path" 2> /dev/null`
32595
32596  if test "x$new_path" = x; then
32597    # Oops. Which didn't find the executable.
32598    # The splitting of arguments from the executable at a space might have been incorrect,
32599    # since paths with space are more likely in Windows. Give it another try with the whole
32600    # argument.
32601    path="$complete"
32602    arguments="EOL"
32603    new_path="$path"
32604
32605  windows_path="$new_path"
32606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32607    unix_path=`$CYGPATH -u "$windows_path"`
32608    new_path="$unix_path"
32609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32611    new_path="$unix_path"
32612  fi
32613
32614
32615    new_path=`$WHICH "$new_path" 2> /dev/null`
32616    # bat and cmd files are not always considered executable in MSYS causing which
32617    # to not find them
32618    if test "x$new_path" = x \
32619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32621      new_path="$path"
32622
32623  windows_path="$new_path"
32624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32625    unix_path=`$CYGPATH -u "$windows_path"`
32626    new_path="$unix_path"
32627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32629    new_path="$unix_path"
32630  fi
32631
32632    fi
32633
32634    if test "x$new_path" = x; then
32635      # It's still not found. Now this is an unrecoverable error.
32636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32637$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32638      has_space=`$ECHO "$complete" | $GREP " "`
32639      if test "x$has_space" != x; then
32640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32642      fi
32643      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32644    fi
32645  fi
32646
32647  # Now new_path has a complete unix path to the binary
32648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32649    # Keep paths in /bin as-is, but remove trailing .exe if any
32650    new_path="${new_path/%.exe/}"
32651    # Do not save /bin paths to all_fixpath_prefixes!
32652  else
32653    # Not in mixed or Windows style, start by that.
32654    new_path=`cmd //c echo $new_path`
32655
32656  input_path="$new_path"
32657  # Check if we need to convert this using DOS-style short mode. If the path
32658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32659  # take no chances and rewrite it.
32660  # Note: m4 eats our [], so we need to use [ and ] instead.
32661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32662  if test "x$has_forbidden_chars" != x; then
32663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32665  fi
32666
32667    # Output is in $new_path
32668
32669  windows_path="$new_path"
32670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32671    unix_path=`$CYGPATH -u "$windows_path"`
32672    new_path="$unix_path"
32673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32675    new_path="$unix_path"
32676  fi
32677
32678    # remove trailing .exe if any
32679    new_path="${new_path/%.exe/}"
32680
32681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32683  fi
32684
32685    else
32686      # We're on a unix platform. Hooray! :)
32687      # First separate the path from the arguments. This will split at the first
32688      # space.
32689      complete="$VS_ENV_CMD"
32690      path="${complete%% *}"
32691      tmp="$complete EOL"
32692      arguments="${tmp#* }"
32693
32694      # Cannot rely on the command "which" here since it doesn't always work.
32695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32696      if test -z "$is_absolute_path"; then
32697        # Path to executable is not absolute. Find it.
32698        IFS_save="$IFS"
32699        IFS=:
32700        for p in $PATH; do
32701          if test -f "$p/$path" && test -x "$p/$path"; then
32702            new_path="$p/$path"
32703            break
32704          fi
32705        done
32706        IFS="$IFS_save"
32707      else
32708        # This is an absolute path, we can use it without further modifications.
32709        new_path="$path"
32710      fi
32711
32712      if test "x$new_path" = x; then
32713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32714$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32715        has_space=`$ECHO "$complete" | $GREP " "`
32716        if test "x$has_space" != x; then
32717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32719        fi
32720        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32721      fi
32722    fi
32723
32724    # Now join together the path and the arguments once again
32725    if test "x$arguments" != xEOL; then
32726      new_complete="$new_path ${arguments% *}"
32727    else
32728      new_complete="$new_path"
32729    fi
32730
32731    if test "x$complete" != "x$new_complete"; then
32732      VS_ENV_CMD="$new_complete"
32733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32734$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32735    fi
32736  fi
32737
32738
32739      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32740      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32741$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32742
32743      # We need to create a couple of temporary files.
32744      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32745      $MKDIR -p $VS_ENV_TMP_DIR
32746
32747      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32748      # Instead create a shell script which will set the relevant variables when run.
32749      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32750
32751  unix_path="$WINPATH_VS_ENV_CMD"
32752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32753    windows_path=`$CYGPATH -m "$unix_path"`
32754    WINPATH_VS_ENV_CMD="$windows_path"
32755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32756    windows_path=`cmd //c echo $unix_path`
32757    WINPATH_VS_ENV_CMD="$windows_path"
32758  fi
32759
32760      WINPATH_BASH="$BASH"
32761
32762  unix_path="$WINPATH_BASH"
32763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32764    windows_path=`$CYGPATH -m "$unix_path"`
32765    WINPATH_BASH="$windows_path"
32766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32767    windows_path=`cmd //c echo $unix_path`
32768    WINPATH_BASH="$windows_path"
32769  fi
32770
32771
32772      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32773      # script (executable by bash) that will setup the important variables.
32774      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32775      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32776      # This will end up something like:
32777      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32778      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32779      # These will end up something like:
32780      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32781      # The trailing space for everyone except PATH is no typo, but is needed due
32782      # to trailing \ in the Windows paths. These will be stripped later.
32783      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32784          >> $EXTRACT_VC_ENV_BAT_FILE
32785      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32786          >> $EXTRACT_VC_ENV_BAT_FILE
32787      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32788          >> $EXTRACT_VC_ENV_BAT_FILE
32789      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32790          >> $EXTRACT_VC_ENV_BAT_FILE
32791      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32792          >> $EXTRACT_VC_ENV_BAT_FILE
32793      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32794          >> $EXTRACT_VC_ENV_BAT_FILE
32795
32796      # Now execute the newly created bat file.
32797      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32798      # Change directory so we don't need to mess with Windows paths in redirects.
32799      cd $VS_ENV_TMP_DIR
32800      cmd /c extract-vs-env.bat | $CAT
32801      cd $CURDIR
32802
32803      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32804        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32805$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32806        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32807$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32808        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32809$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32810        as_fn_error $? "Cannot continue" "$LINENO" 5
32811      fi
32812
32813      # Now set all paths and other env variables. This will allow the rest of
32814      # the configure script to find and run the compiler in the proper way.
32815      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32816$as_echo "$as_me: Setting extracted environment variables" >&6;}
32817      . $VS_ENV_TMP_DIR/set-vs-env.sh
32818      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32819      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32820    else
32821      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32822      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32823$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32824    fi
32825  fi
32826
32827  # At this point, we should have correct variables in the environment, or we can't continue.
32828  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32829$as_echo_n "checking for Visual Studio variables... " >&6; }
32830
32831  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32832      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32833    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32834      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32835$as_echo "present but broken" >&6; }
32836      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32837    else
32838      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32839$as_echo "ok" >&6; }
32840      # Remove any trailing "\" ";" and " " from the variables.
32841      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32842      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32843      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32844      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32845      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32846      # Remove any paths containing # (typically F#) as that messes up make. This
32847      # is needed if visual studio was installed with F# support.
32848      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32849
32850
32851
32852
32853
32854      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32855      OLDIFS="$IFS"
32856      IFS=";"
32857      for i in $VS_INCLUDE; do
32858        ipath=$i
32859        # Only process non-empty elements
32860        if test "x$ipath" != x; then
32861          IFS="$OLDIFS"
32862          # Check that directory exists before calling fixup_path
32863          testpath=$ipath
32864
32865  windows_path="$testpath"
32866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32867    unix_path=`$CYGPATH -u "$windows_path"`
32868    testpath="$unix_path"
32869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32871    testpath="$unix_path"
32872  fi
32873
32874          if test -d "$testpath"; then
32875
32876  # Only process if variable expands to non-empty
32877
32878  if test "x$ipath" != x; then
32879    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32880
32881  # Input might be given as Windows format, start by converting to
32882  # unix format.
32883  path="$ipath"
32884  new_path=`$CYGPATH -u "$path"`
32885
32886  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32887  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32888  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32889  # "foo.exe" is OK but "foo" is an error.
32890  #
32891  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32892  # It is also a way to make sure we got the proper file name for the real test later on.
32893  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32894  if test "x$test_shortpath" = x; then
32895    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32896$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32897    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32898  fi
32899
32900  # Call helper function which possibly converts this using DOS-style short mode.
32901  # If so, the updated path is stored in $new_path.
32902
32903  input_path="$new_path"
32904  # Check if we need to convert this using DOS-style short mode. If the path
32905  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32906  # take no chances and rewrite it.
32907  # Note: m4 eats our [], so we need to use [ and ] instead.
32908  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32909  if test "x$has_forbidden_chars" != x; then
32910    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32911    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32912    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32913    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32914      # Going to short mode and back again did indeed matter. Since short mode is
32915      # case insensitive, let's make it lowercase to improve readability.
32916      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32917      # Now convert it back to Unix-style (cygpath)
32918      input_path=`$CYGPATH -u "$shortmode_path"`
32919      new_path="$input_path"
32920    fi
32921  fi
32922
32923  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32924  if test "x$test_cygdrive_prefix" = x; then
32925    # As a simple fix, exclude /usr/bin since it's not a real path.
32926    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32927      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32928      # a path prefixed by /cygdrive for fixpath to work.
32929      new_path="$CYGWIN_ROOT_PATH$input_path"
32930    fi
32931  fi
32932
32933
32934  if test "x$path" != "x$new_path"; then
32935    ipath="$new_path"
32936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32937$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32938  fi
32939
32940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32941
32942  path="$ipath"
32943  has_colon=`$ECHO $path | $GREP ^.:`
32944  new_path="$path"
32945  if test "x$has_colon" = x; then
32946    # Not in mixed or Windows style, start by that.
32947    new_path=`cmd //c echo $path`
32948  fi
32949
32950
32951  input_path="$new_path"
32952  # Check if we need to convert this using DOS-style short mode. If the path
32953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32954  # take no chances and rewrite it.
32955  # Note: m4 eats our [], so we need to use [ and ] instead.
32956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32957  if test "x$has_forbidden_chars" != x; then
32958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32959    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32960  fi
32961
32962
32963  windows_path="$new_path"
32964  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32965    unix_path=`$CYGPATH -u "$windows_path"`
32966    new_path="$unix_path"
32967  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32968    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32969    new_path="$unix_path"
32970  fi
32971
32972  if test "x$path" != "x$new_path"; then
32973    ipath="$new_path"
32974    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32975$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32976  fi
32977
32978  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32979  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32980
32981    else
32982      # We're on a unix platform. Hooray! :)
32983      path="$ipath"
32984      has_space=`$ECHO "$path" | $GREP " "`
32985      if test "x$has_space" != x; then
32986        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32987$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32988        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32989      fi
32990
32991      # Use eval to expand a potential ~
32992      eval path="$path"
32993      if test ! -f "$path" && test ! -d "$path"; then
32994        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32995      fi
32996
32997      if test -d "$path"; then
32998        ipath="`cd "$path"; $THEPWDCMD -L`"
32999      else
33000        dir="`$DIRNAME "$path"`"
33001        base="`$BASENAME "$path"`"
33002        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
33003      fi
33004    fi
33005  fi
33006
33007            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
33008          fi
33009          IFS=";"
33010        fi
33011      done
33012      # Convert VS_LIB into SYSROOT_LDFLAGS
33013      for i in $VS_LIB; do
33014        libpath=$i
33015        # Only process non-empty elements
33016        if test "x$libpath" != x; then
33017          IFS="$OLDIFS"
33018          # Check that directory exists before calling fixup_path
33019          testpath=$libpath
33020
33021  windows_path="$testpath"
33022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33023    unix_path=`$CYGPATH -u "$windows_path"`
33024    testpath="$unix_path"
33025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33027    testpath="$unix_path"
33028  fi
33029
33030          if test -d "$testpath"; then
33031
33032  # Only process if variable expands to non-empty
33033
33034  if test "x$libpath" != x; then
33035    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33036
33037  # Input might be given as Windows format, start by converting to
33038  # unix format.
33039  path="$libpath"
33040  new_path=`$CYGPATH -u "$path"`
33041
33042  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33043  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33044  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33045  # "foo.exe" is OK but "foo" is an error.
33046  #
33047  # This test is therefore slightly more accurate than "test -f" to check for file precense.
33048  # It is also a way to make sure we got the proper file name for the real test later on.
33049  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33050  if test "x$test_shortpath" = x; then
33051    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33052$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33053    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
33054  fi
33055
33056  # Call helper function which possibly converts this using DOS-style short mode.
33057  # If so, the updated path is stored in $new_path.
33058
33059  input_path="$new_path"
33060  # Check if we need to convert this using DOS-style short mode. If the path
33061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33062  # take no chances and rewrite it.
33063  # Note: m4 eats our [], so we need to use [ and ] instead.
33064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33065  if test "x$has_forbidden_chars" != x; then
33066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33067    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33068    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33069    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33070      # Going to short mode and back again did indeed matter. Since short mode is
33071      # case insensitive, let's make it lowercase to improve readability.
33072      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33073      # Now convert it back to Unix-style (cygpath)
33074      input_path=`$CYGPATH -u "$shortmode_path"`
33075      new_path="$input_path"
33076    fi
33077  fi
33078
33079  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33080  if test "x$test_cygdrive_prefix" = x; then
33081    # As a simple fix, exclude /usr/bin since it's not a real path.
33082    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
33083      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33084      # a path prefixed by /cygdrive for fixpath to work.
33085      new_path="$CYGWIN_ROOT_PATH$input_path"
33086    fi
33087  fi
33088
33089
33090  if test "x$path" != "x$new_path"; then
33091    libpath="$new_path"
33092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33093$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33094  fi
33095
33096    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33097
33098  path="$libpath"
33099  has_colon=`$ECHO $path | $GREP ^.:`
33100  new_path="$path"
33101  if test "x$has_colon" = x; then
33102    # Not in mixed or Windows style, start by that.
33103    new_path=`cmd //c echo $path`
33104  fi
33105
33106
33107  input_path="$new_path"
33108  # Check if we need to convert this using DOS-style short mode. If the path
33109  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33110  # take no chances and rewrite it.
33111  # Note: m4 eats our [], so we need to use [ and ] instead.
33112  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33113  if test "x$has_forbidden_chars" != x; then
33114    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33115    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33116  fi
33117
33118
33119  windows_path="$new_path"
33120  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33121    unix_path=`$CYGPATH -u "$windows_path"`
33122    new_path="$unix_path"
33123  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33124    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33125    new_path="$unix_path"
33126  fi
33127
33128  if test "x$path" != "x$new_path"; then
33129    libpath="$new_path"
33130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
33131$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
33132  fi
33133
33134  # Save the first 10 bytes of this path to the storage, so fixpath can work.
33135  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33136
33137    else
33138      # We're on a unix platform. Hooray! :)
33139      path="$libpath"
33140      has_space=`$ECHO "$path" | $GREP " "`
33141      if test "x$has_space" != x; then
33142        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
33143$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
33144        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
33145      fi
33146
33147      # Use eval to expand a potential ~
33148      eval path="$path"
33149      if test ! -f "$path" && test ! -d "$path"; then
33150        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
33151      fi
33152
33153      if test -d "$path"; then
33154        libpath="`cd "$path"; $THEPWDCMD -L`"
33155      else
33156        dir="`$DIRNAME "$path"`"
33157        base="`$BASENAME "$path"`"
33158        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
33159      fi
33160    fi
33161  fi
33162
33163            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
33164          fi
33165          IFS=";"
33166        fi
33167      done
33168      IFS="$OLDIFS"
33169    fi
33170  else
33171    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
33172$as_echo "not found" >&6; }
33173
33174    if test "x$VS_ENV_CMD" = x; then
33175      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
33176$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
33177      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
33178$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
33179    else
33180      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
33181$as_echo "$as_me: Running the extraction script failed." >&6;}
33182    fi
33183    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
33184$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
33185    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
33186$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
33187    as_fn_error $? "Cannot continue" "$LINENO" 5
33188  fi
33189
33190    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
33191    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
33192    PATH="$VS_PATH"
33193    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33194    export INCLUDE="$VS_INCLUDE"
33195    export LIB="$VS_LIB"
33196  else
33197    if test "x$XCODE_VERSION_OUTPUT" != x; then
33198      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33199      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33200      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33201    else
33202      # Currently we do not define this for other toolchains. This might change as the need arise.
33203      TOOLCHAIN_VERSION=
33204    fi
33205  fi
33206
33207
33208  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33209  # override all other locations.
33210  if test "x$TOOLCHAIN_PATH" != x; then
33211    PATH=$TOOLCHAIN_PATH:$PATH
33212  fi
33213
33214
33215  #
33216  # Setup the compilers (CC and CXX)
33217  #
33218
33219  COMPILER_NAME=C
33220  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33221
33222  if test "x$CC" != x; then
33223    # User has supplied compiler name already, always let that override.
33224    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33225$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33226    if test "x`basename $CC`" = "x$CC"; then
33227      # A command without a complete path is provided, search $PATH.
33228
33229      for ac_prog in $CC
33230do
33231  # Extract the first word of "$ac_prog", so it can be a program name with args.
33232set dummy $ac_prog; ac_word=$2
33233{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33234$as_echo_n "checking for $ac_word... " >&6; }
33235if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33236  $as_echo_n "(cached) " >&6
33237else
33238  case $POTENTIAL_CC in
33239  [\\/]* | ?:[\\/]*)
33240  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33241  ;;
33242  *)
33243  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33244for as_dir in $PATH
33245do
33246  IFS=$as_save_IFS
33247  test -z "$as_dir" && as_dir=.
33248    for ac_exec_ext in '' $ac_executable_extensions; do
33249  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33250    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33251    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33252    break 2
33253  fi
33254done
33255  done
33256IFS=$as_save_IFS
33257
33258  ;;
33259esac
33260fi
33261POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33262if test -n "$POTENTIAL_CC"; then
33263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33264$as_echo "$POTENTIAL_CC" >&6; }
33265else
33266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33267$as_echo "no" >&6; }
33268fi
33269
33270
33271  test -n "$POTENTIAL_CC" && break
33272done
33273
33274      if test "x$POTENTIAL_CC" != x; then
33275        CC=$POTENTIAL_CC
33276      else
33277        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33278      fi
33279    else
33280      # Otherwise it might already be a complete path
33281      if test ! -x "$CC"; then
33282        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33283      fi
33284    fi
33285  else
33286    # No user supplied value. Locate compiler ourselves.
33287
33288    # If we are cross compiling, assume cross compilation tools follows the
33289    # cross compilation standard where they are prefixed with the autoconf
33290    # standard name for the target. For example the binary
33291    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33292    # If we are not cross compiling, then the default compiler name will be
33293    # used.
33294
33295    CC=
33296    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33297    # before checking the rest of the PATH.
33298    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33299    # step, this should not be necessary.
33300    if test -n "$TOOLCHAIN_PATH"; then
33301      PATH_save="$PATH"
33302      PATH="$TOOLCHAIN_PATH"
33303      if test -n "$ac_tool_prefix"; then
33304  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33305set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33306{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33307$as_echo_n "checking for $ac_word... " >&6; }
33308if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33309  $as_echo_n "(cached) " >&6
33310else
33311  case $TOOLCHAIN_PATH_CC in
33312  [\\/]* | ?:[\\/]*)
33313  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33314  ;;
33315  *)
33316  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33317for as_dir in $PATH
33318do
33319  IFS=$as_save_IFS
33320  test -z "$as_dir" && as_dir=.
33321    for ac_exec_ext in '' $ac_executable_extensions; do
33322  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33323    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33324    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33325    break 2
33326  fi
33327done
33328  done
33329IFS=$as_save_IFS
33330
33331  ;;
33332esac
33333fi
33334TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33335if test -n "$TOOLCHAIN_PATH_CC"; then
33336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33337$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33338else
33339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33340$as_echo "no" >&6; }
33341fi
33342
33343
33344fi
33345if test -z "$ac_cv_path_TOOLCHAIN_PATH_CC"; then
33346  ac_pt_TOOLCHAIN_PATH_CC=$TOOLCHAIN_PATH_CC
33347  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33348set dummy $SEARCH_LIST; ac_word=$2
33349{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33350$as_echo_n "checking for $ac_word... " >&6; }
33351if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC+:} false; then :
33352  $as_echo_n "(cached) " >&6
33353else
33354  case $ac_pt_TOOLCHAIN_PATH_CC in
33355  [\\/]* | ?:[\\/]*)
33356  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$ac_pt_TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33357  ;;
33358  *)
33359  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33360for as_dir in $PATH
33361do
33362  IFS=$as_save_IFS
33363  test -z "$as_dir" && as_dir=.
33364    for ac_exec_ext in '' $ac_executable_extensions; do
33365  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33366    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33367    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33368    break 2
33369  fi
33370done
33371  done
33372IFS=$as_save_IFS
33373
33374  ;;
33375esac
33376fi
33377ac_pt_TOOLCHAIN_PATH_CC=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CC
33378if test -n "$ac_pt_TOOLCHAIN_PATH_CC"; then
33379  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CC" >&5
33380$as_echo "$ac_pt_TOOLCHAIN_PATH_CC" >&6; }
33381else
33382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33383$as_echo "no" >&6; }
33384fi
33385
33386  if test "x$ac_pt_TOOLCHAIN_PATH_CC" = x; then
33387    TOOLCHAIN_PATH_CC=""
33388  else
33389    case $cross_compiling:$ac_tool_warned in
33390yes:)
33391{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33392$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33393ac_tool_warned=yes ;;
33394esac
33395    TOOLCHAIN_PATH_CC=$ac_pt_TOOLCHAIN_PATH_CC
33396  fi
33397else
33398  TOOLCHAIN_PATH_CC="$ac_cv_path_TOOLCHAIN_PATH_CC"
33399fi
33400
33401      CC=$TOOLCHAIN_PATH_CC
33402      PATH="$PATH_save"
33403    fi
33404
33405    # AC_PATH_TOOL can't be run multiple times with the same variable,
33406    # so create a new name for this run.
33407    if test "x$CC" = x; then
33408      if test -n "$ac_tool_prefix"; then
33409  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
33410set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
33411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33412$as_echo_n "checking for $ac_word... " >&6; }
33413if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33414  $as_echo_n "(cached) " >&6
33415else
33416  case $POTENTIAL_CC in
33417  [\\/]* | ?:[\\/]*)
33418  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33419  ;;
33420  *)
33421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33422for as_dir in $PATH
33423do
33424  IFS=$as_save_IFS
33425  test -z "$as_dir" && as_dir=.
33426    for ac_exec_ext in '' $ac_executable_extensions; do
33427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33428    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33430    break 2
33431  fi
33432done
33433  done
33434IFS=$as_save_IFS
33435
33436  ;;
33437esac
33438fi
33439POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33440if test -n "$POTENTIAL_CC"; then
33441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33442$as_echo "$POTENTIAL_CC" >&6; }
33443else
33444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33445$as_echo "no" >&6; }
33446fi
33447
33448
33449fi
33450if test -z "$ac_cv_path_POTENTIAL_CC"; then
33451  ac_pt_POTENTIAL_CC=$POTENTIAL_CC
33452  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
33453set dummy $SEARCH_LIST; ac_word=$2
33454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33455$as_echo_n "checking for $ac_word... " >&6; }
33456if ${ac_cv_path_ac_pt_POTENTIAL_CC+:} false; then :
33457  $as_echo_n "(cached) " >&6
33458else
33459  case $ac_pt_POTENTIAL_CC in
33460  [\\/]* | ?:[\\/]*)
33461  ac_cv_path_ac_pt_POTENTIAL_CC="$ac_pt_POTENTIAL_CC" # Let the user override the test with a path.
33462  ;;
33463  *)
33464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33465for as_dir in $PATH
33466do
33467  IFS=$as_save_IFS
33468  test -z "$as_dir" && as_dir=.
33469    for ac_exec_ext in '' $ac_executable_extensions; do
33470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33471    ac_cv_path_ac_pt_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33473    break 2
33474  fi
33475done
33476  done
33477IFS=$as_save_IFS
33478
33479  ;;
33480esac
33481fi
33482ac_pt_POTENTIAL_CC=$ac_cv_path_ac_pt_POTENTIAL_CC
33483if test -n "$ac_pt_POTENTIAL_CC"; then
33484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CC" >&5
33485$as_echo "$ac_pt_POTENTIAL_CC" >&6; }
33486else
33487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33488$as_echo "no" >&6; }
33489fi
33490
33491  if test "x$ac_pt_POTENTIAL_CC" = x; then
33492    POTENTIAL_CC=""
33493  else
33494    case $cross_compiling:$ac_tool_warned in
33495yes:)
33496{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33497$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33498ac_tool_warned=yes ;;
33499esac
33500    POTENTIAL_CC=$ac_pt_POTENTIAL_CC
33501  fi
33502else
33503  POTENTIAL_CC="$ac_cv_path_POTENTIAL_CC"
33504fi
33505
33506      CC=$POTENTIAL_CC
33507    fi
33508
33509    if test "x$CC" = x; then
33510
33511  # Print a helpful message on how to acquire the necessary build dependency.
33512  # devkit is the help tag: freetype, cups, alsa etc
33513  MISSING_DEPENDENCY=devkit
33514
33515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33516    cygwin_help $MISSING_DEPENDENCY
33517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33518    msys_help $MISSING_DEPENDENCY
33519  else
33520    PKGHANDLER_COMMAND=
33521
33522    case $PKGHANDLER in
33523      apt-get)
33524        apt_help     $MISSING_DEPENDENCY ;;
33525      yum)
33526        yum_help     $MISSING_DEPENDENCY ;;
33527      brew)
33528        brew_help    $MISSING_DEPENDENCY ;;
33529      port)
33530        port_help    $MISSING_DEPENDENCY ;;
33531      pkgutil)
33532        pkgutil_help $MISSING_DEPENDENCY ;;
33533      pkgadd)
33534        pkgadd_help  $MISSING_DEPENDENCY ;;
33535    esac
33536
33537    if test "x$PKGHANDLER_COMMAND" != x; then
33538      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33539    fi
33540  fi
33541
33542      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33543    fi
33544  fi
33545
33546  # Now we have a compiler binary in CC. Make sure it's okay.
33547
33548  # Only process if variable expands to non-empty
33549
33550  if test "x$CC" != x; then
33551    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33552
33553  # First separate the path from the arguments. This will split at the first
33554  # space.
33555  complete="$CC"
33556  path="${complete%% *}"
33557  tmp="$complete EOL"
33558  arguments="${tmp#* }"
33559
33560  # Input might be given as Windows format, start by converting to
33561  # unix format.
33562  new_path=`$CYGPATH -u "$path"`
33563
33564  # Now try to locate executable using which
33565  new_path=`$WHICH "$new_path" 2> /dev/null`
33566  # bat and cmd files are not always considered executable in cygwin causing which
33567  # to not find them
33568  if test "x$new_path" = x \
33569      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33570      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33571    new_path=`$CYGPATH -u "$path"`
33572  fi
33573  if test "x$new_path" = x; then
33574    # Oops. Which didn't find the executable.
33575    # The splitting of arguments from the executable at a space might have been incorrect,
33576    # since paths with space are more likely in Windows. Give it another try with the whole
33577    # argument.
33578    path="$complete"
33579    arguments="EOL"
33580    new_path=`$CYGPATH -u "$path"`
33581    new_path=`$WHICH "$new_path" 2> /dev/null`
33582    # bat and cmd files are not always considered executable in cygwin causing which
33583    # to not find them
33584    if test "x$new_path" = x \
33585        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33586        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33587      new_path=`$CYGPATH -u "$path"`
33588    fi
33589    if test "x$new_path" = x; then
33590      # It's still not found. Now this is an unrecoverable error.
33591      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33592$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33593      has_space=`$ECHO "$complete" | $GREP " "`
33594      if test "x$has_space" != x; then
33595        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33596$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33597      fi
33598      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33599    fi
33600  fi
33601
33602  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33603  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33604  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33605  # "foo.exe" is OK but "foo" is an error.
33606  #
33607  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33608  # It is also a way to make sure we got the proper file name for the real test later on.
33609  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33610  if test "x$test_shortpath" = x; then
33611    # Short path failed, file does not exist as specified.
33612    # Try adding .exe or .cmd
33613    if test -f "${new_path}.exe"; then
33614      input_to_shortpath="${new_path}.exe"
33615    elif test -f "${new_path}.cmd"; then
33616      input_to_shortpath="${new_path}.cmd"
33617    else
33618      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33619$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33620      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33621$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33622      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33623    fi
33624  else
33625    input_to_shortpath="$new_path"
33626  fi
33627
33628  # Call helper function which possibly converts this using DOS-style short mode.
33629  # If so, the updated path is stored in $new_path.
33630  new_path="$input_to_shortpath"
33631
33632  input_path="$input_to_shortpath"
33633  # Check if we need to convert this using DOS-style short mode. If the path
33634  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33635  # take no chances and rewrite it.
33636  # Note: m4 eats our [], so we need to use [ and ] instead.
33637  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33638  if test "x$has_forbidden_chars" != x; then
33639    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33640    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33641    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33642    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33643      # Going to short mode and back again did indeed matter. Since short mode is
33644      # case insensitive, let's make it lowercase to improve readability.
33645      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33646      # Now convert it back to Unix-style (cygpath)
33647      input_path=`$CYGPATH -u "$shortmode_path"`
33648      new_path="$input_path"
33649    fi
33650  fi
33651
33652  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33653  if test "x$test_cygdrive_prefix" = x; then
33654    # As a simple fix, exclude /usr/bin since it's not a real path.
33655    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33656      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33657      # a path prefixed by /cygdrive for fixpath to work.
33658      new_path="$CYGWIN_ROOT_PATH$input_path"
33659    fi
33660  fi
33661
33662  # remove trailing .exe if any
33663  new_path="${new_path/%.exe/}"
33664
33665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33666
33667  # First separate the path from the arguments. This will split at the first
33668  # space.
33669  complete="$CC"
33670  path="${complete%% *}"
33671  tmp="$complete EOL"
33672  arguments="${tmp#* }"
33673
33674  # Input might be given as Windows format, start by converting to
33675  # unix format.
33676  new_path="$path"
33677
33678  windows_path="$new_path"
33679  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33680    unix_path=`$CYGPATH -u "$windows_path"`
33681    new_path="$unix_path"
33682  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33683    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33684    new_path="$unix_path"
33685  fi
33686
33687
33688  # Now try to locate executable using which
33689  new_path=`$WHICH "$new_path" 2> /dev/null`
33690
33691  if test "x$new_path" = x; then
33692    # Oops. Which didn't find the executable.
33693    # The splitting of arguments from the executable at a space might have been incorrect,
33694    # since paths with space are more likely in Windows. Give it another try with the whole
33695    # argument.
33696    path="$complete"
33697    arguments="EOL"
33698    new_path="$path"
33699
33700  windows_path="$new_path"
33701  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33702    unix_path=`$CYGPATH -u "$windows_path"`
33703    new_path="$unix_path"
33704  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33705    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33706    new_path="$unix_path"
33707  fi
33708
33709
33710    new_path=`$WHICH "$new_path" 2> /dev/null`
33711    # bat and cmd files are not always considered executable in MSYS causing which
33712    # to not find them
33713    if test "x$new_path" = x \
33714        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33715        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33716      new_path="$path"
33717
33718  windows_path="$new_path"
33719  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33720    unix_path=`$CYGPATH -u "$windows_path"`
33721    new_path="$unix_path"
33722  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33723    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33724    new_path="$unix_path"
33725  fi
33726
33727    fi
33728
33729    if test "x$new_path" = x; then
33730      # It's still not found. Now this is an unrecoverable error.
33731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33732$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33733      has_space=`$ECHO "$complete" | $GREP " "`
33734      if test "x$has_space" != x; then
33735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33737      fi
33738      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33739    fi
33740  fi
33741
33742  # Now new_path has a complete unix path to the binary
33743  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33744    # Keep paths in /bin as-is, but remove trailing .exe if any
33745    new_path="${new_path/%.exe/}"
33746    # Do not save /bin paths to all_fixpath_prefixes!
33747  else
33748    # Not in mixed or Windows style, start by that.
33749    new_path=`cmd //c echo $new_path`
33750
33751  input_path="$new_path"
33752  # Check if we need to convert this using DOS-style short mode. If the path
33753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33754  # take no chances and rewrite it.
33755  # Note: m4 eats our [], so we need to use [ and ] instead.
33756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33757  if test "x$has_forbidden_chars" != x; then
33758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33759    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33760  fi
33761
33762    # Output is in $new_path
33763
33764  windows_path="$new_path"
33765  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33766    unix_path=`$CYGPATH -u "$windows_path"`
33767    new_path="$unix_path"
33768  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33769    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33770    new_path="$unix_path"
33771  fi
33772
33773    # remove trailing .exe if any
33774    new_path="${new_path/%.exe/}"
33775
33776    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33777    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33778  fi
33779
33780    else
33781      # We're on a unix platform. Hooray! :)
33782      # First separate the path from the arguments. This will split at the first
33783      # space.
33784      complete="$CC"
33785      path="${complete%% *}"
33786      tmp="$complete EOL"
33787      arguments="${tmp#* }"
33788
33789      # Cannot rely on the command "which" here since it doesn't always work.
33790      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33791      if test -z "$is_absolute_path"; then
33792        # Path to executable is not absolute. Find it.
33793        IFS_save="$IFS"
33794        IFS=:
33795        for p in $PATH; do
33796          if test -f "$p/$path" && test -x "$p/$path"; then
33797            new_path="$p/$path"
33798            break
33799          fi
33800        done
33801        IFS="$IFS_save"
33802      else
33803        # This is an absolute path, we can use it without further modifications.
33804        new_path="$path"
33805      fi
33806
33807      if test "x$new_path" = x; then
33808        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33809$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33810        has_space=`$ECHO "$complete" | $GREP " "`
33811        if test "x$has_space" != x; then
33812          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33813$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33814        fi
33815        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33816      fi
33817    fi
33818
33819    # Now join together the path and the arguments once again
33820    if test "x$arguments" != xEOL; then
33821      new_complete="$new_path ${arguments% *}"
33822    else
33823      new_complete="$new_path"
33824    fi
33825
33826    if test "x$complete" != "x$new_complete"; then
33827      CC="$new_complete"
33828      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33829$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33830    fi
33831  fi
33832
33833  TEST_COMPILER="$CC"
33834
33835  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33836$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33837  SYMLINK_ORIGINAL="$TEST_COMPILER"
33838
33839  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33840    # Follow a chain of symbolic links. Use readlink
33841    # where it exists, else fall back to horribly
33842    # complicated shell code.
33843    if test "x$READLINK_TESTED" != yes; then
33844      # On MacOSX there is a readlink tool with a different
33845      # purpose than the GNU readlink tool. Check the found readlink.
33846      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33847      if test "x$ISGNU" = x; then
33848        # A readlink that we do not know how to use.
33849        # Are there other non-GNU readlinks out there?
33850        READLINK_TESTED=yes
33851        READLINK=
33852      fi
33853    fi
33854
33855    if test "x$READLINK" != x; then
33856      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33857    else
33858      # Save the current directory for restoring afterwards
33859      STARTDIR=$PWD
33860      COUNTER=0
33861      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33862      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33863      cd $sym_link_dir
33864      # Use -P flag to resolve symlinks in directories.
33865      cd `$THEPWDCMD -P`
33866      sym_link_dir=`$THEPWDCMD -P`
33867      # Resolve file symlinks
33868      while test $COUNTER -lt 20; do
33869        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33870        if test "x$ISLINK" == x; then
33871          # This is not a symbolic link! We are done!
33872          break
33873        fi
33874        # Again resolve directory symlinks since the target of the just found
33875        # link could be in a different directory
33876        cd `$DIRNAME $ISLINK`
33877        sym_link_dir=`$THEPWDCMD -P`
33878        sym_link_file=`$BASENAME $ISLINK`
33879        let COUNTER=COUNTER+1
33880      done
33881      cd $STARTDIR
33882      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33883    fi
33884  fi
33885
33886  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33887    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33888$as_echo "no symlink" >&6; }
33889  else
33890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33891$as_echo "$SYMLINK_ORIGINAL" >&6; }
33892
33893    # We can't handle ccache by gcc wrappers, since we need to know if we're
33894    # using ccache. Instead ccache usage must be controlled by a configure option.
33895    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33896    if test "x$COMPILER_BASENAME" = "xccache"; then
33897      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33898$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33899      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33900    fi
33901  fi
33902
33903
33904  COMPILER=$CC
33905  COMPILER_NAME=$COMPILER_NAME
33906
33907  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33908    # cc -V output typically looks like
33909    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33910    # or
33911    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
33912    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33913    # Check that this is likely to be the Solaris Studio cc.
33914    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
33915    if test $? -ne 0; then
33916      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33917      { $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
33918$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33919      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33920$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33921      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33922$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33923      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33924    fi
33925    # Remove usage instructions (if present), and
33926    # collapse compiler output into a single line
33927    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33928        $SED -e 's/ *[Uu]sage:.*//'`
33929    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33930        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33931  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33932    # xlc -qversion output typically looks like
33933    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33934    #     Version: 11.01.0000.0015
33935    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33936    # Check that this is likely to be the IBM XL C compiler.
33937    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33938    if test $? -ne 0; then
33939      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33940      { $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
33941$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33942      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33943$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33944      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33945$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33946      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33947    fi
33948    # Collapse compiler output into a single line
33949    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33950    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33951        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33952  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33953    # There is no specific version flag, but all output starts with a version string.
33954    # First line typically looks something like:
33955    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33956    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33957    # Check that this is likely to be Microsoft CL.EXE.
33958    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33959    if test $? -ne 0; then
33960      { $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
33961$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33962      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33963$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33964      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33965    fi
33966    # Collapse compiler output into a single line
33967    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33968    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33969        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33970  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33971    # gcc --version output typically looks like
33972    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33973    #     Copyright (C) 2013 Free Software Foundation, Inc.
33974    #     This is free software; see the source for copying conditions.  There is NO
33975    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33976    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33977    # Check that this is likely to be GCC.
33978    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33979    if test $? -ne 0; then
33980      { $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
33981$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33982      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33983$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33984      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33985    fi
33986    # Remove Copyright and legalese from version string, and
33987    # collapse into a single line
33988    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33989        $SED -e 's/ *Copyright .*//'`
33990    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33991        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33992  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33993    # clang --version output typically looks like
33994    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33995    #    clang version 3.3 (tags/RELEASE_33/final)
33996    # or
33997    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33998    #    Target: x86_64-pc-linux-gnu
33999    #    Thread model: posix
34000    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34001    # Check that this is likely to be clang
34002    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34003    if test $? -ne 0; then
34004      { $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
34005$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34006      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34007$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34008      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34009    fi
34010    # Collapse compiler output into a single line
34011    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34012    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34013        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34014  else
34015      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34016  fi
34017  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34018  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34019  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34020  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
34021
34022  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34023$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34024
34025
34026  # Now that we have resolved CC ourself, let autoconf have its go at it
34027  ac_ext=c
34028ac_cpp='$CPP $CPPFLAGS'
34029ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34030ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34031ac_compiler_gnu=$ac_cv_c_compiler_gnu
34032if test -n "$ac_tool_prefix"; then
34033  for ac_prog in $CC
34034  do
34035    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34036set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34037{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34038$as_echo_n "checking for $ac_word... " >&6; }
34039if ${ac_cv_prog_CC+:} false; then :
34040  $as_echo_n "(cached) " >&6
34041else
34042  if test -n "$CC"; then
34043  ac_cv_prog_CC="$CC" # Let the user override the test.
34044else
34045as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34046for as_dir in $PATH
34047do
34048  IFS=$as_save_IFS
34049  test -z "$as_dir" && as_dir=.
34050    for ac_exec_ext in '' $ac_executable_extensions; do
34051  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34052    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
34053    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34054    break 2
34055  fi
34056done
34057  done
34058IFS=$as_save_IFS
34059
34060fi
34061fi
34062CC=$ac_cv_prog_CC
34063if test -n "$CC"; then
34064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
34065$as_echo "$CC" >&6; }
34066else
34067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34068$as_echo "no" >&6; }
34069fi
34070
34071
34072    test -n "$CC" && break
34073  done
34074fi
34075if test -z "$CC"; then
34076  ac_ct_CC=$CC
34077  for ac_prog in $CC
34078do
34079  # Extract the first word of "$ac_prog", so it can be a program name with args.
34080set dummy $ac_prog; ac_word=$2
34081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34082$as_echo_n "checking for $ac_word... " >&6; }
34083if ${ac_cv_prog_ac_ct_CC+:} false; then :
34084  $as_echo_n "(cached) " >&6
34085else
34086  if test -n "$ac_ct_CC"; then
34087  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
34088else
34089as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34090for as_dir in $PATH
34091do
34092  IFS=$as_save_IFS
34093  test -z "$as_dir" && as_dir=.
34094    for ac_exec_ext in '' $ac_executable_extensions; do
34095  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34096    ac_cv_prog_ac_ct_CC="$ac_prog"
34097    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34098    break 2
34099  fi
34100done
34101  done
34102IFS=$as_save_IFS
34103
34104fi
34105fi
34106ac_ct_CC=$ac_cv_prog_ac_ct_CC
34107if test -n "$ac_ct_CC"; then
34108  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
34109$as_echo "$ac_ct_CC" >&6; }
34110else
34111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34112$as_echo "no" >&6; }
34113fi
34114
34115
34116  test -n "$ac_ct_CC" && break
34117done
34118
34119  if test "x$ac_ct_CC" = x; then
34120    CC=""
34121  else
34122    case $cross_compiling:$ac_tool_warned in
34123yes:)
34124{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34125$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34126ac_tool_warned=yes ;;
34127esac
34128    CC=$ac_ct_CC
34129  fi
34130fi
34131
34132
34133test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34134$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34135as_fn_error $? "no acceptable C compiler found in \$PATH
34136See \`config.log' for more details" "$LINENO" 5; }
34137
34138# Provide some information about the compiler.
34139$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
34140set X $ac_compile
34141ac_compiler=$2
34142for ac_option in --version -v -V -qversion; do
34143  { { ac_try="$ac_compiler $ac_option >&5"
34144case "(($ac_try" in
34145  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34146  *) ac_try_echo=$ac_try;;
34147esac
34148eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34149$as_echo "$ac_try_echo"; } >&5
34150  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34151  ac_status=$?
34152  if test -s conftest.err; then
34153    sed '10a\
34154... rest of stderr output deleted ...
34155         10q' conftest.err >conftest.er1
34156    cat conftest.er1 >&5
34157  fi
34158  rm -f conftest.er1 conftest.err
34159  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34160  test $ac_status = 0; }
34161done
34162
34163cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34164/* end confdefs.h.  */
34165
34166int
34167main ()
34168{
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174ac_clean_files_save=$ac_clean_files
34175ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
34176# Try to create an executable without -o first, disregard a.out.
34177# It will help us diagnose broken compilers, and finding out an intuition
34178# of exeext.
34179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
34180$as_echo_n "checking whether the C compiler works... " >&6; }
34181ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
34182
34183# The possible output files:
34184ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
34185
34186ac_rmfiles=
34187for ac_file in $ac_files
34188do
34189  case $ac_file in
34190    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34191    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
34192  esac
34193done
34194rm -f $ac_rmfiles
34195
34196if { { ac_try="$ac_link_default"
34197case "(($ac_try" in
34198  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34199  *) ac_try_echo=$ac_try;;
34200esac
34201eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34202$as_echo "$ac_try_echo"; } >&5
34203  (eval "$ac_link_default") 2>&5
34204  ac_status=$?
34205  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34206  test $ac_status = 0; }; then :
34207  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
34208# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
34209# in a Makefile.  We should not override ac_cv_exeext if it was cached,
34210# so that the user can short-circuit this test for compilers unknown to
34211# Autoconf.
34212for ac_file in $ac_files ''
34213do
34214  test -f "$ac_file" || continue
34215  case $ac_file in
34216    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
34217	;;
34218    [ab].out )
34219	# We found the default executable, but exeext='' is most
34220	# certainly right.
34221	break;;
34222    *.* )
34223	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
34224	then :; else
34225	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34226	fi
34227	# We set ac_cv_exeext here because the later test for it is not
34228	# safe: cross compilers may not add the suffix if given an `-o'
34229	# argument, so we may need to know it at that point already.
34230	# Even if this section looks crufty: it has the advantage of
34231	# actually working.
34232	break;;
34233    * )
34234	break;;
34235  esac
34236done
34237test "$ac_cv_exeext" = no && ac_cv_exeext=
34238
34239else
34240  ac_file=''
34241fi
34242if test -z "$ac_file"; then :
34243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34244$as_echo "no" >&6; }
34245$as_echo "$as_me: failed program was:" >&5
34246sed 's/^/| /' conftest.$ac_ext >&5
34247
34248{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34249$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34250as_fn_error 77 "C compiler cannot create executables
34251See \`config.log' for more details" "$LINENO" 5; }
34252else
34253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
34254$as_echo "yes" >&6; }
34255fi
34256{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
34257$as_echo_n "checking for C compiler default output file name... " >&6; }
34258{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
34259$as_echo "$ac_file" >&6; }
34260ac_exeext=$ac_cv_exeext
34261
34262rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
34263ac_clean_files=$ac_clean_files_save
34264{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
34265$as_echo_n "checking for suffix of executables... " >&6; }
34266if { { ac_try="$ac_link"
34267case "(($ac_try" in
34268  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34269  *) ac_try_echo=$ac_try;;
34270esac
34271eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34272$as_echo "$ac_try_echo"; } >&5
34273  (eval "$ac_link") 2>&5
34274  ac_status=$?
34275  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34276  test $ac_status = 0; }; then :
34277  # If both `conftest.exe' and `conftest' are `present' (well, observable)
34278# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
34279# work properly (i.e., refer to `conftest.exe'), while it won't with
34280# `rm'.
34281for ac_file in conftest.exe conftest conftest.*; do
34282  test -f "$ac_file" || continue
34283  case $ac_file in
34284    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
34285    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
34286	  break;;
34287    * ) break;;
34288  esac
34289done
34290else
34291  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34292$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34293as_fn_error $? "cannot compute suffix of executables: cannot compile and link
34294See \`config.log' for more details" "$LINENO" 5; }
34295fi
34296rm -f conftest conftest$ac_cv_exeext
34297{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34298$as_echo "$ac_cv_exeext" >&6; }
34299
34300rm -f conftest.$ac_ext
34301EXEEXT=$ac_cv_exeext
34302ac_exeext=$EXEEXT
34303cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34304/* end confdefs.h.  */
34305#include <stdio.h>
34306int
34307main ()
34308{
34309FILE *f = fopen ("conftest.out", "w");
34310 return ferror (f) || fclose (f) != 0;
34311
34312  ;
34313  return 0;
34314}
34315_ACEOF
34316ac_clean_files="$ac_clean_files conftest.out"
34317# Check that the compiler produces executables we can run.  If not, either
34318# the compiler is broken, or we cross compile.
34319{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34320$as_echo_n "checking whether we are cross compiling... " >&6; }
34321if test "$cross_compiling" != yes; then
34322  { { ac_try="$ac_link"
34323case "(($ac_try" in
34324  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34325  *) ac_try_echo=$ac_try;;
34326esac
34327eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34328$as_echo "$ac_try_echo"; } >&5
34329  (eval "$ac_link") 2>&5
34330  ac_status=$?
34331  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34332  test $ac_status = 0; }
34333  if { ac_try='./conftest$ac_cv_exeext'
34334  { { case "(($ac_try" in
34335  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34336  *) ac_try_echo=$ac_try;;
34337esac
34338eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34339$as_echo "$ac_try_echo"; } >&5
34340  (eval "$ac_try") 2>&5
34341  ac_status=$?
34342  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34343  test $ac_status = 0; }; }; then
34344    cross_compiling=no
34345  else
34346    if test "$cross_compiling" = maybe; then
34347	cross_compiling=yes
34348    else
34349	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34350$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34351as_fn_error $? "cannot run C compiled programs.
34352If you meant to cross compile, use \`--host'.
34353See \`config.log' for more details" "$LINENO" 5; }
34354    fi
34355  fi
34356fi
34357{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34358$as_echo "$cross_compiling" >&6; }
34359
34360rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34361ac_clean_files=$ac_clean_files_save
34362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34363$as_echo_n "checking for suffix of object files... " >&6; }
34364if ${ac_cv_objext+:} false; then :
34365  $as_echo_n "(cached) " >&6
34366else
34367  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34368/* end confdefs.h.  */
34369
34370int
34371main ()
34372{
34373
34374  ;
34375  return 0;
34376}
34377_ACEOF
34378rm -f conftest.o conftest.obj
34379if { { ac_try="$ac_compile"
34380case "(($ac_try" in
34381  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34382  *) ac_try_echo=$ac_try;;
34383esac
34384eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34385$as_echo "$ac_try_echo"; } >&5
34386  (eval "$ac_compile") 2>&5
34387  ac_status=$?
34388  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34389  test $ac_status = 0; }; then :
34390  for ac_file in conftest.o conftest.obj conftest.*; do
34391  test -f "$ac_file" || continue;
34392  case $ac_file in
34393    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34394    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34395       break;;
34396  esac
34397done
34398else
34399  $as_echo "$as_me: failed program was:" >&5
34400sed 's/^/| /' conftest.$ac_ext >&5
34401
34402{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34403$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34404as_fn_error $? "cannot compute suffix of object files: cannot compile
34405See \`config.log' for more details" "$LINENO" 5; }
34406fi
34407rm -f conftest.$ac_cv_objext conftest.$ac_ext
34408fi
34409{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34410$as_echo "$ac_cv_objext" >&6; }
34411OBJEXT=$ac_cv_objext
34412ac_objext=$OBJEXT
34413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34414$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34415if ${ac_cv_c_compiler_gnu+:} false; then :
34416  $as_echo_n "(cached) " >&6
34417else
34418  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34419/* end confdefs.h.  */
34420
34421int
34422main ()
34423{
34424#ifndef __GNUC__
34425       choke me
34426#endif
34427
34428  ;
34429  return 0;
34430}
34431_ACEOF
34432if ac_fn_c_try_compile "$LINENO"; then :
34433  ac_compiler_gnu=yes
34434else
34435  ac_compiler_gnu=no
34436fi
34437rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34438ac_cv_c_compiler_gnu=$ac_compiler_gnu
34439
34440fi
34441{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34442$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34443if test $ac_compiler_gnu = yes; then
34444  GCC=yes
34445else
34446  GCC=
34447fi
34448ac_test_CFLAGS=${CFLAGS+set}
34449ac_save_CFLAGS=$CFLAGS
34450{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34451$as_echo_n "checking whether $CC accepts -g... " >&6; }
34452if ${ac_cv_prog_cc_g+:} false; then :
34453  $as_echo_n "(cached) " >&6
34454else
34455  ac_save_c_werror_flag=$ac_c_werror_flag
34456   ac_c_werror_flag=yes
34457   ac_cv_prog_cc_g=no
34458   CFLAGS="-g"
34459   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34460/* end confdefs.h.  */
34461
34462int
34463main ()
34464{
34465
34466  ;
34467  return 0;
34468}
34469_ACEOF
34470if ac_fn_c_try_compile "$LINENO"; then :
34471  ac_cv_prog_cc_g=yes
34472else
34473  CFLAGS=""
34474      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34475/* end confdefs.h.  */
34476
34477int
34478main ()
34479{
34480
34481  ;
34482  return 0;
34483}
34484_ACEOF
34485if ac_fn_c_try_compile "$LINENO"; then :
34486
34487else
34488  ac_c_werror_flag=$ac_save_c_werror_flag
34489	 CFLAGS="-g"
34490	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34491/* end confdefs.h.  */
34492
34493int
34494main ()
34495{
34496
34497  ;
34498  return 0;
34499}
34500_ACEOF
34501if ac_fn_c_try_compile "$LINENO"; then :
34502  ac_cv_prog_cc_g=yes
34503fi
34504rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34505fi
34506rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34507fi
34508rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34509   ac_c_werror_flag=$ac_save_c_werror_flag
34510fi
34511{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34512$as_echo "$ac_cv_prog_cc_g" >&6; }
34513if test "$ac_test_CFLAGS" = set; then
34514  CFLAGS=$ac_save_CFLAGS
34515elif test $ac_cv_prog_cc_g = yes; then
34516  if test "$GCC" = yes; then
34517    CFLAGS="-g -O2"
34518  else
34519    CFLAGS="-g"
34520  fi
34521else
34522  if test "$GCC" = yes; then
34523    CFLAGS="-O2"
34524  else
34525    CFLAGS=
34526  fi
34527fi
34528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34529$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34530if ${ac_cv_prog_cc_c89+:} false; then :
34531  $as_echo_n "(cached) " >&6
34532else
34533  ac_cv_prog_cc_c89=no
34534ac_save_CC=$CC
34535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34536/* end confdefs.h.  */
34537#include <stdarg.h>
34538#include <stdio.h>
34539struct stat;
34540/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34541struct buf { int x; };
34542FILE * (*rcsopen) (struct buf *, struct stat *, int);
34543static char *e (p, i)
34544     char **p;
34545     int i;
34546{
34547  return p[i];
34548}
34549static char *f (char * (*g) (char **, int), char **p, ...)
34550{
34551  char *s;
34552  va_list v;
34553  va_start (v,p);
34554  s = g (p, va_arg (v,int));
34555  va_end (v);
34556  return s;
34557}
34558
34559/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34560   function prototypes and stuff, but not '\xHH' hex character constants.
34561   These don't provoke an error unfortunately, instead are silently treated
34562   as 'x'.  The following induces an error, until -std is added to get
34563   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34564   array size at least.  It's necessary to write '\x00'==0 to get something
34565   that's true only with -std.  */
34566int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34567
34568/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34569   inside strings and character constants.  */
34570#define FOO(x) 'x'
34571int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34572
34573int test (int i, double x);
34574struct s1 {int (*f) (int a);};
34575struct s2 {int (*f) (double a);};
34576int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34577int argc;
34578char **argv;
34579int
34580main ()
34581{
34582return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34583  ;
34584  return 0;
34585}
34586_ACEOF
34587for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34588	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34589do
34590  CC="$ac_save_CC $ac_arg"
34591  if ac_fn_c_try_compile "$LINENO"; then :
34592  ac_cv_prog_cc_c89=$ac_arg
34593fi
34594rm -f core conftest.err conftest.$ac_objext
34595  test "x$ac_cv_prog_cc_c89" != "xno" && break
34596done
34597rm -f conftest.$ac_ext
34598CC=$ac_save_CC
34599
34600fi
34601# AC_CACHE_VAL
34602case "x$ac_cv_prog_cc_c89" in
34603  x)
34604    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34605$as_echo "none needed" >&6; } ;;
34606  xno)
34607    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34608$as_echo "unsupported" >&6; } ;;
34609  *)
34610    CC="$CC $ac_cv_prog_cc_c89"
34611    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34612$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34613esac
34614if test "x$ac_cv_prog_cc_c89" != xno; then :
34615
34616fi
34617
34618ac_ext=cpp
34619ac_cpp='$CXXCPP $CPPFLAGS'
34620ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34621ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34622ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34623
34624
34625
34626  COMPILER_NAME=C++
34627  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34628
34629  if test "x$CXX" != x; then
34630    # User has supplied compiler name already, always let that override.
34631    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34632$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34633    if test "x`basename $CXX`" = "x$CXX"; then
34634      # A command without a complete path is provided, search $PATH.
34635
34636      for ac_prog in $CXX
34637do
34638  # Extract the first word of "$ac_prog", so it can be a program name with args.
34639set dummy $ac_prog; ac_word=$2
34640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34641$as_echo_n "checking for $ac_word... " >&6; }
34642if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34643  $as_echo_n "(cached) " >&6
34644else
34645  case $POTENTIAL_CXX in
34646  [\\/]* | ?:[\\/]*)
34647  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34648  ;;
34649  *)
34650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34651for as_dir in $PATH
34652do
34653  IFS=$as_save_IFS
34654  test -z "$as_dir" && as_dir=.
34655    for ac_exec_ext in '' $ac_executable_extensions; do
34656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34657    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34659    break 2
34660  fi
34661done
34662  done
34663IFS=$as_save_IFS
34664
34665  ;;
34666esac
34667fi
34668POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34669if test -n "$POTENTIAL_CXX"; then
34670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34671$as_echo "$POTENTIAL_CXX" >&6; }
34672else
34673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34674$as_echo "no" >&6; }
34675fi
34676
34677
34678  test -n "$POTENTIAL_CXX" && break
34679done
34680
34681      if test "x$POTENTIAL_CXX" != x; then
34682        CXX=$POTENTIAL_CXX
34683      else
34684        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34685      fi
34686    else
34687      # Otherwise it might already be a complete path
34688      if test ! -x "$CXX"; then
34689        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34690      fi
34691    fi
34692  else
34693    # No user supplied value. Locate compiler ourselves.
34694
34695    # If we are cross compiling, assume cross compilation tools follows the
34696    # cross compilation standard where they are prefixed with the autoconf
34697    # standard name for the target. For example the binary
34698    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34699    # If we are not cross compiling, then the default compiler name will be
34700    # used.
34701
34702    CXX=
34703    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34704    # before checking the rest of the PATH.
34705    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34706    # step, this should not be necessary.
34707    if test -n "$TOOLCHAIN_PATH"; then
34708      PATH_save="$PATH"
34709      PATH="$TOOLCHAIN_PATH"
34710      if test -n "$ac_tool_prefix"; then
34711  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34712set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34714$as_echo_n "checking for $ac_word... " >&6; }
34715if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34716  $as_echo_n "(cached) " >&6
34717else
34718  case $TOOLCHAIN_PATH_CXX in
34719  [\\/]* | ?:[\\/]*)
34720  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34721  ;;
34722  *)
34723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34724for as_dir in $PATH
34725do
34726  IFS=$as_save_IFS
34727  test -z "$as_dir" && as_dir=.
34728    for ac_exec_ext in '' $ac_executable_extensions; do
34729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34730    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34732    break 2
34733  fi
34734done
34735  done
34736IFS=$as_save_IFS
34737
34738  ;;
34739esac
34740fi
34741TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34742if test -n "$TOOLCHAIN_PATH_CXX"; then
34743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34744$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34745else
34746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34747$as_echo "no" >&6; }
34748fi
34749
34750
34751fi
34752if test -z "$ac_cv_path_TOOLCHAIN_PATH_CXX"; then
34753  ac_pt_TOOLCHAIN_PATH_CXX=$TOOLCHAIN_PATH_CXX
34754  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34755set dummy $SEARCH_LIST; ac_word=$2
34756{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34757$as_echo_n "checking for $ac_word... " >&6; }
34758if ${ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX+:} false; then :
34759  $as_echo_n "(cached) " >&6
34760else
34761  case $ac_pt_TOOLCHAIN_PATH_CXX in
34762  [\\/]* | ?:[\\/]*)
34763  ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$ac_pt_TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34764  ;;
34765  *)
34766  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34767for as_dir in $PATH
34768do
34769  IFS=$as_save_IFS
34770  test -z "$as_dir" && as_dir=.
34771    for ac_exec_ext in '' $ac_executable_extensions; do
34772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34773    ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34775    break 2
34776  fi
34777done
34778  done
34779IFS=$as_save_IFS
34780
34781  ;;
34782esac
34783fi
34784ac_pt_TOOLCHAIN_PATH_CXX=$ac_cv_path_ac_pt_TOOLCHAIN_PATH_CXX
34785if test -n "$ac_pt_TOOLCHAIN_PATH_CXX"; then
34786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_TOOLCHAIN_PATH_CXX" >&5
34787$as_echo "$ac_pt_TOOLCHAIN_PATH_CXX" >&6; }
34788else
34789  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34790$as_echo "no" >&6; }
34791fi
34792
34793  if test "x$ac_pt_TOOLCHAIN_PATH_CXX" = x; then
34794    TOOLCHAIN_PATH_CXX=""
34795  else
34796    case $cross_compiling:$ac_tool_warned in
34797yes:)
34798{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34799$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34800ac_tool_warned=yes ;;
34801esac
34802    TOOLCHAIN_PATH_CXX=$ac_pt_TOOLCHAIN_PATH_CXX
34803  fi
34804else
34805  TOOLCHAIN_PATH_CXX="$ac_cv_path_TOOLCHAIN_PATH_CXX"
34806fi
34807
34808      CXX=$TOOLCHAIN_PATH_CXX
34809      PATH="$PATH_save"
34810    fi
34811
34812    # AC_PATH_TOOL can't be run multiple times with the same variable,
34813    # so create a new name for this run.
34814    if test "x$CXX" = x; then
34815      if test -n "$ac_tool_prefix"; then
34816  # Extract the first word of "${ac_tool_prefix}$SEARCH_LIST", so it can be a program name with args.
34817set dummy ${ac_tool_prefix}$SEARCH_LIST; ac_word=$2
34818{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34819$as_echo_n "checking for $ac_word... " >&6; }
34820if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34821  $as_echo_n "(cached) " >&6
34822else
34823  case $POTENTIAL_CXX in
34824  [\\/]* | ?:[\\/]*)
34825  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34826  ;;
34827  *)
34828  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34829for as_dir in $PATH
34830do
34831  IFS=$as_save_IFS
34832  test -z "$as_dir" && as_dir=.
34833    for ac_exec_ext in '' $ac_executable_extensions; do
34834  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34835    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34836    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34837    break 2
34838  fi
34839done
34840  done
34841IFS=$as_save_IFS
34842
34843  ;;
34844esac
34845fi
34846POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34847if test -n "$POTENTIAL_CXX"; then
34848  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34849$as_echo "$POTENTIAL_CXX" >&6; }
34850else
34851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34852$as_echo "no" >&6; }
34853fi
34854
34855
34856fi
34857if test -z "$ac_cv_path_POTENTIAL_CXX"; then
34858  ac_pt_POTENTIAL_CXX=$POTENTIAL_CXX
34859  # Extract the first word of "$SEARCH_LIST", so it can be a program name with args.
34860set dummy $SEARCH_LIST; ac_word=$2
34861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34862$as_echo_n "checking for $ac_word... " >&6; }
34863if ${ac_cv_path_ac_pt_POTENTIAL_CXX+:} false; then :
34864  $as_echo_n "(cached) " >&6
34865else
34866  case $ac_pt_POTENTIAL_CXX in
34867  [\\/]* | ?:[\\/]*)
34868  ac_cv_path_ac_pt_POTENTIAL_CXX="$ac_pt_POTENTIAL_CXX" # Let the user override the test with a path.
34869  ;;
34870  *)
34871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34872for as_dir in $PATH
34873do
34874  IFS=$as_save_IFS
34875  test -z "$as_dir" && as_dir=.
34876    for ac_exec_ext in '' $ac_executable_extensions; do
34877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34878    ac_cv_path_ac_pt_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34880    break 2
34881  fi
34882done
34883  done
34884IFS=$as_save_IFS
34885
34886  ;;
34887esac
34888fi
34889ac_pt_POTENTIAL_CXX=$ac_cv_path_ac_pt_POTENTIAL_CXX
34890if test -n "$ac_pt_POTENTIAL_CXX"; then
34891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_POTENTIAL_CXX" >&5
34892$as_echo "$ac_pt_POTENTIAL_CXX" >&6; }
34893else
34894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34895$as_echo "no" >&6; }
34896fi
34897
34898  if test "x$ac_pt_POTENTIAL_CXX" = x; then
34899    POTENTIAL_CXX=""
34900  else
34901    case $cross_compiling:$ac_tool_warned in
34902yes:)
34903{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34904$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34905ac_tool_warned=yes ;;
34906esac
34907    POTENTIAL_CXX=$ac_pt_POTENTIAL_CXX
34908  fi
34909else
34910  POTENTIAL_CXX="$ac_cv_path_POTENTIAL_CXX"
34911fi
34912
34913      CXX=$POTENTIAL_CXX
34914    fi
34915
34916    if test "x$CXX" = x; then
34917
34918  # Print a helpful message on how to acquire the necessary build dependency.
34919  # devkit is the help tag: freetype, cups, alsa etc
34920  MISSING_DEPENDENCY=devkit
34921
34922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34923    cygwin_help $MISSING_DEPENDENCY
34924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34925    msys_help $MISSING_DEPENDENCY
34926  else
34927    PKGHANDLER_COMMAND=
34928
34929    case $PKGHANDLER in
34930      apt-get)
34931        apt_help     $MISSING_DEPENDENCY ;;
34932      yum)
34933        yum_help     $MISSING_DEPENDENCY ;;
34934      brew)
34935        brew_help    $MISSING_DEPENDENCY ;;
34936      port)
34937        port_help    $MISSING_DEPENDENCY ;;
34938      pkgutil)
34939        pkgutil_help $MISSING_DEPENDENCY ;;
34940      pkgadd)
34941        pkgadd_help  $MISSING_DEPENDENCY ;;
34942    esac
34943
34944    if test "x$PKGHANDLER_COMMAND" != x; then
34945      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34946    fi
34947  fi
34948
34949      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34950    fi
34951  fi
34952
34953  # Now we have a compiler binary in CXX. Make sure it's okay.
34954
34955  # Only process if variable expands to non-empty
34956
34957  if test "x$CXX" != x; then
34958    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34959
34960  # First separate the path from the arguments. This will split at the first
34961  # space.
34962  complete="$CXX"
34963  path="${complete%% *}"
34964  tmp="$complete EOL"
34965  arguments="${tmp#* }"
34966
34967  # Input might be given as Windows format, start by converting to
34968  # unix format.
34969  new_path=`$CYGPATH -u "$path"`
34970
34971  # Now try to locate executable using which
34972  new_path=`$WHICH "$new_path" 2> /dev/null`
34973  # bat and cmd files are not always considered executable in cygwin causing which
34974  # to not find them
34975  if test "x$new_path" = x \
34976      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34977      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34978    new_path=`$CYGPATH -u "$path"`
34979  fi
34980  if test "x$new_path" = x; then
34981    # Oops. Which didn't find the executable.
34982    # The splitting of arguments from the executable at a space might have been incorrect,
34983    # since paths with space are more likely in Windows. Give it another try with the whole
34984    # argument.
34985    path="$complete"
34986    arguments="EOL"
34987    new_path=`$CYGPATH -u "$path"`
34988    new_path=`$WHICH "$new_path" 2> /dev/null`
34989    # bat and cmd files are not always considered executable in cygwin causing which
34990    # to not find them
34991    if test "x$new_path" = x \
34992        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34993        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34994      new_path=`$CYGPATH -u "$path"`
34995    fi
34996    if test "x$new_path" = x; then
34997      # It's still not found. Now this is an unrecoverable error.
34998      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34999$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35000      has_space=`$ECHO "$complete" | $GREP " "`
35001      if test "x$has_space" != x; then
35002        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35003$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35004      fi
35005      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35006    fi
35007  fi
35008
35009  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35010  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35011  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35012  # "foo.exe" is OK but "foo" is an error.
35013  #
35014  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35015  # It is also a way to make sure we got the proper file name for the real test later on.
35016  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35017  if test "x$test_shortpath" = x; then
35018    # Short path failed, file does not exist as specified.
35019    # Try adding .exe or .cmd
35020    if test -f "${new_path}.exe"; then
35021      input_to_shortpath="${new_path}.exe"
35022    elif test -f "${new_path}.cmd"; then
35023      input_to_shortpath="${new_path}.cmd"
35024    else
35025      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
35026$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
35027      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35028$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35029      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35030    fi
35031  else
35032    input_to_shortpath="$new_path"
35033  fi
35034
35035  # Call helper function which possibly converts this using DOS-style short mode.
35036  # If so, the updated path is stored in $new_path.
35037  new_path="$input_to_shortpath"
35038
35039  input_path="$input_to_shortpath"
35040  # Check if we need to convert this using DOS-style short mode. If the path
35041  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35042  # take no chances and rewrite it.
35043  # Note: m4 eats our [], so we need to use [ and ] instead.
35044  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35045  if test "x$has_forbidden_chars" != x; then
35046    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35047    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35048    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35049    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35050      # Going to short mode and back again did indeed matter. Since short mode is
35051      # case insensitive, let's make it lowercase to improve readability.
35052      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35053      # Now convert it back to Unix-style (cygpath)
35054      input_path=`$CYGPATH -u "$shortmode_path"`
35055      new_path="$input_path"
35056    fi
35057  fi
35058
35059  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35060  if test "x$test_cygdrive_prefix" = x; then
35061    # As a simple fix, exclude /usr/bin since it's not a real path.
35062    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35063      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35064      # a path prefixed by /cygdrive for fixpath to work.
35065      new_path="$CYGWIN_ROOT_PATH$input_path"
35066    fi
35067  fi
35068
35069  # remove trailing .exe if any
35070  new_path="${new_path/%.exe/}"
35071
35072    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35073
35074  # First separate the path from the arguments. This will split at the first
35075  # space.
35076  complete="$CXX"
35077  path="${complete%% *}"
35078  tmp="$complete EOL"
35079  arguments="${tmp#* }"
35080
35081  # Input might be given as Windows format, start by converting to
35082  # unix format.
35083  new_path="$path"
35084
35085  windows_path="$new_path"
35086  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35087    unix_path=`$CYGPATH -u "$windows_path"`
35088    new_path="$unix_path"
35089  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35090    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35091    new_path="$unix_path"
35092  fi
35093
35094
35095  # Now try to locate executable using which
35096  new_path=`$WHICH "$new_path" 2> /dev/null`
35097
35098  if test "x$new_path" = x; then
35099    # Oops. Which didn't find the executable.
35100    # The splitting of arguments from the executable at a space might have been incorrect,
35101    # since paths with space are more likely in Windows. Give it another try with the whole
35102    # argument.
35103    path="$complete"
35104    arguments="EOL"
35105    new_path="$path"
35106
35107  windows_path="$new_path"
35108  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35109    unix_path=`$CYGPATH -u "$windows_path"`
35110    new_path="$unix_path"
35111  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35112    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35113    new_path="$unix_path"
35114  fi
35115
35116
35117    new_path=`$WHICH "$new_path" 2> /dev/null`
35118    # bat and cmd files are not always considered executable in MSYS causing which
35119    # to not find them
35120    if test "x$new_path" = x \
35121        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35122        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35123      new_path="$path"
35124
35125  windows_path="$new_path"
35126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35127    unix_path=`$CYGPATH -u "$windows_path"`
35128    new_path="$unix_path"
35129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35130    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35131    new_path="$unix_path"
35132  fi
35133
35134    fi
35135
35136    if test "x$new_path" = x; then
35137      # It's still not found. Now this is an unrecoverable error.
35138      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35139$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35140      has_space=`$ECHO "$complete" | $GREP " "`
35141      if test "x$has_space" != x; then
35142        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35143$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35144      fi
35145      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35146    fi
35147  fi
35148
35149  # Now new_path has a complete unix path to the binary
35150  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35151    # Keep paths in /bin as-is, but remove trailing .exe if any
35152    new_path="${new_path/%.exe/}"
35153    # Do not save /bin paths to all_fixpath_prefixes!
35154  else
35155    # Not in mixed or Windows style, start by that.
35156    new_path=`cmd //c echo $new_path`
35157
35158  input_path="$new_path"
35159  # Check if we need to convert this using DOS-style short mode. If the path
35160  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35161  # take no chances and rewrite it.
35162  # Note: m4 eats our [], so we need to use [ and ] instead.
35163  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35164  if test "x$has_forbidden_chars" != x; then
35165    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35166    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35167  fi
35168
35169    # Output is in $new_path
35170
35171  windows_path="$new_path"
35172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35173    unix_path=`$CYGPATH -u "$windows_path"`
35174    new_path="$unix_path"
35175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35177    new_path="$unix_path"
35178  fi
35179
35180    # remove trailing .exe if any
35181    new_path="${new_path/%.exe/}"
35182
35183    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35184    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35185  fi
35186
35187    else
35188      # We're on a unix platform. Hooray! :)
35189      # First separate the path from the arguments. This will split at the first
35190      # space.
35191      complete="$CXX"
35192      path="${complete%% *}"
35193      tmp="$complete EOL"
35194      arguments="${tmp#* }"
35195
35196      # Cannot rely on the command "which" here since it doesn't always work.
35197      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35198      if test -z "$is_absolute_path"; then
35199        # Path to executable is not absolute. Find it.
35200        IFS_save="$IFS"
35201        IFS=:
35202        for p in $PATH; do
35203          if test -f "$p/$path" && test -x "$p/$path"; then
35204            new_path="$p/$path"
35205            break
35206          fi
35207        done
35208        IFS="$IFS_save"
35209      else
35210        # This is an absolute path, we can use it without further modifications.
35211        new_path="$path"
35212      fi
35213
35214      if test "x$new_path" = x; then
35215        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
35216$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
35217        has_space=`$ECHO "$complete" | $GREP " "`
35218        if test "x$has_space" != x; then
35219          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35220$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35221        fi
35222        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
35223      fi
35224    fi
35225
35226    # Now join together the path and the arguments once again
35227    if test "x$arguments" != xEOL; then
35228      new_complete="$new_path ${arguments% *}"
35229    else
35230      new_complete="$new_path"
35231    fi
35232
35233    if test "x$complete" != "x$new_complete"; then
35234      CXX="$new_complete"
35235      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
35236$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
35237    fi
35238  fi
35239
35240  TEST_COMPILER="$CXX"
35241
35242  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
35243$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
35244  SYMLINK_ORIGINAL="$TEST_COMPILER"
35245
35246  if test "x$OPENJDK_BUILD_OS" != xwindows; then
35247    # Follow a chain of symbolic links. Use readlink
35248    # where it exists, else fall back to horribly
35249    # complicated shell code.
35250    if test "x$READLINK_TESTED" != yes; then
35251      # On MacOSX there is a readlink tool with a different
35252      # purpose than the GNU readlink tool. Check the found readlink.
35253      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
35254      if test "x$ISGNU" = x; then
35255        # A readlink that we do not know how to use.
35256        # Are there other non-GNU readlinks out there?
35257        READLINK_TESTED=yes
35258        READLINK=
35259      fi
35260    fi
35261
35262    if test "x$READLINK" != x; then
35263      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
35264    else
35265      # Save the current directory for restoring afterwards
35266      STARTDIR=$PWD
35267      COUNTER=0
35268      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
35269      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
35270      cd $sym_link_dir
35271      # Use -P flag to resolve symlinks in directories.
35272      cd `$THEPWDCMD -P`
35273      sym_link_dir=`$THEPWDCMD -P`
35274      # Resolve file symlinks
35275      while test $COUNTER -lt 20; do
35276        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
35277        if test "x$ISLINK" == x; then
35278          # This is not a symbolic link! We are done!
35279          break
35280        fi
35281        # Again resolve directory symlinks since the target of the just found
35282        # link could be in a different directory
35283        cd `$DIRNAME $ISLINK`
35284        sym_link_dir=`$THEPWDCMD -P`
35285        sym_link_file=`$BASENAME $ISLINK`
35286        let COUNTER=COUNTER+1
35287      done
35288      cd $STARTDIR
35289      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
35290    fi
35291  fi
35292
35293  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
35294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
35295$as_echo "no symlink" >&6; }
35296  else
35297    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
35298$as_echo "$SYMLINK_ORIGINAL" >&6; }
35299
35300    # We can't handle ccache by gcc wrappers, since we need to know if we're
35301    # using ccache. Instead ccache usage must be controlled by a configure option.
35302    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
35303    if test "x$COMPILER_BASENAME" = "xccache"; then
35304      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
35305$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
35306      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
35307    fi
35308  fi
35309
35310
35311  COMPILER=$CXX
35312  COMPILER_NAME=$COMPILER_NAME
35313
35314  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
35315    # cc -V output typically looks like
35316    #     cc: Sun C 5.12 Linux_i386 2011/11/16
35317    # or
35318    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
35319    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
35320    # Check that this is likely to be the Solaris Studio cc.
35321    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
35322    if test $? -ne 0; then
35323      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35324      { $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
35325$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35326      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35327$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35328      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35329$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35330      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35331    fi
35332    # Remove usage instructions (if present), and
35333    # collapse compiler output into a single line
35334    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35335        $SED -e 's/ *[Uu]sage:.*//'`
35336    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35337        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
35338  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
35339    # xlc -qversion output typically looks like
35340    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
35341    #     Version: 11.01.0000.0015
35342    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
35343    # Check that this is likely to be the IBM XL C compiler.
35344    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
35345    if test $? -ne 0; then
35346      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35347      { $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
35348$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35349      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35350$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35351      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
35352$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
35353      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35354    fi
35355    # Collapse compiler output into a single line
35356    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35357    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35358        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
35359  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35360    # There is no specific version flag, but all output starts with a version string.
35361    # First line typically looks something like:
35362    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
35363    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
35364    # Check that this is likely to be Microsoft CL.EXE.
35365    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
35366    if test $? -ne 0; then
35367      { $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
35368$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35369      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35370$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35371      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35372    fi
35373    # Collapse compiler output into a single line
35374    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35375    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35376        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
35377  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
35378    # gcc --version output typically looks like
35379    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
35380    #     Copyright (C) 2013 Free Software Foundation, Inc.
35381    #     This is free software; see the source for copying conditions.  There is NO
35382    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
35383    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35384    # Check that this is likely to be GCC.
35385    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
35386    if test $? -ne 0; then
35387      { $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
35388$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35389      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
35390$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
35391      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35392    fi
35393    # Remove Copyright and legalese from version string, and
35394    # collapse into a single line
35395    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
35396        $SED -e 's/ *Copyright .*//'`
35397    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35398        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
35399  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
35400    # clang --version output typically looks like
35401    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
35402    #    clang version 3.3 (tags/RELEASE_33/final)
35403    # or
35404    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
35405    #    Target: x86_64-pc-linux-gnu
35406    #    Thread model: posix
35407    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35408    # Check that this is likely to be clang
35409    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35410    if test $? -ne 0; then
35411      { $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
35412$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35413      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35414$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35415      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35416    fi
35417    # Collapse compiler output into a single line
35418    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35419    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35420        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35421  else
35422      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35423  fi
35424  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35425  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35426  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35427  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35428
35429  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35430$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35431
35432
35433  # Now that we have resolved CXX ourself, let autoconf have its go at it
35434  ac_ext=cpp
35435ac_cpp='$CXXCPP $CPPFLAGS'
35436ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35437ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35438ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35439if test -z "$CXX"; then
35440  if test -n "$CCC"; then
35441    CXX=$CCC
35442  else
35443    if test -n "$ac_tool_prefix"; then
35444  for ac_prog in $CXX
35445  do
35446    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35447set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35448{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35449$as_echo_n "checking for $ac_word... " >&6; }
35450if ${ac_cv_prog_CXX+:} false; then :
35451  $as_echo_n "(cached) " >&6
35452else
35453  if test -n "$CXX"; then
35454  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35455else
35456as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35457for as_dir in $PATH
35458do
35459  IFS=$as_save_IFS
35460  test -z "$as_dir" && as_dir=.
35461    for ac_exec_ext in '' $ac_executable_extensions; do
35462  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35463    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35464    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35465    break 2
35466  fi
35467done
35468  done
35469IFS=$as_save_IFS
35470
35471fi
35472fi
35473CXX=$ac_cv_prog_CXX
35474if test -n "$CXX"; then
35475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35476$as_echo "$CXX" >&6; }
35477else
35478  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35479$as_echo "no" >&6; }
35480fi
35481
35482
35483    test -n "$CXX" && break
35484  done
35485fi
35486if test -z "$CXX"; then
35487  ac_ct_CXX=$CXX
35488  for ac_prog in $CXX
35489do
35490  # Extract the first word of "$ac_prog", so it can be a program name with args.
35491set dummy $ac_prog; ac_word=$2
35492{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35493$as_echo_n "checking for $ac_word... " >&6; }
35494if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35495  $as_echo_n "(cached) " >&6
35496else
35497  if test -n "$ac_ct_CXX"; then
35498  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35499else
35500as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35501for as_dir in $PATH
35502do
35503  IFS=$as_save_IFS
35504  test -z "$as_dir" && as_dir=.
35505    for ac_exec_ext in '' $ac_executable_extensions; do
35506  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35507    ac_cv_prog_ac_ct_CXX="$ac_prog"
35508    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35509    break 2
35510  fi
35511done
35512  done
35513IFS=$as_save_IFS
35514
35515fi
35516fi
35517ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35518if test -n "$ac_ct_CXX"; then
35519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35520$as_echo "$ac_ct_CXX" >&6; }
35521else
35522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35523$as_echo "no" >&6; }
35524fi
35525
35526
35527  test -n "$ac_ct_CXX" && break
35528done
35529
35530  if test "x$ac_ct_CXX" = x; then
35531    CXX="g++"
35532  else
35533    case $cross_compiling:$ac_tool_warned in
35534yes:)
35535{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35536$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35537ac_tool_warned=yes ;;
35538esac
35539    CXX=$ac_ct_CXX
35540  fi
35541fi
35542
35543  fi
35544fi
35545# Provide some information about the compiler.
35546$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35547set X $ac_compile
35548ac_compiler=$2
35549for ac_option in --version -v -V -qversion; do
35550  { { ac_try="$ac_compiler $ac_option >&5"
35551case "(($ac_try" in
35552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35553  *) ac_try_echo=$ac_try;;
35554esac
35555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35556$as_echo "$ac_try_echo"; } >&5
35557  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35558  ac_status=$?
35559  if test -s conftest.err; then
35560    sed '10a\
35561... rest of stderr output deleted ...
35562         10q' conftest.err >conftest.er1
35563    cat conftest.er1 >&5
35564  fi
35565  rm -f conftest.er1 conftest.err
35566  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35567  test $ac_status = 0; }
35568done
35569
35570{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35571$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35572if ${ac_cv_cxx_compiler_gnu+:} false; then :
35573  $as_echo_n "(cached) " >&6
35574else
35575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35576/* end confdefs.h.  */
35577
35578int
35579main ()
35580{
35581#ifndef __GNUC__
35582       choke me
35583#endif
35584
35585  ;
35586  return 0;
35587}
35588_ACEOF
35589if ac_fn_cxx_try_compile "$LINENO"; then :
35590  ac_compiler_gnu=yes
35591else
35592  ac_compiler_gnu=no
35593fi
35594rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35595ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35596
35597fi
35598{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35599$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35600if test $ac_compiler_gnu = yes; then
35601  GXX=yes
35602else
35603  GXX=
35604fi
35605ac_test_CXXFLAGS=${CXXFLAGS+set}
35606ac_save_CXXFLAGS=$CXXFLAGS
35607{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35608$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35609if ${ac_cv_prog_cxx_g+:} false; then :
35610  $as_echo_n "(cached) " >&6
35611else
35612  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35613   ac_cxx_werror_flag=yes
35614   ac_cv_prog_cxx_g=no
35615   CXXFLAGS="-g"
35616   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35617/* end confdefs.h.  */
35618
35619int
35620main ()
35621{
35622
35623  ;
35624  return 0;
35625}
35626_ACEOF
35627if ac_fn_cxx_try_compile "$LINENO"; then :
35628  ac_cv_prog_cxx_g=yes
35629else
35630  CXXFLAGS=""
35631      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35632/* end confdefs.h.  */
35633
35634int
35635main ()
35636{
35637
35638  ;
35639  return 0;
35640}
35641_ACEOF
35642if ac_fn_cxx_try_compile "$LINENO"; then :
35643
35644else
35645  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35646	 CXXFLAGS="-g"
35647	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35648/* end confdefs.h.  */
35649
35650int
35651main ()
35652{
35653
35654  ;
35655  return 0;
35656}
35657_ACEOF
35658if ac_fn_cxx_try_compile "$LINENO"; then :
35659  ac_cv_prog_cxx_g=yes
35660fi
35661rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35662fi
35663rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35664fi
35665rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35666   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35667fi
35668{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35669$as_echo "$ac_cv_prog_cxx_g" >&6; }
35670if test "$ac_test_CXXFLAGS" = set; then
35671  CXXFLAGS=$ac_save_CXXFLAGS
35672elif test $ac_cv_prog_cxx_g = yes; then
35673  if test "$GXX" = yes; then
35674    CXXFLAGS="-g -O2"
35675  else
35676    CXXFLAGS="-g"
35677  fi
35678else
35679  if test "$GXX" = yes; then
35680    CXXFLAGS="-O2"
35681  else
35682    CXXFLAGS=
35683  fi
35684fi
35685ac_ext=cpp
35686ac_cpp='$CXXCPP $CPPFLAGS'
35687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35690
35691
35692  # This is the compiler version number on the form X.Y[.Z]
35693
35694
35695
35696
35697  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35698    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35699$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35700    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35701$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35702  fi
35703
35704  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35705  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
35706    { $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
35707$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;}
35708  fi
35709
35710  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35711    { $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
35712$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35713  fi
35714
35715  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
35716
35717
35718  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35719
35720
35721
35722
35723
35724
35725
35726
35727
35728
35729
35730
35731
35732
35733
35734
35735
35736
35737
35738
35739
35740
35741
35742
35743
35744
35745
35746
35747
35748
35749
35750
35751
35752
35753
35754
35755
35756
35757
35758
35759
35760
35761
35762
35763
35764
35765
35766
35767
35768    # Execute function body
35769
35770  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35771  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35772
35773  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
35774    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
35775  fi
35776
35777  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35778    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35779  fi
35780
35781  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35782  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
35783
35784  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35785    :
35786
35787  else
35788    :
35789
35790          { $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
35791$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35792
35793
35794  fi
35795
35796
35797
35798
35799
35800
35801
35802
35803
35804
35805
35806
35807
35808
35809  fi
35810
35811  #
35812  # Setup the preprocessor (CPP and CXXCPP)
35813  #
35814  ac_ext=c
35815ac_cpp='$CPP $CPPFLAGS'
35816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35818ac_compiler_gnu=$ac_cv_c_compiler_gnu
35819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35820$as_echo_n "checking how to run the C preprocessor... " >&6; }
35821# On Suns, sometimes $CPP names a directory.
35822if test -n "$CPP" && test -d "$CPP"; then
35823  CPP=
35824fi
35825if test -z "$CPP"; then
35826  if ${ac_cv_prog_CPP+:} false; then :
35827  $as_echo_n "(cached) " >&6
35828else
35829      # Double quotes because CPP needs to be expanded
35830    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35831    do
35832      ac_preproc_ok=false
35833for ac_c_preproc_warn_flag in '' yes
35834do
35835  # Use a header file that comes with gcc, so configuring glibc
35836  # with a fresh cross-compiler works.
35837  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35838  # <limits.h> exists even on freestanding compilers.
35839  # On the NeXT, cc -E runs the code through the compiler's parser,
35840  # not just through cpp. "Syntax error" is here to catch this case.
35841  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35842/* end confdefs.h.  */
35843#ifdef __STDC__
35844# include <limits.h>
35845#else
35846# include <assert.h>
35847#endif
35848		     Syntax error
35849_ACEOF
35850if ac_fn_c_try_cpp "$LINENO"; then :
35851
35852else
35853  # Broken: fails on valid input.
35854continue
35855fi
35856rm -f conftest.err conftest.i conftest.$ac_ext
35857
35858  # OK, works on sane cases.  Now check whether nonexistent headers
35859  # can be detected and how.
35860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35861/* end confdefs.h.  */
35862#include <ac_nonexistent.h>
35863_ACEOF
35864if ac_fn_c_try_cpp "$LINENO"; then :
35865  # Broken: success on invalid input.
35866continue
35867else
35868  # Passes both tests.
35869ac_preproc_ok=:
35870break
35871fi
35872rm -f conftest.err conftest.i conftest.$ac_ext
35873
35874done
35875# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35876rm -f conftest.i conftest.err conftest.$ac_ext
35877if $ac_preproc_ok; then :
35878  break
35879fi
35880
35881    done
35882    ac_cv_prog_CPP=$CPP
35883
35884fi
35885  CPP=$ac_cv_prog_CPP
35886else
35887  ac_cv_prog_CPP=$CPP
35888fi
35889{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35890$as_echo "$CPP" >&6; }
35891ac_preproc_ok=false
35892for ac_c_preproc_warn_flag in '' yes
35893do
35894  # Use a header file that comes with gcc, so configuring glibc
35895  # with a fresh cross-compiler works.
35896  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35897  # <limits.h> exists even on freestanding compilers.
35898  # On the NeXT, cc -E runs the code through the compiler's parser,
35899  # not just through cpp. "Syntax error" is here to catch this case.
35900  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35901/* end confdefs.h.  */
35902#ifdef __STDC__
35903# include <limits.h>
35904#else
35905# include <assert.h>
35906#endif
35907		     Syntax error
35908_ACEOF
35909if ac_fn_c_try_cpp "$LINENO"; then :
35910
35911else
35912  # Broken: fails on valid input.
35913continue
35914fi
35915rm -f conftest.err conftest.i conftest.$ac_ext
35916
35917  # OK, works on sane cases.  Now check whether nonexistent headers
35918  # can be detected and how.
35919  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35920/* end confdefs.h.  */
35921#include <ac_nonexistent.h>
35922_ACEOF
35923if ac_fn_c_try_cpp "$LINENO"; then :
35924  # Broken: success on invalid input.
35925continue
35926else
35927  # Passes both tests.
35928ac_preproc_ok=:
35929break
35930fi
35931rm -f conftest.err conftest.i conftest.$ac_ext
35932
35933done
35934# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35935rm -f conftest.i conftest.err conftest.$ac_ext
35936if $ac_preproc_ok; then :
35937
35938else
35939  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35940$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35941as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35942See \`config.log' for more details" "$LINENO" 5; }
35943fi
35944
35945ac_ext=cpp
35946ac_cpp='$CXXCPP $CPPFLAGS'
35947ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35948ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35949ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35950
35951
35952  # Only process if variable expands to non-empty
35953
35954  if test "x$CPP" != x; then
35955    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35956
35957  # First separate the path from the arguments. This will split at the first
35958  # space.
35959  complete="$CPP"
35960  path="${complete%% *}"
35961  tmp="$complete EOL"
35962  arguments="${tmp#* }"
35963
35964  # Input might be given as Windows format, start by converting to
35965  # unix format.
35966  new_path=`$CYGPATH -u "$path"`
35967
35968  # Now try to locate executable using which
35969  new_path=`$WHICH "$new_path" 2> /dev/null`
35970  # bat and cmd files are not always considered executable in cygwin causing which
35971  # to not find them
35972  if test "x$new_path" = x \
35973      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35974      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35975    new_path=`$CYGPATH -u "$path"`
35976  fi
35977  if test "x$new_path" = x; then
35978    # Oops. Which didn't find the executable.
35979    # The splitting of arguments from the executable at a space might have been incorrect,
35980    # since paths with space are more likely in Windows. Give it another try with the whole
35981    # argument.
35982    path="$complete"
35983    arguments="EOL"
35984    new_path=`$CYGPATH -u "$path"`
35985    new_path=`$WHICH "$new_path" 2> /dev/null`
35986    # bat and cmd files are not always considered executable in cygwin causing which
35987    # to not find them
35988    if test "x$new_path" = x \
35989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35991      new_path=`$CYGPATH -u "$path"`
35992    fi
35993    if test "x$new_path" = x; then
35994      # It's still not found. Now this is an unrecoverable error.
35995      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35996$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35997      has_space=`$ECHO "$complete" | $GREP " "`
35998      if test "x$has_space" != x; then
35999        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36000$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36001      fi
36002      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36003    fi
36004  fi
36005
36006  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36007  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36008  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36009  # "foo.exe" is OK but "foo" is an error.
36010  #
36011  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36012  # It is also a way to make sure we got the proper file name for the real test later on.
36013  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36014  if test "x$test_shortpath" = x; then
36015    # Short path failed, file does not exist as specified.
36016    # Try adding .exe or .cmd
36017    if test -f "${new_path}.exe"; then
36018      input_to_shortpath="${new_path}.exe"
36019    elif test -f "${new_path}.cmd"; then
36020      input_to_shortpath="${new_path}.cmd"
36021    else
36022      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
36023$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
36024      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36025$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36026      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36027    fi
36028  else
36029    input_to_shortpath="$new_path"
36030  fi
36031
36032  # Call helper function which possibly converts this using DOS-style short mode.
36033  # If so, the updated path is stored in $new_path.
36034  new_path="$input_to_shortpath"
36035
36036  input_path="$input_to_shortpath"
36037  # Check if we need to convert this using DOS-style short mode. If the path
36038  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36039  # take no chances and rewrite it.
36040  # Note: m4 eats our [], so we need to use [ and ] instead.
36041  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36042  if test "x$has_forbidden_chars" != x; then
36043    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36044    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36045    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36046    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36047      # Going to short mode and back again did indeed matter. Since short mode is
36048      # case insensitive, let's make it lowercase to improve readability.
36049      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36050      # Now convert it back to Unix-style (cygpath)
36051      input_path=`$CYGPATH -u "$shortmode_path"`
36052      new_path="$input_path"
36053    fi
36054  fi
36055
36056  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36057  if test "x$test_cygdrive_prefix" = x; then
36058    # As a simple fix, exclude /usr/bin since it's not a real path.
36059    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36060      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36061      # a path prefixed by /cygdrive for fixpath to work.
36062      new_path="$CYGWIN_ROOT_PATH$input_path"
36063    fi
36064  fi
36065
36066  # remove trailing .exe if any
36067  new_path="${new_path/%.exe/}"
36068
36069    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36070
36071  # First separate the path from the arguments. This will split at the first
36072  # space.
36073  complete="$CPP"
36074  path="${complete%% *}"
36075  tmp="$complete EOL"
36076  arguments="${tmp#* }"
36077
36078  # Input might be given as Windows format, start by converting to
36079  # unix format.
36080  new_path="$path"
36081
36082  windows_path="$new_path"
36083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36084    unix_path=`$CYGPATH -u "$windows_path"`
36085    new_path="$unix_path"
36086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36088    new_path="$unix_path"
36089  fi
36090
36091
36092  # Now try to locate executable using which
36093  new_path=`$WHICH "$new_path" 2> /dev/null`
36094
36095  if test "x$new_path" = x; then
36096    # Oops. Which didn't find the executable.
36097    # The splitting of arguments from the executable at a space might have been incorrect,
36098    # since paths with space are more likely in Windows. Give it another try with the whole
36099    # argument.
36100    path="$complete"
36101    arguments="EOL"
36102    new_path="$path"
36103
36104  windows_path="$new_path"
36105  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36106    unix_path=`$CYGPATH -u "$windows_path"`
36107    new_path="$unix_path"
36108  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36109    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36110    new_path="$unix_path"
36111  fi
36112
36113
36114    new_path=`$WHICH "$new_path" 2> /dev/null`
36115    # bat and cmd files are not always considered executable in MSYS causing which
36116    # to not find them
36117    if test "x$new_path" = x \
36118        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36119        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36120      new_path="$path"
36121
36122  windows_path="$new_path"
36123  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36124    unix_path=`$CYGPATH -u "$windows_path"`
36125    new_path="$unix_path"
36126  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36127    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36128    new_path="$unix_path"
36129  fi
36130
36131    fi
36132
36133    if test "x$new_path" = x; then
36134      # It's still not found. Now this is an unrecoverable error.
36135      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36136$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36137      has_space=`$ECHO "$complete" | $GREP " "`
36138      if test "x$has_space" != x; then
36139        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36140$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36141      fi
36142      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36143    fi
36144  fi
36145
36146  # Now new_path has a complete unix path to the binary
36147  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36148    # Keep paths in /bin as-is, but remove trailing .exe if any
36149    new_path="${new_path/%.exe/}"
36150    # Do not save /bin paths to all_fixpath_prefixes!
36151  else
36152    # Not in mixed or Windows style, start by that.
36153    new_path=`cmd //c echo $new_path`
36154
36155  input_path="$new_path"
36156  # Check if we need to convert this using DOS-style short mode. If the path
36157  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36158  # take no chances and rewrite it.
36159  # Note: m4 eats our [], so we need to use [ and ] instead.
36160  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36161  if test "x$has_forbidden_chars" != x; then
36162    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36163    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36164  fi
36165
36166    # Output is in $new_path
36167
36168  windows_path="$new_path"
36169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36170    unix_path=`$CYGPATH -u "$windows_path"`
36171    new_path="$unix_path"
36172  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36173    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36174    new_path="$unix_path"
36175  fi
36176
36177    # remove trailing .exe if any
36178    new_path="${new_path/%.exe/}"
36179
36180    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36181    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36182  fi
36183
36184    else
36185      # We're on a unix platform. Hooray! :)
36186      # First separate the path from the arguments. This will split at the first
36187      # space.
36188      complete="$CPP"
36189      path="${complete%% *}"
36190      tmp="$complete EOL"
36191      arguments="${tmp#* }"
36192
36193      # Cannot rely on the command "which" here since it doesn't always work.
36194      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36195      if test -z "$is_absolute_path"; then
36196        # Path to executable is not absolute. Find it.
36197        IFS_save="$IFS"
36198        IFS=:
36199        for p in $PATH; do
36200          if test -f "$p/$path" && test -x "$p/$path"; then
36201            new_path="$p/$path"
36202            break
36203          fi
36204        done
36205        IFS="$IFS_save"
36206      else
36207        # This is an absolute path, we can use it without further modifications.
36208        new_path="$path"
36209      fi
36210
36211      if test "x$new_path" = x; then
36212        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
36213$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
36214        has_space=`$ECHO "$complete" | $GREP " "`
36215        if test "x$has_space" != x; then
36216          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36217$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36218        fi
36219        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
36220      fi
36221    fi
36222
36223    # Now join together the path and the arguments once again
36224    if test "x$arguments" != xEOL; then
36225      new_complete="$new_path ${arguments% *}"
36226    else
36227      new_complete="$new_path"
36228    fi
36229
36230    if test "x$complete" != "x$new_complete"; then
36231      CPP="$new_complete"
36232      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
36233$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
36234    fi
36235  fi
36236
36237  ac_ext=cpp
36238ac_cpp='$CXXCPP $CPPFLAGS'
36239ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36240ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36241ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
36243$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
36244if test -z "$CXXCPP"; then
36245  if ${ac_cv_prog_CXXCPP+:} false; then :
36246  $as_echo_n "(cached) " >&6
36247else
36248      # Double quotes because CXXCPP needs to be expanded
36249    for CXXCPP in "$CXX -E" "/lib/cpp"
36250    do
36251      ac_preproc_ok=false
36252for ac_cxx_preproc_warn_flag in '' yes
36253do
36254  # Use a header file that comes with gcc, so configuring glibc
36255  # with a fresh cross-compiler works.
36256  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36257  # <limits.h> exists even on freestanding compilers.
36258  # On the NeXT, cc -E runs the code through the compiler's parser,
36259  # not just through cpp. "Syntax error" is here to catch this case.
36260  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36261/* end confdefs.h.  */
36262#ifdef __STDC__
36263# include <limits.h>
36264#else
36265# include <assert.h>
36266#endif
36267		     Syntax error
36268_ACEOF
36269if ac_fn_cxx_try_cpp "$LINENO"; then :
36270
36271else
36272  # Broken: fails on valid input.
36273continue
36274fi
36275rm -f conftest.err conftest.i conftest.$ac_ext
36276
36277  # OK, works on sane cases.  Now check whether nonexistent headers
36278  # can be detected and how.
36279  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36280/* end confdefs.h.  */
36281#include <ac_nonexistent.h>
36282_ACEOF
36283if ac_fn_cxx_try_cpp "$LINENO"; then :
36284  # Broken: success on invalid input.
36285continue
36286else
36287  # Passes both tests.
36288ac_preproc_ok=:
36289break
36290fi
36291rm -f conftest.err conftest.i conftest.$ac_ext
36292
36293done
36294# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36295rm -f conftest.i conftest.err conftest.$ac_ext
36296if $ac_preproc_ok; then :
36297  break
36298fi
36299
36300    done
36301    ac_cv_prog_CXXCPP=$CXXCPP
36302
36303fi
36304  CXXCPP=$ac_cv_prog_CXXCPP
36305else
36306  ac_cv_prog_CXXCPP=$CXXCPP
36307fi
36308{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
36309$as_echo "$CXXCPP" >&6; }
36310ac_preproc_ok=false
36311for ac_cxx_preproc_warn_flag in '' yes
36312do
36313  # Use a header file that comes with gcc, so configuring glibc
36314  # with a fresh cross-compiler works.
36315  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
36316  # <limits.h> exists even on freestanding compilers.
36317  # On the NeXT, cc -E runs the code through the compiler's parser,
36318  # not just through cpp. "Syntax error" is here to catch this case.
36319  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36320/* end confdefs.h.  */
36321#ifdef __STDC__
36322# include <limits.h>
36323#else
36324# include <assert.h>
36325#endif
36326		     Syntax error
36327_ACEOF
36328if ac_fn_cxx_try_cpp "$LINENO"; then :
36329
36330else
36331  # Broken: fails on valid input.
36332continue
36333fi
36334rm -f conftest.err conftest.i conftest.$ac_ext
36335
36336  # OK, works on sane cases.  Now check whether nonexistent headers
36337  # can be detected and how.
36338  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
36339/* end confdefs.h.  */
36340#include <ac_nonexistent.h>
36341_ACEOF
36342if ac_fn_cxx_try_cpp "$LINENO"; then :
36343  # Broken: success on invalid input.
36344continue
36345else
36346  # Passes both tests.
36347ac_preproc_ok=:
36348break
36349fi
36350rm -f conftest.err conftest.i conftest.$ac_ext
36351
36352done
36353# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
36354rm -f conftest.i conftest.err conftest.$ac_ext
36355if $ac_preproc_ok; then :
36356
36357else
36358  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
36359$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
36360as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
36361See \`config.log' for more details" "$LINENO" 5; }
36362fi
36363
36364ac_ext=cpp
36365ac_cpp='$CXXCPP $CPPFLAGS'
36366ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
36367ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
36368ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
36369
36370
36371  # Only process if variable expands to non-empty
36372
36373  if test "x$CXXCPP" != x; then
36374    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36375
36376  # First separate the path from the arguments. This will split at the first
36377  # space.
36378  complete="$CXXCPP"
36379  path="${complete%% *}"
36380  tmp="$complete EOL"
36381  arguments="${tmp#* }"
36382
36383  # Input might be given as Windows format, start by converting to
36384  # unix format.
36385  new_path=`$CYGPATH -u "$path"`
36386
36387  # Now try to locate executable using which
36388  new_path=`$WHICH "$new_path" 2> /dev/null`
36389  # bat and cmd files are not always considered executable in cygwin causing which
36390  # to not find them
36391  if test "x$new_path" = x \
36392      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36393      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36394    new_path=`$CYGPATH -u "$path"`
36395  fi
36396  if test "x$new_path" = x; then
36397    # Oops. Which didn't find the executable.
36398    # The splitting of arguments from the executable at a space might have been incorrect,
36399    # since paths with space are more likely in Windows. Give it another try with the whole
36400    # argument.
36401    path="$complete"
36402    arguments="EOL"
36403    new_path=`$CYGPATH -u "$path"`
36404    new_path=`$WHICH "$new_path" 2> /dev/null`
36405    # bat and cmd files are not always considered executable in cygwin causing which
36406    # to not find them
36407    if test "x$new_path" = x \
36408        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36409        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36410      new_path=`$CYGPATH -u "$path"`
36411    fi
36412    if test "x$new_path" = x; then
36413      # It's still not found. Now this is an unrecoverable error.
36414      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36415$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36416      has_space=`$ECHO "$complete" | $GREP " "`
36417      if test "x$has_space" != x; then
36418        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36419$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36420      fi
36421      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36422    fi
36423  fi
36424
36425  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36426  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36427  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36428  # "foo.exe" is OK but "foo" is an error.
36429  #
36430  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36431  # It is also a way to make sure we got the proper file name for the real test later on.
36432  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36433  if test "x$test_shortpath" = x; then
36434    # Short path failed, file does not exist as specified.
36435    # Try adding .exe or .cmd
36436    if test -f "${new_path}.exe"; then
36437      input_to_shortpath="${new_path}.exe"
36438    elif test -f "${new_path}.cmd"; then
36439      input_to_shortpath="${new_path}.cmd"
36440    else
36441      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36442$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36443      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36444$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36445      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36446    fi
36447  else
36448    input_to_shortpath="$new_path"
36449  fi
36450
36451  # Call helper function which possibly converts this using DOS-style short mode.
36452  # If so, the updated path is stored in $new_path.
36453  new_path="$input_to_shortpath"
36454
36455  input_path="$input_to_shortpath"
36456  # Check if we need to convert this using DOS-style short mode. If the path
36457  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36458  # take no chances and rewrite it.
36459  # Note: m4 eats our [], so we need to use [ and ] instead.
36460  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36461  if test "x$has_forbidden_chars" != x; then
36462    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36463    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36464    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36465    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36466      # Going to short mode and back again did indeed matter. Since short mode is
36467      # case insensitive, let's make it lowercase to improve readability.
36468      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36469      # Now convert it back to Unix-style (cygpath)
36470      input_path=`$CYGPATH -u "$shortmode_path"`
36471      new_path="$input_path"
36472    fi
36473  fi
36474
36475  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36476  if test "x$test_cygdrive_prefix" = x; then
36477    # As a simple fix, exclude /usr/bin since it's not a real path.
36478    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36479      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36480      # a path prefixed by /cygdrive for fixpath to work.
36481      new_path="$CYGWIN_ROOT_PATH$input_path"
36482    fi
36483  fi
36484
36485  # remove trailing .exe if any
36486  new_path="${new_path/%.exe/}"
36487
36488    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36489
36490  # First separate the path from the arguments. This will split at the first
36491  # space.
36492  complete="$CXXCPP"
36493  path="${complete%% *}"
36494  tmp="$complete EOL"
36495  arguments="${tmp#* }"
36496
36497  # Input might be given as Windows format, start by converting to
36498  # unix format.
36499  new_path="$path"
36500
36501  windows_path="$new_path"
36502  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36503    unix_path=`$CYGPATH -u "$windows_path"`
36504    new_path="$unix_path"
36505  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36506    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36507    new_path="$unix_path"
36508  fi
36509
36510
36511  # Now try to locate executable using which
36512  new_path=`$WHICH "$new_path" 2> /dev/null`
36513
36514  if test "x$new_path" = x; then
36515    # Oops. Which didn't find the executable.
36516    # The splitting of arguments from the executable at a space might have been incorrect,
36517    # since paths with space are more likely in Windows. Give it another try with the whole
36518    # argument.
36519    path="$complete"
36520    arguments="EOL"
36521    new_path="$path"
36522
36523  windows_path="$new_path"
36524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36525    unix_path=`$CYGPATH -u "$windows_path"`
36526    new_path="$unix_path"
36527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36529    new_path="$unix_path"
36530  fi
36531
36532
36533    new_path=`$WHICH "$new_path" 2> /dev/null`
36534    # bat and cmd files are not always considered executable in MSYS causing which
36535    # to not find them
36536    if test "x$new_path" = x \
36537        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36538        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36539      new_path="$path"
36540
36541  windows_path="$new_path"
36542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36543    unix_path=`$CYGPATH -u "$windows_path"`
36544    new_path="$unix_path"
36545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36547    new_path="$unix_path"
36548  fi
36549
36550    fi
36551
36552    if test "x$new_path" = x; then
36553      # It's still not found. Now this is an unrecoverable error.
36554      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36555$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36556      has_space=`$ECHO "$complete" | $GREP " "`
36557      if test "x$has_space" != x; then
36558        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36559$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36560      fi
36561      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36562    fi
36563  fi
36564
36565  # Now new_path has a complete unix path to the binary
36566  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36567    # Keep paths in /bin as-is, but remove trailing .exe if any
36568    new_path="${new_path/%.exe/}"
36569    # Do not save /bin paths to all_fixpath_prefixes!
36570  else
36571    # Not in mixed or Windows style, start by that.
36572    new_path=`cmd //c echo $new_path`
36573
36574  input_path="$new_path"
36575  # Check if we need to convert this using DOS-style short mode. If the path
36576  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36577  # take no chances and rewrite it.
36578  # Note: m4 eats our [], so we need to use [ and ] instead.
36579  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36580  if test "x$has_forbidden_chars" != x; then
36581    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36582    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36583  fi
36584
36585    # Output is in $new_path
36586
36587  windows_path="$new_path"
36588  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36589    unix_path=`$CYGPATH -u "$windows_path"`
36590    new_path="$unix_path"
36591  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36592    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36593    new_path="$unix_path"
36594  fi
36595
36596    # remove trailing .exe if any
36597    new_path="${new_path/%.exe/}"
36598
36599    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36600    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36601  fi
36602
36603    else
36604      # We're on a unix platform. Hooray! :)
36605      # First separate the path from the arguments. This will split at the first
36606      # space.
36607      complete="$CXXCPP"
36608      path="${complete%% *}"
36609      tmp="$complete EOL"
36610      arguments="${tmp#* }"
36611
36612      # Cannot rely on the command "which" here since it doesn't always work.
36613      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36614      if test -z "$is_absolute_path"; then
36615        # Path to executable is not absolute. Find it.
36616        IFS_save="$IFS"
36617        IFS=:
36618        for p in $PATH; do
36619          if test -f "$p/$path" && test -x "$p/$path"; then
36620            new_path="$p/$path"
36621            break
36622          fi
36623        done
36624        IFS="$IFS_save"
36625      else
36626        # This is an absolute path, we can use it without further modifications.
36627        new_path="$path"
36628      fi
36629
36630      if test "x$new_path" = x; then
36631        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36632$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36633        has_space=`$ECHO "$complete" | $GREP " "`
36634        if test "x$has_space" != x; then
36635          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36636$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36637        fi
36638        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36639      fi
36640    fi
36641
36642    # Now join together the path and the arguments once again
36643    if test "x$arguments" != xEOL; then
36644      new_complete="$new_path ${arguments% *}"
36645    else
36646      new_complete="$new_path"
36647    fi
36648
36649    if test "x$complete" != "x$new_complete"; then
36650      CXXCPP="$new_complete"
36651      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36652$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36653    fi
36654  fi
36655
36656
36657  #
36658  # Setup the linker (LD)
36659  #
36660  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36661    # In the Microsoft toolchain we have a separate LD command "link".
36662    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36663    # a cygwin program for something completely different.
36664    # Extract the first word of "link", so it can be a program name with args.
36665set dummy link; ac_word=$2
36666{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36667$as_echo_n "checking for $ac_word... " >&6; }
36668if ${ac_cv_prog_LD+:} false; then :
36669  $as_echo_n "(cached) " >&6
36670else
36671  if test -n "$LD"; then
36672  ac_cv_prog_LD="$LD" # Let the user override the test.
36673else
36674  ac_prog_rejected=no
36675as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36676for as_dir in $PATH
36677do
36678  IFS=$as_save_IFS
36679  test -z "$as_dir" && as_dir=.
36680    for ac_exec_ext in '' $ac_executable_extensions; do
36681  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36682    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36683       ac_prog_rejected=yes
36684       continue
36685     fi
36686    ac_cv_prog_LD="link"
36687    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36688    break 2
36689  fi
36690done
36691  done
36692IFS=$as_save_IFS
36693
36694if test $ac_prog_rejected = yes; then
36695  # We found a bogon in the path, so make sure we never use it.
36696  set dummy $ac_cv_prog_LD
36697  shift
36698  if test $# != 0; then
36699    # We chose a different compiler from the bogus one.
36700    # However, it has the same basename, so the bogon will be chosen
36701    # first if we set LD to just the basename; use the full file name.
36702    shift
36703    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36704  fi
36705fi
36706fi
36707fi
36708LD=$ac_cv_prog_LD
36709if test -n "$LD"; then
36710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36711$as_echo "$LD" >&6; }
36712else
36713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36714$as_echo "no" >&6; }
36715fi
36716
36717
36718
36719  # Only process if variable expands to non-empty
36720
36721  if test "x$LD" != x; then
36722    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36723
36724  # First separate the path from the arguments. This will split at the first
36725  # space.
36726  complete="$LD"
36727  path="${complete%% *}"
36728  tmp="$complete EOL"
36729  arguments="${tmp#* }"
36730
36731  # Input might be given as Windows format, start by converting to
36732  # unix format.
36733  new_path=`$CYGPATH -u "$path"`
36734
36735  # Now try to locate executable using which
36736  new_path=`$WHICH "$new_path" 2> /dev/null`
36737  # bat and cmd files are not always considered executable in cygwin causing which
36738  # to not find them
36739  if test "x$new_path" = x \
36740      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36741      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36742    new_path=`$CYGPATH -u "$path"`
36743  fi
36744  if test "x$new_path" = x; then
36745    # Oops. Which didn't find the executable.
36746    # The splitting of arguments from the executable at a space might have been incorrect,
36747    # since paths with space are more likely in Windows. Give it another try with the whole
36748    # argument.
36749    path="$complete"
36750    arguments="EOL"
36751    new_path=`$CYGPATH -u "$path"`
36752    new_path=`$WHICH "$new_path" 2> /dev/null`
36753    # bat and cmd files are not always considered executable in cygwin causing which
36754    # to not find them
36755    if test "x$new_path" = x \
36756        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36757        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36758      new_path=`$CYGPATH -u "$path"`
36759    fi
36760    if test "x$new_path" = x; then
36761      # It's still not found. Now this is an unrecoverable error.
36762      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36763$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36764      has_space=`$ECHO "$complete" | $GREP " "`
36765      if test "x$has_space" != x; then
36766        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36767$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36768      fi
36769      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36770    fi
36771  fi
36772
36773  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36774  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36775  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36776  # "foo.exe" is OK but "foo" is an error.
36777  #
36778  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36779  # It is also a way to make sure we got the proper file name for the real test later on.
36780  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36781  if test "x$test_shortpath" = x; then
36782    # Short path failed, file does not exist as specified.
36783    # Try adding .exe or .cmd
36784    if test -f "${new_path}.exe"; then
36785      input_to_shortpath="${new_path}.exe"
36786    elif test -f "${new_path}.cmd"; then
36787      input_to_shortpath="${new_path}.cmd"
36788    else
36789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36790$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36791      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36792$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36793      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36794    fi
36795  else
36796    input_to_shortpath="$new_path"
36797  fi
36798
36799  # Call helper function which possibly converts this using DOS-style short mode.
36800  # If so, the updated path is stored in $new_path.
36801  new_path="$input_to_shortpath"
36802
36803  input_path="$input_to_shortpath"
36804  # Check if we need to convert this using DOS-style short mode. If the path
36805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36806  # take no chances and rewrite it.
36807  # Note: m4 eats our [], so we need to use [ and ] instead.
36808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36809  if test "x$has_forbidden_chars" != x; then
36810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36811    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36812    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36813    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36814      # Going to short mode and back again did indeed matter. Since short mode is
36815      # case insensitive, let's make it lowercase to improve readability.
36816      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36817      # Now convert it back to Unix-style (cygpath)
36818      input_path=`$CYGPATH -u "$shortmode_path"`
36819      new_path="$input_path"
36820    fi
36821  fi
36822
36823  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36824  if test "x$test_cygdrive_prefix" = x; then
36825    # As a simple fix, exclude /usr/bin since it's not a real path.
36826    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36827      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36828      # a path prefixed by /cygdrive for fixpath to work.
36829      new_path="$CYGWIN_ROOT_PATH$input_path"
36830    fi
36831  fi
36832
36833  # remove trailing .exe if any
36834  new_path="${new_path/%.exe/}"
36835
36836    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36837
36838  # First separate the path from the arguments. This will split at the first
36839  # space.
36840  complete="$LD"
36841  path="${complete%% *}"
36842  tmp="$complete EOL"
36843  arguments="${tmp#* }"
36844
36845  # Input might be given as Windows format, start by converting to
36846  # unix format.
36847  new_path="$path"
36848
36849  windows_path="$new_path"
36850  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36851    unix_path=`$CYGPATH -u "$windows_path"`
36852    new_path="$unix_path"
36853  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36854    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36855    new_path="$unix_path"
36856  fi
36857
36858
36859  # Now try to locate executable using which
36860  new_path=`$WHICH "$new_path" 2> /dev/null`
36861
36862  if test "x$new_path" = x; then
36863    # Oops. Which didn't find the executable.
36864    # The splitting of arguments from the executable at a space might have been incorrect,
36865    # since paths with space are more likely in Windows. Give it another try with the whole
36866    # argument.
36867    path="$complete"
36868    arguments="EOL"
36869    new_path="$path"
36870
36871  windows_path="$new_path"
36872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36873    unix_path=`$CYGPATH -u "$windows_path"`
36874    new_path="$unix_path"
36875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36876    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36877    new_path="$unix_path"
36878  fi
36879
36880
36881    new_path=`$WHICH "$new_path" 2> /dev/null`
36882    # bat and cmd files are not always considered executable in MSYS causing which
36883    # to not find them
36884    if test "x$new_path" = x \
36885        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36886        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36887      new_path="$path"
36888
36889  windows_path="$new_path"
36890  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36891    unix_path=`$CYGPATH -u "$windows_path"`
36892    new_path="$unix_path"
36893  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36894    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36895    new_path="$unix_path"
36896  fi
36897
36898    fi
36899
36900    if test "x$new_path" = x; then
36901      # It's still not found. Now this is an unrecoverable error.
36902      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36903$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36904      has_space=`$ECHO "$complete" | $GREP " "`
36905      if test "x$has_space" != x; then
36906        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36907$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36908      fi
36909      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36910    fi
36911  fi
36912
36913  # Now new_path has a complete unix path to the binary
36914  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36915    # Keep paths in /bin as-is, but remove trailing .exe if any
36916    new_path="${new_path/%.exe/}"
36917    # Do not save /bin paths to all_fixpath_prefixes!
36918  else
36919    # Not in mixed or Windows style, start by that.
36920    new_path=`cmd //c echo $new_path`
36921
36922  input_path="$new_path"
36923  # Check if we need to convert this using DOS-style short mode. If the path
36924  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36925  # take no chances and rewrite it.
36926  # Note: m4 eats our [], so we need to use [ and ] instead.
36927  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36928  if test "x$has_forbidden_chars" != x; then
36929    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36930    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36931  fi
36932
36933    # Output is in $new_path
36934
36935  windows_path="$new_path"
36936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36937    unix_path=`$CYGPATH -u "$windows_path"`
36938    new_path="$unix_path"
36939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36941    new_path="$unix_path"
36942  fi
36943
36944    # remove trailing .exe if any
36945    new_path="${new_path/%.exe/}"
36946
36947    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36948    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36949  fi
36950
36951    else
36952      # We're on a unix platform. Hooray! :)
36953      # First separate the path from the arguments. This will split at the first
36954      # space.
36955      complete="$LD"
36956      path="${complete%% *}"
36957      tmp="$complete EOL"
36958      arguments="${tmp#* }"
36959
36960      # Cannot rely on the command "which" here since it doesn't always work.
36961      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36962      if test -z "$is_absolute_path"; then
36963        # Path to executable is not absolute. Find it.
36964        IFS_save="$IFS"
36965        IFS=:
36966        for p in $PATH; do
36967          if test -f "$p/$path" && test -x "$p/$path"; then
36968            new_path="$p/$path"
36969            break
36970          fi
36971        done
36972        IFS="$IFS_save"
36973      else
36974        # This is an absolute path, we can use it without further modifications.
36975        new_path="$path"
36976      fi
36977
36978      if test "x$new_path" = x; then
36979        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36980$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36981        has_space=`$ECHO "$complete" | $GREP " "`
36982        if test "x$has_space" != x; then
36983          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36984$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36985        fi
36986        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36987      fi
36988    fi
36989
36990    # Now join together the path and the arguments once again
36991    if test "x$arguments" != xEOL; then
36992      new_complete="$new_path ${arguments% *}"
36993    else
36994      new_complete="$new_path"
36995    fi
36996
36997    if test "x$complete" != "x$new_complete"; then
36998      LD="$new_complete"
36999      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
37000$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
37001    fi
37002  fi
37003
37004    # Verify that we indeed succeeded with this trick.
37005    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
37006$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
37007    "$LD" --version > /dev/null
37008    if test $? -eq 0 ; then
37009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37010$as_echo "no" >&6; }
37011      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
37012    else
37013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
37014$as_echo "yes" >&6; }
37015    fi
37016    LDCXX="$LD"
37017  else
37018    # All other toolchains use the compiler to link.
37019    LD="$CC"
37020    LDCXX="$CXX"
37021  fi
37022
37023  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
37024
37025
37026  #
37027  # Setup the assembler (AS)
37028  #
37029  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
37030
37031
37032  # Publish this variable in the help.
37033
37034
37035  if [ -z "${AS+x}" ]; then
37036    # The variable is not set by user, try to locate tool using the code snippet
37037    for ac_prog in as
37038do
37039  # Extract the first word of "$ac_prog", so it can be a program name with args.
37040set dummy $ac_prog; ac_word=$2
37041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37042$as_echo_n "checking for $ac_word... " >&6; }
37043if ${ac_cv_path_AS+:} false; then :
37044  $as_echo_n "(cached) " >&6
37045else
37046  case $AS in
37047  [\\/]* | ?:[\\/]*)
37048  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37049  ;;
37050  *)
37051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37052for as_dir in $PATH
37053do
37054  IFS=$as_save_IFS
37055  test -z "$as_dir" && as_dir=.
37056    for ac_exec_ext in '' $ac_executable_extensions; do
37057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37058    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37060    break 2
37061  fi
37062done
37063  done
37064IFS=$as_save_IFS
37065
37066  ;;
37067esac
37068fi
37069AS=$ac_cv_path_AS
37070if test -n "$AS"; then
37071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37072$as_echo "$AS" >&6; }
37073else
37074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37075$as_echo "no" >&6; }
37076fi
37077
37078
37079  test -n "$AS" && break
37080done
37081
37082  else
37083    # The variable is set, but is it from the command line or the environment?
37084
37085    # Try to remove the string !AS! from our list.
37086    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
37087    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37088      # If it failed, the variable was not from the command line. Ignore it,
37089      # but warn the user (except for BASH, which is always set by the calling BASH).
37090      if test "xAS" != xBASH; then
37091        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
37092$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
37093      fi
37094      # Try to locate tool using the code snippet
37095      for ac_prog in as
37096do
37097  # Extract the first word of "$ac_prog", so it can be a program name with args.
37098set dummy $ac_prog; ac_word=$2
37099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37100$as_echo_n "checking for $ac_word... " >&6; }
37101if ${ac_cv_path_AS+:} false; then :
37102  $as_echo_n "(cached) " >&6
37103else
37104  case $AS in
37105  [\\/]* | ?:[\\/]*)
37106  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37107  ;;
37108  *)
37109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37110for as_dir in $PATH
37111do
37112  IFS=$as_save_IFS
37113  test -z "$as_dir" && as_dir=.
37114    for ac_exec_ext in '' $ac_executable_extensions; do
37115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37116    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37118    break 2
37119  fi
37120done
37121  done
37122IFS=$as_save_IFS
37123
37124  ;;
37125esac
37126fi
37127AS=$ac_cv_path_AS
37128if test -n "$AS"; then
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37130$as_echo "$AS" >&6; }
37131else
37132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37133$as_echo "no" >&6; }
37134fi
37135
37136
37137  test -n "$AS" && break
37138done
37139
37140    else
37141      # If it succeeded, then it was overridden by the user. We will use it
37142      # for the tool.
37143
37144      # First remove it from the list of overridden variables, so we can test
37145      # for unknown variables in the end.
37146      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37147
37148      # Check if we try to supply an empty value
37149      if test "x$AS" = x; then
37150        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
37151$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
37152        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37153$as_echo_n "checking for AS... " >&6; }
37154        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37155$as_echo "disabled" >&6; }
37156      else
37157        # Check if the provided tool contains a complete path.
37158        tool_specified="$AS"
37159        tool_basename="${tool_specified##*/}"
37160        if test "x$tool_basename" = "x$tool_specified"; then
37161          # A command without a complete path is provided, search $PATH.
37162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
37163$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
37164          # Extract the first word of "$tool_basename", so it can be a program name with args.
37165set dummy $tool_basename; ac_word=$2
37166{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37167$as_echo_n "checking for $ac_word... " >&6; }
37168if ${ac_cv_path_AS+:} false; then :
37169  $as_echo_n "(cached) " >&6
37170else
37171  case $AS in
37172  [\\/]* | ?:[\\/]*)
37173  ac_cv_path_AS="$AS" # Let the user override the test with a path.
37174  ;;
37175  *)
37176  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37177for as_dir in $PATH
37178do
37179  IFS=$as_save_IFS
37180  test -z "$as_dir" && as_dir=.
37181    for ac_exec_ext in '' $ac_executable_extensions; do
37182  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37183    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
37184    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37185    break 2
37186  fi
37187done
37188  done
37189IFS=$as_save_IFS
37190
37191  ;;
37192esac
37193fi
37194AS=$ac_cv_path_AS
37195if test -n "$AS"; then
37196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
37197$as_echo "$AS" >&6; }
37198else
37199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37200$as_echo "no" >&6; }
37201fi
37202
37203
37204          if test "x$AS" = x; then
37205            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37206          fi
37207        else
37208          # Otherwise we believe it is a complete path. Use it as it is.
37209          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
37210$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
37211          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
37212$as_echo_n "checking for AS... " >&6; }
37213          if test ! -x "$tool_specified"; then
37214            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37215$as_echo "not found" >&6; }
37216            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
37217          fi
37218          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37219$as_echo "$tool_specified" >&6; }
37220        fi
37221      fi
37222    fi
37223
37224  fi
37225
37226
37227
37228  # Only process if variable expands to non-empty
37229
37230  if test "x$AS" != x; then
37231    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37232
37233  # First separate the path from the arguments. This will split at the first
37234  # space.
37235  complete="$AS"
37236  path="${complete%% *}"
37237  tmp="$complete EOL"
37238  arguments="${tmp#* }"
37239
37240  # Input might be given as Windows format, start by converting to
37241  # unix format.
37242  new_path=`$CYGPATH -u "$path"`
37243
37244  # Now try to locate executable using which
37245  new_path=`$WHICH "$new_path" 2> /dev/null`
37246  # bat and cmd files are not always considered executable in cygwin causing which
37247  # to not find them
37248  if test "x$new_path" = x \
37249      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37250      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37251    new_path=`$CYGPATH -u "$path"`
37252  fi
37253  if test "x$new_path" = x; then
37254    # Oops. Which didn't find the executable.
37255    # The splitting of arguments from the executable at a space might have been incorrect,
37256    # since paths with space are more likely in Windows. Give it another try with the whole
37257    # argument.
37258    path="$complete"
37259    arguments="EOL"
37260    new_path=`$CYGPATH -u "$path"`
37261    new_path=`$WHICH "$new_path" 2> /dev/null`
37262    # bat and cmd files are not always considered executable in cygwin causing which
37263    # to not find them
37264    if test "x$new_path" = x \
37265        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37266        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37267      new_path=`$CYGPATH -u "$path"`
37268    fi
37269    if test "x$new_path" = x; then
37270      # It's still not found. Now this is an unrecoverable error.
37271      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37272$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37273      has_space=`$ECHO "$complete" | $GREP " "`
37274      if test "x$has_space" != x; then
37275        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37276$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37277      fi
37278      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37279    fi
37280  fi
37281
37282  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37283  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37284  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37285  # "foo.exe" is OK but "foo" is an error.
37286  #
37287  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37288  # It is also a way to make sure we got the proper file name for the real test later on.
37289  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37290  if test "x$test_shortpath" = x; then
37291    # Short path failed, file does not exist as specified.
37292    # Try adding .exe or .cmd
37293    if test -f "${new_path}.exe"; then
37294      input_to_shortpath="${new_path}.exe"
37295    elif test -f "${new_path}.cmd"; then
37296      input_to_shortpath="${new_path}.cmd"
37297    else
37298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
37299$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
37300      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37301$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37302      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37303    fi
37304  else
37305    input_to_shortpath="$new_path"
37306  fi
37307
37308  # Call helper function which possibly converts this using DOS-style short mode.
37309  # If so, the updated path is stored in $new_path.
37310  new_path="$input_to_shortpath"
37311
37312  input_path="$input_to_shortpath"
37313  # Check if we need to convert this using DOS-style short mode. If the path
37314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37315  # take no chances and rewrite it.
37316  # Note: m4 eats our [], so we need to use [ and ] instead.
37317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37318  if test "x$has_forbidden_chars" != x; then
37319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37320    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37321    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37322    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37323      # Going to short mode and back again did indeed matter. Since short mode is
37324      # case insensitive, let's make it lowercase to improve readability.
37325      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37326      # Now convert it back to Unix-style (cygpath)
37327      input_path=`$CYGPATH -u "$shortmode_path"`
37328      new_path="$input_path"
37329    fi
37330  fi
37331
37332  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37333  if test "x$test_cygdrive_prefix" = x; then
37334    # As a simple fix, exclude /usr/bin since it's not a real path.
37335    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37336      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37337      # a path prefixed by /cygdrive for fixpath to work.
37338      new_path="$CYGWIN_ROOT_PATH$input_path"
37339    fi
37340  fi
37341
37342  # remove trailing .exe if any
37343  new_path="${new_path/%.exe/}"
37344
37345    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37346
37347  # First separate the path from the arguments. This will split at the first
37348  # space.
37349  complete="$AS"
37350  path="${complete%% *}"
37351  tmp="$complete EOL"
37352  arguments="${tmp#* }"
37353
37354  # Input might be given as Windows format, start by converting to
37355  # unix format.
37356  new_path="$path"
37357
37358  windows_path="$new_path"
37359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37360    unix_path=`$CYGPATH -u "$windows_path"`
37361    new_path="$unix_path"
37362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37364    new_path="$unix_path"
37365  fi
37366
37367
37368  # Now try to locate executable using which
37369  new_path=`$WHICH "$new_path" 2> /dev/null`
37370
37371  if test "x$new_path" = x; then
37372    # Oops. Which didn't find the executable.
37373    # The splitting of arguments from the executable at a space might have been incorrect,
37374    # since paths with space are more likely in Windows. Give it another try with the whole
37375    # argument.
37376    path="$complete"
37377    arguments="EOL"
37378    new_path="$path"
37379
37380  windows_path="$new_path"
37381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37382    unix_path=`$CYGPATH -u "$windows_path"`
37383    new_path="$unix_path"
37384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37386    new_path="$unix_path"
37387  fi
37388
37389
37390    new_path=`$WHICH "$new_path" 2> /dev/null`
37391    # bat and cmd files are not always considered executable in MSYS causing which
37392    # to not find them
37393    if test "x$new_path" = x \
37394        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37395        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37396      new_path="$path"
37397
37398  windows_path="$new_path"
37399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37400    unix_path=`$CYGPATH -u "$windows_path"`
37401    new_path="$unix_path"
37402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37404    new_path="$unix_path"
37405  fi
37406
37407    fi
37408
37409    if test "x$new_path" = x; then
37410      # It's still not found. Now this is an unrecoverable error.
37411      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37412$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37413      has_space=`$ECHO "$complete" | $GREP " "`
37414      if test "x$has_space" != x; then
37415        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37416$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37417      fi
37418      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37419    fi
37420  fi
37421
37422  # Now new_path has a complete unix path to the binary
37423  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37424    # Keep paths in /bin as-is, but remove trailing .exe if any
37425    new_path="${new_path/%.exe/}"
37426    # Do not save /bin paths to all_fixpath_prefixes!
37427  else
37428    # Not in mixed or Windows style, start by that.
37429    new_path=`cmd //c echo $new_path`
37430
37431  input_path="$new_path"
37432  # Check if we need to convert this using DOS-style short mode. If the path
37433  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37434  # take no chances and rewrite it.
37435  # Note: m4 eats our [], so we need to use [ and ] instead.
37436  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37437  if test "x$has_forbidden_chars" != x; then
37438    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37439    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37440  fi
37441
37442    # Output is in $new_path
37443
37444  windows_path="$new_path"
37445  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37446    unix_path=`$CYGPATH -u "$windows_path"`
37447    new_path="$unix_path"
37448  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37449    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37450    new_path="$unix_path"
37451  fi
37452
37453    # remove trailing .exe if any
37454    new_path="${new_path/%.exe/}"
37455
37456    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37457    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37458  fi
37459
37460    else
37461      # We're on a unix platform. Hooray! :)
37462      # First separate the path from the arguments. This will split at the first
37463      # space.
37464      complete="$AS"
37465      path="${complete%% *}"
37466      tmp="$complete EOL"
37467      arguments="${tmp#* }"
37468
37469      # Cannot rely on the command "which" here since it doesn't always work.
37470      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37471      if test -z "$is_absolute_path"; then
37472        # Path to executable is not absolute. Find it.
37473        IFS_save="$IFS"
37474        IFS=:
37475        for p in $PATH; do
37476          if test -f "$p/$path" && test -x "$p/$path"; then
37477            new_path="$p/$path"
37478            break
37479          fi
37480        done
37481        IFS="$IFS_save"
37482      else
37483        # This is an absolute path, we can use it without further modifications.
37484        new_path="$path"
37485      fi
37486
37487      if test "x$new_path" = x; then
37488        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37489$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37490        has_space=`$ECHO "$complete" | $GREP " "`
37491        if test "x$has_space" != x; then
37492          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37493$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37494        fi
37495        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37496      fi
37497    fi
37498
37499    # Now join together the path and the arguments once again
37500    if test "x$arguments" != xEOL; then
37501      new_complete="$new_path ${arguments% *}"
37502    else
37503      new_complete="$new_path"
37504    fi
37505
37506    if test "x$complete" != "x$new_complete"; then
37507      AS="$new_complete"
37508      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37509$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37510    fi
37511  fi
37512
37513    if test "x$AS" = x; then
37514      as_fn_error $? "Solaris assembler (as) is required. Please install via \"pkg install pkg:/developer/assembler\"." "$LINENO" 5
37515    fi
37516  else
37517    # FIXME: is this correct for microsoft?
37518    AS="$CC -c"
37519  fi
37520
37521
37522  #
37523  # Setup the archiver (AR)
37524  #
37525  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37526    # The corresponding ar tool is lib.exe (used to create static libraries)
37527    # Extract the first word of "lib", so it can be a program name with args.
37528set dummy lib; ac_word=$2
37529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37530$as_echo_n "checking for $ac_word... " >&6; }
37531if ${ac_cv_prog_AR+:} false; then :
37532  $as_echo_n "(cached) " >&6
37533else
37534  if test -n "$AR"; then
37535  ac_cv_prog_AR="$AR" # Let the user override the test.
37536else
37537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37538for as_dir in $PATH
37539do
37540  IFS=$as_save_IFS
37541  test -z "$as_dir" && as_dir=.
37542    for ac_exec_ext in '' $ac_executable_extensions; do
37543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37544    ac_cv_prog_AR="lib"
37545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37546    break 2
37547  fi
37548done
37549  done
37550IFS=$as_save_IFS
37551
37552fi
37553fi
37554AR=$ac_cv_prog_AR
37555if test -n "$AR"; then
37556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37557$as_echo "$AR" >&6; }
37558else
37559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37560$as_echo "no" >&6; }
37561fi
37562
37563
37564  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37565
37566
37567  # Publish this variable in the help.
37568
37569
37570  if [ -z "${AR+x}" ]; then
37571    # The variable is not set by user, try to locate tool using the code snippet
37572    if test -n "$ac_tool_prefix"; then
37573  for ac_prog in ar gcc-ar
37574  do
37575    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37576set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37578$as_echo_n "checking for $ac_word... " >&6; }
37579if ${ac_cv_prog_AR+:} false; then :
37580  $as_echo_n "(cached) " >&6
37581else
37582  if test -n "$AR"; then
37583  ac_cv_prog_AR="$AR" # Let the user override the test.
37584else
37585as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37586for as_dir in $PATH
37587do
37588  IFS=$as_save_IFS
37589  test -z "$as_dir" && as_dir=.
37590    for ac_exec_ext in '' $ac_executable_extensions; do
37591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37592    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37594    break 2
37595  fi
37596done
37597  done
37598IFS=$as_save_IFS
37599
37600fi
37601fi
37602AR=$ac_cv_prog_AR
37603if test -n "$AR"; then
37604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37605$as_echo "$AR" >&6; }
37606else
37607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37608$as_echo "no" >&6; }
37609fi
37610
37611
37612    test -n "$AR" && break
37613  done
37614fi
37615if test -z "$AR"; then
37616  ac_ct_AR=$AR
37617  for ac_prog in ar gcc-ar
37618do
37619  # Extract the first word of "$ac_prog", so it can be a program name with args.
37620set dummy $ac_prog; ac_word=$2
37621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37622$as_echo_n "checking for $ac_word... " >&6; }
37623if ${ac_cv_prog_ac_ct_AR+:} false; then :
37624  $as_echo_n "(cached) " >&6
37625else
37626  if test -n "$ac_ct_AR"; then
37627  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37628else
37629as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37630for as_dir in $PATH
37631do
37632  IFS=$as_save_IFS
37633  test -z "$as_dir" && as_dir=.
37634    for ac_exec_ext in '' $ac_executable_extensions; do
37635  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37636    ac_cv_prog_ac_ct_AR="$ac_prog"
37637    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37638    break 2
37639  fi
37640done
37641  done
37642IFS=$as_save_IFS
37643
37644fi
37645fi
37646ac_ct_AR=$ac_cv_prog_ac_ct_AR
37647if test -n "$ac_ct_AR"; then
37648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37649$as_echo "$ac_ct_AR" >&6; }
37650else
37651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37652$as_echo "no" >&6; }
37653fi
37654
37655
37656  test -n "$ac_ct_AR" && break
37657done
37658
37659  if test "x$ac_ct_AR" = x; then
37660    AR=""
37661  else
37662    case $cross_compiling:$ac_tool_warned in
37663yes:)
37664{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37665$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37666ac_tool_warned=yes ;;
37667esac
37668    AR=$ac_ct_AR
37669  fi
37670fi
37671
37672  else
37673    # The variable is set, but is it from the command line or the environment?
37674
37675    # Try to remove the string !AR! from our list.
37676    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37677    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37678      # If it failed, the variable was not from the command line. Ignore it,
37679      # but warn the user (except for BASH, which is always set by the calling BASH).
37680      if test "xAR" != xBASH; then
37681        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37682$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37683      fi
37684      # Try to locate tool using the code snippet
37685      if test -n "$ac_tool_prefix"; then
37686  for ac_prog in ar gcc-ar
37687  do
37688    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37689set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37690{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37691$as_echo_n "checking for $ac_word... " >&6; }
37692if ${ac_cv_prog_AR+:} false; then :
37693  $as_echo_n "(cached) " >&6
37694else
37695  if test -n "$AR"; then
37696  ac_cv_prog_AR="$AR" # Let the user override the test.
37697else
37698as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37699for as_dir in $PATH
37700do
37701  IFS=$as_save_IFS
37702  test -z "$as_dir" && as_dir=.
37703    for ac_exec_ext in '' $ac_executable_extensions; do
37704  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37705    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37706    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37707    break 2
37708  fi
37709done
37710  done
37711IFS=$as_save_IFS
37712
37713fi
37714fi
37715AR=$ac_cv_prog_AR
37716if test -n "$AR"; then
37717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37718$as_echo "$AR" >&6; }
37719else
37720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37721$as_echo "no" >&6; }
37722fi
37723
37724
37725    test -n "$AR" && break
37726  done
37727fi
37728if test -z "$AR"; then
37729  ac_ct_AR=$AR
37730  for ac_prog in ar gcc-ar
37731do
37732  # Extract the first word of "$ac_prog", so it can be a program name with args.
37733set dummy $ac_prog; ac_word=$2
37734{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37735$as_echo_n "checking for $ac_word... " >&6; }
37736if ${ac_cv_prog_ac_ct_AR+:} false; then :
37737  $as_echo_n "(cached) " >&6
37738else
37739  if test -n "$ac_ct_AR"; then
37740  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37741else
37742as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37743for as_dir in $PATH
37744do
37745  IFS=$as_save_IFS
37746  test -z "$as_dir" && as_dir=.
37747    for ac_exec_ext in '' $ac_executable_extensions; do
37748  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37749    ac_cv_prog_ac_ct_AR="$ac_prog"
37750    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37751    break 2
37752  fi
37753done
37754  done
37755IFS=$as_save_IFS
37756
37757fi
37758fi
37759ac_ct_AR=$ac_cv_prog_ac_ct_AR
37760if test -n "$ac_ct_AR"; then
37761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37762$as_echo "$ac_ct_AR" >&6; }
37763else
37764  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37765$as_echo "no" >&6; }
37766fi
37767
37768
37769  test -n "$ac_ct_AR" && break
37770done
37771
37772  if test "x$ac_ct_AR" = x; then
37773    AR=""
37774  else
37775    case $cross_compiling:$ac_tool_warned in
37776yes:)
37777{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37778$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37779ac_tool_warned=yes ;;
37780esac
37781    AR=$ac_ct_AR
37782  fi
37783fi
37784
37785    else
37786      # If it succeeded, then it was overridden by the user. We will use it
37787      # for the tool.
37788
37789      # First remove it from the list of overridden variables, so we can test
37790      # for unknown variables in the end.
37791      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37792
37793      # Check if we try to supply an empty value
37794      if test "x$AR" = x; then
37795        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37796$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37797        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37798$as_echo_n "checking for AR... " >&6; }
37799        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37800$as_echo "disabled" >&6; }
37801      else
37802        # Check if the provided tool contains a complete path.
37803        tool_specified="$AR"
37804        tool_basename="${tool_specified##*/}"
37805        if test "x$tool_basename" = "x$tool_specified"; then
37806          # A command without a complete path is provided, search $PATH.
37807          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37808$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37809          # Extract the first word of "$tool_basename", so it can be a program name with args.
37810set dummy $tool_basename; ac_word=$2
37811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37812$as_echo_n "checking for $ac_word... " >&6; }
37813if ${ac_cv_path_AR+:} false; then :
37814  $as_echo_n "(cached) " >&6
37815else
37816  case $AR in
37817  [\\/]* | ?:[\\/]*)
37818  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37819  ;;
37820  *)
37821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37822for as_dir in $PATH
37823do
37824  IFS=$as_save_IFS
37825  test -z "$as_dir" && as_dir=.
37826    for ac_exec_ext in '' $ac_executable_extensions; do
37827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37828    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37830    break 2
37831  fi
37832done
37833  done
37834IFS=$as_save_IFS
37835
37836  ;;
37837esac
37838fi
37839AR=$ac_cv_path_AR
37840if test -n "$AR"; then
37841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37842$as_echo "$AR" >&6; }
37843else
37844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37845$as_echo "no" >&6; }
37846fi
37847
37848
37849          if test "x$AR" = x; then
37850            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37851          fi
37852        else
37853          # Otherwise we believe it is a complete path. Use it as it is.
37854          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37855$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37856          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37857$as_echo_n "checking for AR... " >&6; }
37858          if test ! -x "$tool_specified"; then
37859            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37860$as_echo "not found" >&6; }
37861            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37862          fi
37863          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37864$as_echo "$tool_specified" >&6; }
37865        fi
37866      fi
37867    fi
37868
37869  fi
37870
37871
37872  else
37873
37874
37875  # Publish this variable in the help.
37876
37877
37878  if [ -z "${AR+x}" ]; then
37879    # The variable is not set by user, try to locate tool using the code snippet
37880    if test -n "$ac_tool_prefix"; then
37881  for ac_prog in ar
37882  do
37883    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37884set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37885{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37886$as_echo_n "checking for $ac_word... " >&6; }
37887if ${ac_cv_prog_AR+:} false; then :
37888  $as_echo_n "(cached) " >&6
37889else
37890  if test -n "$AR"; then
37891  ac_cv_prog_AR="$AR" # Let the user override the test.
37892else
37893as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37894for as_dir in $PATH
37895do
37896  IFS=$as_save_IFS
37897  test -z "$as_dir" && as_dir=.
37898    for ac_exec_ext in '' $ac_executable_extensions; do
37899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37900    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37902    break 2
37903  fi
37904done
37905  done
37906IFS=$as_save_IFS
37907
37908fi
37909fi
37910AR=$ac_cv_prog_AR
37911if test -n "$AR"; then
37912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37913$as_echo "$AR" >&6; }
37914else
37915  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37916$as_echo "no" >&6; }
37917fi
37918
37919
37920    test -n "$AR" && break
37921  done
37922fi
37923if test -z "$AR"; then
37924  ac_ct_AR=$AR
37925  for ac_prog in ar
37926do
37927  # Extract the first word of "$ac_prog", so it can be a program name with args.
37928set dummy $ac_prog; ac_word=$2
37929{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37930$as_echo_n "checking for $ac_word... " >&6; }
37931if ${ac_cv_prog_ac_ct_AR+:} false; then :
37932  $as_echo_n "(cached) " >&6
37933else
37934  if test -n "$ac_ct_AR"; then
37935  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37936else
37937as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37938for as_dir in $PATH
37939do
37940  IFS=$as_save_IFS
37941  test -z "$as_dir" && as_dir=.
37942    for ac_exec_ext in '' $ac_executable_extensions; do
37943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37944    ac_cv_prog_ac_ct_AR="$ac_prog"
37945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37946    break 2
37947  fi
37948done
37949  done
37950IFS=$as_save_IFS
37951
37952fi
37953fi
37954ac_ct_AR=$ac_cv_prog_ac_ct_AR
37955if test -n "$ac_ct_AR"; then
37956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37957$as_echo "$ac_ct_AR" >&6; }
37958else
37959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37960$as_echo "no" >&6; }
37961fi
37962
37963
37964  test -n "$ac_ct_AR" && break
37965done
37966
37967  if test "x$ac_ct_AR" = x; then
37968    AR=""
37969  else
37970    case $cross_compiling:$ac_tool_warned in
37971yes:)
37972{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37973$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37974ac_tool_warned=yes ;;
37975esac
37976    AR=$ac_ct_AR
37977  fi
37978fi
37979
37980  else
37981    # The variable is set, but is it from the command line or the environment?
37982
37983    # Try to remove the string !AR! from our list.
37984    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37985    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37986      # If it failed, the variable was not from the command line. Ignore it,
37987      # but warn the user (except for BASH, which is always set by the calling BASH).
37988      if test "xAR" != xBASH; then
37989        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37990$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37991      fi
37992      # Try to locate tool using the code snippet
37993      if test -n "$ac_tool_prefix"; then
37994  for ac_prog in ar
37995  do
37996    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37997set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37998{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37999$as_echo_n "checking for $ac_word... " >&6; }
38000if ${ac_cv_prog_AR+:} false; then :
38001  $as_echo_n "(cached) " >&6
38002else
38003  if test -n "$AR"; then
38004  ac_cv_prog_AR="$AR" # Let the user override the test.
38005else
38006as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38007for as_dir in $PATH
38008do
38009  IFS=$as_save_IFS
38010  test -z "$as_dir" && as_dir=.
38011    for ac_exec_ext in '' $ac_executable_extensions; do
38012  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38013    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
38014    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38015    break 2
38016  fi
38017done
38018  done
38019IFS=$as_save_IFS
38020
38021fi
38022fi
38023AR=$ac_cv_prog_AR
38024if test -n "$AR"; then
38025  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38026$as_echo "$AR" >&6; }
38027else
38028  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38029$as_echo "no" >&6; }
38030fi
38031
38032
38033    test -n "$AR" && break
38034  done
38035fi
38036if test -z "$AR"; then
38037  ac_ct_AR=$AR
38038  for ac_prog in ar
38039do
38040  # Extract the first word of "$ac_prog", so it can be a program name with args.
38041set dummy $ac_prog; ac_word=$2
38042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38043$as_echo_n "checking for $ac_word... " >&6; }
38044if ${ac_cv_prog_ac_ct_AR+:} false; then :
38045  $as_echo_n "(cached) " >&6
38046else
38047  if test -n "$ac_ct_AR"; then
38048  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
38049else
38050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38051for as_dir in $PATH
38052do
38053  IFS=$as_save_IFS
38054  test -z "$as_dir" && as_dir=.
38055    for ac_exec_ext in '' $ac_executable_extensions; do
38056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38057    ac_cv_prog_ac_ct_AR="$ac_prog"
38058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38059    break 2
38060  fi
38061done
38062  done
38063IFS=$as_save_IFS
38064
38065fi
38066fi
38067ac_ct_AR=$ac_cv_prog_ac_ct_AR
38068if test -n "$ac_ct_AR"; then
38069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
38070$as_echo "$ac_ct_AR" >&6; }
38071else
38072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38073$as_echo "no" >&6; }
38074fi
38075
38076
38077  test -n "$ac_ct_AR" && break
38078done
38079
38080  if test "x$ac_ct_AR" = x; then
38081    AR=""
38082  else
38083    case $cross_compiling:$ac_tool_warned in
38084yes:)
38085{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
38086$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
38087ac_tool_warned=yes ;;
38088esac
38089    AR=$ac_ct_AR
38090  fi
38091fi
38092
38093    else
38094      # If it succeeded, then it was overridden by the user. We will use it
38095      # for the tool.
38096
38097      # First remove it from the list of overridden variables, so we can test
38098      # for unknown variables in the end.
38099      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38100
38101      # Check if we try to supply an empty value
38102      if test "x$AR" = x; then
38103        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
38104$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
38105        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38106$as_echo_n "checking for AR... " >&6; }
38107        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38108$as_echo "disabled" >&6; }
38109      else
38110        # Check if the provided tool contains a complete path.
38111        tool_specified="$AR"
38112        tool_basename="${tool_specified##*/}"
38113        if test "x$tool_basename" = "x$tool_specified"; then
38114          # A command without a complete path is provided, search $PATH.
38115          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
38116$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
38117          # Extract the first word of "$tool_basename", so it can be a program name with args.
38118set dummy $tool_basename; ac_word=$2
38119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38120$as_echo_n "checking for $ac_word... " >&6; }
38121if ${ac_cv_path_AR+:} false; then :
38122  $as_echo_n "(cached) " >&6
38123else
38124  case $AR in
38125  [\\/]* | ?:[\\/]*)
38126  ac_cv_path_AR="$AR" # Let the user override the test with a path.
38127  ;;
38128  *)
38129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38130for as_dir in $PATH
38131do
38132  IFS=$as_save_IFS
38133  test -z "$as_dir" && as_dir=.
38134    for ac_exec_ext in '' $ac_executable_extensions; do
38135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38136    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
38137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38138    break 2
38139  fi
38140done
38141  done
38142IFS=$as_save_IFS
38143
38144  ;;
38145esac
38146fi
38147AR=$ac_cv_path_AR
38148if test -n "$AR"; then
38149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
38150$as_echo "$AR" >&6; }
38151else
38152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38153$as_echo "no" >&6; }
38154fi
38155
38156
38157          if test "x$AR" = x; then
38158            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38159          fi
38160        else
38161          # Otherwise we believe it is a complete path. Use it as it is.
38162          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
38163$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
38164          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
38165$as_echo_n "checking for AR... " >&6; }
38166          if test ! -x "$tool_specified"; then
38167            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38168$as_echo "not found" >&6; }
38169            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
38170          fi
38171          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38172$as_echo "$tool_specified" >&6; }
38173        fi
38174      fi
38175    fi
38176
38177  fi
38178
38179
38180  fi
38181
38182  # Only process if variable expands to non-empty
38183
38184  if test "x$AR" != x; then
38185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38186
38187  # First separate the path from the arguments. This will split at the first
38188  # space.
38189  complete="$AR"
38190  path="${complete%% *}"
38191  tmp="$complete EOL"
38192  arguments="${tmp#* }"
38193
38194  # Input might be given as Windows format, start by converting to
38195  # unix format.
38196  new_path=`$CYGPATH -u "$path"`
38197
38198  # Now try to locate executable using which
38199  new_path=`$WHICH "$new_path" 2> /dev/null`
38200  # bat and cmd files are not always considered executable in cygwin causing which
38201  # to not find them
38202  if test "x$new_path" = x \
38203      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38204      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38205    new_path=`$CYGPATH -u "$path"`
38206  fi
38207  if test "x$new_path" = x; then
38208    # Oops. Which didn't find the executable.
38209    # The splitting of arguments from the executable at a space might have been incorrect,
38210    # since paths with space are more likely in Windows. Give it another try with the whole
38211    # argument.
38212    path="$complete"
38213    arguments="EOL"
38214    new_path=`$CYGPATH -u "$path"`
38215    new_path=`$WHICH "$new_path" 2> /dev/null`
38216    # bat and cmd files are not always considered executable in cygwin causing which
38217    # to not find them
38218    if test "x$new_path" = x \
38219        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38220        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38221      new_path=`$CYGPATH -u "$path"`
38222    fi
38223    if test "x$new_path" = x; then
38224      # It's still not found. Now this is an unrecoverable error.
38225      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38226$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38227      has_space=`$ECHO "$complete" | $GREP " "`
38228      if test "x$has_space" != x; then
38229        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38230$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38231      fi
38232      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38233    fi
38234  fi
38235
38236  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38237  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38238  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38239  # "foo.exe" is OK but "foo" is an error.
38240  #
38241  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38242  # It is also a way to make sure we got the proper file name for the real test later on.
38243  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38244  if test "x$test_shortpath" = x; then
38245    # Short path failed, file does not exist as specified.
38246    # Try adding .exe or .cmd
38247    if test -f "${new_path}.exe"; then
38248      input_to_shortpath="${new_path}.exe"
38249    elif test -f "${new_path}.cmd"; then
38250      input_to_shortpath="${new_path}.cmd"
38251    else
38252      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
38253$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
38254      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38255$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38256      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38257    fi
38258  else
38259    input_to_shortpath="$new_path"
38260  fi
38261
38262  # Call helper function which possibly converts this using DOS-style short mode.
38263  # If so, the updated path is stored in $new_path.
38264  new_path="$input_to_shortpath"
38265
38266  input_path="$input_to_shortpath"
38267  # Check if we need to convert this using DOS-style short mode. If the path
38268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38269  # take no chances and rewrite it.
38270  # Note: m4 eats our [], so we need to use [ and ] instead.
38271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38272  if test "x$has_forbidden_chars" != x; then
38273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38274    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38275    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38276    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38277      # Going to short mode and back again did indeed matter. Since short mode is
38278      # case insensitive, let's make it lowercase to improve readability.
38279      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38280      # Now convert it back to Unix-style (cygpath)
38281      input_path=`$CYGPATH -u "$shortmode_path"`
38282      new_path="$input_path"
38283    fi
38284  fi
38285
38286  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38287  if test "x$test_cygdrive_prefix" = x; then
38288    # As a simple fix, exclude /usr/bin since it's not a real path.
38289    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38290      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38291      # a path prefixed by /cygdrive for fixpath to work.
38292      new_path="$CYGWIN_ROOT_PATH$input_path"
38293    fi
38294  fi
38295
38296  # remove trailing .exe if any
38297  new_path="${new_path/%.exe/}"
38298
38299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38300
38301  # First separate the path from the arguments. This will split at the first
38302  # space.
38303  complete="$AR"
38304  path="${complete%% *}"
38305  tmp="$complete EOL"
38306  arguments="${tmp#* }"
38307
38308  # Input might be given as Windows format, start by converting to
38309  # unix format.
38310  new_path="$path"
38311
38312  windows_path="$new_path"
38313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38314    unix_path=`$CYGPATH -u "$windows_path"`
38315    new_path="$unix_path"
38316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38318    new_path="$unix_path"
38319  fi
38320
38321
38322  # Now try to locate executable using which
38323  new_path=`$WHICH "$new_path" 2> /dev/null`
38324
38325  if test "x$new_path" = x; then
38326    # Oops. Which didn't find the executable.
38327    # The splitting of arguments from the executable at a space might have been incorrect,
38328    # since paths with space are more likely in Windows. Give it another try with the whole
38329    # argument.
38330    path="$complete"
38331    arguments="EOL"
38332    new_path="$path"
38333
38334  windows_path="$new_path"
38335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38336    unix_path=`$CYGPATH -u "$windows_path"`
38337    new_path="$unix_path"
38338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38340    new_path="$unix_path"
38341  fi
38342
38343
38344    new_path=`$WHICH "$new_path" 2> /dev/null`
38345    # bat and cmd files are not always considered executable in MSYS causing which
38346    # to not find them
38347    if test "x$new_path" = x \
38348        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38349        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38350      new_path="$path"
38351
38352  windows_path="$new_path"
38353  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38354    unix_path=`$CYGPATH -u "$windows_path"`
38355    new_path="$unix_path"
38356  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38357    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38358    new_path="$unix_path"
38359  fi
38360
38361    fi
38362
38363    if test "x$new_path" = x; then
38364      # It's still not found. Now this is an unrecoverable error.
38365      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38366$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38367      has_space=`$ECHO "$complete" | $GREP " "`
38368      if test "x$has_space" != x; then
38369        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38370$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38371      fi
38372      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38373    fi
38374  fi
38375
38376  # Now new_path has a complete unix path to the binary
38377  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38378    # Keep paths in /bin as-is, but remove trailing .exe if any
38379    new_path="${new_path/%.exe/}"
38380    # Do not save /bin paths to all_fixpath_prefixes!
38381  else
38382    # Not in mixed or Windows style, start by that.
38383    new_path=`cmd //c echo $new_path`
38384
38385  input_path="$new_path"
38386  # Check if we need to convert this using DOS-style short mode. If the path
38387  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38388  # take no chances and rewrite it.
38389  # Note: m4 eats our [], so we need to use [ and ] instead.
38390  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38391  if test "x$has_forbidden_chars" != x; then
38392    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38393    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38394  fi
38395
38396    # Output is in $new_path
38397
38398  windows_path="$new_path"
38399  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38400    unix_path=`$CYGPATH -u "$windows_path"`
38401    new_path="$unix_path"
38402  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38403    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38404    new_path="$unix_path"
38405  fi
38406
38407    # remove trailing .exe if any
38408    new_path="${new_path/%.exe/}"
38409
38410    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38411    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38412  fi
38413
38414    else
38415      # We're on a unix platform. Hooray! :)
38416      # First separate the path from the arguments. This will split at the first
38417      # space.
38418      complete="$AR"
38419      path="${complete%% *}"
38420      tmp="$complete EOL"
38421      arguments="${tmp#* }"
38422
38423      # Cannot rely on the command "which" here since it doesn't always work.
38424      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38425      if test -z "$is_absolute_path"; then
38426        # Path to executable is not absolute. Find it.
38427        IFS_save="$IFS"
38428        IFS=:
38429        for p in $PATH; do
38430          if test -f "$p/$path" && test -x "$p/$path"; then
38431            new_path="$p/$path"
38432            break
38433          fi
38434        done
38435        IFS="$IFS_save"
38436      else
38437        # This is an absolute path, we can use it without further modifications.
38438        new_path="$path"
38439      fi
38440
38441      if test "x$new_path" = x; then
38442        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38443$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38444        has_space=`$ECHO "$complete" | $GREP " "`
38445        if test "x$has_space" != x; then
38446          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38447$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38448        fi
38449        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38450      fi
38451    fi
38452
38453    # Now join together the path and the arguments once again
38454    if test "x$arguments" != xEOL; then
38455      new_complete="$new_path ${arguments% *}"
38456    else
38457      new_complete="$new_path"
38458    fi
38459
38460    if test "x$complete" != "x$new_complete"; then
38461      AR="$new_complete"
38462      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38463$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38464    fi
38465  fi
38466
38467
38468
38469  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38470
38471
38472  # Publish this variable in the help.
38473
38474
38475  if [ -z "${LIPO+x}" ]; then
38476    # The variable is not set by user, try to locate tool using the code snippet
38477    for ac_prog in lipo
38478do
38479  # Extract the first word of "$ac_prog", so it can be a program name with args.
38480set dummy $ac_prog; ac_word=$2
38481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38482$as_echo_n "checking for $ac_word... " >&6; }
38483if ${ac_cv_path_LIPO+:} false; then :
38484  $as_echo_n "(cached) " >&6
38485else
38486  case $LIPO in
38487  [\\/]* | ?:[\\/]*)
38488  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38489  ;;
38490  *)
38491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38492for as_dir in $PATH
38493do
38494  IFS=$as_save_IFS
38495  test -z "$as_dir" && as_dir=.
38496    for ac_exec_ext in '' $ac_executable_extensions; do
38497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38498    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38500    break 2
38501  fi
38502done
38503  done
38504IFS=$as_save_IFS
38505
38506  ;;
38507esac
38508fi
38509LIPO=$ac_cv_path_LIPO
38510if test -n "$LIPO"; then
38511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38512$as_echo "$LIPO" >&6; }
38513else
38514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38515$as_echo "no" >&6; }
38516fi
38517
38518
38519  test -n "$LIPO" && break
38520done
38521
38522  else
38523    # The variable is set, but is it from the command line or the environment?
38524
38525    # Try to remove the string !LIPO! from our list.
38526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38528      # If it failed, the variable was not from the command line. Ignore it,
38529      # but warn the user (except for BASH, which is always set by the calling BASH).
38530      if test "xLIPO" != xBASH; then
38531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38532$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38533      fi
38534      # Try to locate tool using the code snippet
38535      for ac_prog in lipo
38536do
38537  # Extract the first word of "$ac_prog", so it can be a program name with args.
38538set dummy $ac_prog; ac_word=$2
38539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38540$as_echo_n "checking for $ac_word... " >&6; }
38541if ${ac_cv_path_LIPO+:} false; then :
38542  $as_echo_n "(cached) " >&6
38543else
38544  case $LIPO in
38545  [\\/]* | ?:[\\/]*)
38546  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38547  ;;
38548  *)
38549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38550for as_dir in $PATH
38551do
38552  IFS=$as_save_IFS
38553  test -z "$as_dir" && as_dir=.
38554    for ac_exec_ext in '' $ac_executable_extensions; do
38555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38556    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38558    break 2
38559  fi
38560done
38561  done
38562IFS=$as_save_IFS
38563
38564  ;;
38565esac
38566fi
38567LIPO=$ac_cv_path_LIPO
38568if test -n "$LIPO"; then
38569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38570$as_echo "$LIPO" >&6; }
38571else
38572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38573$as_echo "no" >&6; }
38574fi
38575
38576
38577  test -n "$LIPO" && break
38578done
38579
38580    else
38581      # If it succeeded, then it was overridden by the user. We will use it
38582      # for the tool.
38583
38584      # First remove it from the list of overridden variables, so we can test
38585      # for unknown variables in the end.
38586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38587
38588      # Check if we try to supply an empty value
38589      if test "x$LIPO" = x; then
38590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38591$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38593$as_echo_n "checking for LIPO... " >&6; }
38594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38595$as_echo "disabled" >&6; }
38596      else
38597        # Check if the provided tool contains a complete path.
38598        tool_specified="$LIPO"
38599        tool_basename="${tool_specified##*/}"
38600        if test "x$tool_basename" = "x$tool_specified"; then
38601          # A command without a complete path is provided, search $PATH.
38602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38603$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38604          # Extract the first word of "$tool_basename", so it can be a program name with args.
38605set dummy $tool_basename; ac_word=$2
38606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38607$as_echo_n "checking for $ac_word... " >&6; }
38608if ${ac_cv_path_LIPO+:} false; then :
38609  $as_echo_n "(cached) " >&6
38610else
38611  case $LIPO in
38612  [\\/]* | ?:[\\/]*)
38613  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38614  ;;
38615  *)
38616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38617for as_dir in $PATH
38618do
38619  IFS=$as_save_IFS
38620  test -z "$as_dir" && as_dir=.
38621    for ac_exec_ext in '' $ac_executable_extensions; do
38622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38623    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38625    break 2
38626  fi
38627done
38628  done
38629IFS=$as_save_IFS
38630
38631  ;;
38632esac
38633fi
38634LIPO=$ac_cv_path_LIPO
38635if test -n "$LIPO"; then
38636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38637$as_echo "$LIPO" >&6; }
38638else
38639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38640$as_echo "no" >&6; }
38641fi
38642
38643
38644          if test "x$LIPO" = x; then
38645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38646          fi
38647        else
38648          # Otherwise we believe it is a complete path. Use it as it is.
38649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38650$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38652$as_echo_n "checking for LIPO... " >&6; }
38653          if test ! -x "$tool_specified"; then
38654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38655$as_echo "not found" >&6; }
38656            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38657          fi
38658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38659$as_echo "$tool_specified" >&6; }
38660        fi
38661      fi
38662    fi
38663
38664  fi
38665
38666
38667
38668  # Only process if variable expands to non-empty
38669
38670  if test "x$LIPO" != x; then
38671    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38672
38673  # First separate the path from the arguments. This will split at the first
38674  # space.
38675  complete="$LIPO"
38676  path="${complete%% *}"
38677  tmp="$complete EOL"
38678  arguments="${tmp#* }"
38679
38680  # Input might be given as Windows format, start by converting to
38681  # unix format.
38682  new_path=`$CYGPATH -u "$path"`
38683
38684  # Now try to locate executable using which
38685  new_path=`$WHICH "$new_path" 2> /dev/null`
38686  # bat and cmd files are not always considered executable in cygwin causing which
38687  # to not find them
38688  if test "x$new_path" = x \
38689      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38690      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38691    new_path=`$CYGPATH -u "$path"`
38692  fi
38693  if test "x$new_path" = x; then
38694    # Oops. Which didn't find the executable.
38695    # The splitting of arguments from the executable at a space might have been incorrect,
38696    # since paths with space are more likely in Windows. Give it another try with the whole
38697    # argument.
38698    path="$complete"
38699    arguments="EOL"
38700    new_path=`$CYGPATH -u "$path"`
38701    new_path=`$WHICH "$new_path" 2> /dev/null`
38702    # bat and cmd files are not always considered executable in cygwin causing which
38703    # to not find them
38704    if test "x$new_path" = x \
38705        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38706        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38707      new_path=`$CYGPATH -u "$path"`
38708    fi
38709    if test "x$new_path" = x; then
38710      # It's still not found. Now this is an unrecoverable error.
38711      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38712$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38713      has_space=`$ECHO "$complete" | $GREP " "`
38714      if test "x$has_space" != x; then
38715        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38716$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38717      fi
38718      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38719    fi
38720  fi
38721
38722  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38723  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38724  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38725  # "foo.exe" is OK but "foo" is an error.
38726  #
38727  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38728  # It is also a way to make sure we got the proper file name for the real test later on.
38729  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38730  if test "x$test_shortpath" = x; then
38731    # Short path failed, file does not exist as specified.
38732    # Try adding .exe or .cmd
38733    if test -f "${new_path}.exe"; then
38734      input_to_shortpath="${new_path}.exe"
38735    elif test -f "${new_path}.cmd"; then
38736      input_to_shortpath="${new_path}.cmd"
38737    else
38738      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38739$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38740      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38741$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38742      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38743    fi
38744  else
38745    input_to_shortpath="$new_path"
38746  fi
38747
38748  # Call helper function which possibly converts this using DOS-style short mode.
38749  # If so, the updated path is stored in $new_path.
38750  new_path="$input_to_shortpath"
38751
38752  input_path="$input_to_shortpath"
38753  # Check if we need to convert this using DOS-style short mode. If the path
38754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38755  # take no chances and rewrite it.
38756  # Note: m4 eats our [], so we need to use [ and ] instead.
38757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38758  if test "x$has_forbidden_chars" != x; then
38759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38763      # Going to short mode and back again did indeed matter. Since short mode is
38764      # case insensitive, let's make it lowercase to improve readability.
38765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38766      # Now convert it back to Unix-style (cygpath)
38767      input_path=`$CYGPATH -u "$shortmode_path"`
38768      new_path="$input_path"
38769    fi
38770  fi
38771
38772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38773  if test "x$test_cygdrive_prefix" = x; then
38774    # As a simple fix, exclude /usr/bin since it's not a real path.
38775    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38777      # a path prefixed by /cygdrive for fixpath to work.
38778      new_path="$CYGWIN_ROOT_PATH$input_path"
38779    fi
38780  fi
38781
38782  # remove trailing .exe if any
38783  new_path="${new_path/%.exe/}"
38784
38785    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38786
38787  # First separate the path from the arguments. This will split at the first
38788  # space.
38789  complete="$LIPO"
38790  path="${complete%% *}"
38791  tmp="$complete EOL"
38792  arguments="${tmp#* }"
38793
38794  # Input might be given as Windows format, start by converting to
38795  # unix format.
38796  new_path="$path"
38797
38798  windows_path="$new_path"
38799  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38800    unix_path=`$CYGPATH -u "$windows_path"`
38801    new_path="$unix_path"
38802  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38803    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38804    new_path="$unix_path"
38805  fi
38806
38807
38808  # Now try to locate executable using which
38809  new_path=`$WHICH "$new_path" 2> /dev/null`
38810
38811  if test "x$new_path" = x; then
38812    # Oops. Which didn't find the executable.
38813    # The splitting of arguments from the executable at a space might have been incorrect,
38814    # since paths with space are more likely in Windows. Give it another try with the whole
38815    # argument.
38816    path="$complete"
38817    arguments="EOL"
38818    new_path="$path"
38819
38820  windows_path="$new_path"
38821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38822    unix_path=`$CYGPATH -u "$windows_path"`
38823    new_path="$unix_path"
38824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38826    new_path="$unix_path"
38827  fi
38828
38829
38830    new_path=`$WHICH "$new_path" 2> /dev/null`
38831    # bat and cmd files are not always considered executable in MSYS causing which
38832    # to not find them
38833    if test "x$new_path" = x \
38834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38836      new_path="$path"
38837
38838  windows_path="$new_path"
38839  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38840    unix_path=`$CYGPATH -u "$windows_path"`
38841    new_path="$unix_path"
38842  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38843    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38844    new_path="$unix_path"
38845  fi
38846
38847    fi
38848
38849    if test "x$new_path" = x; then
38850      # It's still not found. Now this is an unrecoverable error.
38851      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38852$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38853      has_space=`$ECHO "$complete" | $GREP " "`
38854      if test "x$has_space" != x; then
38855        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38856$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38857      fi
38858      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38859    fi
38860  fi
38861
38862  # Now new_path has a complete unix path to the binary
38863  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38864    # Keep paths in /bin as-is, but remove trailing .exe if any
38865    new_path="${new_path/%.exe/}"
38866    # Do not save /bin paths to all_fixpath_prefixes!
38867  else
38868    # Not in mixed or Windows style, start by that.
38869    new_path=`cmd //c echo $new_path`
38870
38871  input_path="$new_path"
38872  # Check if we need to convert this using DOS-style short mode. If the path
38873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38874  # take no chances and rewrite it.
38875  # Note: m4 eats our [], so we need to use [ and ] instead.
38876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38877  if test "x$has_forbidden_chars" != x; then
38878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38880  fi
38881
38882    # Output is in $new_path
38883
38884  windows_path="$new_path"
38885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38886    unix_path=`$CYGPATH -u "$windows_path"`
38887    new_path="$unix_path"
38888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38890    new_path="$unix_path"
38891  fi
38892
38893    # remove trailing .exe if any
38894    new_path="${new_path/%.exe/}"
38895
38896    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38897    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38898  fi
38899
38900    else
38901      # We're on a unix platform. Hooray! :)
38902      # First separate the path from the arguments. This will split at the first
38903      # space.
38904      complete="$LIPO"
38905      path="${complete%% *}"
38906      tmp="$complete EOL"
38907      arguments="${tmp#* }"
38908
38909      # Cannot rely on the command "which" here since it doesn't always work.
38910      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38911      if test -z "$is_absolute_path"; then
38912        # Path to executable is not absolute. Find it.
38913        IFS_save="$IFS"
38914        IFS=:
38915        for p in $PATH; do
38916          if test -f "$p/$path" && test -x "$p/$path"; then
38917            new_path="$p/$path"
38918            break
38919          fi
38920        done
38921        IFS="$IFS_save"
38922      else
38923        # This is an absolute path, we can use it without further modifications.
38924        new_path="$path"
38925      fi
38926
38927      if test "x$new_path" = x; then
38928        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38929$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38930        has_space=`$ECHO "$complete" | $GREP " "`
38931        if test "x$has_space" != x; then
38932          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38933$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38934        fi
38935        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38936      fi
38937    fi
38938
38939    # Now join together the path and the arguments once again
38940    if test "x$arguments" != xEOL; then
38941      new_complete="$new_path ${arguments% *}"
38942    else
38943      new_complete="$new_path"
38944    fi
38945
38946    if test "x$complete" != "x$new_complete"; then
38947      LIPO="$new_complete"
38948      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38949$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38950    fi
38951  fi
38952
38953  fi
38954
38955  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38956    # Extract the first word of "mt", so it can be a program name with args.
38957set dummy mt; ac_word=$2
38958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38959$as_echo_n "checking for $ac_word... " >&6; }
38960if ${ac_cv_prog_MT+:} false; then :
38961  $as_echo_n "(cached) " >&6
38962else
38963  if test -n "$MT"; then
38964  ac_cv_prog_MT="$MT" # Let the user override the test.
38965else
38966  ac_prog_rejected=no
38967as_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    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38975       ac_prog_rejected=yes
38976       continue
38977     fi
38978    ac_cv_prog_MT="mt"
38979    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38980    break 2
38981  fi
38982done
38983  done
38984IFS=$as_save_IFS
38985
38986if test $ac_prog_rejected = yes; then
38987  # We found a bogon in the path, so make sure we never use it.
38988  set dummy $ac_cv_prog_MT
38989  shift
38990  if test $# != 0; then
38991    # We chose a different compiler from the bogus one.
38992    # However, it has the same basename, so the bogon will be chosen
38993    # first if we set MT to just the basename; use the full file name.
38994    shift
38995    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38996  fi
38997fi
38998fi
38999fi
39000MT=$ac_cv_prog_MT
39001if test -n "$MT"; then
39002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
39003$as_echo "$MT" >&6; }
39004else
39005  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39006$as_echo "no" >&6; }
39007fi
39008
39009
39010
39011  # Only process if variable expands to non-empty
39012
39013  if test "x$MT" != x; then
39014    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39015
39016  # First separate the path from the arguments. This will split at the first
39017  # space.
39018  complete="$MT"
39019  path="${complete%% *}"
39020  tmp="$complete EOL"
39021  arguments="${tmp#* }"
39022
39023  # Input might be given as Windows format, start by converting to
39024  # unix format.
39025  new_path=`$CYGPATH -u "$path"`
39026
39027  # Now try to locate executable using which
39028  new_path=`$WHICH "$new_path" 2> /dev/null`
39029  # bat and cmd files are not always considered executable in cygwin causing which
39030  # to not find them
39031  if test "x$new_path" = x \
39032      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39033      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39034    new_path=`$CYGPATH -u "$path"`
39035  fi
39036  if test "x$new_path" = x; then
39037    # Oops. Which didn't find the executable.
39038    # The splitting of arguments from the executable at a space might have been incorrect,
39039    # since paths with space are more likely in Windows. Give it another try with the whole
39040    # argument.
39041    path="$complete"
39042    arguments="EOL"
39043    new_path=`$CYGPATH -u "$path"`
39044    new_path=`$WHICH "$new_path" 2> /dev/null`
39045    # bat and cmd files are not always considered executable in cygwin causing which
39046    # to not find them
39047    if test "x$new_path" = x \
39048        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39049        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39050      new_path=`$CYGPATH -u "$path"`
39051    fi
39052    if test "x$new_path" = x; then
39053      # It's still not found. Now this is an unrecoverable error.
39054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39055$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39056      has_space=`$ECHO "$complete" | $GREP " "`
39057      if test "x$has_space" != x; then
39058        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39059$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39060      fi
39061      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39062    fi
39063  fi
39064
39065  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39066  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39067  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39068  # "foo.exe" is OK but "foo" is an error.
39069  #
39070  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39071  # It is also a way to make sure we got the proper file name for the real test later on.
39072  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39073  if test "x$test_shortpath" = x; then
39074    # Short path failed, file does not exist as specified.
39075    # Try adding .exe or .cmd
39076    if test -f "${new_path}.exe"; then
39077      input_to_shortpath="${new_path}.exe"
39078    elif test -f "${new_path}.cmd"; then
39079      input_to_shortpath="${new_path}.cmd"
39080    else
39081      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
39082$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
39083      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39084$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39085      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39086    fi
39087  else
39088    input_to_shortpath="$new_path"
39089  fi
39090
39091  # Call helper function which possibly converts this using DOS-style short mode.
39092  # If so, the updated path is stored in $new_path.
39093  new_path="$input_to_shortpath"
39094
39095  input_path="$input_to_shortpath"
39096  # Check if we need to convert this using DOS-style short mode. If the path
39097  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39098  # take no chances and rewrite it.
39099  # Note: m4 eats our [], so we need to use [ and ] instead.
39100  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39101  if test "x$has_forbidden_chars" != x; then
39102    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39103    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39104    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39105    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39106      # Going to short mode and back again did indeed matter. Since short mode is
39107      # case insensitive, let's make it lowercase to improve readability.
39108      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39109      # Now convert it back to Unix-style (cygpath)
39110      input_path=`$CYGPATH -u "$shortmode_path"`
39111      new_path="$input_path"
39112    fi
39113  fi
39114
39115  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39116  if test "x$test_cygdrive_prefix" = x; then
39117    # As a simple fix, exclude /usr/bin since it's not a real path.
39118    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39119      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39120      # a path prefixed by /cygdrive for fixpath to work.
39121      new_path="$CYGWIN_ROOT_PATH$input_path"
39122    fi
39123  fi
39124
39125  # remove trailing .exe if any
39126  new_path="${new_path/%.exe/}"
39127
39128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39129
39130  # First separate the path from the arguments. This will split at the first
39131  # space.
39132  complete="$MT"
39133  path="${complete%% *}"
39134  tmp="$complete EOL"
39135  arguments="${tmp#* }"
39136
39137  # Input might be given as Windows format, start by converting to
39138  # unix format.
39139  new_path="$path"
39140
39141  windows_path="$new_path"
39142  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39143    unix_path=`$CYGPATH -u "$windows_path"`
39144    new_path="$unix_path"
39145  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39146    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39147    new_path="$unix_path"
39148  fi
39149
39150
39151  # Now try to locate executable using which
39152  new_path=`$WHICH "$new_path" 2> /dev/null`
39153
39154  if test "x$new_path" = x; then
39155    # Oops. Which didn't find the executable.
39156    # The splitting of arguments from the executable at a space might have been incorrect,
39157    # since paths with space are more likely in Windows. Give it another try with the whole
39158    # argument.
39159    path="$complete"
39160    arguments="EOL"
39161    new_path="$path"
39162
39163  windows_path="$new_path"
39164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39165    unix_path=`$CYGPATH -u "$windows_path"`
39166    new_path="$unix_path"
39167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39169    new_path="$unix_path"
39170  fi
39171
39172
39173    new_path=`$WHICH "$new_path" 2> /dev/null`
39174    # bat and cmd files are not always considered executable in MSYS causing which
39175    # to not find them
39176    if test "x$new_path" = x \
39177        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39178        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39179      new_path="$path"
39180
39181  windows_path="$new_path"
39182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39183    unix_path=`$CYGPATH -u "$windows_path"`
39184    new_path="$unix_path"
39185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39187    new_path="$unix_path"
39188  fi
39189
39190    fi
39191
39192    if test "x$new_path" = x; then
39193      # It's still not found. Now this is an unrecoverable error.
39194      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39195$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39196      has_space=`$ECHO "$complete" | $GREP " "`
39197      if test "x$has_space" != x; then
39198        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39199$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39200      fi
39201      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39202    fi
39203  fi
39204
39205  # Now new_path has a complete unix path to the binary
39206  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39207    # Keep paths in /bin as-is, but remove trailing .exe if any
39208    new_path="${new_path/%.exe/}"
39209    # Do not save /bin paths to all_fixpath_prefixes!
39210  else
39211    # Not in mixed or Windows style, start by that.
39212    new_path=`cmd //c echo $new_path`
39213
39214  input_path="$new_path"
39215  # Check if we need to convert this using DOS-style short mode. If the path
39216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39217  # take no chances and rewrite it.
39218  # Note: m4 eats our [], so we need to use [ and ] instead.
39219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39220  if test "x$has_forbidden_chars" != x; then
39221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39222    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39223  fi
39224
39225    # Output is in $new_path
39226
39227  windows_path="$new_path"
39228  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39229    unix_path=`$CYGPATH -u "$windows_path"`
39230    new_path="$unix_path"
39231  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39232    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39233    new_path="$unix_path"
39234  fi
39235
39236    # remove trailing .exe if any
39237    new_path="${new_path/%.exe/}"
39238
39239    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39240    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39241  fi
39242
39243    else
39244      # We're on a unix platform. Hooray! :)
39245      # First separate the path from the arguments. This will split at the first
39246      # space.
39247      complete="$MT"
39248      path="${complete%% *}"
39249      tmp="$complete EOL"
39250      arguments="${tmp#* }"
39251
39252      # Cannot rely on the command "which" here since it doesn't always work.
39253      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39254      if test -z "$is_absolute_path"; then
39255        # Path to executable is not absolute. Find it.
39256        IFS_save="$IFS"
39257        IFS=:
39258        for p in $PATH; do
39259          if test -f "$p/$path" && test -x "$p/$path"; then
39260            new_path="$p/$path"
39261            break
39262          fi
39263        done
39264        IFS="$IFS_save"
39265      else
39266        # This is an absolute path, we can use it without further modifications.
39267        new_path="$path"
39268      fi
39269
39270      if test "x$new_path" = x; then
39271        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
39272$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
39273        has_space=`$ECHO "$complete" | $GREP " "`
39274        if test "x$has_space" != x; then
39275          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39276$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39277        fi
39278        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
39279      fi
39280    fi
39281
39282    # Now join together the path and the arguments once again
39283    if test "x$arguments" != xEOL; then
39284      new_complete="$new_path ${arguments% *}"
39285    else
39286      new_complete="$new_path"
39287    fi
39288
39289    if test "x$complete" != "x$new_complete"; then
39290      MT="$new_complete"
39291      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
39292$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
39293    fi
39294  fi
39295
39296    # Setup the resource compiler (RC)
39297    # Extract the first word of "rc", so it can be a program name with args.
39298set dummy rc; ac_word=$2
39299{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39300$as_echo_n "checking for $ac_word... " >&6; }
39301if ${ac_cv_prog_RC+:} false; then :
39302  $as_echo_n "(cached) " >&6
39303else
39304  if test -n "$RC"; then
39305  ac_cv_prog_RC="$RC" # Let the user override the test.
39306else
39307  ac_prog_rejected=no
39308as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39309for as_dir in $PATH
39310do
39311  IFS=$as_save_IFS
39312  test -z "$as_dir" && as_dir=.
39313    for ac_exec_ext in '' $ac_executable_extensions; do
39314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39315    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
39316       ac_prog_rejected=yes
39317       continue
39318     fi
39319    ac_cv_prog_RC="rc"
39320    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39321    break 2
39322  fi
39323done
39324  done
39325IFS=$as_save_IFS
39326
39327if test $ac_prog_rejected = yes; then
39328  # We found a bogon in the path, so make sure we never use it.
39329  set dummy $ac_cv_prog_RC
39330  shift
39331  if test $# != 0; then
39332    # We chose a different compiler from the bogus one.
39333    # However, it has the same basename, so the bogon will be chosen
39334    # first if we set RC to just the basename; use the full file name.
39335    shift
39336    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
39337  fi
39338fi
39339fi
39340fi
39341RC=$ac_cv_prog_RC
39342if test -n "$RC"; then
39343  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
39344$as_echo "$RC" >&6; }
39345else
39346  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39347$as_echo "no" >&6; }
39348fi
39349
39350
39351
39352  # Only process if variable expands to non-empty
39353
39354  if test "x$RC" != x; then
39355    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39356
39357  # First separate the path from the arguments. This will split at the first
39358  # space.
39359  complete="$RC"
39360  path="${complete%% *}"
39361  tmp="$complete EOL"
39362  arguments="${tmp#* }"
39363
39364  # Input might be given as Windows format, start by converting to
39365  # unix format.
39366  new_path=`$CYGPATH -u "$path"`
39367
39368  # Now try to locate executable using which
39369  new_path=`$WHICH "$new_path" 2> /dev/null`
39370  # bat and cmd files are not always considered executable in cygwin causing which
39371  # to not find them
39372  if test "x$new_path" = x \
39373      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39374      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39375    new_path=`$CYGPATH -u "$path"`
39376  fi
39377  if test "x$new_path" = x; then
39378    # Oops. Which didn't find the executable.
39379    # The splitting of arguments from the executable at a space might have been incorrect,
39380    # since paths with space are more likely in Windows. Give it another try with the whole
39381    # argument.
39382    path="$complete"
39383    arguments="EOL"
39384    new_path=`$CYGPATH -u "$path"`
39385    new_path=`$WHICH "$new_path" 2> /dev/null`
39386    # bat and cmd files are not always considered executable in cygwin causing which
39387    # to not find them
39388    if test "x$new_path" = x \
39389        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39390        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39391      new_path=`$CYGPATH -u "$path"`
39392    fi
39393    if test "x$new_path" = x; then
39394      # It's still not found. Now this is an unrecoverable error.
39395      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39396$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39397      has_space=`$ECHO "$complete" | $GREP " "`
39398      if test "x$has_space" != x; then
39399        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39400$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39401      fi
39402      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39403    fi
39404  fi
39405
39406  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39407  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39408  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39409  # "foo.exe" is OK but "foo" is an error.
39410  #
39411  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39412  # It is also a way to make sure we got the proper file name for the real test later on.
39413  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39414  if test "x$test_shortpath" = x; then
39415    # Short path failed, file does not exist as specified.
39416    # Try adding .exe or .cmd
39417    if test -f "${new_path}.exe"; then
39418      input_to_shortpath="${new_path}.exe"
39419    elif test -f "${new_path}.cmd"; then
39420      input_to_shortpath="${new_path}.cmd"
39421    else
39422      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39423$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39424      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39425$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39426      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39427    fi
39428  else
39429    input_to_shortpath="$new_path"
39430  fi
39431
39432  # Call helper function which possibly converts this using DOS-style short mode.
39433  # If so, the updated path is stored in $new_path.
39434  new_path="$input_to_shortpath"
39435
39436  input_path="$input_to_shortpath"
39437  # Check if we need to convert this using DOS-style short mode. If the path
39438  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39439  # take no chances and rewrite it.
39440  # Note: m4 eats our [], so we need to use [ and ] instead.
39441  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39442  if test "x$has_forbidden_chars" != x; then
39443    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39444    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39445    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39446    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39447      # Going to short mode and back again did indeed matter. Since short mode is
39448      # case insensitive, let's make it lowercase to improve readability.
39449      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39450      # Now convert it back to Unix-style (cygpath)
39451      input_path=`$CYGPATH -u "$shortmode_path"`
39452      new_path="$input_path"
39453    fi
39454  fi
39455
39456  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39457  if test "x$test_cygdrive_prefix" = x; then
39458    # As a simple fix, exclude /usr/bin since it's not a real path.
39459    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39460      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39461      # a path prefixed by /cygdrive for fixpath to work.
39462      new_path="$CYGWIN_ROOT_PATH$input_path"
39463    fi
39464  fi
39465
39466  # remove trailing .exe if any
39467  new_path="${new_path/%.exe/}"
39468
39469    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39470
39471  # First separate the path from the arguments. This will split at the first
39472  # space.
39473  complete="$RC"
39474  path="${complete%% *}"
39475  tmp="$complete EOL"
39476  arguments="${tmp#* }"
39477
39478  # Input might be given as Windows format, start by converting to
39479  # unix format.
39480  new_path="$path"
39481
39482  windows_path="$new_path"
39483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39484    unix_path=`$CYGPATH -u "$windows_path"`
39485    new_path="$unix_path"
39486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39488    new_path="$unix_path"
39489  fi
39490
39491
39492  # Now try to locate executable using which
39493  new_path=`$WHICH "$new_path" 2> /dev/null`
39494
39495  if test "x$new_path" = x; then
39496    # Oops. Which didn't find the executable.
39497    # The splitting of arguments from the executable at a space might have been incorrect,
39498    # since paths with space are more likely in Windows. Give it another try with the whole
39499    # argument.
39500    path="$complete"
39501    arguments="EOL"
39502    new_path="$path"
39503
39504  windows_path="$new_path"
39505  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39506    unix_path=`$CYGPATH -u "$windows_path"`
39507    new_path="$unix_path"
39508  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39509    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39510    new_path="$unix_path"
39511  fi
39512
39513
39514    new_path=`$WHICH "$new_path" 2> /dev/null`
39515    # bat and cmd files are not always considered executable in MSYS causing which
39516    # to not find them
39517    if test "x$new_path" = x \
39518        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39519        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39520      new_path="$path"
39521
39522  windows_path="$new_path"
39523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39524    unix_path=`$CYGPATH -u "$windows_path"`
39525    new_path="$unix_path"
39526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39528    new_path="$unix_path"
39529  fi
39530
39531    fi
39532
39533    if test "x$new_path" = x; then
39534      # It's still not found. Now this is an unrecoverable error.
39535      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39536$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39537      has_space=`$ECHO "$complete" | $GREP " "`
39538      if test "x$has_space" != x; then
39539        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39540$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39541      fi
39542      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39543    fi
39544  fi
39545
39546  # Now new_path has a complete unix path to the binary
39547  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39548    # Keep paths in /bin as-is, but remove trailing .exe if any
39549    new_path="${new_path/%.exe/}"
39550    # Do not save /bin paths to all_fixpath_prefixes!
39551  else
39552    # Not in mixed or Windows style, start by that.
39553    new_path=`cmd //c echo $new_path`
39554
39555  input_path="$new_path"
39556  # Check if we need to convert this using DOS-style short mode. If the path
39557  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39558  # take no chances and rewrite it.
39559  # Note: m4 eats our [], so we need to use [ and ] instead.
39560  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39561  if test "x$has_forbidden_chars" != x; then
39562    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39563    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39564  fi
39565
39566    # Output is in $new_path
39567
39568  windows_path="$new_path"
39569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39570    unix_path=`$CYGPATH -u "$windows_path"`
39571    new_path="$unix_path"
39572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39573    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39574    new_path="$unix_path"
39575  fi
39576
39577    # remove trailing .exe if any
39578    new_path="${new_path/%.exe/}"
39579
39580    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39581    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39582  fi
39583
39584    else
39585      # We're on a unix platform. Hooray! :)
39586      # First separate the path from the arguments. This will split at the first
39587      # space.
39588      complete="$RC"
39589      path="${complete%% *}"
39590      tmp="$complete EOL"
39591      arguments="${tmp#* }"
39592
39593      # Cannot rely on the command "which" here since it doesn't always work.
39594      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39595      if test -z "$is_absolute_path"; then
39596        # Path to executable is not absolute. Find it.
39597        IFS_save="$IFS"
39598        IFS=:
39599        for p in $PATH; do
39600          if test -f "$p/$path" && test -x "$p/$path"; then
39601            new_path="$p/$path"
39602            break
39603          fi
39604        done
39605        IFS="$IFS_save"
39606      else
39607        # This is an absolute path, we can use it without further modifications.
39608        new_path="$path"
39609      fi
39610
39611      if test "x$new_path" = x; then
39612        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39613$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39614        has_space=`$ECHO "$complete" | $GREP " "`
39615        if test "x$has_space" != x; then
39616          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39617$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39618        fi
39619        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39620      fi
39621    fi
39622
39623    # Now join together the path and the arguments once again
39624    if test "x$arguments" != xEOL; then
39625      new_complete="$new_path ${arguments% *}"
39626    else
39627      new_complete="$new_path"
39628    fi
39629
39630    if test "x$complete" != "x$new_complete"; then
39631      RC="$new_complete"
39632      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39633$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39634    fi
39635  fi
39636
39637    # Extract the first word of "dumpbin", so it can be a program name with args.
39638set dummy dumpbin; ac_word=$2
39639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39640$as_echo_n "checking for $ac_word... " >&6; }
39641if ${ac_cv_prog_DUMPBIN+:} false; then :
39642  $as_echo_n "(cached) " >&6
39643else
39644  if test -n "$DUMPBIN"; then
39645  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39646else
39647as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39648for as_dir in $PATH
39649do
39650  IFS=$as_save_IFS
39651  test -z "$as_dir" && as_dir=.
39652    for ac_exec_ext in '' $ac_executable_extensions; do
39653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39654    ac_cv_prog_DUMPBIN="dumpbin"
39655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39656    break 2
39657  fi
39658done
39659  done
39660IFS=$as_save_IFS
39661
39662fi
39663fi
39664DUMPBIN=$ac_cv_prog_DUMPBIN
39665if test -n "$DUMPBIN"; then
39666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39667$as_echo "$DUMPBIN" >&6; }
39668else
39669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39670$as_echo "no" >&6; }
39671fi
39672
39673
39674
39675  # Only process if variable expands to non-empty
39676
39677  if test "x$DUMPBIN" != x; then
39678    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39679
39680  # First separate the path from the arguments. This will split at the first
39681  # space.
39682  complete="$DUMPBIN"
39683  path="${complete%% *}"
39684  tmp="$complete EOL"
39685  arguments="${tmp#* }"
39686
39687  # Input might be given as Windows format, start by converting to
39688  # unix format.
39689  new_path=`$CYGPATH -u "$path"`
39690
39691  # Now try to locate executable using which
39692  new_path=`$WHICH "$new_path" 2> /dev/null`
39693  # bat and cmd files are not always considered executable in cygwin causing which
39694  # to not find them
39695  if test "x$new_path" = x \
39696      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39697      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39698    new_path=`$CYGPATH -u "$path"`
39699  fi
39700  if test "x$new_path" = x; then
39701    # Oops. Which didn't find the executable.
39702    # The splitting of arguments from the executable at a space might have been incorrect,
39703    # since paths with space are more likely in Windows. Give it another try with the whole
39704    # argument.
39705    path="$complete"
39706    arguments="EOL"
39707    new_path=`$CYGPATH -u "$path"`
39708    new_path=`$WHICH "$new_path" 2> /dev/null`
39709    # bat and cmd files are not always considered executable in cygwin causing which
39710    # to not find them
39711    if test "x$new_path" = x \
39712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39714      new_path=`$CYGPATH -u "$path"`
39715    fi
39716    if test "x$new_path" = x; then
39717      # It's still not found. Now this is an unrecoverable error.
39718      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39719$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39720      has_space=`$ECHO "$complete" | $GREP " "`
39721      if test "x$has_space" != x; then
39722        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39723$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39724      fi
39725      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39726    fi
39727  fi
39728
39729  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39730  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39731  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39732  # "foo.exe" is OK but "foo" is an error.
39733  #
39734  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39735  # It is also a way to make sure we got the proper file name for the real test later on.
39736  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39737  if test "x$test_shortpath" = x; then
39738    # Short path failed, file does not exist as specified.
39739    # Try adding .exe or .cmd
39740    if test -f "${new_path}.exe"; then
39741      input_to_shortpath="${new_path}.exe"
39742    elif test -f "${new_path}.cmd"; then
39743      input_to_shortpath="${new_path}.cmd"
39744    else
39745      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39746$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39747      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39748$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39749      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39750    fi
39751  else
39752    input_to_shortpath="$new_path"
39753  fi
39754
39755  # Call helper function which possibly converts this using DOS-style short mode.
39756  # If so, the updated path is stored in $new_path.
39757  new_path="$input_to_shortpath"
39758
39759  input_path="$input_to_shortpath"
39760  # Check if we need to convert this using DOS-style short mode. If the path
39761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39762  # take no chances and rewrite it.
39763  # Note: m4 eats our [], so we need to use [ and ] instead.
39764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39765  if test "x$has_forbidden_chars" != x; then
39766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39767    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39768    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39769    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39770      # Going to short mode and back again did indeed matter. Since short mode is
39771      # case insensitive, let's make it lowercase to improve readability.
39772      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39773      # Now convert it back to Unix-style (cygpath)
39774      input_path=`$CYGPATH -u "$shortmode_path"`
39775      new_path="$input_path"
39776    fi
39777  fi
39778
39779  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39780  if test "x$test_cygdrive_prefix" = x; then
39781    # As a simple fix, exclude /usr/bin since it's not a real path.
39782    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39783      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39784      # a path prefixed by /cygdrive for fixpath to work.
39785      new_path="$CYGWIN_ROOT_PATH$input_path"
39786    fi
39787  fi
39788
39789  # remove trailing .exe if any
39790  new_path="${new_path/%.exe/}"
39791
39792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39793
39794  # First separate the path from the arguments. This will split at the first
39795  # space.
39796  complete="$DUMPBIN"
39797  path="${complete%% *}"
39798  tmp="$complete EOL"
39799  arguments="${tmp#* }"
39800
39801  # Input might be given as Windows format, start by converting to
39802  # unix format.
39803  new_path="$path"
39804
39805  windows_path="$new_path"
39806  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39807    unix_path=`$CYGPATH -u "$windows_path"`
39808    new_path="$unix_path"
39809  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39810    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39811    new_path="$unix_path"
39812  fi
39813
39814
39815  # Now try to locate executable using which
39816  new_path=`$WHICH "$new_path" 2> /dev/null`
39817
39818  if test "x$new_path" = x; then
39819    # Oops. Which didn't find the executable.
39820    # The splitting of arguments from the executable at a space might have been incorrect,
39821    # since paths with space are more likely in Windows. Give it another try with the whole
39822    # argument.
39823    path="$complete"
39824    arguments="EOL"
39825    new_path="$path"
39826
39827  windows_path="$new_path"
39828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39829    unix_path=`$CYGPATH -u "$windows_path"`
39830    new_path="$unix_path"
39831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39833    new_path="$unix_path"
39834  fi
39835
39836
39837    new_path=`$WHICH "$new_path" 2> /dev/null`
39838    # bat and cmd files are not always considered executable in MSYS causing which
39839    # to not find them
39840    if test "x$new_path" = x \
39841        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39842        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39843      new_path="$path"
39844
39845  windows_path="$new_path"
39846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39847    unix_path=`$CYGPATH -u "$windows_path"`
39848    new_path="$unix_path"
39849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39851    new_path="$unix_path"
39852  fi
39853
39854    fi
39855
39856    if test "x$new_path" = x; then
39857      # It's still not found. Now this is an unrecoverable error.
39858      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39859$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39860      has_space=`$ECHO "$complete" | $GREP " "`
39861      if test "x$has_space" != x; then
39862        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39863$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39864      fi
39865      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39866    fi
39867  fi
39868
39869  # Now new_path has a complete unix path to the binary
39870  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39871    # Keep paths in /bin as-is, but remove trailing .exe if any
39872    new_path="${new_path/%.exe/}"
39873    # Do not save /bin paths to all_fixpath_prefixes!
39874  else
39875    # Not in mixed or Windows style, start by that.
39876    new_path=`cmd //c echo $new_path`
39877
39878  input_path="$new_path"
39879  # Check if we need to convert this using DOS-style short mode. If the path
39880  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39881  # take no chances and rewrite it.
39882  # Note: m4 eats our [], so we need to use [ and ] instead.
39883  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39884  if test "x$has_forbidden_chars" != x; then
39885    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39886    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39887  fi
39888
39889    # Output is in $new_path
39890
39891  windows_path="$new_path"
39892  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39893    unix_path=`$CYGPATH -u "$windows_path"`
39894    new_path="$unix_path"
39895  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39896    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39897    new_path="$unix_path"
39898  fi
39899
39900    # remove trailing .exe if any
39901    new_path="${new_path/%.exe/}"
39902
39903    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39904    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39905  fi
39906
39907    else
39908      # We're on a unix platform. Hooray! :)
39909      # First separate the path from the arguments. This will split at the first
39910      # space.
39911      complete="$DUMPBIN"
39912      path="${complete%% *}"
39913      tmp="$complete EOL"
39914      arguments="${tmp#* }"
39915
39916      # Cannot rely on the command "which" here since it doesn't always work.
39917      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39918      if test -z "$is_absolute_path"; then
39919        # Path to executable is not absolute. Find it.
39920        IFS_save="$IFS"
39921        IFS=:
39922        for p in $PATH; do
39923          if test -f "$p/$path" && test -x "$p/$path"; then
39924            new_path="$p/$path"
39925            break
39926          fi
39927        done
39928        IFS="$IFS_save"
39929      else
39930        # This is an absolute path, we can use it without further modifications.
39931        new_path="$path"
39932      fi
39933
39934      if test "x$new_path" = x; then
39935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39936$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39937        has_space=`$ECHO "$complete" | $GREP " "`
39938        if test "x$has_space" != x; then
39939          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39940$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39941        fi
39942        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39943      fi
39944    fi
39945
39946    # Now join together the path and the arguments once again
39947    if test "x$arguments" != xEOL; then
39948      new_complete="$new_path ${arguments% *}"
39949    else
39950      new_complete="$new_path"
39951    fi
39952
39953    if test "x$complete" != "x$new_complete"; then
39954      DUMPBIN="$new_complete"
39955      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39956$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39957    fi
39958  fi
39959
39960    # We need to check for 'msbuild.exe' because at the place where we expect to
39961    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39962    # won't find the 'msbuild.exe' executable in that case (and the
39963    # 'ac_executable_extensions' is unusable due to performance reasons).
39964    # Notice that we intentionally don't fix up the path to MSBUILD because we
39965    # will call it in a DOS shell during freetype detection on Windows (see
39966    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39967    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39968set dummy msbuild.exe; ac_word=$2
39969{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39970$as_echo_n "checking for $ac_word... " >&6; }
39971if ${ac_cv_prog_MSBUILD+:} false; then :
39972  $as_echo_n "(cached) " >&6
39973else
39974  if test -n "$MSBUILD"; then
39975  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39976else
39977as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39978for as_dir in $PATH
39979do
39980  IFS=$as_save_IFS
39981  test -z "$as_dir" && as_dir=.
39982    for ac_exec_ext in '' $ac_executable_extensions; do
39983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39984    ac_cv_prog_MSBUILD="msbuild.exe"
39985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39986    break 2
39987  fi
39988done
39989  done
39990IFS=$as_save_IFS
39991
39992fi
39993fi
39994MSBUILD=$ac_cv_prog_MSBUILD
39995if test -n "$MSBUILD"; then
39996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39997$as_echo "$MSBUILD" >&6; }
39998else
39999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40000$as_echo "no" >&6; }
40001fi
40002
40003
40004  fi
40005
40006  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
40007
40008
40009  # Publish this variable in the help.
40010
40011
40012  if [ -z "${STRIP+x}" ]; then
40013    # The variable is not set by user, try to locate tool using the code snippet
40014    for ac_prog in strip
40015do
40016  # Extract the first word of "$ac_prog", so it can be a program name with args.
40017set dummy $ac_prog; ac_word=$2
40018{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40019$as_echo_n "checking for $ac_word... " >&6; }
40020if ${ac_cv_path_STRIP+:} false; then :
40021  $as_echo_n "(cached) " >&6
40022else
40023  case $STRIP in
40024  [\\/]* | ?:[\\/]*)
40025  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40026  ;;
40027  *)
40028  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40029for as_dir in $PATH
40030do
40031  IFS=$as_save_IFS
40032  test -z "$as_dir" && as_dir=.
40033    for ac_exec_ext in '' $ac_executable_extensions; do
40034  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40035    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40036    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40037    break 2
40038  fi
40039done
40040  done
40041IFS=$as_save_IFS
40042
40043  ;;
40044esac
40045fi
40046STRIP=$ac_cv_path_STRIP
40047if test -n "$STRIP"; then
40048  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40049$as_echo "$STRIP" >&6; }
40050else
40051  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40052$as_echo "no" >&6; }
40053fi
40054
40055
40056  test -n "$STRIP" && break
40057done
40058
40059  else
40060    # The variable is set, but is it from the command line or the environment?
40061
40062    # Try to remove the string !STRIP! from our list.
40063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40065      # If it failed, the variable was not from the command line. Ignore it,
40066      # but warn the user (except for BASH, which is always set by the calling BASH).
40067      if test "xSTRIP" != xBASH; then
40068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40069$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40070      fi
40071      # Try to locate tool using the code snippet
40072      for ac_prog in strip
40073do
40074  # Extract the first word of "$ac_prog", so it can be a program name with args.
40075set dummy $ac_prog; ac_word=$2
40076{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40077$as_echo_n "checking for $ac_word... " >&6; }
40078if ${ac_cv_path_STRIP+:} false; then :
40079  $as_echo_n "(cached) " >&6
40080else
40081  case $STRIP in
40082  [\\/]* | ?:[\\/]*)
40083  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40084  ;;
40085  *)
40086  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40087for as_dir in $PATH
40088do
40089  IFS=$as_save_IFS
40090  test -z "$as_dir" && as_dir=.
40091    for ac_exec_ext in '' $ac_executable_extensions; do
40092  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40093    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40094    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40095    break 2
40096  fi
40097done
40098  done
40099IFS=$as_save_IFS
40100
40101  ;;
40102esac
40103fi
40104STRIP=$ac_cv_path_STRIP
40105if test -n "$STRIP"; then
40106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40107$as_echo "$STRIP" >&6; }
40108else
40109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40110$as_echo "no" >&6; }
40111fi
40112
40113
40114  test -n "$STRIP" && break
40115done
40116
40117    else
40118      # If it succeeded, then it was overridden by the user. We will use it
40119      # for the tool.
40120
40121      # First remove it from the list of overridden variables, so we can test
40122      # for unknown variables in the end.
40123      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40124
40125      # Check if we try to supply an empty value
40126      if test "x$STRIP" = x; then
40127        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40128$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40129        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40130$as_echo_n "checking for STRIP... " >&6; }
40131        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40132$as_echo "disabled" >&6; }
40133      else
40134        # Check if the provided tool contains a complete path.
40135        tool_specified="$STRIP"
40136        tool_basename="${tool_specified##*/}"
40137        if test "x$tool_basename" = "x$tool_specified"; then
40138          # A command without a complete path is provided, search $PATH.
40139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40140$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40141          # Extract the first word of "$tool_basename", so it can be a program name with args.
40142set dummy $tool_basename; ac_word=$2
40143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40144$as_echo_n "checking for $ac_word... " >&6; }
40145if ${ac_cv_path_STRIP+:} false; then :
40146  $as_echo_n "(cached) " >&6
40147else
40148  case $STRIP in
40149  [\\/]* | ?:[\\/]*)
40150  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40151  ;;
40152  *)
40153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40154for as_dir in $PATH
40155do
40156  IFS=$as_save_IFS
40157  test -z "$as_dir" && as_dir=.
40158    for ac_exec_ext in '' $ac_executable_extensions; do
40159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40160    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40162    break 2
40163  fi
40164done
40165  done
40166IFS=$as_save_IFS
40167
40168  ;;
40169esac
40170fi
40171STRIP=$ac_cv_path_STRIP
40172if test -n "$STRIP"; then
40173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40174$as_echo "$STRIP" >&6; }
40175else
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40177$as_echo "no" >&6; }
40178fi
40179
40180
40181          if test "x$STRIP" = x; then
40182            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40183          fi
40184        else
40185          # Otherwise we believe it is a complete path. Use it as it is.
40186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40187$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40188          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40189$as_echo_n "checking for STRIP... " >&6; }
40190          if test ! -x "$tool_specified"; then
40191            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40192$as_echo "not found" >&6; }
40193            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40194          fi
40195          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40196$as_echo "$tool_specified" >&6; }
40197        fi
40198      fi
40199    fi
40200
40201  fi
40202
40203
40204
40205  # Only process if variable expands to non-empty
40206
40207  if test "x$STRIP" != x; then
40208    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40209
40210  # First separate the path from the arguments. This will split at the first
40211  # space.
40212  complete="$STRIP"
40213  path="${complete%% *}"
40214  tmp="$complete EOL"
40215  arguments="${tmp#* }"
40216
40217  # Input might be given as Windows format, start by converting to
40218  # unix format.
40219  new_path=`$CYGPATH -u "$path"`
40220
40221  # Now try to locate executable using which
40222  new_path=`$WHICH "$new_path" 2> /dev/null`
40223  # bat and cmd files are not always considered executable in cygwin causing which
40224  # to not find them
40225  if test "x$new_path" = x \
40226      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40227      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40228    new_path=`$CYGPATH -u "$path"`
40229  fi
40230  if test "x$new_path" = x; then
40231    # Oops. Which didn't find the executable.
40232    # The splitting of arguments from the executable at a space might have been incorrect,
40233    # since paths with space are more likely in Windows. Give it another try with the whole
40234    # argument.
40235    path="$complete"
40236    arguments="EOL"
40237    new_path=`$CYGPATH -u "$path"`
40238    new_path=`$WHICH "$new_path" 2> /dev/null`
40239    # bat and cmd files are not always considered executable in cygwin causing which
40240    # to not find them
40241    if test "x$new_path" = x \
40242        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40243        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40244      new_path=`$CYGPATH -u "$path"`
40245    fi
40246    if test "x$new_path" = x; then
40247      # It's still not found. Now this is an unrecoverable error.
40248      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40249$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40250      has_space=`$ECHO "$complete" | $GREP " "`
40251      if test "x$has_space" != x; then
40252        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40253$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40254      fi
40255      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40256    fi
40257  fi
40258
40259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40262  # "foo.exe" is OK but "foo" is an error.
40263  #
40264  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40265  # It is also a way to make sure we got the proper file name for the real test later on.
40266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40267  if test "x$test_shortpath" = x; then
40268    # Short path failed, file does not exist as specified.
40269    # Try adding .exe or .cmd
40270    if test -f "${new_path}.exe"; then
40271      input_to_shortpath="${new_path}.exe"
40272    elif test -f "${new_path}.cmd"; then
40273      input_to_shortpath="${new_path}.cmd"
40274    else
40275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40276$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40277      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40278$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40279      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40280    fi
40281  else
40282    input_to_shortpath="$new_path"
40283  fi
40284
40285  # Call helper function which possibly converts this using DOS-style short mode.
40286  # If so, the updated path is stored in $new_path.
40287  new_path="$input_to_shortpath"
40288
40289  input_path="$input_to_shortpath"
40290  # Check if we need to convert this using DOS-style short mode. If the path
40291  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40292  # take no chances and rewrite it.
40293  # Note: m4 eats our [], so we need to use [ and ] instead.
40294  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40295  if test "x$has_forbidden_chars" != x; then
40296    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40297    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40298    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40299    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40300      # Going to short mode and back again did indeed matter. Since short mode is
40301      # case insensitive, let's make it lowercase to improve readability.
40302      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40303      # Now convert it back to Unix-style (cygpath)
40304      input_path=`$CYGPATH -u "$shortmode_path"`
40305      new_path="$input_path"
40306    fi
40307  fi
40308
40309  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40310  if test "x$test_cygdrive_prefix" = x; then
40311    # As a simple fix, exclude /usr/bin since it's not a real path.
40312    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40313      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40314      # a path prefixed by /cygdrive for fixpath to work.
40315      new_path="$CYGWIN_ROOT_PATH$input_path"
40316    fi
40317  fi
40318
40319  # remove trailing .exe if any
40320  new_path="${new_path/%.exe/}"
40321
40322    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40323
40324  # First separate the path from the arguments. This will split at the first
40325  # space.
40326  complete="$STRIP"
40327  path="${complete%% *}"
40328  tmp="$complete EOL"
40329  arguments="${tmp#* }"
40330
40331  # Input might be given as Windows format, start by converting to
40332  # unix format.
40333  new_path="$path"
40334
40335  windows_path="$new_path"
40336  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40337    unix_path=`$CYGPATH -u "$windows_path"`
40338    new_path="$unix_path"
40339  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40340    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40341    new_path="$unix_path"
40342  fi
40343
40344
40345  # Now try to locate executable using which
40346  new_path=`$WHICH "$new_path" 2> /dev/null`
40347
40348  if test "x$new_path" = x; then
40349    # Oops. Which didn't find the executable.
40350    # The splitting of arguments from the executable at a space might have been incorrect,
40351    # since paths with space are more likely in Windows. Give it another try with the whole
40352    # argument.
40353    path="$complete"
40354    arguments="EOL"
40355    new_path="$path"
40356
40357  windows_path="$new_path"
40358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40359    unix_path=`$CYGPATH -u "$windows_path"`
40360    new_path="$unix_path"
40361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40363    new_path="$unix_path"
40364  fi
40365
40366
40367    new_path=`$WHICH "$new_path" 2> /dev/null`
40368    # bat and cmd files are not always considered executable in MSYS causing which
40369    # to not find them
40370    if test "x$new_path" = x \
40371        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40372        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40373      new_path="$path"
40374
40375  windows_path="$new_path"
40376  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40377    unix_path=`$CYGPATH -u "$windows_path"`
40378    new_path="$unix_path"
40379  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40380    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40381    new_path="$unix_path"
40382  fi
40383
40384    fi
40385
40386    if test "x$new_path" = x; then
40387      # It's still not found. Now this is an unrecoverable error.
40388      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40389$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40390      has_space=`$ECHO "$complete" | $GREP " "`
40391      if test "x$has_space" != x; then
40392        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40393$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40394      fi
40395      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40396    fi
40397  fi
40398
40399  # Now new_path has a complete unix path to the binary
40400  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40401    # Keep paths in /bin as-is, but remove trailing .exe if any
40402    new_path="${new_path/%.exe/}"
40403    # Do not save /bin paths to all_fixpath_prefixes!
40404  else
40405    # Not in mixed or Windows style, start by that.
40406    new_path=`cmd //c echo $new_path`
40407
40408  input_path="$new_path"
40409  # Check if we need to convert this using DOS-style short mode. If the path
40410  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40411  # take no chances and rewrite it.
40412  # Note: m4 eats our [], so we need to use [ and ] instead.
40413  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40414  if test "x$has_forbidden_chars" != x; then
40415    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40416    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40417  fi
40418
40419    # Output is in $new_path
40420
40421  windows_path="$new_path"
40422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40423    unix_path=`$CYGPATH -u "$windows_path"`
40424    new_path="$unix_path"
40425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40427    new_path="$unix_path"
40428  fi
40429
40430    # remove trailing .exe if any
40431    new_path="${new_path/%.exe/}"
40432
40433    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40434    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40435  fi
40436
40437    else
40438      # We're on a unix platform. Hooray! :)
40439      # First separate the path from the arguments. This will split at the first
40440      # space.
40441      complete="$STRIP"
40442      path="${complete%% *}"
40443      tmp="$complete EOL"
40444      arguments="${tmp#* }"
40445
40446      # Cannot rely on the command "which" here since it doesn't always work.
40447      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40448      if test -z "$is_absolute_path"; then
40449        # Path to executable is not absolute. Find it.
40450        IFS_save="$IFS"
40451        IFS=:
40452        for p in $PATH; do
40453          if test -f "$p/$path" && test -x "$p/$path"; then
40454            new_path="$p/$path"
40455            break
40456          fi
40457        done
40458        IFS="$IFS_save"
40459      else
40460        # This is an absolute path, we can use it without further modifications.
40461        new_path="$path"
40462      fi
40463
40464      if test "x$new_path" = x; then
40465        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40466$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40467        has_space=`$ECHO "$complete" | $GREP " "`
40468        if test "x$has_space" != x; then
40469          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40470$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40471        fi
40472        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40473      fi
40474    fi
40475
40476    # Now join together the path and the arguments once again
40477    if test "x$arguments" != xEOL; then
40478      new_complete="$new_path ${arguments% *}"
40479    else
40480      new_complete="$new_path"
40481    fi
40482
40483    if test "x$complete" != "x$new_complete"; then
40484      STRIP="$new_complete"
40485      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40486$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40487    fi
40488  fi
40489
40490
40491
40492  # Publish this variable in the help.
40493
40494
40495  if [ -z "${NM+x}" ]; then
40496    # The variable is not set by user, try to locate tool using the code snippet
40497    for ac_prog in nm
40498do
40499  # Extract the first word of "$ac_prog", so it can be a program name with args.
40500set dummy $ac_prog; ac_word=$2
40501{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40502$as_echo_n "checking for $ac_word... " >&6; }
40503if ${ac_cv_path_NM+:} false; then :
40504  $as_echo_n "(cached) " >&6
40505else
40506  case $NM in
40507  [\\/]* | ?:[\\/]*)
40508  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40509  ;;
40510  *)
40511  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40512for as_dir in $PATH
40513do
40514  IFS=$as_save_IFS
40515  test -z "$as_dir" && as_dir=.
40516    for ac_exec_ext in '' $ac_executable_extensions; do
40517  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40518    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40519    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40520    break 2
40521  fi
40522done
40523  done
40524IFS=$as_save_IFS
40525
40526  ;;
40527esac
40528fi
40529NM=$ac_cv_path_NM
40530if test -n "$NM"; then
40531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40532$as_echo "$NM" >&6; }
40533else
40534  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40535$as_echo "no" >&6; }
40536fi
40537
40538
40539  test -n "$NM" && break
40540done
40541
40542  else
40543    # The variable is set, but is it from the command line or the environment?
40544
40545    # Try to remove the string !NM! from our list.
40546    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40547    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40548      # If it failed, the variable was not from the command line. Ignore it,
40549      # but warn the user (except for BASH, which is always set by the calling BASH).
40550      if test "xNM" != xBASH; then
40551        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40552$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40553      fi
40554      # Try to locate tool using the code snippet
40555      for ac_prog in nm
40556do
40557  # Extract the first word of "$ac_prog", so it can be a program name with args.
40558set dummy $ac_prog; ac_word=$2
40559{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40560$as_echo_n "checking for $ac_word... " >&6; }
40561if ${ac_cv_path_NM+:} false; then :
40562  $as_echo_n "(cached) " >&6
40563else
40564  case $NM in
40565  [\\/]* | ?:[\\/]*)
40566  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40567  ;;
40568  *)
40569  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40570for as_dir in $PATH
40571do
40572  IFS=$as_save_IFS
40573  test -z "$as_dir" && as_dir=.
40574    for ac_exec_ext in '' $ac_executable_extensions; do
40575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40576    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40578    break 2
40579  fi
40580done
40581  done
40582IFS=$as_save_IFS
40583
40584  ;;
40585esac
40586fi
40587NM=$ac_cv_path_NM
40588if test -n "$NM"; then
40589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40590$as_echo "$NM" >&6; }
40591else
40592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40593$as_echo "no" >&6; }
40594fi
40595
40596
40597  test -n "$NM" && break
40598done
40599
40600    else
40601      # If it succeeded, then it was overridden by the user. We will use it
40602      # for the tool.
40603
40604      # First remove it from the list of overridden variables, so we can test
40605      # for unknown variables in the end.
40606      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40607
40608      # Check if we try to supply an empty value
40609      if test "x$NM" = x; then
40610        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40611$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40612        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40613$as_echo_n "checking for NM... " >&6; }
40614        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40615$as_echo "disabled" >&6; }
40616      else
40617        # Check if the provided tool contains a complete path.
40618        tool_specified="$NM"
40619        tool_basename="${tool_specified##*/}"
40620        if test "x$tool_basename" = "x$tool_specified"; then
40621          # A command without a complete path is provided, search $PATH.
40622          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40623$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40624          # Extract the first word of "$tool_basename", so it can be a program name with args.
40625set dummy $tool_basename; ac_word=$2
40626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40627$as_echo_n "checking for $ac_word... " >&6; }
40628if ${ac_cv_path_NM+:} false; then :
40629  $as_echo_n "(cached) " >&6
40630else
40631  case $NM in
40632  [\\/]* | ?:[\\/]*)
40633  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40634  ;;
40635  *)
40636  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40637for as_dir in $PATH
40638do
40639  IFS=$as_save_IFS
40640  test -z "$as_dir" && as_dir=.
40641    for ac_exec_ext in '' $ac_executable_extensions; do
40642  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40643    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40644    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40645    break 2
40646  fi
40647done
40648  done
40649IFS=$as_save_IFS
40650
40651  ;;
40652esac
40653fi
40654NM=$ac_cv_path_NM
40655if test -n "$NM"; then
40656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40657$as_echo "$NM" >&6; }
40658else
40659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40660$as_echo "no" >&6; }
40661fi
40662
40663
40664          if test "x$NM" = x; then
40665            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40666          fi
40667        else
40668          # Otherwise we believe it is a complete path. Use it as it is.
40669          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40670$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40671          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40672$as_echo_n "checking for NM... " >&6; }
40673          if test ! -x "$tool_specified"; then
40674            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40675$as_echo "not found" >&6; }
40676            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40677          fi
40678          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40679$as_echo "$tool_specified" >&6; }
40680        fi
40681      fi
40682    fi
40683
40684  fi
40685
40686
40687
40688  # Only process if variable expands to non-empty
40689
40690  if test "x$NM" != x; then
40691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40692
40693  # First separate the path from the arguments. This will split at the first
40694  # space.
40695  complete="$NM"
40696  path="${complete%% *}"
40697  tmp="$complete EOL"
40698  arguments="${tmp#* }"
40699
40700  # Input might be given as Windows format, start by converting to
40701  # unix format.
40702  new_path=`$CYGPATH -u "$path"`
40703
40704  # Now try to locate executable using which
40705  new_path=`$WHICH "$new_path" 2> /dev/null`
40706  # bat and cmd files are not always considered executable in cygwin causing which
40707  # to not find them
40708  if test "x$new_path" = x \
40709      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40710      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40711    new_path=`$CYGPATH -u "$path"`
40712  fi
40713  if test "x$new_path" = x; then
40714    # Oops. Which didn't find the executable.
40715    # The splitting of arguments from the executable at a space might have been incorrect,
40716    # since paths with space are more likely in Windows. Give it another try with the whole
40717    # argument.
40718    path="$complete"
40719    arguments="EOL"
40720    new_path=`$CYGPATH -u "$path"`
40721    new_path=`$WHICH "$new_path" 2> /dev/null`
40722    # bat and cmd files are not always considered executable in cygwin causing which
40723    # to not find them
40724    if test "x$new_path" = x \
40725        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40726        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40727      new_path=`$CYGPATH -u "$path"`
40728    fi
40729    if test "x$new_path" = x; then
40730      # It's still not found. Now this is an unrecoverable error.
40731      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40732$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40733      has_space=`$ECHO "$complete" | $GREP " "`
40734      if test "x$has_space" != x; then
40735        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40736$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40737      fi
40738      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40739    fi
40740  fi
40741
40742  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40743  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40744  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40745  # "foo.exe" is OK but "foo" is an error.
40746  #
40747  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40748  # It is also a way to make sure we got the proper file name for the real test later on.
40749  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40750  if test "x$test_shortpath" = x; then
40751    # Short path failed, file does not exist as specified.
40752    # Try adding .exe or .cmd
40753    if test -f "${new_path}.exe"; then
40754      input_to_shortpath="${new_path}.exe"
40755    elif test -f "${new_path}.cmd"; then
40756      input_to_shortpath="${new_path}.cmd"
40757    else
40758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40759$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40760      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40761$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40762      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40763    fi
40764  else
40765    input_to_shortpath="$new_path"
40766  fi
40767
40768  # Call helper function which possibly converts this using DOS-style short mode.
40769  # If so, the updated path is stored in $new_path.
40770  new_path="$input_to_shortpath"
40771
40772  input_path="$input_to_shortpath"
40773  # Check if we need to convert this using DOS-style short mode. If the path
40774  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40775  # take no chances and rewrite it.
40776  # Note: m4 eats our [], so we need to use [ and ] instead.
40777  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40778  if test "x$has_forbidden_chars" != x; then
40779    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40780    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40781    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40782    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40783      # Going to short mode and back again did indeed matter. Since short mode is
40784      # case insensitive, let's make it lowercase to improve readability.
40785      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40786      # Now convert it back to Unix-style (cygpath)
40787      input_path=`$CYGPATH -u "$shortmode_path"`
40788      new_path="$input_path"
40789    fi
40790  fi
40791
40792  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40793  if test "x$test_cygdrive_prefix" = x; then
40794    # As a simple fix, exclude /usr/bin since it's not a real path.
40795    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40796      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40797      # a path prefixed by /cygdrive for fixpath to work.
40798      new_path="$CYGWIN_ROOT_PATH$input_path"
40799    fi
40800  fi
40801
40802  # remove trailing .exe if any
40803  new_path="${new_path/%.exe/}"
40804
40805    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40806
40807  # First separate the path from the arguments. This will split at the first
40808  # space.
40809  complete="$NM"
40810  path="${complete%% *}"
40811  tmp="$complete EOL"
40812  arguments="${tmp#* }"
40813
40814  # Input might be given as Windows format, start by converting to
40815  # unix format.
40816  new_path="$path"
40817
40818  windows_path="$new_path"
40819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40820    unix_path=`$CYGPATH -u "$windows_path"`
40821    new_path="$unix_path"
40822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40824    new_path="$unix_path"
40825  fi
40826
40827
40828  # Now try to locate executable using which
40829  new_path=`$WHICH "$new_path" 2> /dev/null`
40830
40831  if test "x$new_path" = x; then
40832    # Oops. Which didn't find the executable.
40833    # The splitting of arguments from the executable at a space might have been incorrect,
40834    # since paths with space are more likely in Windows. Give it another try with the whole
40835    # argument.
40836    path="$complete"
40837    arguments="EOL"
40838    new_path="$path"
40839
40840  windows_path="$new_path"
40841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40842    unix_path=`$CYGPATH -u "$windows_path"`
40843    new_path="$unix_path"
40844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40846    new_path="$unix_path"
40847  fi
40848
40849
40850    new_path=`$WHICH "$new_path" 2> /dev/null`
40851    # bat and cmd files are not always considered executable in MSYS causing which
40852    # to not find them
40853    if test "x$new_path" = x \
40854        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40855        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40856      new_path="$path"
40857
40858  windows_path="$new_path"
40859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40860    unix_path=`$CYGPATH -u "$windows_path"`
40861    new_path="$unix_path"
40862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40864    new_path="$unix_path"
40865  fi
40866
40867    fi
40868
40869    if test "x$new_path" = x; then
40870      # It's still not found. Now this is an unrecoverable error.
40871      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40872$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40873      has_space=`$ECHO "$complete" | $GREP " "`
40874      if test "x$has_space" != x; then
40875        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40876$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40877      fi
40878      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40879    fi
40880  fi
40881
40882  # Now new_path has a complete unix path to the binary
40883  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40884    # Keep paths in /bin as-is, but remove trailing .exe if any
40885    new_path="${new_path/%.exe/}"
40886    # Do not save /bin paths to all_fixpath_prefixes!
40887  else
40888    # Not in mixed or Windows style, start by that.
40889    new_path=`cmd //c echo $new_path`
40890
40891  input_path="$new_path"
40892  # Check if we need to convert this using DOS-style short mode. If the path
40893  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40894  # take no chances and rewrite it.
40895  # Note: m4 eats our [], so we need to use [ and ] instead.
40896  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40897  if test "x$has_forbidden_chars" != x; then
40898    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40899    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40900  fi
40901
40902    # Output is in $new_path
40903
40904  windows_path="$new_path"
40905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40906    unix_path=`$CYGPATH -u "$windows_path"`
40907    new_path="$unix_path"
40908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40910    new_path="$unix_path"
40911  fi
40912
40913    # remove trailing .exe if any
40914    new_path="${new_path/%.exe/}"
40915
40916    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40917    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40918  fi
40919
40920    else
40921      # We're on a unix platform. Hooray! :)
40922      # First separate the path from the arguments. This will split at the first
40923      # space.
40924      complete="$NM"
40925      path="${complete%% *}"
40926      tmp="$complete EOL"
40927      arguments="${tmp#* }"
40928
40929      # Cannot rely on the command "which" here since it doesn't always work.
40930      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40931      if test -z "$is_absolute_path"; then
40932        # Path to executable is not absolute. Find it.
40933        IFS_save="$IFS"
40934        IFS=:
40935        for p in $PATH; do
40936          if test -f "$p/$path" && test -x "$p/$path"; then
40937            new_path="$p/$path"
40938            break
40939          fi
40940        done
40941        IFS="$IFS_save"
40942      else
40943        # This is an absolute path, we can use it without further modifications.
40944        new_path="$path"
40945      fi
40946
40947      if test "x$new_path" = x; then
40948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40949$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40950        has_space=`$ECHO "$complete" | $GREP " "`
40951        if test "x$has_space" != x; then
40952          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40953$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40954        fi
40955        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40956      fi
40957    fi
40958
40959    # Now join together the path and the arguments once again
40960    if test "x$arguments" != xEOL; then
40961      new_complete="$new_path ${arguments% *}"
40962    else
40963      new_complete="$new_path"
40964    fi
40965
40966    if test "x$complete" != "x$new_complete"; then
40967      NM="$new_complete"
40968      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40969$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40970    fi
40971  fi
40972
40973
40974
40975  # Publish this variable in the help.
40976
40977
40978  if [ -z "${GNM+x}" ]; then
40979    # The variable is not set by user, try to locate tool using the code snippet
40980    for ac_prog in gnm
40981do
40982  # Extract the first word of "$ac_prog", so it can be a program name with args.
40983set dummy $ac_prog; ac_word=$2
40984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40985$as_echo_n "checking for $ac_word... " >&6; }
40986if ${ac_cv_path_GNM+:} false; then :
40987  $as_echo_n "(cached) " >&6
40988else
40989  case $GNM in
40990  [\\/]* | ?:[\\/]*)
40991  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40992  ;;
40993  *)
40994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40995for as_dir in $PATH
40996do
40997  IFS=$as_save_IFS
40998  test -z "$as_dir" && as_dir=.
40999    for ac_exec_ext in '' $ac_executable_extensions; do
41000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41001    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41003    break 2
41004  fi
41005done
41006  done
41007IFS=$as_save_IFS
41008
41009  ;;
41010esac
41011fi
41012GNM=$ac_cv_path_GNM
41013if test -n "$GNM"; then
41014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41015$as_echo "$GNM" >&6; }
41016else
41017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41018$as_echo "no" >&6; }
41019fi
41020
41021
41022  test -n "$GNM" && break
41023done
41024
41025  else
41026    # The variable is set, but is it from the command line or the environment?
41027
41028    # Try to remove the string !GNM! from our list.
41029    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
41030    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41031      # If it failed, the variable was not from the command line. Ignore it,
41032      # but warn the user (except for BASH, which is always set by the calling BASH).
41033      if test "xGNM" != xBASH; then
41034        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
41035$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
41036      fi
41037      # Try to locate tool using the code snippet
41038      for ac_prog in gnm
41039do
41040  # Extract the first word of "$ac_prog", so it can be a program name with args.
41041set dummy $ac_prog; ac_word=$2
41042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41043$as_echo_n "checking for $ac_word... " >&6; }
41044if ${ac_cv_path_GNM+:} false; then :
41045  $as_echo_n "(cached) " >&6
41046else
41047  case $GNM in
41048  [\\/]* | ?:[\\/]*)
41049  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41050  ;;
41051  *)
41052  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41053for as_dir in $PATH
41054do
41055  IFS=$as_save_IFS
41056  test -z "$as_dir" && as_dir=.
41057    for ac_exec_ext in '' $ac_executable_extensions; do
41058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41059    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41061    break 2
41062  fi
41063done
41064  done
41065IFS=$as_save_IFS
41066
41067  ;;
41068esac
41069fi
41070GNM=$ac_cv_path_GNM
41071if test -n "$GNM"; then
41072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41073$as_echo "$GNM" >&6; }
41074else
41075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41076$as_echo "no" >&6; }
41077fi
41078
41079
41080  test -n "$GNM" && break
41081done
41082
41083    else
41084      # If it succeeded, then it was overridden by the user. We will use it
41085      # for the tool.
41086
41087      # First remove it from the list of overridden variables, so we can test
41088      # for unknown variables in the end.
41089      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41090
41091      # Check if we try to supply an empty value
41092      if test "x$GNM" = x; then
41093        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
41094$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
41095        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41096$as_echo_n "checking for GNM... " >&6; }
41097        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41098$as_echo "disabled" >&6; }
41099      else
41100        # Check if the provided tool contains a complete path.
41101        tool_specified="$GNM"
41102        tool_basename="${tool_specified##*/}"
41103        if test "x$tool_basename" = "x$tool_specified"; then
41104          # A command without a complete path is provided, search $PATH.
41105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
41106$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
41107          # Extract the first word of "$tool_basename", so it can be a program name with args.
41108set dummy $tool_basename; ac_word=$2
41109{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41110$as_echo_n "checking for $ac_word... " >&6; }
41111if ${ac_cv_path_GNM+:} false; then :
41112  $as_echo_n "(cached) " >&6
41113else
41114  case $GNM in
41115  [\\/]* | ?:[\\/]*)
41116  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
41117  ;;
41118  *)
41119  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41120for as_dir in $PATH
41121do
41122  IFS=$as_save_IFS
41123  test -z "$as_dir" && as_dir=.
41124    for ac_exec_ext in '' $ac_executable_extensions; do
41125  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41126    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
41127    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41128    break 2
41129  fi
41130done
41131  done
41132IFS=$as_save_IFS
41133
41134  ;;
41135esac
41136fi
41137GNM=$ac_cv_path_GNM
41138if test -n "$GNM"; then
41139  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
41140$as_echo "$GNM" >&6; }
41141else
41142  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41143$as_echo "no" >&6; }
41144fi
41145
41146
41147          if test "x$GNM" = x; then
41148            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41149          fi
41150        else
41151          # Otherwise we believe it is a complete path. Use it as it is.
41152          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
41153$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
41154          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
41155$as_echo_n "checking for GNM... " >&6; }
41156          if test ! -x "$tool_specified"; then
41157            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41158$as_echo "not found" >&6; }
41159            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
41160          fi
41161          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41162$as_echo "$tool_specified" >&6; }
41163        fi
41164      fi
41165    fi
41166
41167  fi
41168
41169
41170
41171  # Only process if variable expands to non-empty
41172
41173  if test "x$GNM" != x; then
41174    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41175
41176  # First separate the path from the arguments. This will split at the first
41177  # space.
41178  complete="$GNM"
41179  path="${complete%% *}"
41180  tmp="$complete EOL"
41181  arguments="${tmp#* }"
41182
41183  # Input might be given as Windows format, start by converting to
41184  # unix format.
41185  new_path=`$CYGPATH -u "$path"`
41186
41187  # Now try to locate executable using which
41188  new_path=`$WHICH "$new_path" 2> /dev/null`
41189  # bat and cmd files are not always considered executable in cygwin causing which
41190  # to not find them
41191  if test "x$new_path" = x \
41192      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41193      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41194    new_path=`$CYGPATH -u "$path"`
41195  fi
41196  if test "x$new_path" = x; then
41197    # Oops. Which didn't find the executable.
41198    # The splitting of arguments from the executable at a space might have been incorrect,
41199    # since paths with space are more likely in Windows. Give it another try with the whole
41200    # argument.
41201    path="$complete"
41202    arguments="EOL"
41203    new_path=`$CYGPATH -u "$path"`
41204    new_path=`$WHICH "$new_path" 2> /dev/null`
41205    # bat and cmd files are not always considered executable in cygwin causing which
41206    # to not find them
41207    if test "x$new_path" = x \
41208        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41209        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41210      new_path=`$CYGPATH -u "$path"`
41211    fi
41212    if test "x$new_path" = x; then
41213      # It's still not found. Now this is an unrecoverable error.
41214      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41215$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41216      has_space=`$ECHO "$complete" | $GREP " "`
41217      if test "x$has_space" != x; then
41218        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41219$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41220      fi
41221      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41222    fi
41223  fi
41224
41225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41228  # "foo.exe" is OK but "foo" is an error.
41229  #
41230  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41231  # It is also a way to make sure we got the proper file name for the real test later on.
41232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41233  if test "x$test_shortpath" = x; then
41234    # Short path failed, file does not exist as specified.
41235    # Try adding .exe or .cmd
41236    if test -f "${new_path}.exe"; then
41237      input_to_shortpath="${new_path}.exe"
41238    elif test -f "${new_path}.cmd"; then
41239      input_to_shortpath="${new_path}.cmd"
41240    else
41241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
41242$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
41243      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41244$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41245      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41246    fi
41247  else
41248    input_to_shortpath="$new_path"
41249  fi
41250
41251  # Call helper function which possibly converts this using DOS-style short mode.
41252  # If so, the updated path is stored in $new_path.
41253  new_path="$input_to_shortpath"
41254
41255  input_path="$input_to_shortpath"
41256  # Check if we need to convert this using DOS-style short mode. If the path
41257  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41258  # take no chances and rewrite it.
41259  # Note: m4 eats our [], so we need to use [ and ] instead.
41260  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41261  if test "x$has_forbidden_chars" != x; then
41262    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41263    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41264    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41265    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41266      # Going to short mode and back again did indeed matter. Since short mode is
41267      # case insensitive, let's make it lowercase to improve readability.
41268      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41269      # Now convert it back to Unix-style (cygpath)
41270      input_path=`$CYGPATH -u "$shortmode_path"`
41271      new_path="$input_path"
41272    fi
41273  fi
41274
41275  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41276  if test "x$test_cygdrive_prefix" = x; then
41277    # As a simple fix, exclude /usr/bin since it's not a real path.
41278    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41279      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41280      # a path prefixed by /cygdrive for fixpath to work.
41281      new_path="$CYGWIN_ROOT_PATH$input_path"
41282    fi
41283  fi
41284
41285  # remove trailing .exe if any
41286  new_path="${new_path/%.exe/}"
41287
41288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41289
41290  # First separate the path from the arguments. This will split at the first
41291  # space.
41292  complete="$GNM"
41293  path="${complete%% *}"
41294  tmp="$complete EOL"
41295  arguments="${tmp#* }"
41296
41297  # Input might be given as Windows format, start by converting to
41298  # unix format.
41299  new_path="$path"
41300
41301  windows_path="$new_path"
41302  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41303    unix_path=`$CYGPATH -u "$windows_path"`
41304    new_path="$unix_path"
41305  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41306    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41307    new_path="$unix_path"
41308  fi
41309
41310
41311  # Now try to locate executable using which
41312  new_path=`$WHICH "$new_path" 2> /dev/null`
41313
41314  if test "x$new_path" = x; then
41315    # Oops. Which didn't find the executable.
41316    # The splitting of arguments from the executable at a space might have been incorrect,
41317    # since paths with space are more likely in Windows. Give it another try with the whole
41318    # argument.
41319    path="$complete"
41320    arguments="EOL"
41321    new_path="$path"
41322
41323  windows_path="$new_path"
41324  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41325    unix_path=`$CYGPATH -u "$windows_path"`
41326    new_path="$unix_path"
41327  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41328    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41329    new_path="$unix_path"
41330  fi
41331
41332
41333    new_path=`$WHICH "$new_path" 2> /dev/null`
41334    # bat and cmd files are not always considered executable in MSYS causing which
41335    # to not find them
41336    if test "x$new_path" = x \
41337        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41338        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41339      new_path="$path"
41340
41341  windows_path="$new_path"
41342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41343    unix_path=`$CYGPATH -u "$windows_path"`
41344    new_path="$unix_path"
41345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41347    new_path="$unix_path"
41348  fi
41349
41350    fi
41351
41352    if test "x$new_path" = x; then
41353      # It's still not found. Now this is an unrecoverable error.
41354      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41355$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41356      has_space=`$ECHO "$complete" | $GREP " "`
41357      if test "x$has_space" != x; then
41358        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41359$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41360      fi
41361      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41362    fi
41363  fi
41364
41365  # Now new_path has a complete unix path to the binary
41366  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41367    # Keep paths in /bin as-is, but remove trailing .exe if any
41368    new_path="${new_path/%.exe/}"
41369    # Do not save /bin paths to all_fixpath_prefixes!
41370  else
41371    # Not in mixed or Windows style, start by that.
41372    new_path=`cmd //c echo $new_path`
41373
41374  input_path="$new_path"
41375  # Check if we need to convert this using DOS-style short mode. If the path
41376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41377  # take no chances and rewrite it.
41378  # Note: m4 eats our [], so we need to use [ and ] instead.
41379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41380  if test "x$has_forbidden_chars" != x; then
41381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41383  fi
41384
41385    # Output is in $new_path
41386
41387  windows_path="$new_path"
41388  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41389    unix_path=`$CYGPATH -u "$windows_path"`
41390    new_path="$unix_path"
41391  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41392    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41393    new_path="$unix_path"
41394  fi
41395
41396    # remove trailing .exe if any
41397    new_path="${new_path/%.exe/}"
41398
41399    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41400    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41401  fi
41402
41403    else
41404      # We're on a unix platform. Hooray! :)
41405      # First separate the path from the arguments. This will split at the first
41406      # space.
41407      complete="$GNM"
41408      path="${complete%% *}"
41409      tmp="$complete EOL"
41410      arguments="${tmp#* }"
41411
41412      # Cannot rely on the command "which" here since it doesn't always work.
41413      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41414      if test -z "$is_absolute_path"; then
41415        # Path to executable is not absolute. Find it.
41416        IFS_save="$IFS"
41417        IFS=:
41418        for p in $PATH; do
41419          if test -f "$p/$path" && test -x "$p/$path"; then
41420            new_path="$p/$path"
41421            break
41422          fi
41423        done
41424        IFS="$IFS_save"
41425      else
41426        # This is an absolute path, we can use it without further modifications.
41427        new_path="$path"
41428      fi
41429
41430      if test "x$new_path" = x; then
41431        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41432$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41433        has_space=`$ECHO "$complete" | $GREP " "`
41434        if test "x$has_space" != x; then
41435          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41436$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41437        fi
41438        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41439      fi
41440    fi
41441
41442    # Now join together the path and the arguments once again
41443    if test "x$arguments" != xEOL; then
41444      new_complete="$new_path ${arguments% *}"
41445    else
41446      new_complete="$new_path"
41447    fi
41448
41449    if test "x$complete" != "x$new_complete"; then
41450      GNM="$new_complete"
41451      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41452$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41453    fi
41454  fi
41455
41456  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41457    # FIXME: we should unify this with the solaris case above.
41458
41459
41460  # Publish this variable in the help.
41461
41462
41463  if [ -z "${STRIP+x}" ]; then
41464    # The variable is not set by user, try to locate tool using the code snippet
41465    if test -n "$ac_tool_prefix"; then
41466  for ac_prog in strip
41467  do
41468    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41469set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41471$as_echo_n "checking for $ac_word... " >&6; }
41472if ${ac_cv_prog_STRIP+:} false; then :
41473  $as_echo_n "(cached) " >&6
41474else
41475  if test -n "$STRIP"; then
41476  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41477else
41478as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41479for as_dir in $PATH
41480do
41481  IFS=$as_save_IFS
41482  test -z "$as_dir" && as_dir=.
41483    for ac_exec_ext in '' $ac_executable_extensions; do
41484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41485    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41487    break 2
41488  fi
41489done
41490  done
41491IFS=$as_save_IFS
41492
41493fi
41494fi
41495STRIP=$ac_cv_prog_STRIP
41496if test -n "$STRIP"; then
41497  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41498$as_echo "$STRIP" >&6; }
41499else
41500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41501$as_echo "no" >&6; }
41502fi
41503
41504
41505    test -n "$STRIP" && break
41506  done
41507fi
41508if test -z "$STRIP"; then
41509  ac_ct_STRIP=$STRIP
41510  for ac_prog in strip
41511do
41512  # Extract the first word of "$ac_prog", so it can be a program name with args.
41513set dummy $ac_prog; ac_word=$2
41514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41515$as_echo_n "checking for $ac_word... " >&6; }
41516if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41517  $as_echo_n "(cached) " >&6
41518else
41519  if test -n "$ac_ct_STRIP"; then
41520  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41521else
41522as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41523for as_dir in $PATH
41524do
41525  IFS=$as_save_IFS
41526  test -z "$as_dir" && as_dir=.
41527    for ac_exec_ext in '' $ac_executable_extensions; do
41528  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41529    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41530    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41531    break 2
41532  fi
41533done
41534  done
41535IFS=$as_save_IFS
41536
41537fi
41538fi
41539ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41540if test -n "$ac_ct_STRIP"; then
41541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41542$as_echo "$ac_ct_STRIP" >&6; }
41543else
41544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41545$as_echo "no" >&6; }
41546fi
41547
41548
41549  test -n "$ac_ct_STRIP" && break
41550done
41551
41552  if test "x$ac_ct_STRIP" = x; then
41553    STRIP=""
41554  else
41555    case $cross_compiling:$ac_tool_warned in
41556yes:)
41557{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41558$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41559ac_tool_warned=yes ;;
41560esac
41561    STRIP=$ac_ct_STRIP
41562  fi
41563fi
41564
41565  else
41566    # The variable is set, but is it from the command line or the environment?
41567
41568    # Try to remove the string !STRIP! from our list.
41569    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41570    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41571      # If it failed, the variable was not from the command line. Ignore it,
41572      # but warn the user (except for BASH, which is always set by the calling BASH).
41573      if test "xSTRIP" != xBASH; then
41574        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41575$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41576      fi
41577      # Try to locate tool using the code snippet
41578      if test -n "$ac_tool_prefix"; then
41579  for ac_prog in strip
41580  do
41581    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41582set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41584$as_echo_n "checking for $ac_word... " >&6; }
41585if ${ac_cv_prog_STRIP+:} false; then :
41586  $as_echo_n "(cached) " >&6
41587else
41588  if test -n "$STRIP"; then
41589  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41590else
41591as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41592for as_dir in $PATH
41593do
41594  IFS=$as_save_IFS
41595  test -z "$as_dir" && as_dir=.
41596    for ac_exec_ext in '' $ac_executable_extensions; do
41597  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41598    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41599    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41600    break 2
41601  fi
41602done
41603  done
41604IFS=$as_save_IFS
41605
41606fi
41607fi
41608STRIP=$ac_cv_prog_STRIP
41609if test -n "$STRIP"; then
41610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41611$as_echo "$STRIP" >&6; }
41612else
41613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41614$as_echo "no" >&6; }
41615fi
41616
41617
41618    test -n "$STRIP" && break
41619  done
41620fi
41621if test -z "$STRIP"; then
41622  ac_ct_STRIP=$STRIP
41623  for ac_prog in strip
41624do
41625  # Extract the first word of "$ac_prog", so it can be a program name with args.
41626set dummy $ac_prog; ac_word=$2
41627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41628$as_echo_n "checking for $ac_word... " >&6; }
41629if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41630  $as_echo_n "(cached) " >&6
41631else
41632  if test -n "$ac_ct_STRIP"; then
41633  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41634else
41635as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41636for as_dir in $PATH
41637do
41638  IFS=$as_save_IFS
41639  test -z "$as_dir" && as_dir=.
41640    for ac_exec_ext in '' $ac_executable_extensions; do
41641  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41642    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41643    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41644    break 2
41645  fi
41646done
41647  done
41648IFS=$as_save_IFS
41649
41650fi
41651fi
41652ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41653if test -n "$ac_ct_STRIP"; then
41654  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41655$as_echo "$ac_ct_STRIP" >&6; }
41656else
41657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41658$as_echo "no" >&6; }
41659fi
41660
41661
41662  test -n "$ac_ct_STRIP" && break
41663done
41664
41665  if test "x$ac_ct_STRIP" = x; then
41666    STRIP=""
41667  else
41668    case $cross_compiling:$ac_tool_warned in
41669yes:)
41670{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41671$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41672ac_tool_warned=yes ;;
41673esac
41674    STRIP=$ac_ct_STRIP
41675  fi
41676fi
41677
41678    else
41679      # If it succeeded, then it was overridden by the user. We will use it
41680      # for the tool.
41681
41682      # First remove it from the list of overridden variables, so we can test
41683      # for unknown variables in the end.
41684      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41685
41686      # Check if we try to supply an empty value
41687      if test "x$STRIP" = x; then
41688        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41689$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41690        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41691$as_echo_n "checking for STRIP... " >&6; }
41692        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41693$as_echo "disabled" >&6; }
41694      else
41695        # Check if the provided tool contains a complete path.
41696        tool_specified="$STRIP"
41697        tool_basename="${tool_specified##*/}"
41698        if test "x$tool_basename" = "x$tool_specified"; then
41699          # A command without a complete path is provided, search $PATH.
41700          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41701$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41702          # Extract the first word of "$tool_basename", so it can be a program name with args.
41703set dummy $tool_basename; ac_word=$2
41704{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41705$as_echo_n "checking for $ac_word... " >&6; }
41706if ${ac_cv_path_STRIP+:} false; then :
41707  $as_echo_n "(cached) " >&6
41708else
41709  case $STRIP in
41710  [\\/]* | ?:[\\/]*)
41711  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41712  ;;
41713  *)
41714  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41715for as_dir in $PATH
41716do
41717  IFS=$as_save_IFS
41718  test -z "$as_dir" && as_dir=.
41719    for ac_exec_ext in '' $ac_executable_extensions; do
41720  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41721    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41722    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41723    break 2
41724  fi
41725done
41726  done
41727IFS=$as_save_IFS
41728
41729  ;;
41730esac
41731fi
41732STRIP=$ac_cv_path_STRIP
41733if test -n "$STRIP"; then
41734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41735$as_echo "$STRIP" >&6; }
41736else
41737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41738$as_echo "no" >&6; }
41739fi
41740
41741
41742          if test "x$STRIP" = x; then
41743            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41744          fi
41745        else
41746          # Otherwise we believe it is a complete path. Use it as it is.
41747          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41748$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41749          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41750$as_echo_n "checking for STRIP... " >&6; }
41751          if test ! -x "$tool_specified"; then
41752            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41753$as_echo "not found" >&6; }
41754            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41755          fi
41756          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41757$as_echo "$tool_specified" >&6; }
41758        fi
41759      fi
41760    fi
41761
41762  fi
41763
41764
41765
41766  # Only process if variable expands to non-empty
41767
41768  if test "x$STRIP" != x; then
41769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41770
41771  # First separate the path from the arguments. This will split at the first
41772  # space.
41773  complete="$STRIP"
41774  path="${complete%% *}"
41775  tmp="$complete EOL"
41776  arguments="${tmp#* }"
41777
41778  # Input might be given as Windows format, start by converting to
41779  # unix format.
41780  new_path=`$CYGPATH -u "$path"`
41781
41782  # Now try to locate executable using which
41783  new_path=`$WHICH "$new_path" 2> /dev/null`
41784  # bat and cmd files are not always considered executable in cygwin causing which
41785  # to not find them
41786  if test "x$new_path" = x \
41787      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41788      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41789    new_path=`$CYGPATH -u "$path"`
41790  fi
41791  if test "x$new_path" = x; then
41792    # Oops. Which didn't find the executable.
41793    # The splitting of arguments from the executable at a space might have been incorrect,
41794    # since paths with space are more likely in Windows. Give it another try with the whole
41795    # argument.
41796    path="$complete"
41797    arguments="EOL"
41798    new_path=`$CYGPATH -u "$path"`
41799    new_path=`$WHICH "$new_path" 2> /dev/null`
41800    # bat and cmd files are not always considered executable in cygwin causing which
41801    # to not find them
41802    if test "x$new_path" = x \
41803        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41804        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41805      new_path=`$CYGPATH -u "$path"`
41806    fi
41807    if test "x$new_path" = x; then
41808      # It's still not found. Now this is an unrecoverable error.
41809      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41810$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41811      has_space=`$ECHO "$complete" | $GREP " "`
41812      if test "x$has_space" != x; then
41813        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41814$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41815      fi
41816      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41817    fi
41818  fi
41819
41820  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41821  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41822  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41823  # "foo.exe" is OK but "foo" is an error.
41824  #
41825  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41826  # It is also a way to make sure we got the proper file name for the real test later on.
41827  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41828  if test "x$test_shortpath" = x; then
41829    # Short path failed, file does not exist as specified.
41830    # Try adding .exe or .cmd
41831    if test -f "${new_path}.exe"; then
41832      input_to_shortpath="${new_path}.exe"
41833    elif test -f "${new_path}.cmd"; then
41834      input_to_shortpath="${new_path}.cmd"
41835    else
41836      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41837$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41838      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41839$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41840      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41841    fi
41842  else
41843    input_to_shortpath="$new_path"
41844  fi
41845
41846  # Call helper function which possibly converts this using DOS-style short mode.
41847  # If so, the updated path is stored in $new_path.
41848  new_path="$input_to_shortpath"
41849
41850  input_path="$input_to_shortpath"
41851  # Check if we need to convert this using DOS-style short mode. If the path
41852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41853  # take no chances and rewrite it.
41854  # Note: m4 eats our [], so we need to use [ and ] instead.
41855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41856  if test "x$has_forbidden_chars" != x; then
41857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41858    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41859    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41860    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41861      # Going to short mode and back again did indeed matter. Since short mode is
41862      # case insensitive, let's make it lowercase to improve readability.
41863      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41864      # Now convert it back to Unix-style (cygpath)
41865      input_path=`$CYGPATH -u "$shortmode_path"`
41866      new_path="$input_path"
41867    fi
41868  fi
41869
41870  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41871  if test "x$test_cygdrive_prefix" = x; then
41872    # As a simple fix, exclude /usr/bin since it's not a real path.
41873    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41874      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41875      # a path prefixed by /cygdrive for fixpath to work.
41876      new_path="$CYGWIN_ROOT_PATH$input_path"
41877    fi
41878  fi
41879
41880  # remove trailing .exe if any
41881  new_path="${new_path/%.exe/}"
41882
41883    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41884
41885  # First separate the path from the arguments. This will split at the first
41886  # space.
41887  complete="$STRIP"
41888  path="${complete%% *}"
41889  tmp="$complete EOL"
41890  arguments="${tmp#* }"
41891
41892  # Input might be given as Windows format, start by converting to
41893  # unix format.
41894  new_path="$path"
41895
41896  windows_path="$new_path"
41897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41898    unix_path=`$CYGPATH -u "$windows_path"`
41899    new_path="$unix_path"
41900  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41901    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41902    new_path="$unix_path"
41903  fi
41904
41905
41906  # Now try to locate executable using which
41907  new_path=`$WHICH "$new_path" 2> /dev/null`
41908
41909  if test "x$new_path" = x; then
41910    # Oops. Which didn't find the executable.
41911    # The splitting of arguments from the executable at a space might have been incorrect,
41912    # since paths with space are more likely in Windows. Give it another try with the whole
41913    # argument.
41914    path="$complete"
41915    arguments="EOL"
41916    new_path="$path"
41917
41918  windows_path="$new_path"
41919  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41920    unix_path=`$CYGPATH -u "$windows_path"`
41921    new_path="$unix_path"
41922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41923    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41924    new_path="$unix_path"
41925  fi
41926
41927
41928    new_path=`$WHICH "$new_path" 2> /dev/null`
41929    # bat and cmd files are not always considered executable in MSYS causing which
41930    # to not find them
41931    if test "x$new_path" = x \
41932        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41933        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41934      new_path="$path"
41935
41936  windows_path="$new_path"
41937  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41938    unix_path=`$CYGPATH -u "$windows_path"`
41939    new_path="$unix_path"
41940  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41941    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41942    new_path="$unix_path"
41943  fi
41944
41945    fi
41946
41947    if test "x$new_path" = x; then
41948      # It's still not found. Now this is an unrecoverable error.
41949      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41950$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41951      has_space=`$ECHO "$complete" | $GREP " "`
41952      if test "x$has_space" != x; then
41953        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41954$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41955      fi
41956      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41957    fi
41958  fi
41959
41960  # Now new_path has a complete unix path to the binary
41961  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41962    # Keep paths in /bin as-is, but remove trailing .exe if any
41963    new_path="${new_path/%.exe/}"
41964    # Do not save /bin paths to all_fixpath_prefixes!
41965  else
41966    # Not in mixed or Windows style, start by that.
41967    new_path=`cmd //c echo $new_path`
41968
41969  input_path="$new_path"
41970  # Check if we need to convert this using DOS-style short mode. If the path
41971  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41972  # take no chances and rewrite it.
41973  # Note: m4 eats our [], so we need to use [ and ] instead.
41974  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41975  if test "x$has_forbidden_chars" != x; then
41976    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41977    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41978  fi
41979
41980    # Output is in $new_path
41981
41982  windows_path="$new_path"
41983  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41984    unix_path=`$CYGPATH -u "$windows_path"`
41985    new_path="$unix_path"
41986  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41987    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41988    new_path="$unix_path"
41989  fi
41990
41991    # remove trailing .exe if any
41992    new_path="${new_path/%.exe/}"
41993
41994    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41995    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41996  fi
41997
41998    else
41999      # We're on a unix platform. Hooray! :)
42000      # First separate the path from the arguments. This will split at the first
42001      # space.
42002      complete="$STRIP"
42003      path="${complete%% *}"
42004      tmp="$complete EOL"
42005      arguments="${tmp#* }"
42006
42007      # Cannot rely on the command "which" here since it doesn't always work.
42008      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42009      if test -z "$is_absolute_path"; then
42010        # Path to executable is not absolute. Find it.
42011        IFS_save="$IFS"
42012        IFS=:
42013        for p in $PATH; do
42014          if test -f "$p/$path" && test -x "$p/$path"; then
42015            new_path="$p/$path"
42016            break
42017          fi
42018        done
42019        IFS="$IFS_save"
42020      else
42021        # This is an absolute path, we can use it without further modifications.
42022        new_path="$path"
42023      fi
42024
42025      if test "x$new_path" = x; then
42026        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
42027$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
42028        has_space=`$ECHO "$complete" | $GREP " "`
42029        if test "x$has_space" != x; then
42030          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42031$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42032        fi
42033        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
42034      fi
42035    fi
42036
42037    # Now join together the path and the arguments once again
42038    if test "x$arguments" != xEOL; then
42039      new_complete="$new_path ${arguments% *}"
42040    else
42041      new_complete="$new_path"
42042    fi
42043
42044    if test "x$complete" != "x$new_complete"; then
42045      STRIP="$new_complete"
42046      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
42047$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
42048    fi
42049  fi
42050
42051    if test "x$TOOLCHAIN_TYPE" = xgcc; then
42052
42053
42054  # Publish this variable in the help.
42055
42056
42057  if [ -z "${NM+x}" ]; then
42058    # The variable is not set by user, try to locate tool using the code snippet
42059    if test -n "$ac_tool_prefix"; then
42060  for ac_prog in nm gcc-nm
42061  do
42062    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42063set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42064{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42065$as_echo_n "checking for $ac_word... " >&6; }
42066if ${ac_cv_prog_NM+:} false; then :
42067  $as_echo_n "(cached) " >&6
42068else
42069  if test -n "$NM"; then
42070  ac_cv_prog_NM="$NM" # Let the user override the test.
42071else
42072as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42073for as_dir in $PATH
42074do
42075  IFS=$as_save_IFS
42076  test -z "$as_dir" && as_dir=.
42077    for ac_exec_ext in '' $ac_executable_extensions; do
42078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42079    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42081    break 2
42082  fi
42083done
42084  done
42085IFS=$as_save_IFS
42086
42087fi
42088fi
42089NM=$ac_cv_prog_NM
42090if test -n "$NM"; then
42091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42092$as_echo "$NM" >&6; }
42093else
42094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42095$as_echo "no" >&6; }
42096fi
42097
42098
42099    test -n "$NM" && break
42100  done
42101fi
42102if test -z "$NM"; then
42103  ac_ct_NM=$NM
42104  for ac_prog in nm gcc-nm
42105do
42106  # Extract the first word of "$ac_prog", so it can be a program name with args.
42107set dummy $ac_prog; ac_word=$2
42108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42109$as_echo_n "checking for $ac_word... " >&6; }
42110if ${ac_cv_prog_ac_ct_NM+:} false; then :
42111  $as_echo_n "(cached) " >&6
42112else
42113  if test -n "$ac_ct_NM"; then
42114  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42115else
42116as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42117for as_dir in $PATH
42118do
42119  IFS=$as_save_IFS
42120  test -z "$as_dir" && as_dir=.
42121    for ac_exec_ext in '' $ac_executable_extensions; do
42122  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42123    ac_cv_prog_ac_ct_NM="$ac_prog"
42124    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42125    break 2
42126  fi
42127done
42128  done
42129IFS=$as_save_IFS
42130
42131fi
42132fi
42133ac_ct_NM=$ac_cv_prog_ac_ct_NM
42134if test -n "$ac_ct_NM"; then
42135  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42136$as_echo "$ac_ct_NM" >&6; }
42137else
42138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42139$as_echo "no" >&6; }
42140fi
42141
42142
42143  test -n "$ac_ct_NM" && break
42144done
42145
42146  if test "x$ac_ct_NM" = x; then
42147    NM=""
42148  else
42149    case $cross_compiling:$ac_tool_warned in
42150yes:)
42151{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42152$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42153ac_tool_warned=yes ;;
42154esac
42155    NM=$ac_ct_NM
42156  fi
42157fi
42158
42159  else
42160    # The variable is set, but is it from the command line or the environment?
42161
42162    # Try to remove the string !NM! from our list.
42163    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42164    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42165      # If it failed, the variable was not from the command line. Ignore it,
42166      # but warn the user (except for BASH, which is always set by the calling BASH).
42167      if test "xNM" != xBASH; then
42168        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42169$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42170      fi
42171      # Try to locate tool using the code snippet
42172      if test -n "$ac_tool_prefix"; then
42173  for ac_prog in nm gcc-nm
42174  do
42175    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42176set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42178$as_echo_n "checking for $ac_word... " >&6; }
42179if ${ac_cv_prog_NM+:} false; then :
42180  $as_echo_n "(cached) " >&6
42181else
42182  if test -n "$NM"; then
42183  ac_cv_prog_NM="$NM" # Let the user override the test.
42184else
42185as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42186for as_dir in $PATH
42187do
42188  IFS=$as_save_IFS
42189  test -z "$as_dir" && as_dir=.
42190    for ac_exec_ext in '' $ac_executable_extensions; do
42191  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42192    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42193    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42194    break 2
42195  fi
42196done
42197  done
42198IFS=$as_save_IFS
42199
42200fi
42201fi
42202NM=$ac_cv_prog_NM
42203if test -n "$NM"; then
42204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42205$as_echo "$NM" >&6; }
42206else
42207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42208$as_echo "no" >&6; }
42209fi
42210
42211
42212    test -n "$NM" && break
42213  done
42214fi
42215if test -z "$NM"; then
42216  ac_ct_NM=$NM
42217  for ac_prog in nm gcc-nm
42218do
42219  # Extract the first word of "$ac_prog", so it can be a program name with args.
42220set dummy $ac_prog; ac_word=$2
42221{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42222$as_echo_n "checking for $ac_word... " >&6; }
42223if ${ac_cv_prog_ac_ct_NM+:} false; then :
42224  $as_echo_n "(cached) " >&6
42225else
42226  if test -n "$ac_ct_NM"; then
42227  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42228else
42229as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42230for as_dir in $PATH
42231do
42232  IFS=$as_save_IFS
42233  test -z "$as_dir" && as_dir=.
42234    for ac_exec_ext in '' $ac_executable_extensions; do
42235  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42236    ac_cv_prog_ac_ct_NM="$ac_prog"
42237    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42238    break 2
42239  fi
42240done
42241  done
42242IFS=$as_save_IFS
42243
42244fi
42245fi
42246ac_ct_NM=$ac_cv_prog_ac_ct_NM
42247if test -n "$ac_ct_NM"; then
42248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42249$as_echo "$ac_ct_NM" >&6; }
42250else
42251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42252$as_echo "no" >&6; }
42253fi
42254
42255
42256  test -n "$ac_ct_NM" && break
42257done
42258
42259  if test "x$ac_ct_NM" = x; then
42260    NM=""
42261  else
42262    case $cross_compiling:$ac_tool_warned in
42263yes:)
42264{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42265$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42266ac_tool_warned=yes ;;
42267esac
42268    NM=$ac_ct_NM
42269  fi
42270fi
42271
42272    else
42273      # If it succeeded, then it was overridden by the user. We will use it
42274      # for the tool.
42275
42276      # First remove it from the list of overridden variables, so we can test
42277      # for unknown variables in the end.
42278      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42279
42280      # Check if we try to supply an empty value
42281      if test "x$NM" = x; then
42282        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42283$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42284        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42285$as_echo_n "checking for NM... " >&6; }
42286        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42287$as_echo "disabled" >&6; }
42288      else
42289        # Check if the provided tool contains a complete path.
42290        tool_specified="$NM"
42291        tool_basename="${tool_specified##*/}"
42292        if test "x$tool_basename" = "x$tool_specified"; then
42293          # A command without a complete path is provided, search $PATH.
42294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42295$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42296          # Extract the first word of "$tool_basename", so it can be a program name with args.
42297set dummy $tool_basename; ac_word=$2
42298{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42299$as_echo_n "checking for $ac_word... " >&6; }
42300if ${ac_cv_path_NM+:} false; then :
42301  $as_echo_n "(cached) " >&6
42302else
42303  case $NM in
42304  [\\/]* | ?:[\\/]*)
42305  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42306  ;;
42307  *)
42308  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42309for as_dir in $PATH
42310do
42311  IFS=$as_save_IFS
42312  test -z "$as_dir" && as_dir=.
42313    for ac_exec_ext in '' $ac_executable_extensions; do
42314  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42315    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42316    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42317    break 2
42318  fi
42319done
42320  done
42321IFS=$as_save_IFS
42322
42323  ;;
42324esac
42325fi
42326NM=$ac_cv_path_NM
42327if test -n "$NM"; then
42328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42329$as_echo "$NM" >&6; }
42330else
42331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42332$as_echo "no" >&6; }
42333fi
42334
42335
42336          if test "x$NM" = x; then
42337            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42338          fi
42339        else
42340          # Otherwise we believe it is a complete path. Use it as it is.
42341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42342$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42343          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42344$as_echo_n "checking for NM... " >&6; }
42345          if test ! -x "$tool_specified"; then
42346            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42347$as_echo "not found" >&6; }
42348            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42349          fi
42350          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42351$as_echo "$tool_specified" >&6; }
42352        fi
42353      fi
42354    fi
42355
42356  fi
42357
42358
42359    else
42360
42361
42362  # Publish this variable in the help.
42363
42364
42365  if [ -z "${NM+x}" ]; then
42366    # The variable is not set by user, try to locate tool using the code snippet
42367    if test -n "$ac_tool_prefix"; then
42368  for ac_prog in nm
42369  do
42370    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42371set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42373$as_echo_n "checking for $ac_word... " >&6; }
42374if ${ac_cv_prog_NM+:} false; then :
42375  $as_echo_n "(cached) " >&6
42376else
42377  if test -n "$NM"; then
42378  ac_cv_prog_NM="$NM" # Let the user override the test.
42379else
42380as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42381for as_dir in $PATH
42382do
42383  IFS=$as_save_IFS
42384  test -z "$as_dir" && as_dir=.
42385    for ac_exec_ext in '' $ac_executable_extensions; do
42386  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42387    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42388    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42389    break 2
42390  fi
42391done
42392  done
42393IFS=$as_save_IFS
42394
42395fi
42396fi
42397NM=$ac_cv_prog_NM
42398if test -n "$NM"; then
42399  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42400$as_echo "$NM" >&6; }
42401else
42402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42403$as_echo "no" >&6; }
42404fi
42405
42406
42407    test -n "$NM" && break
42408  done
42409fi
42410if test -z "$NM"; then
42411  ac_ct_NM=$NM
42412  for ac_prog in nm
42413do
42414  # Extract the first word of "$ac_prog", so it can be a program name with args.
42415set dummy $ac_prog; ac_word=$2
42416{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42417$as_echo_n "checking for $ac_word... " >&6; }
42418if ${ac_cv_prog_ac_ct_NM+:} false; then :
42419  $as_echo_n "(cached) " >&6
42420else
42421  if test -n "$ac_ct_NM"; then
42422  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42423else
42424as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42425for as_dir in $PATH
42426do
42427  IFS=$as_save_IFS
42428  test -z "$as_dir" && as_dir=.
42429    for ac_exec_ext in '' $ac_executable_extensions; do
42430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42431    ac_cv_prog_ac_ct_NM="$ac_prog"
42432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42433    break 2
42434  fi
42435done
42436  done
42437IFS=$as_save_IFS
42438
42439fi
42440fi
42441ac_ct_NM=$ac_cv_prog_ac_ct_NM
42442if test -n "$ac_ct_NM"; then
42443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42444$as_echo "$ac_ct_NM" >&6; }
42445else
42446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42447$as_echo "no" >&6; }
42448fi
42449
42450
42451  test -n "$ac_ct_NM" && break
42452done
42453
42454  if test "x$ac_ct_NM" = x; then
42455    NM=""
42456  else
42457    case $cross_compiling:$ac_tool_warned in
42458yes:)
42459{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42460$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42461ac_tool_warned=yes ;;
42462esac
42463    NM=$ac_ct_NM
42464  fi
42465fi
42466
42467  else
42468    # The variable is set, but is it from the command line or the environment?
42469
42470    # Try to remove the string !NM! from our list.
42471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42473      # If it failed, the variable was not from the command line. Ignore it,
42474      # but warn the user (except for BASH, which is always set by the calling BASH).
42475      if test "xNM" != xBASH; then
42476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42477$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42478      fi
42479      # Try to locate tool using the code snippet
42480      if test -n "$ac_tool_prefix"; then
42481  for ac_prog in nm
42482  do
42483    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42484set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42485{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42486$as_echo_n "checking for $ac_word... " >&6; }
42487if ${ac_cv_prog_NM+:} false; then :
42488  $as_echo_n "(cached) " >&6
42489else
42490  if test -n "$NM"; then
42491  ac_cv_prog_NM="$NM" # Let the user override the test.
42492else
42493as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42494for as_dir in $PATH
42495do
42496  IFS=$as_save_IFS
42497  test -z "$as_dir" && as_dir=.
42498    for ac_exec_ext in '' $ac_executable_extensions; do
42499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42500    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42502    break 2
42503  fi
42504done
42505  done
42506IFS=$as_save_IFS
42507
42508fi
42509fi
42510NM=$ac_cv_prog_NM
42511if test -n "$NM"; then
42512  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42513$as_echo "$NM" >&6; }
42514else
42515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42516$as_echo "no" >&6; }
42517fi
42518
42519
42520    test -n "$NM" && break
42521  done
42522fi
42523if test -z "$NM"; then
42524  ac_ct_NM=$NM
42525  for ac_prog in nm
42526do
42527  # Extract the first word of "$ac_prog", so it can be a program name with args.
42528set dummy $ac_prog; ac_word=$2
42529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42530$as_echo_n "checking for $ac_word... " >&6; }
42531if ${ac_cv_prog_ac_ct_NM+:} false; then :
42532  $as_echo_n "(cached) " >&6
42533else
42534  if test -n "$ac_ct_NM"; then
42535  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42536else
42537as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42538for as_dir in $PATH
42539do
42540  IFS=$as_save_IFS
42541  test -z "$as_dir" && as_dir=.
42542    for ac_exec_ext in '' $ac_executable_extensions; do
42543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42544    ac_cv_prog_ac_ct_NM="$ac_prog"
42545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42546    break 2
42547  fi
42548done
42549  done
42550IFS=$as_save_IFS
42551
42552fi
42553fi
42554ac_ct_NM=$ac_cv_prog_ac_ct_NM
42555if test -n "$ac_ct_NM"; then
42556  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42557$as_echo "$ac_ct_NM" >&6; }
42558else
42559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42560$as_echo "no" >&6; }
42561fi
42562
42563
42564  test -n "$ac_ct_NM" && break
42565done
42566
42567  if test "x$ac_ct_NM" = x; then
42568    NM=""
42569  else
42570    case $cross_compiling:$ac_tool_warned in
42571yes:)
42572{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42573$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42574ac_tool_warned=yes ;;
42575esac
42576    NM=$ac_ct_NM
42577  fi
42578fi
42579
42580    else
42581      # If it succeeded, then it was overridden by the user. We will use it
42582      # for the tool.
42583
42584      # First remove it from the list of overridden variables, so we can test
42585      # for unknown variables in the end.
42586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42587
42588      # Check if we try to supply an empty value
42589      if test "x$NM" = x; then
42590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42591$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42593$as_echo_n "checking for NM... " >&6; }
42594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42595$as_echo "disabled" >&6; }
42596      else
42597        # Check if the provided tool contains a complete path.
42598        tool_specified="$NM"
42599        tool_basename="${tool_specified##*/}"
42600        if test "x$tool_basename" = "x$tool_specified"; then
42601          # A command without a complete path is provided, search $PATH.
42602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42603$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42604          # Extract the first word of "$tool_basename", so it can be a program name with args.
42605set dummy $tool_basename; ac_word=$2
42606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42607$as_echo_n "checking for $ac_word... " >&6; }
42608if ${ac_cv_path_NM+:} false; then :
42609  $as_echo_n "(cached) " >&6
42610else
42611  case $NM in
42612  [\\/]* | ?:[\\/]*)
42613  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42614  ;;
42615  *)
42616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42617for as_dir in $PATH
42618do
42619  IFS=$as_save_IFS
42620  test -z "$as_dir" && as_dir=.
42621    for ac_exec_ext in '' $ac_executable_extensions; do
42622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42623    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42625    break 2
42626  fi
42627done
42628  done
42629IFS=$as_save_IFS
42630
42631  ;;
42632esac
42633fi
42634NM=$ac_cv_path_NM
42635if test -n "$NM"; then
42636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42637$as_echo "$NM" >&6; }
42638else
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42640$as_echo "no" >&6; }
42641fi
42642
42643
42644          if test "x$NM" = x; then
42645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42646          fi
42647        else
42648          # Otherwise we believe it is a complete path. Use it as it is.
42649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42650$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42652$as_echo_n "checking for NM... " >&6; }
42653          if test ! -x "$tool_specified"; then
42654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42655$as_echo "not found" >&6; }
42656            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42657          fi
42658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42659$as_echo "$tool_specified" >&6; }
42660        fi
42661      fi
42662    fi
42663
42664  fi
42665
42666
42667    fi
42668
42669  # Only process if variable expands to non-empty
42670
42671  if test "x$NM" != x; then
42672    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42673
42674  # First separate the path from the arguments. This will split at the first
42675  # space.
42676  complete="$NM"
42677  path="${complete%% *}"
42678  tmp="$complete EOL"
42679  arguments="${tmp#* }"
42680
42681  # Input might be given as Windows format, start by converting to
42682  # unix format.
42683  new_path=`$CYGPATH -u "$path"`
42684
42685  # Now try to locate executable using which
42686  new_path=`$WHICH "$new_path" 2> /dev/null`
42687  # bat and cmd files are not always considered executable in cygwin causing which
42688  # to not find them
42689  if test "x$new_path" = x \
42690      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42691      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42692    new_path=`$CYGPATH -u "$path"`
42693  fi
42694  if test "x$new_path" = x; then
42695    # Oops. Which didn't find the executable.
42696    # The splitting of arguments from the executable at a space might have been incorrect,
42697    # since paths with space are more likely in Windows. Give it another try with the whole
42698    # argument.
42699    path="$complete"
42700    arguments="EOL"
42701    new_path=`$CYGPATH -u "$path"`
42702    new_path=`$WHICH "$new_path" 2> /dev/null`
42703    # bat and cmd files are not always considered executable in cygwin causing which
42704    # to not find them
42705    if test "x$new_path" = x \
42706        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42707        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42708      new_path=`$CYGPATH -u "$path"`
42709    fi
42710    if test "x$new_path" = x; then
42711      # It's still not found. Now this is an unrecoverable error.
42712      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42713$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42714      has_space=`$ECHO "$complete" | $GREP " "`
42715      if test "x$has_space" != x; then
42716        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42717$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42718      fi
42719      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42720    fi
42721  fi
42722
42723  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42724  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42725  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42726  # "foo.exe" is OK but "foo" is an error.
42727  #
42728  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42729  # It is also a way to make sure we got the proper file name for the real test later on.
42730  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42731  if test "x$test_shortpath" = x; then
42732    # Short path failed, file does not exist as specified.
42733    # Try adding .exe or .cmd
42734    if test -f "${new_path}.exe"; then
42735      input_to_shortpath="${new_path}.exe"
42736    elif test -f "${new_path}.cmd"; then
42737      input_to_shortpath="${new_path}.cmd"
42738    else
42739      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42740$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42741      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42742$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42743      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42744    fi
42745  else
42746    input_to_shortpath="$new_path"
42747  fi
42748
42749  # Call helper function which possibly converts this using DOS-style short mode.
42750  # If so, the updated path is stored in $new_path.
42751  new_path="$input_to_shortpath"
42752
42753  input_path="$input_to_shortpath"
42754  # Check if we need to convert this using DOS-style short mode. If the path
42755  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42756  # take no chances and rewrite it.
42757  # Note: m4 eats our [], so we need to use [ and ] instead.
42758  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42759  if test "x$has_forbidden_chars" != x; then
42760    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42761    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42762    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42763    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42764      # Going to short mode and back again did indeed matter. Since short mode is
42765      # case insensitive, let's make it lowercase to improve readability.
42766      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42767      # Now convert it back to Unix-style (cygpath)
42768      input_path=`$CYGPATH -u "$shortmode_path"`
42769      new_path="$input_path"
42770    fi
42771  fi
42772
42773  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42774  if test "x$test_cygdrive_prefix" = x; then
42775    # As a simple fix, exclude /usr/bin since it's not a real path.
42776    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42777      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42778      # a path prefixed by /cygdrive for fixpath to work.
42779      new_path="$CYGWIN_ROOT_PATH$input_path"
42780    fi
42781  fi
42782
42783  # remove trailing .exe if any
42784  new_path="${new_path/%.exe/}"
42785
42786    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42787
42788  # First separate the path from the arguments. This will split at the first
42789  # space.
42790  complete="$NM"
42791  path="${complete%% *}"
42792  tmp="$complete EOL"
42793  arguments="${tmp#* }"
42794
42795  # Input might be given as Windows format, start by converting to
42796  # unix format.
42797  new_path="$path"
42798
42799  windows_path="$new_path"
42800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42801    unix_path=`$CYGPATH -u "$windows_path"`
42802    new_path="$unix_path"
42803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42805    new_path="$unix_path"
42806  fi
42807
42808
42809  # Now try to locate executable using which
42810  new_path=`$WHICH "$new_path" 2> /dev/null`
42811
42812  if test "x$new_path" = x; then
42813    # Oops. Which didn't find the executable.
42814    # The splitting of arguments from the executable at a space might have been incorrect,
42815    # since paths with space are more likely in Windows. Give it another try with the whole
42816    # argument.
42817    path="$complete"
42818    arguments="EOL"
42819    new_path="$path"
42820
42821  windows_path="$new_path"
42822  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42823    unix_path=`$CYGPATH -u "$windows_path"`
42824    new_path="$unix_path"
42825  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42826    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42827    new_path="$unix_path"
42828  fi
42829
42830
42831    new_path=`$WHICH "$new_path" 2> /dev/null`
42832    # bat and cmd files are not always considered executable in MSYS causing which
42833    # to not find them
42834    if test "x$new_path" = x \
42835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42837      new_path="$path"
42838
42839  windows_path="$new_path"
42840  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42841    unix_path=`$CYGPATH -u "$windows_path"`
42842    new_path="$unix_path"
42843  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42844    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42845    new_path="$unix_path"
42846  fi
42847
42848    fi
42849
42850    if test "x$new_path" = x; then
42851      # It's still not found. Now this is an unrecoverable error.
42852      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42853$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42854      has_space=`$ECHO "$complete" | $GREP " "`
42855      if test "x$has_space" != x; then
42856        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42857$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42858      fi
42859      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42860    fi
42861  fi
42862
42863  # Now new_path has a complete unix path to the binary
42864  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42865    # Keep paths in /bin as-is, but remove trailing .exe if any
42866    new_path="${new_path/%.exe/}"
42867    # Do not save /bin paths to all_fixpath_prefixes!
42868  else
42869    # Not in mixed or Windows style, start by that.
42870    new_path=`cmd //c echo $new_path`
42871
42872  input_path="$new_path"
42873  # Check if we need to convert this using DOS-style short mode. If the path
42874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42875  # take no chances and rewrite it.
42876  # Note: m4 eats our [], so we need to use [ and ] instead.
42877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42878  if test "x$has_forbidden_chars" != x; then
42879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42881  fi
42882
42883    # Output is in $new_path
42884
42885  windows_path="$new_path"
42886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42887    unix_path=`$CYGPATH -u "$windows_path"`
42888    new_path="$unix_path"
42889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42891    new_path="$unix_path"
42892  fi
42893
42894    # remove trailing .exe if any
42895    new_path="${new_path/%.exe/}"
42896
42897    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42898    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42899  fi
42900
42901    else
42902      # We're on a unix platform. Hooray! :)
42903      # First separate the path from the arguments. This will split at the first
42904      # space.
42905      complete="$NM"
42906      path="${complete%% *}"
42907      tmp="$complete EOL"
42908      arguments="${tmp#* }"
42909
42910      # Cannot rely on the command "which" here since it doesn't always work.
42911      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42912      if test -z "$is_absolute_path"; then
42913        # Path to executable is not absolute. Find it.
42914        IFS_save="$IFS"
42915        IFS=:
42916        for p in $PATH; do
42917          if test -f "$p/$path" && test -x "$p/$path"; then
42918            new_path="$p/$path"
42919            break
42920          fi
42921        done
42922        IFS="$IFS_save"
42923      else
42924        # This is an absolute path, we can use it without further modifications.
42925        new_path="$path"
42926      fi
42927
42928      if test "x$new_path" = x; then
42929        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42930$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42931        has_space=`$ECHO "$complete" | $GREP " "`
42932        if test "x$has_space" != x; then
42933          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42934$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42935        fi
42936        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42937      fi
42938    fi
42939
42940    # Now join together the path and the arguments once again
42941    if test "x$arguments" != xEOL; then
42942      new_complete="$new_path ${arguments% *}"
42943    else
42944      new_complete="$new_path"
42945    fi
42946
42947    if test "x$complete" != "x$new_complete"; then
42948      NM="$new_complete"
42949      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42950$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42951    fi
42952  fi
42953
42954    GNM="$NM"
42955
42956  fi
42957
42958  # objcopy is used for moving debug symbols to separate files when
42959  # full debug symbols are enabled.
42960  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42961
42962
42963  # Publish this variable in the help.
42964
42965
42966  if [ -z "${OBJCOPY+x}" ]; then
42967    # The variable is not set by user, try to locate tool using the code snippet
42968    if test -n "$ac_tool_prefix"; then
42969  for ac_prog in gobjcopy objcopy
42970  do
42971    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42972set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42974$as_echo_n "checking for $ac_word... " >&6; }
42975if ${ac_cv_prog_OBJCOPY+:} false; then :
42976  $as_echo_n "(cached) " >&6
42977else
42978  if test -n "$OBJCOPY"; then
42979  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42980else
42981as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42982for as_dir in $PATH
42983do
42984  IFS=$as_save_IFS
42985  test -z "$as_dir" && as_dir=.
42986    for ac_exec_ext in '' $ac_executable_extensions; do
42987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42988    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42990    break 2
42991  fi
42992done
42993  done
42994IFS=$as_save_IFS
42995
42996fi
42997fi
42998OBJCOPY=$ac_cv_prog_OBJCOPY
42999if test -n "$OBJCOPY"; then
43000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43001$as_echo "$OBJCOPY" >&6; }
43002else
43003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43004$as_echo "no" >&6; }
43005fi
43006
43007
43008    test -n "$OBJCOPY" && break
43009  done
43010fi
43011if test -z "$OBJCOPY"; then
43012  ac_ct_OBJCOPY=$OBJCOPY
43013  for ac_prog in gobjcopy objcopy
43014do
43015  # Extract the first word of "$ac_prog", so it can be a program name with args.
43016set dummy $ac_prog; ac_word=$2
43017{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43018$as_echo_n "checking for $ac_word... " >&6; }
43019if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43020  $as_echo_n "(cached) " >&6
43021else
43022  if test -n "$ac_ct_OBJCOPY"; then
43023  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43024else
43025as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43026for as_dir in $PATH
43027do
43028  IFS=$as_save_IFS
43029  test -z "$as_dir" && as_dir=.
43030    for ac_exec_ext in '' $ac_executable_extensions; do
43031  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43032    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43033    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43034    break 2
43035  fi
43036done
43037  done
43038IFS=$as_save_IFS
43039
43040fi
43041fi
43042ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43043if test -n "$ac_ct_OBJCOPY"; then
43044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43045$as_echo "$ac_ct_OBJCOPY" >&6; }
43046else
43047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43048$as_echo "no" >&6; }
43049fi
43050
43051
43052  test -n "$ac_ct_OBJCOPY" && break
43053done
43054
43055  if test "x$ac_ct_OBJCOPY" = x; then
43056    OBJCOPY=""
43057  else
43058    case $cross_compiling:$ac_tool_warned in
43059yes:)
43060{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43061$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43062ac_tool_warned=yes ;;
43063esac
43064    OBJCOPY=$ac_ct_OBJCOPY
43065  fi
43066fi
43067
43068  else
43069    # The variable is set, but is it from the command line or the environment?
43070
43071    # Try to remove the string !OBJCOPY! from our list.
43072    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
43073    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43074      # If it failed, the variable was not from the command line. Ignore it,
43075      # but warn the user (except for BASH, which is always set by the calling BASH).
43076      if test "xOBJCOPY" != xBASH; then
43077        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
43078$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
43079      fi
43080      # Try to locate tool using the code snippet
43081      if test -n "$ac_tool_prefix"; then
43082  for ac_prog in gobjcopy objcopy
43083  do
43084    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43085set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43087$as_echo_n "checking for $ac_word... " >&6; }
43088if ${ac_cv_prog_OBJCOPY+:} false; then :
43089  $as_echo_n "(cached) " >&6
43090else
43091  if test -n "$OBJCOPY"; then
43092  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
43093else
43094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43095for as_dir in $PATH
43096do
43097  IFS=$as_save_IFS
43098  test -z "$as_dir" && as_dir=.
43099    for ac_exec_ext in '' $ac_executable_extensions; do
43100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43101    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
43102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43103    break 2
43104  fi
43105done
43106  done
43107IFS=$as_save_IFS
43108
43109fi
43110fi
43111OBJCOPY=$ac_cv_prog_OBJCOPY
43112if test -n "$OBJCOPY"; then
43113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43114$as_echo "$OBJCOPY" >&6; }
43115else
43116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43117$as_echo "no" >&6; }
43118fi
43119
43120
43121    test -n "$OBJCOPY" && break
43122  done
43123fi
43124if test -z "$OBJCOPY"; then
43125  ac_ct_OBJCOPY=$OBJCOPY
43126  for ac_prog in gobjcopy objcopy
43127do
43128  # Extract the first word of "$ac_prog", so it can be a program name with args.
43129set dummy $ac_prog; ac_word=$2
43130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43131$as_echo_n "checking for $ac_word... " >&6; }
43132if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
43133  $as_echo_n "(cached) " >&6
43134else
43135  if test -n "$ac_ct_OBJCOPY"; then
43136  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
43137else
43138as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43139for as_dir in $PATH
43140do
43141  IFS=$as_save_IFS
43142  test -z "$as_dir" && as_dir=.
43143    for ac_exec_ext in '' $ac_executable_extensions; do
43144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43145    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
43146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43147    break 2
43148  fi
43149done
43150  done
43151IFS=$as_save_IFS
43152
43153fi
43154fi
43155ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
43156if test -n "$ac_ct_OBJCOPY"; then
43157  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
43158$as_echo "$ac_ct_OBJCOPY" >&6; }
43159else
43160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43161$as_echo "no" >&6; }
43162fi
43163
43164
43165  test -n "$ac_ct_OBJCOPY" && break
43166done
43167
43168  if test "x$ac_ct_OBJCOPY" = x; then
43169    OBJCOPY=""
43170  else
43171    case $cross_compiling:$ac_tool_warned in
43172yes:)
43173{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43174$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43175ac_tool_warned=yes ;;
43176esac
43177    OBJCOPY=$ac_ct_OBJCOPY
43178  fi
43179fi
43180
43181    else
43182      # If it succeeded, then it was overridden by the user. We will use it
43183      # for the tool.
43184
43185      # First remove it from the list of overridden variables, so we can test
43186      # for unknown variables in the end.
43187      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43188
43189      # Check if we try to supply an empty value
43190      if test "x$OBJCOPY" = x; then
43191        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
43192$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
43193        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43194$as_echo_n "checking for OBJCOPY... " >&6; }
43195        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43196$as_echo "disabled" >&6; }
43197      else
43198        # Check if the provided tool contains a complete path.
43199        tool_specified="$OBJCOPY"
43200        tool_basename="${tool_specified##*/}"
43201        if test "x$tool_basename" = "x$tool_specified"; then
43202          # A command without a complete path is provided, search $PATH.
43203          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
43204$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
43205          # Extract the first word of "$tool_basename", so it can be a program name with args.
43206set dummy $tool_basename; ac_word=$2
43207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43208$as_echo_n "checking for $ac_word... " >&6; }
43209if ${ac_cv_path_OBJCOPY+:} false; then :
43210  $as_echo_n "(cached) " >&6
43211else
43212  case $OBJCOPY in
43213  [\\/]* | ?:[\\/]*)
43214  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
43215  ;;
43216  *)
43217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43218for as_dir in $PATH
43219do
43220  IFS=$as_save_IFS
43221  test -z "$as_dir" && as_dir=.
43222    for ac_exec_ext in '' $ac_executable_extensions; do
43223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43224    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
43225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43226    break 2
43227  fi
43228done
43229  done
43230IFS=$as_save_IFS
43231
43232  ;;
43233esac
43234fi
43235OBJCOPY=$ac_cv_path_OBJCOPY
43236if test -n "$OBJCOPY"; then
43237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
43238$as_echo "$OBJCOPY" >&6; }
43239else
43240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43241$as_echo "no" >&6; }
43242fi
43243
43244
43245          if test "x$OBJCOPY" = x; then
43246            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43247          fi
43248        else
43249          # Otherwise we believe it is a complete path. Use it as it is.
43250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
43251$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
43252          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
43253$as_echo_n "checking for OBJCOPY... " >&6; }
43254          if test ! -x "$tool_specified"; then
43255            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43256$as_echo "not found" >&6; }
43257            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
43258          fi
43259          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43260$as_echo "$tool_specified" >&6; }
43261        fi
43262      fi
43263    fi
43264
43265  fi
43266
43267
43268    # Only call fixup if objcopy was found.
43269    if test -n "$OBJCOPY"; then
43270
43271  # Only process if variable expands to non-empty
43272
43273  if test "x$OBJCOPY" != x; then
43274    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43275
43276  # First separate the path from the arguments. This will split at the first
43277  # space.
43278  complete="$OBJCOPY"
43279  path="${complete%% *}"
43280  tmp="$complete EOL"
43281  arguments="${tmp#* }"
43282
43283  # Input might be given as Windows format, start by converting to
43284  # unix format.
43285  new_path=`$CYGPATH -u "$path"`
43286
43287  # Now try to locate executable using which
43288  new_path=`$WHICH "$new_path" 2> /dev/null`
43289  # bat and cmd files are not always considered executable in cygwin causing which
43290  # to not find them
43291  if test "x$new_path" = x \
43292      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43293      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43294    new_path=`$CYGPATH -u "$path"`
43295  fi
43296  if test "x$new_path" = x; then
43297    # Oops. Which didn't find the executable.
43298    # The splitting of arguments from the executable at a space might have been incorrect,
43299    # since paths with space are more likely in Windows. Give it another try with the whole
43300    # argument.
43301    path="$complete"
43302    arguments="EOL"
43303    new_path=`$CYGPATH -u "$path"`
43304    new_path=`$WHICH "$new_path" 2> /dev/null`
43305    # bat and cmd files are not always considered executable in cygwin causing which
43306    # to not find them
43307    if test "x$new_path" = x \
43308        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43309        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43310      new_path=`$CYGPATH -u "$path"`
43311    fi
43312    if test "x$new_path" = x; then
43313      # It's still not found. Now this is an unrecoverable error.
43314      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43315$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43316      has_space=`$ECHO "$complete" | $GREP " "`
43317      if test "x$has_space" != x; then
43318        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43319$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43320      fi
43321      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43322    fi
43323  fi
43324
43325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43328  # "foo.exe" is OK but "foo" is an error.
43329  #
43330  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43331  # It is also a way to make sure we got the proper file name for the real test later on.
43332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43333  if test "x$test_shortpath" = x; then
43334    # Short path failed, file does not exist as specified.
43335    # Try adding .exe or .cmd
43336    if test -f "${new_path}.exe"; then
43337      input_to_shortpath="${new_path}.exe"
43338    elif test -f "${new_path}.cmd"; then
43339      input_to_shortpath="${new_path}.cmd"
43340    else
43341      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
43342$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
43343      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43344$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43345      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43346    fi
43347  else
43348    input_to_shortpath="$new_path"
43349  fi
43350
43351  # Call helper function which possibly converts this using DOS-style short mode.
43352  # If so, the updated path is stored in $new_path.
43353  new_path="$input_to_shortpath"
43354
43355  input_path="$input_to_shortpath"
43356  # Check if we need to convert this using DOS-style short mode. If the path
43357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43358  # take no chances and rewrite it.
43359  # Note: m4 eats our [], so we need to use [ and ] instead.
43360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43361  if test "x$has_forbidden_chars" != x; then
43362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43363    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43364    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43365    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43366      # Going to short mode and back again did indeed matter. Since short mode is
43367      # case insensitive, let's make it lowercase to improve readability.
43368      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43369      # Now convert it back to Unix-style (cygpath)
43370      input_path=`$CYGPATH -u "$shortmode_path"`
43371      new_path="$input_path"
43372    fi
43373  fi
43374
43375  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43376  if test "x$test_cygdrive_prefix" = x; then
43377    # As a simple fix, exclude /usr/bin since it's not a real path.
43378    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43379      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43380      # a path prefixed by /cygdrive for fixpath to work.
43381      new_path="$CYGWIN_ROOT_PATH$input_path"
43382    fi
43383  fi
43384
43385  # remove trailing .exe if any
43386  new_path="${new_path/%.exe/}"
43387
43388    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43389
43390  # First separate the path from the arguments. This will split at the first
43391  # space.
43392  complete="$OBJCOPY"
43393  path="${complete%% *}"
43394  tmp="$complete EOL"
43395  arguments="${tmp#* }"
43396
43397  # Input might be given as Windows format, start by converting to
43398  # unix format.
43399  new_path="$path"
43400
43401  windows_path="$new_path"
43402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43403    unix_path=`$CYGPATH -u "$windows_path"`
43404    new_path="$unix_path"
43405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43407    new_path="$unix_path"
43408  fi
43409
43410
43411  # Now try to locate executable using which
43412  new_path=`$WHICH "$new_path" 2> /dev/null`
43413
43414  if test "x$new_path" = x; then
43415    # Oops. Which didn't find the executable.
43416    # The splitting of arguments from the executable at a space might have been incorrect,
43417    # since paths with space are more likely in Windows. Give it another try with the whole
43418    # argument.
43419    path="$complete"
43420    arguments="EOL"
43421    new_path="$path"
43422
43423  windows_path="$new_path"
43424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43425    unix_path=`$CYGPATH -u "$windows_path"`
43426    new_path="$unix_path"
43427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43429    new_path="$unix_path"
43430  fi
43431
43432
43433    new_path=`$WHICH "$new_path" 2> /dev/null`
43434    # bat and cmd files are not always considered executable in MSYS causing which
43435    # to not find them
43436    if test "x$new_path" = x \
43437        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43438        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43439      new_path="$path"
43440
43441  windows_path="$new_path"
43442  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43443    unix_path=`$CYGPATH -u "$windows_path"`
43444    new_path="$unix_path"
43445  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43446    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43447    new_path="$unix_path"
43448  fi
43449
43450    fi
43451
43452    if test "x$new_path" = x; then
43453      # It's still not found. Now this is an unrecoverable error.
43454      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43455$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43456      has_space=`$ECHO "$complete" | $GREP " "`
43457      if test "x$has_space" != x; then
43458        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43459$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43460      fi
43461      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43462    fi
43463  fi
43464
43465  # Now new_path has a complete unix path to the binary
43466  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43467    # Keep paths in /bin as-is, but remove trailing .exe if any
43468    new_path="${new_path/%.exe/}"
43469    # Do not save /bin paths to all_fixpath_prefixes!
43470  else
43471    # Not in mixed or Windows style, start by that.
43472    new_path=`cmd //c echo $new_path`
43473
43474  input_path="$new_path"
43475  # Check if we need to convert this using DOS-style short mode. If the path
43476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43477  # take no chances and rewrite it.
43478  # Note: m4 eats our [], so we need to use [ and ] instead.
43479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43480  if test "x$has_forbidden_chars" != x; then
43481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43482    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43483  fi
43484
43485    # Output is in $new_path
43486
43487  windows_path="$new_path"
43488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43489    unix_path=`$CYGPATH -u "$windows_path"`
43490    new_path="$unix_path"
43491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43493    new_path="$unix_path"
43494  fi
43495
43496    # remove trailing .exe if any
43497    new_path="${new_path/%.exe/}"
43498
43499    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43500    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43501  fi
43502
43503    else
43504      # We're on a unix platform. Hooray! :)
43505      # First separate the path from the arguments. This will split at the first
43506      # space.
43507      complete="$OBJCOPY"
43508      path="${complete%% *}"
43509      tmp="$complete EOL"
43510      arguments="${tmp#* }"
43511
43512      # Cannot rely on the command "which" here since it doesn't always work.
43513      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43514      if test -z "$is_absolute_path"; then
43515        # Path to executable is not absolute. Find it.
43516        IFS_save="$IFS"
43517        IFS=:
43518        for p in $PATH; do
43519          if test -f "$p/$path" && test -x "$p/$path"; then
43520            new_path="$p/$path"
43521            break
43522          fi
43523        done
43524        IFS="$IFS_save"
43525      else
43526        # This is an absolute path, we can use it without further modifications.
43527        new_path="$path"
43528      fi
43529
43530      if test "x$new_path" = x; then
43531        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43532$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43533        has_space=`$ECHO "$complete" | $GREP " "`
43534        if test "x$has_space" != x; then
43535          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43536$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43537        fi
43538        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43539      fi
43540    fi
43541
43542    # Now join together the path and the arguments once again
43543    if test "x$arguments" != xEOL; then
43544      new_complete="$new_path ${arguments% *}"
43545    else
43546      new_complete="$new_path"
43547    fi
43548
43549    if test "x$complete" != "x$new_complete"; then
43550      OBJCOPY="$new_complete"
43551      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43552$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43553    fi
43554  fi
43555
43556      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43557        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43558        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43559        # - version number is last blank separate word on first line
43560        # - version number formats that have been seen:
43561        #   - <major>.<minor>
43562        #   - <major>.<minor>.<micro>
43563        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43564        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43565         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43566              -e 's/.* //' \
43567              -e '/^[01]\./b bad' \
43568              -e '/^2\./{' \
43569              -e '  s/^2\.//' \
43570              -e '  /^[0-9]$/b bad' \
43571              -e '  /^[0-9]\./b bad' \
43572              -e '  /^1[0-9]$/b bad' \
43573              -e '  /^1[0-9]\./b bad' \
43574              -e '  /^20\./b bad' \
43575              -e '  /^21\.0$/b bad' \
43576              -e '  /^21\.0\./b bad' \
43577              -e '}' \
43578              -e ':good' \
43579              -e 's/.*/VALID_VERSION/p' \
43580              -e 'q' \
43581              -e ':bad' \
43582              -e 's/.*/BAD_VERSION/p' \
43583              -e 'q'`
43584        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43585          OBJCOPY=
43586          { $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
43587$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43588          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43589$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43590          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43591$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43592          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43593$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43594          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43595$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43596        fi
43597      fi
43598    fi
43599  fi
43600
43601
43602
43603  # Publish this variable in the help.
43604
43605
43606  if [ -z "${OBJDUMP+x}" ]; then
43607    # The variable is not set by user, try to locate tool using the code snippet
43608    if test -n "$ac_tool_prefix"; then
43609  for ac_prog in gobjdump objdump
43610  do
43611    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43612set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43613{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43614$as_echo_n "checking for $ac_word... " >&6; }
43615if ${ac_cv_prog_OBJDUMP+:} false; then :
43616  $as_echo_n "(cached) " >&6
43617else
43618  if test -n "$OBJDUMP"; then
43619  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43620else
43621as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43622for as_dir in $PATH
43623do
43624  IFS=$as_save_IFS
43625  test -z "$as_dir" && as_dir=.
43626    for ac_exec_ext in '' $ac_executable_extensions; do
43627  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43628    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43629    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43630    break 2
43631  fi
43632done
43633  done
43634IFS=$as_save_IFS
43635
43636fi
43637fi
43638OBJDUMP=$ac_cv_prog_OBJDUMP
43639if test -n "$OBJDUMP"; then
43640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43641$as_echo "$OBJDUMP" >&6; }
43642else
43643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43644$as_echo "no" >&6; }
43645fi
43646
43647
43648    test -n "$OBJDUMP" && break
43649  done
43650fi
43651if test -z "$OBJDUMP"; then
43652  ac_ct_OBJDUMP=$OBJDUMP
43653  for ac_prog in gobjdump objdump
43654do
43655  # Extract the first word of "$ac_prog", so it can be a program name with args.
43656set dummy $ac_prog; ac_word=$2
43657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43658$as_echo_n "checking for $ac_word... " >&6; }
43659if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43660  $as_echo_n "(cached) " >&6
43661else
43662  if test -n "$ac_ct_OBJDUMP"; then
43663  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43664else
43665as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43666for as_dir in $PATH
43667do
43668  IFS=$as_save_IFS
43669  test -z "$as_dir" && as_dir=.
43670    for ac_exec_ext in '' $ac_executable_extensions; do
43671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43672    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43674    break 2
43675  fi
43676done
43677  done
43678IFS=$as_save_IFS
43679
43680fi
43681fi
43682ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43683if test -n "$ac_ct_OBJDUMP"; then
43684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43685$as_echo "$ac_ct_OBJDUMP" >&6; }
43686else
43687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43688$as_echo "no" >&6; }
43689fi
43690
43691
43692  test -n "$ac_ct_OBJDUMP" && break
43693done
43694
43695  if test "x$ac_ct_OBJDUMP" = x; then
43696    OBJDUMP=""
43697  else
43698    case $cross_compiling:$ac_tool_warned in
43699yes:)
43700{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43701$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43702ac_tool_warned=yes ;;
43703esac
43704    OBJDUMP=$ac_ct_OBJDUMP
43705  fi
43706fi
43707
43708  else
43709    # The variable is set, but is it from the command line or the environment?
43710
43711    # Try to remove the string !OBJDUMP! from our list.
43712    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43713    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43714      # If it failed, the variable was not from the command line. Ignore it,
43715      # but warn the user (except for BASH, which is always set by the calling BASH).
43716      if test "xOBJDUMP" != xBASH; then
43717        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43718$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43719      fi
43720      # Try to locate tool using the code snippet
43721      if test -n "$ac_tool_prefix"; then
43722  for ac_prog in gobjdump objdump
43723  do
43724    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43725set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43727$as_echo_n "checking for $ac_word... " >&6; }
43728if ${ac_cv_prog_OBJDUMP+:} false; then :
43729  $as_echo_n "(cached) " >&6
43730else
43731  if test -n "$OBJDUMP"; then
43732  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43733else
43734as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43735for as_dir in $PATH
43736do
43737  IFS=$as_save_IFS
43738  test -z "$as_dir" && as_dir=.
43739    for ac_exec_ext in '' $ac_executable_extensions; do
43740  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43741    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43742    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43743    break 2
43744  fi
43745done
43746  done
43747IFS=$as_save_IFS
43748
43749fi
43750fi
43751OBJDUMP=$ac_cv_prog_OBJDUMP
43752if test -n "$OBJDUMP"; then
43753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43754$as_echo "$OBJDUMP" >&6; }
43755else
43756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43757$as_echo "no" >&6; }
43758fi
43759
43760
43761    test -n "$OBJDUMP" && break
43762  done
43763fi
43764if test -z "$OBJDUMP"; then
43765  ac_ct_OBJDUMP=$OBJDUMP
43766  for ac_prog in gobjdump objdump
43767do
43768  # Extract the first word of "$ac_prog", so it can be a program name with args.
43769set dummy $ac_prog; ac_word=$2
43770{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43771$as_echo_n "checking for $ac_word... " >&6; }
43772if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43773  $as_echo_n "(cached) " >&6
43774else
43775  if test -n "$ac_ct_OBJDUMP"; then
43776  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43777else
43778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43779for as_dir in $PATH
43780do
43781  IFS=$as_save_IFS
43782  test -z "$as_dir" && as_dir=.
43783    for ac_exec_ext in '' $ac_executable_extensions; do
43784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43785    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43786    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43787    break 2
43788  fi
43789done
43790  done
43791IFS=$as_save_IFS
43792
43793fi
43794fi
43795ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43796if test -n "$ac_ct_OBJDUMP"; then
43797  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43798$as_echo "$ac_ct_OBJDUMP" >&6; }
43799else
43800  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43801$as_echo "no" >&6; }
43802fi
43803
43804
43805  test -n "$ac_ct_OBJDUMP" && break
43806done
43807
43808  if test "x$ac_ct_OBJDUMP" = x; then
43809    OBJDUMP=""
43810  else
43811    case $cross_compiling:$ac_tool_warned in
43812yes:)
43813{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43814$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43815ac_tool_warned=yes ;;
43816esac
43817    OBJDUMP=$ac_ct_OBJDUMP
43818  fi
43819fi
43820
43821    else
43822      # If it succeeded, then it was overridden by the user. We will use it
43823      # for the tool.
43824
43825      # First remove it from the list of overridden variables, so we can test
43826      # for unknown variables in the end.
43827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43828
43829      # Check if we try to supply an empty value
43830      if test "x$OBJDUMP" = x; then
43831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43832$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43834$as_echo_n "checking for OBJDUMP... " >&6; }
43835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43836$as_echo "disabled" >&6; }
43837      else
43838        # Check if the provided tool contains a complete path.
43839        tool_specified="$OBJDUMP"
43840        tool_basename="${tool_specified##*/}"
43841        if test "x$tool_basename" = "x$tool_specified"; then
43842          # A command without a complete path is provided, search $PATH.
43843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43844$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43845          # Extract the first word of "$tool_basename", so it can be a program name with args.
43846set dummy $tool_basename; ac_word=$2
43847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43848$as_echo_n "checking for $ac_word... " >&6; }
43849if ${ac_cv_path_OBJDUMP+:} false; then :
43850  $as_echo_n "(cached) " >&6
43851else
43852  case $OBJDUMP in
43853  [\\/]* | ?:[\\/]*)
43854  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43855  ;;
43856  *)
43857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43858for as_dir in $PATH
43859do
43860  IFS=$as_save_IFS
43861  test -z "$as_dir" && as_dir=.
43862    for ac_exec_ext in '' $ac_executable_extensions; do
43863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43864    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43866    break 2
43867  fi
43868done
43869  done
43870IFS=$as_save_IFS
43871
43872  ;;
43873esac
43874fi
43875OBJDUMP=$ac_cv_path_OBJDUMP
43876if test -n "$OBJDUMP"; then
43877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43878$as_echo "$OBJDUMP" >&6; }
43879else
43880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43881$as_echo "no" >&6; }
43882fi
43883
43884
43885          if test "x$OBJDUMP" = x; then
43886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43887          fi
43888        else
43889          # Otherwise we believe it is a complete path. Use it as it is.
43890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43891$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43893$as_echo_n "checking for OBJDUMP... " >&6; }
43894          if test ! -x "$tool_specified"; then
43895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43896$as_echo "not found" >&6; }
43897            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43898          fi
43899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43900$as_echo "$tool_specified" >&6; }
43901        fi
43902      fi
43903    fi
43904
43905  fi
43906
43907
43908  if test "x$OBJDUMP" != x; then
43909    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43910    # bails if argument is missing.
43911
43912  # Only process if variable expands to non-empty
43913
43914  if test "x$OBJDUMP" != x; then
43915    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43916
43917  # First separate the path from the arguments. This will split at the first
43918  # space.
43919  complete="$OBJDUMP"
43920  path="${complete%% *}"
43921  tmp="$complete EOL"
43922  arguments="${tmp#* }"
43923
43924  # Input might be given as Windows format, start by converting to
43925  # unix format.
43926  new_path=`$CYGPATH -u "$path"`
43927
43928  # Now try to locate executable using which
43929  new_path=`$WHICH "$new_path" 2> /dev/null`
43930  # bat and cmd files are not always considered executable in cygwin causing which
43931  # to not find them
43932  if test "x$new_path" = x \
43933      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43934      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43935    new_path=`$CYGPATH -u "$path"`
43936  fi
43937  if test "x$new_path" = x; then
43938    # Oops. Which didn't find the executable.
43939    # The splitting of arguments from the executable at a space might have been incorrect,
43940    # since paths with space are more likely in Windows. Give it another try with the whole
43941    # argument.
43942    path="$complete"
43943    arguments="EOL"
43944    new_path=`$CYGPATH -u "$path"`
43945    new_path=`$WHICH "$new_path" 2> /dev/null`
43946    # bat and cmd files are not always considered executable in cygwin causing which
43947    # to not find them
43948    if test "x$new_path" = x \
43949        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43950        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43951      new_path=`$CYGPATH -u "$path"`
43952    fi
43953    if test "x$new_path" = x; then
43954      # It's still not found. Now this is an unrecoverable error.
43955      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43956$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43957      has_space=`$ECHO "$complete" | $GREP " "`
43958      if test "x$has_space" != x; then
43959        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43960$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43961      fi
43962      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43963    fi
43964  fi
43965
43966  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43967  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43968  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43969  # "foo.exe" is OK but "foo" is an error.
43970  #
43971  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43972  # It is also a way to make sure we got the proper file name for the real test later on.
43973  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43974  if test "x$test_shortpath" = x; then
43975    # Short path failed, file does not exist as specified.
43976    # Try adding .exe or .cmd
43977    if test -f "${new_path}.exe"; then
43978      input_to_shortpath="${new_path}.exe"
43979    elif test -f "${new_path}.cmd"; then
43980      input_to_shortpath="${new_path}.cmd"
43981    else
43982      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43983$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43984      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43985$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43986      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43987    fi
43988  else
43989    input_to_shortpath="$new_path"
43990  fi
43991
43992  # Call helper function which possibly converts this using DOS-style short mode.
43993  # If so, the updated path is stored in $new_path.
43994  new_path="$input_to_shortpath"
43995
43996  input_path="$input_to_shortpath"
43997  # Check if we need to convert this using DOS-style short mode. If the path
43998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43999  # take no chances and rewrite it.
44000  # Note: m4 eats our [], so we need to use [ and ] instead.
44001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44002  if test "x$has_forbidden_chars" != x; then
44003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44007      # Going to short mode and back again did indeed matter. Since short mode is
44008      # case insensitive, let's make it lowercase to improve readability.
44009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44010      # Now convert it back to Unix-style (cygpath)
44011      input_path=`$CYGPATH -u "$shortmode_path"`
44012      new_path="$input_path"
44013    fi
44014  fi
44015
44016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44017  if test "x$test_cygdrive_prefix" = x; then
44018    # As a simple fix, exclude /usr/bin since it's not a real path.
44019    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44021      # a path prefixed by /cygdrive for fixpath to work.
44022      new_path="$CYGWIN_ROOT_PATH$input_path"
44023    fi
44024  fi
44025
44026  # remove trailing .exe if any
44027  new_path="${new_path/%.exe/}"
44028
44029    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44030
44031  # First separate the path from the arguments. This will split at the first
44032  # space.
44033  complete="$OBJDUMP"
44034  path="${complete%% *}"
44035  tmp="$complete EOL"
44036  arguments="${tmp#* }"
44037
44038  # Input might be given as Windows format, start by converting to
44039  # unix format.
44040  new_path="$path"
44041
44042  windows_path="$new_path"
44043  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44044    unix_path=`$CYGPATH -u "$windows_path"`
44045    new_path="$unix_path"
44046  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44047    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44048    new_path="$unix_path"
44049  fi
44050
44051
44052  # Now try to locate executable using which
44053  new_path=`$WHICH "$new_path" 2> /dev/null`
44054
44055  if test "x$new_path" = x; then
44056    # Oops. Which didn't find the executable.
44057    # The splitting of arguments from the executable at a space might have been incorrect,
44058    # since paths with space are more likely in Windows. Give it another try with the whole
44059    # argument.
44060    path="$complete"
44061    arguments="EOL"
44062    new_path="$path"
44063
44064  windows_path="$new_path"
44065  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44066    unix_path=`$CYGPATH -u "$windows_path"`
44067    new_path="$unix_path"
44068  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44069    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44070    new_path="$unix_path"
44071  fi
44072
44073
44074    new_path=`$WHICH "$new_path" 2> /dev/null`
44075    # bat and cmd files are not always considered executable in MSYS causing which
44076    # to not find them
44077    if test "x$new_path" = x \
44078        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44079        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44080      new_path="$path"
44081
44082  windows_path="$new_path"
44083  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44084    unix_path=`$CYGPATH -u "$windows_path"`
44085    new_path="$unix_path"
44086  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44087    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44088    new_path="$unix_path"
44089  fi
44090
44091    fi
44092
44093    if test "x$new_path" = x; then
44094      # It's still not found. Now this is an unrecoverable error.
44095      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44096$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44097      has_space=`$ECHO "$complete" | $GREP " "`
44098      if test "x$has_space" != x; then
44099        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44100$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44101      fi
44102      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44103    fi
44104  fi
44105
44106  # Now new_path has a complete unix path to the binary
44107  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44108    # Keep paths in /bin as-is, but remove trailing .exe if any
44109    new_path="${new_path/%.exe/}"
44110    # Do not save /bin paths to all_fixpath_prefixes!
44111  else
44112    # Not in mixed or Windows style, start by that.
44113    new_path=`cmd //c echo $new_path`
44114
44115  input_path="$new_path"
44116  # Check if we need to convert this using DOS-style short mode. If the path
44117  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44118  # take no chances and rewrite it.
44119  # Note: m4 eats our [], so we need to use [ and ] instead.
44120  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44121  if test "x$has_forbidden_chars" != x; then
44122    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44123    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44124  fi
44125
44126    # Output is in $new_path
44127
44128  windows_path="$new_path"
44129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44130    unix_path=`$CYGPATH -u "$windows_path"`
44131    new_path="$unix_path"
44132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44134    new_path="$unix_path"
44135  fi
44136
44137    # remove trailing .exe if any
44138    new_path="${new_path/%.exe/}"
44139
44140    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44141    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44142  fi
44143
44144    else
44145      # We're on a unix platform. Hooray! :)
44146      # First separate the path from the arguments. This will split at the first
44147      # space.
44148      complete="$OBJDUMP"
44149      path="${complete%% *}"
44150      tmp="$complete EOL"
44151      arguments="${tmp#* }"
44152
44153      # Cannot rely on the command "which" here since it doesn't always work.
44154      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44155      if test -z "$is_absolute_path"; then
44156        # Path to executable is not absolute. Find it.
44157        IFS_save="$IFS"
44158        IFS=:
44159        for p in $PATH; do
44160          if test -f "$p/$path" && test -x "$p/$path"; then
44161            new_path="$p/$path"
44162            break
44163          fi
44164        done
44165        IFS="$IFS_save"
44166      else
44167        # This is an absolute path, we can use it without further modifications.
44168        new_path="$path"
44169      fi
44170
44171      if test "x$new_path" = x; then
44172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
44173$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
44174        has_space=`$ECHO "$complete" | $GREP " "`
44175        if test "x$has_space" != x; then
44176          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44177$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44178        fi
44179        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
44180      fi
44181    fi
44182
44183    # Now join together the path and the arguments once again
44184    if test "x$arguments" != xEOL; then
44185      new_complete="$new_path ${arguments% *}"
44186    else
44187      new_complete="$new_path"
44188    fi
44189
44190    if test "x$complete" != "x$new_complete"; then
44191      OBJDUMP="$new_complete"
44192      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
44193$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
44194    fi
44195  fi
44196
44197  fi
44198
44199
44200  # Restore old path, except for the microsoft toolchain, which requires VS_PATH
44201  # to remain in place. Otherwise the compiler will not work in some siutations
44202  # in later configure checks.
44203  if test "x$TOOLCHAIN_TYPE" != "xmicrosoft"; then
44204    PATH="$OLD_PATH"
44205  fi
44206
44207  # Restore the flags to the user specified values.
44208  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
44209  CFLAGS="$ORG_CFLAGS"
44210  CXXFLAGS="$ORG_CXXFLAGS"
44211
44212
44213# Finally do some processing after the detection phase
44214
44215  if test "x$COMPILE_TYPE" = "xcross"; then
44216    # Now we need to find a C/C++ compiler that can build executables for the
44217    # build platform. We can't use the AC_PROG_CC macro, since it can only be
44218    # used once. Also, we need to do this without adding a tools dir to the
44219    # path, otherwise we might pick up cross-compilers which don't use standard
44220    # naming.
44221
44222    OLDPATH="$PATH"
44223
44224
44225# Check whether --with-build-devkit was given.
44226if test "${with_build_devkit+set}" = set; then :
44227  withval=$with_build_devkit;
44228fi
44229
44230    if test "x$with_build_devkit" = "xyes"; then
44231      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
44232    elif test -n "$with_build_devkit"; then
44233      if test ! -d "$with_build_devkit"; then
44234        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
44235      else
44236
44237  # Only process if variable expands to non-empty
44238
44239  if test "x$with_build_devkit" != x; then
44240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44241
44242  # Input might be given as Windows format, start by converting to
44243  # unix format.
44244  path="$with_build_devkit"
44245  new_path=`$CYGPATH -u "$path"`
44246
44247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44250  # "foo.exe" is OK but "foo" is an error.
44251  #
44252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
44253  # It is also a way to make sure we got the proper file name for the real test later on.
44254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44255  if test "x$test_shortpath" = x; then
44256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44257$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44258    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
44259  fi
44260
44261  # Call helper function which possibly converts this using DOS-style short mode.
44262  # If so, the updated path is stored in $new_path.
44263
44264  input_path="$new_path"
44265  # Check if we need to convert this using DOS-style short mode. If the path
44266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44267  # take no chances and rewrite it.
44268  # Note: m4 eats our [], so we need to use [ and ] instead.
44269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44270  if test "x$has_forbidden_chars" != x; then
44271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44275      # Going to short mode and back again did indeed matter. Since short mode is
44276      # case insensitive, let's make it lowercase to improve readability.
44277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44278      # Now convert it back to Unix-style (cygpath)
44279      input_path=`$CYGPATH -u "$shortmode_path"`
44280      new_path="$input_path"
44281    fi
44282  fi
44283
44284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44285  if test "x$test_cygdrive_prefix" = x; then
44286    # As a simple fix, exclude /usr/bin since it's not a real path.
44287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
44288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44289      # a path prefixed by /cygdrive for fixpath to work.
44290      new_path="$CYGWIN_ROOT_PATH$input_path"
44291    fi
44292  fi
44293
44294
44295  if test "x$path" != "x$new_path"; then
44296    with_build_devkit="$new_path"
44297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44298$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44299  fi
44300
44301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44302
44303  path="$with_build_devkit"
44304  has_colon=`$ECHO $path | $GREP ^.:`
44305  new_path="$path"
44306  if test "x$has_colon" = x; then
44307    # Not in mixed or Windows style, start by that.
44308    new_path=`cmd //c echo $path`
44309  fi
44310
44311
44312  input_path="$new_path"
44313  # Check if we need to convert this using DOS-style short mode. If the path
44314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44315  # take no chances and rewrite it.
44316  # Note: m4 eats our [], so we need to use [ and ] instead.
44317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44318  if test "x$has_forbidden_chars" != x; then
44319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44321  fi
44322
44323
44324  windows_path="$new_path"
44325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44326    unix_path=`$CYGPATH -u "$windows_path"`
44327    new_path="$unix_path"
44328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44330    new_path="$unix_path"
44331  fi
44332
44333  if test "x$path" != "x$new_path"; then
44334    with_build_devkit="$new_path"
44335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
44336$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
44337  fi
44338
44339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
44340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44341
44342    else
44343      # We're on a unix platform. Hooray! :)
44344      path="$with_build_devkit"
44345      has_space=`$ECHO "$path" | $GREP " "`
44346      if test "x$has_space" != x; then
44347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
44348$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
44349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
44350      fi
44351
44352      # Use eval to expand a potential ~
44353      eval path="$path"
44354      if test ! -f "$path" && test ! -d "$path"; then
44355        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
44356      fi
44357
44358      if test -d "$path"; then
44359        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
44360      else
44361        dir="`$DIRNAME "$path"`"
44362        base="`$BASENAME "$path"`"
44363        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
44364      fi
44365    fi
44366  fi
44367
44368        BUILD_DEVKIT_ROOT="$with_build_devkit"
44369        # Check for a meta data info file in the root of the devkit
44370        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
44371          # Process devkit.info so that existing devkit variables are not
44372          # modified by this
44373          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
44374              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
44375              -e "s/\$host/\$build/g" \
44376              $BUILD_DEVKIT_ROOT/devkit.info \
44377              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44378          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
44379          # This potentially sets the following:
44380          # A descriptive name of the devkit
44381
44382  if test "x$BUILD_DEVKIT_NAME" = x; then
44383    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
44384  fi
44385
44386          # Corresponds to --with-extra-path
44387
44388  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
44389    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
44390  fi
44391
44392          # Corresponds to --with-toolchain-path
44393
44394  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44395    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
44396  fi
44397
44398          # Corresponds to --with-sysroot
44399
44400  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
44401    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
44402  fi
44403
44404          # Skip the Window specific parts
44405        fi
44406
44407        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
44408$as_echo_n "checking for build platform devkit... " >&6; }
44409        if test "x$BUILD_DEVKIT_NAME" != x; then
44410          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
44411$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44412        else
44413          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44414$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44415        fi
44416
44417        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44418
44419  if test "x$BUILD_SYSROOT" != "x"; then
44420    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44421      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44422        # Solaris Studio does not have a concept of sysroot. Instead we must
44423        # make sure the default include and lib dirs are appended to each
44424        # compile and link command line. Must also add -I-xbuiltin to enable
44425        # inlining of system functions and intrinsics.
44426        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44427        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44428            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR"
44429      fi
44430    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44431      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44432      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44433    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44434      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44435      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44436    fi
44437    # The global CFLAGS and LDFLAGS variables need these for configure to function
44438    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44439    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44440    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44441    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44442  fi
44443
44444  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44445    # We also need -iframework<path>/System/Library/Frameworks
44446    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44447    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44448    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44449    # set this here so it doesn't have to be peppered throughout the forest
44450    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44451    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44452  fi
44453
44454
44455
44456
44457
44458         # Fallback default of just /bin if DEVKIT_PATH is not defined
44459        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44460          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44461        fi
44462        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44463      fi
44464    fi
44465
44466    # FIXME: we should list the discovered compilers as an exclude pattern!
44467    # If we do that, we can do this detection before POST_DETECTION, and still
44468    # find the build compilers in the tools dir, if needed.
44469
44470
44471
44472  # Publish this variable in the help.
44473
44474
44475  if [ -z "${BUILD_CC+x}" ]; then
44476    # The variable is not set by user, try to locate tool using the code snippet
44477    for ac_prog in cl cc gcc
44478do
44479  # Extract the first word of "$ac_prog", so it can be a program name with args.
44480set dummy $ac_prog; ac_word=$2
44481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44482$as_echo_n "checking for $ac_word... " >&6; }
44483if ${ac_cv_path_BUILD_CC+:} false; then :
44484  $as_echo_n "(cached) " >&6
44485else
44486  case $BUILD_CC in
44487  [\\/]* | ?:[\\/]*)
44488  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44489  ;;
44490  *)
44491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44492for as_dir in $PATH
44493do
44494  IFS=$as_save_IFS
44495  test -z "$as_dir" && as_dir=.
44496    for ac_exec_ext in '' $ac_executable_extensions; do
44497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44498    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44500    break 2
44501  fi
44502done
44503  done
44504IFS=$as_save_IFS
44505
44506  ;;
44507esac
44508fi
44509BUILD_CC=$ac_cv_path_BUILD_CC
44510if test -n "$BUILD_CC"; then
44511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44512$as_echo "$BUILD_CC" >&6; }
44513else
44514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44515$as_echo "no" >&6; }
44516fi
44517
44518
44519  test -n "$BUILD_CC" && break
44520done
44521
44522  else
44523    # The variable is set, but is it from the command line or the environment?
44524
44525    # Try to remove the string !BUILD_CC! from our list.
44526    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44527    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44528      # If it failed, the variable was not from the command line. Ignore it,
44529      # but warn the user (except for BASH, which is always set by the calling BASH).
44530      if test "xBUILD_CC" != xBASH; then
44531        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44532$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44533      fi
44534      # Try to locate tool using the code snippet
44535      for ac_prog in cl cc gcc
44536do
44537  # Extract the first word of "$ac_prog", so it can be a program name with args.
44538set dummy $ac_prog; ac_word=$2
44539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44540$as_echo_n "checking for $ac_word... " >&6; }
44541if ${ac_cv_path_BUILD_CC+:} false; then :
44542  $as_echo_n "(cached) " >&6
44543else
44544  case $BUILD_CC in
44545  [\\/]* | ?:[\\/]*)
44546  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44547  ;;
44548  *)
44549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44550for as_dir in $PATH
44551do
44552  IFS=$as_save_IFS
44553  test -z "$as_dir" && as_dir=.
44554    for ac_exec_ext in '' $ac_executable_extensions; do
44555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44556    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44558    break 2
44559  fi
44560done
44561  done
44562IFS=$as_save_IFS
44563
44564  ;;
44565esac
44566fi
44567BUILD_CC=$ac_cv_path_BUILD_CC
44568if test -n "$BUILD_CC"; then
44569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44570$as_echo "$BUILD_CC" >&6; }
44571else
44572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44573$as_echo "no" >&6; }
44574fi
44575
44576
44577  test -n "$BUILD_CC" && break
44578done
44579
44580    else
44581      # If it succeeded, then it was overridden by the user. We will use it
44582      # for the tool.
44583
44584      # First remove it from the list of overridden variables, so we can test
44585      # for unknown variables in the end.
44586      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44587
44588      # Check if we try to supply an empty value
44589      if test "x$BUILD_CC" = x; then
44590        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44591$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44592        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44593$as_echo_n "checking for BUILD_CC... " >&6; }
44594        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44595$as_echo "disabled" >&6; }
44596      else
44597        # Check if the provided tool contains a complete path.
44598        tool_specified="$BUILD_CC"
44599        tool_basename="${tool_specified##*/}"
44600        if test "x$tool_basename" = "x$tool_specified"; then
44601          # A command without a complete path is provided, search $PATH.
44602          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44603$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44604          # Extract the first word of "$tool_basename", so it can be a program name with args.
44605set dummy $tool_basename; ac_word=$2
44606{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44607$as_echo_n "checking for $ac_word... " >&6; }
44608if ${ac_cv_path_BUILD_CC+:} false; then :
44609  $as_echo_n "(cached) " >&6
44610else
44611  case $BUILD_CC in
44612  [\\/]* | ?:[\\/]*)
44613  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44614  ;;
44615  *)
44616  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44617for as_dir in $PATH
44618do
44619  IFS=$as_save_IFS
44620  test -z "$as_dir" && as_dir=.
44621    for ac_exec_ext in '' $ac_executable_extensions; do
44622  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44623    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44624    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44625    break 2
44626  fi
44627done
44628  done
44629IFS=$as_save_IFS
44630
44631  ;;
44632esac
44633fi
44634BUILD_CC=$ac_cv_path_BUILD_CC
44635if test -n "$BUILD_CC"; then
44636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44637$as_echo "$BUILD_CC" >&6; }
44638else
44639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44640$as_echo "no" >&6; }
44641fi
44642
44643
44644          if test "x$BUILD_CC" = x; then
44645            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44646          fi
44647        else
44648          # Otherwise we believe it is a complete path. Use it as it is.
44649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44650$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44651          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44652$as_echo_n "checking for BUILD_CC... " >&6; }
44653          if test ! -x "$tool_specified"; then
44654            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44655$as_echo "not found" >&6; }
44656            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44657          fi
44658          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44659$as_echo "$tool_specified" >&6; }
44660        fi
44661      fi
44662    fi
44663
44664  fi
44665
44666
44667
44668  if test "x$BUILD_CC" = x; then
44669    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44670  fi
44671
44672
44673
44674  # Only process if variable expands to non-empty
44675
44676  if test "x$BUILD_CC" != x; then
44677    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44678
44679  # First separate the path from the arguments. This will split at the first
44680  # space.
44681  complete="$BUILD_CC"
44682  path="${complete%% *}"
44683  tmp="$complete EOL"
44684  arguments="${tmp#* }"
44685
44686  # Input might be given as Windows format, start by converting to
44687  # unix format.
44688  new_path=`$CYGPATH -u "$path"`
44689
44690  # Now try to locate executable using which
44691  new_path=`$WHICH "$new_path" 2> /dev/null`
44692  # bat and cmd files are not always considered executable in cygwin causing which
44693  # to not find them
44694  if test "x$new_path" = x \
44695      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44696      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44697    new_path=`$CYGPATH -u "$path"`
44698  fi
44699  if test "x$new_path" = x; then
44700    # Oops. Which didn't find the executable.
44701    # The splitting of arguments from the executable at a space might have been incorrect,
44702    # since paths with space are more likely in Windows. Give it another try with the whole
44703    # argument.
44704    path="$complete"
44705    arguments="EOL"
44706    new_path=`$CYGPATH -u "$path"`
44707    new_path=`$WHICH "$new_path" 2> /dev/null`
44708    # bat and cmd files are not always considered executable in cygwin causing which
44709    # to not find them
44710    if test "x$new_path" = x \
44711        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44712        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44713      new_path=`$CYGPATH -u "$path"`
44714    fi
44715    if test "x$new_path" = x; then
44716      # It's still not found. Now this is an unrecoverable error.
44717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44718$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44719      has_space=`$ECHO "$complete" | $GREP " "`
44720      if test "x$has_space" != x; then
44721        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44722$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44723      fi
44724      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44725    fi
44726  fi
44727
44728  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44729  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44730  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44731  # "foo.exe" is OK but "foo" is an error.
44732  #
44733  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44734  # It is also a way to make sure we got the proper file name for the real test later on.
44735  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44736  if test "x$test_shortpath" = x; then
44737    # Short path failed, file does not exist as specified.
44738    # Try adding .exe or .cmd
44739    if test -f "${new_path}.exe"; then
44740      input_to_shortpath="${new_path}.exe"
44741    elif test -f "${new_path}.cmd"; then
44742      input_to_shortpath="${new_path}.cmd"
44743    else
44744      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44745$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44746      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44747$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44748      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44749    fi
44750  else
44751    input_to_shortpath="$new_path"
44752  fi
44753
44754  # Call helper function which possibly converts this using DOS-style short mode.
44755  # If so, the updated path is stored in $new_path.
44756  new_path="$input_to_shortpath"
44757
44758  input_path="$input_to_shortpath"
44759  # Check if we need to convert this using DOS-style short mode. If the path
44760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44761  # take no chances and rewrite it.
44762  # Note: m4 eats our [], so we need to use [ and ] instead.
44763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44764  if test "x$has_forbidden_chars" != x; then
44765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44769      # Going to short mode and back again did indeed matter. Since short mode is
44770      # case insensitive, let's make it lowercase to improve readability.
44771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44772      # Now convert it back to Unix-style (cygpath)
44773      input_path=`$CYGPATH -u "$shortmode_path"`
44774      new_path="$input_path"
44775    fi
44776  fi
44777
44778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44779  if test "x$test_cygdrive_prefix" = x; then
44780    # As a simple fix, exclude /usr/bin since it's not a real path.
44781    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44783      # a path prefixed by /cygdrive for fixpath to work.
44784      new_path="$CYGWIN_ROOT_PATH$input_path"
44785    fi
44786  fi
44787
44788  # remove trailing .exe if any
44789  new_path="${new_path/%.exe/}"
44790
44791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44792
44793  # First separate the path from the arguments. This will split at the first
44794  # space.
44795  complete="$BUILD_CC"
44796  path="${complete%% *}"
44797  tmp="$complete EOL"
44798  arguments="${tmp#* }"
44799
44800  # Input might be given as Windows format, start by converting to
44801  # unix format.
44802  new_path="$path"
44803
44804  windows_path="$new_path"
44805  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44806    unix_path=`$CYGPATH -u "$windows_path"`
44807    new_path="$unix_path"
44808  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44809    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44810    new_path="$unix_path"
44811  fi
44812
44813
44814  # Now try to locate executable using which
44815  new_path=`$WHICH "$new_path" 2> /dev/null`
44816
44817  if test "x$new_path" = x; then
44818    # Oops. Which didn't find the executable.
44819    # The splitting of arguments from the executable at a space might have been incorrect,
44820    # since paths with space are more likely in Windows. Give it another try with the whole
44821    # argument.
44822    path="$complete"
44823    arguments="EOL"
44824    new_path="$path"
44825
44826  windows_path="$new_path"
44827  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44828    unix_path=`$CYGPATH -u "$windows_path"`
44829    new_path="$unix_path"
44830  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44831    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44832    new_path="$unix_path"
44833  fi
44834
44835
44836    new_path=`$WHICH "$new_path" 2> /dev/null`
44837    # bat and cmd files are not always considered executable in MSYS causing which
44838    # to not find them
44839    if test "x$new_path" = x \
44840        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44841        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44842      new_path="$path"
44843
44844  windows_path="$new_path"
44845  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44846    unix_path=`$CYGPATH -u "$windows_path"`
44847    new_path="$unix_path"
44848  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44849    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44850    new_path="$unix_path"
44851  fi
44852
44853    fi
44854
44855    if test "x$new_path" = x; then
44856      # It's still not found. Now this is an unrecoverable error.
44857      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44858$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44859      has_space=`$ECHO "$complete" | $GREP " "`
44860      if test "x$has_space" != x; then
44861        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44862$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44863      fi
44864      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44865    fi
44866  fi
44867
44868  # Now new_path has a complete unix path to the binary
44869  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44870    # Keep paths in /bin as-is, but remove trailing .exe if any
44871    new_path="${new_path/%.exe/}"
44872    # Do not save /bin paths to all_fixpath_prefixes!
44873  else
44874    # Not in mixed or Windows style, start by that.
44875    new_path=`cmd //c echo $new_path`
44876
44877  input_path="$new_path"
44878  # Check if we need to convert this using DOS-style short mode. If the path
44879  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44880  # take no chances and rewrite it.
44881  # Note: m4 eats our [], so we need to use [ and ] instead.
44882  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44883  if test "x$has_forbidden_chars" != x; then
44884    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44885    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44886  fi
44887
44888    # Output is in $new_path
44889
44890  windows_path="$new_path"
44891  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44892    unix_path=`$CYGPATH -u "$windows_path"`
44893    new_path="$unix_path"
44894  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44895    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44896    new_path="$unix_path"
44897  fi
44898
44899    # remove trailing .exe if any
44900    new_path="${new_path/%.exe/}"
44901
44902    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44903    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44904  fi
44905
44906    else
44907      # We're on a unix platform. Hooray! :)
44908      # First separate the path from the arguments. This will split at the first
44909      # space.
44910      complete="$BUILD_CC"
44911      path="${complete%% *}"
44912      tmp="$complete EOL"
44913      arguments="${tmp#* }"
44914
44915      # Cannot rely on the command "which" here since it doesn't always work.
44916      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44917      if test -z "$is_absolute_path"; then
44918        # Path to executable is not absolute. Find it.
44919        IFS_save="$IFS"
44920        IFS=:
44921        for p in $PATH; do
44922          if test -f "$p/$path" && test -x "$p/$path"; then
44923            new_path="$p/$path"
44924            break
44925          fi
44926        done
44927        IFS="$IFS_save"
44928      else
44929        # This is an absolute path, we can use it without further modifications.
44930        new_path="$path"
44931      fi
44932
44933      if test "x$new_path" = x; then
44934        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44935$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44936        has_space=`$ECHO "$complete" | $GREP " "`
44937        if test "x$has_space" != x; then
44938          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44939$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44940        fi
44941        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44942      fi
44943    fi
44944
44945    # Now join together the path and the arguments once again
44946    if test "x$arguments" != xEOL; then
44947      new_complete="$new_path ${arguments% *}"
44948    else
44949      new_complete="$new_path"
44950    fi
44951
44952    if test "x$complete" != "x$new_complete"; then
44953      BUILD_CC="$new_complete"
44954      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44955$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44956    fi
44957  fi
44958
44959
44960
44961
44962  # Publish this variable in the help.
44963
44964
44965  if [ -z "${BUILD_CXX+x}" ]; then
44966    # The variable is not set by user, try to locate tool using the code snippet
44967    for ac_prog in cl CC g++
44968do
44969  # Extract the first word of "$ac_prog", so it can be a program name with args.
44970set dummy $ac_prog; ac_word=$2
44971{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44972$as_echo_n "checking for $ac_word... " >&6; }
44973if ${ac_cv_path_BUILD_CXX+:} false; then :
44974  $as_echo_n "(cached) " >&6
44975else
44976  case $BUILD_CXX in
44977  [\\/]* | ?:[\\/]*)
44978  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44979  ;;
44980  *)
44981  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44982for as_dir in $PATH
44983do
44984  IFS=$as_save_IFS
44985  test -z "$as_dir" && as_dir=.
44986    for ac_exec_ext in '' $ac_executable_extensions; do
44987  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44988    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44989    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44990    break 2
44991  fi
44992done
44993  done
44994IFS=$as_save_IFS
44995
44996  ;;
44997esac
44998fi
44999BUILD_CXX=$ac_cv_path_BUILD_CXX
45000if test -n "$BUILD_CXX"; then
45001  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45002$as_echo "$BUILD_CXX" >&6; }
45003else
45004  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45005$as_echo "no" >&6; }
45006fi
45007
45008
45009  test -n "$BUILD_CXX" && break
45010done
45011
45012  else
45013    # The variable is set, but is it from the command line or the environment?
45014
45015    # Try to remove the string !BUILD_CXX! from our list.
45016    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
45017    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45018      # If it failed, the variable was not from the command line. Ignore it,
45019      # but warn the user (except for BASH, which is always set by the calling BASH).
45020      if test "xBUILD_CXX" != xBASH; then
45021        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
45022$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
45023      fi
45024      # Try to locate tool using the code snippet
45025      for ac_prog in cl CC g++
45026do
45027  # Extract the first word of "$ac_prog", so it can be a program name with args.
45028set dummy $ac_prog; ac_word=$2
45029{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45030$as_echo_n "checking for $ac_word... " >&6; }
45031if ${ac_cv_path_BUILD_CXX+:} false; then :
45032  $as_echo_n "(cached) " >&6
45033else
45034  case $BUILD_CXX in
45035  [\\/]* | ?:[\\/]*)
45036  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45037  ;;
45038  *)
45039  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45040for as_dir in $PATH
45041do
45042  IFS=$as_save_IFS
45043  test -z "$as_dir" && as_dir=.
45044    for ac_exec_ext in '' $ac_executable_extensions; do
45045  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45046    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45047    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45048    break 2
45049  fi
45050done
45051  done
45052IFS=$as_save_IFS
45053
45054  ;;
45055esac
45056fi
45057BUILD_CXX=$ac_cv_path_BUILD_CXX
45058if test -n "$BUILD_CXX"; then
45059  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45060$as_echo "$BUILD_CXX" >&6; }
45061else
45062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45063$as_echo "no" >&6; }
45064fi
45065
45066
45067  test -n "$BUILD_CXX" && break
45068done
45069
45070    else
45071      # If it succeeded, then it was overridden by the user. We will use it
45072      # for the tool.
45073
45074      # First remove it from the list of overridden variables, so we can test
45075      # for unknown variables in the end.
45076      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45077
45078      # Check if we try to supply an empty value
45079      if test "x$BUILD_CXX" = x; then
45080        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
45081$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
45082        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45083$as_echo_n "checking for BUILD_CXX... " >&6; }
45084        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45085$as_echo "disabled" >&6; }
45086      else
45087        # Check if the provided tool contains a complete path.
45088        tool_specified="$BUILD_CXX"
45089        tool_basename="${tool_specified##*/}"
45090        if test "x$tool_basename" = "x$tool_specified"; then
45091          # A command without a complete path is provided, search $PATH.
45092          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
45093$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
45094          # Extract the first word of "$tool_basename", so it can be a program name with args.
45095set dummy $tool_basename; ac_word=$2
45096{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45097$as_echo_n "checking for $ac_word... " >&6; }
45098if ${ac_cv_path_BUILD_CXX+:} false; then :
45099  $as_echo_n "(cached) " >&6
45100else
45101  case $BUILD_CXX in
45102  [\\/]* | ?:[\\/]*)
45103  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
45104  ;;
45105  *)
45106  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45107for as_dir in $PATH
45108do
45109  IFS=$as_save_IFS
45110  test -z "$as_dir" && as_dir=.
45111    for ac_exec_ext in '' $ac_executable_extensions; do
45112  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45113    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
45114    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45115    break 2
45116  fi
45117done
45118  done
45119IFS=$as_save_IFS
45120
45121  ;;
45122esac
45123fi
45124BUILD_CXX=$ac_cv_path_BUILD_CXX
45125if test -n "$BUILD_CXX"; then
45126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
45127$as_echo "$BUILD_CXX" >&6; }
45128else
45129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45130$as_echo "no" >&6; }
45131fi
45132
45133
45134          if test "x$BUILD_CXX" = x; then
45135            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45136          fi
45137        else
45138          # Otherwise we believe it is a complete path. Use it as it is.
45139          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
45140$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
45141          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
45142$as_echo_n "checking for BUILD_CXX... " >&6; }
45143          if test ! -x "$tool_specified"; then
45144            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45145$as_echo "not found" >&6; }
45146            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
45147          fi
45148          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45149$as_echo "$tool_specified" >&6; }
45150        fi
45151      fi
45152    fi
45153
45154  fi
45155
45156
45157
45158  if test "x$BUILD_CXX" = x; then
45159    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
45160  fi
45161
45162
45163
45164  # Only process if variable expands to non-empty
45165
45166  if test "x$BUILD_CXX" != x; then
45167    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45168
45169  # First separate the path from the arguments. This will split at the first
45170  # space.
45171  complete="$BUILD_CXX"
45172  path="${complete%% *}"
45173  tmp="$complete EOL"
45174  arguments="${tmp#* }"
45175
45176  # Input might be given as Windows format, start by converting to
45177  # unix format.
45178  new_path=`$CYGPATH -u "$path"`
45179
45180  # Now try to locate executable using which
45181  new_path=`$WHICH "$new_path" 2> /dev/null`
45182  # bat and cmd files are not always considered executable in cygwin causing which
45183  # to not find them
45184  if test "x$new_path" = x \
45185      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45186      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45187    new_path=`$CYGPATH -u "$path"`
45188  fi
45189  if test "x$new_path" = x; then
45190    # Oops. Which didn't find the executable.
45191    # The splitting of arguments from the executable at a space might have been incorrect,
45192    # since paths with space are more likely in Windows. Give it another try with the whole
45193    # argument.
45194    path="$complete"
45195    arguments="EOL"
45196    new_path=`$CYGPATH -u "$path"`
45197    new_path=`$WHICH "$new_path" 2> /dev/null`
45198    # bat and cmd files are not always considered executable in cygwin causing which
45199    # to not find them
45200    if test "x$new_path" = x \
45201        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45202        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45203      new_path=`$CYGPATH -u "$path"`
45204    fi
45205    if test "x$new_path" = x; then
45206      # It's still not found. Now this is an unrecoverable error.
45207      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45208$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45209      has_space=`$ECHO "$complete" | $GREP " "`
45210      if test "x$has_space" != x; then
45211        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45212$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45213      fi
45214      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45215    fi
45216  fi
45217
45218  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45219  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45220  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45221  # "foo.exe" is OK but "foo" is an error.
45222  #
45223  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45224  # It is also a way to make sure we got the proper file name for the real test later on.
45225  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45226  if test "x$test_shortpath" = x; then
45227    # Short path failed, file does not exist as specified.
45228    # Try adding .exe or .cmd
45229    if test -f "${new_path}.exe"; then
45230      input_to_shortpath="${new_path}.exe"
45231    elif test -f "${new_path}.cmd"; then
45232      input_to_shortpath="${new_path}.cmd"
45233    else
45234      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
45235$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
45236      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45237$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45238      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45239    fi
45240  else
45241    input_to_shortpath="$new_path"
45242  fi
45243
45244  # Call helper function which possibly converts this using DOS-style short mode.
45245  # If so, the updated path is stored in $new_path.
45246  new_path="$input_to_shortpath"
45247
45248  input_path="$input_to_shortpath"
45249  # Check if we need to convert this using DOS-style short mode. If the path
45250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45251  # take no chances and rewrite it.
45252  # Note: m4 eats our [], so we need to use [ and ] instead.
45253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45254  if test "x$has_forbidden_chars" != x; then
45255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45259      # Going to short mode and back again did indeed matter. Since short mode is
45260      # case insensitive, let's make it lowercase to improve readability.
45261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45262      # Now convert it back to Unix-style (cygpath)
45263      input_path=`$CYGPATH -u "$shortmode_path"`
45264      new_path="$input_path"
45265    fi
45266  fi
45267
45268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45269  if test "x$test_cygdrive_prefix" = x; then
45270    # As a simple fix, exclude /usr/bin since it's not a real path.
45271    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45273      # a path prefixed by /cygdrive for fixpath to work.
45274      new_path="$CYGWIN_ROOT_PATH$input_path"
45275    fi
45276  fi
45277
45278  # remove trailing .exe if any
45279  new_path="${new_path/%.exe/}"
45280
45281    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45282
45283  # First separate the path from the arguments. This will split at the first
45284  # space.
45285  complete="$BUILD_CXX"
45286  path="${complete%% *}"
45287  tmp="$complete EOL"
45288  arguments="${tmp#* }"
45289
45290  # Input might be given as Windows format, start by converting to
45291  # unix format.
45292  new_path="$path"
45293
45294  windows_path="$new_path"
45295  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45296    unix_path=`$CYGPATH -u "$windows_path"`
45297    new_path="$unix_path"
45298  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45299    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45300    new_path="$unix_path"
45301  fi
45302
45303
45304  # Now try to locate executable using which
45305  new_path=`$WHICH "$new_path" 2> /dev/null`
45306
45307  if test "x$new_path" = x; then
45308    # Oops. Which didn't find the executable.
45309    # The splitting of arguments from the executable at a space might have been incorrect,
45310    # since paths with space are more likely in Windows. Give it another try with the whole
45311    # argument.
45312    path="$complete"
45313    arguments="EOL"
45314    new_path="$path"
45315
45316  windows_path="$new_path"
45317  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45318    unix_path=`$CYGPATH -u "$windows_path"`
45319    new_path="$unix_path"
45320  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45321    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45322    new_path="$unix_path"
45323  fi
45324
45325
45326    new_path=`$WHICH "$new_path" 2> /dev/null`
45327    # bat and cmd files are not always considered executable in MSYS causing which
45328    # to not find them
45329    if test "x$new_path" = x \
45330        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45331        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45332      new_path="$path"
45333
45334  windows_path="$new_path"
45335  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45336    unix_path=`$CYGPATH -u "$windows_path"`
45337    new_path="$unix_path"
45338  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45339    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45340    new_path="$unix_path"
45341  fi
45342
45343    fi
45344
45345    if test "x$new_path" = x; then
45346      # It's still not found. Now this is an unrecoverable error.
45347      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45348$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45349      has_space=`$ECHO "$complete" | $GREP " "`
45350      if test "x$has_space" != x; then
45351        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45352$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45353      fi
45354      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45355    fi
45356  fi
45357
45358  # Now new_path has a complete unix path to the binary
45359  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45360    # Keep paths in /bin as-is, but remove trailing .exe if any
45361    new_path="${new_path/%.exe/}"
45362    # Do not save /bin paths to all_fixpath_prefixes!
45363  else
45364    # Not in mixed or Windows style, start by that.
45365    new_path=`cmd //c echo $new_path`
45366
45367  input_path="$new_path"
45368  # Check if we need to convert this using DOS-style short mode. If the path
45369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45370  # take no chances and rewrite it.
45371  # Note: m4 eats our [], so we need to use [ and ] instead.
45372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45373  if test "x$has_forbidden_chars" != x; then
45374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45375    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45376  fi
45377
45378    # Output is in $new_path
45379
45380  windows_path="$new_path"
45381  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45382    unix_path=`$CYGPATH -u "$windows_path"`
45383    new_path="$unix_path"
45384  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45385    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45386    new_path="$unix_path"
45387  fi
45388
45389    # remove trailing .exe if any
45390    new_path="${new_path/%.exe/}"
45391
45392    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45393    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45394  fi
45395
45396    else
45397      # We're on a unix platform. Hooray! :)
45398      # First separate the path from the arguments. This will split at the first
45399      # space.
45400      complete="$BUILD_CXX"
45401      path="${complete%% *}"
45402      tmp="$complete EOL"
45403      arguments="${tmp#* }"
45404
45405      # Cannot rely on the command "which" here since it doesn't always work.
45406      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45407      if test -z "$is_absolute_path"; then
45408        # Path to executable is not absolute. Find it.
45409        IFS_save="$IFS"
45410        IFS=:
45411        for p in $PATH; do
45412          if test -f "$p/$path" && test -x "$p/$path"; then
45413            new_path="$p/$path"
45414            break
45415          fi
45416        done
45417        IFS="$IFS_save"
45418      else
45419        # This is an absolute path, we can use it without further modifications.
45420        new_path="$path"
45421      fi
45422
45423      if test "x$new_path" = x; then
45424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45425$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45426        has_space=`$ECHO "$complete" | $GREP " "`
45427        if test "x$has_space" != x; then
45428          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45429$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45430        fi
45431        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45432      fi
45433    fi
45434
45435    # Now join together the path and the arguments once again
45436    if test "x$arguments" != xEOL; then
45437      new_complete="$new_path ${arguments% *}"
45438    else
45439      new_complete="$new_path"
45440    fi
45441
45442    if test "x$complete" != "x$new_complete"; then
45443      BUILD_CXX="$new_complete"
45444      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45445$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45446    fi
45447  fi
45448
45449
45450
45451  # Publish this variable in the help.
45452
45453
45454  if [ -z "${BUILD_NM+x}" ]; then
45455    # The variable is not set by user, try to locate tool using the code snippet
45456    for ac_prog in nm gcc-nm
45457do
45458  # Extract the first word of "$ac_prog", so it can be a program name with args.
45459set dummy $ac_prog; ac_word=$2
45460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45461$as_echo_n "checking for $ac_word... " >&6; }
45462if ${ac_cv_path_BUILD_NM+:} false; then :
45463  $as_echo_n "(cached) " >&6
45464else
45465  case $BUILD_NM in
45466  [\\/]* | ?:[\\/]*)
45467  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45468  ;;
45469  *)
45470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45471for as_dir in $PATH
45472do
45473  IFS=$as_save_IFS
45474  test -z "$as_dir" && as_dir=.
45475    for ac_exec_ext in '' $ac_executable_extensions; do
45476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45477    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45479    break 2
45480  fi
45481done
45482  done
45483IFS=$as_save_IFS
45484
45485  ;;
45486esac
45487fi
45488BUILD_NM=$ac_cv_path_BUILD_NM
45489if test -n "$BUILD_NM"; then
45490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45491$as_echo "$BUILD_NM" >&6; }
45492else
45493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45494$as_echo "no" >&6; }
45495fi
45496
45497
45498  test -n "$BUILD_NM" && break
45499done
45500
45501  else
45502    # The variable is set, but is it from the command line or the environment?
45503
45504    # Try to remove the string !BUILD_NM! from our list.
45505    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45506    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45507      # If it failed, the variable was not from the command line. Ignore it,
45508      # but warn the user (except for BASH, which is always set by the calling BASH).
45509      if test "xBUILD_NM" != xBASH; then
45510        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45511$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45512      fi
45513      # Try to locate tool using the code snippet
45514      for ac_prog in nm gcc-nm
45515do
45516  # Extract the first word of "$ac_prog", so it can be a program name with args.
45517set dummy $ac_prog; ac_word=$2
45518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45519$as_echo_n "checking for $ac_word... " >&6; }
45520if ${ac_cv_path_BUILD_NM+:} false; then :
45521  $as_echo_n "(cached) " >&6
45522else
45523  case $BUILD_NM in
45524  [\\/]* | ?:[\\/]*)
45525  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45526  ;;
45527  *)
45528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45529for as_dir in $PATH
45530do
45531  IFS=$as_save_IFS
45532  test -z "$as_dir" && as_dir=.
45533    for ac_exec_ext in '' $ac_executable_extensions; do
45534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45535    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45537    break 2
45538  fi
45539done
45540  done
45541IFS=$as_save_IFS
45542
45543  ;;
45544esac
45545fi
45546BUILD_NM=$ac_cv_path_BUILD_NM
45547if test -n "$BUILD_NM"; then
45548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45549$as_echo "$BUILD_NM" >&6; }
45550else
45551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45552$as_echo "no" >&6; }
45553fi
45554
45555
45556  test -n "$BUILD_NM" && break
45557done
45558
45559    else
45560      # If it succeeded, then it was overridden by the user. We will use it
45561      # for the tool.
45562
45563      # First remove it from the list of overridden variables, so we can test
45564      # for unknown variables in the end.
45565      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45566
45567      # Check if we try to supply an empty value
45568      if test "x$BUILD_NM" = x; then
45569        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45570$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45571        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45572$as_echo_n "checking for BUILD_NM... " >&6; }
45573        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45574$as_echo "disabled" >&6; }
45575      else
45576        # Check if the provided tool contains a complete path.
45577        tool_specified="$BUILD_NM"
45578        tool_basename="${tool_specified##*/}"
45579        if test "x$tool_basename" = "x$tool_specified"; then
45580          # A command without a complete path is provided, search $PATH.
45581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45582$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45583          # Extract the first word of "$tool_basename", so it can be a program name with args.
45584set dummy $tool_basename; ac_word=$2
45585{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45586$as_echo_n "checking for $ac_word... " >&6; }
45587if ${ac_cv_path_BUILD_NM+:} false; then :
45588  $as_echo_n "(cached) " >&6
45589else
45590  case $BUILD_NM in
45591  [\\/]* | ?:[\\/]*)
45592  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45593  ;;
45594  *)
45595  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45596for as_dir in $PATH
45597do
45598  IFS=$as_save_IFS
45599  test -z "$as_dir" && as_dir=.
45600    for ac_exec_ext in '' $ac_executable_extensions; do
45601  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45602    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45603    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45604    break 2
45605  fi
45606done
45607  done
45608IFS=$as_save_IFS
45609
45610  ;;
45611esac
45612fi
45613BUILD_NM=$ac_cv_path_BUILD_NM
45614if test -n "$BUILD_NM"; then
45615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45616$as_echo "$BUILD_NM" >&6; }
45617else
45618  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45619$as_echo "no" >&6; }
45620fi
45621
45622
45623          if test "x$BUILD_NM" = x; then
45624            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45625          fi
45626        else
45627          # Otherwise we believe it is a complete path. Use it as it is.
45628          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45629$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45630          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45631$as_echo_n "checking for BUILD_NM... " >&6; }
45632          if test ! -x "$tool_specified"; then
45633            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45634$as_echo "not found" >&6; }
45635            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45636          fi
45637          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45638$as_echo "$tool_specified" >&6; }
45639        fi
45640      fi
45641    fi
45642
45643  fi
45644
45645
45646
45647  # Only process if variable expands to non-empty
45648
45649  if test "x$BUILD_NM" != x; then
45650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45651
45652  # First separate the path from the arguments. This will split at the first
45653  # space.
45654  complete="$BUILD_NM"
45655  path="${complete%% *}"
45656  tmp="$complete EOL"
45657  arguments="${tmp#* }"
45658
45659  # Input might be given as Windows format, start by converting to
45660  # unix format.
45661  new_path=`$CYGPATH -u "$path"`
45662
45663  # Now try to locate executable using which
45664  new_path=`$WHICH "$new_path" 2> /dev/null`
45665  # bat and cmd files are not always considered executable in cygwin causing which
45666  # to not find them
45667  if test "x$new_path" = x \
45668      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45669      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45670    new_path=`$CYGPATH -u "$path"`
45671  fi
45672  if test "x$new_path" = x; then
45673    # Oops. Which didn't find the executable.
45674    # The splitting of arguments from the executable at a space might have been incorrect,
45675    # since paths with space are more likely in Windows. Give it another try with the whole
45676    # argument.
45677    path="$complete"
45678    arguments="EOL"
45679    new_path=`$CYGPATH -u "$path"`
45680    new_path=`$WHICH "$new_path" 2> /dev/null`
45681    # bat and cmd files are not always considered executable in cygwin causing which
45682    # to not find them
45683    if test "x$new_path" = x \
45684        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45685        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45686      new_path=`$CYGPATH -u "$path"`
45687    fi
45688    if test "x$new_path" = x; then
45689      # It's still not found. Now this is an unrecoverable error.
45690      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45691$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45692      has_space=`$ECHO "$complete" | $GREP " "`
45693      if test "x$has_space" != x; then
45694        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45695$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45696      fi
45697      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45698    fi
45699  fi
45700
45701  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45702  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45703  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45704  # "foo.exe" is OK but "foo" is an error.
45705  #
45706  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45707  # It is also a way to make sure we got the proper file name for the real test later on.
45708  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45709  if test "x$test_shortpath" = x; then
45710    # Short path failed, file does not exist as specified.
45711    # Try adding .exe or .cmd
45712    if test -f "${new_path}.exe"; then
45713      input_to_shortpath="${new_path}.exe"
45714    elif test -f "${new_path}.cmd"; then
45715      input_to_shortpath="${new_path}.cmd"
45716    else
45717      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45718$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45719      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45720$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45721      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45722    fi
45723  else
45724    input_to_shortpath="$new_path"
45725  fi
45726
45727  # Call helper function which possibly converts this using DOS-style short mode.
45728  # If so, the updated path is stored in $new_path.
45729  new_path="$input_to_shortpath"
45730
45731  input_path="$input_to_shortpath"
45732  # Check if we need to convert this using DOS-style short mode. If the path
45733  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45734  # take no chances and rewrite it.
45735  # Note: m4 eats our [], so we need to use [ and ] instead.
45736  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45737  if test "x$has_forbidden_chars" != x; then
45738    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45739    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45740    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45741    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45742      # Going to short mode and back again did indeed matter. Since short mode is
45743      # case insensitive, let's make it lowercase to improve readability.
45744      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45745      # Now convert it back to Unix-style (cygpath)
45746      input_path=`$CYGPATH -u "$shortmode_path"`
45747      new_path="$input_path"
45748    fi
45749  fi
45750
45751  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45752  if test "x$test_cygdrive_prefix" = x; then
45753    # As a simple fix, exclude /usr/bin since it's not a real path.
45754    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45755      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45756      # a path prefixed by /cygdrive for fixpath to work.
45757      new_path="$CYGWIN_ROOT_PATH$input_path"
45758    fi
45759  fi
45760
45761  # remove trailing .exe if any
45762  new_path="${new_path/%.exe/}"
45763
45764    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45765
45766  # First separate the path from the arguments. This will split at the first
45767  # space.
45768  complete="$BUILD_NM"
45769  path="${complete%% *}"
45770  tmp="$complete EOL"
45771  arguments="${tmp#* }"
45772
45773  # Input might be given as Windows format, start by converting to
45774  # unix format.
45775  new_path="$path"
45776
45777  windows_path="$new_path"
45778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45779    unix_path=`$CYGPATH -u "$windows_path"`
45780    new_path="$unix_path"
45781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45783    new_path="$unix_path"
45784  fi
45785
45786
45787  # Now try to locate executable using which
45788  new_path=`$WHICH "$new_path" 2> /dev/null`
45789
45790  if test "x$new_path" = x; then
45791    # Oops. Which didn't find the executable.
45792    # The splitting of arguments from the executable at a space might have been incorrect,
45793    # since paths with space are more likely in Windows. Give it another try with the whole
45794    # argument.
45795    path="$complete"
45796    arguments="EOL"
45797    new_path="$path"
45798
45799  windows_path="$new_path"
45800  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45801    unix_path=`$CYGPATH -u "$windows_path"`
45802    new_path="$unix_path"
45803  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45804    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45805    new_path="$unix_path"
45806  fi
45807
45808
45809    new_path=`$WHICH "$new_path" 2> /dev/null`
45810    # bat and cmd files are not always considered executable in MSYS causing which
45811    # to not find them
45812    if test "x$new_path" = x \
45813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45815      new_path="$path"
45816
45817  windows_path="$new_path"
45818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45819    unix_path=`$CYGPATH -u "$windows_path"`
45820    new_path="$unix_path"
45821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45822    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45823    new_path="$unix_path"
45824  fi
45825
45826    fi
45827
45828    if test "x$new_path" = x; then
45829      # It's still not found. Now this is an unrecoverable error.
45830      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45831$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45832      has_space=`$ECHO "$complete" | $GREP " "`
45833      if test "x$has_space" != x; then
45834        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45835$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45836      fi
45837      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45838    fi
45839  fi
45840
45841  # Now new_path has a complete unix path to the binary
45842  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45843    # Keep paths in /bin as-is, but remove trailing .exe if any
45844    new_path="${new_path/%.exe/}"
45845    # Do not save /bin paths to all_fixpath_prefixes!
45846  else
45847    # Not in mixed or Windows style, start by that.
45848    new_path=`cmd //c echo $new_path`
45849
45850  input_path="$new_path"
45851  # Check if we need to convert this using DOS-style short mode. If the path
45852  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45853  # take no chances and rewrite it.
45854  # Note: m4 eats our [], so we need to use [ and ] instead.
45855  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45856  if test "x$has_forbidden_chars" != x; then
45857    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45858    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45859  fi
45860
45861    # Output is in $new_path
45862
45863  windows_path="$new_path"
45864  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45865    unix_path=`$CYGPATH -u "$windows_path"`
45866    new_path="$unix_path"
45867  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45868    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45869    new_path="$unix_path"
45870  fi
45871
45872    # remove trailing .exe if any
45873    new_path="${new_path/%.exe/}"
45874
45875    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45876    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45877  fi
45878
45879    else
45880      # We're on a unix platform. Hooray! :)
45881      # First separate the path from the arguments. This will split at the first
45882      # space.
45883      complete="$BUILD_NM"
45884      path="${complete%% *}"
45885      tmp="$complete EOL"
45886      arguments="${tmp#* }"
45887
45888      # Cannot rely on the command "which" here since it doesn't always work.
45889      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45890      if test -z "$is_absolute_path"; then
45891        # Path to executable is not absolute. Find it.
45892        IFS_save="$IFS"
45893        IFS=:
45894        for p in $PATH; do
45895          if test -f "$p/$path" && test -x "$p/$path"; then
45896            new_path="$p/$path"
45897            break
45898          fi
45899        done
45900        IFS="$IFS_save"
45901      else
45902        # This is an absolute path, we can use it without further modifications.
45903        new_path="$path"
45904      fi
45905
45906      if test "x$new_path" = x; then
45907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45908$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45909        has_space=`$ECHO "$complete" | $GREP " "`
45910        if test "x$has_space" != x; then
45911          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45912$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45913        fi
45914        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45915      fi
45916    fi
45917
45918    # Now join together the path and the arguments once again
45919    if test "x$arguments" != xEOL; then
45920      new_complete="$new_path ${arguments% *}"
45921    else
45922      new_complete="$new_path"
45923    fi
45924
45925    if test "x$complete" != "x$new_complete"; then
45926      BUILD_NM="$new_complete"
45927      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45928$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45929    fi
45930  fi
45931
45932
45933
45934  # Publish this variable in the help.
45935
45936
45937  if [ -z "${BUILD_AR+x}" ]; then
45938    # The variable is not set by user, try to locate tool using the code snippet
45939    for ac_prog in ar gcc-ar
45940do
45941  # Extract the first word of "$ac_prog", so it can be a program name with args.
45942set dummy $ac_prog; ac_word=$2
45943{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45944$as_echo_n "checking for $ac_word... " >&6; }
45945if ${ac_cv_path_BUILD_AR+:} false; then :
45946  $as_echo_n "(cached) " >&6
45947else
45948  case $BUILD_AR in
45949  [\\/]* | ?:[\\/]*)
45950  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45951  ;;
45952  *)
45953  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45954for as_dir in $PATH
45955do
45956  IFS=$as_save_IFS
45957  test -z "$as_dir" && as_dir=.
45958    for ac_exec_ext in '' $ac_executable_extensions; do
45959  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45960    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45961    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45962    break 2
45963  fi
45964done
45965  done
45966IFS=$as_save_IFS
45967
45968  ;;
45969esac
45970fi
45971BUILD_AR=$ac_cv_path_BUILD_AR
45972if test -n "$BUILD_AR"; then
45973  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45974$as_echo "$BUILD_AR" >&6; }
45975else
45976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45977$as_echo "no" >&6; }
45978fi
45979
45980
45981  test -n "$BUILD_AR" && break
45982done
45983
45984  else
45985    # The variable is set, but is it from the command line or the environment?
45986
45987    # Try to remove the string !BUILD_AR! from our list.
45988    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45989    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45990      # If it failed, the variable was not from the command line. Ignore it,
45991      # but warn the user (except for BASH, which is always set by the calling BASH).
45992      if test "xBUILD_AR" != xBASH; then
45993        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45994$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45995      fi
45996      # Try to locate tool using the code snippet
45997      for ac_prog in ar gcc-ar
45998do
45999  # Extract the first word of "$ac_prog", so it can be a program name with args.
46000set dummy $ac_prog; ac_word=$2
46001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46002$as_echo_n "checking for $ac_word... " >&6; }
46003if ${ac_cv_path_BUILD_AR+:} false; then :
46004  $as_echo_n "(cached) " >&6
46005else
46006  case $BUILD_AR in
46007  [\\/]* | ?:[\\/]*)
46008  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46009  ;;
46010  *)
46011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46012for as_dir in $PATH
46013do
46014  IFS=$as_save_IFS
46015  test -z "$as_dir" && as_dir=.
46016    for ac_exec_ext in '' $ac_executable_extensions; do
46017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46018    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46020    break 2
46021  fi
46022done
46023  done
46024IFS=$as_save_IFS
46025
46026  ;;
46027esac
46028fi
46029BUILD_AR=$ac_cv_path_BUILD_AR
46030if test -n "$BUILD_AR"; then
46031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46032$as_echo "$BUILD_AR" >&6; }
46033else
46034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46035$as_echo "no" >&6; }
46036fi
46037
46038
46039  test -n "$BUILD_AR" && break
46040done
46041
46042    else
46043      # If it succeeded, then it was overridden by the user. We will use it
46044      # for the tool.
46045
46046      # First remove it from the list of overridden variables, so we can test
46047      # for unknown variables in the end.
46048      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46049
46050      # Check if we try to supply an empty value
46051      if test "x$BUILD_AR" = x; then
46052        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
46053$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
46054        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46055$as_echo_n "checking for BUILD_AR... " >&6; }
46056        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46057$as_echo "disabled" >&6; }
46058      else
46059        # Check if the provided tool contains a complete path.
46060        tool_specified="$BUILD_AR"
46061        tool_basename="${tool_specified##*/}"
46062        if test "x$tool_basename" = "x$tool_specified"; then
46063          # A command without a complete path is provided, search $PATH.
46064          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
46065$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
46066          # Extract the first word of "$tool_basename", so it can be a program name with args.
46067set dummy $tool_basename; ac_word=$2
46068{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46069$as_echo_n "checking for $ac_word... " >&6; }
46070if ${ac_cv_path_BUILD_AR+:} false; then :
46071  $as_echo_n "(cached) " >&6
46072else
46073  case $BUILD_AR in
46074  [\\/]* | ?:[\\/]*)
46075  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
46076  ;;
46077  *)
46078  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46079for as_dir in $PATH
46080do
46081  IFS=$as_save_IFS
46082  test -z "$as_dir" && as_dir=.
46083    for ac_exec_ext in '' $ac_executable_extensions; do
46084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46085    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
46086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46087    break 2
46088  fi
46089done
46090  done
46091IFS=$as_save_IFS
46092
46093  ;;
46094esac
46095fi
46096BUILD_AR=$ac_cv_path_BUILD_AR
46097if test -n "$BUILD_AR"; then
46098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
46099$as_echo "$BUILD_AR" >&6; }
46100else
46101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46102$as_echo "no" >&6; }
46103fi
46104
46105
46106          if test "x$BUILD_AR" = x; then
46107            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46108          fi
46109        else
46110          # Otherwise we believe it is a complete path. Use it as it is.
46111          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
46112$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
46113          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
46114$as_echo_n "checking for BUILD_AR... " >&6; }
46115          if test ! -x "$tool_specified"; then
46116            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46117$as_echo "not found" >&6; }
46118            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
46119          fi
46120          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46121$as_echo "$tool_specified" >&6; }
46122        fi
46123      fi
46124    fi
46125
46126  fi
46127
46128
46129
46130  # Only process if variable expands to non-empty
46131
46132  if test "x$BUILD_AR" != x; then
46133    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46134
46135  # First separate the path from the arguments. This will split at the first
46136  # space.
46137  complete="$BUILD_AR"
46138  path="${complete%% *}"
46139  tmp="$complete EOL"
46140  arguments="${tmp#* }"
46141
46142  # Input might be given as Windows format, start by converting to
46143  # unix format.
46144  new_path=`$CYGPATH -u "$path"`
46145
46146  # Now try to locate executable using which
46147  new_path=`$WHICH "$new_path" 2> /dev/null`
46148  # bat and cmd files are not always considered executable in cygwin causing which
46149  # to not find them
46150  if test "x$new_path" = x \
46151      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46152      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46153    new_path=`$CYGPATH -u "$path"`
46154  fi
46155  if test "x$new_path" = x; then
46156    # Oops. Which didn't find the executable.
46157    # The splitting of arguments from the executable at a space might have been incorrect,
46158    # since paths with space are more likely in Windows. Give it another try with the whole
46159    # argument.
46160    path="$complete"
46161    arguments="EOL"
46162    new_path=`$CYGPATH -u "$path"`
46163    new_path=`$WHICH "$new_path" 2> /dev/null`
46164    # bat and cmd files are not always considered executable in cygwin causing which
46165    # to not find them
46166    if test "x$new_path" = x \
46167        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46168        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46169      new_path=`$CYGPATH -u "$path"`
46170    fi
46171    if test "x$new_path" = x; then
46172      # It's still not found. Now this is an unrecoverable error.
46173      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46174$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46175      has_space=`$ECHO "$complete" | $GREP " "`
46176      if test "x$has_space" != x; then
46177        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46178$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46179      fi
46180      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46181    fi
46182  fi
46183
46184  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46185  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46186  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46187  # "foo.exe" is OK but "foo" is an error.
46188  #
46189  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46190  # It is also a way to make sure we got the proper file name for the real test later on.
46191  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46192  if test "x$test_shortpath" = x; then
46193    # Short path failed, file does not exist as specified.
46194    # Try adding .exe or .cmd
46195    if test -f "${new_path}.exe"; then
46196      input_to_shortpath="${new_path}.exe"
46197    elif test -f "${new_path}.cmd"; then
46198      input_to_shortpath="${new_path}.cmd"
46199    else
46200      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
46201$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
46202      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46203$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46204      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46205    fi
46206  else
46207    input_to_shortpath="$new_path"
46208  fi
46209
46210  # Call helper function which possibly converts this using DOS-style short mode.
46211  # If so, the updated path is stored in $new_path.
46212  new_path="$input_to_shortpath"
46213
46214  input_path="$input_to_shortpath"
46215  # Check if we need to convert this using DOS-style short mode. If the path
46216  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46217  # take no chances and rewrite it.
46218  # Note: m4 eats our [], so we need to use [ and ] instead.
46219  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46220  if test "x$has_forbidden_chars" != x; then
46221    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46222    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46223    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46224    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46225      # Going to short mode and back again did indeed matter. Since short mode is
46226      # case insensitive, let's make it lowercase to improve readability.
46227      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46228      # Now convert it back to Unix-style (cygpath)
46229      input_path=`$CYGPATH -u "$shortmode_path"`
46230      new_path="$input_path"
46231    fi
46232  fi
46233
46234  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46235  if test "x$test_cygdrive_prefix" = x; then
46236    # As a simple fix, exclude /usr/bin since it's not a real path.
46237    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46238      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46239      # a path prefixed by /cygdrive for fixpath to work.
46240      new_path="$CYGWIN_ROOT_PATH$input_path"
46241    fi
46242  fi
46243
46244  # remove trailing .exe if any
46245  new_path="${new_path/%.exe/}"
46246
46247    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46248
46249  # First separate the path from the arguments. This will split at the first
46250  # space.
46251  complete="$BUILD_AR"
46252  path="${complete%% *}"
46253  tmp="$complete EOL"
46254  arguments="${tmp#* }"
46255
46256  # Input might be given as Windows format, start by converting to
46257  # unix format.
46258  new_path="$path"
46259
46260  windows_path="$new_path"
46261  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46262    unix_path=`$CYGPATH -u "$windows_path"`
46263    new_path="$unix_path"
46264  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46265    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46266    new_path="$unix_path"
46267  fi
46268
46269
46270  # Now try to locate executable using which
46271  new_path=`$WHICH "$new_path" 2> /dev/null`
46272
46273  if test "x$new_path" = x; then
46274    # Oops. Which didn't find the executable.
46275    # The splitting of arguments from the executable at a space might have been incorrect,
46276    # since paths with space are more likely in Windows. Give it another try with the whole
46277    # argument.
46278    path="$complete"
46279    arguments="EOL"
46280    new_path="$path"
46281
46282  windows_path="$new_path"
46283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46284    unix_path=`$CYGPATH -u "$windows_path"`
46285    new_path="$unix_path"
46286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46288    new_path="$unix_path"
46289  fi
46290
46291
46292    new_path=`$WHICH "$new_path" 2> /dev/null`
46293    # bat and cmd files are not always considered executable in MSYS causing which
46294    # to not find them
46295    if test "x$new_path" = x \
46296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46298      new_path="$path"
46299
46300  windows_path="$new_path"
46301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46302    unix_path=`$CYGPATH -u "$windows_path"`
46303    new_path="$unix_path"
46304  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46305    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46306    new_path="$unix_path"
46307  fi
46308
46309    fi
46310
46311    if test "x$new_path" = x; then
46312      # It's still not found. Now this is an unrecoverable error.
46313      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46314$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46315      has_space=`$ECHO "$complete" | $GREP " "`
46316      if test "x$has_space" != x; then
46317        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46318$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46319      fi
46320      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46321    fi
46322  fi
46323
46324  # Now new_path has a complete unix path to the binary
46325  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46326    # Keep paths in /bin as-is, but remove trailing .exe if any
46327    new_path="${new_path/%.exe/}"
46328    # Do not save /bin paths to all_fixpath_prefixes!
46329  else
46330    # Not in mixed or Windows style, start by that.
46331    new_path=`cmd //c echo $new_path`
46332
46333  input_path="$new_path"
46334  # Check if we need to convert this using DOS-style short mode. If the path
46335  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46336  # take no chances and rewrite it.
46337  # Note: m4 eats our [], so we need to use [ and ] instead.
46338  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46339  if test "x$has_forbidden_chars" != x; then
46340    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46341    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46342  fi
46343
46344    # Output is in $new_path
46345
46346  windows_path="$new_path"
46347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46348    unix_path=`$CYGPATH -u "$windows_path"`
46349    new_path="$unix_path"
46350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46352    new_path="$unix_path"
46353  fi
46354
46355    # remove trailing .exe if any
46356    new_path="${new_path/%.exe/}"
46357
46358    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46359    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46360  fi
46361
46362    else
46363      # We're on a unix platform. Hooray! :)
46364      # First separate the path from the arguments. This will split at the first
46365      # space.
46366      complete="$BUILD_AR"
46367      path="${complete%% *}"
46368      tmp="$complete EOL"
46369      arguments="${tmp#* }"
46370
46371      # Cannot rely on the command "which" here since it doesn't always work.
46372      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46373      if test -z "$is_absolute_path"; then
46374        # Path to executable is not absolute. Find it.
46375        IFS_save="$IFS"
46376        IFS=:
46377        for p in $PATH; do
46378          if test -f "$p/$path" && test -x "$p/$path"; then
46379            new_path="$p/$path"
46380            break
46381          fi
46382        done
46383        IFS="$IFS_save"
46384      else
46385        # This is an absolute path, we can use it without further modifications.
46386        new_path="$path"
46387      fi
46388
46389      if test "x$new_path" = x; then
46390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
46391$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
46392        has_space=`$ECHO "$complete" | $GREP " "`
46393        if test "x$has_space" != x; then
46394          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46395$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46396        fi
46397        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
46398      fi
46399    fi
46400
46401    # Now join together the path and the arguments once again
46402    if test "x$arguments" != xEOL; then
46403      new_complete="$new_path ${arguments% *}"
46404    else
46405      new_complete="$new_path"
46406    fi
46407
46408    if test "x$complete" != "x$new_complete"; then
46409      BUILD_AR="$new_complete"
46410      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46411$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46412    fi
46413  fi
46414
46415
46416
46417  # Publish this variable in the help.
46418
46419
46420  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46421    # The variable is not set by user, try to locate tool using the code snippet
46422    for ac_prog in objcopy
46423do
46424  # Extract the first word of "$ac_prog", so it can be a program name with args.
46425set dummy $ac_prog; ac_word=$2
46426{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46427$as_echo_n "checking for $ac_word... " >&6; }
46428if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46429  $as_echo_n "(cached) " >&6
46430else
46431  case $BUILD_OBJCOPY in
46432  [\\/]* | ?:[\\/]*)
46433  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46434  ;;
46435  *)
46436  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46437for as_dir in $PATH
46438do
46439  IFS=$as_save_IFS
46440  test -z "$as_dir" && as_dir=.
46441    for ac_exec_ext in '' $ac_executable_extensions; do
46442  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46443    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46444    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46445    break 2
46446  fi
46447done
46448  done
46449IFS=$as_save_IFS
46450
46451  ;;
46452esac
46453fi
46454BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46455if test -n "$BUILD_OBJCOPY"; then
46456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46457$as_echo "$BUILD_OBJCOPY" >&6; }
46458else
46459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46460$as_echo "no" >&6; }
46461fi
46462
46463
46464  test -n "$BUILD_OBJCOPY" && break
46465done
46466
46467  else
46468    # The variable is set, but is it from the command line or the environment?
46469
46470    # Try to remove the string !BUILD_OBJCOPY! from our list.
46471    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46472    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46473      # If it failed, the variable was not from the command line. Ignore it,
46474      # but warn the user (except for BASH, which is always set by the calling BASH).
46475      if test "xBUILD_OBJCOPY" != xBASH; then
46476        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46477$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46478      fi
46479      # Try to locate tool using the code snippet
46480      for ac_prog in objcopy
46481do
46482  # Extract the first word of "$ac_prog", so it can be a program name with args.
46483set dummy $ac_prog; ac_word=$2
46484{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46485$as_echo_n "checking for $ac_word... " >&6; }
46486if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46487  $as_echo_n "(cached) " >&6
46488else
46489  case $BUILD_OBJCOPY in
46490  [\\/]* | ?:[\\/]*)
46491  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46492  ;;
46493  *)
46494  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46495for as_dir in $PATH
46496do
46497  IFS=$as_save_IFS
46498  test -z "$as_dir" && as_dir=.
46499    for ac_exec_ext in '' $ac_executable_extensions; do
46500  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46501    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46502    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46503    break 2
46504  fi
46505done
46506  done
46507IFS=$as_save_IFS
46508
46509  ;;
46510esac
46511fi
46512BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46513if test -n "$BUILD_OBJCOPY"; then
46514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46515$as_echo "$BUILD_OBJCOPY" >&6; }
46516else
46517  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46518$as_echo "no" >&6; }
46519fi
46520
46521
46522  test -n "$BUILD_OBJCOPY" && break
46523done
46524
46525    else
46526      # If it succeeded, then it was overridden by the user. We will use it
46527      # for the tool.
46528
46529      # First remove it from the list of overridden variables, so we can test
46530      # for unknown variables in the end.
46531      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46532
46533      # Check if we try to supply an empty value
46534      if test "x$BUILD_OBJCOPY" = x; then
46535        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46536$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46537        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46538$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46539        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46540$as_echo "disabled" >&6; }
46541      else
46542        # Check if the provided tool contains a complete path.
46543        tool_specified="$BUILD_OBJCOPY"
46544        tool_basename="${tool_specified##*/}"
46545        if test "x$tool_basename" = "x$tool_specified"; then
46546          # A command without a complete path is provided, search $PATH.
46547          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46548$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46549          # Extract the first word of "$tool_basename", so it can be a program name with args.
46550set dummy $tool_basename; ac_word=$2
46551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46552$as_echo_n "checking for $ac_word... " >&6; }
46553if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46554  $as_echo_n "(cached) " >&6
46555else
46556  case $BUILD_OBJCOPY in
46557  [\\/]* | ?:[\\/]*)
46558  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46559  ;;
46560  *)
46561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46562for as_dir in $PATH
46563do
46564  IFS=$as_save_IFS
46565  test -z "$as_dir" && as_dir=.
46566    for ac_exec_ext in '' $ac_executable_extensions; do
46567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46568    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46570    break 2
46571  fi
46572done
46573  done
46574IFS=$as_save_IFS
46575
46576  ;;
46577esac
46578fi
46579BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46580if test -n "$BUILD_OBJCOPY"; then
46581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46582$as_echo "$BUILD_OBJCOPY" >&6; }
46583else
46584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46585$as_echo "no" >&6; }
46586fi
46587
46588
46589          if test "x$BUILD_OBJCOPY" = x; then
46590            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46591          fi
46592        else
46593          # Otherwise we believe it is a complete path. Use it as it is.
46594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46595$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46596          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46597$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46598          if test ! -x "$tool_specified"; then
46599            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46600$as_echo "not found" >&6; }
46601            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46602          fi
46603          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46604$as_echo "$tool_specified" >&6; }
46605        fi
46606      fi
46607    fi
46608
46609  fi
46610
46611
46612
46613  # Only process if variable expands to non-empty
46614
46615  if test "x$BUILD_OBJCOPY" != x; then
46616    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46617
46618  # First separate the path from the arguments. This will split at the first
46619  # space.
46620  complete="$BUILD_OBJCOPY"
46621  path="${complete%% *}"
46622  tmp="$complete EOL"
46623  arguments="${tmp#* }"
46624
46625  # Input might be given as Windows format, start by converting to
46626  # unix format.
46627  new_path=`$CYGPATH -u "$path"`
46628
46629  # Now try to locate executable using which
46630  new_path=`$WHICH "$new_path" 2> /dev/null`
46631  # bat and cmd files are not always considered executable in cygwin causing which
46632  # to not find them
46633  if test "x$new_path" = x \
46634      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46635      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46636    new_path=`$CYGPATH -u "$path"`
46637  fi
46638  if test "x$new_path" = x; then
46639    # Oops. Which didn't find the executable.
46640    # The splitting of arguments from the executable at a space might have been incorrect,
46641    # since paths with space are more likely in Windows. Give it another try with the whole
46642    # argument.
46643    path="$complete"
46644    arguments="EOL"
46645    new_path=`$CYGPATH -u "$path"`
46646    new_path=`$WHICH "$new_path" 2> /dev/null`
46647    # bat and cmd files are not always considered executable in cygwin causing which
46648    # to not find them
46649    if test "x$new_path" = x \
46650        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46651        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46652      new_path=`$CYGPATH -u "$path"`
46653    fi
46654    if test "x$new_path" = x; then
46655      # It's still not found. Now this is an unrecoverable error.
46656      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46657$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46658      has_space=`$ECHO "$complete" | $GREP " "`
46659      if test "x$has_space" != x; then
46660        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46661$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46662      fi
46663      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46664    fi
46665  fi
46666
46667  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46668  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46669  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46670  # "foo.exe" is OK but "foo" is an error.
46671  #
46672  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46673  # It is also a way to make sure we got the proper file name for the real test later on.
46674  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46675  if test "x$test_shortpath" = x; then
46676    # Short path failed, file does not exist as specified.
46677    # Try adding .exe or .cmd
46678    if test -f "${new_path}.exe"; then
46679      input_to_shortpath="${new_path}.exe"
46680    elif test -f "${new_path}.cmd"; then
46681      input_to_shortpath="${new_path}.cmd"
46682    else
46683      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46684$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46685      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46686$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46687      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46688    fi
46689  else
46690    input_to_shortpath="$new_path"
46691  fi
46692
46693  # Call helper function which possibly converts this using DOS-style short mode.
46694  # If so, the updated path is stored in $new_path.
46695  new_path="$input_to_shortpath"
46696
46697  input_path="$input_to_shortpath"
46698  # Check if we need to convert this using DOS-style short mode. If the path
46699  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46700  # take no chances and rewrite it.
46701  # Note: m4 eats our [], so we need to use [ and ] instead.
46702  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46703  if test "x$has_forbidden_chars" != x; then
46704    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46705    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46706    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46707    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46708      # Going to short mode and back again did indeed matter. Since short mode is
46709      # case insensitive, let's make it lowercase to improve readability.
46710      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46711      # Now convert it back to Unix-style (cygpath)
46712      input_path=`$CYGPATH -u "$shortmode_path"`
46713      new_path="$input_path"
46714    fi
46715  fi
46716
46717  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46718  if test "x$test_cygdrive_prefix" = x; then
46719    # As a simple fix, exclude /usr/bin since it's not a real path.
46720    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46721      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46722      # a path prefixed by /cygdrive for fixpath to work.
46723      new_path="$CYGWIN_ROOT_PATH$input_path"
46724    fi
46725  fi
46726
46727  # remove trailing .exe if any
46728  new_path="${new_path/%.exe/}"
46729
46730    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46731
46732  # First separate the path from the arguments. This will split at the first
46733  # space.
46734  complete="$BUILD_OBJCOPY"
46735  path="${complete%% *}"
46736  tmp="$complete EOL"
46737  arguments="${tmp#* }"
46738
46739  # Input might be given as Windows format, start by converting to
46740  # unix format.
46741  new_path="$path"
46742
46743  windows_path="$new_path"
46744  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46745    unix_path=`$CYGPATH -u "$windows_path"`
46746    new_path="$unix_path"
46747  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46748    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46749    new_path="$unix_path"
46750  fi
46751
46752
46753  # Now try to locate executable using which
46754  new_path=`$WHICH "$new_path" 2> /dev/null`
46755
46756  if test "x$new_path" = x; then
46757    # Oops. Which didn't find the executable.
46758    # The splitting of arguments from the executable at a space might have been incorrect,
46759    # since paths with space are more likely in Windows. Give it another try with the whole
46760    # argument.
46761    path="$complete"
46762    arguments="EOL"
46763    new_path="$path"
46764
46765  windows_path="$new_path"
46766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46767    unix_path=`$CYGPATH -u "$windows_path"`
46768    new_path="$unix_path"
46769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46771    new_path="$unix_path"
46772  fi
46773
46774
46775    new_path=`$WHICH "$new_path" 2> /dev/null`
46776    # bat and cmd files are not always considered executable in MSYS causing which
46777    # to not find them
46778    if test "x$new_path" = x \
46779        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46780        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46781      new_path="$path"
46782
46783  windows_path="$new_path"
46784  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46785    unix_path=`$CYGPATH -u "$windows_path"`
46786    new_path="$unix_path"
46787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46788    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46789    new_path="$unix_path"
46790  fi
46791
46792    fi
46793
46794    if test "x$new_path" = x; then
46795      # It's still not found. Now this is an unrecoverable error.
46796      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46797$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46798      has_space=`$ECHO "$complete" | $GREP " "`
46799      if test "x$has_space" != x; then
46800        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46801$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46802      fi
46803      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46804    fi
46805  fi
46806
46807  # Now new_path has a complete unix path to the binary
46808  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46809    # Keep paths in /bin as-is, but remove trailing .exe if any
46810    new_path="${new_path/%.exe/}"
46811    # Do not save /bin paths to all_fixpath_prefixes!
46812  else
46813    # Not in mixed or Windows style, start by that.
46814    new_path=`cmd //c echo $new_path`
46815
46816  input_path="$new_path"
46817  # Check if we need to convert this using DOS-style short mode. If the path
46818  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46819  # take no chances and rewrite it.
46820  # Note: m4 eats our [], so we need to use [ and ] instead.
46821  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46822  if test "x$has_forbidden_chars" != x; then
46823    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46824    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46825  fi
46826
46827    # Output is in $new_path
46828
46829  windows_path="$new_path"
46830  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46831    unix_path=`$CYGPATH -u "$windows_path"`
46832    new_path="$unix_path"
46833  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46834    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46835    new_path="$unix_path"
46836  fi
46837
46838    # remove trailing .exe if any
46839    new_path="${new_path/%.exe/}"
46840
46841    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46842    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46843  fi
46844
46845    else
46846      # We're on a unix platform. Hooray! :)
46847      # First separate the path from the arguments. This will split at the first
46848      # space.
46849      complete="$BUILD_OBJCOPY"
46850      path="${complete%% *}"
46851      tmp="$complete EOL"
46852      arguments="${tmp#* }"
46853
46854      # Cannot rely on the command "which" here since it doesn't always work.
46855      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46856      if test -z "$is_absolute_path"; then
46857        # Path to executable is not absolute. Find it.
46858        IFS_save="$IFS"
46859        IFS=:
46860        for p in $PATH; do
46861          if test -f "$p/$path" && test -x "$p/$path"; then
46862            new_path="$p/$path"
46863            break
46864          fi
46865        done
46866        IFS="$IFS_save"
46867      else
46868        # This is an absolute path, we can use it without further modifications.
46869        new_path="$path"
46870      fi
46871
46872      if test "x$new_path" = x; then
46873        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46874$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46875        has_space=`$ECHO "$complete" | $GREP " "`
46876        if test "x$has_space" != x; then
46877          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46878$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46879        fi
46880        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46881      fi
46882    fi
46883
46884    # Now join together the path and the arguments once again
46885    if test "x$arguments" != xEOL; then
46886      new_complete="$new_path ${arguments% *}"
46887    else
46888      new_complete="$new_path"
46889    fi
46890
46891    if test "x$complete" != "x$new_complete"; then
46892      BUILD_OBJCOPY="$new_complete"
46893      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46894$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46895    fi
46896  fi
46897
46898
46899
46900  # Publish this variable in the help.
46901
46902
46903  if [ -z "${BUILD_STRIP+x}" ]; then
46904    # The variable is not set by user, try to locate tool using the code snippet
46905    for ac_prog in strip
46906do
46907  # Extract the first word of "$ac_prog", so it can be a program name with args.
46908set dummy $ac_prog; ac_word=$2
46909{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46910$as_echo_n "checking for $ac_word... " >&6; }
46911if ${ac_cv_path_BUILD_STRIP+:} false; then :
46912  $as_echo_n "(cached) " >&6
46913else
46914  case $BUILD_STRIP in
46915  [\\/]* | ?:[\\/]*)
46916  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46917  ;;
46918  *)
46919  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46920for as_dir in $PATH
46921do
46922  IFS=$as_save_IFS
46923  test -z "$as_dir" && as_dir=.
46924    for ac_exec_ext in '' $ac_executable_extensions; do
46925  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46926    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46927    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46928    break 2
46929  fi
46930done
46931  done
46932IFS=$as_save_IFS
46933
46934  ;;
46935esac
46936fi
46937BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46938if test -n "$BUILD_STRIP"; then
46939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46940$as_echo "$BUILD_STRIP" >&6; }
46941else
46942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46943$as_echo "no" >&6; }
46944fi
46945
46946
46947  test -n "$BUILD_STRIP" && break
46948done
46949
46950  else
46951    # The variable is set, but is it from the command line or the environment?
46952
46953    # Try to remove the string !BUILD_STRIP! from our list.
46954    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46955    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46956      # If it failed, the variable was not from the command line. Ignore it,
46957      # but warn the user (except for BASH, which is always set by the calling BASH).
46958      if test "xBUILD_STRIP" != xBASH; then
46959        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46960$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46961      fi
46962      # Try to locate tool using the code snippet
46963      for ac_prog in strip
46964do
46965  # Extract the first word of "$ac_prog", so it can be a program name with args.
46966set dummy $ac_prog; ac_word=$2
46967{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46968$as_echo_n "checking for $ac_word... " >&6; }
46969if ${ac_cv_path_BUILD_STRIP+:} false; then :
46970  $as_echo_n "(cached) " >&6
46971else
46972  case $BUILD_STRIP in
46973  [\\/]* | ?:[\\/]*)
46974  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46975  ;;
46976  *)
46977  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46978for as_dir in $PATH
46979do
46980  IFS=$as_save_IFS
46981  test -z "$as_dir" && as_dir=.
46982    for ac_exec_ext in '' $ac_executable_extensions; do
46983  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46984    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46985    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46986    break 2
46987  fi
46988done
46989  done
46990IFS=$as_save_IFS
46991
46992  ;;
46993esac
46994fi
46995BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46996if test -n "$BUILD_STRIP"; then
46997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46998$as_echo "$BUILD_STRIP" >&6; }
46999else
47000  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47001$as_echo "no" >&6; }
47002fi
47003
47004
47005  test -n "$BUILD_STRIP" && break
47006done
47007
47008    else
47009      # If it succeeded, then it was overridden by the user. We will use it
47010      # for the tool.
47011
47012      # First remove it from the list of overridden variables, so we can test
47013      # for unknown variables in the end.
47014      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47015
47016      # Check if we try to supply an empty value
47017      if test "x$BUILD_STRIP" = x; then
47018        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
47019$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
47020        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47021$as_echo_n "checking for BUILD_STRIP... " >&6; }
47022        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47023$as_echo "disabled" >&6; }
47024      else
47025        # Check if the provided tool contains a complete path.
47026        tool_specified="$BUILD_STRIP"
47027        tool_basename="${tool_specified##*/}"
47028        if test "x$tool_basename" = "x$tool_specified"; then
47029          # A command without a complete path is provided, search $PATH.
47030          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
47031$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
47032          # Extract the first word of "$tool_basename", so it can be a program name with args.
47033set dummy $tool_basename; ac_word=$2
47034{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47035$as_echo_n "checking for $ac_word... " >&6; }
47036if ${ac_cv_path_BUILD_STRIP+:} false; then :
47037  $as_echo_n "(cached) " >&6
47038else
47039  case $BUILD_STRIP in
47040  [\\/]* | ?:[\\/]*)
47041  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
47042  ;;
47043  *)
47044  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47045for as_dir in $PATH
47046do
47047  IFS=$as_save_IFS
47048  test -z "$as_dir" && as_dir=.
47049    for ac_exec_ext in '' $ac_executable_extensions; do
47050  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47051    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
47052    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47053    break 2
47054  fi
47055done
47056  done
47057IFS=$as_save_IFS
47058
47059  ;;
47060esac
47061fi
47062BUILD_STRIP=$ac_cv_path_BUILD_STRIP
47063if test -n "$BUILD_STRIP"; then
47064  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
47065$as_echo "$BUILD_STRIP" >&6; }
47066else
47067  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47068$as_echo "no" >&6; }
47069fi
47070
47071
47072          if test "x$BUILD_STRIP" = x; then
47073            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47074          fi
47075        else
47076          # Otherwise we believe it is a complete path. Use it as it is.
47077          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
47078$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
47079          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
47080$as_echo_n "checking for BUILD_STRIP... " >&6; }
47081          if test ! -x "$tool_specified"; then
47082            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47083$as_echo "not found" >&6; }
47084            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
47085          fi
47086          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47087$as_echo "$tool_specified" >&6; }
47088        fi
47089      fi
47090    fi
47091
47092  fi
47093
47094
47095
47096  # Only process if variable expands to non-empty
47097
47098  if test "x$BUILD_STRIP" != x; then
47099    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47100
47101  # First separate the path from the arguments. This will split at the first
47102  # space.
47103  complete="$BUILD_STRIP"
47104  path="${complete%% *}"
47105  tmp="$complete EOL"
47106  arguments="${tmp#* }"
47107
47108  # Input might be given as Windows format, start by converting to
47109  # unix format.
47110  new_path=`$CYGPATH -u "$path"`
47111
47112  # Now try to locate executable using which
47113  new_path=`$WHICH "$new_path" 2> /dev/null`
47114  # bat and cmd files are not always considered executable in cygwin causing which
47115  # to not find them
47116  if test "x$new_path" = x \
47117      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47118      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47119    new_path=`$CYGPATH -u "$path"`
47120  fi
47121  if test "x$new_path" = x; then
47122    # Oops. Which didn't find the executable.
47123    # The splitting of arguments from the executable at a space might have been incorrect,
47124    # since paths with space are more likely in Windows. Give it another try with the whole
47125    # argument.
47126    path="$complete"
47127    arguments="EOL"
47128    new_path=`$CYGPATH -u "$path"`
47129    new_path=`$WHICH "$new_path" 2> /dev/null`
47130    # bat and cmd files are not always considered executable in cygwin causing which
47131    # to not find them
47132    if test "x$new_path" = x \
47133        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47134        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47135      new_path=`$CYGPATH -u "$path"`
47136    fi
47137    if test "x$new_path" = x; then
47138      # It's still not found. Now this is an unrecoverable error.
47139      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47140$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47141      has_space=`$ECHO "$complete" | $GREP " "`
47142      if test "x$has_space" != x; then
47143        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47144$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47145      fi
47146      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47147    fi
47148  fi
47149
47150  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47151  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47152  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47153  # "foo.exe" is OK but "foo" is an error.
47154  #
47155  # This test is therefore slightly more accurate than "test -f" to check for file presence.
47156  # It is also a way to make sure we got the proper file name for the real test later on.
47157  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47158  if test "x$test_shortpath" = x; then
47159    # Short path failed, file does not exist as specified.
47160    # Try adding .exe or .cmd
47161    if test -f "${new_path}.exe"; then
47162      input_to_shortpath="${new_path}.exe"
47163    elif test -f "${new_path}.cmd"; then
47164      input_to_shortpath="${new_path}.cmd"
47165    else
47166      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
47167$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
47168      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
47169$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
47170      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47171    fi
47172  else
47173    input_to_shortpath="$new_path"
47174  fi
47175
47176  # Call helper function which possibly converts this using DOS-style short mode.
47177  # If so, the updated path is stored in $new_path.
47178  new_path="$input_to_shortpath"
47179
47180  input_path="$input_to_shortpath"
47181  # Check if we need to convert this using DOS-style short mode. If the path
47182  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47183  # take no chances and rewrite it.
47184  # Note: m4 eats our [], so we need to use [ and ] instead.
47185  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47186  if test "x$has_forbidden_chars" != x; then
47187    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47188    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47189    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47190    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47191      # Going to short mode and back again did indeed matter. Since short mode is
47192      # case insensitive, let's make it lowercase to improve readability.
47193      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47194      # Now convert it back to Unix-style (cygpath)
47195      input_path=`$CYGPATH -u "$shortmode_path"`
47196      new_path="$input_path"
47197    fi
47198  fi
47199
47200  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47201  if test "x$test_cygdrive_prefix" = x; then
47202    # As a simple fix, exclude /usr/bin since it's not a real path.
47203    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
47204      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47205      # a path prefixed by /cygdrive for fixpath to work.
47206      new_path="$CYGWIN_ROOT_PATH$input_path"
47207    fi
47208  fi
47209
47210  # remove trailing .exe if any
47211  new_path="${new_path/%.exe/}"
47212
47213    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47214
47215  # First separate the path from the arguments. This will split at the first
47216  # space.
47217  complete="$BUILD_STRIP"
47218  path="${complete%% *}"
47219  tmp="$complete EOL"
47220  arguments="${tmp#* }"
47221
47222  # Input might be given as Windows format, start by converting to
47223  # unix format.
47224  new_path="$path"
47225
47226  windows_path="$new_path"
47227  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47228    unix_path=`$CYGPATH -u "$windows_path"`
47229    new_path="$unix_path"
47230  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47231    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47232    new_path="$unix_path"
47233  fi
47234
47235
47236  # Now try to locate executable using which
47237  new_path=`$WHICH "$new_path" 2> /dev/null`
47238
47239  if test "x$new_path" = x; then
47240    # Oops. Which didn't find the executable.
47241    # The splitting of arguments from the executable at a space might have been incorrect,
47242    # since paths with space are more likely in Windows. Give it another try with the whole
47243    # argument.
47244    path="$complete"
47245    arguments="EOL"
47246    new_path="$path"
47247
47248  windows_path="$new_path"
47249  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47250    unix_path=`$CYGPATH -u "$windows_path"`
47251    new_path="$unix_path"
47252  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47253    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47254    new_path="$unix_path"
47255  fi
47256
47257
47258    new_path=`$WHICH "$new_path" 2> /dev/null`
47259    # bat and cmd files are not always considered executable in MSYS causing which
47260    # to not find them
47261    if test "x$new_path" = x \
47262        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
47263        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
47264      new_path="$path"
47265
47266  windows_path="$new_path"
47267  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47268    unix_path=`$CYGPATH -u "$windows_path"`
47269    new_path="$unix_path"
47270  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47271    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47272    new_path="$unix_path"
47273  fi
47274
47275    fi
47276
47277    if test "x$new_path" = x; then
47278      # It's still not found. Now this is an unrecoverable error.
47279      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47280$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47281      has_space=`$ECHO "$complete" | $GREP " "`
47282      if test "x$has_space" != x; then
47283        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
47284$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
47285      fi
47286      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47287    fi
47288  fi
47289
47290  # Now new_path has a complete unix path to the binary
47291  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
47292    # Keep paths in /bin as-is, but remove trailing .exe if any
47293    new_path="${new_path/%.exe/}"
47294    # Do not save /bin paths to all_fixpath_prefixes!
47295  else
47296    # Not in mixed or Windows style, start by that.
47297    new_path=`cmd //c echo $new_path`
47298
47299  input_path="$new_path"
47300  # Check if we need to convert this using DOS-style short mode. If the path
47301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47302  # take no chances and rewrite it.
47303  # Note: m4 eats our [], so we need to use [ and ] instead.
47304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47305  if test "x$has_forbidden_chars" != x; then
47306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47308  fi
47309
47310    # Output is in $new_path
47311
47312  windows_path="$new_path"
47313  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47314    unix_path=`$CYGPATH -u "$windows_path"`
47315    new_path="$unix_path"
47316  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47317    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47318    new_path="$unix_path"
47319  fi
47320
47321    # remove trailing .exe if any
47322    new_path="${new_path/%.exe/}"
47323
47324    # Save the first 10 bytes of this path to the storage, so fixpath can work.
47325    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47326  fi
47327
47328    else
47329      # We're on a unix platform. Hooray! :)
47330      # First separate the path from the arguments. This will split at the first
47331      # space.
47332      complete="$BUILD_STRIP"
47333      path="${complete%% *}"
47334      tmp="$complete EOL"
47335      arguments="${tmp#* }"
47336
47337      # Cannot rely on the command "which" here since it doesn't always work.
47338      is_absolute_path=`$ECHO "$path" | $GREP ^/`
47339      if test -z "$is_absolute_path"; then
47340        # Path to executable is not absolute. Find it.
47341        IFS_save="$IFS"
47342        IFS=:
47343        for p in $PATH; do
47344          if test -f "$p/$path" && test -x "$p/$path"; then
47345            new_path="$p/$path"
47346            break
47347          fi
47348        done
47349        IFS="$IFS_save"
47350      else
47351        # This is an absolute path, we can use it without further modifications.
47352        new_path="$path"
47353      fi
47354
47355      if test "x$new_path" = x; then
47356        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
47357$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
47358        has_space=`$ECHO "$complete" | $GREP " "`
47359        if test "x$has_space" != x; then
47360          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
47361$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
47362        fi
47363        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
47364      fi
47365    fi
47366
47367    # Now join together the path and the arguments once again
47368    if test "x$arguments" != xEOL; then
47369      new_complete="$new_path ${arguments% *}"
47370    else
47371      new_complete="$new_path"
47372    fi
47373
47374    if test "x$complete" != "x$new_complete"; then
47375      BUILD_STRIP="$new_complete"
47376      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
47377$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
47378    fi
47379  fi
47380
47381    # Assume the C compiler is the assembler
47382    BUILD_AS="$BUILD_CC -c"
47383    # Just like for the target compiler, use the compiler as linker
47384    BUILD_LD="$BUILD_CC"
47385    BUILD_LDCXX="$BUILD_CXX"
47386
47387    PATH="$OLDPATH"
47388
47389
47390  COMPILER=$BUILD_CC
47391  COMPILER_NAME=BuildC
47392
47393  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47394    # cc -V output typically looks like
47395    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47396    # or
47397    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47398    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47399    # Check that this is likely to be the Solaris Studio cc.
47400    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47401    if test $? -ne 0; then
47402      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47403      { $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
47404$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47405      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47406$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47407      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47408$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47409      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47410    fi
47411    # Remove usage instructions (if present), and
47412    # collapse compiler output into a single line
47413    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47414        $SED -e 's/ *[Uu]sage:.*//'`
47415    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47416        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47417  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47418    # xlc -qversion output typically looks like
47419    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47420    #     Version: 11.01.0000.0015
47421    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47422    # Check that this is likely to be the IBM XL C compiler.
47423    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47424    if test $? -ne 0; then
47425      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47426      { $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
47427$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47428      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47429$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47430      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47431$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47432      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47433    fi
47434    # Collapse compiler output into a single line
47435    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47436    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47437        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47438  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47439    # There is no specific version flag, but all output starts with a version string.
47440    # First line typically looks something like:
47441    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47442    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47443    # Check that this is likely to be Microsoft CL.EXE.
47444    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47445    if test $? -ne 0; then
47446      { $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
47447$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47448      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47449$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47450      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47451    fi
47452    # Collapse compiler output into a single line
47453    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47454    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47455        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47456  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47457    # gcc --version output typically looks like
47458    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47459    #     Copyright (C) 2013 Free Software Foundation, Inc.
47460    #     This is free software; see the source for copying conditions.  There is NO
47461    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47462    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47463    # Check that this is likely to be GCC.
47464    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47465    if test $? -ne 0; then
47466      { $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
47467$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47468      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47469$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47470      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47471    fi
47472    # Remove Copyright and legalese from version string, and
47473    # collapse into a single line
47474    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47475        $SED -e 's/ *Copyright .*//'`
47476    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47477        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47478  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47479    # clang --version output typically looks like
47480    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47481    #    clang version 3.3 (tags/RELEASE_33/final)
47482    # or
47483    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47484    #    Target: x86_64-pc-linux-gnu
47485    #    Thread model: posix
47486    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47487    # Check that this is likely to be clang
47488    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47489    if test $? -ne 0; then
47490      { $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
47491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47493$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47495    fi
47496    # Collapse compiler output into a single line
47497    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47498    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47499        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47500  else
47501      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47502  fi
47503  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47504  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47505  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47506  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47507
47508  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47509$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47510
47511
47512  COMPILER=$BUILD_CXX
47513  COMPILER_NAME=BuildC++
47514
47515  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47516    # cc -V output typically looks like
47517    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47518    # or
47519    #     cc: Studio 12.5 Sun C 5.14 SunOS_sparc 2016/05/31
47520    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47521    # Check that this is likely to be the Solaris Studio cc.
47522    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.* Sun $COMPILER_NAME" > /dev/null
47523    if test $? -ne 0; then
47524      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47525      { $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
47526$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47527      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47528$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47529      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47530$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47531      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47532    fi
47533    # Remove usage instructions (if present), and
47534    # collapse compiler output into a single line
47535    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47536        $SED -e 's/ *[Uu]sage:.*//'`
47537    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47538        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47539  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47540    # xlc -qversion output typically looks like
47541    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47542    #     Version: 11.01.0000.0015
47543    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47544    # Check that this is likely to be the IBM XL C compiler.
47545    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47546    if test $? -ne 0; then
47547      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47548      { $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
47549$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47550      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47551$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47552      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47553$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47554      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47555    fi
47556    # Collapse compiler output into a single line
47557    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47558    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47559        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47560  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47561    # There is no specific version flag, but all output starts with a version string.
47562    # First line typically looks something like:
47563    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47564    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47565    # Check that this is likely to be Microsoft CL.EXE.
47566    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47567    if test $? -ne 0; then
47568      { $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
47569$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47570      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47571$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47572      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47573    fi
47574    # Collapse compiler output into a single line
47575    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47576    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47577        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47578  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47579    # gcc --version output typically looks like
47580    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47581    #     Copyright (C) 2013 Free Software Foundation, Inc.
47582    #     This is free software; see the source for copying conditions.  There is NO
47583    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47584    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47585    # Check that this is likely to be GCC.
47586    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47587    if test $? -ne 0; then
47588      { $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
47589$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47590      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47591$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47592      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47593    fi
47594    # Remove Copyright and legalese from version string, and
47595    # collapse into a single line
47596    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47597        $SED -e 's/ *Copyright .*//'`
47598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47599        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47600  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47601    # clang --version output typically looks like
47602    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47603    #    clang version 3.3 (tags/RELEASE_33/final)
47604    # or
47605    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47606    #    Target: x86_64-pc-linux-gnu
47607    #    Thread model: posix
47608    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47609    # Check that this is likely to be clang
47610    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47611    if test $? -ne 0; then
47612      { $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
47613$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47614      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47615$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47616      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47617    fi
47618    # Collapse compiler output into a single line
47619    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47620    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47621        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47622  else
47623      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47624  fi
47625  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47626  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47627  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47628  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47629
47630  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47631$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47632
47633
47634  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47635    { $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
47636$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47637    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47638$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47639  fi
47640
47641  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47642  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47643    { $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
47644$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;}
47645  fi
47646
47647  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47648    { $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
47649$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47650  fi
47651
47652  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47653
47654  else
47655    # If we are not cross compiling, use the normal target compilers for
47656    # building the build platform executables.
47657    BUILD_CC="$CC"
47658    BUILD_CXX="$CXX"
47659    BUILD_LD="$LD"
47660    BUILD_LDCXX="$LDCXX"
47661    BUILD_NM="$NM"
47662    BUILD_AS="$AS"
47663    BUILD_OBJCOPY="$OBJCOPY"
47664    BUILD_STRIP="$STRIP"
47665    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47666    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47667    BUILD_AR="$AR"
47668
47669
47670  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
47671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
47672$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
47673    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47674$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47675  fi
47676
47677  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47678  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){4} ]] ; then
47679    { $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
47680$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;}
47681  fi
47682
47683  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47684    { $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
47685$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47686  fi
47687
47688  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$CC_VERSION_NUMBER"`
47689
47690  fi
47691
47692
47693
47694
47695
47696
47697
47698
47699
47700
47701
47702
47703
47704
47705  # The package path is used only on macosx?
47706  # FIXME: clean this up, and/or move it elsewhere.
47707  PACKAGE_PATH=/opt/local
47708
47709
47710  # Check for extra potential brokenness.
47711  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47712    # On Windows, double-check that we got the right compiler.
47713    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47714    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47715    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47716      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47717        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
47718      fi
47719    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47720      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47721        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47722      fi
47723    fi
47724  fi
47725
47726  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47727    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47728    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47729    # This is later checked when setting flags.
47730
47731    # "-Og" suppported for GCC 4.8 and later
47732    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744
47745
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780    # Execute function body
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793
47794
47795
47796
47797
47798
47799
47800
47801
47802
47803
47804
47805
47806
47807
47808
47809
47810
47811
47812
47813
47814
47815
47816
47817
47818
47819
47820
47821
47822
47823
47824
47825
47826
47827
47828
47829    # Execute function body
47830
47831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47832$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47833  supports=yes
47834
47835  saved_cflags="$CFLAGS"
47836  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47837  ac_ext=c
47838ac_cpp='$CPP $CPPFLAGS'
47839ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47840ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47841ac_compiler_gnu=$ac_cv_c_compiler_gnu
47842
47843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47844/* end confdefs.h.  */
47845int i;
47846_ACEOF
47847if ac_fn_c_try_compile "$LINENO"; then :
47848
47849else
47850  supports=no
47851fi
47852rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47853  ac_ext=cpp
47854ac_cpp='$CXXCPP $CPPFLAGS'
47855ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47856ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47857ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47858
47859  CFLAGS="$saved_cflags"
47860
47861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47862$as_echo "$supports" >&6; }
47863  if test "x$supports" = "xyes" ; then
47864    :
47865    C_COMP_SUPPORTS="yes"
47866  else
47867    :
47868    C_COMP_SUPPORTS="no"
47869  fi
47870
47871
47872
47873
47874
47875
47876
47877
47878
47879
47880
47881
47882
47883
47884
47885
47886
47887
47888
47889
47890
47891
47892
47893
47894
47895
47896
47897
47898
47899
47900
47901
47902
47903
47904
47905
47906
47907
47908
47909
47910
47911
47912
47913
47914
47915
47916
47917
47918
47919
47920
47921
47922
47923
47924
47925
47926
47927
47928
47929    # Execute function body
47930
47931  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47932$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47933  supports=yes
47934
47935  saved_cxxflags="$CXXFLAGS"
47936  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47937  ac_ext=cpp
47938ac_cpp='$CXXCPP $CPPFLAGS'
47939ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47940ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47941ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47942
47943  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47944/* end confdefs.h.  */
47945int i;
47946_ACEOF
47947if ac_fn_cxx_try_compile "$LINENO"; then :
47948
47949else
47950  supports=no
47951fi
47952rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47953  ac_ext=cpp
47954ac_cpp='$CXXCPP $CPPFLAGS'
47955ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47956ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47957ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47958
47959  CXXFLAGS="$saved_cxxflags"
47960
47961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47962$as_echo "$supports" >&6; }
47963  if test "x$supports" = "xyes" ; then
47964    :
47965    CXX_COMP_SUPPORTS="yes"
47966  else
47967    :
47968    CXX_COMP_SUPPORTS="no"
47969  fi
47970
47971
47972
47973
47974
47975
47976
47977
47978
47979
47980
47981
47982
47983  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47984$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47985  supports=no
47986  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47987
47988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47989$as_echo "$supports" >&6; }
47990  if test "x$supports" = "xyes" ; then
47991    :
47992    HAS_CFLAG_OPTIMIZE_DEBUG=true
47993  else
47994    :
47995    HAS_CFLAG_OPTIMIZE_DEBUG=false
47996  fi
47997
47998
47999
48000
48001
48002
48003
48004    # "-z relro" supported in GNU binutils 2.17 and later
48005    LINKER_RELRO_FLAG="-Wl,-z,relro"
48006
48007
48008
48009
48010
48011
48012
48013
48014
48015
48016
48017
48018
48019
48020
48021
48022
48023
48024
48025
48026
48027
48028
48029
48030
48031
48032
48033
48034
48035
48036
48037
48038
48039
48040
48041
48042
48043
48044
48045
48046
48047
48048
48049
48050
48051
48052
48053    # Execute function body
48054
48055  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
48056$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
48057  supports=yes
48058
48059  saved_ldflags="$LDFLAGS"
48060  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
48061  ac_ext=c
48062ac_cpp='$CPP $CPPFLAGS'
48063ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48064ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48065ac_compiler_gnu=$ac_cv_c_compiler_gnu
48066
48067  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48068/* end confdefs.h.  */
48069
48070int
48071main ()
48072{
48073
48074  ;
48075  return 0;
48076}
48077_ACEOF
48078if ac_fn_c_try_link "$LINENO"; then :
48079
48080else
48081  supports=no
48082fi
48083rm -f core conftest.err conftest.$ac_objext \
48084    conftest$ac_exeext conftest.$ac_ext
48085  ac_ext=cpp
48086ac_cpp='$CXXCPP $CPPFLAGS'
48087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48090
48091  LDFLAGS="$saved_ldflags"
48092
48093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48094$as_echo "$supports" >&6; }
48095  if test "x$supports" = "xyes" ; then
48096    :
48097    HAS_LINKER_RELRO=true
48098  else
48099    :
48100    HAS_LINKER_RELRO=false
48101  fi
48102
48103
48104
48105
48106
48107
48108
48109
48110
48111
48112
48113
48114
48115    # "-z now" supported in GNU binutils 2.11 and later
48116    LINKER_NOW_FLAG="-Wl,-z,now"
48117
48118
48119
48120
48121
48122
48123
48124
48125
48126
48127
48128
48129
48130
48131
48132
48133
48134
48135
48136
48137
48138
48139
48140
48141
48142
48143
48144
48145
48146
48147
48148
48149
48150
48151
48152
48153
48154
48155
48156
48157
48158
48159
48160
48161
48162
48163
48164    # Execute function body
48165
48166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
48167$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
48168  supports=yes
48169
48170  saved_ldflags="$LDFLAGS"
48171  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
48172  ac_ext=c
48173ac_cpp='$CPP $CPPFLAGS'
48174ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48175ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48176ac_compiler_gnu=$ac_cv_c_compiler_gnu
48177
48178  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48179/* end confdefs.h.  */
48180
48181int
48182main ()
48183{
48184
48185  ;
48186  return 0;
48187}
48188_ACEOF
48189if ac_fn_c_try_link "$LINENO"; then :
48190
48191else
48192  supports=no
48193fi
48194rm -f core conftest.err conftest.$ac_objext \
48195    conftest$ac_exeext conftest.$ac_ext
48196  ac_ext=cpp
48197ac_cpp='$CXXCPP $CPPFLAGS'
48198ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48199ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48200ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48201
48202  LDFLAGS="$saved_ldflags"
48203
48204  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48205$as_echo "$supports" >&6; }
48206  if test "x$supports" = "xyes" ; then
48207    :
48208    HAS_LINKER_NOW=true
48209  else
48210    :
48211    HAS_LINKER_NOW=false
48212  fi
48213
48214
48215
48216
48217
48218
48219
48220
48221
48222
48223
48224
48225  fi
48226
48227  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
48228  # in executable.'
48229  USING_BROKEN_SUSE_LD=no
48230  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
48231    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
48232$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
48233    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
48234    $ECHO "int main() { }" > main.c
48235    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
48236      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48237$as_echo "no" >&6; }
48238      USING_BROKEN_SUSE_LD=no
48239    else
48240      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48241$as_echo "yes" >&6; }
48242      USING_BROKEN_SUSE_LD=yes
48243    fi
48244    $RM version-script.map main.c a.out
48245  fi
48246
48247
48248  # Setup hotspot lecagy names for toolchains
48249  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
48250  if test "x$TOOLCHAIN_TYPE" = xclang; then
48251    HOTSPOT_TOOLCHAIN_TYPE=gcc
48252  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48253    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
48254  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48255    HOTSPOT_TOOLCHAIN_TYPE=visCPP
48256  fi
48257
48258
48259
48260# Setup the JTReg Regression Test Harness.
48261
48262
48263# Check whether --with-jtreg was given.
48264if test "${with_jtreg+set}" = set; then :
48265  withval=$with_jtreg;
48266else
48267  with_jtreg=no
48268fi
48269
48270
48271  if test "x$with_jtreg" = xno; then
48272    # jtreg disabled
48273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48274$as_echo_n "checking for jtreg... " >&6; }
48275    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48276$as_echo "no" >&6; }
48277  else
48278    if test "x$with_jtreg" != xyes; then
48279      # with path specified.
48280      JT_HOME="$with_jtreg"
48281    fi
48282
48283    if test "x$JT_HOME" != x; then
48284      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
48285$as_echo_n "checking for jtreg... " >&6; }
48286
48287      # use JT_HOME enviroment var.
48288
48289  # Only process if variable expands to non-empty
48290
48291  if test "x$JT_HOME" != x; then
48292    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48293
48294  # Input might be given as Windows format, start by converting to
48295  # unix format.
48296  path="$JT_HOME"
48297  new_path=`$CYGPATH -u "$path"`
48298
48299  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
48300  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
48301  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
48302  # "foo.exe" is OK but "foo" is an error.
48303  #
48304  # This test is therefore slightly more accurate than "test -f" to check for file precense.
48305  # It is also a way to make sure we got the proper file name for the real test later on.
48306  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
48307  if test "x$test_shortpath" = x; then
48308    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48309$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48310    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
48311  fi
48312
48313  # Call helper function which possibly converts this using DOS-style short mode.
48314  # If so, the updated path is stored in $new_path.
48315
48316  input_path="$new_path"
48317  # Check if we need to convert this using DOS-style short mode. If the path
48318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48319  # take no chances and rewrite it.
48320  # Note: m4 eats our [], so we need to use [ and ] instead.
48321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
48322  if test "x$has_forbidden_chars" != x; then
48323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
48325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
48326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
48327      # Going to short mode and back again did indeed matter. Since short mode is
48328      # case insensitive, let's make it lowercase to improve readability.
48329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48330      # Now convert it back to Unix-style (cygpath)
48331      input_path=`$CYGPATH -u "$shortmode_path"`
48332      new_path="$input_path"
48333    fi
48334  fi
48335
48336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
48337  if test "x$test_cygdrive_prefix" = x; then
48338    # As a simple fix, exclude /usr/bin since it's not a real path.
48339    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
48340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
48341      # a path prefixed by /cygdrive for fixpath to work.
48342      new_path="$CYGWIN_ROOT_PATH$input_path"
48343    fi
48344  fi
48345
48346
48347  if test "x$path" != "x$new_path"; then
48348    JT_HOME="$new_path"
48349    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48350$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48351  fi
48352
48353    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48354
48355  path="$JT_HOME"
48356  has_colon=`$ECHO $path | $GREP ^.:`
48357  new_path="$path"
48358  if test "x$has_colon" = x; then
48359    # Not in mixed or Windows style, start by that.
48360    new_path=`cmd //c echo $path`
48361  fi
48362
48363
48364  input_path="$new_path"
48365  # Check if we need to convert this using DOS-style short mode. If the path
48366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
48367  # take no chances and rewrite it.
48368  # Note: m4 eats our [], so we need to use [ and ] instead.
48369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
48370  if test "x$has_forbidden_chars" != x; then
48371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48372    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48373  fi
48374
48375
48376  windows_path="$new_path"
48377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48378    unix_path=`$CYGPATH -u "$windows_path"`
48379    new_path="$unix_path"
48380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48382    new_path="$unix_path"
48383  fi
48384
48385  if test "x$path" != "x$new_path"; then
48386    JT_HOME="$new_path"
48387    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48388$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48389  fi
48390
48391  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48392  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48393
48394    else
48395      # We're on a unix platform. Hooray! :)
48396      path="$JT_HOME"
48397      has_space=`$ECHO "$path" | $GREP " "`
48398      if test "x$has_space" != x; then
48399        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48400$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48401        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48402      fi
48403
48404      # Use eval to expand a potential ~
48405      eval path="$path"
48406      if test ! -f "$path" && test ! -d "$path"; then
48407        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48408      fi
48409
48410      if test -d "$path"; then
48411        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48412      else
48413        dir="`$DIRNAME "$path"`"
48414        base="`$BASENAME "$path"`"
48415        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48416      fi
48417    fi
48418  fi
48419
48420
48421      # jtreg win32 script works for everybody
48422      JTREGEXE="$JT_HOME/bin/jtreg"
48423
48424      if test ! -f "$JTREGEXE"; then
48425        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48426      fi
48427
48428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48429$as_echo "$JTREGEXE" >&6; }
48430    else
48431      # try to find jtreg on path
48432
48433
48434
48435  # Publish this variable in the help.
48436
48437
48438  if [ -z "${JTREGEXE+x}" ]; then
48439    # The variable is not set by user, try to locate tool using the code snippet
48440    for ac_prog in jtreg
48441do
48442  # Extract the first word of "$ac_prog", so it can be a program name with args.
48443set dummy $ac_prog; ac_word=$2
48444{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48445$as_echo_n "checking for $ac_word... " >&6; }
48446if ${ac_cv_path_JTREGEXE+:} false; then :
48447  $as_echo_n "(cached) " >&6
48448else
48449  case $JTREGEXE in
48450  [\\/]* | ?:[\\/]*)
48451  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48452  ;;
48453  *)
48454  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48455for as_dir in $PATH
48456do
48457  IFS=$as_save_IFS
48458  test -z "$as_dir" && as_dir=.
48459    for ac_exec_ext in '' $ac_executable_extensions; do
48460  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48461    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48462    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48463    break 2
48464  fi
48465done
48466  done
48467IFS=$as_save_IFS
48468
48469  ;;
48470esac
48471fi
48472JTREGEXE=$ac_cv_path_JTREGEXE
48473if test -n "$JTREGEXE"; then
48474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48475$as_echo "$JTREGEXE" >&6; }
48476else
48477  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48478$as_echo "no" >&6; }
48479fi
48480
48481
48482  test -n "$JTREGEXE" && break
48483done
48484
48485  else
48486    # The variable is set, but is it from the command line or the environment?
48487
48488    # Try to remove the string !JTREGEXE! from our list.
48489    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48490    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48491      # If it failed, the variable was not from the command line. Ignore it,
48492      # but warn the user (except for BASH, which is always set by the calling BASH).
48493      if test "xJTREGEXE" != xBASH; then
48494        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48495$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48496      fi
48497      # Try to locate tool using the code snippet
48498      for ac_prog in jtreg
48499do
48500  # Extract the first word of "$ac_prog", so it can be a program name with args.
48501set dummy $ac_prog; ac_word=$2
48502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48503$as_echo_n "checking for $ac_word... " >&6; }
48504if ${ac_cv_path_JTREGEXE+:} false; then :
48505  $as_echo_n "(cached) " >&6
48506else
48507  case $JTREGEXE in
48508  [\\/]* | ?:[\\/]*)
48509  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48510  ;;
48511  *)
48512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48513for as_dir in $PATH
48514do
48515  IFS=$as_save_IFS
48516  test -z "$as_dir" && as_dir=.
48517    for ac_exec_ext in '' $ac_executable_extensions; do
48518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48519    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48521    break 2
48522  fi
48523done
48524  done
48525IFS=$as_save_IFS
48526
48527  ;;
48528esac
48529fi
48530JTREGEXE=$ac_cv_path_JTREGEXE
48531if test -n "$JTREGEXE"; then
48532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48533$as_echo "$JTREGEXE" >&6; }
48534else
48535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48536$as_echo "no" >&6; }
48537fi
48538
48539
48540  test -n "$JTREGEXE" && break
48541done
48542
48543    else
48544      # If it succeeded, then it was overridden by the user. We will use it
48545      # for the tool.
48546
48547      # First remove it from the list of overridden variables, so we can test
48548      # for unknown variables in the end.
48549      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48550
48551      # Check if we try to supply an empty value
48552      if test "x$JTREGEXE" = x; then
48553        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48554$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48555        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48556$as_echo_n "checking for JTREGEXE... " >&6; }
48557        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48558$as_echo "disabled" >&6; }
48559      else
48560        # Check if the provided tool contains a complete path.
48561        tool_specified="$JTREGEXE"
48562        tool_basename="${tool_specified##*/}"
48563        if test "x$tool_basename" = "x$tool_specified"; then
48564          # A command without a complete path is provided, search $PATH.
48565          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48566$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48567          # Extract the first word of "$tool_basename", so it can be a program name with args.
48568set dummy $tool_basename; ac_word=$2
48569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48570$as_echo_n "checking for $ac_word... " >&6; }
48571if ${ac_cv_path_JTREGEXE+:} false; then :
48572  $as_echo_n "(cached) " >&6
48573else
48574  case $JTREGEXE in
48575  [\\/]* | ?:[\\/]*)
48576  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48577  ;;
48578  *)
48579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48580for as_dir in $PATH
48581do
48582  IFS=$as_save_IFS
48583  test -z "$as_dir" && as_dir=.
48584    for ac_exec_ext in '' $ac_executable_extensions; do
48585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48586    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48588    break 2
48589  fi
48590done
48591  done
48592IFS=$as_save_IFS
48593
48594  ;;
48595esac
48596fi
48597JTREGEXE=$ac_cv_path_JTREGEXE
48598if test -n "$JTREGEXE"; then
48599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48600$as_echo "$JTREGEXE" >&6; }
48601else
48602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48603$as_echo "no" >&6; }
48604fi
48605
48606
48607          if test "x$JTREGEXE" = x; then
48608            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48609          fi
48610        else
48611          # Otherwise we believe it is a complete path. Use it as it is.
48612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48613$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48614          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48615$as_echo_n "checking for JTREGEXE... " >&6; }
48616          if test ! -x "$tool_specified"; then
48617            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48618$as_echo "not found" >&6; }
48619            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48620          fi
48621          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48622$as_echo "$tool_specified" >&6; }
48623        fi
48624      fi
48625    fi
48626
48627  fi
48628
48629
48630
48631  if test "x$JTREGEXE" = x; then
48632    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48633  fi
48634
48635
48636      JT_HOME="`$DIRNAME $JTREGEXE`"
48637    fi
48638  fi
48639
48640
48641
48642
48643
48644# Setup Jib dependency tool
48645
48646
48647# Check whether --with-jib was given.
48648if test "${with_jib+set}" = set; then :
48649  withval=$with_jib;
48650fi
48651
48652
48653  if test "x$with_jib" = xno || test "x$with_jib" = x; then
48654    # jib disabled
48655    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48656$as_echo_n "checking for jib... " >&6; }
48657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48658$as_echo "no" >&6; }
48659  elif test "x$with_jib" = xyes; then
48660    as_fn_error $? "Must supply a value to --with-jib" "$LINENO" 5
48661  else
48662    JIB_HOME="${with_jib}"
48663    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jib" >&5
48664$as_echo_n "checking for jib... " >&6; }
48665    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${JIB_HOME}" >&5
48666$as_echo "${JIB_HOME}" >&6; }
48667    if test ! -d "${JIB_HOME}"; then
48668      as_fn_error $? "--with-jib must be a directory" "$LINENO" 5
48669    fi
48670    JIB_JAR=$(ls ${JIB_HOME}/lib/jib-*.jar)
48671    if test ! -f "${JIB_JAR}"; then
48672      as_fn_error $? "Could not find jib jar file in ${JIB_HOME}" "$LINENO" 5
48673    fi
48674  fi
48675
48676
48677
48678
48679
48680  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48681  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48682  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48683  #                              commands produced by the link step (currently AIX only)
48684  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48685    COMPILER_TARGET_BITS_FLAG="-q"
48686    COMPILER_COMMAND_FILE_FLAG="-f"
48687    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48688  else
48689    COMPILER_TARGET_BITS_FLAG="-m"
48690    COMPILER_COMMAND_FILE_FLAG="@"
48691    COMPILER_BINDCMD_FILE_FLAG=""
48692
48693    # The solstudio linker does not support @-files.
48694    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48695      COMPILER_COMMAND_FILE_FLAG=
48696    fi
48697
48698    # Check if @file is supported by gcc
48699    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48700      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48701$as_echo_n "checking if @file is supported by gcc... " >&6; }
48702      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48703      $ECHO "" "--version" > command.file
48704      if $CXX @command.file 2>&5 >&5; then
48705        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48706$as_echo "yes" >&6; }
48707        COMPILER_COMMAND_FILE_FLAG="@"
48708      else
48709        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48710$as_echo "no" >&6; }
48711        COMPILER_COMMAND_FILE_FLAG=
48712      fi
48713      $RM command.file
48714    fi
48715  fi
48716
48717
48718
48719
48720  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48721  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48722    ARFLAGS="-r"
48723  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48724    ARFLAGS="-X64"
48725  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48726    # lib.exe is used as AR to create static libraries.
48727    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48728  else
48729    ARFLAGS=""
48730  fi
48731
48732
48733  ## Setup strip.
48734  # FIXME: should this really be per platform, or should it be per toolchain type?
48735  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48736  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48737  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48738    STRIPFLAGS="-g"
48739  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48740    STRIPFLAGS="-x"
48741  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48742    STRIPFLAGS="-S"
48743  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48744    STRIPFLAGS="-X32_64"
48745  fi
48746
48747
48748
48749  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48750    CC_OUT_OPTION=-Fo
48751    EXE_OUT_OPTION=-out:
48752    LD_OUT_OPTION=-out:
48753    AR_OUT_OPTION=-out:
48754  else
48755    # The option used to specify the target .o,.a or .so file.
48756    # When compiling, how to specify the to be created object file.
48757    CC_OUT_OPTION='-o$(SPACE)'
48758    # When linking, how to specify the to be created executable.
48759    EXE_OUT_OPTION='-o$(SPACE)'
48760    # When linking, how to specify the to be created dynamically linkable library.
48761    LD_OUT_OPTION='-o$(SPACE)'
48762    # When archiving, how to specify the to be create static archive for object files.
48763    AR_OUT_OPTION='rcs$(SPACE)'
48764  fi
48765
48766
48767
48768
48769
48770  # On Windows, we need to set RC flags.
48771  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48772    RC_FLAGS="-nologo -l0x409"
48773    JVM_RCFLAGS="-nologo"
48774    if test "x$DEBUG_LEVEL" = xrelease; then
48775      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48776      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48777    fi
48778
48779    # The version variables used to create RC_FLAGS may be overridden
48780    # in a custom configure script, or possibly the command line.
48781    # Let those variables be expanded at make time in spec.gmk.
48782    # The \$ are escaped to the shell, and the $(...) variables
48783    # are evaluated by make.
48784    RC_FLAGS="$RC_FLAGS \
48785        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48786        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48787        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48788        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48789        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48790        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48791        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48792
48793    JVM_RCFLAGS="$JVM_RCFLAGS \
48794        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48795        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48796        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48797        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48798        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48799        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48800        -D\"HS_FNAME=jvm.dll\" \
48801        -D\"HS_INTERNAL_NAME=jvm\""
48802  fi
48803
48804
48805
48806  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48807    # silence copyright notice and other headers.
48808    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48809  fi
48810
48811
48812# Now we can test some aspects on the target using configure macros.
48813
48814{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48815$as_echo_n "checking for ANSI C header files... " >&6; }
48816if ${ac_cv_header_stdc+:} false; then :
48817  $as_echo_n "(cached) " >&6
48818else
48819  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48820/* end confdefs.h.  */
48821#include <stdlib.h>
48822#include <stdarg.h>
48823#include <string.h>
48824#include <float.h>
48825
48826int
48827main ()
48828{
48829
48830  ;
48831  return 0;
48832}
48833_ACEOF
48834if ac_fn_cxx_try_compile "$LINENO"; then :
48835  ac_cv_header_stdc=yes
48836else
48837  ac_cv_header_stdc=no
48838fi
48839rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48840
48841if test $ac_cv_header_stdc = yes; then
48842  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48843  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48844/* end confdefs.h.  */
48845#include <string.h>
48846
48847_ACEOF
48848if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48849  $EGREP "memchr" >/dev/null 2>&1; then :
48850
48851else
48852  ac_cv_header_stdc=no
48853fi
48854rm -f conftest*
48855
48856fi
48857
48858if test $ac_cv_header_stdc = yes; then
48859  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48860  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48861/* end confdefs.h.  */
48862#include <stdlib.h>
48863
48864_ACEOF
48865if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48866  $EGREP "free" >/dev/null 2>&1; then :
48867
48868else
48869  ac_cv_header_stdc=no
48870fi
48871rm -f conftest*
48872
48873fi
48874
48875if test $ac_cv_header_stdc = yes; then
48876  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48877  if test "$cross_compiling" = yes; then :
48878  :
48879else
48880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48881/* end confdefs.h.  */
48882#include <ctype.h>
48883#include <stdlib.h>
48884#if ((' ' & 0x0FF) == 0x020)
48885# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48886# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48887#else
48888# define ISLOWER(c) \
48889		   (('a' <= (c) && (c) <= 'i') \
48890		     || ('j' <= (c) && (c) <= 'r') \
48891		     || ('s' <= (c) && (c) <= 'z'))
48892# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48893#endif
48894
48895#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48896int
48897main ()
48898{
48899  int i;
48900  for (i = 0; i < 256; i++)
48901    if (XOR (islower (i), ISLOWER (i))
48902	|| toupper (i) != TOUPPER (i))
48903      return 2;
48904  return 0;
48905}
48906_ACEOF
48907if ac_fn_cxx_try_run "$LINENO"; then :
48908
48909else
48910  ac_cv_header_stdc=no
48911fi
48912rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48913  conftest.$ac_objext conftest.beam conftest.$ac_ext
48914fi
48915
48916fi
48917fi
48918{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48919$as_echo "$ac_cv_header_stdc" >&6; }
48920if test $ac_cv_header_stdc = yes; then
48921
48922$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48923
48924fi
48925
48926# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48927for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48928		  inttypes.h stdint.h unistd.h
48929do :
48930  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48931ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48932"
48933if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48934  cat >>confdefs.h <<_ACEOF
48935#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48936_ACEOF
48937
48938fi
48939
48940done
48941
48942
48943
48944  ###############################################################################
48945  #
48946  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48947  # (The JVM can use 32 or 64 bit Java pointers but that decision
48948  # is made at runtime.)
48949  #
48950
48951  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48952    # Always specify -m flag on Solaris
48953    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48954
48955  # When we add flags to the "official" CFLAGS etc, we need to
48956  # keep track of these additions in ADDED_CFLAGS etc. These
48957  # will later be checked to make sure only controlled additions
48958  # have been made to CFLAGS etc.
48959  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48960  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48961  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48962
48963  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48964  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48965  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48966
48967  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48968  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48969  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48970
48971  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48972  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48973  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48974
48975  elif test "x$COMPILE_TYPE" = xreduced; then
48976    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48977      # Specify -m if running reduced on unix platforms
48978
48979  # When we add flags to the "official" CFLAGS etc, we need to
48980  # keep track of these additions in ADDED_CFLAGS etc. These
48981  # will later be checked to make sure only controlled additions
48982  # have been made to CFLAGS etc.
48983  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48984  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48985  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48986
48987  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48988  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48989  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48990
48991  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48992  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48993  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48994
48995  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48996  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48997  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48998
48999    fi
49000  fi
49001  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49002    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49003    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49004    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49005  fi
49006
49007  # Make compilation sanity check
49008  for ac_header in stdio.h
49009do :
49010  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
49011if test "x$ac_cv_header_stdio_h" = xyes; then :
49012  cat >>confdefs.h <<_ACEOF
49013#define HAVE_STDIO_H 1
49014_ACEOF
49015
49016else
49017
49018    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
49019$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
49020    if test "x$COMPILE_TYPE" = xreduced; then
49021
49022  # Print a helpful message on how to acquire the necessary build dependency.
49023  # reduced is the help tag: freetype, cups, alsa etc
49024  MISSING_DEPENDENCY=reduced
49025
49026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49027    cygwin_help $MISSING_DEPENDENCY
49028  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49029    msys_help $MISSING_DEPENDENCY
49030  else
49031    PKGHANDLER_COMMAND=
49032
49033    case $PKGHANDLER in
49034      apt-get)
49035        apt_help     $MISSING_DEPENDENCY ;;
49036      yum)
49037        yum_help     $MISSING_DEPENDENCY ;;
49038      brew)
49039        brew_help    $MISSING_DEPENDENCY ;;
49040      port)
49041        port_help    $MISSING_DEPENDENCY ;;
49042      pkgutil)
49043        pkgutil_help $MISSING_DEPENDENCY ;;
49044      pkgadd)
49045        pkgadd_help  $MISSING_DEPENDENCY ;;
49046    esac
49047
49048    if test "x$PKGHANDLER_COMMAND" != x; then
49049      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49050    fi
49051  fi
49052
49053      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49054$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49055    elif test "x$COMPILE_TYPE" = xcross; then
49056      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49057$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49058    fi
49059    as_fn_error $? "Cannot continue." "$LINENO" 5
49060
49061fi
49062
49063done
49064
49065
49066  # The cast to long int works around a bug in the HP C Compiler
49067# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49068# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49069# This bug is HP SR number 8606223364.
49070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49071$as_echo_n "checking size of int *... " >&6; }
49072if ${ac_cv_sizeof_int_p+:} false; then :
49073  $as_echo_n "(cached) " >&6
49074else
49075  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49076
49077else
49078  if test "$ac_cv_type_int_p" = yes; then
49079     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49080$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49081as_fn_error 77 "cannot compute sizeof (int *)
49082See \`config.log' for more details" "$LINENO" 5; }
49083   else
49084     ac_cv_sizeof_int_p=0
49085   fi
49086fi
49087
49088fi
49089{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49090$as_echo "$ac_cv_sizeof_int_p" >&6; }
49091
49092
49093
49094cat >>confdefs.h <<_ACEOF
49095#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49096_ACEOF
49097
49098
49099
49100  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
49101  if test "x$ac_cv_sizeof_int_p" = x; then
49102    # The test failed, lets stick to the assumed value.
49103    { $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
49104$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
49105  else
49106    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49107
49108    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49109      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
49110      # Let's try to implicitely set the compilers target architecture and retry the test
49111      { $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
49112$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;}
49113      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
49114$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
49115
49116  # When we add flags to the "official" CFLAGS etc, we need to
49117  # keep track of these additions in ADDED_CFLAGS etc. These
49118  # will later be checked to make sure only controlled additions
49119  # have been made to CFLAGS etc.
49120  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49121  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49122  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
49123
49124  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
49125  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
49126  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
49127
49128  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
49129  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
49130  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
49131
49132  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
49133  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
49134  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
49135
49136
49137      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
49138      unset ac_cv_sizeof_int_p
49139      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
49140      cat >>confdefs.h <<_ACEOF
49141#undef SIZEOF_INT_P
49142_ACEOF
49143
49144      # The cast to long int works around a bug in the HP C Compiler
49145# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
49146# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
49147# This bug is HP SR number 8606223364.
49148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
49149$as_echo_n "checking size of int *... " >&6; }
49150if ${ac_cv_sizeof_int_p+:} false; then :
49151  $as_echo_n "(cached) " >&6
49152else
49153  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
49154
49155else
49156  if test "$ac_cv_type_int_p" = yes; then
49157     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
49158$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
49159as_fn_error 77 "cannot compute sizeof (int *)
49160See \`config.log' for more details" "$LINENO" 5; }
49161   else
49162     ac_cv_sizeof_int_p=0
49163   fi
49164fi
49165
49166fi
49167{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
49168$as_echo "$ac_cv_sizeof_int_p" >&6; }
49169
49170
49171
49172cat >>confdefs.h <<_ACEOF
49173#define SIZEOF_INT_P $ac_cv_sizeof_int_p
49174_ACEOF
49175
49176
49177
49178      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
49179
49180      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
49181        { $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
49182$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;}
49183        if test "x$COMPILE_TYPE" = xreduced; then
49184
49185  # Print a helpful message on how to acquire the necessary build dependency.
49186  # reduced is the help tag: freetype, cups, alsa etc
49187  MISSING_DEPENDENCY=reduced
49188
49189  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
49190    cygwin_help $MISSING_DEPENDENCY
49191  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
49192    msys_help $MISSING_DEPENDENCY
49193  else
49194    PKGHANDLER_COMMAND=
49195
49196    case $PKGHANDLER in
49197      apt-get)
49198        apt_help     $MISSING_DEPENDENCY ;;
49199      yum)
49200        yum_help     $MISSING_DEPENDENCY ;;
49201      brew)
49202        brew_help    $MISSING_DEPENDENCY ;;
49203      port)
49204        port_help    $MISSING_DEPENDENCY ;;
49205      pkgutil)
49206        pkgutil_help $MISSING_DEPENDENCY ;;
49207      pkgadd)
49208        pkgadd_help  $MISSING_DEPENDENCY ;;
49209    esac
49210
49211    if test "x$PKGHANDLER_COMMAND" != x; then
49212      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
49213    fi
49214  fi
49215
49216          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
49217$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
49218        elif test "x$COMPILE_TYPE" = xcross; then
49219          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
49220$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
49221        fi
49222        as_fn_error $? "Cannot continue." "$LINENO" 5
49223      fi
49224    fi
49225  fi
49226
49227  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
49228$as_echo_n "checking for target address size... " >&6; }
49229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
49230$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
49231
49232
49233  ###############################################################################
49234  #
49235  # Is the target little of big endian?
49236  #
49237   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
49238$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
49239if ${ac_cv_c_bigendian+:} false; then :
49240  $as_echo_n "(cached) " >&6
49241else
49242  ac_cv_c_bigendian=unknown
49243    # See if we're dealing with a universal compiler.
49244    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49245/* end confdefs.h.  */
49246#ifndef __APPLE_CC__
49247	       not a universal capable compiler
49248	     #endif
49249	     typedef int dummy;
49250
49251_ACEOF
49252if ac_fn_cxx_try_compile "$LINENO"; then :
49253
49254	# Check for potential -arch flags.  It is not universal unless
49255	# there are at least two -arch flags with different values.
49256	ac_arch=
49257	ac_prev=
49258	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
49259	 if test -n "$ac_prev"; then
49260	   case $ac_word in
49261	     i?86 | x86_64 | ppc | ppc64)
49262	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
49263		 ac_arch=$ac_word
49264	       else
49265		 ac_cv_c_bigendian=universal
49266		 break
49267	       fi
49268	       ;;
49269	   esac
49270	   ac_prev=
49271	 elif test "x$ac_word" = "x-arch"; then
49272	   ac_prev=arch
49273	 fi
49274       done
49275fi
49276rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49277    if test $ac_cv_c_bigendian = unknown; then
49278      # See if sys/param.h defines the BYTE_ORDER macro.
49279      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49280/* end confdefs.h.  */
49281#include <sys/types.h>
49282	     #include <sys/param.h>
49283
49284int
49285main ()
49286{
49287#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
49288		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
49289		     && LITTLE_ENDIAN)
49290	      bogus endian macros
49291	     #endif
49292
49293  ;
49294  return 0;
49295}
49296_ACEOF
49297if ac_fn_cxx_try_compile "$LINENO"; then :
49298  # It does; now see whether it defined to BIG_ENDIAN or not.
49299	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49300/* end confdefs.h.  */
49301#include <sys/types.h>
49302		#include <sys/param.h>
49303
49304int
49305main ()
49306{
49307#if BYTE_ORDER != BIG_ENDIAN
49308		 not big endian
49309		#endif
49310
49311  ;
49312  return 0;
49313}
49314_ACEOF
49315if ac_fn_cxx_try_compile "$LINENO"; then :
49316  ac_cv_c_bigendian=yes
49317else
49318  ac_cv_c_bigendian=no
49319fi
49320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49321fi
49322rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49323    fi
49324    if test $ac_cv_c_bigendian = unknown; then
49325      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
49326      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49327/* end confdefs.h.  */
49328#include <limits.h>
49329
49330int
49331main ()
49332{
49333#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
49334	      bogus endian macros
49335	     #endif
49336
49337  ;
49338  return 0;
49339}
49340_ACEOF
49341if ac_fn_cxx_try_compile "$LINENO"; then :
49342  # It does; now see whether it defined to _BIG_ENDIAN or not.
49343	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49344/* end confdefs.h.  */
49345#include <limits.h>
49346
49347int
49348main ()
49349{
49350#ifndef _BIG_ENDIAN
49351		 not big endian
49352		#endif
49353
49354  ;
49355  return 0;
49356}
49357_ACEOF
49358if ac_fn_cxx_try_compile "$LINENO"; then :
49359  ac_cv_c_bigendian=yes
49360else
49361  ac_cv_c_bigendian=no
49362fi
49363rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49364fi
49365rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49366    fi
49367    if test $ac_cv_c_bigendian = unknown; then
49368      # Compile a test program.
49369      if test "$cross_compiling" = yes; then :
49370  # Try to guess by grepping values from an object file.
49371	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49372/* end confdefs.h.  */
49373short int ascii_mm[] =
49374		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
49375		short int ascii_ii[] =
49376		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
49377		int use_ascii (int i) {
49378		  return ascii_mm[i] + ascii_ii[i];
49379		}
49380		short int ebcdic_ii[] =
49381		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
49382		short int ebcdic_mm[] =
49383		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
49384		int use_ebcdic (int i) {
49385		  return ebcdic_mm[i] + ebcdic_ii[i];
49386		}
49387		extern int foo;
49388
49389int
49390main ()
49391{
49392return use_ascii (foo) == use_ebcdic (foo);
49393  ;
49394  return 0;
49395}
49396_ACEOF
49397if ac_fn_cxx_try_compile "$LINENO"; then :
49398  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
49399	      ac_cv_c_bigendian=yes
49400	    fi
49401	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
49402	      if test "$ac_cv_c_bigendian" = unknown; then
49403		ac_cv_c_bigendian=no
49404	      else
49405		# finding both strings is unlikely to happen, but who knows?
49406		ac_cv_c_bigendian=unknown
49407	      fi
49408	    fi
49409fi
49410rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49411else
49412  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49413/* end confdefs.h.  */
49414$ac_includes_default
49415int
49416main ()
49417{
49418
49419	     /* Are we little or big endian?  From Harbison&Steele.  */
49420	     union
49421	     {
49422	       long int l;
49423	       char c[sizeof (long int)];
49424	     } u;
49425	     u.l = 1;
49426	     return u.c[sizeof (long int) - 1] == 1;
49427
49428  ;
49429  return 0;
49430}
49431_ACEOF
49432if ac_fn_cxx_try_run "$LINENO"; then :
49433  ac_cv_c_bigendian=no
49434else
49435  ac_cv_c_bigendian=yes
49436fi
49437rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49438  conftest.$ac_objext conftest.beam conftest.$ac_ext
49439fi
49440
49441    fi
49442fi
49443{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49444$as_echo "$ac_cv_c_bigendian" >&6; }
49445 case $ac_cv_c_bigendian in #(
49446   yes)
49447     ENDIAN="big";; #(
49448   no)
49449     ENDIAN="little" ;; #(
49450   universal)
49451     ENDIAN="universal_endianness"
49452     ;; #(
49453   *)
49454     ENDIAN="unknown" ;;
49455 esac
49456
49457
49458  if test "x$ENDIAN" = xuniversal_endianness; then
49459    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49460  fi
49461  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49462    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
49463  fi
49464
49465
49466# Configure flags for the tools
49467
49468  ###############################################################################
49469  #
49470  # How to compile shared libraries.
49471  #
49472
49473  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49474    PICFLAG="-fPIC"
49475    C_FLAG_REORDER=''
49476    CXX_FLAG_REORDER=''
49477
49478    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49479      # Linking is different on MacOSX
49480      if test "x$STATIC_BUILD" = xtrue; then
49481        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49482      else
49483        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49484        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49485      fi
49486      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49487      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49488      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49489      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49490    else
49491      # Default works for linux, might work on other platforms as well.
49492      SHARED_LIBRARY_FLAGS='-shared'
49493      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49494      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49495      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49496      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49497    fi
49498  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49499    C_FLAG_REORDER=''
49500    CXX_FLAG_REORDER=''
49501
49502    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49503      # Linking is different on MacOSX
49504      PICFLAG=''
49505      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49506      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path$1'
49507      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49508      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49509      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49510
49511      if test "x$STATIC_BUILD" = xfalse; then
49512        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49513      fi
49514    else
49515      # Default works for linux, might work on other platforms as well.
49516      PICFLAG='-fPIC'
49517      SHARED_LIBRARY_FLAGS='-shared'
49518      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$ORIGIN$1'
49519      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49520      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49521
49522      # arm specific settings
49523      if test "x$OPENJDK_TARGET_CPU" = "xarm"; then
49524        # '-Wl,-z,origin' isn't used on arm.
49525        SET_SHARED_LIBRARY_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49526      else
49527        SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49528      fi
49529
49530    fi
49531  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49532    if test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
49533      PICFLAG="-xcode=pic32"
49534    else
49535      PICFLAG="-KPIC"
49536    fi
49537    C_FLAG_REORDER='-xF'
49538    CXX_FLAG_REORDER='-xF'
49539    SHARED_LIBRARY_FLAGS="-G"
49540    SET_EXECUTABLE_ORIGIN='-R\$$ORIGIN$1'
49541    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49542    SET_SHARED_LIBRARY_NAME='-h $1'
49543    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49544  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49545    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49546    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49547    # will have to patch this single instruction with a call to some out-of-order code which
49548    # does the load from the TOC. This is of course slow. But in that case we also would have
49549    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49550    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49551    # can be patched directly by the linker and does not require a jump to out-of-order code.
49552    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49553    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49554    # loads for accessing a global variable). But there are rumors that this may be seen as a
49555    # 'performance feature' because of improved code locality of the symbols used in a
49556    # compilation unit.
49557    PICFLAG="-qpic"
49558    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49559    C_FLAG_REORDER=''
49560    CXX_FLAG_REORDER=''
49561    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49562    SET_EXECUTABLE_ORIGIN=""
49563    SET_SHARED_LIBRARY_ORIGIN=''
49564    SET_SHARED_LIBRARY_NAME=''
49565    SET_SHARED_LIBRARY_MAPFILE=''
49566  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49567    PICFLAG=""
49568    C_FLAG_REORDER=''
49569    CXX_FLAG_REORDER=''
49570    SHARED_LIBRARY_FLAGS="-dll"
49571    SET_EXECUTABLE_ORIGIN=''
49572    SET_SHARED_LIBRARY_ORIGIN=''
49573    SET_SHARED_LIBRARY_NAME=''
49574    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49575  fi
49576
49577
49578
49579
49580
49581
49582
49583
49584
49585  # The (cross) compiler is now configured, we can now test capabilities
49586  # of the target platform.
49587
49588
49589
49590  ###############################################################################
49591  #
49592  # Setup the opt flags for different compilers
49593  # and different operating systems.
49594  #
49595
49596  # FIXME: this was indirectly the old default, but just inherited.
49597  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49598  #   C_FLAG_DEPS="-MMD -MF"
49599  # fi
49600
49601  # Generate make dependency files
49602  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49603    C_FLAG_DEPS="-MMD -MF"
49604  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49605    C_FLAG_DEPS="-MMD -MF"
49606  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49607    C_FLAG_DEPS="-xMMD -xMF"
49608  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49609    C_FLAG_DEPS="-qmakedep=gcc -MF"
49610  fi
49611  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49612
49613
49614
49615  # Debug symbols
49616  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49617    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49618      # reduce from default "-g2" option to save space
49619      CFLAGS_DEBUG_SYMBOLS="-g1"
49620      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49621    else
49622      CFLAGS_DEBUG_SYMBOLS="-g"
49623      CXXFLAGS_DEBUG_SYMBOLS="-g"
49624    fi
49625  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49626    CFLAGS_DEBUG_SYMBOLS="-g"
49627    CXXFLAGS_DEBUG_SYMBOLS="-g"
49628  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49629    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49630    # -g0 enables debug symbols without disabling inlining.
49631    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49632  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49633    CFLAGS_DEBUG_SYMBOLS="-g"
49634    CXXFLAGS_DEBUG_SYMBOLS="-g"
49635  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49636    CFLAGS_DEBUG_SYMBOLS="-Zi"
49637    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49638  fi
49639
49640
49641
49642  # Debug symbols for JVM_CFLAGS
49643  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49644    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49645    if test "x$DEBUG_LEVEL" = xslowdebug; then
49646      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49647    else
49648      # -g0 does not disable inlining, which -g does.
49649      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49650    fi
49651  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49652    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49653  else
49654    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49655  fi
49656
49657
49658  # bounds, memory and behavior checking options
49659  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49660    case $DEBUG_LEVEL in
49661    release )
49662      # no adjustment
49663      ;;
49664    fastdebug )
49665      # no adjustment
49666      ;;
49667    slowdebug )
49668      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49669      # get's added conditionally on whether we produce debug symbols or not.
49670      # This is most likely not really correct.
49671
49672      # Add runtime stack smashing and undefined behavior checks.
49673      # Not all versions of gcc support -fstack-protector
49674      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49675
49676
49677
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697
49698
49699
49700
49701
49702
49703
49704
49705
49706
49707
49708
49709
49710
49711
49712
49713
49714
49715
49716
49717    # Execute function body
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752
49753
49754
49755
49756
49757
49758
49759
49760
49761
49762
49763
49764
49765
49766    # Execute function body
49767
49768  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49769$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49770  supports=yes
49771
49772  saved_cflags="$CFLAGS"
49773  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49774  ac_ext=c
49775ac_cpp='$CPP $CPPFLAGS'
49776ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49777ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49778ac_compiler_gnu=$ac_cv_c_compiler_gnu
49779
49780  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49781/* end confdefs.h.  */
49782int i;
49783_ACEOF
49784if ac_fn_c_try_compile "$LINENO"; then :
49785
49786else
49787  supports=no
49788fi
49789rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49790  ac_ext=cpp
49791ac_cpp='$CXXCPP $CPPFLAGS'
49792ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49793ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49794ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49795
49796  CFLAGS="$saved_cflags"
49797
49798  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49799$as_echo "$supports" >&6; }
49800  if test "x$supports" = "xyes" ; then
49801    :
49802    C_COMP_SUPPORTS="yes"
49803  else
49804    :
49805    C_COMP_SUPPORTS="no"
49806  fi
49807
49808
49809
49810
49811
49812
49813
49814
49815
49816
49817
49818
49819
49820
49821
49822
49823
49824
49825
49826
49827
49828
49829
49830
49831
49832
49833
49834
49835
49836
49837
49838
49839
49840
49841
49842
49843
49844
49845
49846
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866    # Execute function body
49867
49868  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49869$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49870  supports=yes
49871
49872  saved_cxxflags="$CXXFLAGS"
49873  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49874  ac_ext=cpp
49875ac_cpp='$CXXCPP $CPPFLAGS'
49876ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49877ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49878ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49879
49880  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49881/* end confdefs.h.  */
49882int i;
49883_ACEOF
49884if ac_fn_cxx_try_compile "$LINENO"; then :
49885
49886else
49887  supports=no
49888fi
49889rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49890  ac_ext=cpp
49891ac_cpp='$CXXCPP $CPPFLAGS'
49892ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49893ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49894ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49895
49896  CXXFLAGS="$saved_cxxflags"
49897
49898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49899$as_echo "$supports" >&6; }
49900  if test "x$supports" = "xyes" ; then
49901    :
49902    CXX_COMP_SUPPORTS="yes"
49903  else
49904    :
49905    CXX_COMP_SUPPORTS="no"
49906  fi
49907
49908
49909
49910
49911
49912
49913
49914
49915
49916
49917
49918
49919
49920  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49921$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49922  supports=no
49923  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49924
49925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49926$as_echo "$supports" >&6; }
49927  if test "x$supports" = "xyes" ; then
49928    :
49929
49930  else
49931    :
49932    STACK_PROTECTOR_CFLAG=""
49933  fi
49934
49935
49936
49937
49938
49939
49940
49941      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49942      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49943      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49944        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49945      fi
49946      ;;
49947    esac
49948  fi
49949
49950  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49951    if test "x$DEBUG_LEVEL" != xrelease; then
49952      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49953        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49954      fi
49955    fi
49956  fi
49957
49958  # Optimization levels
49959  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49960    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49961
49962    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49963      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49964      C_O_FLAG_HIGHEST_JVM="-xO4"
49965      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49966      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49967      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49968      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49969      C_O_FLAG_DEBUG_JVM=""
49970      C_O_FLAG_NONE="-xregs=no%frameptr"
49971      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49972      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49973      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49974      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49975      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49976      CXX_O_FLAG_DEBUG_JVM=""
49977      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49978      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49979        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49980        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49981      fi
49982    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49983      C_O_FLAG_HIGHEST_JVM="-xO4"
49984      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49985      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49986      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49987      C_O_FLAG_DEBUG=""
49988      C_O_FLAG_DEBUG_JVM=""
49989      C_O_FLAG_NONE=""
49990      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49991      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49992      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49993      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49994      CXX_O_FLAG_DEBUG=""
49995      CXX_O_FLAG_DEBUG_JVM=""
49996      CXX_O_FLAG_NONE=""
49997    fi
49998  else
49999    # The remaining toolchains share opt flags between CC and CXX;
50000    # setup for C and duplicate afterwards.
50001    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50002      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50003        # On MacOSX we optimize for size, something
50004        # we should do for all platforms?
50005        C_O_FLAG_HIGHEST_JVM="-Os"
50006        C_O_FLAG_HIGHEST="-Os"
50007        C_O_FLAG_HI="-Os"
50008        C_O_FLAG_NORM="-Os"
50009        C_O_FLAG_SIZE="-Os"
50010      else
50011        C_O_FLAG_HIGHEST_JVM="-O3"
50012        C_O_FLAG_HIGHEST="-O3"
50013        C_O_FLAG_HI="-O3"
50014        C_O_FLAG_NORM="-O2"
50015        C_O_FLAG_SIZE="-Os"
50016      fi
50017      C_O_FLAG_DEBUG="-O0"
50018      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50019        C_O_FLAG_DEBUG_JVM=""
50020      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50021        C_O_FLAG_DEBUG_JVM="-O0"
50022      fi
50023      C_O_FLAG_NONE="-O0"
50024    elif test "x$TOOLCHAIN_TYPE" = xclang; then
50025      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50026        # On MacOSX we optimize for size, something
50027        # we should do for all platforms?
50028        C_O_FLAG_HIGHEST_JVM="-Os"
50029        C_O_FLAG_HIGHEST="-Os"
50030        C_O_FLAG_HI="-Os"
50031        C_O_FLAG_NORM="-Os"
50032        C_O_FLAG_SIZE="-Os"
50033      else
50034        C_O_FLAG_HIGHEST_JVM="-O3"
50035        C_O_FLAG_HIGHEST="-O3"
50036        C_O_FLAG_HI="-O3"
50037        C_O_FLAG_NORM="-O2"
50038        C_O_FLAG_SIZE="-Os"
50039      fi
50040      C_O_FLAG_DEBUG="-O0"
50041      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50042        C_O_FLAG_DEBUG_JVM=""
50043      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50044        C_O_FLAG_DEBUG_JVM="-O0"
50045      fi
50046      C_O_FLAG_NONE="-O0"
50047    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50048      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
50049      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
50050      C_O_FLAG_HI="-O3 -qinline -qinlglue"
50051      C_O_FLAG_NORM="-O2"
50052      C_O_FLAG_DEBUG="-qnoopt"
50053      # FIXME: Value below not verified.
50054      C_O_FLAG_DEBUG_JVM=""
50055      C_O_FLAG_NONE="-qnoopt"
50056    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50057      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
50058      C_O_FLAG_HIGHEST="-O2"
50059      C_O_FLAG_HI="-O1"
50060      C_O_FLAG_NORM="-O1"
50061      C_O_FLAG_DEBUG="-Od"
50062      C_O_FLAG_DEBUG_JVM=""
50063      C_O_FLAG_NONE="-Od"
50064      C_O_FLAG_SIZE="-Os"
50065    fi
50066    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
50067    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
50068    CXX_O_FLAG_HI="$C_O_FLAG_HI"
50069    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
50070    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
50071    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
50072    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
50073    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
50074  fi
50075
50076  # Adjust optimization flags according to debug level.
50077  case $DEBUG_LEVEL in
50078    release )
50079      # no adjustment
50080      ;;
50081    fastdebug )
50082      # Not quite so much optimization
50083      C_O_FLAG_HI="$C_O_FLAG_NORM"
50084      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
50085      ;;
50086    slowdebug )
50087      # Disable optimization
50088      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
50089      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
50090      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
50091      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
50092      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
50093      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
50094      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
50095      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
50096      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
50097      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
50098      ;;
50099  esac
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120# Check whether --with-abi-profile was given.
50121if test "${with_abi_profile+set}" = set; then :
50122  withval=$with_abi_profile;
50123fi
50124
50125
50126  if test "x$with_abi_profile" != x; then
50127    if test "x$OPENJDK_TARGET_CPU" != xarm && \
50128        test "x$OPENJDK_TARGET_CPU" != xaarch64; then
50129      as_fn_error $? "--with-abi-profile only available on arm/aarch64" "$LINENO" 5
50130    fi
50131
50132    OPENJDK_TARGET_ABI_PROFILE=$with_abi_profile
50133    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI profle" >&5
50134$as_echo_n "checking for ABI profle... " >&6; }
50135    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_ABI_PROFILE" >&5
50136$as_echo "$OPENJDK_TARGET_ABI_PROFILE" >&6; }
50137
50138    if test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-sflt; then
50139      ARM_FLOAT_TYPE=vfp-sflt
50140      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50141    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-vfp-hflt; then
50142      ARM_FLOAT_TYPE=vfp-hflt
50143      ARM_ARCH_TYPE_FLAGS='-march=armv7-a -mthumb'
50144    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm-sflt; then
50145      ARM_FLOAT_TYPE=sflt
50146      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50147    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv5-vfp-sflt; then
50148      ARM_FLOAT_TYPE=vfp-sflt
50149      ARM_ARCH_TYPE_FLAGS='-march=armv5t -marm'
50150    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarmv6-vfp-hflt; then
50151      ARM_FLOAT_TYPE=vfp-hflt
50152      ARM_ARCH_TYPE_FLAGS='-march=armv6 -marm'
50153    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xarm64; then
50154      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50155      ARM_FLOAT_TYPE=
50156      ARM_ARCH_TYPE_FLAGS=
50157    elif test "x$OPENJDK_TARGET_ABI_PROFILE" = xaarch64; then
50158      # No special flags, just need to trigger setting JDK_ARCH_ABI_PROP_NAME
50159      ARM_FLOAT_TYPE=
50160      ARM_ARCH_TYPE_FLAGS=
50161    else
50162      as_fn_error $? "Invalid ABI profile: \"$OPENJDK_TARGET_ABI_PROFILE\"" "$LINENO" 5
50163    fi
50164
50165    if test "x$ARM_FLOAT_TYPE" = xvfp-sflt; then
50166      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=softfp -mfpu=vfp -DFLOAT_ARCH=-vfp-sflt'
50167    elif test "x$ARM_FLOAT_TYPE" = xvfp-hflt; then
50168      ARM_FLOAT_TYPE_FLAGS='-mfloat-abi=hard -mfpu=vfp -DFLOAT_ARCH=-vfp-hflt'
50169    elif test "x$ARM_FLOAT_TYPE" = xsflt; then
50170      ARM_FLOAT_TYPE_FLAGS='-msoft-float -mfpu=vfp'
50171    fi
50172    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ARM_FLOAT_TYPE floating point flags" >&5
50173$as_echo_n "checking for $ARM_FLOAT_TYPE floating point flags... " >&6; }
50174    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_FLOAT_TYPE_FLAGS" >&5
50175$as_echo "$ARM_FLOAT_TYPE_FLAGS" >&6; }
50176
50177    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for arch type flags" >&5
50178$as_echo_n "checking for arch type flags... " >&6; }
50179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ARM_ARCH_TYPE_FLAGS" >&5
50180$as_echo "$ARM_ARCH_TYPE_FLAGS" >&6; }
50181
50182    # Now set JDK_ARCH_ABI_PROP_NAME. This is equivalent to the last part of the
50183    # autoconf target triplet.
50184     JDK_ARCH_ABI_PROP_NAME=`$ECHO $OPENJDK_TARGET_AUTOCONF_NAME | $SED -e 's/.*-\([^-]*\)$/\1/'`
50185    # Sanity check that it is a known ABI.
50186    if test "x$JDK_ARCH_ABI_PROP_NAME" != xgnu && \
50187        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabi  && \
50188        test "x$JDK_ARCH_ABI_PROP_NAME" != xgnueabihf; then
50189          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&5
50190$as_echo "$as_me: WARNING: Unknown autoconf target triplet ABI: \"$JDK_ARCH_ABI_PROP_NAME\"" >&2;}
50191    fi
50192    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ABI property name" >&5
50193$as_echo_n "checking for ABI property name... " >&6; }
50194    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_ARCH_ABI_PROP_NAME" >&5
50195$as_echo "$JDK_ARCH_ABI_PROP_NAME" >&6; }
50196
50197
50198    # Pass these on to the open part of configure as if they were set using
50199    # --with-extra-c[xx]flags.
50200    EXTRA_CFLAGS="$EXTRA_CFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50201    EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50202    # Get rid of annoying "note: the mangling of 'va_list' has changed in GCC 4.4"
50203    # FIXME: This should not really be set using extra_cflags.
50204    if test "x$OPENJDK_TARGET_CPU" = xarm; then
50205        EXTRA_CFLAGS="$EXTRA_CFLAGS -Wno-psabi"
50206        EXTRA_CXXFLAGS="$EXTRA_CXXFLAGS -Wno-psabi"
50207    fi
50208    # Also add JDK_ARCH_ABI_PROP_NAME define, but only to CFLAGS.
50209    EXTRA_CFLAGS="$EXTRA_CFLAGS -DJDK_ARCH_ABI_PROP_NAME='\"\$(JDK_ARCH_ABI_PROP_NAME)\"'"
50210    # And pass the architecture flags to the linker as well
50211    EXTRA_LDFLAGS="$EXTRA_LDFLAGS $ARM_ARCH_TYPE_FLAGS $ARM_FLOAT_TYPE_FLAGS"
50212  fi
50213
50214  # When building with an abi profile, the name of that profile is appended on the
50215  # bundle platform, which is used in bundle names.
50216  if test "x$OPENJDK_TARGET_ABI_PROFILE" != x; then
50217    OPENJDK_TARGET_BUNDLE_PLATFORM="$OPENJDK_TARGET_OS_BUNDLE-$OPENJDK_TARGET_ABI_PROFILE"
50218  fi
50219
50220
50221  # Special extras...
50222  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50223    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50224      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50225      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50226    fi
50227    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50228    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50229  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50230    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50231    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50232  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50233    CXXSTD_CXXFLAG="-std=gnu++98"
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248
50249
50250
50251
50252
50253
50254
50255
50256
50257
50258
50259
50260
50261
50262
50263
50264
50265
50266
50267
50268
50269
50270
50271
50272
50273
50274
50275
50276    # Execute function body
50277
50278  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
50279$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
50280  supports=yes
50281
50282  saved_cxxflags="$CXXFLAGS"
50283  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
50284  ac_ext=cpp
50285ac_cpp='$CXXCPP $CPPFLAGS'
50286ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50287ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50288ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50289
50290  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50291/* end confdefs.h.  */
50292int i;
50293_ACEOF
50294if ac_fn_cxx_try_compile "$LINENO"; then :
50295
50296else
50297  supports=no
50298fi
50299rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50300  ac_ext=cpp
50301ac_cpp='$CXXCPP $CPPFLAGS'
50302ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50303ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50304ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50305
50306  CXXFLAGS="$saved_cxxflags"
50307
50308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50309$as_echo "$supports" >&6; }
50310  if test "x$supports" = "xyes" ; then
50311    :
50312
50313  else
50314    :
50315    CXXSTD_CXXFLAG=""
50316  fi
50317
50318
50319
50320
50321
50322
50323
50324
50325
50326
50327
50328
50329    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
50330    JVM_CFLAGS="${JVM_CFLAGS} ${CXXSTD_CXXFLAG}"
50331
50332  fi
50333  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50334    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
50335    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
50336  fi
50337
50338  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
50339  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
50340  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
50341
50342  ###############################################################################
50343  #
50344  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50345  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50346  #
50347
50348  # Setup compiler/platform specific flags into
50349  #    CFLAGS_JDK    - C Compiler flags
50350  #    CXXFLAGS_JDK  - C++ Compiler flags
50351  #    COMMON_CCXXFLAGS_JDK - common to C and C++
50352  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50353    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50354    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
50355    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
50356    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50357      # Force compatibility with i586 on 32 bit intel platforms.
50358      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50359      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50360    fi
50361    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50362        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50363    case $OPENJDK_TARGET_CPU_ARCH in
50364      arm )
50365        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50366        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50367        COMMON_CCXXFLAGS_JDK="${COMMON_CCXXFLAGS_JDK} -fsigned-char"
50368        ;;
50369      ppc )
50370        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50371        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50372        ;;
50373      s390 )
50374        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
50375        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50376        ;;
50377      * )
50378        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50379        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50380        ;;
50381    esac
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
50411
50412
50413
50414
50415
50416
50417
50418
50419
50420
50421
50422
50423
50424
50425
50426
50427
50428
50429
50430
50431
50432
50433
50434
50435
50436    # Execute function body
50437
50438  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50439  REFERENCE_VERSION=6
50440
50441  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50442    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50443  fi
50444
50445  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50446    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50447  fi
50448
50449  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50450  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50451
50452  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50453    :
50454
50455  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
50456  # runs afoul of the more aggressive versions of these optimisations.
50457  # Notably, value range propagation now assumes that the this pointer of C++
50458  # member functions is non-null.
50459  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
50460        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50461        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
50462$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
50463  CFLAGS_JDK="$CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50464  JVM_CFLAGS="$JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50465
50466  else
50467    :
50468
50469  fi
50470
50471
50472
50473
50474
50475
50476
50477
50478
50479
50480
50481
50482
50483
50484  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50485    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50486
50487    # Restrict the debug information created by Clang to avoid
50488    # too big object files and speed the build up a little bit
50489    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50490    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50491    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50492      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50493        # Force compatibility with i586 on 32 bit intel platforms.
50494        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50495        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50496      fi
50497      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50498      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50499          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50500      case $OPENJDK_TARGET_CPU_ARCH in
50501        ppc )
50502          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50503          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50504          ;;
50505        * )
50506          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50507          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50508          ;;
50509      esac
50510    fi
50511  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50512    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50513    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50514    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50515      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50516    fi
50517
50518    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50519    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50520  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50521    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50522    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50523    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50524  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50525    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50526        -MD -Zc:wchar_t- -W3 -wd4800 \
50527        -DWIN32_LEAN_AND_MEAN \
50528        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50529        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50530        -DWIN32 -DIAL"
50531    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50532      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50533    else
50534      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50535    fi
50536    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50537    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50538    # studio.
50539    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50540      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50541      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50542      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50543    fi
50544  fi
50545
50546  ###############################################################################
50547
50548  # Adjust flags according to debug level.
50549  case $DEBUG_LEVEL in
50550    fastdebug | slowdebug )
50551      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50552      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50553      ;;
50554    release )
50555      ;;
50556    * )
50557      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50558      ;;
50559  esac
50560
50561  # Set some common defines. These works for all compilers, but assume
50562  # -D is universally accepted.
50563
50564  # Setup endianness
50565  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50566    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50567    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50568    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50569    #   Note: -Dmacro         is the same as    #define macro 1
50570    #         -Dmacro=        is the same as    #define macro
50571    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50572      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50573    else
50574      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50575    fi
50576  else
50577    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50578    # are defined in the system?
50579    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50580      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50581    else
50582      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50583    fi
50584  fi
50585
50586  # Setup target OS define. Use OS target name but in upper case.
50587  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50588  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50589
50590  # Setup target CPU
50591  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50592      $OPENJDK_TARGET_ADD_LP64 \
50593      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50594
50595  # Setup debug/release defines
50596  if test "x$DEBUG_LEVEL" = xrelease; then
50597    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50598    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50599      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50600    fi
50601  else
50602    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50603  fi
50604
50605  # Set some additional per-OS defines.
50606  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50607    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50608    JVM_CFLAGS="$JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
50609        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50610  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50611    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50612    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50613        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
50614  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50615    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50616    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50617    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50618    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50619        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50620        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50621        -fno-omit-frame-pointer"
50622  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50623    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50624    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50625    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50626        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50627        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50628  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50629    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50630  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50631    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50632    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50633  fi
50634
50635  # Set some additional per-CPU defines.
50636  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50637    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50638  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50639    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50640  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50641    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50642      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50643      # fixes `relocation truncated to fit' error for gcc 4.1.
50644      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50645      # Use ppc64 instructions, but schedule for power5
50646      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50647    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50648      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50649    fi
50650  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50651    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50652      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50653      # Little endian machine uses ELFv2 ABI.
50654      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50655      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50656      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power8 -mtune=power8"
50657    fi
50658  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
50659    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50660      JVM_CFLAGS="$JVM_CFLAGS -mbackchain -march=z10"
50661    fi
50662  fi
50663
50664  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50665    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50666  fi
50667
50668  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50669    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50670      # Solaris does not have _LP64=1 in the old build.
50671      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50672      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50673    fi
50674  fi
50675
50676  # Set JVM_CFLAGS warning handling
50677  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50678    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50679        -Wunused-value -Woverloaded-virtual"
50680
50681    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50682
50683
50684
50685
50686
50687
50688
50689
50690
50691
50692
50693
50694
50695
50696
50697
50698
50699
50700
50701
50702
50703
50704
50705
50706
50707
50708
50709
50710
50711
50712
50713
50714
50715
50716
50717
50718
50719
50720
50721
50722
50723
50724
50725
50726
50727
50728
50729
50730
50731
50732
50733
50734
50735
50736    # Execute function body
50737
50738  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50739  REFERENCE_VERSION=4.8
50740
50741  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
50742    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
50743  fi
50744
50745  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50746    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50747  fi
50748
50749  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50750  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
50751
50752  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50753    :
50754
50755            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50756            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50757
50758
50759  else
50760    :
50761
50762  fi
50763
50764
50765
50766
50767
50768
50769
50770
50771
50772
50773
50774
50775
50776
50777    fi
50778    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50779      # Non-zero builds have stricter warnings
50780      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50781    else
50782      if test "x$TOOLCHAIN_TYPE" = xclang; then
50783        # Some versions of llvm do not like -Wundef
50784        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50785      fi
50786    fi
50787  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50788    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50789        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50790  fi
50791
50792  # Additional macosx handling
50793  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50794    # Setting these parameters makes it an error to link to macosx APIs that are
50795    # newer than the given OS version and makes the linked binaries compatible
50796    # even if built on a newer version of the OS.
50797    # The expected format is X.Y.Z
50798    MACOSX_VERSION_MIN=10.7.0
50799
50800
50801    # The macro takes the version with no dots, ex: 1070
50802    # Let the flags variables get resolved in make for easier override on make
50803    # command line.
50804    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50805    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50806  fi
50807
50808  # Setup some hard coded includes
50809  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50810      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
50811      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50812      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50813      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50814      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50815      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50816
50817  # The shared libraries are compiled using the picflag.
50818  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50819      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50820  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50821      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50822
50823  # Executable flags
50824  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50825  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50826
50827
50828
50829
50830
50831
50832  # Setup LDFLAGS et al.
50833  #
50834
50835  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50836    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50837    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50838    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50839    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50840      LDFLAGS_SAFESH="-safeseh"
50841      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50842      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50843      # NOTE: Old build added -machine. Probably not needed.
50844      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50845    else
50846      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50847    fi
50848  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50849      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50850      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50851        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50852        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50853    fi
50854  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50855    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50856    # We have previously set HAS_GNU_HASH if this is the case
50857    if test -n "$HAS_GNU_HASH"; then
50858      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50859      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50860      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50861    fi
50862      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50863        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50864    fi
50865    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50866      # And since we now know that the linker is gnu, then add -z defs, to forbid
50867      # undefined symbols in object files.
50868      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50869      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50870      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50871      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50872      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50873      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50874        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50875      fi
50876      case $DEBUG_LEVEL in
50877        release )
50878          # tell linker to optimize libraries.
50879          # Should this be supplied to the OSS linker as well?
50880          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50881          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50882          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50883          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50884            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50885          fi
50886          ;;
50887        slowdebug )
50888          # Hotspot always let the linker optimize
50889          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50890          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50891            # do relocations at load
50892            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50893            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50894            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50895          fi
50896          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50897            # mark relocations read only
50898            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50899            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50900            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50901          fi
50902          ;;
50903        fastdebug )
50904          # Hotspot always let the linker optimize
50905          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50906          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50907            # mark relocations read only
50908            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50909            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50910            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50911          fi
50912          ;;
50913        * )
50914          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50915          ;;
50916        esac
50917    fi
50918  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50919    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50920    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
50921    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50922    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50923    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50924    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50925      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50926    fi
50927  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50928    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50929    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50930    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50931  fi
50932
50933  # Customize LDFLAGS for executables
50934
50935  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50936
50937  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50938    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50939      LDFLAGS_STACK_SIZE=1048576
50940    else
50941      LDFLAGS_STACK_SIZE=327680
50942    fi
50943    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50944  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50945    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50946  fi
50947
50948  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50949
50950  # Customize LDFLAGS for libs
50951  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50952
50953  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50954  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50955    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50956        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50957    JDKLIB_LIBS=""
50958  else
50959    JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50960        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
50961
50962    if test "xTARGET" = "xTARGET"; then
50963      # On some platforms (mac) the linker warns about non existing -L dirs.
50964      # For any of the variants server, client or minimal, the dir matches the
50965      # variant name. The "main" variant should be used for linking. For the
50966      # rest, the dir is just server.
50967      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
50968          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50969        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50970            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
50971      else
50972        JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50973            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50974      fi
50975    elif test "xTARGET" = "xBUILD"; then
50976      # When building a buildjdk, it's always only the server variant
50977      JAVA_BASE_LDFLAGS="${JAVA_BASE_LDFLAGS} \
50978          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
50979    fi
50980
50981    JDKLIB_LIBS="-ljava -ljvm"
50982    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50983      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50984    fi
50985
50986  fi
50987
50988LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${JAVA_BASE_LDFLAGS}"
50989
50990  # Set JVM_LIBS (per os)
50991  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50992    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50993  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50994    # FIXME: This hard-coded path is not really proper.
50995    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50996      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50997    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50998      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50999    fi
51000    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51001        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51002  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51003    JVM_LIBS="$JVM_LIBS -lm"
51004  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51005    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51006  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51007    JVM_LIBS="$JVM_LIBS -lm"
51008  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51009    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51010        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51011        wsock32.lib winmm.lib version.lib psapi.lib"
51012    fi
51013
51014  # Set JVM_ASFLAGS
51015  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51016    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51017      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51018    fi
51019  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51020    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51021  fi
51022
51023  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039  # Special extras...
51040  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51041    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51042      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51043      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51044    fi
51045    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51046    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51047  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51048    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51049    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51050  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51051    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
51081
51082
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094    # Execute function body
51095
51096  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51097$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51098  supports=yes
51099
51100  saved_cxxflags="$CXXFLAGS"
51101  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51102  ac_ext=cpp
51103ac_cpp='$CXXCPP $CPPFLAGS'
51104ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51105ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51106ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51107
51108  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51109/* end confdefs.h.  */
51110int i;
51111_ACEOF
51112if ac_fn_cxx_try_compile "$LINENO"; then :
51113
51114else
51115  supports=no
51116fi
51117rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51118  ac_ext=cpp
51119ac_cpp='$CXXCPP $CPPFLAGS'
51120ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51121ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51122ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51123
51124  CXXFLAGS="$saved_cxxflags"
51125
51126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51127$as_echo "$supports" >&6; }
51128  if test "x$supports" = "xyes" ; then
51129    :
51130
51131  else
51132    :
51133    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51134  fi
51135
51136
51137
51138
51139
51140
51141
51142
51143
51144
51145
51146
51147    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51148    OPENJDK_BUILD_JVM_CFLAGS="${OPENJDK_BUILD_JVM_CFLAGS} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51149
51150  fi
51151  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51152    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51153    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51154  fi
51155
51156  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51157  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51158  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51159
51160  ###############################################################################
51161  #
51162  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51163  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51164  #
51165
51166  # Setup compiler/platform specific flags into
51167  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51168  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51169  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51170  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51171    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51172    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51173    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51174    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51175      # Force compatibility with i586 on 32 bit intel platforms.
51176      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51177      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51178    fi
51179    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51180        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51181    case $OPENJDK_BUILD_CPU_ARCH in
51182      arm )
51183        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51184        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51185        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="${OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK} -fsigned-char"
51186        ;;
51187      ppc )
51188        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51189        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51190        ;;
51191      s390 )
51192        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer -mbackchain -march=z10"
51193        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51194        ;;
51195      * )
51196        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51197        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51198        ;;
51199    esac
51200
51201
51202
51203
51204
51205
51206
51207
51208
51209
51210
51211
51212
51213
51214
51215
51216
51217
51218
51219
51220
51221
51222
51223
51224
51225
51226
51227
51228
51229
51230
51231
51232
51233
51234
51235
51236
51237
51238
51239
51240
51241
51242
51243
51244
51245
51246
51247
51248
51249
51250
51251
51252
51253
51254    # Execute function body
51255
51256  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51257  REFERENCE_VERSION=6
51258
51259  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51260    as_fn_error $? "Internal error: Cannot compare to 6, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51261  fi
51262
51263  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51264    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51265  fi
51266
51267  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51268  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51269
51270  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51271    :
51272
51273  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
51274  # runs afoul of the more aggressive versions of these optimisations.
51275  # Notably, value range propagation now assumes that the this pointer of C++
51276  # member functions is non-null.
51277  NO_DELETE_NULL_POINTER_CHECKS_CFLAG="-fno-delete-null-pointer-checks"
51278        NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
51279        { $as_echo "$as_me:${as_lineno-$LINENO}: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&5
51280$as_echo "$as_me: GCC >= 6 detected; adding ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} and ${NO_LIFETIME_DSE_CFLAG}" >&6;}
51281  OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51282  OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS ${NO_DELETE_NULL_POINTER_CHECKS_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
51283
51284  else
51285    :
51286
51287  fi
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298
51299
51300
51301
51302  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51303    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51304
51305    # Restrict the debug information created by Clang to avoid
51306    # too big object files and speed the build up a little bit
51307    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51308    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51309    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51310      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51311        # Force compatibility with i586 on 32 bit intel platforms.
51312        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51313        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51314      fi
51315      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51316      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51317          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51318      case $OPENJDK_BUILD_CPU_ARCH in
51319        ppc )
51320          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51321          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51322          ;;
51323        * )
51324          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51325          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51326          ;;
51327      esac
51328    fi
51329  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51330    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51331    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51332    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51333      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51334    fi
51335
51336    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51337    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51338  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51339    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51340    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51341    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51342  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51343    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51344        -MD -Zc:wchar_t- -W3 -wd4800 \
51345        -DWIN32_LEAN_AND_MEAN \
51346        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51347        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51348        -DWIN32 -DIAL"
51349    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51350      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51351    else
51352      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51353    fi
51354    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51355    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51356    # studio.
51357    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51358      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51359      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51360      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51361    fi
51362  fi
51363
51364  ###############################################################################
51365
51366  # Adjust flags according to debug level.
51367  case $DEBUG_LEVEL in
51368    fastdebug | slowdebug )
51369      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51370      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51371      ;;
51372    release )
51373      ;;
51374    * )
51375      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51376      ;;
51377  esac
51378
51379  # Set some common defines. These works for all compilers, but assume
51380  # -D is universally accepted.
51381
51382  # Setup endianness
51383  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51384    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51385    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51386    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51387    #   Note: -Dmacro         is the same as    #define macro 1
51388    #         -Dmacro=        is the same as    #define macro
51389    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51390      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51391    else
51392      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51393    fi
51394  else
51395    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51396    # are defined in the system?
51397    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51398      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51399    else
51400      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51401    fi
51402  fi
51403
51404  # Setup target OS define. Use OS target name but in upper case.
51405  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51406  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51407
51408  # Setup target CPU
51409  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51410      $OPENJDK_BUILD_ADD_LP64 \
51411      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51412
51413  # Setup debug/release defines
51414  if test "x$DEBUG_LEVEL" = xrelease; then
51415    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51416    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51417      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51418    fi
51419  else
51420    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51421  fi
51422
51423  # Set some additional per-OS defines.
51424  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51425    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51426    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe $PICFLAG -fno-rtti -fno-exceptions \
51427        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51428  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51429    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51430    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51431        -D_Crun_inline_placement -library=%none $PICFLAG -mt -features=no%except"
51432  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51433    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51434    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51435    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51436    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51437        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51438        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51439        -fno-omit-frame-pointer"
51440  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51441    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51442    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51443    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51444        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51445        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51446  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51447    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51448  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51449    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51450    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51451  fi
51452
51453  # Set some additional per-CPU defines.
51454  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51455    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51456  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51457    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51458  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51459    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51460      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51461      # fixes `relocation truncated to fit' error for gcc 4.1.
51462      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51463      # Use ppc64 instructions, but schedule for power5
51464      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51465    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51466      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51467    fi
51468  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51469    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51470      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51471      # Little endian machine uses ELFv2 ABI.
51472      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51473      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51474      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power8 -mtune=power8"
51475    fi
51476  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
51477    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51478      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mbackchain -march=z10"
51479    fi
51480  fi
51481
51482  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51483    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51484  fi
51485
51486  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51487    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51488      # Solaris does not have _LP64=1 in the old build.
51489      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51490      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51491    fi
51492  fi
51493
51494  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51495  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51496    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51497        -Wunused-value -Woverloaded-virtual"
51498
51499    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554    # Execute function body
51555
51556  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51557  REFERENCE_VERSION=4.8
51558
51559  if  [[ "$REFERENCE_VERSION" =~ (.*\.){4} ]] ; then
51560    as_fn_error $? "Internal error: Cannot compare to 4.8, only four parts (W.X.Y.Z) is supported" "$LINENO" 5
51561  fi
51562
51563  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51564    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51565  fi
51566
51567  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51568  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d%05d\n", $1, $2, $3, $4) }' <<< "$REFERENCE_VERSION"`
51569
51570  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51571    :
51572
51573            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51574            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51575
51576
51577  else
51578    :
51579
51580  fi
51581
51582
51583
51584
51585
51586
51587
51588
51589
51590
51591
51592
51593
51594
51595    fi
51596    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51597      # Non-zero builds have stricter warnings
51598      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51599    else
51600      if test "x$TOOLCHAIN_TYPE" = xclang; then
51601        # Some versions of llvm do not like -Wundef
51602        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51603      fi
51604    fi
51605  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51606    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51607        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51608  fi
51609
51610  # Additional macosx handling
51611  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51612    # Setting these parameters makes it an error to link to macosx APIs that are
51613    # newer than the given OS version and makes the linked binaries compatible
51614    # even if built on a newer version of the OS.
51615    # The expected format is X.Y.Z
51616    MACOSX_VERSION_MIN=10.7.0
51617
51618
51619    # The macro takes the version with no dots, ex: 1070
51620    # Let the flags variables get resolved in make for easier override on make
51621    # command line.
51622    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)"
51623    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51624  fi
51625
51626  # Setup some hard coded includes
51627  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51628      -I\$(SUPPORT_OUTPUTDIR)/modules_include/java.base \
51629      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51630      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51631      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51632      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51633      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51634
51635  # The shared libraries are compiled using the picflag.
51636  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51637      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51638  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51639      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51640
51641  # Executable flags
51642  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51643  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51644
51645
51646
51647
51648
51649
51650  # Setup LDFLAGS et al.
51651  #
51652
51653  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51654    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51655    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51656    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51657    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51658      LDFLAGS_SAFESH="-safeseh"
51659      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51660      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51661      # NOTE: Old build added -machine. Probably not needed.
51662      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51663    else
51664      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51665    fi
51666  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51667      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51668      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51669        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51670        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51671    fi
51672  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51673    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51674    # We have previously set HAS_GNU_HASH if this is the case
51675    if test -n "$HAS_GNU_HASH"; then
51676      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51677      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51678      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51679    fi
51680      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51681        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51682    fi
51683    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51684      # And since we now know that the linker is gnu, then add -z defs, to forbid
51685      # undefined symbols in object files.
51686      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51687      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51688      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51689      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51690      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51691      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51692        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51693      fi
51694      case $DEBUG_LEVEL in
51695        release )
51696          # tell linker to optimize libraries.
51697          # Should this be supplied to the OSS linker as well?
51698          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51699          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51700          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51701          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51702            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51703          fi
51704          ;;
51705        slowdebug )
51706          # Hotspot always let the linker optimize
51707          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51708          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51709            # do relocations at load
51710            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51711            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51712            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51713          fi
51714          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51715            # mark relocations read only
51716            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51717            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51718            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51719          fi
51720          ;;
51721        fastdebug )
51722          # Hotspot always let the linker optimize
51723          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51724          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51725            # mark relocations read only
51726            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51727            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51728            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51729          fi
51730          ;;
51731        * )
51732          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51733          ;;
51734        esac
51735    fi
51736  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51737    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51738    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -ztext"
51739    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51740    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51741    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51742    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51743      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51744    fi
51745  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51746    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51747    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51748    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51749  fi
51750
51751  # Customize LDFLAGS for executables
51752
51753  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51754
51755  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51756    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51757      LDFLAGS_STACK_SIZE=1048576
51758    else
51759      LDFLAGS_STACK_SIZE=327680
51760    fi
51761    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51762  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51763    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51764  fi
51765
51766  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51767
51768  # Customize LDFLAGS for libs
51769  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51770
51771  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51772  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51773    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51774        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51775    OPENJDK_BUILD_JDKLIB_LIBS=""
51776  else
51777    OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51778        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base"
51779
51780    if test "xBUILD" = "xTARGET"; then
51781      # On some platforms (mac) the linker warns about non existing -L dirs.
51782      # For any of the variants server, client or minimal, the dir matches the
51783      # variant name. The "main" variant should be used for linking. For the
51784      # rest, the dir is just server.
51785      if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]   \
51786          ||   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51787        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51788            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/$JVM_VARIANT_MAIN"
51789      else
51790        OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51791            -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51792      fi
51793    elif test "xBUILD" = "xBUILD"; then
51794      # When building a buildjdk, it's always only the server variant
51795      OPENJDK_BUILD_JAVA_BASE_LDFLAGS="${OPENJDK_BUILD_JAVA_BASE_LDFLAGS} \
51796          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base/server"
51797    fi
51798
51799    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51800    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51801      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51802    fi
51803
51804  fi
51805
51806OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_JAVA_BASE_LDFLAGS}"
51807
51808  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51809  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51810    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51811  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51812    # FIXME: This hard-coded path is not really proper.
51813    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51814      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51815    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51816      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51817    fi
51818    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51819        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51820  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51821    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51822  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51823    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51824  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51825    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51826  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51827    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51828        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51829        wsock32.lib winmm.lib version.lib psapi.lib"
51830    fi
51831
51832  # Set OPENJDK_BUILD_JVM_ASFLAGS
51833  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51834    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51835      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51836    fi
51837  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51838    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51839  fi
51840
51841  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853
51854
51855
51856
51857  # Tests are only ever compiled for TARGET
51858  # Flags for compiling test libraries
51859  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51860  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51861
51862  # Flags for compiling test executables
51863  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51864  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51865
51866
51867
51868
51869
51870
51871  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51872  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE $JAVA_BASE_LDFLAGS"
51873
51874
51875
51876
51877
51878
51879  # Check that the compiler supports -mX (or -qX on AIX) flags
51880  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51881
51882
51883
51884
51885
51886
51887
51888
51889
51890
51891
51892
51893
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907
51908
51909
51910
51911
51912
51913
51914
51915
51916
51917
51918
51919
51920
51921
51922
51923
51924
51925
51926
51927
51928    # Execute function body
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970
51971
51972
51973
51974
51975
51976
51977    # Execute function body
51978
51979  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51980$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51981  supports=yes
51982
51983  saved_cflags="$CFLAGS"
51984  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51985  ac_ext=c
51986ac_cpp='$CPP $CPPFLAGS'
51987ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51988ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51989ac_compiler_gnu=$ac_cv_c_compiler_gnu
51990
51991  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51992/* end confdefs.h.  */
51993int i;
51994_ACEOF
51995if ac_fn_c_try_compile "$LINENO"; then :
51996
51997else
51998  supports=no
51999fi
52000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52001  ac_ext=cpp
52002ac_cpp='$CXXCPP $CPPFLAGS'
52003ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52004ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52005ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52006
52007  CFLAGS="$saved_cflags"
52008
52009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52010$as_echo "$supports" >&6; }
52011  if test "x$supports" = "xyes" ; then
52012    :
52013    C_COMP_SUPPORTS="yes"
52014  else
52015    :
52016    C_COMP_SUPPORTS="no"
52017  fi
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070
52071
52072
52073
52074
52075
52076
52077    # Execute function body
52078
52079  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52080$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52081  supports=yes
52082
52083  saved_cxxflags="$CXXFLAGS"
52084  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52085  ac_ext=cpp
52086ac_cpp='$CXXCPP $CPPFLAGS'
52087ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52088ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52089ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52090
52091  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52092/* end confdefs.h.  */
52093int i;
52094_ACEOF
52095if ac_fn_cxx_try_compile "$LINENO"; then :
52096
52097else
52098  supports=no
52099fi
52100rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52101  ac_ext=cpp
52102ac_cpp='$CXXCPP $CPPFLAGS'
52103ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52104ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52105ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52106
52107  CXXFLAGS="$saved_cxxflags"
52108
52109  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52110$as_echo "$supports" >&6; }
52111  if test "x$supports" = "xyes" ; then
52112    :
52113    CXX_COMP_SUPPORTS="yes"
52114  else
52115    :
52116    CXX_COMP_SUPPORTS="no"
52117  fi
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52132$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52133  supports=no
52134  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52135
52136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52137$as_echo "$supports" >&6; }
52138  if test "x$supports" = "xyes" ; then
52139    :
52140    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52141  else
52142    :
52143    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52144  fi
52145
52146
52147
52148
52149
52150
52151
52152
52153  # Check whether --enable-warnings-as-errors was given.
52154if test "${enable_warnings_as_errors+set}" = set; then :
52155  enableval=$enable_warnings_as_errors;
52156fi
52157
52158
52159  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52160$as_echo_n "checking if native warnings are errors... " >&6; }
52161  if test "x$enable_warnings_as_errors" = "xyes"; then
52162    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitly set)" >&5
52163$as_echo "yes (explicitly set)" >&6; }
52164    WARNINGS_AS_ERRORS=true
52165  elif test "x$enable_warnings_as_errors" = "xno"; then
52166    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52167$as_echo "no" >&6; }
52168    WARNINGS_AS_ERRORS=false
52169  elif test "x$enable_warnings_as_errors" = "x"; then
52170    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52171$as_echo "yes (default)" >&6; }
52172    WARNINGS_AS_ERRORS=true
52173  else
52174    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52175  fi
52176
52177
52178
52179  case "${TOOLCHAIN_TYPE}" in
52180    microsoft)
52181      DISABLE_WARNING_PREFIX="-wd"
52182      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52183      ;;
52184    solstudio)
52185      DISABLE_WARNING_PREFIX="-erroff="
52186      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52187      ;;
52188    gcc)
52189      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52190
52191
52192
52193
52194
52195
52196
52197
52198
52199
52200
52201
52202
52203
52204
52205
52206
52207
52208
52209
52210
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224
52225
52226
52227
52228
52229
52230
52231
52232
52233
52234
52235
52236
52237    # Execute function body
52238
52239
52240
52241
52242
52243
52244
52245
52246
52247
52248
52249
52250
52251
52252
52253
52254
52255
52256
52257
52258
52259
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286    # Execute function body
52287
52288  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52289$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52290  supports=yes
52291
52292  saved_cflags="$CFLAGS"
52293  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52294  ac_ext=c
52295ac_cpp='$CPP $CPPFLAGS'
52296ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52297ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52298ac_compiler_gnu=$ac_cv_c_compiler_gnu
52299
52300  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52301/* end confdefs.h.  */
52302int i;
52303_ACEOF
52304if ac_fn_c_try_compile "$LINENO"; then :
52305
52306else
52307  supports=no
52308fi
52309rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52310  ac_ext=cpp
52311ac_cpp='$CXXCPP $CPPFLAGS'
52312ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52313ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52314ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52315
52316  CFLAGS="$saved_cflags"
52317
52318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52319$as_echo "$supports" >&6; }
52320  if test "x$supports" = "xyes" ; then
52321    :
52322    C_COMP_SUPPORTS="yes"
52323  else
52324    :
52325    C_COMP_SUPPORTS="no"
52326  fi
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356
52357
52358
52359
52360
52361
52362
52363
52364
52365
52366
52367
52368
52369
52370
52371
52372
52373
52374
52375
52376
52377
52378
52379
52380
52381
52382
52383
52384
52385
52386    # Execute function body
52387
52388  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52389$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52390  supports=yes
52391
52392  saved_cxxflags="$CXXFLAGS"
52393  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52394  ac_ext=cpp
52395ac_cpp='$CXXCPP $CPPFLAGS'
52396ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52397ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52398ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52399
52400  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52401/* end confdefs.h.  */
52402int i;
52403_ACEOF
52404if ac_fn_cxx_try_compile "$LINENO"; then :
52405
52406else
52407  supports=no
52408fi
52409rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52410  ac_ext=cpp
52411ac_cpp='$CXXCPP $CPPFLAGS'
52412ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52413ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52414ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52415
52416  CXXFLAGS="$saved_cxxflags"
52417
52418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52419$as_echo "$supports" >&6; }
52420  if test "x$supports" = "xyes" ; then
52421    :
52422    CXX_COMP_SUPPORTS="yes"
52423  else
52424    :
52425    CXX_COMP_SUPPORTS="no"
52426  fi
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52441$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52442  supports=no
52443  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52444
52445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52446$as_echo "$supports" >&6; }
52447  if test "x$supports" = "xyes" ; then
52448    :
52449    GCC_CAN_DISABLE_WARNINGS=true
52450  else
52451    :
52452    GCC_CAN_DISABLE_WARNINGS=false
52453
52454  fi
52455
52456
52457
52458
52459
52460
52461      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52462        DISABLE_WARNING_PREFIX="-Wno-"
52463      else
52464        DISABLE_WARNING_PREFIX=
52465      fi
52466      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52467      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52468      # CFLAGS since any target specific flags will likely not work with the
52469      # build compiler
52470      CC_OLD="$CC"
52471      CXX_OLD="$CXX"
52472      CC="$BUILD_CC"
52473      CXX="$BUILD_CXX"
52474      CFLAGS_OLD="$CFLAGS"
52475      CFLAGS=""
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523    # Execute function body
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561
52562
52563
52564
52565
52566
52567
52568
52569
52570
52571
52572    # Execute function body
52573
52574  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52575$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52576  supports=yes
52577
52578  saved_cflags="$CFLAGS"
52579  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52580  ac_ext=c
52581ac_cpp='$CPP $CPPFLAGS'
52582ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52583ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52584ac_compiler_gnu=$ac_cv_c_compiler_gnu
52585
52586  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52587/* end confdefs.h.  */
52588int i;
52589_ACEOF
52590if ac_fn_c_try_compile "$LINENO"; then :
52591
52592else
52593  supports=no
52594fi
52595rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52596  ac_ext=cpp
52597ac_cpp='$CXXCPP $CPPFLAGS'
52598ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52599ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52600ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52601
52602  CFLAGS="$saved_cflags"
52603
52604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52605$as_echo "$supports" >&6; }
52606  if test "x$supports" = "xyes" ; then
52607    :
52608    C_COMP_SUPPORTS="yes"
52609  else
52610    :
52611    C_COMP_SUPPORTS="no"
52612  fi
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661
52662
52663
52664
52665
52666
52667
52668
52669
52670
52671
52672    # Execute function body
52673
52674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52675$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52676  supports=yes
52677
52678  saved_cxxflags="$CXXFLAGS"
52679  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52680  ac_ext=cpp
52681ac_cpp='$CXXCPP $CPPFLAGS'
52682ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52683ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52684ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52685
52686  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52687/* end confdefs.h.  */
52688int i;
52689_ACEOF
52690if ac_fn_cxx_try_compile "$LINENO"; then :
52691
52692else
52693  supports=no
52694fi
52695rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52696  ac_ext=cpp
52697ac_cpp='$CXXCPP $CPPFLAGS'
52698ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52699ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52700ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52701
52702  CXXFLAGS="$saved_cxxflags"
52703
52704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52705$as_echo "$supports" >&6; }
52706  if test "x$supports" = "xyes" ; then
52707    :
52708    CXX_COMP_SUPPORTS="yes"
52709  else
52710    :
52711    CXX_COMP_SUPPORTS="no"
52712  fi
52713
52714
52715
52716
52717
52718
52719
52720
52721
52722
52723
52724
52725
52726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52727$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52728  supports=no
52729  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52730
52731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52732$as_echo "$supports" >&6; }
52733  if test "x$supports" = "xyes" ; then
52734    :
52735    BUILD_CC_CAN_DISABLE_WARNINGS=true
52736  else
52737    :
52738    BUILD_CC_CAN_DISABLE_WARNINGS=false
52739
52740  fi
52741
52742
52743
52744
52745
52746
52747      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52748        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52749      else
52750        BUILD_CC_DISABLE_WARNING_PREFIX=
52751      fi
52752      CC="$CC_OLD"
52753      CXX="$CXX_OLD"
52754      CFLAGS="$CFLAGS_OLD"
52755      ;;
52756    clang)
52757      DISABLE_WARNING_PREFIX="-Wno-"
52758      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52759      ;;
52760    xlc)
52761      DISABLE_WARNING_PREFIX="-qsuppress="
52762      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52763      ;;
52764  esac
52765
52766
52767
52768
52769
52770# Setup debug symbols (need objcopy from the toolchain for that)
52771
52772  #
52773  # NATIVE_DEBUG_SYMBOLS
52774  # This must be done after the toolchain is setup, since we're looking at objcopy.
52775  #
52776  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52777$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52778
52779# Check whether --with-native-debug-symbols was given.
52780if test "${with_native_debug_symbols+set}" = set; then :
52781  withval=$with_native_debug_symbols;
52782        if test "x$OPENJDK_TARGET_OS" = xaix; then
52783          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52784            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52785          fi
52786        fi
52787
52788else
52789
52790        if test "x$OPENJDK_TARGET_OS" = xaix; then
52791          # AIX doesn't support 'zipped' so use 'internal' as default
52792          with_native_debug_symbols="internal"
52793        else
52794          if test "x$STATIC_BUILD" = xtrue; then
52795            with_native_debug_symbols="none"
52796          else
52797            with_native_debug_symbols="zipped"
52798          fi
52799        fi
52800
52801fi
52802
52803  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52805$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52806
52807  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52808
52809    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52810      if test "x$OBJCOPY" = x; then
52811        # enabling of enable-debug-symbols and can't find objcopy
52812        # this is an error
52813        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52814      fi
52815    fi
52816
52817    COMPILE_WITH_DEBUG_SYMBOLS=true
52818    COPY_DEBUG_SYMBOLS=true
52819    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52820  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52821    COMPILE_WITH_DEBUG_SYMBOLS=false
52822    COPY_DEBUG_SYMBOLS=false
52823    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52824  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52825    COMPILE_WITH_DEBUG_SYMBOLS=true
52826    COPY_DEBUG_SYMBOLS=false
52827    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52828  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52829
52830    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52831      if test "x$OBJCOPY" = x; then
52832        # enabling of enable-debug-symbols and can't find objcopy
52833        # this is an error
52834        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52835      fi
52836    fi
52837
52838    COMPILE_WITH_DEBUG_SYMBOLS=true
52839    COPY_DEBUG_SYMBOLS=true
52840    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52841  else
52842    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52843  fi
52844
52845  # --enable-debug-symbols is deprecated.
52846  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52847
52848  # Check whether --enable-debug-symbols was given.
52849if test "${enable_debug_symbols+set}" = set; then :
52850  enableval=$enable_debug_symbols;
52851fi
52852
52853  if test "x$enable_debug_symbols" != x; then
52854    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52855$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52856
52857    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52858      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52859$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52860    fi
52861
52862  fi
52863
52864
52865  # --enable-zip-debug-info is deprecated.
52866  # Please use --with-native-debug-symbols=zipped .
52867
52868  # Check whether --enable-zip-debug-info was given.
52869if test "${enable_zip_debug_info+set}" = set; then :
52870  enableval=$enable_zip_debug_info;
52871fi
52872
52873  if test "x$enable_zip_debug_info" != x; then
52874    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52875$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52876
52877    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52878      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52879$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52880    fi
52881
52882  fi
52883
52884
52885
52886
52887
52888
52889
52890  # Check whether --enable-native-coverage was given.
52891if test "${enable_native_coverage+set}" = set; then :
52892  enableval=$enable_native_coverage;
52893fi
52894
52895  GCOV_ENABLED="false"
52896  if test "x$enable_native_coverage" = "xyes"; then
52897    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52898      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52899$as_echo_n "checking if native coverage is enabled... " >&6; }
52900      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52901$as_echo "yes" >&6; }
52902      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52903      GCOV_LDFLAGS="-fprofile-arcs"
52904      JVM_CFLAGS="$JVM_CFLAGS $GCOV_CFLAGS"
52905      JVM_LDFLAGS="$JVM_LDFLAGS $GCOV_LDFLAGS"
52906      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52907      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52908      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52909      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52910      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52911      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52912      GCOV_ENABLED="true"
52913    else
52914      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52915    fi
52916  elif test "x$enable_native_coverage" = "xno"; then
52917    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52918$as_echo_n "checking if native coverage is enabled... " >&6; }
52919    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52920$as_echo "no" >&6; }
52921  elif test "x$enable_native_coverage" != "x"; then
52922    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52923  fi
52924
52925
52926
52927
52928# Need toolchain to setup dtrace
52929
52930  # Test for dtrace dependencies
52931  # Check whether --enable-dtrace was given.
52932if test "${enable_dtrace+set}" = set; then :
52933  enableval=$enable_dtrace;
52934fi
52935
52936
52937  DTRACE_DEP_MISSING=false
52938
52939  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52940$as_echo_n "checking for dtrace tool... " >&6; }
52941  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52943$as_echo "$DTRACE" >&6; }
52944  else
52945    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52946$as_echo "not found, cannot build dtrace" >&6; }
52947    DTRACE_DEP_MISSING=true
52948  fi
52949
52950  for ac_header in sys/sdt.h
52951do :
52952  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52953if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52954  cat >>confdefs.h <<_ACEOF
52955#define HAVE_SYS_SDT_H 1
52956_ACEOF
52957 DTRACE_HEADERS_OK=yes
52958else
52959  DTRACE_HEADERS_OK=no
52960fi
52961
52962done
52963
52964  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52965    DTRACE_DEP_MISSING=true
52966  fi
52967
52968  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52969$as_echo_n "checking if dtrace should be built... " >&6; }
52970  if test "x$enable_dtrace" = "xyes"; then
52971    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52972      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52973$as_echo "no, missing dependencies" >&6; }
52974
52975  # Print a helpful message on how to acquire the necessary build dependency.
52976  # dtrace is the help tag: freetype, cups, alsa etc
52977  MISSING_DEPENDENCY=dtrace
52978
52979  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52980    cygwin_help $MISSING_DEPENDENCY
52981  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52982    msys_help $MISSING_DEPENDENCY
52983  else
52984    PKGHANDLER_COMMAND=
52985
52986    case $PKGHANDLER in
52987      apt-get)
52988        apt_help     $MISSING_DEPENDENCY ;;
52989      yum)
52990        yum_help     $MISSING_DEPENDENCY ;;
52991      brew)
52992        brew_help    $MISSING_DEPENDENCY ;;
52993      port)
52994        port_help    $MISSING_DEPENDENCY ;;
52995      pkgutil)
52996        pkgutil_help $MISSING_DEPENDENCY ;;
52997      pkgadd)
52998        pkgadd_help  $MISSING_DEPENDENCY ;;
52999    esac
53000
53001    if test "x$PKGHANDLER_COMMAND" != x; then
53002      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53003    fi
53004  fi
53005
53006      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53007    else
53008      INCLUDE_DTRACE=true
53009      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53010$as_echo "yes, forced" >&6; }
53011    fi
53012  elif test "x$enable_dtrace" = "xno"; then
53013    INCLUDE_DTRACE=false
53014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53015$as_echo "no, forced" >&6; }
53016  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53017    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53018      INCLUDE_DTRACE=false
53019      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53020$as_echo "no, missing dependencies" >&6; }
53021    else
53022      INCLUDE_DTRACE=true
53023      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53024$as_echo "yes, dependencies present" >&6; }
53025    fi
53026  else
53027    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53028  fi
53029
53030
53031  # Check whether --enable-aot was given.
53032if test "${enable_aot+set}" = set; then :
53033  enableval=$enable_aot;
53034fi
53035
53036
53037  if test "x$enable_aot" = "x" || test "x$enable_aot" = "xauto"; then
53038    ENABLE_AOT="true"
53039  elif test "x$enable_aot" = "xyes"; then
53040    ENABLE_AOT="true"
53041  elif test "x$enable_aot" = "xno"; then
53042    ENABLE_AOT="false"
53043    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
53044$as_echo_n "checking if aot should be enabled... " >&6; }
53045    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53046$as_echo "no, forced" >&6; }
53047  else
53048    as_fn_error $? "Invalid value for --enable-aot: $enable_aot" "$LINENO" 5
53049  fi
53050
53051  if test "x$ENABLE_AOT" = "xtrue"; then
53052    # Only enable AOT on X64 platforms.
53053    if test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
53054      if test -e "$HOTSPOT_TOPDIR/src/jdk.aot"; then
53055        if test -e "$HOTSPOT_TOPDIR/src/jdk.internal.vm.compiler"; then
53056          ENABLE_AOT="true"
53057        else
53058          ENABLE_AOT="false"
53059          if test "x$enable_aot" = "xyes"; then
53060            as_fn_error $? "Cannot build AOT without hotspot/src/jdk.internal.vm.compiler sources. Remove --enable-aot." "$LINENO" 5
53061          fi
53062        fi
53063      else
53064        ENABLE_AOT="false"
53065        if test "x$enable_aot" = "xyes"; then
53066          as_fn_error $? "Cannot build AOT without hotspot/src/jdk.aot sources. Remove --enable-aot." "$LINENO" 5
53067        fi
53068      fi
53069    else
53070      ENABLE_AOT="false"
53071      if test "x$enable_aot" = "xyes"; then
53072        as_fn_error $? "AOT is currently only supported on Linux-x86_64. Remove --enable-aot." "$LINENO" 5
53073      fi
53074    fi
53075  fi
53076
53077
53078
53079
53080  # Check whether --enable-hotspot-gtest was given.
53081if test "${enable_hotspot_gtest+set}" = set; then :
53082  enableval=$enable_hotspot_gtest;
53083fi
53084
53085
53086  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53087    GTEST_DIR_EXISTS="true"
53088  else
53089    GTEST_DIR_EXISTS="false"
53090  fi
53091
53092  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53093$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53094  if test "x$enable_hotspot_gtest" = "xyes"; then
53095    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53096      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53097$as_echo "yes, forced" >&6; }
53098      BUILD_GTEST="true"
53099    else
53100      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53101    fi
53102  elif test "x$enable_hotspot_gtest" = "xno"; then
53103    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53104$as_echo "no, forced" >&6; }
53105    BUILD_GTEST="false"
53106  elif test "x$enable_hotspot_gtest" = "x"; then
53107    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53108      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53109$as_echo "yes" >&6; }
53110      BUILD_GTEST="true"
53111    else
53112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53113$as_echo "no" >&6; }
53114      BUILD_GTEST="false"
53115    fi
53116  else
53117    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53118  fi
53119
53120
53121
53122
53123###############################################################################
53124#
53125# Check dependencies for external and internal libraries.
53126#
53127###############################################################################
53128
53129# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53130
53131  # When using cygwin or msys, we need a wrapper binary that renames
53132  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53133  # @files and rewrites these too! This wrapper binary is
53134  # called fixpath.
53135  FIXPATH=
53136  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53137    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53138$as_echo_n "checking if fixpath can be created... " >&6; }
53139    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53140    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53141    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53142    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53143      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53144      FIXPATH="$FIXPATH_BIN -c"
53145    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53146      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53147      # @ was chosen as separator to minimize risk of other tools messing around with it
53148      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53149          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53150      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53151      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53152    fi
53153    FIXPATH_SRC_W="$FIXPATH_SRC"
53154    FIXPATH_BIN_W="$FIXPATH_BIN"
53155
53156  unix_path="$FIXPATH_SRC_W"
53157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53158    windows_path=`$CYGPATH -m "$unix_path"`
53159    FIXPATH_SRC_W="$windows_path"
53160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53161    windows_path=`cmd //c echo $unix_path`
53162    FIXPATH_SRC_W="$windows_path"
53163  fi
53164
53165
53166  unix_path="$FIXPATH_BIN_W"
53167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53168    windows_path=`$CYGPATH -m "$unix_path"`
53169    FIXPATH_BIN_W="$windows_path"
53170  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53171    windows_path=`cmd //c echo $unix_path`
53172    FIXPATH_BIN_W="$windows_path"
53173  fi
53174
53175    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53176    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53177    cd $FIXPATH_DIR
53178    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53179    cd $CURDIR
53180
53181    if test ! -x $FIXPATH_BIN; then
53182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53183$as_echo "no" >&6; }
53184      cat $FIXPATH_DIR/fixpath1.log
53185      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53186    fi
53187    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53188$as_echo "yes" >&6; }
53189    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53190$as_echo_n "checking if fixpath.exe works... " >&6; }
53191    cd $FIXPATH_DIR
53192    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53193        > $FIXPATH_DIR/fixpath2.log 2>&1
53194    cd $CURDIR
53195    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53196      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53197$as_echo "no" >&6; }
53198      cat $FIXPATH_DIR/fixpath2.log
53199      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53200    fi
53201    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53202$as_echo "yes" >&6; }
53203
53204    FIXPATH_DETACH_FLAG="--detach"
53205  fi
53206
53207
53208
53209
53210
53211
53212  # Check if X11 is needed
53213  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53214    # No X11 support on windows or macosx
53215    NEEDS_LIB_X11=false
53216  else
53217    # All other instances need X11, even if building headless only, libawt still
53218    # needs X11 headers.
53219    NEEDS_LIB_X11=true
53220  fi
53221
53222  # Check if cups is needed
53223  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53224    # Windows have a separate print system
53225    NEEDS_LIB_CUPS=false
53226  else
53227    NEEDS_LIB_CUPS=true
53228  fi
53229
53230  # A custom hook may have set this already
53231  if test "x$NEEDS_LIB_FREETYPE" = "x"; then
53232    NEEDS_LIB_FREETYPE=true
53233  fi
53234
53235  # Check if alsa is needed
53236  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53237    NEEDS_LIB_ALSA=true
53238  else
53239    NEEDS_LIB_ALSA=false
53240  fi
53241
53242  # Check if ffi is needed
53243  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53244    NEEDS_LIB_FFI=true
53245  else
53246    NEEDS_LIB_FFI=false
53247  fi
53248
53249
53250  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53251  # dynamic build is configured on command line.
53252
53253# Check whether --with-stdc++lib was given.
53254if test "${with_stdc__lib+set}" = set; then :
53255  withval=$with_stdc__lib;
53256        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53257                && test "x$with_stdc__lib" != xdefault; then
53258          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53259        fi
53260
53261else
53262  with_stdc__lib=default
53263
53264fi
53265
53266
53267  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53268    # Test if stdc++ can be linked statically.
53269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53270$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53271    STATIC_STDCXX_FLAGS="-static-libstdc++ -static-libgcc"
53272    ac_ext=cpp
53273ac_cpp='$CXXCPP $CPPFLAGS'
53274ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53275ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53276ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53277
53278    OLD_LIBS="$LIBS"
53279    LIBS="$STATIC_STDCXX_FLAGS"
53280    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53281/* end confdefs.h.  */
53282
53283int
53284main ()
53285{
53286return 0;
53287  ;
53288  return 0;
53289}
53290_ACEOF
53291if ac_fn_cxx_try_link "$LINENO"; then :
53292  has_static_libstdcxx=yes
53293else
53294  has_static_libstdcxx=no
53295fi
53296rm -f core conftest.err conftest.$ac_objext \
53297    conftest$ac_exeext conftest.$ac_ext
53298    LIBS="$OLD_LIBS"
53299    ac_ext=cpp
53300ac_cpp='$CXXCPP $CPPFLAGS'
53301ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53302ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53303ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53304
53305    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53306$as_echo "$has_static_libstdcxx" >&6; }
53307
53308    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53309      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53310    fi
53311
53312    # If dynamic was requested, it's available since it would fail above otherwise.
53313    # If dynamic wasn't requested, go with static unless it isn't available.
53314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53315$as_echo_n "checking how to link with libstdc++... " >&6; }
53316    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno \
53317        ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53318      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53319$as_echo "dynamic" >&6; }
53320    else
53321      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53322      JVM_LDFLAGS="$JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53323      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53324      # just use the same setting as for the TARGET toolchain.
53325      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $STATIC_STDCXX_FLAGS"
53326      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53327$as_echo "static" >&6; }
53328    fi
53329  fi
53330
53331  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53332  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53333    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53334  fi
53335
53336
53337
53338  # Setup Windows runtime dlls
53339  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53340
53341
53342# Check whether --with-msvcr-dll was given.
53343if test "${with_msvcr_dll+set}" = set; then :
53344  withval=$with_msvcr_dll;
53345fi
53346
53347
53348  if test "x$with_msvcr_dll" != x; then
53349    # If given explicitly by user, do not probe. If not present, fail directly.
53350
53351  DLL_NAME="$MSVCR_NAME"
53352  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53353  METHOD="--with-msvcr-dll"
53354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53357
53358    # Need to check if the found msvcr is correct architecture
53359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53366        CORRECT_MSVCR_ARCH="PE32 executable"
53367      else
53368        CORRECT_MSVCR_ARCH="PE32+ executable"
53369      fi
53370    else
53371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53372        CORRECT_MSVCR_ARCH=386
53373      else
53374        CORRECT_MSVCR_ARCH=x86-64
53375      fi
53376    fi
53377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53379$as_echo "ok" >&6; }
53380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53381
53382  # Only process if variable expands to non-empty
53383
53384  if test "x$MSVC_DLL" != x; then
53385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53386
53387  # Input might be given as Windows format, start by converting to
53388  # unix format.
53389  path="$MSVC_DLL"
53390  new_path=`$CYGPATH -u "$path"`
53391
53392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53395  # "foo.exe" is OK but "foo" is an error.
53396  #
53397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53398  # It is also a way to make sure we got the proper file name for the real test later on.
53399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53400  if test "x$test_shortpath" = x; then
53401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53403    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53404  fi
53405
53406  # Call helper function which possibly converts this using DOS-style short mode.
53407  # If so, the updated path is stored in $new_path.
53408
53409  input_path="$new_path"
53410  # Check if we need to convert this using DOS-style short mode. If the path
53411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53412  # take no chances and rewrite it.
53413  # Note: m4 eats our [], so we need to use [ and ] instead.
53414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53415  if test "x$has_forbidden_chars" != x; then
53416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53420      # Going to short mode and back again did indeed matter. Since short mode is
53421      # case insensitive, let's make it lowercase to improve readability.
53422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53423      # Now convert it back to Unix-style (cygpath)
53424      input_path=`$CYGPATH -u "$shortmode_path"`
53425      new_path="$input_path"
53426    fi
53427  fi
53428
53429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53430  if test "x$test_cygdrive_prefix" = x; then
53431    # As a simple fix, exclude /usr/bin since it's not a real path.
53432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53434      # a path prefixed by /cygdrive for fixpath to work.
53435      new_path="$CYGWIN_ROOT_PATH$input_path"
53436    fi
53437  fi
53438
53439
53440  if test "x$path" != "x$new_path"; then
53441    MSVC_DLL="$new_path"
53442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53444  fi
53445
53446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53447
53448  path="$MSVC_DLL"
53449  has_colon=`$ECHO $path | $GREP ^.:`
53450  new_path="$path"
53451  if test "x$has_colon" = x; then
53452    # Not in mixed or Windows style, start by that.
53453    new_path=`cmd //c echo $path`
53454  fi
53455
53456
53457  input_path="$new_path"
53458  # Check if we need to convert this using DOS-style short mode. If the path
53459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53460  # take no chances and rewrite it.
53461  # Note: m4 eats our [], so we need to use [ and ] instead.
53462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53463  if test "x$has_forbidden_chars" != x; then
53464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53466  fi
53467
53468
53469  windows_path="$new_path"
53470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53471    unix_path=`$CYGPATH -u "$windows_path"`
53472    new_path="$unix_path"
53473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53475    new_path="$unix_path"
53476  fi
53477
53478  if test "x$path" != "x$new_path"; then
53479    MSVC_DLL="$new_path"
53480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53482  fi
53483
53484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53486
53487    else
53488      # We're on a unix platform. Hooray! :)
53489      path="$MSVC_DLL"
53490      has_space=`$ECHO "$path" | $GREP " "`
53491      if test "x$has_space" != x; then
53492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53493$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53495      fi
53496
53497      # Use eval to expand a potential ~
53498      eval path="$path"
53499      if test ! -f "$path" && test ! -d "$path"; then
53500        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53501      fi
53502
53503      if test -d "$path"; then
53504        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53505      else
53506        dir="`$DIRNAME "$path"`"
53507        base="`$BASENAME "$path"`"
53508        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53509      fi
53510    fi
53511  fi
53512
53513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53514$as_echo_n "checking for $DLL_NAME... " >&6; }
53515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53516$as_echo "$MSVC_DLL" >&6; }
53517    else
53518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53519$as_echo "incorrect, ignoring" >&6; }
53520      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53521$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53522    fi
53523  fi
53524
53525    if test "x$MSVC_DLL" = x; then
53526      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53527    fi
53528    MSVCR_DLL="$MSVC_DLL"
53529  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53530
53531  DLL_NAME="$MSVCR_NAME"
53532  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53533  METHOD="devkit"
53534  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53535    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53536$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53537
53538    # Need to check if the found msvcr is correct architecture
53539    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53540$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53541    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53542    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53543      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53544      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53545      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53546        CORRECT_MSVCR_ARCH="PE32 executable"
53547      else
53548        CORRECT_MSVCR_ARCH="PE32+ executable"
53549      fi
53550    else
53551      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53552        CORRECT_MSVCR_ARCH=386
53553      else
53554        CORRECT_MSVCR_ARCH=x86-64
53555      fi
53556    fi
53557    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53559$as_echo "ok" >&6; }
53560      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53561
53562  # Only process if variable expands to non-empty
53563
53564  if test "x$MSVC_DLL" != x; then
53565    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53566
53567  # Input might be given as Windows format, start by converting to
53568  # unix format.
53569  path="$MSVC_DLL"
53570  new_path=`$CYGPATH -u "$path"`
53571
53572  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53573  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53574  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53575  # "foo.exe" is OK but "foo" is an error.
53576  #
53577  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53578  # It is also a way to make sure we got the proper file name for the real test later on.
53579  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53580  if test "x$test_shortpath" = x; then
53581    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53582$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53583    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53584  fi
53585
53586  # Call helper function which possibly converts this using DOS-style short mode.
53587  # If so, the updated path is stored in $new_path.
53588
53589  input_path="$new_path"
53590  # Check if we need to convert this using DOS-style short mode. If the path
53591  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53592  # take no chances and rewrite it.
53593  # Note: m4 eats our [], so we need to use [ and ] instead.
53594  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53595  if test "x$has_forbidden_chars" != x; then
53596    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53597    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53598    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53599    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53600      # Going to short mode and back again did indeed matter. Since short mode is
53601      # case insensitive, let's make it lowercase to improve readability.
53602      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53603      # Now convert it back to Unix-style (cygpath)
53604      input_path=`$CYGPATH -u "$shortmode_path"`
53605      new_path="$input_path"
53606    fi
53607  fi
53608
53609  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53610  if test "x$test_cygdrive_prefix" = x; then
53611    # As a simple fix, exclude /usr/bin since it's not a real path.
53612    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53613      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53614      # a path prefixed by /cygdrive for fixpath to work.
53615      new_path="$CYGWIN_ROOT_PATH$input_path"
53616    fi
53617  fi
53618
53619
53620  if test "x$path" != "x$new_path"; then
53621    MSVC_DLL="$new_path"
53622    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53623$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53624  fi
53625
53626    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53627
53628  path="$MSVC_DLL"
53629  has_colon=`$ECHO $path | $GREP ^.:`
53630  new_path="$path"
53631  if test "x$has_colon" = x; then
53632    # Not in mixed or Windows style, start by that.
53633    new_path=`cmd //c echo $path`
53634  fi
53635
53636
53637  input_path="$new_path"
53638  # Check if we need to convert this using DOS-style short mode. If the path
53639  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53640  # take no chances and rewrite it.
53641  # Note: m4 eats our [], so we need to use [ and ] instead.
53642  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53643  if test "x$has_forbidden_chars" != x; then
53644    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53645    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53646  fi
53647
53648
53649  windows_path="$new_path"
53650  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53651    unix_path=`$CYGPATH -u "$windows_path"`
53652    new_path="$unix_path"
53653  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53654    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53655    new_path="$unix_path"
53656  fi
53657
53658  if test "x$path" != "x$new_path"; then
53659    MSVC_DLL="$new_path"
53660    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53661$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53662  fi
53663
53664  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53665  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53666
53667    else
53668      # We're on a unix platform. Hooray! :)
53669      path="$MSVC_DLL"
53670      has_space=`$ECHO "$path" | $GREP " "`
53671      if test "x$has_space" != x; then
53672        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53673$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53674        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53675      fi
53676
53677      # Use eval to expand a potential ~
53678      eval path="$path"
53679      if test ! -f "$path" && test ! -d "$path"; then
53680        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53681      fi
53682
53683      if test -d "$path"; then
53684        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53685      else
53686        dir="`$DIRNAME "$path"`"
53687        base="`$BASENAME "$path"`"
53688        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53689      fi
53690    fi
53691  fi
53692
53693      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53694$as_echo_n "checking for $DLL_NAME... " >&6; }
53695      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53696$as_echo "$MSVC_DLL" >&6; }
53697    else
53698      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53699$as_echo "incorrect, ignoring" >&6; }
53700      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53701$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53702    fi
53703  fi
53704
53705    if test "x$MSVC_DLL" = x; then
53706      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53707    fi
53708    MSVCR_DLL="$MSVC_DLL"
53709  else
53710
53711  DLL_NAME="${MSVCR_NAME}"
53712  MSVC_DLL=
53713
53714  if test "x$MSVC_DLL" = x; then
53715    # Probe: Using well-known location from Visual Studio 10.0
53716    if test "x$VCINSTALLDIR" != x; then
53717      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53718
53719  windows_path="$CYGWIN_VC_INSTALL_DIR"
53720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53721    unix_path=`$CYGPATH -u "$windows_path"`
53722    CYGWIN_VC_INSTALL_DIR="$unix_path"
53723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53725    CYGWIN_VC_INSTALL_DIR="$unix_path"
53726  fi
53727
53728      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53729        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53730      else
53731        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53732      fi
53733      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53734
53735  DLL_NAME="$DLL_NAME"
53736  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53737  METHOD="well-known location in VCINSTALLDIR"
53738  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53739    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53740$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53741
53742    # Need to check if the found msvcr is correct architecture
53743    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53744$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53745    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53747      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53748      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53749      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53750        CORRECT_MSVCR_ARCH="PE32 executable"
53751      else
53752        CORRECT_MSVCR_ARCH="PE32+ executable"
53753      fi
53754    else
53755      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53756        CORRECT_MSVCR_ARCH=386
53757      else
53758        CORRECT_MSVCR_ARCH=x86-64
53759      fi
53760    fi
53761    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53762      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53763$as_echo "ok" >&6; }
53764      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53765
53766  # Only process if variable expands to non-empty
53767
53768  if test "x$MSVC_DLL" != x; then
53769    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53770
53771  # Input might be given as Windows format, start by converting to
53772  # unix format.
53773  path="$MSVC_DLL"
53774  new_path=`$CYGPATH -u "$path"`
53775
53776  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53777  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53778  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53779  # "foo.exe" is OK but "foo" is an error.
53780  #
53781  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53782  # It is also a way to make sure we got the proper file name for the real test later on.
53783  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53784  if test "x$test_shortpath" = x; then
53785    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53786$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53787    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53788  fi
53789
53790  # Call helper function which possibly converts this using DOS-style short mode.
53791  # If so, the updated path is stored in $new_path.
53792
53793  input_path="$new_path"
53794  # Check if we need to convert this using DOS-style short mode. If the path
53795  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53796  # take no chances and rewrite it.
53797  # Note: m4 eats our [], so we need to use [ and ] instead.
53798  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53799  if test "x$has_forbidden_chars" != x; then
53800    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53801    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53802    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53803    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53804      # Going to short mode and back again did indeed matter. Since short mode is
53805      # case insensitive, let's make it lowercase to improve readability.
53806      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53807      # Now convert it back to Unix-style (cygpath)
53808      input_path=`$CYGPATH -u "$shortmode_path"`
53809      new_path="$input_path"
53810    fi
53811  fi
53812
53813  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53814  if test "x$test_cygdrive_prefix" = x; then
53815    # As a simple fix, exclude /usr/bin since it's not a real path.
53816    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53817      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53818      # a path prefixed by /cygdrive for fixpath to work.
53819      new_path="$CYGWIN_ROOT_PATH$input_path"
53820    fi
53821  fi
53822
53823
53824  if test "x$path" != "x$new_path"; then
53825    MSVC_DLL="$new_path"
53826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53827$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53828  fi
53829
53830    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53831
53832  path="$MSVC_DLL"
53833  has_colon=`$ECHO $path | $GREP ^.:`
53834  new_path="$path"
53835  if test "x$has_colon" = x; then
53836    # Not in mixed or Windows style, start by that.
53837    new_path=`cmd //c echo $path`
53838  fi
53839
53840
53841  input_path="$new_path"
53842  # Check if we need to convert this using DOS-style short mode. If the path
53843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53844  # take no chances and rewrite it.
53845  # Note: m4 eats our [], so we need to use [ and ] instead.
53846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53847  if test "x$has_forbidden_chars" != x; then
53848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53849    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53850  fi
53851
53852
53853  windows_path="$new_path"
53854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53855    unix_path=`$CYGPATH -u "$windows_path"`
53856    new_path="$unix_path"
53857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53859    new_path="$unix_path"
53860  fi
53861
53862  if test "x$path" != "x$new_path"; then
53863    MSVC_DLL="$new_path"
53864    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53865$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53866  fi
53867
53868  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53869  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53870
53871    else
53872      # We're on a unix platform. Hooray! :)
53873      path="$MSVC_DLL"
53874      has_space=`$ECHO "$path" | $GREP " "`
53875      if test "x$has_space" != x; then
53876        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53877$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53878        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53879      fi
53880
53881      # Use eval to expand a potential ~
53882      eval path="$path"
53883      if test ! -f "$path" && test ! -d "$path"; then
53884        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53885      fi
53886
53887      if test -d "$path"; then
53888        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53889      else
53890        dir="`$DIRNAME "$path"`"
53891        base="`$BASENAME "$path"`"
53892        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53893      fi
53894    fi
53895  fi
53896
53897      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53898$as_echo_n "checking for $DLL_NAME... " >&6; }
53899      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53900$as_echo "$MSVC_DLL" >&6; }
53901    else
53902      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53903$as_echo "incorrect, ignoring" >&6; }
53904      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53905$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53906    fi
53907  fi
53908
53909    fi
53910  fi
53911
53912  if test "x$MSVC_DLL" = x; then
53913    # Probe: Check in the Boot JDK directory.
53914    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53915
53916  DLL_NAME="$DLL_NAME"
53917  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53918  METHOD="well-known location in Boot JDK"
53919  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53920    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53921$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53922
53923    # Need to check if the found msvcr is correct architecture
53924    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53925$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53926    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53927    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53928      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53929      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53930      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53931        CORRECT_MSVCR_ARCH="PE32 executable"
53932      else
53933        CORRECT_MSVCR_ARCH="PE32+ executable"
53934      fi
53935    else
53936      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53937        CORRECT_MSVCR_ARCH=386
53938      else
53939        CORRECT_MSVCR_ARCH=x86-64
53940      fi
53941    fi
53942    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53944$as_echo "ok" >&6; }
53945      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53946
53947  # Only process if variable expands to non-empty
53948
53949  if test "x$MSVC_DLL" != x; then
53950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53951
53952  # Input might be given as Windows format, start by converting to
53953  # unix format.
53954  path="$MSVC_DLL"
53955  new_path=`$CYGPATH -u "$path"`
53956
53957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53960  # "foo.exe" is OK but "foo" is an error.
53961  #
53962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53963  # It is also a way to make sure we got the proper file name for the real test later on.
53964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53965  if test "x$test_shortpath" = x; then
53966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53967$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53968    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53969  fi
53970
53971  # Call helper function which possibly converts this using DOS-style short mode.
53972  # If so, the updated path is stored in $new_path.
53973
53974  input_path="$new_path"
53975  # Check if we need to convert this using DOS-style short mode. If the path
53976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53977  # take no chances and rewrite it.
53978  # Note: m4 eats our [], so we need to use [ and ] instead.
53979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53980  if test "x$has_forbidden_chars" != x; then
53981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53985      # Going to short mode and back again did indeed matter. Since short mode is
53986      # case insensitive, let's make it lowercase to improve readability.
53987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53988      # Now convert it back to Unix-style (cygpath)
53989      input_path=`$CYGPATH -u "$shortmode_path"`
53990      new_path="$input_path"
53991    fi
53992  fi
53993
53994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53995  if test "x$test_cygdrive_prefix" = x; then
53996    # As a simple fix, exclude /usr/bin since it's not a real path.
53997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53999      # a path prefixed by /cygdrive for fixpath to work.
54000      new_path="$CYGWIN_ROOT_PATH$input_path"
54001    fi
54002  fi
54003
54004
54005  if test "x$path" != "x$new_path"; then
54006    MSVC_DLL="$new_path"
54007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54008$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54009  fi
54010
54011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54012
54013  path="$MSVC_DLL"
54014  has_colon=`$ECHO $path | $GREP ^.:`
54015  new_path="$path"
54016  if test "x$has_colon" = x; then
54017    # Not in mixed or Windows style, start by that.
54018    new_path=`cmd //c echo $path`
54019  fi
54020
54021
54022  input_path="$new_path"
54023  # Check if we need to convert this using DOS-style short mode. If the path
54024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54025  # take no chances and rewrite it.
54026  # Note: m4 eats our [], so we need to use [ and ] instead.
54027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54028  if test "x$has_forbidden_chars" != x; then
54029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54031  fi
54032
54033
54034  windows_path="$new_path"
54035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54036    unix_path=`$CYGPATH -u "$windows_path"`
54037    new_path="$unix_path"
54038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54040    new_path="$unix_path"
54041  fi
54042
54043  if test "x$path" != "x$new_path"; then
54044    MSVC_DLL="$new_path"
54045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54046$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54047  fi
54048
54049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54051
54052    else
54053      # We're on a unix platform. Hooray! :)
54054      path="$MSVC_DLL"
54055      has_space=`$ECHO "$path" | $GREP " "`
54056      if test "x$has_space" != x; then
54057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54058$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54060      fi
54061
54062      # Use eval to expand a potential ~
54063      eval path="$path"
54064      if test ! -f "$path" && test ! -d "$path"; then
54065        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54066      fi
54067
54068      if test -d "$path"; then
54069        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54070      else
54071        dir="`$DIRNAME "$path"`"
54072        base="`$BASENAME "$path"`"
54073        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54074      fi
54075    fi
54076  fi
54077
54078      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54079$as_echo_n "checking for $DLL_NAME... " >&6; }
54080      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54081$as_echo "$MSVC_DLL" >&6; }
54082    else
54083      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54084$as_echo "incorrect, ignoring" >&6; }
54085      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54086$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54087    fi
54088  fi
54089
54090  fi
54091
54092  if test "x$MSVC_DLL" = x; then
54093    # Probe: Look in the Windows system32 directory
54094    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54095
54096  windows_path="$CYGWIN_SYSTEMROOT"
54097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54098    unix_path=`$CYGPATH -u "$windows_path"`
54099    CYGWIN_SYSTEMROOT="$unix_path"
54100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54102    CYGWIN_SYSTEMROOT="$unix_path"
54103  fi
54104
54105    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54106
54107  DLL_NAME="$DLL_NAME"
54108  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54109  METHOD="well-known location in SYSTEMROOT"
54110  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54111    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54112$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54113
54114    # Need to check if the found msvcr is correct architecture
54115    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54116$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54117    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54119      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54120      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54121      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54122        CORRECT_MSVCR_ARCH="PE32 executable"
54123      else
54124        CORRECT_MSVCR_ARCH="PE32+ executable"
54125      fi
54126    else
54127      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54128        CORRECT_MSVCR_ARCH=386
54129      else
54130        CORRECT_MSVCR_ARCH=x86-64
54131      fi
54132    fi
54133    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54134      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54135$as_echo "ok" >&6; }
54136      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54137
54138  # Only process if variable expands to non-empty
54139
54140  if test "x$MSVC_DLL" != x; then
54141    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54142
54143  # Input might be given as Windows format, start by converting to
54144  # unix format.
54145  path="$MSVC_DLL"
54146  new_path=`$CYGPATH -u "$path"`
54147
54148  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54149  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54150  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54151  # "foo.exe" is OK but "foo" is an error.
54152  #
54153  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54154  # It is also a way to make sure we got the proper file name for the real test later on.
54155  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54156  if test "x$test_shortpath" = x; then
54157    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54158$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54159    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54160  fi
54161
54162  # Call helper function which possibly converts this using DOS-style short mode.
54163  # If so, the updated path is stored in $new_path.
54164
54165  input_path="$new_path"
54166  # Check if we need to convert this using DOS-style short mode. If the path
54167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54168  # take no chances and rewrite it.
54169  # Note: m4 eats our [], so we need to use [ and ] instead.
54170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54171  if test "x$has_forbidden_chars" != x; then
54172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54173    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54174    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54175    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54176      # Going to short mode and back again did indeed matter. Since short mode is
54177      # case insensitive, let's make it lowercase to improve readability.
54178      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54179      # Now convert it back to Unix-style (cygpath)
54180      input_path=`$CYGPATH -u "$shortmode_path"`
54181      new_path="$input_path"
54182    fi
54183  fi
54184
54185  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54186  if test "x$test_cygdrive_prefix" = x; then
54187    # As a simple fix, exclude /usr/bin since it's not a real path.
54188    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54189      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54190      # a path prefixed by /cygdrive for fixpath to work.
54191      new_path="$CYGWIN_ROOT_PATH$input_path"
54192    fi
54193  fi
54194
54195
54196  if test "x$path" != "x$new_path"; then
54197    MSVC_DLL="$new_path"
54198    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54199$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54200  fi
54201
54202    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54203
54204  path="$MSVC_DLL"
54205  has_colon=`$ECHO $path | $GREP ^.:`
54206  new_path="$path"
54207  if test "x$has_colon" = x; then
54208    # Not in mixed or Windows style, start by that.
54209    new_path=`cmd //c echo $path`
54210  fi
54211
54212
54213  input_path="$new_path"
54214  # Check if we need to convert this using DOS-style short mode. If the path
54215  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54216  # take no chances and rewrite it.
54217  # Note: m4 eats our [], so we need to use [ and ] instead.
54218  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54219  if test "x$has_forbidden_chars" != x; then
54220    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54221    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54222  fi
54223
54224
54225  windows_path="$new_path"
54226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54227    unix_path=`$CYGPATH -u "$windows_path"`
54228    new_path="$unix_path"
54229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54231    new_path="$unix_path"
54232  fi
54233
54234  if test "x$path" != "x$new_path"; then
54235    MSVC_DLL="$new_path"
54236    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54237$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54238  fi
54239
54240  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54241  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54242
54243    else
54244      # We're on a unix platform. Hooray! :)
54245      path="$MSVC_DLL"
54246      has_space=`$ECHO "$path" | $GREP " "`
54247      if test "x$has_space" != x; then
54248        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54249$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54250        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54251      fi
54252
54253      # Use eval to expand a potential ~
54254      eval path="$path"
54255      if test ! -f "$path" && test ! -d "$path"; then
54256        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54257      fi
54258
54259      if test -d "$path"; then
54260        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54261      else
54262        dir="`$DIRNAME "$path"`"
54263        base="`$BASENAME "$path"`"
54264        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54265      fi
54266    fi
54267  fi
54268
54269      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54270$as_echo_n "checking for $DLL_NAME... " >&6; }
54271      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54272$as_echo "$MSVC_DLL" >&6; }
54273    else
54274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54275$as_echo "incorrect, ignoring" >&6; }
54276      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54277$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54278    fi
54279  fi
54280
54281  fi
54282
54283  if test "x$MSVC_DLL" = x; then
54284    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54285    if test "x$VS100COMNTOOLS" != x; then
54286      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54287
54288  windows_path="$CYGWIN_VS_TOOLS_DIR"
54289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54290    unix_path=`$CYGPATH -u "$windows_path"`
54291    CYGWIN_VS_TOOLS_DIR="$unix_path"
54292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54293    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54294    CYGWIN_VS_TOOLS_DIR="$unix_path"
54295  fi
54296
54297      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54298        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54299	    | $GREP -i /x64/ | $HEAD --lines 1`
54300      else
54301        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54302	    | $GREP -i /x86/ | $HEAD --lines 1`
54303      fi
54304
54305  DLL_NAME="$DLL_NAME"
54306  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54307  METHOD="search of VS100COMNTOOLS"
54308  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54309    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54310$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54311
54312    # Need to check if the found msvcr is correct architecture
54313    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54314$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54315    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54317      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54318      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54319      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54320        CORRECT_MSVCR_ARCH="PE32 executable"
54321      else
54322        CORRECT_MSVCR_ARCH="PE32+ executable"
54323      fi
54324    else
54325      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54326        CORRECT_MSVCR_ARCH=386
54327      else
54328        CORRECT_MSVCR_ARCH=x86-64
54329      fi
54330    fi
54331    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54332      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54333$as_echo "ok" >&6; }
54334      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54335
54336  # Only process if variable expands to non-empty
54337
54338  if test "x$MSVC_DLL" != x; then
54339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54340
54341  # Input might be given as Windows format, start by converting to
54342  # unix format.
54343  path="$MSVC_DLL"
54344  new_path=`$CYGPATH -u "$path"`
54345
54346  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54347  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54348  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54349  # "foo.exe" is OK but "foo" is an error.
54350  #
54351  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54352  # It is also a way to make sure we got the proper file name for the real test later on.
54353  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54354  if test "x$test_shortpath" = x; then
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54356$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54357    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54358  fi
54359
54360  # Call helper function which possibly converts this using DOS-style short mode.
54361  # If so, the updated path is stored in $new_path.
54362
54363  input_path="$new_path"
54364  # Check if we need to convert this using DOS-style short mode. If the path
54365  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54366  # take no chances and rewrite it.
54367  # Note: m4 eats our [], so we need to use [ and ] instead.
54368  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54369  if test "x$has_forbidden_chars" != x; then
54370    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54371    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54372    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54373    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54374      # Going to short mode and back again did indeed matter. Since short mode is
54375      # case insensitive, let's make it lowercase to improve readability.
54376      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54377      # Now convert it back to Unix-style (cygpath)
54378      input_path=`$CYGPATH -u "$shortmode_path"`
54379      new_path="$input_path"
54380    fi
54381  fi
54382
54383  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54384  if test "x$test_cygdrive_prefix" = x; then
54385    # As a simple fix, exclude /usr/bin since it's not a real path.
54386    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54387      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54388      # a path prefixed by /cygdrive for fixpath to work.
54389      new_path="$CYGWIN_ROOT_PATH$input_path"
54390    fi
54391  fi
54392
54393
54394  if test "x$path" != "x$new_path"; then
54395    MSVC_DLL="$new_path"
54396    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54397$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54398  fi
54399
54400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54401
54402  path="$MSVC_DLL"
54403  has_colon=`$ECHO $path | $GREP ^.:`
54404  new_path="$path"
54405  if test "x$has_colon" = x; then
54406    # Not in mixed or Windows style, start by that.
54407    new_path=`cmd //c echo $path`
54408  fi
54409
54410
54411  input_path="$new_path"
54412  # Check if we need to convert this using DOS-style short mode. If the path
54413  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54414  # take no chances and rewrite it.
54415  # Note: m4 eats our [], so we need to use [ and ] instead.
54416  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54417  if test "x$has_forbidden_chars" != x; then
54418    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54419    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54420  fi
54421
54422
54423  windows_path="$new_path"
54424  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54425    unix_path=`$CYGPATH -u "$windows_path"`
54426    new_path="$unix_path"
54427  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54428    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54429    new_path="$unix_path"
54430  fi
54431
54432  if test "x$path" != "x$new_path"; then
54433    MSVC_DLL="$new_path"
54434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54435$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54436  fi
54437
54438  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54439  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54440
54441    else
54442      # We're on a unix platform. Hooray! :)
54443      path="$MSVC_DLL"
54444      has_space=`$ECHO "$path" | $GREP " "`
54445      if test "x$has_space" != x; then
54446        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54447$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54448        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54449      fi
54450
54451      # Use eval to expand a potential ~
54452      eval path="$path"
54453      if test ! -f "$path" && test ! -d "$path"; then
54454        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54455      fi
54456
54457      if test -d "$path"; then
54458        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54459      else
54460        dir="`$DIRNAME "$path"`"
54461        base="`$BASENAME "$path"`"
54462        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54463      fi
54464    fi
54465  fi
54466
54467      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54468$as_echo_n "checking for $DLL_NAME... " >&6; }
54469      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54470$as_echo "$MSVC_DLL" >&6; }
54471    else
54472      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54473$as_echo "incorrect, ignoring" >&6; }
54474      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54475$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54476    fi
54477  fi
54478
54479    fi
54480  fi
54481
54482  if test "x$MSVC_DLL" = x; then
54483    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54484    # (This was the original behaviour; kept since it might turn something up)
54485    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54486      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54487        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54488	    | $GREP x64 | $HEAD --lines 1`
54489      else
54490        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54491	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54492        if test "x$POSSIBLE_MSVC_DLL" = x; then
54493          # We're grasping at straws now...
54494          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54495	      | $HEAD --lines 1`
54496        fi
54497      fi
54498
54499
54500  DLL_NAME="$DLL_NAME"
54501  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54502  METHOD="search of VCINSTALLDIR"
54503  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54504    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54505$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54506
54507    # Need to check if the found msvcr is correct architecture
54508    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54509$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54510    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54511    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54512      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54513      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54514      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54515        CORRECT_MSVCR_ARCH="PE32 executable"
54516      else
54517        CORRECT_MSVCR_ARCH="PE32+ executable"
54518      fi
54519    else
54520      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54521        CORRECT_MSVCR_ARCH=386
54522      else
54523        CORRECT_MSVCR_ARCH=x86-64
54524      fi
54525    fi
54526    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54527      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54528$as_echo "ok" >&6; }
54529      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54530
54531  # Only process if variable expands to non-empty
54532
54533  if test "x$MSVC_DLL" != x; then
54534    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54535
54536  # Input might be given as Windows format, start by converting to
54537  # unix format.
54538  path="$MSVC_DLL"
54539  new_path=`$CYGPATH -u "$path"`
54540
54541  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54542  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54543  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54544  # "foo.exe" is OK but "foo" is an error.
54545  #
54546  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54547  # It is also a way to make sure we got the proper file name for the real test later on.
54548  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54549  if test "x$test_shortpath" = x; then
54550    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54551$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54552    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54553  fi
54554
54555  # Call helper function which possibly converts this using DOS-style short mode.
54556  # If so, the updated path is stored in $new_path.
54557
54558  input_path="$new_path"
54559  # Check if we need to convert this using DOS-style short mode. If the path
54560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54561  # take no chances and rewrite it.
54562  # Note: m4 eats our [], so we need to use [ and ] instead.
54563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54564  if test "x$has_forbidden_chars" != x; then
54565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54569      # Going to short mode and back again did indeed matter. Since short mode is
54570      # case insensitive, let's make it lowercase to improve readability.
54571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54572      # Now convert it back to Unix-style (cygpath)
54573      input_path=`$CYGPATH -u "$shortmode_path"`
54574      new_path="$input_path"
54575    fi
54576  fi
54577
54578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54579  if test "x$test_cygdrive_prefix" = x; then
54580    # As a simple fix, exclude /usr/bin since it's not a real path.
54581    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54583      # a path prefixed by /cygdrive for fixpath to work.
54584      new_path="$CYGWIN_ROOT_PATH$input_path"
54585    fi
54586  fi
54587
54588
54589  if test "x$path" != "x$new_path"; then
54590    MSVC_DLL="$new_path"
54591    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54592$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54593  fi
54594
54595    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54596
54597  path="$MSVC_DLL"
54598  has_colon=`$ECHO $path | $GREP ^.:`
54599  new_path="$path"
54600  if test "x$has_colon" = x; then
54601    # Not in mixed or Windows style, start by that.
54602    new_path=`cmd //c echo $path`
54603  fi
54604
54605
54606  input_path="$new_path"
54607  # Check if we need to convert this using DOS-style short mode. If the path
54608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54609  # take no chances and rewrite it.
54610  # Note: m4 eats our [], so we need to use [ and ] instead.
54611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54612  if test "x$has_forbidden_chars" != x; then
54613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54614    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54615  fi
54616
54617
54618  windows_path="$new_path"
54619  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54620    unix_path=`$CYGPATH -u "$windows_path"`
54621    new_path="$unix_path"
54622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54623    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54624    new_path="$unix_path"
54625  fi
54626
54627  if test "x$path" != "x$new_path"; then
54628    MSVC_DLL="$new_path"
54629    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54630$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54631  fi
54632
54633  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54634  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54635
54636    else
54637      # We're on a unix platform. Hooray! :)
54638      path="$MSVC_DLL"
54639      has_space=`$ECHO "$path" | $GREP " "`
54640      if test "x$has_space" != x; then
54641        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54642$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54643        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54644      fi
54645
54646      # Use eval to expand a potential ~
54647      eval path="$path"
54648      if test ! -f "$path" && test ! -d "$path"; then
54649        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54650      fi
54651
54652      if test -d "$path"; then
54653        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54654      else
54655        dir="`$DIRNAME "$path"`"
54656        base="`$BASENAME "$path"`"
54657        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54658      fi
54659    fi
54660  fi
54661
54662      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54663$as_echo_n "checking for $DLL_NAME... " >&6; }
54664      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54665$as_echo "$MSVC_DLL" >&6; }
54666    else
54667      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54668$as_echo "incorrect, ignoring" >&6; }
54669      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54670$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54671    fi
54672  fi
54673
54674    fi
54675  fi
54676
54677  if test "x$MSVC_DLL" = x; then
54678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54679$as_echo_n "checking for $DLL_NAME... " >&6; }
54680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54681$as_echo "no" >&6; }
54682    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54683  fi
54684
54685    MSVCR_DLL="$MSVC_DLL"
54686  fi
54687
54688
54689
54690# Check whether --with-msvcp-dll was given.
54691if test "${with_msvcp_dll+set}" = set; then :
54692  withval=$with_msvcp_dll;
54693fi
54694
54695
54696  if test "x$MSVCP_NAME" != "x"; then
54697    if test "x$with_msvcp_dll" != x; then
54698      # If given explicitly by user, do not probe. If not present, fail directly.
54699
54700  DLL_NAME="$MSVCP_NAME"
54701  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54702  METHOD="--with-msvcp-dll"
54703  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54705$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54706
54707    # Need to check if the found msvcr is correct architecture
54708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54709$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54710    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54712      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54713      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54715        CORRECT_MSVCR_ARCH="PE32 executable"
54716      else
54717        CORRECT_MSVCR_ARCH="PE32+ executable"
54718      fi
54719    else
54720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54721        CORRECT_MSVCR_ARCH=386
54722      else
54723        CORRECT_MSVCR_ARCH=x86-64
54724      fi
54725    fi
54726    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54728$as_echo "ok" >&6; }
54729      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54730
54731  # Only process if variable expands to non-empty
54732
54733  if test "x$MSVC_DLL" != x; then
54734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54735
54736  # Input might be given as Windows format, start by converting to
54737  # unix format.
54738  path="$MSVC_DLL"
54739  new_path=`$CYGPATH -u "$path"`
54740
54741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54744  # "foo.exe" is OK but "foo" is an error.
54745  #
54746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54747  # It is also a way to make sure we got the proper file name for the real test later on.
54748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54749  if test "x$test_shortpath" = x; then
54750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54751$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54752    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54753  fi
54754
54755  # Call helper function which possibly converts this using DOS-style short mode.
54756  # If so, the updated path is stored in $new_path.
54757
54758  input_path="$new_path"
54759  # Check if we need to convert this using DOS-style short mode. If the path
54760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54761  # take no chances and rewrite it.
54762  # Note: m4 eats our [], so we need to use [ and ] instead.
54763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54764  if test "x$has_forbidden_chars" != x; then
54765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54769      # Going to short mode and back again did indeed matter. Since short mode is
54770      # case insensitive, let's make it lowercase to improve readability.
54771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54772      # Now convert it back to Unix-style (cygpath)
54773      input_path=`$CYGPATH -u "$shortmode_path"`
54774      new_path="$input_path"
54775    fi
54776  fi
54777
54778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54779  if test "x$test_cygdrive_prefix" = x; then
54780    # As a simple fix, exclude /usr/bin since it's not a real path.
54781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54783      # a path prefixed by /cygdrive for fixpath to work.
54784      new_path="$CYGWIN_ROOT_PATH$input_path"
54785    fi
54786  fi
54787
54788
54789  if test "x$path" != "x$new_path"; then
54790    MSVC_DLL="$new_path"
54791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54792$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54793  fi
54794
54795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54796
54797  path="$MSVC_DLL"
54798  has_colon=`$ECHO $path | $GREP ^.:`
54799  new_path="$path"
54800  if test "x$has_colon" = x; then
54801    # Not in mixed or Windows style, start by that.
54802    new_path=`cmd //c echo $path`
54803  fi
54804
54805
54806  input_path="$new_path"
54807  # Check if we need to convert this using DOS-style short mode. If the path
54808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54809  # take no chances and rewrite it.
54810  # Note: m4 eats our [], so we need to use [ and ] instead.
54811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54812  if test "x$has_forbidden_chars" != x; then
54813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54815  fi
54816
54817
54818  windows_path="$new_path"
54819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54820    unix_path=`$CYGPATH -u "$windows_path"`
54821    new_path="$unix_path"
54822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54824    new_path="$unix_path"
54825  fi
54826
54827  if test "x$path" != "x$new_path"; then
54828    MSVC_DLL="$new_path"
54829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54830$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54831  fi
54832
54833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54835
54836    else
54837      # We're on a unix platform. Hooray! :)
54838      path="$MSVC_DLL"
54839      has_space=`$ECHO "$path" | $GREP " "`
54840      if test "x$has_space" != x; then
54841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54842$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54844      fi
54845
54846      # Use eval to expand a potential ~
54847      eval path="$path"
54848      if test ! -f "$path" && test ! -d "$path"; then
54849        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54850      fi
54851
54852      if test -d "$path"; then
54853        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54854      else
54855        dir="`$DIRNAME "$path"`"
54856        base="`$BASENAME "$path"`"
54857        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54858      fi
54859    fi
54860  fi
54861
54862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54863$as_echo_n "checking for $DLL_NAME... " >&6; }
54864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54865$as_echo "$MSVC_DLL" >&6; }
54866    else
54867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54868$as_echo "incorrect, ignoring" >&6; }
54869      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54870$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54871    fi
54872  fi
54873
54874      if test "x$MSVC_DLL" = x; then
54875        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54876      fi
54877      MSVCP_DLL="$MSVC_DLL"
54878    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54879
54880  DLL_NAME="$MSVCP_NAME"
54881  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54882  METHOD="devkit"
54883  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54884    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54885$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54886
54887    # Need to check if the found msvcr is correct architecture
54888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54889$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54890    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54891    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54892      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54893      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54894      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54895        CORRECT_MSVCR_ARCH="PE32 executable"
54896      else
54897        CORRECT_MSVCR_ARCH="PE32+ executable"
54898      fi
54899    else
54900      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54901        CORRECT_MSVCR_ARCH=386
54902      else
54903        CORRECT_MSVCR_ARCH=x86-64
54904      fi
54905    fi
54906    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54908$as_echo "ok" >&6; }
54909      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54910
54911  # Only process if variable expands to non-empty
54912
54913  if test "x$MSVC_DLL" != x; then
54914    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54915
54916  # Input might be given as Windows format, start by converting to
54917  # unix format.
54918  path="$MSVC_DLL"
54919  new_path=`$CYGPATH -u "$path"`
54920
54921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54924  # "foo.exe" is OK but "foo" is an error.
54925  #
54926  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54927  # It is also a way to make sure we got the proper file name for the real test later on.
54928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54929  if test "x$test_shortpath" = x; then
54930    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54931$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54932    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54933  fi
54934
54935  # Call helper function which possibly converts this using DOS-style short mode.
54936  # If so, the updated path is stored in $new_path.
54937
54938  input_path="$new_path"
54939  # Check if we need to convert this using DOS-style short mode. If the path
54940  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54941  # take no chances and rewrite it.
54942  # Note: m4 eats our [], so we need to use [ and ] instead.
54943  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54944  if test "x$has_forbidden_chars" != x; then
54945    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54946    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54947    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54948    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54949      # Going to short mode and back again did indeed matter. Since short mode is
54950      # case insensitive, let's make it lowercase to improve readability.
54951      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54952      # Now convert it back to Unix-style (cygpath)
54953      input_path=`$CYGPATH -u "$shortmode_path"`
54954      new_path="$input_path"
54955    fi
54956  fi
54957
54958  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54959  if test "x$test_cygdrive_prefix" = x; then
54960    # As a simple fix, exclude /usr/bin since it's not a real path.
54961    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54962      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54963      # a path prefixed by /cygdrive for fixpath to work.
54964      new_path="$CYGWIN_ROOT_PATH$input_path"
54965    fi
54966  fi
54967
54968
54969  if test "x$path" != "x$new_path"; then
54970    MSVC_DLL="$new_path"
54971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54972$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54973  fi
54974
54975    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54976
54977  path="$MSVC_DLL"
54978  has_colon=`$ECHO $path | $GREP ^.:`
54979  new_path="$path"
54980  if test "x$has_colon" = x; then
54981    # Not in mixed or Windows style, start by that.
54982    new_path=`cmd //c echo $path`
54983  fi
54984
54985
54986  input_path="$new_path"
54987  # Check if we need to convert this using DOS-style short mode. If the path
54988  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54989  # take no chances and rewrite it.
54990  # Note: m4 eats our [], so we need to use [ and ] instead.
54991  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54992  if test "x$has_forbidden_chars" != x; then
54993    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54994    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54995  fi
54996
54997
54998  windows_path="$new_path"
54999  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55000    unix_path=`$CYGPATH -u "$windows_path"`
55001    new_path="$unix_path"
55002  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55003    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55004    new_path="$unix_path"
55005  fi
55006
55007  if test "x$path" != "x$new_path"; then
55008    MSVC_DLL="$new_path"
55009    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55010$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55011  fi
55012
55013  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55014  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55015
55016    else
55017      # We're on a unix platform. Hooray! :)
55018      path="$MSVC_DLL"
55019      has_space=`$ECHO "$path" | $GREP " "`
55020      if test "x$has_space" != x; then
55021        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55022$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55023        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55024      fi
55025
55026      # Use eval to expand a potential ~
55027      eval path="$path"
55028      if test ! -f "$path" && test ! -d "$path"; then
55029        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55030      fi
55031
55032      if test -d "$path"; then
55033        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55034      else
55035        dir="`$DIRNAME "$path"`"
55036        base="`$BASENAME "$path"`"
55037        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55038      fi
55039    fi
55040  fi
55041
55042      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55043$as_echo_n "checking for $DLL_NAME... " >&6; }
55044      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55045$as_echo "$MSVC_DLL" >&6; }
55046    else
55047      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55048$as_echo "incorrect, ignoring" >&6; }
55049      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55050$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55051    fi
55052  fi
55053
55054      if test "x$MSVC_DLL" = x; then
55055        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55056      fi
55057      MSVCP_DLL="$MSVC_DLL"
55058    else
55059
55060  DLL_NAME="${MSVCP_NAME}"
55061  MSVC_DLL=
55062
55063  if test "x$MSVC_DLL" = x; then
55064    # Probe: Using well-known location from Visual Studio 10.0
55065    if test "x$VCINSTALLDIR" != x; then
55066      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55067
55068  windows_path="$CYGWIN_VC_INSTALL_DIR"
55069  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55070    unix_path=`$CYGPATH -u "$windows_path"`
55071    CYGWIN_VC_INSTALL_DIR="$unix_path"
55072  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55073    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55074    CYGWIN_VC_INSTALL_DIR="$unix_path"
55075  fi
55076
55077      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55078        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55079      else
55080        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55081      fi
55082      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55083
55084  DLL_NAME="$DLL_NAME"
55085  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55086  METHOD="well-known location in VCINSTALLDIR"
55087  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55088    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55089$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55090
55091    # Need to check if the found msvcr is correct architecture
55092    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55093$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55094    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55095    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55096      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55097      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55098      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55099        CORRECT_MSVCR_ARCH="PE32 executable"
55100      else
55101        CORRECT_MSVCR_ARCH="PE32+ executable"
55102      fi
55103    else
55104      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55105        CORRECT_MSVCR_ARCH=386
55106      else
55107        CORRECT_MSVCR_ARCH=x86-64
55108      fi
55109    fi
55110    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55111      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55112$as_echo "ok" >&6; }
55113      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55114
55115  # Only process if variable expands to non-empty
55116
55117  if test "x$MSVC_DLL" != x; then
55118    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55119
55120  # Input might be given as Windows format, start by converting to
55121  # unix format.
55122  path="$MSVC_DLL"
55123  new_path=`$CYGPATH -u "$path"`
55124
55125  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55126  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55127  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55128  # "foo.exe" is OK but "foo" is an error.
55129  #
55130  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55131  # It is also a way to make sure we got the proper file name for the real test later on.
55132  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55133  if test "x$test_shortpath" = x; then
55134    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55135$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55136    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55137  fi
55138
55139  # Call helper function which possibly converts this using DOS-style short mode.
55140  # If so, the updated path is stored in $new_path.
55141
55142  input_path="$new_path"
55143  # Check if we need to convert this using DOS-style short mode. If the path
55144  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55145  # take no chances and rewrite it.
55146  # Note: m4 eats our [], so we need to use [ and ] instead.
55147  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55148  if test "x$has_forbidden_chars" != x; then
55149    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55150    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55151    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55152    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55153      # Going to short mode and back again did indeed matter. Since short mode is
55154      # case insensitive, let's make it lowercase to improve readability.
55155      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55156      # Now convert it back to Unix-style (cygpath)
55157      input_path=`$CYGPATH -u "$shortmode_path"`
55158      new_path="$input_path"
55159    fi
55160  fi
55161
55162  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55163  if test "x$test_cygdrive_prefix" = x; then
55164    # As a simple fix, exclude /usr/bin since it's not a real path.
55165    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55166      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55167      # a path prefixed by /cygdrive for fixpath to work.
55168      new_path="$CYGWIN_ROOT_PATH$input_path"
55169    fi
55170  fi
55171
55172
55173  if test "x$path" != "x$new_path"; then
55174    MSVC_DLL="$new_path"
55175    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55176$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55177  fi
55178
55179    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55180
55181  path="$MSVC_DLL"
55182  has_colon=`$ECHO $path | $GREP ^.:`
55183  new_path="$path"
55184  if test "x$has_colon" = x; then
55185    # Not in mixed or Windows style, start by that.
55186    new_path=`cmd //c echo $path`
55187  fi
55188
55189
55190  input_path="$new_path"
55191  # Check if we need to convert this using DOS-style short mode. If the path
55192  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55193  # take no chances and rewrite it.
55194  # Note: m4 eats our [], so we need to use [ and ] instead.
55195  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55196  if test "x$has_forbidden_chars" != x; then
55197    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55198    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55199  fi
55200
55201
55202  windows_path="$new_path"
55203  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55204    unix_path=`$CYGPATH -u "$windows_path"`
55205    new_path="$unix_path"
55206  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55207    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55208    new_path="$unix_path"
55209  fi
55210
55211  if test "x$path" != "x$new_path"; then
55212    MSVC_DLL="$new_path"
55213    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55214$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55215  fi
55216
55217  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55218  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55219
55220    else
55221      # We're on a unix platform. Hooray! :)
55222      path="$MSVC_DLL"
55223      has_space=`$ECHO "$path" | $GREP " "`
55224      if test "x$has_space" != x; then
55225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55226$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55227        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55228      fi
55229
55230      # Use eval to expand a potential ~
55231      eval path="$path"
55232      if test ! -f "$path" && test ! -d "$path"; then
55233        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55234      fi
55235
55236      if test -d "$path"; then
55237        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55238      else
55239        dir="`$DIRNAME "$path"`"
55240        base="`$BASENAME "$path"`"
55241        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55242      fi
55243    fi
55244  fi
55245
55246      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55247$as_echo_n "checking for $DLL_NAME... " >&6; }
55248      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55249$as_echo "$MSVC_DLL" >&6; }
55250    else
55251      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55252$as_echo "incorrect, ignoring" >&6; }
55253      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55254$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55255    fi
55256  fi
55257
55258    fi
55259  fi
55260
55261  if test "x$MSVC_DLL" = x; then
55262    # Probe: Check in the Boot JDK directory.
55263    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55264
55265  DLL_NAME="$DLL_NAME"
55266  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55267  METHOD="well-known location in Boot JDK"
55268  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55269    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55270$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55271
55272    # Need to check if the found msvcr is correct architecture
55273    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55274$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55275    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55276    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55277      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55278      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55279      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55280        CORRECT_MSVCR_ARCH="PE32 executable"
55281      else
55282        CORRECT_MSVCR_ARCH="PE32+ executable"
55283      fi
55284    else
55285      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55286        CORRECT_MSVCR_ARCH=386
55287      else
55288        CORRECT_MSVCR_ARCH=x86-64
55289      fi
55290    fi
55291    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55292      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55293$as_echo "ok" >&6; }
55294      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55295
55296  # Only process if variable expands to non-empty
55297
55298  if test "x$MSVC_DLL" != x; then
55299    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55300
55301  # Input might be given as Windows format, start by converting to
55302  # unix format.
55303  path="$MSVC_DLL"
55304  new_path=`$CYGPATH -u "$path"`
55305
55306  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55307  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55308  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55309  # "foo.exe" is OK but "foo" is an error.
55310  #
55311  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55312  # It is also a way to make sure we got the proper file name for the real test later on.
55313  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55314  if test "x$test_shortpath" = x; then
55315    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55316$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55317    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55318  fi
55319
55320  # Call helper function which possibly converts this using DOS-style short mode.
55321  # If so, the updated path is stored in $new_path.
55322
55323  input_path="$new_path"
55324  # Check if we need to convert this using DOS-style short mode. If the path
55325  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55326  # take no chances and rewrite it.
55327  # Note: m4 eats our [], so we need to use [ and ] instead.
55328  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55329  if test "x$has_forbidden_chars" != x; then
55330    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55331    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55332    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55333    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55334      # Going to short mode and back again did indeed matter. Since short mode is
55335      # case insensitive, let's make it lowercase to improve readability.
55336      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55337      # Now convert it back to Unix-style (cygpath)
55338      input_path=`$CYGPATH -u "$shortmode_path"`
55339      new_path="$input_path"
55340    fi
55341  fi
55342
55343  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55344  if test "x$test_cygdrive_prefix" = x; then
55345    # As a simple fix, exclude /usr/bin since it's not a real path.
55346    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55347      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55348      # a path prefixed by /cygdrive for fixpath to work.
55349      new_path="$CYGWIN_ROOT_PATH$input_path"
55350    fi
55351  fi
55352
55353
55354  if test "x$path" != "x$new_path"; then
55355    MSVC_DLL="$new_path"
55356    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55357$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55358  fi
55359
55360    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55361
55362  path="$MSVC_DLL"
55363  has_colon=`$ECHO $path | $GREP ^.:`
55364  new_path="$path"
55365  if test "x$has_colon" = x; then
55366    # Not in mixed or Windows style, start by that.
55367    new_path=`cmd //c echo $path`
55368  fi
55369
55370
55371  input_path="$new_path"
55372  # Check if we need to convert this using DOS-style short mode. If the path
55373  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55374  # take no chances and rewrite it.
55375  # Note: m4 eats our [], so we need to use [ and ] instead.
55376  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55377  if test "x$has_forbidden_chars" != x; then
55378    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55379    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55380  fi
55381
55382
55383  windows_path="$new_path"
55384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55385    unix_path=`$CYGPATH -u "$windows_path"`
55386    new_path="$unix_path"
55387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55388    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55389    new_path="$unix_path"
55390  fi
55391
55392  if test "x$path" != "x$new_path"; then
55393    MSVC_DLL="$new_path"
55394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55395$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55396  fi
55397
55398  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55399  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55400
55401    else
55402      # We're on a unix platform. Hooray! :)
55403      path="$MSVC_DLL"
55404      has_space=`$ECHO "$path" | $GREP " "`
55405      if test "x$has_space" != x; then
55406        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55407$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55408        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55409      fi
55410
55411      # Use eval to expand a potential ~
55412      eval path="$path"
55413      if test ! -f "$path" && test ! -d "$path"; then
55414        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55415      fi
55416
55417      if test -d "$path"; then
55418        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55419      else
55420        dir="`$DIRNAME "$path"`"
55421        base="`$BASENAME "$path"`"
55422        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55423      fi
55424    fi
55425  fi
55426
55427      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55428$as_echo_n "checking for $DLL_NAME... " >&6; }
55429      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55430$as_echo "$MSVC_DLL" >&6; }
55431    else
55432      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55433$as_echo "incorrect, ignoring" >&6; }
55434      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55435$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55436    fi
55437  fi
55438
55439  fi
55440
55441  if test "x$MSVC_DLL" = x; then
55442    # Probe: Look in the Windows system32 directory
55443    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55444
55445  windows_path="$CYGWIN_SYSTEMROOT"
55446  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55447    unix_path=`$CYGPATH -u "$windows_path"`
55448    CYGWIN_SYSTEMROOT="$unix_path"
55449  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55450    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55451    CYGWIN_SYSTEMROOT="$unix_path"
55452  fi
55453
55454    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55455
55456  DLL_NAME="$DLL_NAME"
55457  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55458  METHOD="well-known location in SYSTEMROOT"
55459  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55460    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55461$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55462
55463    # Need to check if the found msvcr is correct architecture
55464    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55465$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55466    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55467    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55468      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55469      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55470      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55471        CORRECT_MSVCR_ARCH="PE32 executable"
55472      else
55473        CORRECT_MSVCR_ARCH="PE32+ executable"
55474      fi
55475    else
55476      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55477        CORRECT_MSVCR_ARCH=386
55478      else
55479        CORRECT_MSVCR_ARCH=x86-64
55480      fi
55481    fi
55482    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55483      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55484$as_echo "ok" >&6; }
55485      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55486
55487  # Only process if variable expands to non-empty
55488
55489  if test "x$MSVC_DLL" != x; then
55490    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55491
55492  # Input might be given as Windows format, start by converting to
55493  # unix format.
55494  path="$MSVC_DLL"
55495  new_path=`$CYGPATH -u "$path"`
55496
55497  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55498  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55499  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55500  # "foo.exe" is OK but "foo" is an error.
55501  #
55502  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55503  # It is also a way to make sure we got the proper file name for the real test later on.
55504  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55505  if test "x$test_shortpath" = x; then
55506    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55507$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55508    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55509  fi
55510
55511  # Call helper function which possibly converts this using DOS-style short mode.
55512  # If so, the updated path is stored in $new_path.
55513
55514  input_path="$new_path"
55515  # Check if we need to convert this using DOS-style short mode. If the path
55516  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55517  # take no chances and rewrite it.
55518  # Note: m4 eats our [], so we need to use [ and ] instead.
55519  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55520  if test "x$has_forbidden_chars" != x; then
55521    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55522    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55523    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55524    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55525      # Going to short mode and back again did indeed matter. Since short mode is
55526      # case insensitive, let's make it lowercase to improve readability.
55527      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55528      # Now convert it back to Unix-style (cygpath)
55529      input_path=`$CYGPATH -u "$shortmode_path"`
55530      new_path="$input_path"
55531    fi
55532  fi
55533
55534  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55535  if test "x$test_cygdrive_prefix" = x; then
55536    # As a simple fix, exclude /usr/bin since it's not a real path.
55537    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55538      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55539      # a path prefixed by /cygdrive for fixpath to work.
55540      new_path="$CYGWIN_ROOT_PATH$input_path"
55541    fi
55542  fi
55543
55544
55545  if test "x$path" != "x$new_path"; then
55546    MSVC_DLL="$new_path"
55547    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55548$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55549  fi
55550
55551    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55552
55553  path="$MSVC_DLL"
55554  has_colon=`$ECHO $path | $GREP ^.:`
55555  new_path="$path"
55556  if test "x$has_colon" = x; then
55557    # Not in mixed or Windows style, start by that.
55558    new_path=`cmd //c echo $path`
55559  fi
55560
55561
55562  input_path="$new_path"
55563  # Check if we need to convert this using DOS-style short mode. If the path
55564  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55565  # take no chances and rewrite it.
55566  # Note: m4 eats our [], so we need to use [ and ] instead.
55567  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55568  if test "x$has_forbidden_chars" != x; then
55569    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55570    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55571  fi
55572
55573
55574  windows_path="$new_path"
55575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55576    unix_path=`$CYGPATH -u "$windows_path"`
55577    new_path="$unix_path"
55578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55580    new_path="$unix_path"
55581  fi
55582
55583  if test "x$path" != "x$new_path"; then
55584    MSVC_DLL="$new_path"
55585    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55586$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55587  fi
55588
55589  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55590  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55591
55592    else
55593      # We're on a unix platform. Hooray! :)
55594      path="$MSVC_DLL"
55595      has_space=`$ECHO "$path" | $GREP " "`
55596      if test "x$has_space" != x; then
55597        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55598$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55599        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55600      fi
55601
55602      # Use eval to expand a potential ~
55603      eval path="$path"
55604      if test ! -f "$path" && test ! -d "$path"; then
55605        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55606      fi
55607
55608      if test -d "$path"; then
55609        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55610      else
55611        dir="`$DIRNAME "$path"`"
55612        base="`$BASENAME "$path"`"
55613        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55614      fi
55615    fi
55616  fi
55617
55618      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55619$as_echo_n "checking for $DLL_NAME... " >&6; }
55620      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55621$as_echo "$MSVC_DLL" >&6; }
55622    else
55623      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55624$as_echo "incorrect, ignoring" >&6; }
55625      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55626$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55627    fi
55628  fi
55629
55630  fi
55631
55632  if test "x$MSVC_DLL" = x; then
55633    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55634    if test "x$VS100COMNTOOLS" != x; then
55635      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55636
55637  windows_path="$CYGWIN_VS_TOOLS_DIR"
55638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55639    unix_path=`$CYGPATH -u "$windows_path"`
55640    CYGWIN_VS_TOOLS_DIR="$unix_path"
55641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55643    CYGWIN_VS_TOOLS_DIR="$unix_path"
55644  fi
55645
55646      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55647        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55648	    | $GREP -i /x64/ | $HEAD --lines 1`
55649      else
55650        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55651	    | $GREP -i /x86/ | $HEAD --lines 1`
55652      fi
55653
55654  DLL_NAME="$DLL_NAME"
55655  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55656  METHOD="search of VS100COMNTOOLS"
55657  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55658    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55659$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55660
55661    # Need to check if the found msvcr is correct architecture
55662    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55663$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55664    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55665    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55666      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55667      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55668      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55669        CORRECT_MSVCR_ARCH="PE32 executable"
55670      else
55671        CORRECT_MSVCR_ARCH="PE32+ executable"
55672      fi
55673    else
55674      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55675        CORRECT_MSVCR_ARCH=386
55676      else
55677        CORRECT_MSVCR_ARCH=x86-64
55678      fi
55679    fi
55680    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55681      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55682$as_echo "ok" >&6; }
55683      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55684
55685  # Only process if variable expands to non-empty
55686
55687  if test "x$MSVC_DLL" != x; then
55688    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55689
55690  # Input might be given as Windows format, start by converting to
55691  # unix format.
55692  path="$MSVC_DLL"
55693  new_path=`$CYGPATH -u "$path"`
55694
55695  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55696  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55697  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55698  # "foo.exe" is OK but "foo" is an error.
55699  #
55700  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55701  # It is also a way to make sure we got the proper file name for the real test later on.
55702  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55703  if test "x$test_shortpath" = x; then
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55705$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55706    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55707  fi
55708
55709  # Call helper function which possibly converts this using DOS-style short mode.
55710  # If so, the updated path is stored in $new_path.
55711
55712  input_path="$new_path"
55713  # Check if we need to convert this using DOS-style short mode. If the path
55714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55715  # take no chances and rewrite it.
55716  # Note: m4 eats our [], so we need to use [ and ] instead.
55717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55718  if test "x$has_forbidden_chars" != x; then
55719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55720    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55721    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55722    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55723      # Going to short mode and back again did indeed matter. Since short mode is
55724      # case insensitive, let's make it lowercase to improve readability.
55725      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55726      # Now convert it back to Unix-style (cygpath)
55727      input_path=`$CYGPATH -u "$shortmode_path"`
55728      new_path="$input_path"
55729    fi
55730  fi
55731
55732  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55733  if test "x$test_cygdrive_prefix" = x; then
55734    # As a simple fix, exclude /usr/bin since it's not a real path.
55735    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55736      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55737      # a path prefixed by /cygdrive for fixpath to work.
55738      new_path="$CYGWIN_ROOT_PATH$input_path"
55739    fi
55740  fi
55741
55742
55743  if test "x$path" != "x$new_path"; then
55744    MSVC_DLL="$new_path"
55745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55746$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55747  fi
55748
55749    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55750
55751  path="$MSVC_DLL"
55752  has_colon=`$ECHO $path | $GREP ^.:`
55753  new_path="$path"
55754  if test "x$has_colon" = x; then
55755    # Not in mixed or Windows style, start by that.
55756    new_path=`cmd //c echo $path`
55757  fi
55758
55759
55760  input_path="$new_path"
55761  # Check if we need to convert this using DOS-style short mode. If the path
55762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55763  # take no chances and rewrite it.
55764  # Note: m4 eats our [], so we need to use [ and ] instead.
55765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55766  if test "x$has_forbidden_chars" != x; then
55767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55768    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55769  fi
55770
55771
55772  windows_path="$new_path"
55773  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55774    unix_path=`$CYGPATH -u "$windows_path"`
55775    new_path="$unix_path"
55776  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55777    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55778    new_path="$unix_path"
55779  fi
55780
55781  if test "x$path" != "x$new_path"; then
55782    MSVC_DLL="$new_path"
55783    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55784$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55785  fi
55786
55787  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55788  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55789
55790    else
55791      # We're on a unix platform. Hooray! :)
55792      path="$MSVC_DLL"
55793      has_space=`$ECHO "$path" | $GREP " "`
55794      if test "x$has_space" != x; then
55795        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55796$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55797        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55798      fi
55799
55800      # Use eval to expand a potential ~
55801      eval path="$path"
55802      if test ! -f "$path" && test ! -d "$path"; then
55803        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55804      fi
55805
55806      if test -d "$path"; then
55807        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55808      else
55809        dir="`$DIRNAME "$path"`"
55810        base="`$BASENAME "$path"`"
55811        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55812      fi
55813    fi
55814  fi
55815
55816      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55817$as_echo_n "checking for $DLL_NAME... " >&6; }
55818      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55819$as_echo "$MSVC_DLL" >&6; }
55820    else
55821      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55822$as_echo "incorrect, ignoring" >&6; }
55823      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55824$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55825    fi
55826  fi
55827
55828    fi
55829  fi
55830
55831  if test "x$MSVC_DLL" = x; then
55832    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55833    # (This was the original behaviour; kept since it might turn something up)
55834    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55835      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55836        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55837	    | $GREP x64 | $HEAD --lines 1`
55838      else
55839        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55840	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55841        if test "x$POSSIBLE_MSVC_DLL" = x; then
55842          # We're grasping at straws now...
55843          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55844	      | $HEAD --lines 1`
55845        fi
55846      fi
55847
55848
55849  DLL_NAME="$DLL_NAME"
55850  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55851  METHOD="search of VCINSTALLDIR"
55852  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55854$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55855
55856    # Need to check if the found msvcr is correct architecture
55857    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55858$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55859    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55861      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55862      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55863      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55864        CORRECT_MSVCR_ARCH="PE32 executable"
55865      else
55866        CORRECT_MSVCR_ARCH="PE32+ executable"
55867      fi
55868    else
55869      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55870        CORRECT_MSVCR_ARCH=386
55871      else
55872        CORRECT_MSVCR_ARCH=x86-64
55873      fi
55874    fi
55875    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55876      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55877$as_echo "ok" >&6; }
55878      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55879
55880  # Only process if variable expands to non-empty
55881
55882  if test "x$MSVC_DLL" != x; then
55883    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55884
55885  # Input might be given as Windows format, start by converting to
55886  # unix format.
55887  path="$MSVC_DLL"
55888  new_path=`$CYGPATH -u "$path"`
55889
55890  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55891  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55892  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55893  # "foo.exe" is OK but "foo" is an error.
55894  #
55895  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55896  # It is also a way to make sure we got the proper file name for the real test later on.
55897  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55898  if test "x$test_shortpath" = x; then
55899    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55900$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55901    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55902  fi
55903
55904  # Call helper function which possibly converts this using DOS-style short mode.
55905  # If so, the updated path is stored in $new_path.
55906
55907  input_path="$new_path"
55908  # Check if we need to convert this using DOS-style short mode. If the path
55909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55910  # take no chances and rewrite it.
55911  # Note: m4 eats our [], so we need to use [ and ] instead.
55912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55913  if test "x$has_forbidden_chars" != x; then
55914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55918      # Going to short mode and back again did indeed matter. Since short mode is
55919      # case insensitive, let's make it lowercase to improve readability.
55920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55921      # Now convert it back to Unix-style (cygpath)
55922      input_path=`$CYGPATH -u "$shortmode_path"`
55923      new_path="$input_path"
55924    fi
55925  fi
55926
55927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55928  if test "x$test_cygdrive_prefix" = x; then
55929    # As a simple fix, exclude /usr/bin since it's not a real path.
55930    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55932      # a path prefixed by /cygdrive for fixpath to work.
55933      new_path="$CYGWIN_ROOT_PATH$input_path"
55934    fi
55935  fi
55936
55937
55938  if test "x$path" != "x$new_path"; then
55939    MSVC_DLL="$new_path"
55940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55941$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55942  fi
55943
55944    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55945
55946  path="$MSVC_DLL"
55947  has_colon=`$ECHO $path | $GREP ^.:`
55948  new_path="$path"
55949  if test "x$has_colon" = x; then
55950    # Not in mixed or Windows style, start by that.
55951    new_path=`cmd //c echo $path`
55952  fi
55953
55954
55955  input_path="$new_path"
55956  # Check if we need to convert this using DOS-style short mode. If the path
55957  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55958  # take no chances and rewrite it.
55959  # Note: m4 eats our [], so we need to use [ and ] instead.
55960  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55961  if test "x$has_forbidden_chars" != x; then
55962    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55963    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55964  fi
55965
55966
55967  windows_path="$new_path"
55968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55969    unix_path=`$CYGPATH -u "$windows_path"`
55970    new_path="$unix_path"
55971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55973    new_path="$unix_path"
55974  fi
55975
55976  if test "x$path" != "x$new_path"; then
55977    MSVC_DLL="$new_path"
55978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55979$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55980  fi
55981
55982  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55983  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55984
55985    else
55986      # We're on a unix platform. Hooray! :)
55987      path="$MSVC_DLL"
55988      has_space=`$ECHO "$path" | $GREP " "`
55989      if test "x$has_space" != x; then
55990        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55991$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55992        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55993      fi
55994
55995      # Use eval to expand a potential ~
55996      eval path="$path"
55997      if test ! -f "$path" && test ! -d "$path"; then
55998        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55999      fi
56000
56001      if test -d "$path"; then
56002        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56003      else
56004        dir="`$DIRNAME "$path"`"
56005        base="`$BASENAME "$path"`"
56006        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56007      fi
56008    fi
56009  fi
56010
56011      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56012$as_echo_n "checking for $DLL_NAME... " >&6; }
56013      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56014$as_echo "$MSVC_DLL" >&6; }
56015    else
56016      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56017$as_echo "incorrect, ignoring" >&6; }
56018      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56019$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56020    fi
56021  fi
56022
56023    fi
56024  fi
56025
56026  if test "x$MSVC_DLL" = x; then
56027    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56028$as_echo_n "checking for $DLL_NAME... " >&6; }
56029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56030$as_echo "no" >&6; }
56031    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56032  fi
56033
56034      MSVCP_DLL="$MSVC_DLL"
56035    fi
56036
56037  fi
56038
56039  fi
56040
56041
56042  if test "x$NEEDS_LIB_X11" = xfalse; then
56043    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56044      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56045$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56046    fi
56047    X_CFLAGS=
56048    X_LIBS=
56049  else
56050
56051    if test "x${with_x}" = xno; then
56052      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56053    fi
56054
56055    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56056      # The user has specified a X11 base directory. Use it for includes and
56057      # libraries, unless explicitly overridden.
56058      if test "x$x_includes" = xNONE; then
56059        x_includes="${with_x}/include"
56060      fi
56061      if test "x$x_libraries" = xNONE; then
56062        x_libraries="${with_x}/lib"
56063      fi
56064    else
56065      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56066      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56067      # --x-libraries for the sysroot, if that seems to be correct.
56068      if test "x$SYSROOT" != "x"; then
56069        if test "x$x_includes" = xNONE; then
56070          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56071            x_includes="$SYSROOT/usr/X11R6/include"
56072          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56073            x_includes="$SYSROOT/usr/include"
56074          fi
56075        fi
56076        if test "x$x_libraries" = xNONE; then
56077          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56078            x_libraries="$SYSROOT/usr/X11R6/lib"
56079          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56080            x_libraries="$SYSROOT/usr/lib64"
56081          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56082            x_libraries="$SYSROOT/usr/lib"
56083          fi
56084        fi
56085      fi
56086    fi
56087
56088    # Now let autoconf do it's magic
56089    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56090$as_echo_n "checking for X... " >&6; }
56091
56092
56093# Check whether --with-x was given.
56094if test "${with_x+set}" = set; then :
56095  withval=$with_x;
56096fi
56097
56098# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56099if test "x$with_x" = xno; then
56100  # The user explicitly disabled X.
56101  have_x=disabled
56102else
56103  case $x_includes,$x_libraries in #(
56104    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56105    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56106  $as_echo_n "(cached) " >&6
56107else
56108  # One or both of the vars are not set, and there is no cached value.
56109ac_x_includes=no ac_x_libraries=no
56110rm -f -r conftest.dir
56111if mkdir conftest.dir; then
56112  cd conftest.dir
56113  cat >Imakefile <<'_ACEOF'
56114incroot:
56115	@echo incroot='${INCROOT}'
56116usrlibdir:
56117	@echo usrlibdir='${USRLIBDIR}'
56118libdir:
56119	@echo libdir='${LIBDIR}'
56120_ACEOF
56121  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56122    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56123    for ac_var in incroot usrlibdir libdir; do
56124      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56125    done
56126    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56127    for ac_extension in a so sl dylib la dll; do
56128      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56129	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56130	ac_im_usrlibdir=$ac_im_libdir; break
56131      fi
56132    done
56133    # Screen out bogus values from the imake configuration.  They are
56134    # bogus both because they are the default anyway, and because
56135    # using them would break gcc on systems where it needs fixed includes.
56136    case $ac_im_incroot in
56137	/usr/include) ac_x_includes= ;;
56138	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56139    esac
56140    case $ac_im_usrlibdir in
56141	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56142	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56143    esac
56144  fi
56145  cd ..
56146  rm -f -r conftest.dir
56147fi
56148
56149# Standard set of common directories for X headers.
56150# Check X11 before X11Rn because it is often a symlink to the current release.
56151ac_x_header_dirs='
56152/usr/X11/include
56153/usr/X11R7/include
56154/usr/X11R6/include
56155/usr/X11R5/include
56156/usr/X11R4/include
56157
56158/usr/include/X11
56159/usr/include/X11R7
56160/usr/include/X11R6
56161/usr/include/X11R5
56162/usr/include/X11R4
56163
56164/usr/local/X11/include
56165/usr/local/X11R7/include
56166/usr/local/X11R6/include
56167/usr/local/X11R5/include
56168/usr/local/X11R4/include
56169
56170/usr/local/include/X11
56171/usr/local/include/X11R7
56172/usr/local/include/X11R6
56173/usr/local/include/X11R5
56174/usr/local/include/X11R4
56175
56176/usr/X386/include
56177/usr/x386/include
56178/usr/XFree86/include/X11
56179
56180/usr/include
56181/usr/local/include
56182/usr/unsupported/include
56183/usr/athena/include
56184/usr/local/x11r5/include
56185/usr/lpp/Xamples/include
56186
56187/usr/openwin/include
56188/usr/openwin/share/include'
56189
56190if test "$ac_x_includes" = no; then
56191  # Guess where to find include files, by looking for Xlib.h.
56192  # First, try using that file with no special directory specified.
56193  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56194/* end confdefs.h.  */
56195#include <X11/Xlib.h>
56196_ACEOF
56197if ac_fn_cxx_try_cpp "$LINENO"; then :
56198  # We can compile using X headers with no special include directory.
56199ac_x_includes=
56200else
56201  for ac_dir in $ac_x_header_dirs; do
56202  if test -r "$ac_dir/X11/Xlib.h"; then
56203    ac_x_includes=$ac_dir
56204    break
56205  fi
56206done
56207fi
56208rm -f conftest.err conftest.i conftest.$ac_ext
56209fi # $ac_x_includes = no
56210
56211if test "$ac_x_libraries" = no; then
56212  # Check for the libraries.
56213  # See if we find them without any special options.
56214  # Don't add to $LIBS permanently.
56215  ac_save_LIBS=$LIBS
56216  LIBS="-lX11 $LIBS"
56217  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56218/* end confdefs.h.  */
56219#include <X11/Xlib.h>
56220int
56221main ()
56222{
56223XrmInitialize ()
56224  ;
56225  return 0;
56226}
56227_ACEOF
56228if ac_fn_cxx_try_link "$LINENO"; then :
56229  LIBS=$ac_save_LIBS
56230# We can link X programs with no special library path.
56231ac_x_libraries=
56232else
56233  LIBS=$ac_save_LIBS
56234for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56235do
56236  # Don't even attempt the hair of trying to link an X program!
56237  for ac_extension in a so sl dylib la dll; do
56238    if test -r "$ac_dir/libX11.$ac_extension"; then
56239      ac_x_libraries=$ac_dir
56240      break 2
56241    fi
56242  done
56243done
56244fi
56245rm -f core conftest.err conftest.$ac_objext \
56246    conftest$ac_exeext conftest.$ac_ext
56247fi # $ac_x_libraries = no
56248
56249case $ac_x_includes,$ac_x_libraries in #(
56250  no,* | *,no | *\'*)
56251    # Didn't find X, or a directory has "'" in its name.
56252    ac_cv_have_x="have_x=no";; #(
56253  *)
56254    # Record where we found X for the cache.
56255    ac_cv_have_x="have_x=yes\
56256	ac_x_includes='$ac_x_includes'\
56257	ac_x_libraries='$ac_x_libraries'"
56258esac
56259fi
56260;; #(
56261    *) have_x=yes;;
56262  esac
56263  eval "$ac_cv_have_x"
56264fi # $with_x != no
56265
56266if test "$have_x" != yes; then
56267  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56268$as_echo "$have_x" >&6; }
56269  no_x=yes
56270else
56271  # If each of the values was on the command line, it overrides each guess.
56272  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56273  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56274  # Update the cache value to reflect the command line values.
56275  ac_cv_have_x="have_x=yes\
56276	ac_x_includes='$x_includes'\
56277	ac_x_libraries='$x_libraries'"
56278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56279$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56280fi
56281
56282    if test "$no_x" = yes; then
56283  # Not all programs may use this symbol, but it does not hurt to define it.
56284
56285$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56286
56287  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56288else
56289  if test -n "$x_includes"; then
56290    X_CFLAGS="$X_CFLAGS -I$x_includes"
56291  fi
56292
56293  # It would also be nice to do this for all -L options, not just this one.
56294  if test -n "$x_libraries"; then
56295    X_LIBS="$X_LIBS -L$x_libraries"
56296    # For Solaris; some versions of Sun CC require a space after -R and
56297    # others require no space.  Words are not sufficient . . . .
56298    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56299$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56300    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56301    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56302    ac_cxx_werror_flag=yes
56303    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56304/* end confdefs.h.  */
56305
56306int
56307main ()
56308{
56309
56310  ;
56311  return 0;
56312}
56313_ACEOF
56314if ac_fn_cxx_try_link "$LINENO"; then :
56315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56316$as_echo "no" >&6; }
56317       X_LIBS="$X_LIBS -R$x_libraries"
56318else
56319  LIBS="$ac_xsave_LIBS -R $x_libraries"
56320       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56321/* end confdefs.h.  */
56322
56323int
56324main ()
56325{
56326
56327  ;
56328  return 0;
56329}
56330_ACEOF
56331if ac_fn_cxx_try_link "$LINENO"; then :
56332  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56333$as_echo "yes" >&6; }
56334	  X_LIBS="$X_LIBS -R $x_libraries"
56335else
56336  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56337$as_echo "neither works" >&6; }
56338fi
56339rm -f core conftest.err conftest.$ac_objext \
56340    conftest$ac_exeext conftest.$ac_ext
56341fi
56342rm -f core conftest.err conftest.$ac_objext \
56343    conftest$ac_exeext conftest.$ac_ext
56344    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56345    LIBS=$ac_xsave_LIBS
56346  fi
56347
56348  # Check for system-dependent libraries X programs must link with.
56349  # Do this before checking for the system-independent R6 libraries
56350  # (-lICE), since we may need -lsocket or whatever for X linking.
56351
56352  if test "$ISC" = yes; then
56353    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56354  else
56355    # Martyn Johnson says this is needed for Ultrix, if the X
56356    # libraries were built with DECnet support.  And Karl Berry says
56357    # the Alpha needs dnet_stub (dnet does not exist).
56358    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56359    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56360/* end confdefs.h.  */
56361
56362/* Override any GCC internal prototype to avoid an error.
56363   Use char because int might match the return type of a GCC
56364   builtin and then its argument prototype would still apply.  */
56365#ifdef __cplusplus
56366extern "C"
56367#endif
56368char XOpenDisplay ();
56369int
56370main ()
56371{
56372return XOpenDisplay ();
56373  ;
56374  return 0;
56375}
56376_ACEOF
56377if ac_fn_cxx_try_link "$LINENO"; then :
56378
56379else
56380  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56381$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56382if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56383  $as_echo_n "(cached) " >&6
56384else
56385  ac_check_lib_save_LIBS=$LIBS
56386LIBS="-ldnet  $LIBS"
56387cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56388/* end confdefs.h.  */
56389
56390/* Override any GCC internal prototype to avoid an error.
56391   Use char because int might match the return type of a GCC
56392   builtin and then its argument prototype would still apply.  */
56393#ifdef __cplusplus
56394extern "C"
56395#endif
56396char dnet_ntoa ();
56397int
56398main ()
56399{
56400return dnet_ntoa ();
56401  ;
56402  return 0;
56403}
56404_ACEOF
56405if ac_fn_cxx_try_link "$LINENO"; then :
56406  ac_cv_lib_dnet_dnet_ntoa=yes
56407else
56408  ac_cv_lib_dnet_dnet_ntoa=no
56409fi
56410rm -f core conftest.err conftest.$ac_objext \
56411    conftest$ac_exeext conftest.$ac_ext
56412LIBS=$ac_check_lib_save_LIBS
56413fi
56414{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56415$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56416if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56417  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56418fi
56419
56420    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56421      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56422$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56423if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56424  $as_echo_n "(cached) " >&6
56425else
56426  ac_check_lib_save_LIBS=$LIBS
56427LIBS="-ldnet_stub  $LIBS"
56428cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56429/* end confdefs.h.  */
56430
56431/* Override any GCC internal prototype to avoid an error.
56432   Use char because int might match the return type of a GCC
56433   builtin and then its argument prototype would still apply.  */
56434#ifdef __cplusplus
56435extern "C"
56436#endif
56437char dnet_ntoa ();
56438int
56439main ()
56440{
56441return dnet_ntoa ();
56442  ;
56443  return 0;
56444}
56445_ACEOF
56446if ac_fn_cxx_try_link "$LINENO"; then :
56447  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56448else
56449  ac_cv_lib_dnet_stub_dnet_ntoa=no
56450fi
56451rm -f core conftest.err conftest.$ac_objext \
56452    conftest$ac_exeext conftest.$ac_ext
56453LIBS=$ac_check_lib_save_LIBS
56454fi
56455{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56456$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56457if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56458  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56459fi
56460
56461    fi
56462fi
56463rm -f core conftest.err conftest.$ac_objext \
56464    conftest$ac_exeext conftest.$ac_ext
56465    LIBS="$ac_xsave_LIBS"
56466
56467    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56468    # to get the SysV transport functions.
56469    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56470    # needs -lnsl.
56471    # The nsl library prevents programs from opening the X display
56472    # on Irix 5.2, according to T.E. Dickey.
56473    # The functions gethostbyname, getservbyname, and inet_addr are
56474    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56475    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56476if test "x$ac_cv_func_gethostbyname" = xyes; then :
56477
56478fi
56479
56480    if test $ac_cv_func_gethostbyname = no; then
56481      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56482$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56483if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56484  $as_echo_n "(cached) " >&6
56485else
56486  ac_check_lib_save_LIBS=$LIBS
56487LIBS="-lnsl  $LIBS"
56488cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56489/* end confdefs.h.  */
56490
56491/* Override any GCC internal prototype to avoid an error.
56492   Use char because int might match the return type of a GCC
56493   builtin and then its argument prototype would still apply.  */
56494#ifdef __cplusplus
56495extern "C"
56496#endif
56497char gethostbyname ();
56498int
56499main ()
56500{
56501return gethostbyname ();
56502  ;
56503  return 0;
56504}
56505_ACEOF
56506if ac_fn_cxx_try_link "$LINENO"; then :
56507  ac_cv_lib_nsl_gethostbyname=yes
56508else
56509  ac_cv_lib_nsl_gethostbyname=no
56510fi
56511rm -f core conftest.err conftest.$ac_objext \
56512    conftest$ac_exeext conftest.$ac_ext
56513LIBS=$ac_check_lib_save_LIBS
56514fi
56515{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56516$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56517if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56518  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56519fi
56520
56521      if test $ac_cv_lib_nsl_gethostbyname = no; then
56522	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56523$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56524if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56525  $as_echo_n "(cached) " >&6
56526else
56527  ac_check_lib_save_LIBS=$LIBS
56528LIBS="-lbsd  $LIBS"
56529cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56530/* end confdefs.h.  */
56531
56532/* Override any GCC internal prototype to avoid an error.
56533   Use char because int might match the return type of a GCC
56534   builtin and then its argument prototype would still apply.  */
56535#ifdef __cplusplus
56536extern "C"
56537#endif
56538char gethostbyname ();
56539int
56540main ()
56541{
56542return gethostbyname ();
56543  ;
56544  return 0;
56545}
56546_ACEOF
56547if ac_fn_cxx_try_link "$LINENO"; then :
56548  ac_cv_lib_bsd_gethostbyname=yes
56549else
56550  ac_cv_lib_bsd_gethostbyname=no
56551fi
56552rm -f core conftest.err conftest.$ac_objext \
56553    conftest$ac_exeext conftest.$ac_ext
56554LIBS=$ac_check_lib_save_LIBS
56555fi
56556{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56557$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56558if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56559  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56560fi
56561
56562      fi
56563    fi
56564
56565    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56566    # socket/setsockopt and other routines are undefined under SCO ODT
56567    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56568    # on later versions), says Simon Leinen: it contains gethostby*
56569    # variants that don't use the name server (or something).  -lsocket
56570    # must be given before -lnsl if both are needed.  We assume that
56571    # if connect needs -lnsl, so does gethostbyname.
56572    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56573if test "x$ac_cv_func_connect" = xyes; then :
56574
56575fi
56576
56577    if test $ac_cv_func_connect = no; then
56578      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56579$as_echo_n "checking for connect in -lsocket... " >&6; }
56580if ${ac_cv_lib_socket_connect+:} false; then :
56581  $as_echo_n "(cached) " >&6
56582else
56583  ac_check_lib_save_LIBS=$LIBS
56584LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56585cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56586/* end confdefs.h.  */
56587
56588/* Override any GCC internal prototype to avoid an error.
56589   Use char because int might match the return type of a GCC
56590   builtin and then its argument prototype would still apply.  */
56591#ifdef __cplusplus
56592extern "C"
56593#endif
56594char connect ();
56595int
56596main ()
56597{
56598return connect ();
56599  ;
56600  return 0;
56601}
56602_ACEOF
56603if ac_fn_cxx_try_link "$LINENO"; then :
56604  ac_cv_lib_socket_connect=yes
56605else
56606  ac_cv_lib_socket_connect=no
56607fi
56608rm -f core conftest.err conftest.$ac_objext \
56609    conftest$ac_exeext conftest.$ac_ext
56610LIBS=$ac_check_lib_save_LIBS
56611fi
56612{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56613$as_echo "$ac_cv_lib_socket_connect" >&6; }
56614if test "x$ac_cv_lib_socket_connect" = xyes; then :
56615  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56616fi
56617
56618    fi
56619
56620    # Guillermo Gomez says -lposix is necessary on A/UX.
56621    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56622if test "x$ac_cv_func_remove" = xyes; then :
56623
56624fi
56625
56626    if test $ac_cv_func_remove = no; then
56627      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56628$as_echo_n "checking for remove in -lposix... " >&6; }
56629if ${ac_cv_lib_posix_remove+:} false; then :
56630  $as_echo_n "(cached) " >&6
56631else
56632  ac_check_lib_save_LIBS=$LIBS
56633LIBS="-lposix  $LIBS"
56634cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56635/* end confdefs.h.  */
56636
56637/* Override any GCC internal prototype to avoid an error.
56638   Use char because int might match the return type of a GCC
56639   builtin and then its argument prototype would still apply.  */
56640#ifdef __cplusplus
56641extern "C"
56642#endif
56643char remove ();
56644int
56645main ()
56646{
56647return remove ();
56648  ;
56649  return 0;
56650}
56651_ACEOF
56652if ac_fn_cxx_try_link "$LINENO"; then :
56653  ac_cv_lib_posix_remove=yes
56654else
56655  ac_cv_lib_posix_remove=no
56656fi
56657rm -f core conftest.err conftest.$ac_objext \
56658    conftest$ac_exeext conftest.$ac_ext
56659LIBS=$ac_check_lib_save_LIBS
56660fi
56661{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56662$as_echo "$ac_cv_lib_posix_remove" >&6; }
56663if test "x$ac_cv_lib_posix_remove" = xyes; then :
56664  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56665fi
56666
56667    fi
56668
56669    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56670    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56671if test "x$ac_cv_func_shmat" = xyes; then :
56672
56673fi
56674
56675    if test $ac_cv_func_shmat = no; then
56676      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56677$as_echo_n "checking for shmat in -lipc... " >&6; }
56678if ${ac_cv_lib_ipc_shmat+:} false; then :
56679  $as_echo_n "(cached) " >&6
56680else
56681  ac_check_lib_save_LIBS=$LIBS
56682LIBS="-lipc  $LIBS"
56683cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56684/* end confdefs.h.  */
56685
56686/* Override any GCC internal prototype to avoid an error.
56687   Use char because int might match the return type of a GCC
56688   builtin and then its argument prototype would still apply.  */
56689#ifdef __cplusplus
56690extern "C"
56691#endif
56692char shmat ();
56693int
56694main ()
56695{
56696return shmat ();
56697  ;
56698  return 0;
56699}
56700_ACEOF
56701if ac_fn_cxx_try_link "$LINENO"; then :
56702  ac_cv_lib_ipc_shmat=yes
56703else
56704  ac_cv_lib_ipc_shmat=no
56705fi
56706rm -f core conftest.err conftest.$ac_objext \
56707    conftest$ac_exeext conftest.$ac_ext
56708LIBS=$ac_check_lib_save_LIBS
56709fi
56710{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56711$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56712if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56713  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56714fi
56715
56716    fi
56717  fi
56718
56719  # Check for libraries that X11R6 Xt/Xaw programs need.
56720  ac_save_LDFLAGS=$LDFLAGS
56721  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56722  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56723  # check for ICE first), but we must link in the order -lSM -lICE or
56724  # we get undefined symbols.  So assume we have SM if we have ICE.
56725  # These have to be linked with before -lX11, unlike the other
56726  # libraries we check for below, so use a different variable.
56727  # John Interrante, Karl Berry
56728  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56729$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56730if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56731  $as_echo_n "(cached) " >&6
56732else
56733  ac_check_lib_save_LIBS=$LIBS
56734LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56735cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56736/* end confdefs.h.  */
56737
56738/* Override any GCC internal prototype to avoid an error.
56739   Use char because int might match the return type of a GCC
56740   builtin and then its argument prototype would still apply.  */
56741#ifdef __cplusplus
56742extern "C"
56743#endif
56744char IceConnectionNumber ();
56745int
56746main ()
56747{
56748return IceConnectionNumber ();
56749  ;
56750  return 0;
56751}
56752_ACEOF
56753if ac_fn_cxx_try_link "$LINENO"; then :
56754  ac_cv_lib_ICE_IceConnectionNumber=yes
56755else
56756  ac_cv_lib_ICE_IceConnectionNumber=no
56757fi
56758rm -f core conftest.err conftest.$ac_objext \
56759    conftest$ac_exeext conftest.$ac_ext
56760LIBS=$ac_check_lib_save_LIBS
56761fi
56762{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56763$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56764if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56765  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56766fi
56767
56768  LDFLAGS=$ac_save_LDFLAGS
56769
56770fi
56771
56772
56773    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56774    # this doesn't make sense so we remove it.
56775    if test "x$COMPILE_TYPE" = xcross; then
56776      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56777    fi
56778
56779    if test "x$no_x" = xyes; then
56780
56781  # Print a helpful message on how to acquire the necessary build dependency.
56782  # x11 is the help tag: freetype, cups, alsa etc
56783  MISSING_DEPENDENCY=x11
56784
56785  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56786    cygwin_help $MISSING_DEPENDENCY
56787  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56788    msys_help $MISSING_DEPENDENCY
56789  else
56790    PKGHANDLER_COMMAND=
56791
56792    case $PKGHANDLER in
56793      apt-get)
56794        apt_help     $MISSING_DEPENDENCY ;;
56795      yum)
56796        yum_help     $MISSING_DEPENDENCY ;;
56797      brew)
56798        brew_help    $MISSING_DEPENDENCY ;;
56799      port)
56800        port_help    $MISSING_DEPENDENCY ;;
56801      pkgutil)
56802        pkgutil_help $MISSING_DEPENDENCY ;;
56803      pkgadd)
56804        pkgadd_help  $MISSING_DEPENDENCY ;;
56805    esac
56806
56807    if test "x$PKGHANDLER_COMMAND" != x; then
56808      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56809    fi
56810  fi
56811
56812      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56813    fi
56814
56815    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56816      OPENWIN_HOME="/usr/openwin"
56817      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56818      X_LIBS="-L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56819          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56820    fi
56821
56822    ac_ext=c
56823ac_cpp='$CPP $CPPFLAGS'
56824ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56825ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56826ac_compiler_gnu=$ac_cv_c_compiler_gnu
56827
56828    OLD_CFLAGS="$CFLAGS"
56829    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56830
56831    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56832    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56833do :
56834  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56835ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56836          # include <X11/Xlib.h>
56837          # include <X11/Xutil.h>
56838
56839
56840"
56841if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56842  cat >>confdefs.h <<_ACEOF
56843#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56844_ACEOF
56845 X11_HEADERS_OK=yes
56846else
56847  X11_HEADERS_OK=no; break
56848fi
56849
56850done
56851
56852
56853    if test "x$X11_HEADERS_OK" = xno; then
56854
56855  # Print a helpful message on how to acquire the necessary build dependency.
56856  # x11 is the help tag: freetype, cups, alsa etc
56857  MISSING_DEPENDENCY=x11
56858
56859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56860    cygwin_help $MISSING_DEPENDENCY
56861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56862    msys_help $MISSING_DEPENDENCY
56863  else
56864    PKGHANDLER_COMMAND=
56865
56866    case $PKGHANDLER in
56867      apt-get)
56868        apt_help     $MISSING_DEPENDENCY ;;
56869      yum)
56870        yum_help     $MISSING_DEPENDENCY ;;
56871      brew)
56872        brew_help    $MISSING_DEPENDENCY ;;
56873      port)
56874        port_help    $MISSING_DEPENDENCY ;;
56875      pkgutil)
56876        pkgutil_help $MISSING_DEPENDENCY ;;
56877      pkgadd)
56878        pkgadd_help  $MISSING_DEPENDENCY ;;
56879    esac
56880
56881    if test "x$PKGHANDLER_COMMAND" != x; then
56882      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56883    fi
56884  fi
56885
56886      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56887    fi
56888
56889    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56890    # defined in libawt_xawt.
56891    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56892$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56893    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56894/* end confdefs.h.  */
56895#include <X11/extensions/Xrender.h>
56896int
56897main ()
56898{
56899XLinearGradient x;
56900  ;
56901  return 0;
56902}
56903_ACEOF
56904if ac_fn_c_try_compile "$LINENO"; then :
56905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56906$as_echo "yes" >&6; }
56907else
56908  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56909$as_echo "no" >&6; }
56910         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56911fi
56912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56913
56914    CFLAGS="$OLD_CFLAGS"
56915    ac_ext=cpp
56916ac_cpp='$CXXCPP $CPPFLAGS'
56917ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56918ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56919ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56920
56921  fi # NEEDS_LIB_X11
56922
56923
56924
56925
56926
56927
56928# Check whether --with-cups was given.
56929if test "${with_cups+set}" = set; then :
56930  withval=$with_cups;
56931fi
56932
56933
56934# Check whether --with-cups-include was given.
56935if test "${with_cups_include+set}" = set; then :
56936  withval=$with_cups_include;
56937fi
56938
56939
56940  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56941    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56942        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56943      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56944$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56945    fi
56946    CUPS_CFLAGS=
56947  else
56948    CUPS_FOUND=no
56949
56950    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56951      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56952    fi
56953
56954    if test "x${with_cups}" != x; then
56955      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56956$as_echo_n "checking for cups headers... " >&6; }
56957      if test -s "${with_cups}/include/cups/cups.h"; then
56958        CUPS_CFLAGS="-I${with_cups}/include"
56959        CUPS_FOUND=yes
56960        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56961$as_echo "$CUPS_FOUND" >&6; }
56962      else
56963        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56964      fi
56965    fi
56966    if test "x${with_cups_include}" != x; then
56967      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56968$as_echo_n "checking for cups headers... " >&6; }
56969      if test -s "${with_cups_include}/cups/cups.h"; then
56970        CUPS_CFLAGS="-I${with_cups_include}"
56971        CUPS_FOUND=yes
56972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56973$as_echo "$CUPS_FOUND" >&6; }
56974      else
56975        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56976      fi
56977    fi
56978    if test "x$CUPS_FOUND" = xno; then
56979      # Are the cups headers installed in the default /usr/include location?
56980      for ac_header in cups/cups.h cups/ppd.h
56981do :
56982  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56983ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56984if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56985  cat >>confdefs.h <<_ACEOF
56986#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56987_ACEOF
56988
56989          CUPS_FOUND=yes
56990          CUPS_CFLAGS=
56991          DEFAULT_CUPS=yes
56992
56993fi
56994
56995done
56996
56997    fi
56998    if test "x$CUPS_FOUND" = xno; then
56999
57000  # Print a helpful message on how to acquire the necessary build dependency.
57001  # cups is the help tag: freetype, cups, alsa etc
57002  MISSING_DEPENDENCY=cups
57003
57004  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57005    cygwin_help $MISSING_DEPENDENCY
57006  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57007    msys_help $MISSING_DEPENDENCY
57008  else
57009    PKGHANDLER_COMMAND=
57010
57011    case $PKGHANDLER in
57012      apt-get)
57013        apt_help     $MISSING_DEPENDENCY ;;
57014      yum)
57015        yum_help     $MISSING_DEPENDENCY ;;
57016      brew)
57017        brew_help    $MISSING_DEPENDENCY ;;
57018      port)
57019        port_help    $MISSING_DEPENDENCY ;;
57020      pkgutil)
57021        pkgutil_help $MISSING_DEPENDENCY ;;
57022      pkgadd)
57023        pkgadd_help  $MISSING_DEPENDENCY ;;
57024    esac
57025
57026    if test "x$PKGHANDLER_COMMAND" != x; then
57027      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57028    fi
57029  fi
57030
57031      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57032    fi
57033  fi
57034
57035
57036
57037
57038
57039# Check whether --with-freetype was given.
57040if test "${with_freetype+set}" = set; then :
57041  withval=$with_freetype;
57042fi
57043
57044
57045# Check whether --with-freetype-include was given.
57046if test "${with_freetype_include+set}" = set; then :
57047  withval=$with_freetype_include;
57048fi
57049
57050
57051# Check whether --with-freetype-lib was given.
57052if test "${with_freetype_lib+set}" = set; then :
57053  withval=$with_freetype_lib;
57054fi
57055
57056
57057# Check whether --with-freetype-src was given.
57058if test "${with_freetype_src+set}" = set; then :
57059  withval=$with_freetype_src;
57060fi
57061
57062  # Check whether --enable-freetype-bundling was given.
57063if test "${enable_freetype_bundling+set}" = set; then :
57064  enableval=$enable_freetype_bundling;
57065fi
57066
57067
57068  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57069  FREETYPE_BASE_NAME=freetype
57070  FREETYPE_CFLAGS=
57071  FREETYPE_LIBS=
57072  FREETYPE_BUNDLE_LIB_PATH=
57073
57074  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57075    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57076        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57077        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57078        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57079      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57080$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57081    fi
57082    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57083      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57084$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57085    fi
57086  else
57087    # freetype is needed to build; go get it!
57088
57089    BUNDLE_FREETYPE="$enable_freetype_bundling"
57090
57091    if  test "x$with_freetype_src" != x; then
57092      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57093        # Try to build freetype if --with-freetype-src was given on Windows
57094
57095  FREETYPE_SRC_PATH="$with_freetype_src"
57096  BUILD_FREETYPE=yes
57097
57098  # Check if the freetype sources are acessible..
57099  if ! test -d $FREETYPE_SRC_PATH; then
57100    { $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
57101$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57102    BUILD_FREETYPE=no
57103  fi
57104  # ..and contain a vc2010 project file
57105  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57106  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57107    { $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
57108$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57109    BUILD_FREETYPE=no
57110  fi
57111  # Now check if configure found a version of 'msbuild.exe'
57112  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57113    { $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
57114$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;}
57115    BUILD_FREETYPE=no
57116  fi
57117
57118  # Ready to go..
57119  if test "x$BUILD_FREETYPE" = xyes; then
57120    # msbuild requires trailing slashes for output directories
57121    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57122    freetype_lib_path_unix="$freetype_lib_path"
57123    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57124
57125  unix_path="$vcxproj_path"
57126  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57127    windows_path=`$CYGPATH -m "$unix_path"`
57128    vcxproj_path="$windows_path"
57129  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57130    windows_path=`cmd //c echo $unix_path`
57131    vcxproj_path="$windows_path"
57132  fi
57133
57134
57135  unix_path="$freetype_lib_path"
57136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57137    windows_path=`$CYGPATH -m "$unix_path"`
57138    freetype_lib_path="$windows_path"
57139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57140    windows_path=`cmd //c echo $unix_path`
57141    freetype_lib_path="$windows_path"
57142  fi
57143
57144
57145  unix_path="$freetype_obj_path"
57146  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57147    windows_path=`$CYGPATH -m "$unix_path"`
57148    freetype_obj_path="$windows_path"
57149  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57150    windows_path=`cmd //c echo $unix_path`
57151    freetype_obj_path="$windows_path"
57152  fi
57153
57154    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57155      freetype_platform=x64
57156    else
57157      freetype_platform=win32
57158    fi
57159
57160    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57161    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57162    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57163    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57164    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57165$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57166
57167    # First we try to build the freetype.dll
57168    $ECHO -e "@echo off\n"\
57169        "$MSBUILD $vcxproj_path "\
57170        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57171        "/p:Configuration=\"Release Multithreaded\" "\
57172        "/p:Platform=$freetype_platform "\
57173        "/p:ConfigurationType=DynamicLibrary "\
57174        "/p:TargetName=freetype "\
57175        "/p:OutDir=\"$freetype_lib_path\" "\
57176        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57177    cmd /c freetype.bat
57178
57179    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57180      # If that succeeds we also build freetype.lib
57181      $ECHO -e "@echo off\n"\
57182          "$MSBUILD $vcxproj_path "\
57183          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57184          "/p:Configuration=\"Release Multithreaded\" "\
57185          "/p:Platform=$freetype_platform "\
57186          "/p:ConfigurationType=StaticLibrary "\
57187          "/p:TargetName=freetype "\
57188          "/p:OutDir=\"$freetype_lib_path\" "\
57189          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57190      cmd /c freetype.bat
57191
57192      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57193        # Once we build both, lib and dll, set freetype lib and include path appropriately
57194        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57195        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57196        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57197$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57198      else
57199        BUILD_FREETYPE=no
57200      fi
57201    else
57202      BUILD_FREETYPE=no
57203    fi
57204  fi
57205
57206        if test "x$BUILD_FREETYPE" = xyes; then
57207          # Okay, we built it. Check that it works.
57208
57209  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57210  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57211  METHOD="--with-freetype-src"
57212
57213  # Let's start with an optimistic view of the world :-)
57214  FOUND_FREETYPE=yes
57215
57216  # First look for the canonical freetype main include file ft2build.h.
57217  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57218    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57219    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57220    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57221      # Fail.
57222      FOUND_FREETYPE=no
57223    fi
57224  fi
57225
57226  if test "x$FOUND_FREETYPE" = xyes; then
57227    # Include file found, let's continue the sanity check.
57228    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57229$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57230
57231    # Reset to default value
57232    FREETYPE_BASE_NAME=freetype
57233    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57234    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57235      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57236          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57237        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57238        # for the .6 version explicitly.
57239        FREETYPE_BASE_NAME=freetype.6
57240        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57241        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57242$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57243      else
57244        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57245$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57246        FOUND_FREETYPE=no
57247      fi
57248    else
57249      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57250        # On Windows, we will need both .lib and .dll file.
57251        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57252          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57253$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57254          FOUND_FREETYPE=no
57255        fi
57256      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57257          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57258        # Found lib in isa dir, use that instead.
57259        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57260        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57261$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57262      fi
57263    fi
57264  fi
57265
57266  if test "x$FOUND_FREETYPE" = xyes; then
57267
57268  # Only process if variable expands to non-empty
57269
57270  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57272
57273  # Input might be given as Windows format, start by converting to
57274  # unix format.
57275  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57276  new_path=`$CYGPATH -u "$path"`
57277
57278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57281  # "foo.exe" is OK but "foo" is an error.
57282  #
57283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57284  # It is also a way to make sure we got the proper file name for the real test later on.
57285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57286  if test "x$test_shortpath" = x; then
57287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57288$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57289    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57290  fi
57291
57292  # Call helper function which possibly converts this using DOS-style short mode.
57293  # If so, the updated path is stored in $new_path.
57294
57295  input_path="$new_path"
57296  # Check if we need to convert this using DOS-style short mode. If the path
57297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57298  # take no chances and rewrite it.
57299  # Note: m4 eats our [], so we need to use [ and ] instead.
57300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57301  if test "x$has_forbidden_chars" != x; then
57302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57306      # Going to short mode and back again did indeed matter. Since short mode is
57307      # case insensitive, let's make it lowercase to improve readability.
57308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57309      # Now convert it back to Unix-style (cygpath)
57310      input_path=`$CYGPATH -u "$shortmode_path"`
57311      new_path="$input_path"
57312    fi
57313  fi
57314
57315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57316  if test "x$test_cygdrive_prefix" = x; then
57317    # As a simple fix, exclude /usr/bin since it's not a real path.
57318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57320      # a path prefixed by /cygdrive for fixpath to work.
57321      new_path="$CYGWIN_ROOT_PATH$input_path"
57322    fi
57323  fi
57324
57325
57326  if test "x$path" != "x$new_path"; then
57327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57330  fi
57331
57332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57333
57334  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57335  has_colon=`$ECHO $path | $GREP ^.:`
57336  new_path="$path"
57337  if test "x$has_colon" = x; then
57338    # Not in mixed or Windows style, start by that.
57339    new_path=`cmd //c echo $path`
57340  fi
57341
57342
57343  input_path="$new_path"
57344  # Check if we need to convert this using DOS-style short mode. If the path
57345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57346  # take no chances and rewrite it.
57347  # Note: m4 eats our [], so we need to use [ and ] instead.
57348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57349  if test "x$has_forbidden_chars" != x; then
57350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57352  fi
57353
57354
57355  windows_path="$new_path"
57356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57357    unix_path=`$CYGPATH -u "$windows_path"`
57358    new_path="$unix_path"
57359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57361    new_path="$unix_path"
57362  fi
57363
57364  if test "x$path" != "x$new_path"; then
57365    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57367$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57368  fi
57369
57370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57372
57373    else
57374      # We're on a unix platform. Hooray! :)
57375      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57376      has_space=`$ECHO "$path" | $GREP " "`
57377      if test "x$has_space" != x; then
57378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57379$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57381      fi
57382
57383      # Use eval to expand a potential ~
57384      eval path="$path"
57385      if test ! -f "$path" && test ! -d "$path"; then
57386        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57387      fi
57388
57389      if test -d "$path"; then
57390        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57391      else
57392        dir="`$DIRNAME "$path"`"
57393        base="`$BASENAME "$path"`"
57394        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57395      fi
57396    fi
57397  fi
57398
57399
57400  # Only process if variable expands to non-empty
57401
57402  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57403    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57404
57405  # Input might be given as Windows format, start by converting to
57406  # unix format.
57407  path="$POTENTIAL_FREETYPE_LIB_PATH"
57408  new_path=`$CYGPATH -u "$path"`
57409
57410  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57411  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57412  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57413  # "foo.exe" is OK but "foo" is an error.
57414  #
57415  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57416  # It is also a way to make sure we got the proper file name for the real test later on.
57417  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57418  if test "x$test_shortpath" = x; then
57419    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57420$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57421    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57422  fi
57423
57424  # Call helper function which possibly converts this using DOS-style short mode.
57425  # If so, the updated path is stored in $new_path.
57426
57427  input_path="$new_path"
57428  # Check if we need to convert this using DOS-style short mode. If the path
57429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57430  # take no chances and rewrite it.
57431  # Note: m4 eats our [], so we need to use [ and ] instead.
57432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57433  if test "x$has_forbidden_chars" != x; then
57434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57438      # Going to short mode and back again did indeed matter. Since short mode is
57439      # case insensitive, let's make it lowercase to improve readability.
57440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57441      # Now convert it back to Unix-style (cygpath)
57442      input_path=`$CYGPATH -u "$shortmode_path"`
57443      new_path="$input_path"
57444    fi
57445  fi
57446
57447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57448  if test "x$test_cygdrive_prefix" = x; then
57449    # As a simple fix, exclude /usr/bin since it's not a real path.
57450    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57452      # a path prefixed by /cygdrive for fixpath to work.
57453      new_path="$CYGWIN_ROOT_PATH$input_path"
57454    fi
57455  fi
57456
57457
57458  if test "x$path" != "x$new_path"; then
57459    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57462  fi
57463
57464    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57465
57466  path="$POTENTIAL_FREETYPE_LIB_PATH"
57467  has_colon=`$ECHO $path | $GREP ^.:`
57468  new_path="$path"
57469  if test "x$has_colon" = x; then
57470    # Not in mixed or Windows style, start by that.
57471    new_path=`cmd //c echo $path`
57472  fi
57473
57474
57475  input_path="$new_path"
57476  # Check if we need to convert this using DOS-style short mode. If the path
57477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57478  # take no chances and rewrite it.
57479  # Note: m4 eats our [], so we need to use [ and ] instead.
57480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57481  if test "x$has_forbidden_chars" != x; then
57482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57484  fi
57485
57486
57487  windows_path="$new_path"
57488  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57489    unix_path=`$CYGPATH -u "$windows_path"`
57490    new_path="$unix_path"
57491  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57492    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57493    new_path="$unix_path"
57494  fi
57495
57496  if test "x$path" != "x$new_path"; then
57497    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57498    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57499$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57500  fi
57501
57502  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57503  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57504
57505    else
57506      # We're on a unix platform. Hooray! :)
57507      path="$POTENTIAL_FREETYPE_LIB_PATH"
57508      has_space=`$ECHO "$path" | $GREP " "`
57509      if test "x$has_space" != x; then
57510        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57511$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57512        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57513      fi
57514
57515      # Use eval to expand a potential ~
57516      eval path="$path"
57517      if test ! -f "$path" && test ! -d "$path"; then
57518        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57519      fi
57520
57521      if test -d "$path"; then
57522        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57523      else
57524        dir="`$DIRNAME "$path"`"
57525        base="`$BASENAME "$path"`"
57526        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57527      fi
57528    fi
57529  fi
57530
57531
57532    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57533    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57534$as_echo_n "checking for freetype includes... " >&6; }
57535    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57536$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57537    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57538    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57539$as_echo_n "checking for freetype libraries... " >&6; }
57540    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57541$as_echo "$FREETYPE_LIB_PATH" >&6; }
57542  fi
57543
57544          if test "x$FOUND_FREETYPE" != xyes; then
57545            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57546          fi
57547        else
57548          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57549$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57550          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57551        fi
57552      else
57553        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57554$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57555      fi
57556    fi
57557
57558    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57559      # User has specified settings
57560
57561      if test "x$BUNDLE_FREETYPE" = x; then
57562        # If not specified, default is to bundle freetype
57563        BUNDLE_FREETYPE=yes
57564      fi
57565
57566      if test "x$with_freetype" != x; then
57567        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57568        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57569      fi
57570
57571      # Allow --with-freetype-lib and --with-freetype-include to override
57572      if test "x$with_freetype_include" != x; then
57573        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57574      fi
57575      if test "x$with_freetype_lib" != x; then
57576        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57577      fi
57578
57579      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57580        # Okay, we got it. Check that it works.
57581
57582  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57583  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57584  METHOD="--with-freetype"
57585
57586  # Let's start with an optimistic view of the world :-)
57587  FOUND_FREETYPE=yes
57588
57589  # First look for the canonical freetype main include file ft2build.h.
57590  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57591    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57592    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57593    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57594      # Fail.
57595      FOUND_FREETYPE=no
57596    fi
57597  fi
57598
57599  if test "x$FOUND_FREETYPE" = xyes; then
57600    # Include file found, let's continue the sanity check.
57601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57602$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57603
57604    # Reset to default value
57605    FREETYPE_BASE_NAME=freetype
57606    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57607    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57608      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57610        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57611        # for the .6 version explicitly.
57612        FREETYPE_BASE_NAME=freetype.6
57613        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57614        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57615$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57616      else
57617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57619        FOUND_FREETYPE=no
57620      fi
57621    else
57622      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57623        # On Windows, we will need both .lib and .dll file.
57624        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57625          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57627          FOUND_FREETYPE=no
57628        fi
57629      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57631        # Found lib in isa dir, use that instead.
57632        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57633        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57634$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57635      fi
57636    fi
57637  fi
57638
57639  if test "x$FOUND_FREETYPE" = xyes; then
57640
57641  # Only process if variable expands to non-empty
57642
57643  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57645
57646  # Input might be given as Windows format, start by converting to
57647  # unix format.
57648  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57649  new_path=`$CYGPATH -u "$path"`
57650
57651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57654  # "foo.exe" is OK but "foo" is an error.
57655  #
57656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57657  # It is also a way to make sure we got the proper file name for the real test later on.
57658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57659  if test "x$test_shortpath" = x; then
57660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57662    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57663  fi
57664
57665  # Call helper function which possibly converts this using DOS-style short mode.
57666  # If so, the updated path is stored in $new_path.
57667
57668  input_path="$new_path"
57669  # Check if we need to convert this using DOS-style short mode. If the path
57670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57671  # take no chances and rewrite it.
57672  # Note: m4 eats our [], so we need to use [ and ] instead.
57673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57674  if test "x$has_forbidden_chars" != x; then
57675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57679      # Going to short mode and back again did indeed matter. Since short mode is
57680      # case insensitive, let's make it lowercase to improve readability.
57681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57682      # Now convert it back to Unix-style (cygpath)
57683      input_path=`$CYGPATH -u "$shortmode_path"`
57684      new_path="$input_path"
57685    fi
57686  fi
57687
57688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57689  if test "x$test_cygdrive_prefix" = x; then
57690    # As a simple fix, exclude /usr/bin since it's not a real path.
57691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57693      # a path prefixed by /cygdrive for fixpath to work.
57694      new_path="$CYGWIN_ROOT_PATH$input_path"
57695    fi
57696  fi
57697
57698
57699  if test "x$path" != "x$new_path"; then
57700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57703  fi
57704
57705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57706
57707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57708  has_colon=`$ECHO $path | $GREP ^.:`
57709  new_path="$path"
57710  if test "x$has_colon" = x; then
57711    # Not in mixed or Windows style, start by that.
57712    new_path=`cmd //c echo $path`
57713  fi
57714
57715
57716  input_path="$new_path"
57717  # Check if we need to convert this using DOS-style short mode. If the path
57718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57719  # take no chances and rewrite it.
57720  # Note: m4 eats our [], so we need to use [ and ] instead.
57721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57722  if test "x$has_forbidden_chars" != x; then
57723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57725  fi
57726
57727
57728  windows_path="$new_path"
57729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57730    unix_path=`$CYGPATH -u "$windows_path"`
57731    new_path="$unix_path"
57732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57734    new_path="$unix_path"
57735  fi
57736
57737  if test "x$path" != "x$new_path"; then
57738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57741  fi
57742
57743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57745
57746    else
57747      # We're on a unix platform. Hooray! :)
57748      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57749      has_space=`$ECHO "$path" | $GREP " "`
57750      if test "x$has_space" != x; then
57751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57754      fi
57755
57756      # Use eval to expand a potential ~
57757      eval path="$path"
57758      if test ! -f "$path" && test ! -d "$path"; then
57759        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57760      fi
57761
57762      if test -d "$path"; then
57763        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57764      else
57765        dir="`$DIRNAME "$path"`"
57766        base="`$BASENAME "$path"`"
57767        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57768      fi
57769    fi
57770  fi
57771
57772
57773  # Only process if variable expands to non-empty
57774
57775  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57777
57778  # Input might be given as Windows format, start by converting to
57779  # unix format.
57780  path="$POTENTIAL_FREETYPE_LIB_PATH"
57781  new_path=`$CYGPATH -u "$path"`
57782
57783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57786  # "foo.exe" is OK but "foo" is an error.
57787  #
57788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57789  # It is also a way to make sure we got the proper file name for the real test later on.
57790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57791  if test "x$test_shortpath" = x; then
57792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57794    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57795  fi
57796
57797  # Call helper function which possibly converts this using DOS-style short mode.
57798  # If so, the updated path is stored in $new_path.
57799
57800  input_path="$new_path"
57801  # Check if we need to convert this using DOS-style short mode. If the path
57802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57803  # take no chances and rewrite it.
57804  # Note: m4 eats our [], so we need to use [ and ] instead.
57805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57806  if test "x$has_forbidden_chars" != x; then
57807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57811      # Going to short mode and back again did indeed matter. Since short mode is
57812      # case insensitive, let's make it lowercase to improve readability.
57813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57814      # Now convert it back to Unix-style (cygpath)
57815      input_path=`$CYGPATH -u "$shortmode_path"`
57816      new_path="$input_path"
57817    fi
57818  fi
57819
57820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57821  if test "x$test_cygdrive_prefix" = x; then
57822    # As a simple fix, exclude /usr/bin since it's not a real path.
57823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57825      # a path prefixed by /cygdrive for fixpath to work.
57826      new_path="$CYGWIN_ROOT_PATH$input_path"
57827    fi
57828  fi
57829
57830
57831  if test "x$path" != "x$new_path"; then
57832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57835  fi
57836
57837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57838
57839  path="$POTENTIAL_FREETYPE_LIB_PATH"
57840  has_colon=`$ECHO $path | $GREP ^.:`
57841  new_path="$path"
57842  if test "x$has_colon" = x; then
57843    # Not in mixed or Windows style, start by that.
57844    new_path=`cmd //c echo $path`
57845  fi
57846
57847
57848  input_path="$new_path"
57849  # Check if we need to convert this using DOS-style short mode. If the path
57850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57851  # take no chances and rewrite it.
57852  # Note: m4 eats our [], so we need to use [ and ] instead.
57853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57854  if test "x$has_forbidden_chars" != x; then
57855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57857  fi
57858
57859
57860  windows_path="$new_path"
57861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57862    unix_path=`$CYGPATH -u "$windows_path"`
57863    new_path="$unix_path"
57864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57866    new_path="$unix_path"
57867  fi
57868
57869  if test "x$path" != "x$new_path"; then
57870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57873  fi
57874
57875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57877
57878    else
57879      # We're on a unix platform. Hooray! :)
57880      path="$POTENTIAL_FREETYPE_LIB_PATH"
57881      has_space=`$ECHO "$path" | $GREP " "`
57882      if test "x$has_space" != x; then
57883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57886      fi
57887
57888      # Use eval to expand a potential ~
57889      eval path="$path"
57890      if test ! -f "$path" && test ! -d "$path"; then
57891        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57892      fi
57893
57894      if test -d "$path"; then
57895        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57896      else
57897        dir="`$DIRNAME "$path"`"
57898        base="`$BASENAME "$path"`"
57899        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57900      fi
57901    fi
57902  fi
57903
57904
57905    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57907$as_echo_n "checking for freetype includes... " >&6; }
57908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57909$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57910    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57912$as_echo_n "checking for freetype libraries... " >&6; }
57913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57914$as_echo "$FREETYPE_LIB_PATH" >&6; }
57915  fi
57916
57917        if test "x$FOUND_FREETYPE" != xyes; then
57918          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57919        fi
57920      else
57921        # User specified only one of lib or include. This is an error.
57922        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57923          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57924$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57925          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57926        else
57927          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57928$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57929          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57930        fi
57931      fi
57932    else
57933      # User did not specify settings, but we need freetype. Try to locate it.
57934
57935      if test "x$BUNDLE_FREETYPE" = x; then
57936        # If not specified, default is to bundle freetype only on windows
57937        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57938          BUNDLE_FREETYPE=yes
57939        else
57940          BUNDLE_FREETYPE=no
57941        fi
57942      fi
57943
57944      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57945      if test "x$SYSROOT" = x; then
57946        if test "x$FOUND_FREETYPE" != xyes; then
57947          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57948          if test "x$PKG_CONFIG" != x; then
57949
57950pkg_failed=no
57951{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57952$as_echo_n "checking for FREETYPE... " >&6; }
57953
57954if test -n "$FREETYPE_CFLAGS"; then
57955    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57956 elif test -n "$PKG_CONFIG"; then
57957    if test -n "$PKG_CONFIG" && \
57958    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57959  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57960  ac_status=$?
57961  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57962  test $ac_status = 0; }; then
57963  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57964else
57965  pkg_failed=yes
57966fi
57967 else
57968    pkg_failed=untried
57969fi
57970if test -n "$FREETYPE_LIBS"; then
57971    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57972 elif test -n "$PKG_CONFIG"; then
57973    if test -n "$PKG_CONFIG" && \
57974    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57975  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57976  ac_status=$?
57977  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57978  test $ac_status = 0; }; then
57979  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57980else
57981  pkg_failed=yes
57982fi
57983 else
57984    pkg_failed=untried
57985fi
57986
57987
57988
57989if test $pkg_failed = yes; then
57990
57991if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57992        _pkg_short_errors_supported=yes
57993else
57994        _pkg_short_errors_supported=no
57995fi
57996        if test $_pkg_short_errors_supported = yes; then
57997	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57998        else
57999	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58000        fi
58001	# Put the nasty error message in config.log where it belongs
58002	echo "$FREETYPE_PKG_ERRORS" >&5
58003
58004	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58005$as_echo "no" >&6; }
58006                FOUND_FREETYPE=no
58007elif test $pkg_failed = untried; then
58008	FOUND_FREETYPE=no
58009else
58010	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58011	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58013$as_echo "yes" >&6; }
58014	FOUND_FREETYPE=yes
58015fi
58016            if test "x$FOUND_FREETYPE" = xyes; then
58017              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58018              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58019              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58020              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58021                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58022              fi
58023              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58024              if test "x$BUNDLE_FREETYPE" = xyes; then
58025                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58026$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58027                FOUND_FREETYPE=no
58028              else
58029                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58030$as_echo_n "checking for freetype... " >&6; }
58031                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58032$as_echo "yes (using pkg-config)" >&6; }
58033              fi
58034            fi
58035          fi
58036        fi
58037      fi
58038
58039      if test "x$FOUND_FREETYPE" != xyes; then
58040        # Check in well-known locations
58041        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58042          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58043
58044  windows_path="$FREETYPE_BASE_DIR"
58045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58046    unix_path=`$CYGPATH -u "$windows_path"`
58047    FREETYPE_BASE_DIR="$unix_path"
58048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58050    FREETYPE_BASE_DIR="$unix_path"
58051  fi
58052
58053
58054  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58055  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58056  METHOD="well-known location"
58057
58058  # Let's start with an optimistic view of the world :-)
58059  FOUND_FREETYPE=yes
58060
58061  # First look for the canonical freetype main include file ft2build.h.
58062  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58063    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58064    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58065    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58066      # Fail.
58067      FOUND_FREETYPE=no
58068    fi
58069  fi
58070
58071  if test "x$FOUND_FREETYPE" = xyes; then
58072    # Include file found, let's continue the sanity check.
58073    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58074$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58075
58076    # Reset to default value
58077    FREETYPE_BASE_NAME=freetype
58078    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58079    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58080      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58081          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58082        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58083        # for the .6 version explicitly.
58084        FREETYPE_BASE_NAME=freetype.6
58085        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58086        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58087$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58088      else
58089        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58090$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58091        FOUND_FREETYPE=no
58092      fi
58093    else
58094      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58095        # On Windows, we will need both .lib and .dll file.
58096        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58097          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58098$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58099          FOUND_FREETYPE=no
58100        fi
58101      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58102          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58103        # Found lib in isa dir, use that instead.
58104        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58105        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58106$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58107      fi
58108    fi
58109  fi
58110
58111  if test "x$FOUND_FREETYPE" = xyes; then
58112
58113  # Only process if variable expands to non-empty
58114
58115  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58116    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58117
58118  # Input might be given as Windows format, start by converting to
58119  # unix format.
58120  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58121  new_path=`$CYGPATH -u "$path"`
58122
58123  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58124  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58125  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58126  # "foo.exe" is OK but "foo" is an error.
58127  #
58128  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58129  # It is also a way to make sure we got the proper file name for the real test later on.
58130  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58131  if test "x$test_shortpath" = x; then
58132    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58133$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58134    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58135  fi
58136
58137  # Call helper function which possibly converts this using DOS-style short mode.
58138  # If so, the updated path is stored in $new_path.
58139
58140  input_path="$new_path"
58141  # Check if we need to convert this using DOS-style short mode. If the path
58142  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58143  # take no chances and rewrite it.
58144  # Note: m4 eats our [], so we need to use [ and ] instead.
58145  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58146  if test "x$has_forbidden_chars" != x; then
58147    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58148    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58149    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58150    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58151      # Going to short mode and back again did indeed matter. Since short mode is
58152      # case insensitive, let's make it lowercase to improve readability.
58153      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58154      # Now convert it back to Unix-style (cygpath)
58155      input_path=`$CYGPATH -u "$shortmode_path"`
58156      new_path="$input_path"
58157    fi
58158  fi
58159
58160  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58161  if test "x$test_cygdrive_prefix" = x; then
58162    # As a simple fix, exclude /usr/bin since it's not a real path.
58163    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58164      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58165      # a path prefixed by /cygdrive for fixpath to work.
58166      new_path="$CYGWIN_ROOT_PATH$input_path"
58167    fi
58168  fi
58169
58170
58171  if test "x$path" != "x$new_path"; then
58172    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58173    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58174$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58175  fi
58176
58177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58178
58179  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58180  has_colon=`$ECHO $path | $GREP ^.:`
58181  new_path="$path"
58182  if test "x$has_colon" = x; then
58183    # Not in mixed or Windows style, start by that.
58184    new_path=`cmd //c echo $path`
58185  fi
58186
58187
58188  input_path="$new_path"
58189  # Check if we need to convert this using DOS-style short mode. If the path
58190  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58191  # take no chances and rewrite it.
58192  # Note: m4 eats our [], so we need to use [ and ] instead.
58193  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58194  if test "x$has_forbidden_chars" != x; then
58195    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58196    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58197  fi
58198
58199
58200  windows_path="$new_path"
58201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58202    unix_path=`$CYGPATH -u "$windows_path"`
58203    new_path="$unix_path"
58204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58206    new_path="$unix_path"
58207  fi
58208
58209  if test "x$path" != "x$new_path"; then
58210    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58211    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58212$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58213  fi
58214
58215  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58216  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58217
58218    else
58219      # We're on a unix platform. Hooray! :)
58220      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58221      has_space=`$ECHO "$path" | $GREP " "`
58222      if test "x$has_space" != x; then
58223        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58224$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58225        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58226      fi
58227
58228      # Use eval to expand a potential ~
58229      eval path="$path"
58230      if test ! -f "$path" && test ! -d "$path"; then
58231        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58232      fi
58233
58234      if test -d "$path"; then
58235        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58236      else
58237        dir="`$DIRNAME "$path"`"
58238        base="`$BASENAME "$path"`"
58239        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58240      fi
58241    fi
58242  fi
58243
58244
58245  # Only process if variable expands to non-empty
58246
58247  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58248    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58249
58250  # Input might be given as Windows format, start by converting to
58251  # unix format.
58252  path="$POTENTIAL_FREETYPE_LIB_PATH"
58253  new_path=`$CYGPATH -u "$path"`
58254
58255  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58256  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58257  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58258  # "foo.exe" is OK but "foo" is an error.
58259  #
58260  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58261  # It is also a way to make sure we got the proper file name for the real test later on.
58262  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58263  if test "x$test_shortpath" = x; then
58264    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58265$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58266    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58267  fi
58268
58269  # Call helper function which possibly converts this using DOS-style short mode.
58270  # If so, the updated path is stored in $new_path.
58271
58272  input_path="$new_path"
58273  # Check if we need to convert this using DOS-style short mode. If the path
58274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58275  # take no chances and rewrite it.
58276  # Note: m4 eats our [], so we need to use [ and ] instead.
58277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58278  if test "x$has_forbidden_chars" != x; then
58279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58280    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58281    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58282    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58283      # Going to short mode and back again did indeed matter. Since short mode is
58284      # case insensitive, let's make it lowercase to improve readability.
58285      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58286      # Now convert it back to Unix-style (cygpath)
58287      input_path=`$CYGPATH -u "$shortmode_path"`
58288      new_path="$input_path"
58289    fi
58290  fi
58291
58292  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58293  if test "x$test_cygdrive_prefix" = x; then
58294    # As a simple fix, exclude /usr/bin since it's not a real path.
58295    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58296      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58297      # a path prefixed by /cygdrive for fixpath to work.
58298      new_path="$CYGWIN_ROOT_PATH$input_path"
58299    fi
58300  fi
58301
58302
58303  if test "x$path" != "x$new_path"; then
58304    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58305    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58306$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58307  fi
58308
58309    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58310
58311  path="$POTENTIAL_FREETYPE_LIB_PATH"
58312  has_colon=`$ECHO $path | $GREP ^.:`
58313  new_path="$path"
58314  if test "x$has_colon" = x; then
58315    # Not in mixed or Windows style, start by that.
58316    new_path=`cmd //c echo $path`
58317  fi
58318
58319
58320  input_path="$new_path"
58321  # Check if we need to convert this using DOS-style short mode. If the path
58322  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58323  # take no chances and rewrite it.
58324  # Note: m4 eats our [], so we need to use [ and ] instead.
58325  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58326  if test "x$has_forbidden_chars" != x; then
58327    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58328    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58329  fi
58330
58331
58332  windows_path="$new_path"
58333  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58334    unix_path=`$CYGPATH -u "$windows_path"`
58335    new_path="$unix_path"
58336  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58337    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58338    new_path="$unix_path"
58339  fi
58340
58341  if test "x$path" != "x$new_path"; then
58342    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58344$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58345  fi
58346
58347  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58348  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58349
58350    else
58351      # We're on a unix platform. Hooray! :)
58352      path="$POTENTIAL_FREETYPE_LIB_PATH"
58353      has_space=`$ECHO "$path" | $GREP " "`
58354      if test "x$has_space" != x; then
58355        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58356$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58357        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58358      fi
58359
58360      # Use eval to expand a potential ~
58361      eval path="$path"
58362      if test ! -f "$path" && test ! -d "$path"; then
58363        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58364      fi
58365
58366      if test -d "$path"; then
58367        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58368      else
58369        dir="`$DIRNAME "$path"`"
58370        base="`$BASENAME "$path"`"
58371        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58372      fi
58373    fi
58374  fi
58375
58376
58377    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58378    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58379$as_echo_n "checking for freetype includes... " >&6; }
58380    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58381$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58382    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58383    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58384$as_echo_n "checking for freetype libraries... " >&6; }
58385    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58386$as_echo "$FREETYPE_LIB_PATH" >&6; }
58387  fi
58388
58389          if test "x$FOUND_FREETYPE" != xyes; then
58390            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58391
58392  windows_path="$FREETYPE_BASE_DIR"
58393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58394    unix_path=`$CYGPATH -u "$windows_path"`
58395    FREETYPE_BASE_DIR="$unix_path"
58396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58398    FREETYPE_BASE_DIR="$unix_path"
58399  fi
58400
58401
58402  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58403  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58404  METHOD="well-known location"
58405
58406  # Let's start with an optimistic view of the world :-)
58407  FOUND_FREETYPE=yes
58408
58409  # First look for the canonical freetype main include file ft2build.h.
58410  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58411    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58412    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58413    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58414      # Fail.
58415      FOUND_FREETYPE=no
58416    fi
58417  fi
58418
58419  if test "x$FOUND_FREETYPE" = xyes; then
58420    # Include file found, let's continue the sanity check.
58421    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58422$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58423
58424    # Reset to default value
58425    FREETYPE_BASE_NAME=freetype
58426    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58427    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58428      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58429          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58430        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58431        # for the .6 version explicitly.
58432        FREETYPE_BASE_NAME=freetype.6
58433        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58434        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58435$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58436      else
58437        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58438$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58439        FOUND_FREETYPE=no
58440      fi
58441    else
58442      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58443        # On Windows, we will need both .lib and .dll file.
58444        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58445          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58446$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58447          FOUND_FREETYPE=no
58448        fi
58449      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58450          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58451        # Found lib in isa dir, use that instead.
58452        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58453        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58454$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58455      fi
58456    fi
58457  fi
58458
58459  if test "x$FOUND_FREETYPE" = xyes; then
58460
58461  # Only process if variable expands to non-empty
58462
58463  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58464    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58465
58466  # Input might be given as Windows format, start by converting to
58467  # unix format.
58468  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58469  new_path=`$CYGPATH -u "$path"`
58470
58471  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58472  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58473  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58474  # "foo.exe" is OK but "foo" is an error.
58475  #
58476  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58477  # It is also a way to make sure we got the proper file name for the real test later on.
58478  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58479  if test "x$test_shortpath" = x; then
58480    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58481$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58482    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58483  fi
58484
58485  # Call helper function which possibly converts this using DOS-style short mode.
58486  # If so, the updated path is stored in $new_path.
58487
58488  input_path="$new_path"
58489  # Check if we need to convert this using DOS-style short mode. If the path
58490  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58491  # take no chances and rewrite it.
58492  # Note: m4 eats our [], so we need to use [ and ] instead.
58493  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58494  if test "x$has_forbidden_chars" != x; then
58495    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58496    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58497    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58498    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58499      # Going to short mode and back again did indeed matter. Since short mode is
58500      # case insensitive, let's make it lowercase to improve readability.
58501      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58502      # Now convert it back to Unix-style (cygpath)
58503      input_path=`$CYGPATH -u "$shortmode_path"`
58504      new_path="$input_path"
58505    fi
58506  fi
58507
58508  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58509  if test "x$test_cygdrive_prefix" = x; then
58510    # As a simple fix, exclude /usr/bin since it's not a real path.
58511    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58512      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58513      # a path prefixed by /cygdrive for fixpath to work.
58514      new_path="$CYGWIN_ROOT_PATH$input_path"
58515    fi
58516  fi
58517
58518
58519  if test "x$path" != "x$new_path"; then
58520    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58522$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58523  fi
58524
58525    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58526
58527  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58528  has_colon=`$ECHO $path | $GREP ^.:`
58529  new_path="$path"
58530  if test "x$has_colon" = x; then
58531    # Not in mixed or Windows style, start by that.
58532    new_path=`cmd //c echo $path`
58533  fi
58534
58535
58536  input_path="$new_path"
58537  # Check if we need to convert this using DOS-style short mode. If the path
58538  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58539  # take no chances and rewrite it.
58540  # Note: m4 eats our [], so we need to use [ and ] instead.
58541  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58542  if test "x$has_forbidden_chars" != x; then
58543    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58544    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58545  fi
58546
58547
58548  windows_path="$new_path"
58549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58550    unix_path=`$CYGPATH -u "$windows_path"`
58551    new_path="$unix_path"
58552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58554    new_path="$unix_path"
58555  fi
58556
58557  if test "x$path" != "x$new_path"; then
58558    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58559    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58560$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58561  fi
58562
58563  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58564  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58565
58566    else
58567      # We're on a unix platform. Hooray! :)
58568      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58569      has_space=`$ECHO "$path" | $GREP " "`
58570      if test "x$has_space" != x; then
58571        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58572$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58573        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58574      fi
58575
58576      # Use eval to expand a potential ~
58577      eval path="$path"
58578      if test ! -f "$path" && test ! -d "$path"; then
58579        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58580      fi
58581
58582      if test -d "$path"; then
58583        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58584      else
58585        dir="`$DIRNAME "$path"`"
58586        base="`$BASENAME "$path"`"
58587        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58588      fi
58589    fi
58590  fi
58591
58592
58593  # Only process if variable expands to non-empty
58594
58595  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58596    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58597
58598  # Input might be given as Windows format, start by converting to
58599  # unix format.
58600  path="$POTENTIAL_FREETYPE_LIB_PATH"
58601  new_path=`$CYGPATH -u "$path"`
58602
58603  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58604  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58605  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58606  # "foo.exe" is OK but "foo" is an error.
58607  #
58608  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58609  # It is also a way to make sure we got the proper file name for the real test later on.
58610  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58611  if test "x$test_shortpath" = x; then
58612    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58613$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58614    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58615  fi
58616
58617  # Call helper function which possibly converts this using DOS-style short mode.
58618  # If so, the updated path is stored in $new_path.
58619
58620  input_path="$new_path"
58621  # Check if we need to convert this using DOS-style short mode. If the path
58622  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58623  # take no chances and rewrite it.
58624  # Note: m4 eats our [], so we need to use [ and ] instead.
58625  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58626  if test "x$has_forbidden_chars" != x; then
58627    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58628    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58629    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58630    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58631      # Going to short mode and back again did indeed matter. Since short mode is
58632      # case insensitive, let's make it lowercase to improve readability.
58633      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58634      # Now convert it back to Unix-style (cygpath)
58635      input_path=`$CYGPATH -u "$shortmode_path"`
58636      new_path="$input_path"
58637    fi
58638  fi
58639
58640  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58641  if test "x$test_cygdrive_prefix" = x; then
58642    # As a simple fix, exclude /usr/bin since it's not a real path.
58643    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58644      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58645      # a path prefixed by /cygdrive for fixpath to work.
58646      new_path="$CYGWIN_ROOT_PATH$input_path"
58647    fi
58648  fi
58649
58650
58651  if test "x$path" != "x$new_path"; then
58652    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58655  fi
58656
58657    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58658
58659  path="$POTENTIAL_FREETYPE_LIB_PATH"
58660  has_colon=`$ECHO $path | $GREP ^.:`
58661  new_path="$path"
58662  if test "x$has_colon" = x; then
58663    # Not in mixed or Windows style, start by that.
58664    new_path=`cmd //c echo $path`
58665  fi
58666
58667
58668  input_path="$new_path"
58669  # Check if we need to convert this using DOS-style short mode. If the path
58670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58671  # take no chances and rewrite it.
58672  # Note: m4 eats our [], so we need to use [ and ] instead.
58673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58674  if test "x$has_forbidden_chars" != x; then
58675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58676    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58677  fi
58678
58679
58680  windows_path="$new_path"
58681  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58682    unix_path=`$CYGPATH -u "$windows_path"`
58683    new_path="$unix_path"
58684  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58685    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58686    new_path="$unix_path"
58687  fi
58688
58689  if test "x$path" != "x$new_path"; then
58690    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58691    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58692$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58693  fi
58694
58695  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58696  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58697
58698    else
58699      # We're on a unix platform. Hooray! :)
58700      path="$POTENTIAL_FREETYPE_LIB_PATH"
58701      has_space=`$ECHO "$path" | $GREP " "`
58702      if test "x$has_space" != x; then
58703        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58704$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58705        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58706      fi
58707
58708      # Use eval to expand a potential ~
58709      eval path="$path"
58710      if test ! -f "$path" && test ! -d "$path"; then
58711        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58712      fi
58713
58714      if test -d "$path"; then
58715        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58716      else
58717        dir="`$DIRNAME "$path"`"
58718        base="`$BASENAME "$path"`"
58719        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58720      fi
58721    fi
58722  fi
58723
58724
58725    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58726    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58727$as_echo_n "checking for freetype includes... " >&6; }
58728    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58729$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58730    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58731    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58732$as_echo_n "checking for freetype libraries... " >&6; }
58733    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58734$as_echo "$FREETYPE_LIB_PATH" >&6; }
58735  fi
58736
58737          fi
58738          if test "x$FOUND_FREETYPE" != xyes; then
58739            FREETYPE_BASE_DIR="$HOME/freetype"
58740
58741  windows_path="$FREETYPE_BASE_DIR"
58742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58743    unix_path=`$CYGPATH -u "$windows_path"`
58744    FREETYPE_BASE_DIR="$unix_path"
58745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58747    FREETYPE_BASE_DIR="$unix_path"
58748  fi
58749
58750            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58751
58752  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58753  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58754  METHOD="well-known location"
58755
58756  # Let's start with an optimistic view of the world :-)
58757  FOUND_FREETYPE=yes
58758
58759  # First look for the canonical freetype main include file ft2build.h.
58760  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58761    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58762    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58763    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58764      # Fail.
58765      FOUND_FREETYPE=no
58766    fi
58767  fi
58768
58769  if test "x$FOUND_FREETYPE" = xyes; then
58770    # Include file found, let's continue the sanity check.
58771    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58772$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58773
58774    # Reset to default value
58775    FREETYPE_BASE_NAME=freetype
58776    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58777    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58778      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58779          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58780        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58781        # for the .6 version explicitly.
58782        FREETYPE_BASE_NAME=freetype.6
58783        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58784        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58785$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58786      else
58787        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58788$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58789        FOUND_FREETYPE=no
58790      fi
58791    else
58792      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58793        # On Windows, we will need both .lib and .dll file.
58794        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58795          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58796$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58797          FOUND_FREETYPE=no
58798        fi
58799      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58800          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58801        # Found lib in isa dir, use that instead.
58802        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58803        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58804$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58805      fi
58806    fi
58807  fi
58808
58809  if test "x$FOUND_FREETYPE" = xyes; then
58810
58811  # Only process if variable expands to non-empty
58812
58813  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58814    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58815
58816  # Input might be given as Windows format, start by converting to
58817  # unix format.
58818  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58819  new_path=`$CYGPATH -u "$path"`
58820
58821  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58822  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58823  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58824  # "foo.exe" is OK but "foo" is an error.
58825  #
58826  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58827  # It is also a way to make sure we got the proper file name for the real test later on.
58828  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58829  if test "x$test_shortpath" = x; then
58830    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58831$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58832    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58833  fi
58834
58835  # Call helper function which possibly converts this using DOS-style short mode.
58836  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58847    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58848    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58849      # Going to short mode and back again did indeed matter. Since short mode is
58850      # case insensitive, let's make it lowercase to improve readability.
58851      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58852      # Now convert it back to Unix-style (cygpath)
58853      input_path=`$CYGPATH -u "$shortmode_path"`
58854      new_path="$input_path"
58855    fi
58856  fi
58857
58858  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58859  if test "x$test_cygdrive_prefix" = x; then
58860    # As a simple fix, exclude /usr/bin since it's not a real path.
58861    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58862      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58863      # a path prefixed by /cygdrive for fixpath to work.
58864      new_path="$CYGWIN_ROOT_PATH$input_path"
58865    fi
58866  fi
58867
58868
58869  if test "x$path" != "x$new_path"; then
58870    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58873  fi
58874
58875    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58876
58877  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58878  has_colon=`$ECHO $path | $GREP ^.:`
58879  new_path="$path"
58880  if test "x$has_colon" = x; then
58881    # Not in mixed or Windows style, start by that.
58882    new_path=`cmd //c echo $path`
58883  fi
58884
58885
58886  input_path="$new_path"
58887  # Check if we need to convert this using DOS-style short mode. If the path
58888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58889  # take no chances and rewrite it.
58890  # Note: m4 eats our [], so we need to use [ and ] instead.
58891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58892  if test "x$has_forbidden_chars" != x; then
58893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58894    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58895  fi
58896
58897
58898  windows_path="$new_path"
58899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58900    unix_path=`$CYGPATH -u "$windows_path"`
58901    new_path="$unix_path"
58902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58904    new_path="$unix_path"
58905  fi
58906
58907  if test "x$path" != "x$new_path"; then
58908    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58909    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58910$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58911  fi
58912
58913  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58914  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58915
58916    else
58917      # We're on a unix platform. Hooray! :)
58918      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58919      has_space=`$ECHO "$path" | $GREP " "`
58920      if test "x$has_space" != x; then
58921        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58922$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58923        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58924      fi
58925
58926      # Use eval to expand a potential ~
58927      eval path="$path"
58928      if test ! -f "$path" && test ! -d "$path"; then
58929        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58930      fi
58931
58932      if test -d "$path"; then
58933        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58934      else
58935        dir="`$DIRNAME "$path"`"
58936        base="`$BASENAME "$path"`"
58937        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58938      fi
58939    fi
58940  fi
58941
58942
58943  # Only process if variable expands to non-empty
58944
58945  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58947
58948  # Input might be given as Windows format, start by converting to
58949  # unix format.
58950  path="$POTENTIAL_FREETYPE_LIB_PATH"
58951  new_path=`$CYGPATH -u "$path"`
58952
58953  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58954  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58955  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58956  # "foo.exe" is OK but "foo" is an error.
58957  #
58958  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58959  # It is also a way to make sure we got the proper file name for the real test later on.
58960  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58961  if test "x$test_shortpath" = x; then
58962    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58964    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58965  fi
58966
58967  # Call helper function which possibly converts this using DOS-style short mode.
58968  # If so, the updated path is stored in $new_path.
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    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58979    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58980    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58981      # Going to short mode and back again did indeed matter. Since short mode is
58982      # case insensitive, let's make it lowercase to improve readability.
58983      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58984      # Now convert it back to Unix-style (cygpath)
58985      input_path=`$CYGPATH -u "$shortmode_path"`
58986      new_path="$input_path"
58987    fi
58988  fi
58989
58990  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58991  if test "x$test_cygdrive_prefix" = x; then
58992    # As a simple fix, exclude /usr/bin since it's not a real path.
58993    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58994      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58995      # a path prefixed by /cygdrive for fixpath to work.
58996      new_path="$CYGWIN_ROOT_PATH$input_path"
58997    fi
58998  fi
58999
59000
59001  if test "x$path" != "x$new_path"; then
59002    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59003    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59004$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59005  fi
59006
59007    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59008
59009  path="$POTENTIAL_FREETYPE_LIB_PATH"
59010  has_colon=`$ECHO $path | $GREP ^.:`
59011  new_path="$path"
59012  if test "x$has_colon" = x; then
59013    # Not in mixed or Windows style, start by that.
59014    new_path=`cmd //c echo $path`
59015  fi
59016
59017
59018  input_path="$new_path"
59019  # Check if we need to convert this using DOS-style short mode. If the path
59020  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59021  # take no chances and rewrite it.
59022  # Note: m4 eats our [], so we need to use [ and ] instead.
59023  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59024  if test "x$has_forbidden_chars" != x; then
59025    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59026    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59027  fi
59028
59029
59030  windows_path="$new_path"
59031  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59032    unix_path=`$CYGPATH -u "$windows_path"`
59033    new_path="$unix_path"
59034  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59035    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59036    new_path="$unix_path"
59037  fi
59038
59039  if test "x$path" != "x$new_path"; then
59040    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59041    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59042$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59043  fi
59044
59045  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59046  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59047
59048    else
59049      # We're on a unix platform. Hooray! :)
59050      path="$POTENTIAL_FREETYPE_LIB_PATH"
59051      has_space=`$ECHO "$path" | $GREP " "`
59052      if test "x$has_space" != x; then
59053        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59054$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59055        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59056      fi
59057
59058      # Use eval to expand a potential ~
59059      eval path="$path"
59060      if test ! -f "$path" && test ! -d "$path"; then
59061        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59062      fi
59063
59064      if test -d "$path"; then
59065        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59066      else
59067        dir="`$DIRNAME "$path"`"
59068        base="`$BASENAME "$path"`"
59069        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59070      fi
59071    fi
59072  fi
59073
59074
59075    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59076    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59077$as_echo_n "checking for freetype includes... " >&6; }
59078    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59079$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59080    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59081    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59082$as_echo_n "checking for freetype libraries... " >&6; }
59083    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59084$as_echo "$FREETYPE_LIB_PATH" >&6; }
59085  fi
59086
59087            else
59088
59089  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59090  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59091  METHOD="well-known location"
59092
59093  # Let's start with an optimistic view of the world :-)
59094  FOUND_FREETYPE=yes
59095
59096  # First look for the canonical freetype main include file ft2build.h.
59097  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59098    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59099    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59100    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59101      # Fail.
59102      FOUND_FREETYPE=no
59103    fi
59104  fi
59105
59106  if test "x$FOUND_FREETYPE" = xyes; then
59107    # Include file found, let's continue the sanity check.
59108    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59109$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59110
59111    # Reset to default value
59112    FREETYPE_BASE_NAME=freetype
59113    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59114    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59115      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59116          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59117        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59118        # for the .6 version explicitly.
59119        FREETYPE_BASE_NAME=freetype.6
59120        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59121        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59122$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59123      else
59124        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59125$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59126        FOUND_FREETYPE=no
59127      fi
59128    else
59129      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59130        # On Windows, we will need both .lib and .dll file.
59131        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59132          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59133$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59134          FOUND_FREETYPE=no
59135        fi
59136      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59137          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59138        # Found lib in isa dir, use that instead.
59139        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59140        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59141$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59142      fi
59143    fi
59144  fi
59145
59146  if test "x$FOUND_FREETYPE" = xyes; then
59147
59148  # Only process if variable expands to non-empty
59149
59150  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59151    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59152
59153  # Input might be given as Windows format, start by converting to
59154  # unix format.
59155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59156  new_path=`$CYGPATH -u "$path"`
59157
59158  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59159  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59160  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59161  # "foo.exe" is OK but "foo" is an error.
59162  #
59163  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59164  # It is also a way to make sure we got the proper file name for the real test later on.
59165  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59166  if test "x$test_shortpath" = x; then
59167    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59168$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59169    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59170  fi
59171
59172  # Call helper function which possibly converts this using DOS-style short mode.
59173  # If so, the updated path is stored in $new_path.
59174
59175  input_path="$new_path"
59176  # Check if we need to convert this using DOS-style short mode. If the path
59177  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59178  # take no chances and rewrite it.
59179  # Note: m4 eats our [], so we need to use [ and ] instead.
59180  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59181  if test "x$has_forbidden_chars" != x; then
59182    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59183    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59184    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59185    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59186      # Going to short mode and back again did indeed matter. Since short mode is
59187      # case insensitive, let's make it lowercase to improve readability.
59188      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59189      # Now convert it back to Unix-style (cygpath)
59190      input_path=`$CYGPATH -u "$shortmode_path"`
59191      new_path="$input_path"
59192    fi
59193  fi
59194
59195  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59196  if test "x$test_cygdrive_prefix" = x; then
59197    # As a simple fix, exclude /usr/bin since it's not a real path.
59198    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59199      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59200      # a path prefixed by /cygdrive for fixpath to work.
59201      new_path="$CYGWIN_ROOT_PATH$input_path"
59202    fi
59203  fi
59204
59205
59206  if test "x$path" != "x$new_path"; then
59207    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59210  fi
59211
59212    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59213
59214  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59215  has_colon=`$ECHO $path | $GREP ^.:`
59216  new_path="$path"
59217  if test "x$has_colon" = x; then
59218    # Not in mixed or Windows style, start by that.
59219    new_path=`cmd //c echo $path`
59220  fi
59221
59222
59223  input_path="$new_path"
59224  # Check if we need to convert this using DOS-style short mode. If the path
59225  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59226  # take no chances and rewrite it.
59227  # Note: m4 eats our [], so we need to use [ and ] instead.
59228  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59229  if test "x$has_forbidden_chars" != x; then
59230    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59231    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59232  fi
59233
59234
59235  windows_path="$new_path"
59236  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59237    unix_path=`$CYGPATH -u "$windows_path"`
59238    new_path="$unix_path"
59239  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59240    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59241    new_path="$unix_path"
59242  fi
59243
59244  if test "x$path" != "x$new_path"; then
59245    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59246    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59247$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59248  fi
59249
59250  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59251  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59252
59253    else
59254      # We're on a unix platform. Hooray! :)
59255      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59256      has_space=`$ECHO "$path" | $GREP " "`
59257      if test "x$has_space" != x; then
59258        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59259$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59260        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59261      fi
59262
59263      # Use eval to expand a potential ~
59264      eval path="$path"
59265      if test ! -f "$path" && test ! -d "$path"; then
59266        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59267      fi
59268
59269      if test -d "$path"; then
59270        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59271      else
59272        dir="`$DIRNAME "$path"`"
59273        base="`$BASENAME "$path"`"
59274        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59275      fi
59276    fi
59277  fi
59278
59279
59280  # Only process if variable expands to non-empty
59281
59282  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59284
59285  # Input might be given as Windows format, start by converting to
59286  # unix format.
59287  path="$POTENTIAL_FREETYPE_LIB_PATH"
59288  new_path=`$CYGPATH -u "$path"`
59289
59290  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59291  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59292  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59293  # "foo.exe" is OK but "foo" is an error.
59294  #
59295  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59296  # It is also a way to make sure we got the proper file name for the real test later on.
59297  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59298  if test "x$test_shortpath" = x; then
59299    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59300$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59301    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59302  fi
59303
59304  # Call helper function which possibly converts this using DOS-style short mode.
59305  # If so, the updated path is stored in $new_path.
59306
59307  input_path="$new_path"
59308  # Check if we need to convert this using DOS-style short mode. If the path
59309  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59310  # take no chances and rewrite it.
59311  # Note: m4 eats our [], so we need to use [ and ] instead.
59312  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59313  if test "x$has_forbidden_chars" != x; then
59314    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59315    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59316    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59317    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59318      # Going to short mode and back again did indeed matter. Since short mode is
59319      # case insensitive, let's make it lowercase to improve readability.
59320      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59321      # Now convert it back to Unix-style (cygpath)
59322      input_path=`$CYGPATH -u "$shortmode_path"`
59323      new_path="$input_path"
59324    fi
59325  fi
59326
59327  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59328  if test "x$test_cygdrive_prefix" = x; then
59329    # As a simple fix, exclude /usr/bin since it's not a real path.
59330    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59331      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59332      # a path prefixed by /cygdrive for fixpath to work.
59333      new_path="$CYGWIN_ROOT_PATH$input_path"
59334    fi
59335  fi
59336
59337
59338  if test "x$path" != "x$new_path"; then
59339    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59340    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59341$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59342  fi
59343
59344    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59345
59346  path="$POTENTIAL_FREETYPE_LIB_PATH"
59347  has_colon=`$ECHO $path | $GREP ^.:`
59348  new_path="$path"
59349  if test "x$has_colon" = x; then
59350    # Not in mixed or Windows style, start by that.
59351    new_path=`cmd //c echo $path`
59352  fi
59353
59354
59355  input_path="$new_path"
59356  # Check if we need to convert this using DOS-style short mode. If the path
59357  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59358  # take no chances and rewrite it.
59359  # Note: m4 eats our [], so we need to use [ and ] instead.
59360  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59361  if test "x$has_forbidden_chars" != x; then
59362    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59363    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59364  fi
59365
59366
59367  windows_path="$new_path"
59368  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59369    unix_path=`$CYGPATH -u "$windows_path"`
59370    new_path="$unix_path"
59371  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59372    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59373    new_path="$unix_path"
59374  fi
59375
59376  if test "x$path" != "x$new_path"; then
59377    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59378    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59379$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59380  fi
59381
59382  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59383  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59384
59385    else
59386      # We're on a unix platform. Hooray! :)
59387      path="$POTENTIAL_FREETYPE_LIB_PATH"
59388      has_space=`$ECHO "$path" | $GREP " "`
59389      if test "x$has_space" != x; then
59390        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59391$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59392        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59393      fi
59394
59395      # Use eval to expand a potential ~
59396      eval path="$path"
59397      if test ! -f "$path" && test ! -d "$path"; then
59398        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59399      fi
59400
59401      if test -d "$path"; then
59402        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59403      else
59404        dir="`$DIRNAME "$path"`"
59405        base="`$BASENAME "$path"`"
59406        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59407      fi
59408    fi
59409  fi
59410
59411
59412    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59414$as_echo_n "checking for freetype includes... " >&6; }
59415    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59416$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59417    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59418    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59419$as_echo_n "checking for freetype libraries... " >&6; }
59420    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59421$as_echo "$FREETYPE_LIB_PATH" >&6; }
59422  fi
59423
59424            fi
59425            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59426                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59427              # Source is available, as a last resort try to build freetype in default location
59428
59429  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59430  BUILD_FREETYPE=yes
59431
59432  # Check if the freetype sources are acessible..
59433  if ! test -d $FREETYPE_SRC_PATH; then
59434    { $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
59435$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59436    BUILD_FREETYPE=no
59437  fi
59438  # ..and contain a vc2010 project file
59439  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59440  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59441    { $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
59442$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59443    BUILD_FREETYPE=no
59444  fi
59445  # Now check if configure found a version of 'msbuild.exe'
59446  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59447    { $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
59448$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;}
59449    BUILD_FREETYPE=no
59450  fi
59451
59452  # Ready to go..
59453  if test "x$BUILD_FREETYPE" = xyes; then
59454    # msbuild requires trailing slashes for output directories
59455    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59456    freetype_lib_path_unix="$freetype_lib_path"
59457    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59458
59459  unix_path="$vcxproj_path"
59460  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59461    windows_path=`$CYGPATH -m "$unix_path"`
59462    vcxproj_path="$windows_path"
59463  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59464    windows_path=`cmd //c echo $unix_path`
59465    vcxproj_path="$windows_path"
59466  fi
59467
59468
59469  unix_path="$freetype_lib_path"
59470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59471    windows_path=`$CYGPATH -m "$unix_path"`
59472    freetype_lib_path="$windows_path"
59473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59474    windows_path=`cmd //c echo $unix_path`
59475    freetype_lib_path="$windows_path"
59476  fi
59477
59478
59479  unix_path="$freetype_obj_path"
59480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59481    windows_path=`$CYGPATH -m "$unix_path"`
59482    freetype_obj_path="$windows_path"
59483  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59484    windows_path=`cmd //c echo $unix_path`
59485    freetype_obj_path="$windows_path"
59486  fi
59487
59488    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59489      freetype_platform=x64
59490    else
59491      freetype_platform=win32
59492    fi
59493
59494    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59495    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59496    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59497    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59498    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59499$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59500
59501    # First we try to build the freetype.dll
59502    $ECHO -e "@echo off\n"\
59503        "$MSBUILD $vcxproj_path "\
59504        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59505        "/p:Configuration=\"Release Multithreaded\" "\
59506        "/p:Platform=$freetype_platform "\
59507        "/p:ConfigurationType=DynamicLibrary "\
59508        "/p:TargetName=freetype "\
59509        "/p:OutDir=\"$freetype_lib_path\" "\
59510        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59511    cmd /c freetype.bat
59512
59513    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59514      # If that succeeds we also build freetype.lib
59515      $ECHO -e "@echo off\n"\
59516          "$MSBUILD $vcxproj_path "\
59517          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59518          "/p:Configuration=\"Release Multithreaded\" "\
59519          "/p:Platform=$freetype_platform "\
59520          "/p:ConfigurationType=StaticLibrary "\
59521          "/p:TargetName=freetype "\
59522          "/p:OutDir=\"$freetype_lib_path\" "\
59523          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59524      cmd /c freetype.bat
59525
59526      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59527        # Once we build both, lib and dll, set freetype lib and include path appropriately
59528        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59529        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59530        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59531$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59532      else
59533        BUILD_FREETYPE=no
59534      fi
59535    else
59536      BUILD_FREETYPE=no
59537    fi
59538  fi
59539
59540              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59541
59542  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59543  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59544  METHOD="well-known location"
59545
59546  # Let's start with an optimistic view of the world :-)
59547  FOUND_FREETYPE=yes
59548
59549  # First look for the canonical freetype main include file ft2build.h.
59550  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59551    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59552    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59553    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59554      # Fail.
59555      FOUND_FREETYPE=no
59556    fi
59557  fi
59558
59559  if test "x$FOUND_FREETYPE" = xyes; then
59560    # Include file found, let's continue the sanity check.
59561    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59562$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59563
59564    # Reset to default value
59565    FREETYPE_BASE_NAME=freetype
59566    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59567    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59568      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59569          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59570        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59571        # for the .6 version explicitly.
59572        FREETYPE_BASE_NAME=freetype.6
59573        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59574        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59575$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59576      else
59577        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59578$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59579        FOUND_FREETYPE=no
59580      fi
59581    else
59582      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59583        # On Windows, we will need both .lib and .dll file.
59584        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59585          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59586$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59587          FOUND_FREETYPE=no
59588        fi
59589      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59590          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59591        # Found lib in isa dir, use that instead.
59592        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59593        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59594$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59595      fi
59596    fi
59597  fi
59598
59599  if test "x$FOUND_FREETYPE" = xyes; then
59600
59601  # Only process if variable expands to non-empty
59602
59603  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59604    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59605
59606  # Input might be given as Windows format, start by converting to
59607  # unix format.
59608  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59609  new_path=`$CYGPATH -u "$path"`
59610
59611  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59612  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59613  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59614  # "foo.exe" is OK but "foo" is an error.
59615  #
59616  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59617  # It is also a way to make sure we got the proper file name for the real test later on.
59618  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59619  if test "x$test_shortpath" = x; then
59620    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59621$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59622    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59623  fi
59624
59625  # Call helper function which possibly converts this using DOS-style short mode.
59626  # If so, the updated path is stored in $new_path.
59627
59628  input_path="$new_path"
59629  # Check if we need to convert this using DOS-style short mode. If the path
59630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59631  # take no chances and rewrite it.
59632  # Note: m4 eats our [], so we need to use [ and ] instead.
59633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59634  if test "x$has_forbidden_chars" != x; then
59635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59636    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59637    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59638    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59639      # Going to short mode and back again did indeed matter. Since short mode is
59640      # case insensitive, let's make it lowercase to improve readability.
59641      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59642      # Now convert it back to Unix-style (cygpath)
59643      input_path=`$CYGPATH -u "$shortmode_path"`
59644      new_path="$input_path"
59645    fi
59646  fi
59647
59648  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59649  if test "x$test_cygdrive_prefix" = x; then
59650    # As a simple fix, exclude /usr/bin since it's not a real path.
59651    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59652      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59653      # a path prefixed by /cygdrive for fixpath to work.
59654      new_path="$CYGWIN_ROOT_PATH$input_path"
59655    fi
59656  fi
59657
59658
59659  if test "x$path" != "x$new_path"; then
59660    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59661    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59662$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59663  fi
59664
59665    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59666
59667  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59668  has_colon=`$ECHO $path | $GREP ^.:`
59669  new_path="$path"
59670  if test "x$has_colon" = x; then
59671    # Not in mixed or Windows style, start by that.
59672    new_path=`cmd //c echo $path`
59673  fi
59674
59675
59676  input_path="$new_path"
59677  # Check if we need to convert this using DOS-style short mode. If the path
59678  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59679  # take no chances and rewrite it.
59680  # Note: m4 eats our [], so we need to use [ and ] instead.
59681  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59682  if test "x$has_forbidden_chars" != x; then
59683    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59684    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59685  fi
59686
59687
59688  windows_path="$new_path"
59689  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59690    unix_path=`$CYGPATH -u "$windows_path"`
59691    new_path="$unix_path"
59692  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59693    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59694    new_path="$unix_path"
59695  fi
59696
59697  if test "x$path" != "x$new_path"; then
59698    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59699    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59700$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59701  fi
59702
59703  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59704  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59705
59706    else
59707      # We're on a unix platform. Hooray! :)
59708      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59709      has_space=`$ECHO "$path" | $GREP " "`
59710      if test "x$has_space" != x; then
59711        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59712$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59713        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59714      fi
59715
59716      # Use eval to expand a potential ~
59717      eval path="$path"
59718      if test ! -f "$path" && test ! -d "$path"; then
59719        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59720      fi
59721
59722      if test -d "$path"; then
59723        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59724      else
59725        dir="`$DIRNAME "$path"`"
59726        base="`$BASENAME "$path"`"
59727        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59728      fi
59729    fi
59730  fi
59731
59732
59733  # Only process if variable expands to non-empty
59734
59735  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59736    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59737
59738  # Input might be given as Windows format, start by converting to
59739  # unix format.
59740  path="$POTENTIAL_FREETYPE_LIB_PATH"
59741  new_path=`$CYGPATH -u "$path"`
59742
59743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59746  # "foo.exe" is OK but "foo" is an error.
59747  #
59748  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59749  # It is also a way to make sure we got the proper file name for the real test later on.
59750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59751  if test "x$test_shortpath" = x; then
59752    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59753$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59754    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59755  fi
59756
59757  # Call helper function which possibly converts this using DOS-style short mode.
59758  # If so, the updated path is stored in $new_path.
59759
59760  input_path="$new_path"
59761  # Check if we need to convert this using DOS-style short mode. If the path
59762  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59763  # take no chances and rewrite it.
59764  # Note: m4 eats our [], so we need to use [ and ] instead.
59765  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59766  if test "x$has_forbidden_chars" != x; then
59767    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59768    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59769    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59770    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59771      # Going to short mode and back again did indeed matter. Since short mode is
59772      # case insensitive, let's make it lowercase to improve readability.
59773      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59774      # Now convert it back to Unix-style (cygpath)
59775      input_path=`$CYGPATH -u "$shortmode_path"`
59776      new_path="$input_path"
59777    fi
59778  fi
59779
59780  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59781  if test "x$test_cygdrive_prefix" = x; then
59782    # As a simple fix, exclude /usr/bin since it's not a real path.
59783    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59784      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59785      # a path prefixed by /cygdrive for fixpath to work.
59786      new_path="$CYGWIN_ROOT_PATH$input_path"
59787    fi
59788  fi
59789
59790
59791  if test "x$path" != "x$new_path"; then
59792    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59793    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59794$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59795  fi
59796
59797    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59798
59799  path="$POTENTIAL_FREETYPE_LIB_PATH"
59800  has_colon=`$ECHO $path | $GREP ^.:`
59801  new_path="$path"
59802  if test "x$has_colon" = x; then
59803    # Not in mixed or Windows style, start by that.
59804    new_path=`cmd //c echo $path`
59805  fi
59806
59807
59808  input_path="$new_path"
59809  # Check if we need to convert this using DOS-style short mode. If the path
59810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59811  # take no chances and rewrite it.
59812  # Note: m4 eats our [], so we need to use [ and ] instead.
59813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59814  if test "x$has_forbidden_chars" != x; then
59815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59816    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59817  fi
59818
59819
59820  windows_path="$new_path"
59821  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59822    unix_path=`$CYGPATH -u "$windows_path"`
59823    new_path="$unix_path"
59824  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59825    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59826    new_path="$unix_path"
59827  fi
59828
59829  if test "x$path" != "x$new_path"; then
59830    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59832$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59833  fi
59834
59835  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59836  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59837
59838    else
59839      # We're on a unix platform. Hooray! :)
59840      path="$POTENTIAL_FREETYPE_LIB_PATH"
59841      has_space=`$ECHO "$path" | $GREP " "`
59842      if test "x$has_space" != x; then
59843        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59844$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59845        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59846      fi
59847
59848      # Use eval to expand a potential ~
59849      eval path="$path"
59850      if test ! -f "$path" && test ! -d "$path"; then
59851        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59852      fi
59853
59854      if test -d "$path"; then
59855        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59856      else
59857        dir="`$DIRNAME "$path"`"
59858        base="`$BASENAME "$path"`"
59859        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59860      fi
59861    fi
59862  fi
59863
59864
59865    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59867$as_echo_n "checking for freetype includes... " >&6; }
59868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59869$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59870    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59871    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59872$as_echo_n "checking for freetype libraries... " >&6; }
59873    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59874$as_echo "$FREETYPE_LIB_PATH" >&6; }
59875  fi
59876
59877              else
59878
59879  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59880  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59881  METHOD="well-known location"
59882
59883  # Let's start with an optimistic view of the world :-)
59884  FOUND_FREETYPE=yes
59885
59886  # First look for the canonical freetype main include file ft2build.h.
59887  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59888    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59889    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59890    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59891      # Fail.
59892      FOUND_FREETYPE=no
59893    fi
59894  fi
59895
59896  if test "x$FOUND_FREETYPE" = xyes; then
59897    # Include file found, let's continue the sanity check.
59898    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59899$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59900
59901    # Reset to default value
59902    FREETYPE_BASE_NAME=freetype
59903    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59904    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59905      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59906          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59907        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59908        # for the .6 version explicitly.
59909        FREETYPE_BASE_NAME=freetype.6
59910        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59911        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59912$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59913      else
59914        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59915$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59916        FOUND_FREETYPE=no
59917      fi
59918    else
59919      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59920        # On Windows, we will need both .lib and .dll file.
59921        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59922          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59923$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59924          FOUND_FREETYPE=no
59925        fi
59926      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59927          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59928        # Found lib in isa dir, use that instead.
59929        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59930        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59931$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59932      fi
59933    fi
59934  fi
59935
59936  if test "x$FOUND_FREETYPE" = xyes; then
59937
59938  # Only process if variable expands to non-empty
59939
59940  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59941    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59942
59943  # Input might be given as Windows format, start by converting to
59944  # unix format.
59945  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59946  new_path=`$CYGPATH -u "$path"`
59947
59948  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59949  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59950  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59951  # "foo.exe" is OK but "foo" is an error.
59952  #
59953  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59954  # It is also a way to make sure we got the proper file name for the real test later on.
59955  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59956  if test "x$test_shortpath" = x; then
59957    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59958$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59959    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59960  fi
59961
59962  # Call helper function which possibly converts this using DOS-style short mode.
59963  # If so, the updated path is stored in $new_path.
59964
59965  input_path="$new_path"
59966  # Check if we need to convert this using DOS-style short mode. If the path
59967  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59968  # take no chances and rewrite it.
59969  # Note: m4 eats our [], so we need to use [ and ] instead.
59970  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59971  if test "x$has_forbidden_chars" != x; then
59972    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59973    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59974    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59975    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59976      # Going to short mode and back again did indeed matter. Since short mode is
59977      # case insensitive, let's make it lowercase to improve readability.
59978      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59979      # Now convert it back to Unix-style (cygpath)
59980      input_path=`$CYGPATH -u "$shortmode_path"`
59981      new_path="$input_path"
59982    fi
59983  fi
59984
59985  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59986  if test "x$test_cygdrive_prefix" = x; then
59987    # As a simple fix, exclude /usr/bin since it's not a real path.
59988    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59989      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59990      # a path prefixed by /cygdrive for fixpath to work.
59991      new_path="$CYGWIN_ROOT_PATH$input_path"
59992    fi
59993  fi
59994
59995
59996  if test "x$path" != "x$new_path"; then
59997    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59998    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59999$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60000  fi
60001
60002    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60003
60004  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60005  has_colon=`$ECHO $path | $GREP ^.:`
60006  new_path="$path"
60007  if test "x$has_colon" = x; then
60008    # Not in mixed or Windows style, start by that.
60009    new_path=`cmd //c echo $path`
60010  fi
60011
60012
60013  input_path="$new_path"
60014  # Check if we need to convert this using DOS-style short mode. If the path
60015  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60016  # take no chances and rewrite it.
60017  # Note: m4 eats our [], so we need to use [ and ] instead.
60018  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60019  if test "x$has_forbidden_chars" != x; then
60020    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60021    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60022  fi
60023
60024
60025  windows_path="$new_path"
60026  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60027    unix_path=`$CYGPATH -u "$windows_path"`
60028    new_path="$unix_path"
60029  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60030    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60031    new_path="$unix_path"
60032  fi
60033
60034  if test "x$path" != "x$new_path"; then
60035    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60036    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60037$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60038  fi
60039
60040  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60041  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60042
60043    else
60044      # We're on a unix platform. Hooray! :)
60045      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60046      has_space=`$ECHO "$path" | $GREP " "`
60047      if test "x$has_space" != x; then
60048        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60049$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60050        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60051      fi
60052
60053      # Use eval to expand a potential ~
60054      eval path="$path"
60055      if test ! -f "$path" && test ! -d "$path"; then
60056        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60057      fi
60058
60059      if test -d "$path"; then
60060        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60061      else
60062        dir="`$DIRNAME "$path"`"
60063        base="`$BASENAME "$path"`"
60064        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60065      fi
60066    fi
60067  fi
60068
60069
60070  # Only process if variable expands to non-empty
60071
60072  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60073    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60074
60075  # Input might be given as Windows format, start by converting to
60076  # unix format.
60077  path="$POTENTIAL_FREETYPE_LIB_PATH"
60078  new_path=`$CYGPATH -u "$path"`
60079
60080  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60081  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60082  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60083  # "foo.exe" is OK but "foo" is an error.
60084  #
60085  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60086  # It is also a way to make sure we got the proper file name for the real test later on.
60087  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60088  if test "x$test_shortpath" = x; then
60089    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60090$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60091    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60092  fi
60093
60094  # Call helper function which possibly converts this using DOS-style short mode.
60095  # If so, the updated path is stored in $new_path.
60096
60097  input_path="$new_path"
60098  # Check if we need to convert this using DOS-style short mode. If the path
60099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60100  # take no chances and rewrite it.
60101  # Note: m4 eats our [], so we need to use [ and ] instead.
60102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60103  if test "x$has_forbidden_chars" != x; then
60104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60108      # Going to short mode and back again did indeed matter. Since short mode is
60109      # case insensitive, let's make it lowercase to improve readability.
60110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60111      # Now convert it back to Unix-style (cygpath)
60112      input_path=`$CYGPATH -u "$shortmode_path"`
60113      new_path="$input_path"
60114    fi
60115  fi
60116
60117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60118  if test "x$test_cygdrive_prefix" = x; then
60119    # As a simple fix, exclude /usr/bin since it's not a real path.
60120    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60122      # a path prefixed by /cygdrive for fixpath to work.
60123      new_path="$CYGWIN_ROOT_PATH$input_path"
60124    fi
60125  fi
60126
60127
60128  if test "x$path" != "x$new_path"; then
60129    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60130    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60131$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60132  fi
60133
60134    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60135
60136  path="$POTENTIAL_FREETYPE_LIB_PATH"
60137  has_colon=`$ECHO $path | $GREP ^.:`
60138  new_path="$path"
60139  if test "x$has_colon" = x; then
60140    # Not in mixed or Windows style, start by that.
60141    new_path=`cmd //c echo $path`
60142  fi
60143
60144
60145  input_path="$new_path"
60146  # Check if we need to convert this using DOS-style short mode. If the path
60147  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60148  # take no chances and rewrite it.
60149  # Note: m4 eats our [], so we need to use [ and ] instead.
60150  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60151  if test "x$has_forbidden_chars" != x; then
60152    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60153    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60154  fi
60155
60156
60157  windows_path="$new_path"
60158  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60159    unix_path=`$CYGPATH -u "$windows_path"`
60160    new_path="$unix_path"
60161  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60162    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60163    new_path="$unix_path"
60164  fi
60165
60166  if test "x$path" != "x$new_path"; then
60167    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60168    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60169$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60170  fi
60171
60172  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60173  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60174
60175    else
60176      # We're on a unix platform. Hooray! :)
60177      path="$POTENTIAL_FREETYPE_LIB_PATH"
60178      has_space=`$ECHO "$path" | $GREP " "`
60179      if test "x$has_space" != x; then
60180        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60181$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60182        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60183      fi
60184
60185      # Use eval to expand a potential ~
60186      eval path="$path"
60187      if test ! -f "$path" && test ! -d "$path"; then
60188        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60189      fi
60190
60191      if test -d "$path"; then
60192        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60193      else
60194        dir="`$DIRNAME "$path"`"
60195        base="`$BASENAME "$path"`"
60196        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60197      fi
60198    fi
60199  fi
60200
60201
60202    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60203    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60204$as_echo_n "checking for freetype includes... " >&6; }
60205    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60206$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60207    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60208    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60209$as_echo_n "checking for freetype libraries... " >&6; }
60210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60211$as_echo "$FREETYPE_LIB_PATH" >&6; }
60212  fi
60213
60214              fi
60215            fi
60216          fi
60217        else
60218          FREETYPE_BASE_DIR="$SYSROOT/usr"
60219
60220  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60221  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60222  METHOD="well-known location"
60223
60224  # Let's start with an optimistic view of the world :-)
60225  FOUND_FREETYPE=yes
60226
60227  # First look for the canonical freetype main include file ft2build.h.
60228  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60229    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60230    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60231    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60232      # Fail.
60233      FOUND_FREETYPE=no
60234    fi
60235  fi
60236
60237  if test "x$FOUND_FREETYPE" = xyes; then
60238    # Include file found, let's continue the sanity check.
60239    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60240$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60241
60242    # Reset to default value
60243    FREETYPE_BASE_NAME=freetype
60244    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60245    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60246      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60247          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60248        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60249        # for the .6 version explicitly.
60250        FREETYPE_BASE_NAME=freetype.6
60251        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60252        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60253$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60254      else
60255        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60256$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60257        FOUND_FREETYPE=no
60258      fi
60259    else
60260      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60261        # On Windows, we will need both .lib and .dll file.
60262        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60263          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60264$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60265          FOUND_FREETYPE=no
60266        fi
60267      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60268          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60269        # Found lib in isa dir, use that instead.
60270        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60271        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60272$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60273      fi
60274    fi
60275  fi
60276
60277  if test "x$FOUND_FREETYPE" = xyes; then
60278
60279  # Only process if variable expands to non-empty
60280
60281  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60282    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60283
60284  # Input might be given as Windows format, start by converting to
60285  # unix format.
60286  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60287  new_path=`$CYGPATH -u "$path"`
60288
60289  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60290  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60291  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60292  # "foo.exe" is OK but "foo" is an error.
60293  #
60294  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60295  # It is also a way to make sure we got the proper file name for the real test later on.
60296  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60297  if test "x$test_shortpath" = x; then
60298    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60299$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60300    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60301  fi
60302
60303  # Call helper function which possibly converts this using DOS-style short mode.
60304  # If so, the updated path is stored in $new_path.
60305
60306  input_path="$new_path"
60307  # Check if we need to convert this using DOS-style short mode. If the path
60308  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60309  # take no chances and rewrite it.
60310  # Note: m4 eats our [], so we need to use [ and ] instead.
60311  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60312  if test "x$has_forbidden_chars" != x; then
60313    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60314    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60315    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60316    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60317      # Going to short mode and back again did indeed matter. Since short mode is
60318      # case insensitive, let's make it lowercase to improve readability.
60319      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60320      # Now convert it back to Unix-style (cygpath)
60321      input_path=`$CYGPATH -u "$shortmode_path"`
60322      new_path="$input_path"
60323    fi
60324  fi
60325
60326  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60327  if test "x$test_cygdrive_prefix" = x; then
60328    # As a simple fix, exclude /usr/bin since it's not a real path.
60329    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60330      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60331      # a path prefixed by /cygdrive for fixpath to work.
60332      new_path="$CYGWIN_ROOT_PATH$input_path"
60333    fi
60334  fi
60335
60336
60337  if test "x$path" != "x$new_path"; then
60338    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60339    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60340$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60341  fi
60342
60343    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60344
60345  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60346  has_colon=`$ECHO $path | $GREP ^.:`
60347  new_path="$path"
60348  if test "x$has_colon" = x; then
60349    # Not in mixed or Windows style, start by that.
60350    new_path=`cmd //c echo $path`
60351  fi
60352
60353
60354  input_path="$new_path"
60355  # Check if we need to convert this using DOS-style short mode. If the path
60356  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60357  # take no chances and rewrite it.
60358  # Note: m4 eats our [], so we need to use [ and ] instead.
60359  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60360  if test "x$has_forbidden_chars" != x; then
60361    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60362    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60363  fi
60364
60365
60366  windows_path="$new_path"
60367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60368    unix_path=`$CYGPATH -u "$windows_path"`
60369    new_path="$unix_path"
60370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60372    new_path="$unix_path"
60373  fi
60374
60375  if test "x$path" != "x$new_path"; then
60376    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60377    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60378$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60379  fi
60380
60381  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60382  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60383
60384    else
60385      # We're on a unix platform. Hooray! :)
60386      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60387      has_space=`$ECHO "$path" | $GREP " "`
60388      if test "x$has_space" != x; then
60389        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60390$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60391        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60392      fi
60393
60394      # Use eval to expand a potential ~
60395      eval path="$path"
60396      if test ! -f "$path" && test ! -d "$path"; then
60397        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60398      fi
60399
60400      if test -d "$path"; then
60401        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60402      else
60403        dir="`$DIRNAME "$path"`"
60404        base="`$BASENAME "$path"`"
60405        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60406      fi
60407    fi
60408  fi
60409
60410
60411  # Only process if variable expands to non-empty
60412
60413  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60414    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60415
60416  # Input might be given as Windows format, start by converting to
60417  # unix format.
60418  path="$POTENTIAL_FREETYPE_LIB_PATH"
60419  new_path=`$CYGPATH -u "$path"`
60420
60421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60424  # "foo.exe" is OK but "foo" is an error.
60425  #
60426  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60427  # It is also a way to make sure we got the proper file name for the real test later on.
60428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60429  if test "x$test_shortpath" = x; then
60430    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60431$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60432    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60433  fi
60434
60435  # Call helper function which possibly converts this using DOS-style short mode.
60436  # If so, the updated path is stored in $new_path.
60437
60438  input_path="$new_path"
60439  # Check if we need to convert this using DOS-style short mode. If the path
60440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60441  # take no chances and rewrite it.
60442  # Note: m4 eats our [], so we need to use [ and ] instead.
60443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60444  if test "x$has_forbidden_chars" != x; then
60445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60446    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60447    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60448    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60449      # Going to short mode and back again did indeed matter. Since short mode is
60450      # case insensitive, let's make it lowercase to improve readability.
60451      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60452      # Now convert it back to Unix-style (cygpath)
60453      input_path=`$CYGPATH -u "$shortmode_path"`
60454      new_path="$input_path"
60455    fi
60456  fi
60457
60458  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60459  if test "x$test_cygdrive_prefix" = x; then
60460    # As a simple fix, exclude /usr/bin since it's not a real path.
60461    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60462      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60463      # a path prefixed by /cygdrive for fixpath to work.
60464      new_path="$CYGWIN_ROOT_PATH$input_path"
60465    fi
60466  fi
60467
60468
60469  if test "x$path" != "x$new_path"; then
60470    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60471    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60472$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60473  fi
60474
60475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60476
60477  path="$POTENTIAL_FREETYPE_LIB_PATH"
60478  has_colon=`$ECHO $path | $GREP ^.:`
60479  new_path="$path"
60480  if test "x$has_colon" = x; then
60481    # Not in mixed or Windows style, start by that.
60482    new_path=`cmd //c echo $path`
60483  fi
60484
60485
60486  input_path="$new_path"
60487  # Check if we need to convert this using DOS-style short mode. If the path
60488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60489  # take no chances and rewrite it.
60490  # Note: m4 eats our [], so we need to use [ and ] instead.
60491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60492  if test "x$has_forbidden_chars" != x; then
60493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60495  fi
60496
60497
60498  windows_path="$new_path"
60499  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60500    unix_path=`$CYGPATH -u "$windows_path"`
60501    new_path="$unix_path"
60502  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60503    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60504    new_path="$unix_path"
60505  fi
60506
60507  if test "x$path" != "x$new_path"; then
60508    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60509    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60510$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60511  fi
60512
60513  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60514  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60515
60516    else
60517      # We're on a unix platform. Hooray! :)
60518      path="$POTENTIAL_FREETYPE_LIB_PATH"
60519      has_space=`$ECHO "$path" | $GREP " "`
60520      if test "x$has_space" != x; then
60521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60522$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60523        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60524      fi
60525
60526      # Use eval to expand a potential ~
60527      eval path="$path"
60528      if test ! -f "$path" && test ! -d "$path"; then
60529        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60530      fi
60531
60532      if test -d "$path"; then
60533        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60534      else
60535        dir="`$DIRNAME "$path"`"
60536        base="`$BASENAME "$path"`"
60537        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60538      fi
60539    fi
60540  fi
60541
60542
60543    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60544    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60545$as_echo_n "checking for freetype includes... " >&6; }
60546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60547$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60548    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60549    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60550$as_echo_n "checking for freetype libraries... " >&6; }
60551    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60552$as_echo "$FREETYPE_LIB_PATH" >&6; }
60553  fi
60554
60555
60556          if test "x$FOUND_FREETYPE" != xyes; then
60557            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60558
60559  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60560  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60561  METHOD="well-known location"
60562
60563  # Let's start with an optimistic view of the world :-)
60564  FOUND_FREETYPE=yes
60565
60566  # First look for the canonical freetype main include file ft2build.h.
60567  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60568    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60569    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60570    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60571      # Fail.
60572      FOUND_FREETYPE=no
60573    fi
60574  fi
60575
60576  if test "x$FOUND_FREETYPE" = xyes; then
60577    # Include file found, let's continue the sanity check.
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60579$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60580
60581    # Reset to default value
60582    FREETYPE_BASE_NAME=freetype
60583    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60584    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60585      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60586          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60587        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60588        # for the .6 version explicitly.
60589        FREETYPE_BASE_NAME=freetype.6
60590        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60591        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60592$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60593      else
60594        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60595$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60596        FOUND_FREETYPE=no
60597      fi
60598    else
60599      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60600        # On Windows, we will need both .lib and .dll file.
60601        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60602          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60603$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60604          FOUND_FREETYPE=no
60605        fi
60606      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60607          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60608        # Found lib in isa dir, use that instead.
60609        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60610        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60611$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60612      fi
60613    fi
60614  fi
60615
60616  if test "x$FOUND_FREETYPE" = xyes; then
60617
60618  # Only process if variable expands to non-empty
60619
60620  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60621    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60622
60623  # Input might be given as Windows format, start by converting to
60624  # unix format.
60625  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60626  new_path=`$CYGPATH -u "$path"`
60627
60628  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60629  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60630  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60631  # "foo.exe" is OK but "foo" is an error.
60632  #
60633  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60634  # It is also a way to make sure we got the proper file name for the real test later on.
60635  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60636  if test "x$test_shortpath" = x; then
60637    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60638$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60639    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60640  fi
60641
60642  # Call helper function which possibly converts this using DOS-style short mode.
60643  # If so, the updated path is stored in $new_path.
60644
60645  input_path="$new_path"
60646  # Check if we need to convert this using DOS-style short mode. If the path
60647  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60648  # take no chances and rewrite it.
60649  # Note: m4 eats our [], so we need to use [ and ] instead.
60650  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60651  if test "x$has_forbidden_chars" != x; then
60652    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60653    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60654    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60655    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60656      # Going to short mode and back again did indeed matter. Since short mode is
60657      # case insensitive, let's make it lowercase to improve readability.
60658      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60659      # Now convert it back to Unix-style (cygpath)
60660      input_path=`$CYGPATH -u "$shortmode_path"`
60661      new_path="$input_path"
60662    fi
60663  fi
60664
60665  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60666  if test "x$test_cygdrive_prefix" = x; then
60667    # As a simple fix, exclude /usr/bin since it's not a real path.
60668    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60669      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60670      # a path prefixed by /cygdrive for fixpath to work.
60671      new_path="$CYGWIN_ROOT_PATH$input_path"
60672    fi
60673  fi
60674
60675
60676  if test "x$path" != "x$new_path"; then
60677    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60678    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60679$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60680  fi
60681
60682    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60683
60684  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60685  has_colon=`$ECHO $path | $GREP ^.:`
60686  new_path="$path"
60687  if test "x$has_colon" = x; then
60688    # Not in mixed or Windows style, start by that.
60689    new_path=`cmd //c echo $path`
60690  fi
60691
60692
60693  input_path="$new_path"
60694  # Check if we need to convert this using DOS-style short mode. If the path
60695  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60696  # take no chances and rewrite it.
60697  # Note: m4 eats our [], so we need to use [ and ] instead.
60698  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60699  if test "x$has_forbidden_chars" != x; then
60700    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60701    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60702  fi
60703
60704
60705  windows_path="$new_path"
60706  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60707    unix_path=`$CYGPATH -u "$windows_path"`
60708    new_path="$unix_path"
60709  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60710    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60711    new_path="$unix_path"
60712  fi
60713
60714  if test "x$path" != "x$new_path"; then
60715    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60716    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60717$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60718  fi
60719
60720  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60721  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60722
60723    else
60724      # We're on a unix platform. Hooray! :)
60725      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60726      has_space=`$ECHO "$path" | $GREP " "`
60727      if test "x$has_space" != x; then
60728        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60729$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60730        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60731      fi
60732
60733      # Use eval to expand a potential ~
60734      eval path="$path"
60735      if test ! -f "$path" && test ! -d "$path"; then
60736        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60737      fi
60738
60739      if test -d "$path"; then
60740        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60741      else
60742        dir="`$DIRNAME "$path"`"
60743        base="`$BASENAME "$path"`"
60744        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60745      fi
60746    fi
60747  fi
60748
60749
60750  # Only process if variable expands to non-empty
60751
60752  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60753    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60754
60755  # Input might be given as Windows format, start by converting to
60756  # unix format.
60757  path="$POTENTIAL_FREETYPE_LIB_PATH"
60758  new_path=`$CYGPATH -u "$path"`
60759
60760  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60761  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60762  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60763  # "foo.exe" is OK but "foo" is an error.
60764  #
60765  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60766  # It is also a way to make sure we got the proper file name for the real test later on.
60767  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60768  if test "x$test_shortpath" = x; then
60769    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60770$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60771    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60772  fi
60773
60774  # Call helper function which possibly converts this using DOS-style short mode.
60775  # If so, the updated path is stored in $new_path.
60776
60777  input_path="$new_path"
60778  # Check if we need to convert this using DOS-style short mode. If the path
60779  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60780  # take no chances and rewrite it.
60781  # Note: m4 eats our [], so we need to use [ and ] instead.
60782  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60783  if test "x$has_forbidden_chars" != x; then
60784    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60785    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60786    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60787    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60788      # Going to short mode and back again did indeed matter. Since short mode is
60789      # case insensitive, let's make it lowercase to improve readability.
60790      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60791      # Now convert it back to Unix-style (cygpath)
60792      input_path=`$CYGPATH -u "$shortmode_path"`
60793      new_path="$input_path"
60794    fi
60795  fi
60796
60797  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60798  if test "x$test_cygdrive_prefix" = x; then
60799    # As a simple fix, exclude /usr/bin since it's not a real path.
60800    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60801      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60802      # a path prefixed by /cygdrive for fixpath to work.
60803      new_path="$CYGWIN_ROOT_PATH$input_path"
60804    fi
60805  fi
60806
60807
60808  if test "x$path" != "x$new_path"; then
60809    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60810    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60811$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60812  fi
60813
60814    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60815
60816  path="$POTENTIAL_FREETYPE_LIB_PATH"
60817  has_colon=`$ECHO $path | $GREP ^.:`
60818  new_path="$path"
60819  if test "x$has_colon" = x; then
60820    # Not in mixed or Windows style, start by that.
60821    new_path=`cmd //c echo $path`
60822  fi
60823
60824
60825  input_path="$new_path"
60826  # Check if we need to convert this using DOS-style short mode. If the path
60827  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60828  # take no chances and rewrite it.
60829  # Note: m4 eats our [], so we need to use [ and ] instead.
60830  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60831  if test "x$has_forbidden_chars" != x; then
60832    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60833    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60834  fi
60835
60836
60837  windows_path="$new_path"
60838  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60839    unix_path=`$CYGPATH -u "$windows_path"`
60840    new_path="$unix_path"
60841  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60842    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60843    new_path="$unix_path"
60844  fi
60845
60846  if test "x$path" != "x$new_path"; then
60847    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60848    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60849$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60850  fi
60851
60852  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60853  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60854
60855    else
60856      # We're on a unix platform. Hooray! :)
60857      path="$POTENTIAL_FREETYPE_LIB_PATH"
60858      has_space=`$ECHO "$path" | $GREP " "`
60859      if test "x$has_space" != x; then
60860        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60861$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60862        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60863      fi
60864
60865      # Use eval to expand a potential ~
60866      eval path="$path"
60867      if test ! -f "$path" && test ! -d "$path"; then
60868        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60869      fi
60870
60871      if test -d "$path"; then
60872        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60873      else
60874        dir="`$DIRNAME "$path"`"
60875        base="`$BASENAME "$path"`"
60876        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60877      fi
60878    fi
60879  fi
60880
60881
60882    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60883    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60884$as_echo_n "checking for freetype includes... " >&6; }
60885    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60886$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60887    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60888    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60889$as_echo_n "checking for freetype libraries... " >&6; }
60890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60891$as_echo "$FREETYPE_LIB_PATH" >&6; }
60892  fi
60893
60894          fi
60895          if test "x$FOUND_FREETYPE" != xyes; then
60896            FREETYPE_BASE_DIR="$SYSROOT/usr/local"
60897
60898  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60899  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60900  METHOD="well-known location"
60901
60902  # Let's start with an optimistic view of the world :-)
60903  FOUND_FREETYPE=yes
60904
60905  # First look for the canonical freetype main include file ft2build.h.
60906  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60907    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60908    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60909    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60910      # Fail.
60911      FOUND_FREETYPE=no
60912    fi
60913  fi
60914
60915  if test "x$FOUND_FREETYPE" = xyes; then
60916    # Include file found, let's continue the sanity check.
60917    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60918$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60919
60920    # Reset to default value
60921    FREETYPE_BASE_NAME=freetype
60922    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60923    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60924      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60925          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60926        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60927        # for the .6 version explicitly.
60928        FREETYPE_BASE_NAME=freetype.6
60929        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60930        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60931$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60932      else
60933        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60934$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60935        FOUND_FREETYPE=no
60936      fi
60937    else
60938      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60939        # On Windows, we will need both .lib and .dll file.
60940        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60941          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60942$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60943          FOUND_FREETYPE=no
60944        fi
60945      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60946          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60947        # Found lib in isa dir, use that instead.
60948        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60949        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60950$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60951      fi
60952    fi
60953  fi
60954
60955  if test "x$FOUND_FREETYPE" = xyes; then
60956
60957  # Only process if variable expands to non-empty
60958
60959  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60960    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60961
60962  # Input might be given as Windows format, start by converting to
60963  # unix format.
60964  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60965  new_path=`$CYGPATH -u "$path"`
60966
60967  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60968  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60969  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60970  # "foo.exe" is OK but "foo" is an error.
60971  #
60972  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60973  # It is also a way to make sure we got the proper file name for the real test later on.
60974  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60975  if test "x$test_shortpath" = x; then
60976    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60977$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60978    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60979  fi
60980
60981  # Call helper function which possibly converts this using DOS-style short mode.
60982  # If so, the updated path is stored in $new_path.
60983
60984  input_path="$new_path"
60985  # Check if we need to convert this using DOS-style short mode. If the path
60986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60987  # take no chances and rewrite it.
60988  # Note: m4 eats our [], so we need to use [ and ] instead.
60989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60990  if test "x$has_forbidden_chars" != x; then
60991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60992    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60993    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60994    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60995      # Going to short mode and back again did indeed matter. Since short mode is
60996      # case insensitive, let's make it lowercase to improve readability.
60997      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60998      # Now convert it back to Unix-style (cygpath)
60999      input_path=`$CYGPATH -u "$shortmode_path"`
61000      new_path="$input_path"
61001    fi
61002  fi
61003
61004  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61005  if test "x$test_cygdrive_prefix" = x; then
61006    # As a simple fix, exclude /usr/bin since it's not a real path.
61007    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61008      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61009      # a path prefixed by /cygdrive for fixpath to work.
61010      new_path="$CYGWIN_ROOT_PATH$input_path"
61011    fi
61012  fi
61013
61014
61015  if test "x$path" != "x$new_path"; then
61016    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61017    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61018$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61019  fi
61020
61021    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61022
61023  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61024  has_colon=`$ECHO $path | $GREP ^.:`
61025  new_path="$path"
61026  if test "x$has_colon" = x; then
61027    # Not in mixed or Windows style, start by that.
61028    new_path=`cmd //c echo $path`
61029  fi
61030
61031
61032  input_path="$new_path"
61033  # Check if we need to convert this using DOS-style short mode. If the path
61034  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61035  # take no chances and rewrite it.
61036  # Note: m4 eats our [], so we need to use [ and ] instead.
61037  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61038  if test "x$has_forbidden_chars" != x; then
61039    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61040    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61041  fi
61042
61043
61044  windows_path="$new_path"
61045  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61046    unix_path=`$CYGPATH -u "$windows_path"`
61047    new_path="$unix_path"
61048  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61049    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61050    new_path="$unix_path"
61051  fi
61052
61053  if test "x$path" != "x$new_path"; then
61054    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61055    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61056$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61057  fi
61058
61059  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61060  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61061
61062    else
61063      # We're on a unix platform. Hooray! :)
61064      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61065      has_space=`$ECHO "$path" | $GREP " "`
61066      if test "x$has_space" != x; then
61067        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61068$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61069        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61070      fi
61071
61072      # Use eval to expand a potential ~
61073      eval path="$path"
61074      if test ! -f "$path" && test ! -d "$path"; then
61075        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61076      fi
61077
61078      if test -d "$path"; then
61079        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61080      else
61081        dir="`$DIRNAME "$path"`"
61082        base="`$BASENAME "$path"`"
61083        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61084      fi
61085    fi
61086  fi
61087
61088
61089  # Only process if variable expands to non-empty
61090
61091  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61093
61094  # Input might be given as Windows format, start by converting to
61095  # unix format.
61096  path="$POTENTIAL_FREETYPE_LIB_PATH"
61097  new_path=`$CYGPATH -u "$path"`
61098
61099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61102  # "foo.exe" is OK but "foo" is an error.
61103  #
61104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61105  # It is also a way to make sure we got the proper file name for the real test later on.
61106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61107  if test "x$test_shortpath" = x; then
61108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61110    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61111  fi
61112
61113  # Call helper function which possibly converts this using DOS-style short mode.
61114  # If so, the updated path is stored in $new_path.
61115
61116  input_path="$new_path"
61117  # Check if we need to convert this using DOS-style short mode. If the path
61118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61119  # take no chances and rewrite it.
61120  # Note: m4 eats our [], so we need to use [ and ] instead.
61121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61122  if test "x$has_forbidden_chars" != x; then
61123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61127      # Going to short mode and back again did indeed matter. Since short mode is
61128      # case insensitive, let's make it lowercase to improve readability.
61129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61130      # Now convert it back to Unix-style (cygpath)
61131      input_path=`$CYGPATH -u "$shortmode_path"`
61132      new_path="$input_path"
61133    fi
61134  fi
61135
61136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61137  if test "x$test_cygdrive_prefix" = x; then
61138    # As a simple fix, exclude /usr/bin since it's not a real path.
61139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61141      # a path prefixed by /cygdrive for fixpath to work.
61142      new_path="$CYGWIN_ROOT_PATH$input_path"
61143    fi
61144  fi
61145
61146
61147  if test "x$path" != "x$new_path"; then
61148    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61151  fi
61152
61153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61154
61155  path="$POTENTIAL_FREETYPE_LIB_PATH"
61156  has_colon=`$ECHO $path | $GREP ^.:`
61157  new_path="$path"
61158  if test "x$has_colon" = x; then
61159    # Not in mixed or Windows style, start by that.
61160    new_path=`cmd //c echo $path`
61161  fi
61162
61163
61164  input_path="$new_path"
61165  # Check if we need to convert this using DOS-style short mode. If the path
61166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61167  # take no chances and rewrite it.
61168  # Note: m4 eats our [], so we need to use [ and ] instead.
61169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61170  if test "x$has_forbidden_chars" != x; then
61171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61173  fi
61174
61175
61176  windows_path="$new_path"
61177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61178    unix_path=`$CYGPATH -u "$windows_path"`
61179    new_path="$unix_path"
61180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61182    new_path="$unix_path"
61183  fi
61184
61185  if test "x$path" != "x$new_path"; then
61186    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61189  fi
61190
61191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61193
61194    else
61195      # We're on a unix platform. Hooray! :)
61196      path="$POTENTIAL_FREETYPE_LIB_PATH"
61197      has_space=`$ECHO "$path" | $GREP " "`
61198      if test "x$has_space" != x; then
61199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61202      fi
61203
61204      # Use eval to expand a potential ~
61205      eval path="$path"
61206      if test ! -f "$path" && test ! -d "$path"; then
61207        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61208      fi
61209
61210      if test -d "$path"; then
61211        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61212      else
61213        dir="`$DIRNAME "$path"`"
61214        base="`$BASENAME "$path"`"
61215        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61216      fi
61217    fi
61218  fi
61219
61220
61221    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61222    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61223$as_echo_n "checking for freetype includes... " >&6; }
61224    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61225$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61226    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61227    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61228$as_echo_n "checking for freetype libraries... " >&6; }
61229    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61230$as_echo "$FREETYPE_LIB_PATH" >&6; }
61231  fi
61232
61233          fi
61234
61235          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61236            if test "x$FOUND_FREETYPE" != xyes; then
61237              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61238              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61239
61240  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61241  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61242  METHOD="well-known location"
61243
61244  # Let's start with an optimistic view of the world :-)
61245  FOUND_FREETYPE=yes
61246
61247  # First look for the canonical freetype main include file ft2build.h.
61248  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61249    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61250    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61251    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61252      # Fail.
61253      FOUND_FREETYPE=no
61254    fi
61255  fi
61256
61257  if test "x$FOUND_FREETYPE" = xyes; then
61258    # Include file found, let's continue the sanity check.
61259    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61260$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61261
61262    # Reset to default value
61263    FREETYPE_BASE_NAME=freetype
61264    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61265    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61266      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61267          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61268        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61269        # for the .6 version explicitly.
61270        FREETYPE_BASE_NAME=freetype.6
61271        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61272        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61273$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61274      else
61275        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61276$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61277        FOUND_FREETYPE=no
61278      fi
61279    else
61280      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61281        # On Windows, we will need both .lib and .dll file.
61282        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61283          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61284$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61285          FOUND_FREETYPE=no
61286        fi
61287      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61288          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61289        # Found lib in isa dir, use that instead.
61290        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61291        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61292$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61293      fi
61294    fi
61295  fi
61296
61297  if test "x$FOUND_FREETYPE" = xyes; then
61298
61299  # Only process if variable expands to non-empty
61300
61301  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61302    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61303
61304  # Input might be given as Windows format, start by converting to
61305  # unix format.
61306  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61307  new_path=`$CYGPATH -u "$path"`
61308
61309  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61310  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61311  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61312  # "foo.exe" is OK but "foo" is an error.
61313  #
61314  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61315  # It is also a way to make sure we got the proper file name for the real test later on.
61316  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61317  if test "x$test_shortpath" = x; then
61318    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61319$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61320    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61321  fi
61322
61323  # Call helper function which possibly converts this using DOS-style short mode.
61324  # If so, the updated path is stored in $new_path.
61325
61326  input_path="$new_path"
61327  # Check if we need to convert this using DOS-style short mode. If the path
61328  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61329  # take no chances and rewrite it.
61330  # Note: m4 eats our [], so we need to use [ and ] instead.
61331  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61332  if test "x$has_forbidden_chars" != x; then
61333    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61334    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61335    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61336    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61337      # Going to short mode and back again did indeed matter. Since short mode is
61338      # case insensitive, let's make it lowercase to improve readability.
61339      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61340      # Now convert it back to Unix-style (cygpath)
61341      input_path=`$CYGPATH -u "$shortmode_path"`
61342      new_path="$input_path"
61343    fi
61344  fi
61345
61346  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61347  if test "x$test_cygdrive_prefix" = x; then
61348    # As a simple fix, exclude /usr/bin since it's not a real path.
61349    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61350      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61351      # a path prefixed by /cygdrive for fixpath to work.
61352      new_path="$CYGWIN_ROOT_PATH$input_path"
61353    fi
61354  fi
61355
61356
61357  if test "x$path" != "x$new_path"; then
61358    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61359    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61360$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61361  fi
61362
61363    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61364
61365  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61366  has_colon=`$ECHO $path | $GREP ^.:`
61367  new_path="$path"
61368  if test "x$has_colon" = x; then
61369    # Not in mixed or Windows style, start by that.
61370    new_path=`cmd //c echo $path`
61371  fi
61372
61373
61374  input_path="$new_path"
61375  # Check if we need to convert this using DOS-style short mode. If the path
61376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61377  # take no chances and rewrite it.
61378  # Note: m4 eats our [], so we need to use [ and ] instead.
61379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61380  if test "x$has_forbidden_chars" != x; then
61381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61382    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61383  fi
61384
61385
61386  windows_path="$new_path"
61387  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61388    unix_path=`$CYGPATH -u "$windows_path"`
61389    new_path="$unix_path"
61390  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61391    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61392    new_path="$unix_path"
61393  fi
61394
61395  if test "x$path" != "x$new_path"; then
61396    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61397    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61398$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61399  fi
61400
61401  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61402  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61403
61404    else
61405      # We're on a unix platform. Hooray! :)
61406      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61407      has_space=`$ECHO "$path" | $GREP " "`
61408      if test "x$has_space" != x; then
61409        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61410$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61411        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61412      fi
61413
61414      # Use eval to expand a potential ~
61415      eval path="$path"
61416      if test ! -f "$path" && test ! -d "$path"; then
61417        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61418      fi
61419
61420      if test -d "$path"; then
61421        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61422      else
61423        dir="`$DIRNAME "$path"`"
61424        base="`$BASENAME "$path"`"
61425        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61426      fi
61427    fi
61428  fi
61429
61430
61431  # Only process if variable expands to non-empty
61432
61433  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61434    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61435
61436  # Input might be given as Windows format, start by converting to
61437  # unix format.
61438  path="$POTENTIAL_FREETYPE_LIB_PATH"
61439  new_path=`$CYGPATH -u "$path"`
61440
61441  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61442  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61443  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61444  # "foo.exe" is OK but "foo" is an error.
61445  #
61446  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61447  # It is also a way to make sure we got the proper file name for the real test later on.
61448  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61449  if test "x$test_shortpath" = x; then
61450    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61451$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61452    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61453  fi
61454
61455  # Call helper function which possibly converts this using DOS-style short mode.
61456  # If so, the updated path is stored in $new_path.
61457
61458  input_path="$new_path"
61459  # Check if we need to convert this using DOS-style short mode. If the path
61460  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61461  # take no chances and rewrite it.
61462  # Note: m4 eats our [], so we need to use [ and ] instead.
61463  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61464  if test "x$has_forbidden_chars" != x; then
61465    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61466    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61467    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61468    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61469      # Going to short mode and back again did indeed matter. Since short mode is
61470      # case insensitive, let's make it lowercase to improve readability.
61471      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61472      # Now convert it back to Unix-style (cygpath)
61473      input_path=`$CYGPATH -u "$shortmode_path"`
61474      new_path="$input_path"
61475    fi
61476  fi
61477
61478  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61479  if test "x$test_cygdrive_prefix" = x; then
61480    # As a simple fix, exclude /usr/bin since it's not a real path.
61481    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61482      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61483      # a path prefixed by /cygdrive for fixpath to work.
61484      new_path="$CYGWIN_ROOT_PATH$input_path"
61485    fi
61486  fi
61487
61488
61489  if test "x$path" != "x$new_path"; then
61490    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61491    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61492$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61493  fi
61494
61495    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61496
61497  path="$POTENTIAL_FREETYPE_LIB_PATH"
61498  has_colon=`$ECHO $path | $GREP ^.:`
61499  new_path="$path"
61500  if test "x$has_colon" = x; then
61501    # Not in mixed or Windows style, start by that.
61502    new_path=`cmd //c echo $path`
61503  fi
61504
61505
61506  input_path="$new_path"
61507  # Check if we need to convert this using DOS-style short mode. If the path
61508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61509  # take no chances and rewrite it.
61510  # Note: m4 eats our [], so we need to use [ and ] instead.
61511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61512  if test "x$has_forbidden_chars" != x; then
61513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61514    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61515  fi
61516
61517
61518  windows_path="$new_path"
61519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61520    unix_path=`$CYGPATH -u "$windows_path"`
61521    new_path="$unix_path"
61522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61523    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61524    new_path="$unix_path"
61525  fi
61526
61527  if test "x$path" != "x$new_path"; then
61528    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61529    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61530$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61531  fi
61532
61533  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61534  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61535
61536    else
61537      # We're on a unix platform. Hooray! :)
61538      path="$POTENTIAL_FREETYPE_LIB_PATH"
61539      has_space=`$ECHO "$path" | $GREP " "`
61540      if test "x$has_space" != x; then
61541        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61542$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61543        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61544      fi
61545
61546      # Use eval to expand a potential ~
61547      eval path="$path"
61548      if test ! -f "$path" && test ! -d "$path"; then
61549        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61550      fi
61551
61552      if test -d "$path"; then
61553        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61554      else
61555        dir="`$DIRNAME "$path"`"
61556        base="`$BASENAME "$path"`"
61557        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61558      fi
61559    fi
61560  fi
61561
61562
61563    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61564    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61565$as_echo_n "checking for freetype includes... " >&6; }
61566    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61567$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61568    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61569    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61570$as_echo_n "checking for freetype libraries... " >&6; }
61571    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61572$as_echo "$FREETYPE_LIB_PATH" >&6; }
61573  fi
61574
61575            fi
61576          fi
61577
61578          if test "x$FOUND_FREETYPE" != xyes; then
61579            FREETYPE_BASE_DIR="$SYSROOT/usr"
61580            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61581
61582  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61583  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61584  METHOD="well-known location"
61585
61586  # Let's start with an optimistic view of the world :-)
61587  FOUND_FREETYPE=yes
61588
61589  # First look for the canonical freetype main include file ft2build.h.
61590  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61591    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61592    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61593    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61594      # Fail.
61595      FOUND_FREETYPE=no
61596    fi
61597  fi
61598
61599  if test "x$FOUND_FREETYPE" = xyes; then
61600    # Include file found, let's continue the sanity check.
61601    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61602$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61603
61604    # Reset to default value
61605    FREETYPE_BASE_NAME=freetype
61606    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61607    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61608      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61609          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61610        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61611        # for the .6 version explicitly.
61612        FREETYPE_BASE_NAME=freetype.6
61613        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61614        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61615$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61616      else
61617        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61618$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61619        FOUND_FREETYPE=no
61620      fi
61621    else
61622      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61623        # On Windows, we will need both .lib and .dll file.
61624        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61625          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61626$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61627          FOUND_FREETYPE=no
61628        fi
61629      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61630          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61631        # Found lib in isa dir, use that instead.
61632        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61633        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61634$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61635      fi
61636    fi
61637  fi
61638
61639  if test "x$FOUND_FREETYPE" = xyes; then
61640
61641  # Only process if variable expands to non-empty
61642
61643  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61644    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61645
61646  # Input might be given as Windows format, start by converting to
61647  # unix format.
61648  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61649  new_path=`$CYGPATH -u "$path"`
61650
61651  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61652  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61653  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61654  # "foo.exe" is OK but "foo" is an error.
61655  #
61656  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61657  # It is also a way to make sure we got the proper file name for the real test later on.
61658  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61659  if test "x$test_shortpath" = x; then
61660    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61661$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61662    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61663  fi
61664
61665  # Call helper function which possibly converts this using DOS-style short mode.
61666  # If so, the updated path is stored in $new_path.
61667
61668  input_path="$new_path"
61669  # Check if we need to convert this using DOS-style short mode. If the path
61670  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61671  # take no chances and rewrite it.
61672  # Note: m4 eats our [], so we need to use [ and ] instead.
61673  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61674  if test "x$has_forbidden_chars" != x; then
61675    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61676    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61677    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61678    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61679      # Going to short mode and back again did indeed matter. Since short mode is
61680      # case insensitive, let's make it lowercase to improve readability.
61681      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61682      # Now convert it back to Unix-style (cygpath)
61683      input_path=`$CYGPATH -u "$shortmode_path"`
61684      new_path="$input_path"
61685    fi
61686  fi
61687
61688  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61689  if test "x$test_cygdrive_prefix" = x; then
61690    # As a simple fix, exclude /usr/bin since it's not a real path.
61691    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61692      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61693      # a path prefixed by /cygdrive for fixpath to work.
61694      new_path="$CYGWIN_ROOT_PATH$input_path"
61695    fi
61696  fi
61697
61698
61699  if test "x$path" != "x$new_path"; then
61700    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61701    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61702$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61703  fi
61704
61705    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61706
61707  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61708  has_colon=`$ECHO $path | $GREP ^.:`
61709  new_path="$path"
61710  if test "x$has_colon" = x; then
61711    # Not in mixed or Windows style, start by that.
61712    new_path=`cmd //c echo $path`
61713  fi
61714
61715
61716  input_path="$new_path"
61717  # Check if we need to convert this using DOS-style short mode. If the path
61718  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61719  # take no chances and rewrite it.
61720  # Note: m4 eats our [], so we need to use [ and ] instead.
61721  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61722  if test "x$has_forbidden_chars" != x; then
61723    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61724    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61725  fi
61726
61727
61728  windows_path="$new_path"
61729  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61730    unix_path=`$CYGPATH -u "$windows_path"`
61731    new_path="$unix_path"
61732  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61733    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61734    new_path="$unix_path"
61735  fi
61736
61737  if test "x$path" != "x$new_path"; then
61738    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61739    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61740$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61741  fi
61742
61743  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61744  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61745
61746    else
61747      # We're on a unix platform. Hooray! :)
61748      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61749      has_space=`$ECHO "$path" | $GREP " "`
61750      if test "x$has_space" != x; then
61751        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61752$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61753        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61754      fi
61755
61756      # Use eval to expand a potential ~
61757      eval path="$path"
61758      if test ! -f "$path" && test ! -d "$path"; then
61759        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61760      fi
61761
61762      if test -d "$path"; then
61763        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61764      else
61765        dir="`$DIRNAME "$path"`"
61766        base="`$BASENAME "$path"`"
61767        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61768      fi
61769    fi
61770  fi
61771
61772
61773  # Only process if variable expands to non-empty
61774
61775  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61776    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61777
61778  # Input might be given as Windows format, start by converting to
61779  # unix format.
61780  path="$POTENTIAL_FREETYPE_LIB_PATH"
61781  new_path=`$CYGPATH -u "$path"`
61782
61783  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61784  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61785  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61786  # "foo.exe" is OK but "foo" is an error.
61787  #
61788  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61789  # It is also a way to make sure we got the proper file name for the real test later on.
61790  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61791  if test "x$test_shortpath" = x; then
61792    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61793$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61794    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61795  fi
61796
61797  # Call helper function which possibly converts this using DOS-style short mode.
61798  # If so, the updated path is stored in $new_path.
61799
61800  input_path="$new_path"
61801  # Check if we need to convert this using DOS-style short mode. If the path
61802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61803  # take no chances and rewrite it.
61804  # Note: m4 eats our [], so we need to use [ and ] instead.
61805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61806  if test "x$has_forbidden_chars" != x; then
61807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61808    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61809    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61810    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61811      # Going to short mode and back again did indeed matter. Since short mode is
61812      # case insensitive, let's make it lowercase to improve readability.
61813      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61814      # Now convert it back to Unix-style (cygpath)
61815      input_path=`$CYGPATH -u "$shortmode_path"`
61816      new_path="$input_path"
61817    fi
61818  fi
61819
61820  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61821  if test "x$test_cygdrive_prefix" = x; then
61822    # As a simple fix, exclude /usr/bin since it's not a real path.
61823    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61824      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61825      # a path prefixed by /cygdrive for fixpath to work.
61826      new_path="$CYGWIN_ROOT_PATH$input_path"
61827    fi
61828  fi
61829
61830
61831  if test "x$path" != "x$new_path"; then
61832    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61834$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61835  fi
61836
61837    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61838
61839  path="$POTENTIAL_FREETYPE_LIB_PATH"
61840  has_colon=`$ECHO $path | $GREP ^.:`
61841  new_path="$path"
61842  if test "x$has_colon" = x; then
61843    # Not in mixed or Windows style, start by that.
61844    new_path=`cmd //c echo $path`
61845  fi
61846
61847
61848  input_path="$new_path"
61849  # Check if we need to convert this using DOS-style short mode. If the path
61850  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61851  # take no chances and rewrite it.
61852  # Note: m4 eats our [], so we need to use [ and ] instead.
61853  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61854  if test "x$has_forbidden_chars" != x; then
61855    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61856    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61857  fi
61858
61859
61860  windows_path="$new_path"
61861  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61862    unix_path=`$CYGPATH -u "$windows_path"`
61863    new_path="$unix_path"
61864  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61865    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61866    new_path="$unix_path"
61867  fi
61868
61869  if test "x$path" != "x$new_path"; then
61870    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61871    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61872$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61873  fi
61874
61875  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61876  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61877
61878    else
61879      # We're on a unix platform. Hooray! :)
61880      path="$POTENTIAL_FREETYPE_LIB_PATH"
61881      has_space=`$ECHO "$path" | $GREP " "`
61882      if test "x$has_space" != x; then
61883        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61884$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61885        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61886      fi
61887
61888      # Use eval to expand a potential ~
61889      eval path="$path"
61890      if test ! -f "$path" && test ! -d "$path"; then
61891        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61892      fi
61893
61894      if test -d "$path"; then
61895        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61896      else
61897        dir="`$DIRNAME "$path"`"
61898        base="`$BASENAME "$path"`"
61899        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61900      fi
61901    fi
61902  fi
61903
61904
61905    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61906    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61907$as_echo_n "checking for freetype includes... " >&6; }
61908    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61909$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61910    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61911    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61912$as_echo_n "checking for freetype libraries... " >&6; }
61913    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61914$as_echo "$FREETYPE_LIB_PATH" >&6; }
61915  fi
61916
61917            else
61918
61919  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61920  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61921  METHOD="well-known location"
61922
61923  # Let's start with an optimistic view of the world :-)
61924  FOUND_FREETYPE=yes
61925
61926  # First look for the canonical freetype main include file ft2build.h.
61927  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61928    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61929    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61930    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61931      # Fail.
61932      FOUND_FREETYPE=no
61933    fi
61934  fi
61935
61936  if test "x$FOUND_FREETYPE" = xyes; then
61937    # Include file found, let's continue the sanity check.
61938    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61939$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61940
61941    # Reset to default value
61942    FREETYPE_BASE_NAME=freetype
61943    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61944    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61945      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61946          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61947        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61948        # for the .6 version explicitly.
61949        FREETYPE_BASE_NAME=freetype.6
61950        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61951        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61952$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61953      else
61954        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61955$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61956        FOUND_FREETYPE=no
61957      fi
61958    else
61959      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61960        # On Windows, we will need both .lib and .dll file.
61961        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61962          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61963$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61964          FOUND_FREETYPE=no
61965        fi
61966      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61967          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61968        # Found lib in isa dir, use that instead.
61969        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61970        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61971$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61972      fi
61973    fi
61974  fi
61975
61976  if test "x$FOUND_FREETYPE" = xyes; then
61977
61978  # Only process if variable expands to non-empty
61979
61980  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61981    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61982
61983  # Input might be given as Windows format, start by converting to
61984  # unix format.
61985  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61986  new_path=`$CYGPATH -u "$path"`
61987
61988  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61989  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61990  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61991  # "foo.exe" is OK but "foo" is an error.
61992  #
61993  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61994  # It is also a way to make sure we got the proper file name for the real test later on.
61995  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61996  if test "x$test_shortpath" = x; then
61997    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61998$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61999    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62000  fi
62001
62002  # Call helper function which possibly converts this using DOS-style short mode.
62003  # If so, the updated path is stored in $new_path.
62004
62005  input_path="$new_path"
62006  # Check if we need to convert this using DOS-style short mode. If the path
62007  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62008  # take no chances and rewrite it.
62009  # Note: m4 eats our [], so we need to use [ and ] instead.
62010  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62011  if test "x$has_forbidden_chars" != x; then
62012    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62013    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62014    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62015    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62016      # Going to short mode and back again did indeed matter. Since short mode is
62017      # case insensitive, let's make it lowercase to improve readability.
62018      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62019      # Now convert it back to Unix-style (cygpath)
62020      input_path=`$CYGPATH -u "$shortmode_path"`
62021      new_path="$input_path"
62022    fi
62023  fi
62024
62025  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62026  if test "x$test_cygdrive_prefix" = x; then
62027    # As a simple fix, exclude /usr/bin since it's not a real path.
62028    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62029      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62030      # a path prefixed by /cygdrive for fixpath to work.
62031      new_path="$CYGWIN_ROOT_PATH$input_path"
62032    fi
62033  fi
62034
62035
62036  if test "x$path" != "x$new_path"; then
62037    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62038    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62039$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62040  fi
62041
62042    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62043
62044  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62045  has_colon=`$ECHO $path | $GREP ^.:`
62046  new_path="$path"
62047  if test "x$has_colon" = x; then
62048    # Not in mixed or Windows style, start by that.
62049    new_path=`cmd //c echo $path`
62050  fi
62051
62052
62053  input_path="$new_path"
62054  # Check if we need to convert this using DOS-style short mode. If the path
62055  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62056  # take no chances and rewrite it.
62057  # Note: m4 eats our [], so we need to use [ and ] instead.
62058  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62059  if test "x$has_forbidden_chars" != x; then
62060    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62061    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62062  fi
62063
62064
62065  windows_path="$new_path"
62066  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62067    unix_path=`$CYGPATH -u "$windows_path"`
62068    new_path="$unix_path"
62069  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62070    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62071    new_path="$unix_path"
62072  fi
62073
62074  if test "x$path" != "x$new_path"; then
62075    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62077$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62078  fi
62079
62080  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62081  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62082
62083    else
62084      # We're on a unix platform. Hooray! :)
62085      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62086      has_space=`$ECHO "$path" | $GREP " "`
62087      if test "x$has_space" != x; then
62088        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62089$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62090        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62091      fi
62092
62093      # Use eval to expand a potential ~
62094      eval path="$path"
62095      if test ! -f "$path" && test ! -d "$path"; then
62096        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62097      fi
62098
62099      if test -d "$path"; then
62100        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62101      else
62102        dir="`$DIRNAME "$path"`"
62103        base="`$BASENAME "$path"`"
62104        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62105      fi
62106    fi
62107  fi
62108
62109
62110  # Only process if variable expands to non-empty
62111
62112  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62113    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62114
62115  # Input might be given as Windows format, start by converting to
62116  # unix format.
62117  path="$POTENTIAL_FREETYPE_LIB_PATH"
62118  new_path=`$CYGPATH -u "$path"`
62119
62120  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62121  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62122  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62123  # "foo.exe" is OK but "foo" is an error.
62124  #
62125  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62126  # It is also a way to make sure we got the proper file name for the real test later on.
62127  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62128  if test "x$test_shortpath" = x; then
62129    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62130$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62131    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62132  fi
62133
62134  # Call helper function which possibly converts this using DOS-style short mode.
62135  # If so, the updated path is stored in $new_path.
62136
62137  input_path="$new_path"
62138  # Check if we need to convert this using DOS-style short mode. If the path
62139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62140  # take no chances and rewrite it.
62141  # Note: m4 eats our [], so we need to use [ and ] instead.
62142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62143  if test "x$has_forbidden_chars" != x; then
62144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62145    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62146    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62147    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62148      # Going to short mode and back again did indeed matter. Since short mode is
62149      # case insensitive, let's make it lowercase to improve readability.
62150      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62151      # Now convert it back to Unix-style (cygpath)
62152      input_path=`$CYGPATH -u "$shortmode_path"`
62153      new_path="$input_path"
62154    fi
62155  fi
62156
62157  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62158  if test "x$test_cygdrive_prefix" = x; then
62159    # As a simple fix, exclude /usr/bin since it's not a real path.
62160    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62161      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62162      # a path prefixed by /cygdrive for fixpath to work.
62163      new_path="$CYGWIN_ROOT_PATH$input_path"
62164    fi
62165  fi
62166
62167
62168  if test "x$path" != "x$new_path"; then
62169    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62170    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62171$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62172  fi
62173
62174    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62175
62176  path="$POTENTIAL_FREETYPE_LIB_PATH"
62177  has_colon=`$ECHO $path | $GREP ^.:`
62178  new_path="$path"
62179  if test "x$has_colon" = x; then
62180    # Not in mixed or Windows style, start by that.
62181    new_path=`cmd //c echo $path`
62182  fi
62183
62184
62185  input_path="$new_path"
62186  # Check if we need to convert this using DOS-style short mode. If the path
62187  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62188  # take no chances and rewrite it.
62189  # Note: m4 eats our [], so we need to use [ and ] instead.
62190  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62191  if test "x$has_forbidden_chars" != x; then
62192    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62193    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62194  fi
62195
62196
62197  windows_path="$new_path"
62198  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62199    unix_path=`$CYGPATH -u "$windows_path"`
62200    new_path="$unix_path"
62201  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62202    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62203    new_path="$unix_path"
62204  fi
62205
62206  if test "x$path" != "x$new_path"; then
62207    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62208    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62209$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62210  fi
62211
62212  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62213  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62214
62215    else
62216      # We're on a unix platform. Hooray! :)
62217      path="$POTENTIAL_FREETYPE_LIB_PATH"
62218      has_space=`$ECHO "$path" | $GREP " "`
62219      if test "x$has_space" != x; then
62220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62221$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62222        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62223      fi
62224
62225      # Use eval to expand a potential ~
62226      eval path="$path"
62227      if test ! -f "$path" && test ! -d "$path"; then
62228        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62229      fi
62230
62231      if test -d "$path"; then
62232        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62233      else
62234        dir="`$DIRNAME "$path"`"
62235        base="`$BASENAME "$path"`"
62236        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62237      fi
62238    fi
62239  fi
62240
62241
62242    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62243    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62244$as_echo_n "checking for freetype includes... " >&6; }
62245    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62246$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62247    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62248    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62249$as_echo_n "checking for freetype libraries... " >&6; }
62250    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62251$as_echo "$FREETYPE_LIB_PATH" >&6; }
62252  fi
62253
62254              if test "x$FOUND_FREETYPE" != xyes; then
62255
62256  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62257  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62258  METHOD="well-known location"
62259
62260  # Let's start with an optimistic view of the world :-)
62261  FOUND_FREETYPE=yes
62262
62263  # First look for the canonical freetype main include file ft2build.h.
62264  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62265    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62266    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62267    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62268      # Fail.
62269      FOUND_FREETYPE=no
62270    fi
62271  fi
62272
62273  if test "x$FOUND_FREETYPE" = xyes; then
62274    # Include file found, let's continue the sanity check.
62275    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62276$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62277
62278    # Reset to default value
62279    FREETYPE_BASE_NAME=freetype
62280    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62281    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62282      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62283          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62284        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62285        # for the .6 version explicitly.
62286        FREETYPE_BASE_NAME=freetype.6
62287        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62288        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62289$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62290      else
62291        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62292$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62293        FOUND_FREETYPE=no
62294      fi
62295    else
62296      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62297        # On Windows, we will need both .lib and .dll file.
62298        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62299          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62300$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62301          FOUND_FREETYPE=no
62302        fi
62303      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62304          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62305        # Found lib in isa dir, use that instead.
62306        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62307        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62308$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62309      fi
62310    fi
62311  fi
62312
62313  if test "x$FOUND_FREETYPE" = xyes; then
62314
62315  # Only process if variable expands to non-empty
62316
62317  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62319
62320  # Input might be given as Windows format, start by converting to
62321  # unix format.
62322  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62323  new_path=`$CYGPATH -u "$path"`
62324
62325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62328  # "foo.exe" is OK but "foo" is an error.
62329  #
62330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62331  # It is also a way to make sure we got the proper file name for the real test later on.
62332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62333  if test "x$test_shortpath" = x; then
62334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62335$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62336    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62337  fi
62338
62339  # Call helper function which possibly converts this using DOS-style short mode.
62340  # If so, the updated path is stored in $new_path.
62341
62342  input_path="$new_path"
62343  # Check if we need to convert this using DOS-style short mode. If the path
62344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62345  # take no chances and rewrite it.
62346  # Note: m4 eats our [], so we need to use [ and ] instead.
62347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62348  if test "x$has_forbidden_chars" != x; then
62349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62353      # Going to short mode and back again did indeed matter. Since short mode is
62354      # case insensitive, let's make it lowercase to improve readability.
62355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62356      # Now convert it back to Unix-style (cygpath)
62357      input_path=`$CYGPATH -u "$shortmode_path"`
62358      new_path="$input_path"
62359    fi
62360  fi
62361
62362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62363  if test "x$test_cygdrive_prefix" = x; then
62364    # As a simple fix, exclude /usr/bin since it's not a real path.
62365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62367      # a path prefixed by /cygdrive for fixpath to work.
62368      new_path="$CYGWIN_ROOT_PATH$input_path"
62369    fi
62370  fi
62371
62372
62373  if test "x$path" != "x$new_path"; then
62374    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62376$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62377  fi
62378
62379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62380
62381  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62382  has_colon=`$ECHO $path | $GREP ^.:`
62383  new_path="$path"
62384  if test "x$has_colon" = x; then
62385    # Not in mixed or Windows style, start by that.
62386    new_path=`cmd //c echo $path`
62387  fi
62388
62389
62390  input_path="$new_path"
62391  # Check if we need to convert this using DOS-style short mode. If the path
62392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62393  # take no chances and rewrite it.
62394  # Note: m4 eats our [], so we need to use [ and ] instead.
62395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62396  if test "x$has_forbidden_chars" != x; then
62397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62399  fi
62400
62401
62402  windows_path="$new_path"
62403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62404    unix_path=`$CYGPATH -u "$windows_path"`
62405    new_path="$unix_path"
62406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62408    new_path="$unix_path"
62409  fi
62410
62411  if test "x$path" != "x$new_path"; then
62412    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62414$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62415  fi
62416
62417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62419
62420    else
62421      # We're on a unix platform. Hooray! :)
62422      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62423      has_space=`$ECHO "$path" | $GREP " "`
62424      if test "x$has_space" != x; then
62425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62426$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62428      fi
62429
62430      # Use eval to expand a potential ~
62431      eval path="$path"
62432      if test ! -f "$path" && test ! -d "$path"; then
62433        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62434      fi
62435
62436      if test -d "$path"; then
62437        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62438      else
62439        dir="`$DIRNAME "$path"`"
62440        base="`$BASENAME "$path"`"
62441        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62442      fi
62443    fi
62444  fi
62445
62446
62447  # Only process if variable expands to non-empty
62448
62449  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62450    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62451
62452  # Input might be given as Windows format, start by converting to
62453  # unix format.
62454  path="$POTENTIAL_FREETYPE_LIB_PATH"
62455  new_path=`$CYGPATH -u "$path"`
62456
62457  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62458  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62459  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62460  # "foo.exe" is OK but "foo" is an error.
62461  #
62462  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62463  # It is also a way to make sure we got the proper file name for the real test later on.
62464  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62465  if test "x$test_shortpath" = x; then
62466    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62467$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62468    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62469  fi
62470
62471  # Call helper function which possibly converts this using DOS-style short mode.
62472  # If so, the updated path is stored in $new_path.
62473
62474  input_path="$new_path"
62475  # Check if we need to convert this using DOS-style short mode. If the path
62476  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62477  # take no chances and rewrite it.
62478  # Note: m4 eats our [], so we need to use [ and ] instead.
62479  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62480  if test "x$has_forbidden_chars" != x; then
62481    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62482    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62483    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62484    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62485      # Going to short mode and back again did indeed matter. Since short mode is
62486      # case insensitive, let's make it lowercase to improve readability.
62487      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62488      # Now convert it back to Unix-style (cygpath)
62489      input_path=`$CYGPATH -u "$shortmode_path"`
62490      new_path="$input_path"
62491    fi
62492  fi
62493
62494  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62495  if test "x$test_cygdrive_prefix" = x; then
62496    # As a simple fix, exclude /usr/bin since it's not a real path.
62497    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62498      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62499      # a path prefixed by /cygdrive for fixpath to work.
62500      new_path="$CYGWIN_ROOT_PATH$input_path"
62501    fi
62502  fi
62503
62504
62505  if test "x$path" != "x$new_path"; then
62506    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62507    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62508$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62509  fi
62510
62511    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62512
62513  path="$POTENTIAL_FREETYPE_LIB_PATH"
62514  has_colon=`$ECHO $path | $GREP ^.:`
62515  new_path="$path"
62516  if test "x$has_colon" = x; then
62517    # Not in mixed or Windows style, start by that.
62518    new_path=`cmd //c echo $path`
62519  fi
62520
62521
62522  input_path="$new_path"
62523  # Check if we need to convert this using DOS-style short mode. If the path
62524  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62525  # take no chances and rewrite it.
62526  # Note: m4 eats our [], so we need to use [ and ] instead.
62527  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62528  if test "x$has_forbidden_chars" != x; then
62529    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62530    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62531  fi
62532
62533
62534  windows_path="$new_path"
62535  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62536    unix_path=`$CYGPATH -u "$windows_path"`
62537    new_path="$unix_path"
62538  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62539    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62540    new_path="$unix_path"
62541  fi
62542
62543  if test "x$path" != "x$new_path"; then
62544    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62545    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62546$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62547  fi
62548
62549  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62550  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62551
62552    else
62553      # We're on a unix platform. Hooray! :)
62554      path="$POTENTIAL_FREETYPE_LIB_PATH"
62555      has_space=`$ECHO "$path" | $GREP " "`
62556      if test "x$has_space" != x; then
62557        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62558$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62559        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62560      fi
62561
62562      # Use eval to expand a potential ~
62563      eval path="$path"
62564      if test ! -f "$path" && test ! -d "$path"; then
62565        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62566      fi
62567
62568      if test -d "$path"; then
62569        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62570      else
62571        dir="`$DIRNAME "$path"`"
62572        base="`$BASENAME "$path"`"
62573        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62574      fi
62575    fi
62576  fi
62577
62578
62579    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62580    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62581$as_echo_n "checking for freetype includes... " >&6; }
62582    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62583$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62584    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62585    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62586$as_echo_n "checking for freetype libraries... " >&6; }
62587    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62588$as_echo "$FREETYPE_LIB_PATH" >&6; }
62589  fi
62590
62591              fi
62592            fi
62593          fi
62594        fi
62595      fi # end check in well-known locations
62596
62597      if test "x$FOUND_FREETYPE" != xyes; then
62598
62599  # Print a helpful message on how to acquire the necessary build dependency.
62600  # freetype is the help tag: freetype, cups, alsa etc
62601  MISSING_DEPENDENCY=freetype
62602
62603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62604    cygwin_help $MISSING_DEPENDENCY
62605  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62606    msys_help $MISSING_DEPENDENCY
62607  else
62608    PKGHANDLER_COMMAND=
62609
62610    case $PKGHANDLER in
62611      apt-get)
62612        apt_help     $MISSING_DEPENDENCY ;;
62613      yum)
62614        yum_help     $MISSING_DEPENDENCY ;;
62615      brew)
62616        brew_help    $MISSING_DEPENDENCY ;;
62617      port)
62618        port_help    $MISSING_DEPENDENCY ;;
62619      pkgutil)
62620        pkgutil_help $MISSING_DEPENDENCY ;;
62621      pkgadd)
62622        pkgadd_help  $MISSING_DEPENDENCY ;;
62623    esac
62624
62625    if test "x$PKGHANDLER_COMMAND" != x; then
62626      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62627    fi
62628  fi
62629
62630        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62631      fi
62632    fi # end user specified settings
62633
62634    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62635    if test "x$FREETYPE_CFLAGS" = x; then
62636
62637  # Only process if variable expands to non-empty
62638
62639  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62640    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62641
62642  # Input might be given as Windows format, start by converting to
62643  # unix format.
62644  path="$FREETYPE_INCLUDE_PATH"
62645  new_path=`$CYGPATH -u "$path"`
62646
62647  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62648  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62649  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62650  # "foo.exe" is OK but "foo" is an error.
62651  #
62652  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62653  # It is also a way to make sure we got the proper file name for the real test later on.
62654  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62655  if test "x$test_shortpath" = x; then
62656    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62657$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62658    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62659  fi
62660
62661  # Call helper function which possibly converts this using DOS-style short mode.
62662  # If so, the updated path is stored in $new_path.
62663
62664  input_path="$new_path"
62665  # Check if we need to convert this using DOS-style short mode. If the path
62666  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62667  # take no chances and rewrite it.
62668  # Note: m4 eats our [], so we need to use [ and ] instead.
62669  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62670  if test "x$has_forbidden_chars" != x; then
62671    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62672    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62673    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62674    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62675      # Going to short mode and back again did indeed matter. Since short mode is
62676      # case insensitive, let's make it lowercase to improve readability.
62677      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62678      # Now convert it back to Unix-style (cygpath)
62679      input_path=`$CYGPATH -u "$shortmode_path"`
62680      new_path="$input_path"
62681    fi
62682  fi
62683
62684  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62685  if test "x$test_cygdrive_prefix" = x; then
62686    # As a simple fix, exclude /usr/bin since it's not a real path.
62687    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62688      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62689      # a path prefixed by /cygdrive for fixpath to work.
62690      new_path="$CYGWIN_ROOT_PATH$input_path"
62691    fi
62692  fi
62693
62694
62695  if test "x$path" != "x$new_path"; then
62696    FREETYPE_INCLUDE_PATH="$new_path"
62697    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62698$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62699  fi
62700
62701    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62702
62703  path="$FREETYPE_INCLUDE_PATH"
62704  has_colon=`$ECHO $path | $GREP ^.:`
62705  new_path="$path"
62706  if test "x$has_colon" = x; then
62707    # Not in mixed or Windows style, start by that.
62708    new_path=`cmd //c echo $path`
62709  fi
62710
62711
62712  input_path="$new_path"
62713  # Check if we need to convert this using DOS-style short mode. If the path
62714  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62715  # take no chances and rewrite it.
62716  # Note: m4 eats our [], so we need to use [ and ] instead.
62717  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62718  if test "x$has_forbidden_chars" != x; then
62719    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62720    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62721  fi
62722
62723
62724  windows_path="$new_path"
62725  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62726    unix_path=`$CYGPATH -u "$windows_path"`
62727    new_path="$unix_path"
62728  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62729    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62730    new_path="$unix_path"
62731  fi
62732
62733  if test "x$path" != "x$new_path"; then
62734    FREETYPE_INCLUDE_PATH="$new_path"
62735    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62736$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62737  fi
62738
62739  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62740  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62741
62742    else
62743      # We're on a unix platform. Hooray! :)
62744      path="$FREETYPE_INCLUDE_PATH"
62745      has_space=`$ECHO "$path" | $GREP " "`
62746      if test "x$has_space" != x; then
62747        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62748$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62749        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62750      fi
62751
62752      # Use eval to expand a potential ~
62753      eval path="$path"
62754      if test ! -f "$path" && test ! -d "$path"; then
62755        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62756      fi
62757
62758      if test -d "$path"; then
62759        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62760      else
62761        dir="`$DIRNAME "$path"`"
62762        base="`$BASENAME "$path"`"
62763        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62764      fi
62765    fi
62766  fi
62767
62768      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62769        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62770      else
62771        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62772      fi
62773    fi
62774
62775    if test "x$FREETYPE_LIBS" = x; then
62776
62777  # Only process if variable expands to non-empty
62778
62779  if test "x$FREETYPE_LIB_PATH" != x; then
62780    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62781
62782  # Input might be given as Windows format, start by converting to
62783  # unix format.
62784  path="$FREETYPE_LIB_PATH"
62785  new_path=`$CYGPATH -u "$path"`
62786
62787  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62788  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62789  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62790  # "foo.exe" is OK but "foo" is an error.
62791  #
62792  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62793  # It is also a way to make sure we got the proper file name for the real test later on.
62794  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62795  if test "x$test_shortpath" = x; then
62796    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62797$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62798    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62799  fi
62800
62801  # Call helper function which possibly converts this using DOS-style short mode.
62802  # If so, the updated path is stored in $new_path.
62803
62804  input_path="$new_path"
62805  # Check if we need to convert this using DOS-style short mode. If the path
62806  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62807  # take no chances and rewrite it.
62808  # Note: m4 eats our [], so we need to use [ and ] instead.
62809  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62810  if test "x$has_forbidden_chars" != x; then
62811    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62812    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62813    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62814    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62815      # Going to short mode and back again did indeed matter. Since short mode is
62816      # case insensitive, let's make it lowercase to improve readability.
62817      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62818      # Now convert it back to Unix-style (cygpath)
62819      input_path=`$CYGPATH -u "$shortmode_path"`
62820      new_path="$input_path"
62821    fi
62822  fi
62823
62824  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62825  if test "x$test_cygdrive_prefix" = x; then
62826    # As a simple fix, exclude /usr/bin since it's not a real path.
62827    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62828      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62829      # a path prefixed by /cygdrive for fixpath to work.
62830      new_path="$CYGWIN_ROOT_PATH$input_path"
62831    fi
62832  fi
62833
62834
62835  if test "x$path" != "x$new_path"; then
62836    FREETYPE_LIB_PATH="$new_path"
62837    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62838$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62839  fi
62840
62841    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62842
62843  path="$FREETYPE_LIB_PATH"
62844  has_colon=`$ECHO $path | $GREP ^.:`
62845  new_path="$path"
62846  if test "x$has_colon" = x; then
62847    # Not in mixed or Windows style, start by that.
62848    new_path=`cmd //c echo $path`
62849  fi
62850
62851
62852  input_path="$new_path"
62853  # Check if we need to convert this using DOS-style short mode. If the path
62854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62855  # take no chances and rewrite it.
62856  # Note: m4 eats our [], so we need to use [ and ] instead.
62857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62858  if test "x$has_forbidden_chars" != x; then
62859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62861  fi
62862
62863
62864  windows_path="$new_path"
62865  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62866    unix_path=`$CYGPATH -u "$windows_path"`
62867    new_path="$unix_path"
62868  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62869    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62870    new_path="$unix_path"
62871  fi
62872
62873  if test "x$path" != "x$new_path"; then
62874    FREETYPE_LIB_PATH="$new_path"
62875    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62876$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62877  fi
62878
62879  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62880  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62881
62882    else
62883      # We're on a unix platform. Hooray! :)
62884      path="$FREETYPE_LIB_PATH"
62885      has_space=`$ECHO "$path" | $GREP " "`
62886      if test "x$has_space" != x; then
62887        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62888$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62889        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62890      fi
62891
62892      # Use eval to expand a potential ~
62893      eval path="$path"
62894      if test ! -f "$path" && test ! -d "$path"; then
62895        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62896      fi
62897
62898      if test -d "$path"; then
62899        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62900      else
62901        dir="`$DIRNAME "$path"`"
62902        base="`$BASENAME "$path"`"
62903        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62904      fi
62905    fi
62906  fi
62907
62908      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62909        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62910      else
62911        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62912      fi
62913    fi
62914
62915    # Try to compile it
62916    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62917$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62918    ac_ext=cpp
62919ac_cpp='$CXXCPP $CPPFLAGS'
62920ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62921ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62922ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62923
62924    PREV_CXXCFLAGS="$CXXFLAGS"
62925    PREV_LIBS="$LIBS"
62926    PREV_CXX="$CXX"
62927    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62928    LIBS="$LIBS $FREETYPE_LIBS"
62929    CXX="$FIXPATH $CXX"
62930    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62931/* end confdefs.h.  */
62932
62933          #include<ft2build.h>
62934          #include FT_FREETYPE_H
62935          int main () {
62936            FT_Init_FreeType(NULL);
62937            return 0;
62938          }
62939
62940_ACEOF
62941if ac_fn_cxx_try_link "$LINENO"; then :
62942
62943          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62944$as_echo "yes" >&6; }
62945
62946else
62947
62948          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62949$as_echo "no" >&6; }
62950          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62951$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62952          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62953$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62954
62955
62956  # Print a helpful message on how to acquire the necessary build dependency.
62957  # freetype is the help tag: freetype, cups, alsa etc
62958  MISSING_DEPENDENCY=freetype
62959
62960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62961    cygwin_help $MISSING_DEPENDENCY
62962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62963    msys_help $MISSING_DEPENDENCY
62964  else
62965    PKGHANDLER_COMMAND=
62966
62967    case $PKGHANDLER in
62968      apt-get)
62969        apt_help     $MISSING_DEPENDENCY ;;
62970      yum)
62971        yum_help     $MISSING_DEPENDENCY ;;
62972      brew)
62973        brew_help    $MISSING_DEPENDENCY ;;
62974      port)
62975        port_help    $MISSING_DEPENDENCY ;;
62976      pkgutil)
62977        pkgutil_help $MISSING_DEPENDENCY ;;
62978      pkgadd)
62979        pkgadd_help  $MISSING_DEPENDENCY ;;
62980    esac
62981
62982    if test "x$PKGHANDLER_COMMAND" != x; then
62983      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62984    fi
62985  fi
62986
62987
62988          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62989
62990
62991fi
62992rm -f core conftest.err conftest.$ac_objext \
62993    conftest$ac_exeext conftest.$ac_ext
62994    CXXCFLAGS="$PREV_CXXFLAGS"
62995    LIBS="$PREV_LIBS"
62996    CXX="$PREV_CXX"
62997    ac_ext=cpp
62998ac_cpp='$CXXCPP $CPPFLAGS'
62999ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63000ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63001ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63002
63003
63004    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63005$as_echo_n "checking if we should bundle freetype... " >&6; }
63006    if test "x$BUNDLE_FREETYPE" = xyes; then
63007      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63008    fi
63009    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63010$as_echo "$BUNDLE_FREETYPE" >&6; }
63011
63012  fi # end freetype needed
63013
63014
63015
63016
63017
63018
63019
63020# Check whether --with-alsa was given.
63021if test "${with_alsa+set}" = set; then :
63022  withval=$with_alsa;
63023fi
63024
63025
63026# Check whether --with-alsa-include was given.
63027if test "${with_alsa_include+set}" = set; then :
63028  withval=$with_alsa_include;
63029fi
63030
63031
63032# Check whether --with-alsa-lib was given.
63033if test "${with_alsa_lib+set}" = set; then :
63034  withval=$with_alsa_lib;
63035fi
63036
63037
63038  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63039    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63040        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63041        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63042      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63043$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63044    fi
63045    ALSA_CFLAGS=
63046    ALSA_LIBS=
63047  else
63048    ALSA_FOUND=no
63049
63050    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63051      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63052    fi
63053
63054    if test "x${with_alsa}" != x; then
63055      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63056      ALSA_CFLAGS="-I${with_alsa}/include"
63057      ALSA_FOUND=yes
63058    fi
63059    if test "x${with_alsa_include}" != x; then
63060      ALSA_CFLAGS="-I${with_alsa_include}"
63061      ALSA_FOUND=yes
63062    fi
63063    if test "x${with_alsa_lib}" != x; then
63064      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63065      ALSA_FOUND=yes
63066    fi
63067    # Do not try pkg-config if we have a sysroot set.
63068    if test "x$SYSROOT" = x; then
63069      if test "x$ALSA_FOUND" = xno; then
63070
63071pkg_failed=no
63072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63073$as_echo_n "checking for ALSA... " >&6; }
63074
63075if test -n "$ALSA_CFLAGS"; then
63076    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63077 elif test -n "$PKG_CONFIG"; then
63078    if test -n "$PKG_CONFIG" && \
63079    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63080  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63081  ac_status=$?
63082  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63083  test $ac_status = 0; }; then
63084  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63085else
63086  pkg_failed=yes
63087fi
63088 else
63089    pkg_failed=untried
63090fi
63091if test -n "$ALSA_LIBS"; then
63092    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63093 elif test -n "$PKG_CONFIG"; then
63094    if test -n "$PKG_CONFIG" && \
63095    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63096  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63097  ac_status=$?
63098  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63099  test $ac_status = 0; }; then
63100  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63101else
63102  pkg_failed=yes
63103fi
63104 else
63105    pkg_failed=untried
63106fi
63107
63108
63109
63110if test $pkg_failed = yes; then
63111
63112if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63113        _pkg_short_errors_supported=yes
63114else
63115        _pkg_short_errors_supported=no
63116fi
63117        if test $_pkg_short_errors_supported = yes; then
63118	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63119        else
63120	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63121        fi
63122	# Put the nasty error message in config.log where it belongs
63123	echo "$ALSA_PKG_ERRORS" >&5
63124
63125	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63126$as_echo "no" >&6; }
63127                ALSA_FOUND=no
63128elif test $pkg_failed = untried; then
63129	ALSA_FOUND=no
63130else
63131	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63132	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63133        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63134$as_echo "yes" >&6; }
63135	ALSA_FOUND=yes
63136fi
63137      fi
63138    fi
63139    if test "x$ALSA_FOUND" = xno; then
63140      for ac_header in alsa/asoundlib.h
63141do :
63142  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63143if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63144  cat >>confdefs.h <<_ACEOF
63145#define HAVE_ALSA_ASOUNDLIB_H 1
63146_ACEOF
63147
63148            ALSA_FOUND=yes
63149            ALSA_CFLAGS=-Iignoreme
63150            ALSA_LIBS=-lasound
63151            DEFAULT_ALSA=yes
63152
63153else
63154  ALSA_FOUND=no
63155
63156fi
63157
63158done
63159
63160    fi
63161    if test "x$ALSA_FOUND" = xno; then
63162
63163  # Print a helpful message on how to acquire the necessary build dependency.
63164  # alsa is the help tag: freetype, cups, alsa etc
63165  MISSING_DEPENDENCY=alsa
63166
63167  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63168    cygwin_help $MISSING_DEPENDENCY
63169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63170    msys_help $MISSING_DEPENDENCY
63171  else
63172    PKGHANDLER_COMMAND=
63173
63174    case $PKGHANDLER in
63175      apt-get)
63176        apt_help     $MISSING_DEPENDENCY ;;
63177      yum)
63178        yum_help     $MISSING_DEPENDENCY ;;
63179      brew)
63180        brew_help    $MISSING_DEPENDENCY ;;
63181      port)
63182        port_help    $MISSING_DEPENDENCY ;;
63183      pkgutil)
63184        pkgutil_help $MISSING_DEPENDENCY ;;
63185      pkgadd)
63186        pkgadd_help  $MISSING_DEPENDENCY ;;
63187    esac
63188
63189    if test "x$PKGHANDLER_COMMAND" != x; then
63190      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63191    fi
63192  fi
63193
63194      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63195    fi
63196  fi
63197
63198
63199
63200
63201
63202
63203# Check whether --with-libffi was given.
63204if test "${with_libffi+set}" = set; then :
63205  withval=$with_libffi;
63206fi
63207
63208
63209# Check whether --with-libffi-include was given.
63210if test "${with_libffi_include+set}" = set; then :
63211  withval=$with_libffi_include;
63212fi
63213
63214
63215# Check whether --with-libffi-lib was given.
63216if test "${with_libffi_lib+set}" = set; then :
63217  withval=$with_libffi_lib;
63218fi
63219
63220  # Check whether --enable-libffi-bundling was given.
63221if test "${enable_libffi_bundling+set}" = set; then :
63222  enableval=$enable_libffi_bundling;
63223fi
63224
63225
63226  if test "x$NEEDS_LIB_FFI" = xfalse; then
63227    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63228        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63229        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63230      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63231$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63232    fi
63233    LIBFFI_CFLAGS=
63234    LIBFFI_LIBS=
63235  else
63236    LIBFFI_FOUND=no
63237
63238    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63239      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63240    fi
63241
63242    if test "x${with_libffi}" != x; then
63243      LIBFFI_LIB_PATH="${with_libffi}/lib"
63244      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63245      LIBFFI_CFLAGS="-I${with_libffi}/include"
63246      LIBFFI_FOUND=yes
63247    fi
63248    if test "x${with_libffi_include}" != x; then
63249      LIBFFI_CFLAGS="-I${with_libffi_include}"
63250      LIBFFI_FOUND=yes
63251    fi
63252    if test "x${with_libffi_lib}" != x; then
63253      LIBFFI_LIB_PATH="${with_libffi_lib}"
63254      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63255      LIBFFI_FOUND=yes
63256    fi
63257    # Do not try pkg-config if we have a sysroot set.
63258    if test "x$SYSROOT" = x; then
63259      if test "x$LIBFFI_FOUND" = xno; then
63260        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63261
63262pkg_failed=no
63263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63264$as_echo_n "checking for LIBFFI... " >&6; }
63265
63266if test -n "$LIBFFI_CFLAGS"; then
63267    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63268 elif test -n "$PKG_CONFIG"; then
63269    if test -n "$PKG_CONFIG" && \
63270    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63271  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63272  ac_status=$?
63273  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63274  test $ac_status = 0; }; then
63275  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63276else
63277  pkg_failed=yes
63278fi
63279 else
63280    pkg_failed=untried
63281fi
63282if test -n "$LIBFFI_LIBS"; then
63283    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63284 elif test -n "$PKG_CONFIG"; then
63285    if test -n "$PKG_CONFIG" && \
63286    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63287  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63288  ac_status=$?
63289  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63290  test $ac_status = 0; }; then
63291  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63292else
63293  pkg_failed=yes
63294fi
63295 else
63296    pkg_failed=untried
63297fi
63298
63299
63300
63301if test $pkg_failed = yes; then
63302
63303if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63304        _pkg_short_errors_supported=yes
63305else
63306        _pkg_short_errors_supported=no
63307fi
63308        if test $_pkg_short_errors_supported = yes; then
63309	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63310        else
63311	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63312        fi
63313	# Put the nasty error message in config.log where it belongs
63314	echo "$LIBFFI_PKG_ERRORS" >&5
63315
63316	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63317$as_echo "no" >&6; }
63318                LIBFFI_FOUND=no
63319elif test $pkg_failed = untried; then
63320	LIBFFI_FOUND=no
63321else
63322	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63323	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63325$as_echo "yes" >&6; }
63326	LIBFFI_FOUND=yes
63327fi
63328      fi
63329    fi
63330    if test "x$LIBFFI_FOUND" = xno; then
63331      for ac_header in ffi.h
63332do :
63333  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63334if test "x$ac_cv_header_ffi_h" = xyes; then :
63335  cat >>confdefs.h <<_ACEOF
63336#define HAVE_FFI_H 1
63337_ACEOF
63338
63339            LIBFFI_FOUND=yes
63340            LIBFFI_CFLAGS=
63341            LIBFFI_LIBS=-lffi
63342
63343else
63344  LIBFFI_FOUND=no
63345
63346fi
63347
63348done
63349
63350    fi
63351    if test "x$LIBFFI_FOUND" = xno; then
63352
63353  # Print a helpful message on how to acquire the necessary build dependency.
63354  # ffi is the help tag: freetype, cups, alsa etc
63355  MISSING_DEPENDENCY=ffi
63356
63357  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63358    cygwin_help $MISSING_DEPENDENCY
63359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63360    msys_help $MISSING_DEPENDENCY
63361  else
63362    PKGHANDLER_COMMAND=
63363
63364    case $PKGHANDLER in
63365      apt-get)
63366        apt_help     $MISSING_DEPENDENCY ;;
63367      yum)
63368        yum_help     $MISSING_DEPENDENCY ;;
63369      brew)
63370        brew_help    $MISSING_DEPENDENCY ;;
63371      port)
63372        port_help    $MISSING_DEPENDENCY ;;
63373      pkgutil)
63374        pkgutil_help $MISSING_DEPENDENCY ;;
63375      pkgadd)
63376        pkgadd_help  $MISSING_DEPENDENCY ;;
63377    esac
63378
63379    if test "x$PKGHANDLER_COMMAND" != x; then
63380      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63381    fi
63382  fi
63383
63384      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63385    fi
63386
63387    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63388$as_echo_n "checking if libffi works... " >&6; }
63389    ac_ext=c
63390ac_cpp='$CPP $CPPFLAGS'
63391ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63392ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63393ac_compiler_gnu=$ac_cv_c_compiler_gnu
63394
63395    OLD_CFLAGS="$CFLAGS"
63396    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63397    OLD_LIBS="$LIBS"
63398    LIBS="$LIBS $LIBFFI_LIBS"
63399    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63400/* end confdefs.h.  */
63401#include <ffi.h>
63402int
63403main ()
63404{
63405
63406          ffi_call(NULL, NULL, NULL, NULL);
63407          return 0;
63408
63409  ;
63410  return 0;
63411}
63412_ACEOF
63413if ac_fn_c_try_link "$LINENO"; then :
63414  LIBFFI_WORKS=yes
63415else
63416  LIBFFI_WORKS=no
63417
63418fi
63419rm -f core conftest.err conftest.$ac_objext \
63420    conftest$ac_exeext conftest.$ac_ext
63421    CFLAGS="$OLD_CFLAGS"
63422    LIBS="$OLD_LIBS"
63423    ac_ext=cpp
63424ac_cpp='$CXXCPP $CPPFLAGS'
63425ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63426ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63427ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63428
63429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63430$as_echo "$LIBFFI_WORKS" >&6; }
63431
63432    if test "x$LIBFFI_WORKS" = xno; then
63433
63434  # Print a helpful message on how to acquire the necessary build dependency.
63435  # ffi is the help tag: freetype, cups, alsa etc
63436  MISSING_DEPENDENCY=ffi
63437
63438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63439    cygwin_help $MISSING_DEPENDENCY
63440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63441    msys_help $MISSING_DEPENDENCY
63442  else
63443    PKGHANDLER_COMMAND=
63444
63445    case $PKGHANDLER in
63446      apt-get)
63447        apt_help     $MISSING_DEPENDENCY ;;
63448      yum)
63449        yum_help     $MISSING_DEPENDENCY ;;
63450      brew)
63451        brew_help    $MISSING_DEPENDENCY ;;
63452      port)
63453        port_help    $MISSING_DEPENDENCY ;;
63454      pkgutil)
63455        pkgutil_help $MISSING_DEPENDENCY ;;
63456      pkgadd)
63457        pkgadd_help  $MISSING_DEPENDENCY ;;
63458    esac
63459
63460    if test "x$PKGHANDLER_COMMAND" != x; then
63461      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63462    fi
63463  fi
63464
63465      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63466    fi
63467
63468    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi should be bundled" >&5
63469$as_echo_n "checking if libffi should be bundled... " >&6; }
63470    if test "x$enable_libffi_bundling" = "x"; then
63471      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63472$as_echo "no" >&6; }
63473      ENABLE_LIBFFI_BUNDLING=false
63474    elif  test "x$enable_libffi_bundling" = "xno"; then
63475      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
63476$as_echo "no, forced" >&6; }
63477      ENABLE_LIBFFI_BUNDLING=false
63478    elif  test "x$enable_libffi_bundling" = "xyes"; then
63479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
63480$as_echo "yes, forced" >&6; }
63481      ENABLE_LIBFFI_BUNDLING=true
63482    else
63483      as_fn_error $? "Invalid value for --enable-libffi-bundling" "$LINENO" 5
63484    fi
63485
63486    # Find the libffi.so.X to bundle
63487    if test "x${ENABLE_LIBFFI_BUNDLING}" = "xtrue"; then
63488      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libffi lib file location" >&5
63489$as_echo_n "checking for libffi lib file location... " >&6; }
63490      if test "x${LIBFFI_LIB_PATH}" != x; then
63491        if test -e ${LIBFFI_LIB_PATH}/libffi.so.?; then
63492          LIBFFI_LIB_FILE="${LIBFFI_LIB_PATH}/libffi.so.?"
63493        else
63494          as_fn_error $? "Could not locate libffi.so.? for bundling in ${LIBFFI_LIB_PATH}" "$LINENO" 5
63495        fi
63496      else
63497        # If we don't have an explicit path, look in a few obvious places
63498        if test "x${OPENJDK_TARGET_CPU}" = "xx86"; then
63499          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63500            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63501          elif test -e ${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.? ; then
63502            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/i386-linux-gnu/libffi.so.?"
63503          else
63504            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63505          fi
63506        elif test "x${OPENJDK_TARGET_CPU}" = "xx86_64"; then
63507          if test -e ${SYSROOT}/usr/lib64/libffi.so.? ; then
63508            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib64/libffi.so.?"
63509          elif test -e ${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.? ; then
63510            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/x86_64-linux-gnu/libffi.so.?"
63511          else
63512            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63513          fi
63514        else
63515          # Fallback on the default /usr/lib dir
63516          if test -e ${SYSROOT}/usr/lib/libffi.so.? ; then
63517            LIBFFI_LIB_FILE="${SYSROOT}/usr/lib/libffi.so.?"
63518          else
63519            as_fn_error $? "Could not locate libffi.so.? for bundling" "$LINENO" 5
63520          fi
63521        fi
63522      fi
63523      # Make sure the wildcard is evaluated
63524      LIBFFI_LIB_FILE="$(ls ${LIBFFI_LIB_FILE})"
63525      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${LIBFFI_LIB_FILE}" >&5
63526$as_echo "${LIBFFI_LIB_FILE}" >&6; }
63527    fi
63528  fi
63529
63530
63531
63532
63533
63534
63535
63536  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63537    # Extract the first word of "llvm-config", so it can be a program name with args.
63538set dummy llvm-config; ac_word=$2
63539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63540$as_echo_n "checking for $ac_word... " >&6; }
63541if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63542  $as_echo_n "(cached) " >&6
63543else
63544  if test -n "$LLVM_CONFIG"; then
63545  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63546else
63547as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63548for as_dir in $PATH
63549do
63550  IFS=$as_save_IFS
63551  test -z "$as_dir" && as_dir=.
63552    for ac_exec_ext in '' $ac_executable_extensions; do
63553  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63554    ac_cv_prog_LLVM_CONFIG="llvm-config"
63555    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63556    break 2
63557  fi
63558done
63559  done
63560IFS=$as_save_IFS
63561
63562fi
63563fi
63564LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63565if test -n "$LLVM_CONFIG"; then
63566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63567$as_echo "$LLVM_CONFIG" >&6; }
63568else
63569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63570$as_echo "no" >&6; }
63571fi
63572
63573
63574
63575    if test "x$LLVM_CONFIG" != xllvm-config; then
63576      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63577    fi
63578
63579    llvm_components="jit mcjit engine nativecodegen native"
63580    unset LLVM_CFLAGS
63581    for flag in $("$LLVM_CONFIG" --cxxflags); do
63582      if echo "${flag}" | grep -q '^-[ID]'; then
63583        if test "${flag}" != "-D_DEBUG" ; then
63584          if test "${LLVM_CFLAGS}" != "" ; then
63585            LLVM_CFLAGS="${LLVM_CFLAGS} "
63586          fi
63587          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63588        fi
63589      fi
63590    done
63591    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63592    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63593
63594    unset LLVM_LDFLAGS
63595    for flag in $("${LLVM_CONFIG}" --ldflags); do
63596      if echo "${flag}" | grep -q '^-L'; then
63597        if test "${LLVM_LDFLAGS}" != ""; then
63598          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63599        fi
63600        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63601      fi
63602    done
63603
63604    unset LLVM_LIBS
63605    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63606      if echo "${flag}" | grep -q '^-l'; then
63607        if test "${LLVM_LIBS}" != ""; then
63608          LLVM_LIBS="${LLVM_LIBS} "
63609        fi
63610        LLVM_LIBS="${LLVM_LIBS}${flag}"
63611      fi
63612    done
63613
63614    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63615    # always properly detect -ltinfo
63616    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63617
63618
63619
63620
63621  fi
63622
63623
63624
63625# Check whether --with-libjpeg was given.
63626if test "${with_libjpeg+set}" = set; then :
63627  withval=$with_libjpeg;
63628fi
63629
63630
63631  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63632$as_echo_n "checking for which libjpeg to use... " >&6; }
63633  # default is bundled
63634  DEFAULT_LIBJPEG=bundled
63635  # if user didn't specify, use DEFAULT_LIBJPEG
63636  if test "x${with_libjpeg}" = "x"; then
63637    with_libjpeg=${DEFAULT_LIBJPEG}
63638  fi
63639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63640$as_echo "${with_libjpeg}" >&6; }
63641
63642  if test "x${with_libjpeg}" = "xbundled"; then
63643    USE_EXTERNAL_LIBJPEG=false
63644  elif test "x${with_libjpeg}" = "xsystem"; then
63645    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63646if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63647
63648else
63649   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63650fi
63651
63652
63653    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63654$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63655if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63656  $as_echo_n "(cached) " >&6
63657else
63658  ac_check_lib_save_LIBS=$LIBS
63659LIBS="-ljpeg  $LIBS"
63660cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63661/* end confdefs.h.  */
63662
63663/* Override any GCC internal prototype to avoid an error.
63664   Use char because int might match the return type of a GCC
63665   builtin and then its argument prototype would still apply.  */
63666#ifdef __cplusplus
63667extern "C"
63668#endif
63669char jpeg_CreateDecompress ();
63670int
63671main ()
63672{
63673return jpeg_CreateDecompress ();
63674  ;
63675  return 0;
63676}
63677_ACEOF
63678if ac_fn_cxx_try_link "$LINENO"; then :
63679  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63680else
63681  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63682fi
63683rm -f core conftest.err conftest.$ac_objext \
63684    conftest$ac_exeext conftest.$ac_ext
63685LIBS=$ac_check_lib_save_LIBS
63686fi
63687{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63688$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63689if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63690  cat >>confdefs.h <<_ACEOF
63691#define HAVE_LIBJPEG 1
63692_ACEOF
63693
63694  LIBS="-ljpeg $LIBS"
63695
63696else
63697   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63698fi
63699
63700
63701    USE_EXTERNAL_LIBJPEG=true
63702  else
63703    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63704  fi
63705
63706
63707
63708
63709
63710# Check whether --with-giflib was given.
63711if test "${with_giflib+set}" = set; then :
63712  withval=$with_giflib;
63713fi
63714
63715
63716  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63717$as_echo_n "checking for which giflib to use... " >&6; }
63718  # default is bundled
63719  DEFAULT_GIFLIB=bundled
63720  # if user didn't specify, use DEFAULT_GIFLIB
63721  if test "x${with_giflib}" = "x"; then
63722    with_giflib=${DEFAULT_GIFLIB}
63723  fi
63724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63725$as_echo "${with_giflib}" >&6; }
63726
63727  if test "x${with_giflib}" = "xbundled"; then
63728    USE_EXTERNAL_LIBGIF=false
63729  elif test "x${with_giflib}" = "xsystem"; then
63730    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63731if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63732
63733else
63734   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63735fi
63736
63737
63738    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63739$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63740if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63741  $as_echo_n "(cached) " >&6
63742else
63743  ac_check_lib_save_LIBS=$LIBS
63744LIBS="-lgif  $LIBS"
63745cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63746/* end confdefs.h.  */
63747
63748/* Override any GCC internal prototype to avoid an error.
63749   Use char because int might match the return type of a GCC
63750   builtin and then its argument prototype would still apply.  */
63751#ifdef __cplusplus
63752extern "C"
63753#endif
63754char DGifGetCode ();
63755int
63756main ()
63757{
63758return DGifGetCode ();
63759  ;
63760  return 0;
63761}
63762_ACEOF
63763if ac_fn_cxx_try_link "$LINENO"; then :
63764  ac_cv_lib_gif_DGifGetCode=yes
63765else
63766  ac_cv_lib_gif_DGifGetCode=no
63767fi
63768rm -f core conftest.err conftest.$ac_objext \
63769    conftest$ac_exeext conftest.$ac_ext
63770LIBS=$ac_check_lib_save_LIBS
63771fi
63772{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63773$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63774if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63775  cat >>confdefs.h <<_ACEOF
63776#define HAVE_LIBGIF 1
63777_ACEOF
63778
63779  LIBS="-lgif $LIBS"
63780
63781else
63782   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63783fi
63784
63785
63786    USE_EXTERNAL_LIBGIF=true
63787  else
63788    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63789  fi
63790
63791
63792
63793
63794
63795# Check whether --with-libpng was given.
63796if test "${with_libpng+set}" = set; then :
63797  withval=$with_libpng;
63798fi
63799
63800
63801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63802$as_echo_n "checking for which libpng to use... " >&6; }
63803
63804  # default is bundled
63805  DEFAULT_LIBPNG=bundled
63806  # if user didn't specify, use DEFAULT_LIBPNG
63807  if test "x${with_libpng}" = "x"; then
63808    with_libpng=${DEFAULT_LIBPNG}
63809  fi
63810
63811  if test "x${with_libpng}" = "xbundled"; then
63812    USE_EXTERNAL_LIBPNG=false
63813    PNG_CFLAGS=""
63814    PNG_LIBS=""
63815    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63816$as_echo "bundled" >&6; }
63817  elif test "x${with_libpng}" = "xsystem"; then
63818
63819pkg_failed=no
63820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63821$as_echo_n "checking for PNG... " >&6; }
63822
63823if test -n "$PNG_CFLAGS"; then
63824    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63825 elif test -n "$PKG_CONFIG"; then
63826    if test -n "$PKG_CONFIG" && \
63827    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63828  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63829  ac_status=$?
63830  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63831  test $ac_status = 0; }; then
63832  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63833else
63834  pkg_failed=yes
63835fi
63836 else
63837    pkg_failed=untried
63838fi
63839if test -n "$PNG_LIBS"; then
63840    pkg_cv_PNG_LIBS="$PNG_LIBS"
63841 elif test -n "$PKG_CONFIG"; then
63842    if test -n "$PKG_CONFIG" && \
63843    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63844  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63845  ac_status=$?
63846  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63847  test $ac_status = 0; }; then
63848  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63849else
63850  pkg_failed=yes
63851fi
63852 else
63853    pkg_failed=untried
63854fi
63855
63856
63857
63858if test $pkg_failed = yes; then
63859
63860if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63861        _pkg_short_errors_supported=yes
63862else
63863        _pkg_short_errors_supported=no
63864fi
63865        if test $_pkg_short_errors_supported = yes; then
63866	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63867        else
63868	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63869        fi
63870	# Put the nasty error message in config.log where it belongs
63871	echo "$PNG_PKG_ERRORS" >&5
63872
63873	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63874$as_echo "no" >&6; }
63875                LIBPNG_FOUND=no
63876elif test $pkg_failed = untried; then
63877	LIBPNG_FOUND=no
63878else
63879	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63880	PNG_LIBS=$pkg_cv_PNG_LIBS
63881        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63882$as_echo "yes" >&6; }
63883	LIBPNG_FOUND=yes
63884fi
63885    if test "x${LIBPNG_FOUND}" = "xyes"; then
63886      # PKG_CHECK_MODULES will set PNG_CFLAGS and PNG_LIBS
63887      USE_EXTERNAL_LIBPNG=true
63888      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63889$as_echo "system" >&6; }
63890    else
63891      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63892$as_echo "system not found" >&6; }
63893      as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63894    fi
63895  else
63896    as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63897  fi
63898
63899
63900
63901
63902
63903
63904
63905# Check whether --with-zlib was given.
63906if test "${with_zlib+set}" = set; then :
63907  withval=$with_zlib;
63908fi
63909
63910
63911  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63912$as_echo_n "checking for compress in -lz... " >&6; }
63913if ${ac_cv_lib_z_compress+:} false; then :
63914  $as_echo_n "(cached) " >&6
63915else
63916  ac_check_lib_save_LIBS=$LIBS
63917LIBS="-lz  $LIBS"
63918cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63919/* end confdefs.h.  */
63920
63921/* Override any GCC internal prototype to avoid an error.
63922   Use char because int might match the return type of a GCC
63923   builtin and then its argument prototype would still apply.  */
63924#ifdef __cplusplus
63925extern "C"
63926#endif
63927char compress ();
63928int
63929main ()
63930{
63931return compress ();
63932  ;
63933  return 0;
63934}
63935_ACEOF
63936if ac_fn_cxx_try_link "$LINENO"; then :
63937  ac_cv_lib_z_compress=yes
63938else
63939  ac_cv_lib_z_compress=no
63940fi
63941rm -f core conftest.err conftest.$ac_objext \
63942    conftest$ac_exeext conftest.$ac_ext
63943LIBS=$ac_check_lib_save_LIBS
63944fi
63945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63946$as_echo "$ac_cv_lib_z_compress" >&6; }
63947if test "x$ac_cv_lib_z_compress" = xyes; then :
63948   ZLIB_FOUND=yes
63949else
63950   ZLIB_FOUND=no
63951fi
63952
63953
63954  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63955$as_echo_n "checking for which zlib to use... " >&6; }
63956
63957  DEFAULT_ZLIB=system
63958  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63959    # On windows default is bundled...on others default is system
63960    DEFAULT_ZLIB=bundled
63961  fi
63962
63963  if test "x${ZLIB_FOUND}" != "xyes"; then
63964    # If we don't find any system...set default to bundled
63965    DEFAULT_ZLIB=bundled
63966  fi
63967
63968  # If user didn't specify, use DEFAULT_ZLIB
63969  if test "x${with_zlib}" = "x"; then
63970    with_zlib=${DEFAULT_ZLIB}
63971  fi
63972
63973  if test "x${with_zlib}" = "xbundled"; then
63974    USE_EXTERNAL_LIBZ=false
63975    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63976$as_echo "bundled" >&6; }
63977  elif test "x${with_zlib}" = "xsystem"; then
63978    if test "x${ZLIB_FOUND}" = "xyes"; then
63979      USE_EXTERNAL_LIBZ=true
63980      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63981$as_echo "system" >&6; }
63982    else
63983      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63984$as_echo "system not found" >&6; }
63985      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63986    fi
63987  else
63988    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63989  fi
63990
63991
63992
63993
63994
63995# Check whether --with-lcms was given.
63996if test "${with_lcms+set}" = set; then :
63997  withval=$with_lcms;
63998fi
63999
64000
64001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64002$as_echo_n "checking for which lcms to use... " >&6; }
64003
64004  DEFAULT_LCMS=bundled
64005  # If user didn't specify, use DEFAULT_LCMS
64006  if test "x${with_lcms}" = "x"; then
64007    with_lcms=${DEFAULT_LCMS}
64008  fi
64009
64010  if test "x${with_lcms}" = "xbundled"; then
64011    USE_EXTERNAL_LCMS=false
64012    LCMS_CFLAGS=""
64013    LCMS_LIBS=""
64014    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64015$as_echo "bundled" >&6; }
64016  elif test "x${with_lcms}" = "xsystem"; then
64017    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64018$as_echo "system" >&6; }
64019
64020pkg_failed=no
64021{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64022$as_echo_n "checking for LCMS... " >&6; }
64023
64024if test -n "$LCMS_CFLAGS"; then
64025    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64026 elif test -n "$PKG_CONFIG"; then
64027    if test -n "$PKG_CONFIG" && \
64028    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64029  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64030  ac_status=$?
64031  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64032  test $ac_status = 0; }; then
64033  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64034else
64035  pkg_failed=yes
64036fi
64037 else
64038    pkg_failed=untried
64039fi
64040if test -n "$LCMS_LIBS"; then
64041    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64042 elif test -n "$PKG_CONFIG"; then
64043    if test -n "$PKG_CONFIG" && \
64044    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64045  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64046  ac_status=$?
64047  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64048  test $ac_status = 0; }; then
64049  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64050else
64051  pkg_failed=yes
64052fi
64053 else
64054    pkg_failed=untried
64055fi
64056
64057
64058
64059if test $pkg_failed = yes; then
64060
64061if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64062        _pkg_short_errors_supported=yes
64063else
64064        _pkg_short_errors_supported=no
64065fi
64066        if test $_pkg_short_errors_supported = yes; then
64067	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64068        else
64069	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64070        fi
64071	# Put the nasty error message in config.log where it belongs
64072	echo "$LCMS_PKG_ERRORS" >&5
64073
64074	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64075$as_echo "no" >&6; }
64076                LCMS_FOUND=no
64077elif test $pkg_failed = untried; then
64078	LCMS_FOUND=no
64079else
64080	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64081	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64082        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64083$as_echo "yes" >&6; }
64084	LCMS_FOUND=yes
64085fi
64086    if test "x${LCMS_FOUND}" = "xyes"; then
64087      # PKG_CHECK_MODULES will set LCMS_CFLAGS and LCMS_LIBS
64088      USE_EXTERNAL_LCMS=true
64089    else
64090      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64091    fi
64092  else
64093    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64094  fi
64095
64096
64097
64098
64099
64100
64101
64102
64103
64104
64105
64106
64107
64108  # Setup libm (the maths library)
64109  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64110    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64111$as_echo_n "checking for cos in -lm... " >&6; }
64112if ${ac_cv_lib_m_cos+:} false; then :
64113  $as_echo_n "(cached) " >&6
64114else
64115  ac_check_lib_save_LIBS=$LIBS
64116LIBS="-lm  $LIBS"
64117cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64118/* end confdefs.h.  */
64119
64120/* Override any GCC internal prototype to avoid an error.
64121   Use char because int might match the return type of a GCC
64122   builtin and then its argument prototype would still apply.  */
64123#ifdef __cplusplus
64124extern "C"
64125#endif
64126char cos ();
64127int
64128main ()
64129{
64130return cos ();
64131  ;
64132  return 0;
64133}
64134_ACEOF
64135if ac_fn_cxx_try_link "$LINENO"; then :
64136  ac_cv_lib_m_cos=yes
64137else
64138  ac_cv_lib_m_cos=no
64139fi
64140rm -f core conftest.err conftest.$ac_objext \
64141    conftest$ac_exeext conftest.$ac_ext
64142LIBS=$ac_check_lib_save_LIBS
64143fi
64144{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64145$as_echo "$ac_cv_lib_m_cos" >&6; }
64146if test "x$ac_cv_lib_m_cos" = xyes; then :
64147  cat >>confdefs.h <<_ACEOF
64148#define HAVE_LIBM 1
64149_ACEOF
64150
64151  LIBS="-lm $LIBS"
64152
64153else
64154
64155        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64156$as_echo "$as_me: Maths library was not found" >&6;}
64157
64158fi
64159
64160    LIBM="-lm"
64161  else
64162    LIBM=""
64163  fi
64164
64165
64166  # Setup libdl (for dynamic library loading)
64167  save_LIBS="$LIBS"
64168  LIBS=""
64169  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64170$as_echo_n "checking for dlopen in -ldl... " >&6; }
64171if ${ac_cv_lib_dl_dlopen+:} false; then :
64172  $as_echo_n "(cached) " >&6
64173else
64174  ac_check_lib_save_LIBS=$LIBS
64175LIBS="-ldl  $LIBS"
64176cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64177/* end confdefs.h.  */
64178
64179/* Override any GCC internal prototype to avoid an error.
64180   Use char because int might match the return type of a GCC
64181   builtin and then its argument prototype would still apply.  */
64182#ifdef __cplusplus
64183extern "C"
64184#endif
64185char dlopen ();
64186int
64187main ()
64188{
64189return dlopen ();
64190  ;
64191  return 0;
64192}
64193_ACEOF
64194if ac_fn_cxx_try_link "$LINENO"; then :
64195  ac_cv_lib_dl_dlopen=yes
64196else
64197  ac_cv_lib_dl_dlopen=no
64198fi
64199rm -f core conftest.err conftest.$ac_objext \
64200    conftest$ac_exeext conftest.$ac_ext
64201LIBS=$ac_check_lib_save_LIBS
64202fi
64203{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64204$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64205if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64206  cat >>confdefs.h <<_ACEOF
64207#define HAVE_LIBDL 1
64208_ACEOF
64209
64210  LIBS="-ldl $LIBS"
64211
64212fi
64213
64214  LIBDL="$LIBS"
64215
64216  LIBS="$save_LIBS"
64217
64218  # Deprecated libraries, keep the flags for backwards compatibility
64219  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64220
64221
64222# Check whether --with-dxsdk was given.
64223if test "${with_dxsdk+set}" = set; then :
64224  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64225$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64226fi
64227
64228
64229
64230
64231# Check whether --with-dxsdk-lib was given.
64232if test "${with_dxsdk_lib+set}" = set; then :
64233  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64234$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64235fi
64236
64237
64238
64239
64240# Check whether --with-dxsdk-include was given.
64241if test "${with_dxsdk_include+set}" = set; then :
64242  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64243$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64244fi
64245
64246
64247  fi
64248
64249  # Control if libzip can use mmap. Available for purposes of overriding.
64250  LIBZIP_CAN_USE_MMAP=true
64251
64252
64253
64254  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64255    # Find the root of the Solaris Studio installation from the compiler path
64256    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64257    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64258    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64259$as_echo_n "checking for libstlport.so.1... " >&6; }
64260    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64261      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64262      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64263    fi
64264    if test -f "$STLPORT_LIB"; then
64265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64266$as_echo "yes, $STLPORT_LIB" >&6; }
64267
64268  # Only process if variable expands to non-empty
64269
64270  if test "x$STLPORT_LIB" != x; then
64271    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64272
64273  # Input might be given as Windows format, start by converting to
64274  # unix format.
64275  path="$STLPORT_LIB"
64276  new_path=`$CYGPATH -u "$path"`
64277
64278  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64279  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64280  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64281  # "foo.exe" is OK but "foo" is an error.
64282  #
64283  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64284  # It is also a way to make sure we got the proper file name for the real test later on.
64285  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64286  if test "x$test_shortpath" = x; then
64287    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64288$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64289    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64290  fi
64291
64292  # Call helper function which possibly converts this using DOS-style short mode.
64293  # If so, the updated path is stored in $new_path.
64294
64295  input_path="$new_path"
64296  # Check if we need to convert this using DOS-style short mode. If the path
64297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64298  # take no chances and rewrite it.
64299  # Note: m4 eats our [], so we need to use [ and ] instead.
64300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64301  if test "x$has_forbidden_chars" != x; then
64302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64306      # Going to short mode and back again did indeed matter. Since short mode is
64307      # case insensitive, let's make it lowercase to improve readability.
64308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64309      # Now convert it back to Unix-style (cygpath)
64310      input_path=`$CYGPATH -u "$shortmode_path"`
64311      new_path="$input_path"
64312    fi
64313  fi
64314
64315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64316  if test "x$test_cygdrive_prefix" = x; then
64317    # As a simple fix, exclude /usr/bin since it's not a real path.
64318    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64320      # a path prefixed by /cygdrive for fixpath to work.
64321      new_path="$CYGWIN_ROOT_PATH$input_path"
64322    fi
64323  fi
64324
64325
64326  if test "x$path" != "x$new_path"; then
64327    STLPORT_LIB="$new_path"
64328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64329$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64330  fi
64331
64332    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64333
64334  path="$STLPORT_LIB"
64335  has_colon=`$ECHO $path | $GREP ^.:`
64336  new_path="$path"
64337  if test "x$has_colon" = x; then
64338    # Not in mixed or Windows style, start by that.
64339    new_path=`cmd //c echo $path`
64340  fi
64341
64342
64343  input_path="$new_path"
64344  # Check if we need to convert this using DOS-style short mode. If the path
64345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64346  # take no chances and rewrite it.
64347  # Note: m4 eats our [], so we need to use [ and ] instead.
64348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64349  if test "x$has_forbidden_chars" != x; then
64350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64351    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64352  fi
64353
64354
64355  windows_path="$new_path"
64356  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64357    unix_path=`$CYGPATH -u "$windows_path"`
64358    new_path="$unix_path"
64359  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64360    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64361    new_path="$unix_path"
64362  fi
64363
64364  if test "x$path" != "x$new_path"; then
64365    STLPORT_LIB="$new_path"
64366    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64367$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64368  fi
64369
64370  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64371  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64372
64373    else
64374      # We're on a unix platform. Hooray! :)
64375      path="$STLPORT_LIB"
64376      has_space=`$ECHO "$path" | $GREP " "`
64377      if test "x$has_space" != x; then
64378        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64379$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64380        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64381      fi
64382
64383      # Use eval to expand a potential ~
64384      eval path="$path"
64385      if test ! -f "$path" && test ! -d "$path"; then
64386        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64387      fi
64388
64389      if test -d "$path"; then
64390        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64391      else
64392        dir="`$DIRNAME "$path"`"
64393        base="`$BASENAME "$path"`"
64394        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64395      fi
64396    fi
64397  fi
64398
64399    else
64400      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64401$as_echo "no, not found at $STLPORT_LIB" >&6; }
64402      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64403    fi
64404
64405  fi
64406
64407
64408
64409
64410
64411
64412
64413
64414
64415
64416
64417
64418
64419
64420# Hotspot setup depends on lib checks (AOT needs libelf).
64421
64422
64423  # The user can in some cases supply additional jvm features. For the custom
64424  # variant, this defines the entire variant.
64425
64426# Check whether --with-jvm-features was given.
64427if test "${with_jvm_features+set}" = set; then :
64428  withval=$with_jvm_features;
64429fi
64430
64431  if test "x$with_jvm_features" != x; then
64432    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
64433$as_echo_n "checking additional JVM features... " >&6; }
64434    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
64435    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
64436$as_echo "$JVM_FEATURES" >&6; }
64437  fi
64438
64439  # Override hotspot cpu definitions for ARM platforms
64440  if test "x$OPENJDK_TARGET_CPU" = xarm; then
64441    HOTSPOT_TARGET_CPU=arm_32
64442    HOTSPOT_TARGET_CPU_DEFINE="ARM32"
64443    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64444    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64445  elif test "x$OPENJDK_TARGET_CPU" = xaarch64 && test "x$HOTSPOT_TARGET_CPU_PORT" = xarm64; then
64446    HOTSPOT_TARGET_CPU=arm_64
64447    HOTSPOT_TARGET_CPU_ARCH=arm
64448    JVM_LDFLAGS="$JVM_LDFLAGS -fsigned-char"
64449    JVM_CFLAGS="$JVM_CFLAGS -DARM -fsigned-char"
64450  fi
64451
64452  # Verify that dependencies are met for explicitly set features.
64453  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
64454    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
64455  fi
64456
64457  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
64458    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
64459  fi
64460
64461  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
64462    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
64463  fi
64464
64465  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64466    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
64467  fi
64468
64469  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
64470    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
64471  fi
64472
64473  # Turn on additional features based on other parts of configure
64474  if test "x$INCLUDE_DTRACE" = "xtrue"; then
64475    JVM_FEATURES="$JVM_FEATURES dtrace"
64476  else
64477    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
64478      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
64479    fi
64480  fi
64481
64482  if test "x$STATIC_BUILD" = "xtrue"; then
64483    JVM_FEATURES="$JVM_FEATURES static-build"
64484  else
64485    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
64486      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
64487    fi
64488  fi
64489
64490  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64491    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
64492      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
64493    fi
64494  fi
64495
64496  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
64497    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
64498      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
64499    fi
64500  fi
64501
64502  # Only enable jvmci on x86_64, sparcv9 and aarch64.
64503  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
64504     test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
64505     test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
64506    JVM_FEATURES_jvmci="jvmci"
64507  else
64508    JVM_FEATURES_jvmci=""
64509  fi
64510
64511  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jdk.internal.vm.compiler should be built" >&5
64512$as_echo_n "checking if jdk.internal.vm.compiler should be built... " >&6; }
64513  if   [[ " $JVM_FEATURES " =~ " graal " ]]  ; then
64514    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64515$as_echo "yes, forced" >&6; }
64516    if test "x$JVM_FEATURES_jvmci" != "xjvmci" ; then
64517      as_fn_error $? "Specified JVM feature 'graal' requires feature 'jvmci'" "$LINENO" 5
64518    fi
64519    INCLUDE_GRAAL="true"
64520  else
64521    # By default enable graal build where AOT is available
64522    if test "x$ENABLE_AOT" = "xtrue"; then
64523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64524$as_echo "yes" >&6; }
64525      JVM_FEATURES_graal="graal"
64526      INCLUDE_GRAAL="true"
64527    else
64528      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64529$as_echo "no" >&6; }
64530      JVM_FEATURES_graal=""
64531      INCLUDE_GRAAL="false"
64532    fi
64533  fi
64534
64535
64536
64537  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if aot should be enabled" >&5
64538$as_echo_n "checking if aot should be enabled... " >&6; }
64539  if test "x$ENABLE_AOT" = "xtrue"; then
64540    if test "x$enable_aot" = "xyes"; then
64541      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64542$as_echo "yes, forced" >&6; }
64543    else
64544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64545$as_echo "yes" >&6; }
64546    fi
64547    JVM_FEATURES_aot="aot"
64548  else
64549    if test "x$enable_aot" = "xno"; then
64550      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64551$as_echo "no, forced" >&6; }
64552    else
64553      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64554$as_echo "no" >&6; }
64555    fi
64556    JVM_FEATURES_aot=""
64557  fi
64558
64559  if test "x$OPENJDK_TARGET_CPU" = xarm ; then
64560    # Default to use link time optimizations on minimal on arm
64561    JVM_FEATURES_link_time_opt="link-time-opt"
64562  else
64563    JVM_FEATURES_link_time_opt=""
64564  fi
64565
64566  # All variants but minimal (and custom) get these features
64567  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
64568
64569  # Enable features depending on variant.
64570  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci $JVM_FEATURES_aot $JVM_FEATURES_graal"
64571  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
64572  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
64573  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES $JVM_FEATURES_link_time_opt"
64574  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
64575  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
64576  JVM_FEATURES_custom="$JVM_FEATURES"
64577
64578
64579
64580
64581
64582
64583
64584
64585
64586  # Used for verification of Makefiles by check-jvm-feature
64587
64588
64589  # We don't support --with-jvm-interpreter anymore, use zero instead.
64590
64591
64592# Check whether --with-jvm-interpreter was given.
64593if test "${with_jvm_interpreter+set}" = set; then :
64594  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
64595$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
64596fi
64597
64598
64599
64600
64601###############################################################################
64602#
64603# We need to do some final tweaking, when everything else is done.
64604#
64605###############################################################################
64606
64607
64608  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64609$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64610
64611  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64612    ENABLE_INTREE_EC=true
64613    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64614$as_echo "yes" >&6; }
64615  else
64616    ENABLE_INTREE_EC=false
64617    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64618$as_echo "no" >&6; }
64619  fi
64620
64621
64622
64623
64624  # Check whether --enable-jtreg-failure-handler was given.
64625if test "${enable_jtreg_failure_handler+set}" = set; then :
64626  enableval=$enable_jtreg_failure_handler;
64627fi
64628
64629
64630  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64631$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64632
64633  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64634    if test "x$JT_HOME" = "x"; then
64635      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64636    else
64637      BUILD_FAILURE_HANDLER=true
64638      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64639$as_echo "yes, forced" >&6; }
64640    fi
64641  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64642    BUILD_FAILURE_HANDLER=false
64643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64644$as_echo "no, forced" >&6; }
64645  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64646      || test "x$enable_jtreg_failure_handler" = "x"; then
64647    if test "x$JT_HOME" = "x"; then
64648      BUILD_FAILURE_HANDLER=false
64649      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64650$as_echo "no, missing jtreg" >&6; }
64651    else
64652      BUILD_FAILURE_HANDLER=true
64653      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64654$as_echo "yes, jtreg present" >&6; }
64655    fi
64656  else
64657    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64658  fi
64659
64660
64661
64662
64663  # Check whether --enable-generate-classlist was given.
64664if test "${enable_generate_classlist+set}" = set; then :
64665  enableval=$enable_generate_classlist;
64666fi
64667
64668
64669  # Check if it's likely that it's possible to generate the classlist. Depending
64670  # on exact jvm configuration it could be possible anyway.
64671  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64672    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64673  else
64674    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64675  fi
64676
64677  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64678$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64679  if test "x$enable_generate_classlist" = "xyes"; then
64680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64681$as_echo "yes, forced" >&6; }
64682    ENABLE_GENERATE_CLASSLIST="true"
64683    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64684      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64685$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64686    fi
64687  elif test "x$enable_generate_classlist" = "xno"; then
64688    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64689$as_echo "no, forced" >&6; }
64690    ENABLE_GENERATE_CLASSLIST="false"
64691  elif test "x$enable_generate_classlist" = "x"; then
64692    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64693      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64694$as_echo "yes" >&6; }
64695      ENABLE_GENERATE_CLASSLIST="true"
64696    else
64697      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64698$as_echo "no" >&6; }
64699      ENABLE_GENERATE_CLASSLIST="false"
64700    fi
64701  else
64702    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64703  fi
64704
64705
64706
64707
64708###############################################################################
64709#
64710# Configure parts of the build that only affect the build performance,
64711# not the result.
64712#
64713###############################################################################
64714
64715
64716  # How many cores do we have on this build system?
64717
64718# Check whether --with-num-cores was given.
64719if test "${with_num_cores+set}" = set; then :
64720  withval=$with_num_cores;
64721fi
64722
64723  if test "x$with_num_cores" = x; then
64724    # The number of cores were not specified, try to probe them.
64725
64726  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64727$as_echo_n "checking for number of cores... " >&6; }
64728  NUM_CORES=1
64729  FOUND_CORES=no
64730
64731  if test -f /proc/cpuinfo; then
64732    # Looks like a Linux (or cygwin) system
64733    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64734    FOUND_CORES=yes
64735  elif test -x /usr/sbin/psrinfo; then
64736    # Looks like a Solaris system
64737    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64738    FOUND_CORES=yes
64739  elif test -x /usr/sbin/sysctl; then
64740    # Looks like a MacOSX system
64741    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64742    FOUND_CORES=yes
64743  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64744    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64745    FOUND_CORES=yes
64746  elif test -n "$NUMBER_OF_PROCESSORS"; then
64747    # On windows, look in the env
64748    NUM_CORES=$NUMBER_OF_PROCESSORS
64749    FOUND_CORES=yes
64750  fi
64751
64752  if test "x$FOUND_CORES" = xyes; then
64753    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64754$as_echo "$NUM_CORES" >&6; }
64755  else
64756    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64757$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64758    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64759$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64760  fi
64761
64762  else
64763    NUM_CORES=$with_num_cores
64764  fi
64765
64766
64767
64768  # How much memory do we have on this build system?
64769
64770# Check whether --with-memory-size was given.
64771if test "${with_memory_size+set}" = set; then :
64772  withval=$with_memory_size;
64773fi
64774
64775  if test "x$with_memory_size" = x; then
64776    # The memory size was not specified, try to probe it.
64777
64778  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64779$as_echo_n "checking for memory size... " >&6; }
64780  # Default to 1024 MB
64781  MEMORY_SIZE=1024
64782  FOUND_MEM=no
64783
64784  if test -f /proc/meminfo; then
64785    # Looks like a Linux (or cygwin) system
64786    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64787    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64788    FOUND_MEM=yes
64789  elif test -x /usr/sbin/prtconf; then
64790    # Looks like a Solaris or AIX system
64791    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64792    FOUND_MEM=yes
64793  elif test -x /usr/sbin/sysctl; then
64794    # Looks like a MacOSX system
64795    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64796    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64797    FOUND_MEM=yes
64798  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64799    # Windows, but without cygwin
64800    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64801    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64802    FOUND_MEM=yes
64803  fi
64804
64805  if test "x$FOUND_MEM" = xyes; then
64806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64807$as_echo "$MEMORY_SIZE MB" >&6; }
64808  else
64809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64810$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64811    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64812$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64813  fi
64814
64815  else
64816    MEMORY_SIZE=$with_memory_size
64817  fi
64818
64819
64820
64821  # Provide a decent default number of parallel jobs for make depending on
64822  # number of cores, amount of memory and machine architecture.
64823
64824# Check whether --with-jobs was given.
64825if test "${with_jobs+set}" = set; then :
64826  withval=$with_jobs;
64827fi
64828
64829  if test "x$with_jobs" = x; then
64830    # Number of jobs was not specified, calculate.
64831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64832$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64833    # Approximate memory in GB.
64834    memory_gb=`expr $MEMORY_SIZE / 1024`
64835    # Pick the lowest of memory in gb and number of cores.
64836    if test "$memory_gb" -lt "$NUM_CORES"; then
64837      JOBS="$memory_gb"
64838    else
64839      JOBS="$NUM_CORES"
64840    fi
64841    if test "$JOBS" -eq "0"; then
64842      JOBS=1
64843    fi
64844    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64845$as_echo "$JOBS" >&6; }
64846  else
64847    JOBS=$with_jobs
64848  fi
64849
64850
64851
64852  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64853
64854# Check whether --with-test-jobs was given.
64855if test "${with_test_jobs+set}" = set; then :
64856  withval=$with_test_jobs;
64857fi
64858
64859  if test "x$with_test_jobs" = x; then
64860      TEST_JOBS=0
64861  else
64862      TEST_JOBS=$with_test_jobs
64863  fi
64864
64865
64866
64867# Setup arguments for the boot jdk (after cores and memory have been setup)
64868
64869  ##############################################################################
64870  #
64871  # Specify jvm options for anything that is run with the Boot JDK.
64872  # Not all JVM:s accept the same arguments on the command line.
64873  #
64874
64875# Check whether --with-boot-jdk-jvmargs was given.
64876if test "${with_boot_jdk_jvmargs+set}" = set; then :
64877  withval=$with_boot_jdk_jvmargs;
64878fi
64879
64880
64881  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64882$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64883
64884  # Disable special log output when a debug build is used as Boot JDK...
64885
64886  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64887  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64888  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64889  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64890  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64891  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64892    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64893    JVM_ARG_OK=true
64894  else
64895    $ECHO "Arg failed:" >&5
64896    $ECHO "$OUTPUT" >&5
64897    JVM_ARG_OK=false
64898  fi
64899
64900
64901  # Force en-US environment
64902
64903  $ECHO "Check if jvm arg is ok: -Duser.language=en -Duser.country=US" >&5
64904  $ECHO "Command: $JAVA -Duser.language=en -Duser.country=US -version" >&5
64905  OUTPUT=`$JAVA -Duser.language=en -Duser.country=US -version 2>&1`
64906  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64907  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64908  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64909    boot_jdk_jvmargs="$boot_jdk_jvmargs -Duser.language=en -Duser.country=US"
64910    JVM_ARG_OK=true
64911  else
64912    $ECHO "Arg failed:" >&5
64913    $ECHO "$OUTPUT" >&5
64914    JVM_ARG_OK=false
64915  fi
64916
64917
64918  # Apply user provided options.
64919
64920  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64921  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64922  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64923  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64924  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64925  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64926    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64927    JVM_ARG_OK=true
64928  else
64929    $ECHO "Arg failed:" >&5
64930    $ECHO "$OUTPUT" >&5
64931    JVM_ARG_OK=false
64932  fi
64933
64934
64935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64936$as_echo "$boot_jdk_jvmargs" >&6; }
64937
64938  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64939  JAVA_FLAGS=$boot_jdk_jvmargs
64940
64941
64942
64943  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64944$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64945
64946  # Starting amount of heap memory.
64947
64948  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64949  $ECHO "Command: $JAVA -Xms64M -version" >&5
64950  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64951  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64952  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64953  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64954    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64955    JVM_ARG_OK=true
64956  else
64957    $ECHO "Arg failed:" >&5
64958    $ECHO "$OUTPUT" >&5
64959    JVM_ARG_OK=false
64960  fi
64961
64962  BOOTCYCLE_JVM_ARGS_BIG=-Xms64M
64963
64964  # Maximum amount of heap memory and stack size.
64965  JVM_HEAP_LIMIT_32="1024"
64966  # Running a 64 bit JVM allows for and requires a bigger heap
64967  JVM_HEAP_LIMIT_64="1600"
64968  STACK_SIZE_32=768
64969  STACK_SIZE_64=1536
64970  JVM_HEAP_LIMIT_GLOBAL=`expr $MEMORY_SIZE / 2`
64971  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_32"; then
64972    JVM_HEAP_LIMIT_32=$JVM_HEAP_LIMIT_GLOBAL
64973  fi
64974  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "$JVM_HEAP_LIMIT_64"; then
64975    JVM_HEAP_LIMIT_64=$JVM_HEAP_LIMIT_GLOBAL
64976  fi
64977  if test "$JVM_HEAP_LIMIT_GLOBAL" -lt "512"; then
64978    JVM_HEAP_LIMIT_32=512
64979    JVM_HEAP_LIMIT_64=512
64980  fi
64981
64982  if test "x$BOOT_JDK_BITS" = "x32"; then
64983    STACK_SIZE=$STACK_SIZE_32
64984    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_32
64985  else
64986    STACK_SIZE=$STACK_SIZE_64
64987    JVM_MAX_HEAP=$JVM_HEAP_LIMIT_64
64988  fi
64989
64990  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64991  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64992  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64993  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
64994  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
64995  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64996    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64997    JVM_ARG_OK=true
64998  else
64999    $ECHO "Arg failed:" >&5
65000    $ECHO "$OUTPUT" >&5
65001    JVM_ARG_OK=false
65002  fi
65003
65004
65005  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65006  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65007  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65008  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65009  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65010  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65011    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65012    JVM_ARG_OK=true
65013  else
65014    $ECHO "Arg failed:" >&5
65015    $ECHO "$OUTPUT" >&5
65016    JVM_ARG_OK=false
65017  fi
65018
65019
65020  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65021$as_echo "$boot_jdk_jvmargs_big" >&6; }
65022
65023  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65024
65025
65026  if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
65027    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_32
65028    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_32
65029  else
65030    BOOTCYCLE_MAX_HEAP=$JVM_HEAP_LIMIT_64
65031    BOOTCYCLE_STACK_SIZE=$STACK_SIZE_64
65032  fi
65033  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -Xmx${BOOTCYCLE_MAX_HEAP}M"
65034  BOOTCYCLE_JVM_ARGS_BIG="$BOOTCYCLE_JVM_ARGS_BIG -XX:ThreadStackSize=$BOOTCYCLE_STACK_SIZE"
65035  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for bootcycle boot jdk java command for big workloads" >&5
65036$as_echo_n "checking flags for bootcycle boot jdk java command for big workloads... " >&6; }
65037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOTCYCLE_JVM_ARGS_BIG" >&5
65038$as_echo "$BOOTCYCLE_JVM_ARGS_BIG" >&6; }
65039
65040
65041  # By default, the main javac compilations use big
65042  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65043
65044
65045  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65046$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65047
65048  # Use serial gc for small short lived tools if possible
65049
65050  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65051  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65052  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65053  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65054  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65055  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65056    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65057    JVM_ARG_OK=true
65058  else
65059    $ECHO "Arg failed:" >&5
65060    $ECHO "$OUTPUT" >&5
65061    JVM_ARG_OK=false
65062  fi
65063
65064
65065  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65066  $ECHO "Command: $JAVA -Xms32M -version" >&5
65067  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65068  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65069  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65070  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65071    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65072    JVM_ARG_OK=true
65073  else
65074    $ECHO "Arg failed:" >&5
65075    $ECHO "$OUTPUT" >&5
65076    JVM_ARG_OK=false
65077  fi
65078
65079
65080  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65081  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65082  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65083  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65084  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65085  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65086    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65087    JVM_ARG_OK=true
65088  else
65089    $ECHO "Arg failed:" >&5
65090    $ECHO "$OUTPUT" >&5
65091    JVM_ARG_OK=false
65092  fi
65093
65094
65095  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65096  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65097  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65098  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65099  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65100  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65101    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65102    JVM_ARG_OK=true
65103  else
65104    $ECHO "Arg failed:" >&5
65105    $ECHO "$OUTPUT" >&5
65106    JVM_ARG_OK=false
65107  fi
65108
65109
65110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65111$as_echo "$boot_jdk_jvmargs_small" >&6; }
65112
65113  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65114
65115
65116  JAVA_TOOL_FLAGS_SMALL=""
65117  for f in $JAVA_FLAGS_SMALL; do
65118    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65119  done
65120
65121
65122
65123# Setup smart javac (after cores and memory have been setup)
65124
65125
65126# Check whether --with-sjavac-server-java was given.
65127if test "${with_sjavac_server_java+set}" = set; then :
65128  withval=$with_sjavac_server_java;
65129fi
65130
65131
65132  if test "x$with_sjavac_server_java" != x; then
65133    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65134    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65135    if test "x$FOUND_VERSION" = x; then
65136      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65137    fi
65138  else
65139    SJAVAC_SERVER_JAVA="$JAVA"
65140  fi
65141
65142
65143  if test "$MEMORY_SIZE" -gt "3000"; then
65144
65145  $ECHO "Check if jvm arg is ok: -d64" >&5
65146  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65147  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65148  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65149  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65150  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65151    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65152    JVM_ARG_OK=true
65153  else
65154    $ECHO "Arg failed:" >&5
65155    $ECHO "$OUTPUT" >&5
65156    JVM_ARG_OK=false
65157  fi
65158
65159    if test "$JVM_ARG_OK" = true; then
65160      JVM_64BIT=true
65161      JVM_ARG_OK=false
65162    fi
65163  fi
65164
65165  MX_VALUE=`expr $MEMORY_SIZE / 2`
65166  if test "$JVM_64BIT" = true; then
65167    # Set ms lower than mx since more than one instance of the server might
65168    # get launched at the same time before they figure out which instance won.
65169    MS_VALUE=512
65170    if test "$MX_VALUE" -gt "2048"; then
65171      MX_VALUE=2048
65172    fi
65173  else
65174    MS_VALUE=256
65175    if test "$MX_VALUE" -gt "1500"; then
65176      MX_VALUE=1500
65177    fi
65178  fi
65179  if test "$MX_VALUE" -lt "512"; then
65180    MX_VALUE=512
65181  fi
65182
65183  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65184  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65185  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65186  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65187  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65188  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65189    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65190    JVM_ARG_OK=true
65191  else
65192    $ECHO "Arg failed:" >&5
65193    $ECHO "$OUTPUT" >&5
65194    JVM_ARG_OK=false
65195  fi
65196
65197
65198
65199  # Check whether --enable-sjavac was given.
65200if test "${enable_sjavac+set}" = set; then :
65201  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65202else
65203  ENABLE_SJAVAC="no"
65204fi
65205
65206  if test "x$JVM_ARG_OK" = "xfalse"; then
65207    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65208$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65209    ENABLE_SJAVAC="no"
65210  fi
65211  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65212$as_echo_n "checking whether to use sjavac... " >&6; }
65213  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65214$as_echo "$ENABLE_SJAVAC" >&6; }
65215
65216
65217  # Check whether --enable-javac-server was given.
65218if test "${enable_javac_server+set}" = set; then :
65219  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65220else
65221  ENABLE_JAVAC_SERVER="yes"
65222fi
65223
65224  if test "x$JVM_ARG_OK" = "xfalse"; then
65225    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65226$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65227    ENABLE_JAVAC_SERVER="no"
65228  fi
65229  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65230$as_echo_n "checking whether to use javac server... " >&6; }
65231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65232$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65233
65234
65235  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65236    # When using a server javac, the small client instances do not need much
65237    # resources.
65238    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65239  fi
65240
65241
65242# Setup use of icecc if requested
65243
65244  # Check whether --enable-icecc was given.
65245if test "${enable_icecc+set}" = set; then :
65246  enableval=$enable_icecc;
65247fi
65248
65249
65250  if test "x${enable_icecc}" = "xyes"; then
65251
65252
65253
65254  # Publish this variable in the help.
65255
65256
65257  if [ -z "${ICECC_CMD+x}" ]; then
65258    # The variable is not set by user, try to locate tool using the code snippet
65259    for ac_prog in icecc
65260do
65261  # Extract the first word of "$ac_prog", so it can be a program name with args.
65262set dummy $ac_prog; ac_word=$2
65263{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65264$as_echo_n "checking for $ac_word... " >&6; }
65265if ${ac_cv_path_ICECC_CMD+:} false; then :
65266  $as_echo_n "(cached) " >&6
65267else
65268  case $ICECC_CMD in
65269  [\\/]* | ?:[\\/]*)
65270  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65271  ;;
65272  *)
65273  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65274for as_dir in $PATH
65275do
65276  IFS=$as_save_IFS
65277  test -z "$as_dir" && as_dir=.
65278    for ac_exec_ext in '' $ac_executable_extensions; do
65279  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65280    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65282    break 2
65283  fi
65284done
65285  done
65286IFS=$as_save_IFS
65287
65288  ;;
65289esac
65290fi
65291ICECC_CMD=$ac_cv_path_ICECC_CMD
65292if test -n "$ICECC_CMD"; then
65293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65294$as_echo "$ICECC_CMD" >&6; }
65295else
65296  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65297$as_echo "no" >&6; }
65298fi
65299
65300
65301  test -n "$ICECC_CMD" && break
65302done
65303
65304  else
65305    # The variable is set, but is it from the command line or the environment?
65306
65307    # Try to remove the string !ICECC_CMD! from our list.
65308    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65309    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65310      # If it failed, the variable was not from the command line. Ignore it,
65311      # but warn the user (except for BASH, which is always set by the calling BASH).
65312      if test "xICECC_CMD" != xBASH; then
65313        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65314$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65315      fi
65316      # Try to locate tool using the code snippet
65317      for ac_prog in icecc
65318do
65319  # Extract the first word of "$ac_prog", so it can be a program name with args.
65320set dummy $ac_prog; ac_word=$2
65321{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65322$as_echo_n "checking for $ac_word... " >&6; }
65323if ${ac_cv_path_ICECC_CMD+:} false; then :
65324  $as_echo_n "(cached) " >&6
65325else
65326  case $ICECC_CMD in
65327  [\\/]* | ?:[\\/]*)
65328  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65329  ;;
65330  *)
65331  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65332for as_dir in $PATH
65333do
65334  IFS=$as_save_IFS
65335  test -z "$as_dir" && as_dir=.
65336    for ac_exec_ext in '' $ac_executable_extensions; do
65337  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65338    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65339    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65340    break 2
65341  fi
65342done
65343  done
65344IFS=$as_save_IFS
65345
65346  ;;
65347esac
65348fi
65349ICECC_CMD=$ac_cv_path_ICECC_CMD
65350if test -n "$ICECC_CMD"; then
65351  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65352$as_echo "$ICECC_CMD" >&6; }
65353else
65354  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65355$as_echo "no" >&6; }
65356fi
65357
65358
65359  test -n "$ICECC_CMD" && break
65360done
65361
65362    else
65363      # If it succeeded, then it was overridden by the user. We will use it
65364      # for the tool.
65365
65366      # First remove it from the list of overridden variables, so we can test
65367      # for unknown variables in the end.
65368      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65369
65370      # Check if we try to supply an empty value
65371      if test "x$ICECC_CMD" = x; then
65372        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65373$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65374        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65375$as_echo_n "checking for ICECC_CMD... " >&6; }
65376        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65377$as_echo "disabled" >&6; }
65378      else
65379        # Check if the provided tool contains a complete path.
65380        tool_specified="$ICECC_CMD"
65381        tool_basename="${tool_specified##*/}"
65382        if test "x$tool_basename" = "x$tool_specified"; then
65383          # A command without a complete path is provided, search $PATH.
65384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65385$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65386          # Extract the first word of "$tool_basename", so it can be a program name with args.
65387set dummy $tool_basename; ac_word=$2
65388{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65389$as_echo_n "checking for $ac_word... " >&6; }
65390if ${ac_cv_path_ICECC_CMD+:} false; then :
65391  $as_echo_n "(cached) " >&6
65392else
65393  case $ICECC_CMD in
65394  [\\/]* | ?:[\\/]*)
65395  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65396  ;;
65397  *)
65398  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65399for as_dir in $PATH
65400do
65401  IFS=$as_save_IFS
65402  test -z "$as_dir" && as_dir=.
65403    for ac_exec_ext in '' $ac_executable_extensions; do
65404  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65405    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65406    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65407    break 2
65408  fi
65409done
65410  done
65411IFS=$as_save_IFS
65412
65413  ;;
65414esac
65415fi
65416ICECC_CMD=$ac_cv_path_ICECC_CMD
65417if test -n "$ICECC_CMD"; then
65418  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65419$as_echo "$ICECC_CMD" >&6; }
65420else
65421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65422$as_echo "no" >&6; }
65423fi
65424
65425
65426          if test "x$ICECC_CMD" = x; then
65427            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65428          fi
65429        else
65430          # Otherwise we believe it is a complete path. Use it as it is.
65431          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65432$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65433          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65434$as_echo_n "checking for ICECC_CMD... " >&6; }
65435          if test ! -x "$tool_specified"; then
65436            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65437$as_echo "not found" >&6; }
65438            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65439          fi
65440          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65441$as_echo "$tool_specified" >&6; }
65442        fi
65443      fi
65444    fi
65445
65446  fi
65447
65448
65449
65450  if test "x$ICECC_CMD" = x; then
65451    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65452  fi
65453
65454
65455    old_path="$PATH"
65456
65457    # Look for icecc-create-env in some known places
65458    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65459
65460
65461
65462  # Publish this variable in the help.
65463
65464
65465  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65466    # The variable is not set by user, try to locate tool using the code snippet
65467    for ac_prog in icecc-create-env
65468do
65469  # Extract the first word of "$ac_prog", so it can be a program name with args.
65470set dummy $ac_prog; ac_word=$2
65471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65472$as_echo_n "checking for $ac_word... " >&6; }
65473if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65474  $as_echo_n "(cached) " >&6
65475else
65476  case $ICECC_CREATE_ENV in
65477  [\\/]* | ?:[\\/]*)
65478  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65479  ;;
65480  *)
65481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65482for as_dir in $PATH
65483do
65484  IFS=$as_save_IFS
65485  test -z "$as_dir" && as_dir=.
65486    for ac_exec_ext in '' $ac_executable_extensions; do
65487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65488    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65490    break 2
65491  fi
65492done
65493  done
65494IFS=$as_save_IFS
65495
65496  ;;
65497esac
65498fi
65499ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65500if test -n "$ICECC_CREATE_ENV"; then
65501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65502$as_echo "$ICECC_CREATE_ENV" >&6; }
65503else
65504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65505$as_echo "no" >&6; }
65506fi
65507
65508
65509  test -n "$ICECC_CREATE_ENV" && break
65510done
65511
65512  else
65513    # The variable is set, but is it from the command line or the environment?
65514
65515    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65518      # If it failed, the variable was not from the command line. Ignore it,
65519      # but warn the user (except for BASH, which is always set by the calling BASH).
65520      if test "xICECC_CREATE_ENV" != xBASH; then
65521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65522$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65523      fi
65524      # Try to locate tool using the code snippet
65525      for ac_prog in icecc-create-env
65526do
65527  # Extract the first word of "$ac_prog", so it can be a program name with args.
65528set dummy $ac_prog; ac_word=$2
65529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65530$as_echo_n "checking for $ac_word... " >&6; }
65531if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65532  $as_echo_n "(cached) " >&6
65533else
65534  case $ICECC_CREATE_ENV in
65535  [\\/]* | ?:[\\/]*)
65536  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65537  ;;
65538  *)
65539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65540for as_dir in $PATH
65541do
65542  IFS=$as_save_IFS
65543  test -z "$as_dir" && as_dir=.
65544    for ac_exec_ext in '' $ac_executable_extensions; do
65545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65546    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65548    break 2
65549  fi
65550done
65551  done
65552IFS=$as_save_IFS
65553
65554  ;;
65555esac
65556fi
65557ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65558if test -n "$ICECC_CREATE_ENV"; then
65559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65560$as_echo "$ICECC_CREATE_ENV" >&6; }
65561else
65562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65563$as_echo "no" >&6; }
65564fi
65565
65566
65567  test -n "$ICECC_CREATE_ENV" && break
65568done
65569
65570    else
65571      # If it succeeded, then it was overridden by the user. We will use it
65572      # for the tool.
65573
65574      # First remove it from the list of overridden variables, so we can test
65575      # for unknown variables in the end.
65576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65577
65578      # Check if we try to supply an empty value
65579      if test "x$ICECC_CREATE_ENV" = x; then
65580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65581$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65583$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65585$as_echo "disabled" >&6; }
65586      else
65587        # Check if the provided tool contains a complete path.
65588        tool_specified="$ICECC_CREATE_ENV"
65589        tool_basename="${tool_specified##*/}"
65590        if test "x$tool_basename" = "x$tool_specified"; then
65591          # A command without a complete path is provided, search $PATH.
65592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65593$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65594          # Extract the first word of "$tool_basename", so it can be a program name with args.
65595set dummy $tool_basename; ac_word=$2
65596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65597$as_echo_n "checking for $ac_word... " >&6; }
65598if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65599  $as_echo_n "(cached) " >&6
65600else
65601  case $ICECC_CREATE_ENV in
65602  [\\/]* | ?:[\\/]*)
65603  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65604  ;;
65605  *)
65606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65607for as_dir in $PATH
65608do
65609  IFS=$as_save_IFS
65610  test -z "$as_dir" && as_dir=.
65611    for ac_exec_ext in '' $ac_executable_extensions; do
65612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65613    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65615    break 2
65616  fi
65617done
65618  done
65619IFS=$as_save_IFS
65620
65621  ;;
65622esac
65623fi
65624ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65625if test -n "$ICECC_CREATE_ENV"; then
65626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65627$as_echo "$ICECC_CREATE_ENV" >&6; }
65628else
65629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65630$as_echo "no" >&6; }
65631fi
65632
65633
65634          if test "x$ICECC_CREATE_ENV" = x; then
65635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65636          fi
65637        else
65638          # Otherwise we believe it is a complete path. Use it as it is.
65639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65640$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65642$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65643          if test ! -x "$tool_specified"; then
65644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65645$as_echo "not found" >&6; }
65646            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65647          fi
65648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65649$as_echo "$tool_specified" >&6; }
65650        fi
65651      fi
65652    fi
65653
65654  fi
65655
65656
65657
65658  if test "x$ICECC_CREATE_ENV" = x; then
65659    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65660  fi
65661
65662
65663    # Use icecc-create-env to create a minimal compilation environment that can
65664    # be sent to the other hosts in the icecream cluster.
65665    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65666    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65667    # Older versions of icecc does not have the --gcc parameter
65668    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65669      icecc_gcc_arg="--gcc"
65670    fi
65671    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65672
65673  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65674      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65675          ${icecc_create_env_log} 2>&1 )
65676  if test "$?" != "0"; then
65677    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65678$as_echo "$as_me: icecc-create-env output:" >&6;}
65679    cat \
65680          ${icecc_create_env_log}
65681    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65682  fi
65683
65684    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65685      # For clang, the icecc compilerwrapper is needed. It usually resides next
65686      # to icecc-create-env.
65687
65688
65689
65690  # Publish this variable in the help.
65691
65692
65693  if [ -z "${ICECC_WRAPPER+x}" ]; then
65694    # The variable is not set by user, try to locate tool using the code snippet
65695    for ac_prog in compilerwrapper
65696do
65697  # Extract the first word of "$ac_prog", so it can be a program name with args.
65698set dummy $ac_prog; ac_word=$2
65699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65700$as_echo_n "checking for $ac_word... " >&6; }
65701if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65702  $as_echo_n "(cached) " >&6
65703else
65704  case $ICECC_WRAPPER in
65705  [\\/]* | ?:[\\/]*)
65706  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65707  ;;
65708  *)
65709  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65710for as_dir in $PATH
65711do
65712  IFS=$as_save_IFS
65713  test -z "$as_dir" && as_dir=.
65714    for ac_exec_ext in '' $ac_executable_extensions; do
65715  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65716    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65717    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65718    break 2
65719  fi
65720done
65721  done
65722IFS=$as_save_IFS
65723
65724  ;;
65725esac
65726fi
65727ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65728if test -n "$ICECC_WRAPPER"; then
65729  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65730$as_echo "$ICECC_WRAPPER" >&6; }
65731else
65732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65733$as_echo "no" >&6; }
65734fi
65735
65736
65737  test -n "$ICECC_WRAPPER" && break
65738done
65739
65740  else
65741    # The variable is set, but is it from the command line or the environment?
65742
65743    # Try to remove the string !ICECC_WRAPPER! from our list.
65744    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65745    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65746      # If it failed, the variable was not from the command line. Ignore it,
65747      # but warn the user (except for BASH, which is always set by the calling BASH).
65748      if test "xICECC_WRAPPER" != xBASH; then
65749        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65750$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65751      fi
65752      # Try to locate tool using the code snippet
65753      for ac_prog in compilerwrapper
65754do
65755  # Extract the first word of "$ac_prog", so it can be a program name with args.
65756set dummy $ac_prog; ac_word=$2
65757{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65758$as_echo_n "checking for $ac_word... " >&6; }
65759if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65760  $as_echo_n "(cached) " >&6
65761else
65762  case $ICECC_WRAPPER in
65763  [\\/]* | ?:[\\/]*)
65764  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65765  ;;
65766  *)
65767  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65768for as_dir in $PATH
65769do
65770  IFS=$as_save_IFS
65771  test -z "$as_dir" && as_dir=.
65772    for ac_exec_ext in '' $ac_executable_extensions; do
65773  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65774    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65775    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65776    break 2
65777  fi
65778done
65779  done
65780IFS=$as_save_IFS
65781
65782  ;;
65783esac
65784fi
65785ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65786if test -n "$ICECC_WRAPPER"; then
65787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65788$as_echo "$ICECC_WRAPPER" >&6; }
65789else
65790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65791$as_echo "no" >&6; }
65792fi
65793
65794
65795  test -n "$ICECC_WRAPPER" && break
65796done
65797
65798    else
65799      # If it succeeded, then it was overridden by the user. We will use it
65800      # for the tool.
65801
65802      # First remove it from the list of overridden variables, so we can test
65803      # for unknown variables in the end.
65804      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65805
65806      # Check if we try to supply an empty value
65807      if test "x$ICECC_WRAPPER" = x; then
65808        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65809$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65810        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65811$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65813$as_echo "disabled" >&6; }
65814      else
65815        # Check if the provided tool contains a complete path.
65816        tool_specified="$ICECC_WRAPPER"
65817        tool_basename="${tool_specified##*/}"
65818        if test "x$tool_basename" = "x$tool_specified"; then
65819          # A command without a complete path is provided, search $PATH.
65820          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65821$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65822          # Extract the first word of "$tool_basename", so it can be a program name with args.
65823set dummy $tool_basename; ac_word=$2
65824{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65825$as_echo_n "checking for $ac_word... " >&6; }
65826if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65827  $as_echo_n "(cached) " >&6
65828else
65829  case $ICECC_WRAPPER in
65830  [\\/]* | ?:[\\/]*)
65831  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65832  ;;
65833  *)
65834  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65835for as_dir in $PATH
65836do
65837  IFS=$as_save_IFS
65838  test -z "$as_dir" && as_dir=.
65839    for ac_exec_ext in '' $ac_executable_extensions; do
65840  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65841    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65842    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65843    break 2
65844  fi
65845done
65846  done
65847IFS=$as_save_IFS
65848
65849  ;;
65850esac
65851fi
65852ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65853if test -n "$ICECC_WRAPPER"; then
65854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65855$as_echo "$ICECC_WRAPPER" >&6; }
65856else
65857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65858$as_echo "no" >&6; }
65859fi
65860
65861
65862          if test "x$ICECC_WRAPPER" = x; then
65863            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65864          fi
65865        else
65866          # Otherwise we believe it is a complete path. Use it as it is.
65867          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65868$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65869          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65870$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65871          if test ! -x "$tool_specified"; then
65872            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65873$as_echo "not found" >&6; }
65874            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65875          fi
65876          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65877$as_echo "$tool_specified" >&6; }
65878        fi
65879      fi
65880    fi
65881
65882  fi
65883
65884
65885
65886  if test "x$ICECC_WRAPPER" = x; then
65887    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65888  fi
65889
65890
65891
65892  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65893      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65894  if test "$?" != "0"; then
65895    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65896$as_echo "$as_me: icecc-create-env output:" >&6;}
65897    cat ${icecc_create_env_log}
65898    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65899  fi
65900
65901    else
65902      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65903    fi
65904    PATH="$old_path"
65905    # The bundle with the compiler gets a name based on checksums. Parse log file
65906    # to find it.
65907    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65908    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65909    if test ! -f ${ICECC_ENV_BUNDLE}; then
65910      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65911    fi
65912    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65913$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65914    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65915$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65916    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65917
65918    if test "x${COMPILE_TYPE}" = "xcross"; then
65919      # If cross compiling, create a separate env package for the build compiler
65920      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65921      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65922      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65923
65924  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65925      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65926            ${icecc_create_env_log_build} 2>&1 )
65927  if test "$?" != "0"; then
65928    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65929$as_echo "$as_me: icecc-create-env output:" >&6;}
65930    cat \
65931            ${icecc_create_env_log_build}
65932    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65933  fi
65934
65935      elif test "x${BUILD_CC##*/}" = "xclang"; then
65936
65937  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65938      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65939  if test "$?" != "0"; then
65940    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65941$as_echo "$as_me: icecc-create-env output:" >&6;}
65942    cat ${icecc_create_env_log_build}
65943    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65944  fi
65945
65946      else
65947        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65948      fi
65949      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65950      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65951      if test ! -f ${ICECC_ENV_BUNDLE}; then
65952        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65953      fi
65954      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65955$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65956      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65957$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65958      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65959          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65960    else
65961      BUILD_ICECC="${ICECC}"
65962    fi
65963
65964
65965  fi
65966
65967
65968# Can the C/C++ compiler use precompiled headers?
65969
65970
65971  ###############################################################################
65972  #
65973  # Can the C/C++ compiler use precompiled headers?
65974  #
65975  # Check whether --enable-precompiled-headers was given.
65976if test "${enable_precompiled_headers+set}" = set; then :
65977  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65978else
65979  ENABLE_PRECOMPH=yes
65980fi
65981
65982
65983  USE_PRECOMPILED_HEADER=true
65984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65985$as_echo_n "checking If precompiled header is enabled... " >&6; }
65986  if test "x$ENABLE_PRECOMPH" = xno; then
65987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65988$as_echo "no, forced" >&6; }
65989    USE_PRECOMPILED_HEADER=false
65990  elif test "x$ICECC" != "x"; then
65991    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65992$as_echo "no, does not work effectively with icecc" >&6; }
65993    USE_PRECOMPILED_HEADER=false
65994  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65995    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65996$as_echo "no, does not work with Solaris Studio" >&6; }
65997    USE_PRECOMPILED_HEADER=false
65998  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
65999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66000$as_echo "no, does not work with xlc" >&6; }
66001    USE_PRECOMPILED_HEADER=false
66002  else
66003    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66004$as_echo "yes" >&6; }
66005  fi
66006
66007  if test "x$ENABLE_PRECOMPH" = xyes; then
66008    # Check that the compiler actually supports precomp headers.
66009    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66010      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66011$as_echo_n "checking that precompiled headers work... " >&6; }
66012      echo "int alfa();" > conftest.h
66013      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66014      if test ! -f conftest.hpp.gch; then
66015        USE_PRECOMPILED_HEADER=false
66016        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66017$as_echo "no" >&6; }
66018      else
66019        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66020$as_echo "yes" >&6; }
66021      fi
66022      $RM conftest.h conftest.hpp.gch
66023    fi
66024  fi
66025
66026
66027
66028
66029# Setup use of ccache, if available
66030
66031  # Check whether --enable-ccache was given.
66032if test "${enable_ccache+set}" = set; then :
66033  enableval=$enable_ccache;
66034fi
66035
66036
66037  CCACHE_STATUS=
66038  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66039$as_echo_n "checking is ccache enabled... " >&6; }
66040  if test "x$enable_ccache" = xyes; then
66041    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66042      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66043$as_echo "yes" >&6; }
66044      OLD_PATH="$PATH"
66045      if test "x$TOOLCHAIN_PATH" != x; then
66046        PATH=$TOOLCHAIN_PATH:$PATH
66047      fi
66048
66049
66050
66051  # Publish this variable in the help.
66052
66053
66054  if [ -z "${CCACHE+x}" ]; then
66055    # The variable is not set by user, try to locate tool using the code snippet
66056    for ac_prog in ccache
66057do
66058  # Extract the first word of "$ac_prog", so it can be a program name with args.
66059set dummy $ac_prog; ac_word=$2
66060{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66061$as_echo_n "checking for $ac_word... " >&6; }
66062if ${ac_cv_path_CCACHE+:} false; then :
66063  $as_echo_n "(cached) " >&6
66064else
66065  case $CCACHE in
66066  [\\/]* | ?:[\\/]*)
66067  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66068  ;;
66069  *)
66070  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66071for as_dir in $PATH
66072do
66073  IFS=$as_save_IFS
66074  test -z "$as_dir" && as_dir=.
66075    for ac_exec_ext in '' $ac_executable_extensions; do
66076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66077    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66079    break 2
66080  fi
66081done
66082  done
66083IFS=$as_save_IFS
66084
66085  ;;
66086esac
66087fi
66088CCACHE=$ac_cv_path_CCACHE
66089if test -n "$CCACHE"; then
66090  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66091$as_echo "$CCACHE" >&6; }
66092else
66093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66094$as_echo "no" >&6; }
66095fi
66096
66097
66098  test -n "$CCACHE" && break
66099done
66100
66101  else
66102    # The variable is set, but is it from the command line or the environment?
66103
66104    # Try to remove the string !CCACHE! from our list.
66105    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66106    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66107      # If it failed, the variable was not from the command line. Ignore it,
66108      # but warn the user (except for BASH, which is always set by the calling BASH).
66109      if test "xCCACHE" != xBASH; then
66110        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66111$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66112      fi
66113      # Try to locate tool using the code snippet
66114      for ac_prog in ccache
66115do
66116  # Extract the first word of "$ac_prog", so it can be a program name with args.
66117set dummy $ac_prog; ac_word=$2
66118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66119$as_echo_n "checking for $ac_word... " >&6; }
66120if ${ac_cv_path_CCACHE+:} false; then :
66121  $as_echo_n "(cached) " >&6
66122else
66123  case $CCACHE in
66124  [\\/]* | ?:[\\/]*)
66125  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66126  ;;
66127  *)
66128  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66129for as_dir in $PATH
66130do
66131  IFS=$as_save_IFS
66132  test -z "$as_dir" && as_dir=.
66133    for ac_exec_ext in '' $ac_executable_extensions; do
66134  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66135    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66136    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66137    break 2
66138  fi
66139done
66140  done
66141IFS=$as_save_IFS
66142
66143  ;;
66144esac
66145fi
66146CCACHE=$ac_cv_path_CCACHE
66147if test -n "$CCACHE"; then
66148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66149$as_echo "$CCACHE" >&6; }
66150else
66151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66152$as_echo "no" >&6; }
66153fi
66154
66155
66156  test -n "$CCACHE" && break
66157done
66158
66159    else
66160      # If it succeeded, then it was overridden by the user. We will use it
66161      # for the tool.
66162
66163      # First remove it from the list of overridden variables, so we can test
66164      # for unknown variables in the end.
66165      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66166
66167      # Check if we try to supply an empty value
66168      if test "x$CCACHE" = x; then
66169        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66170$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66171        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66172$as_echo_n "checking for CCACHE... " >&6; }
66173        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66174$as_echo "disabled" >&6; }
66175      else
66176        # Check if the provided tool contains a complete path.
66177        tool_specified="$CCACHE"
66178        tool_basename="${tool_specified##*/}"
66179        if test "x$tool_basename" = "x$tool_specified"; then
66180          # A command without a complete path is provided, search $PATH.
66181          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66182$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66183          # Extract the first word of "$tool_basename", so it can be a program name with args.
66184set dummy $tool_basename; ac_word=$2
66185{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66186$as_echo_n "checking for $ac_word... " >&6; }
66187if ${ac_cv_path_CCACHE+:} false; then :
66188  $as_echo_n "(cached) " >&6
66189else
66190  case $CCACHE in
66191  [\\/]* | ?:[\\/]*)
66192  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66193  ;;
66194  *)
66195  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66196for as_dir in $PATH
66197do
66198  IFS=$as_save_IFS
66199  test -z "$as_dir" && as_dir=.
66200    for ac_exec_ext in '' $ac_executable_extensions; do
66201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66202    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66204    break 2
66205  fi
66206done
66207  done
66208IFS=$as_save_IFS
66209
66210  ;;
66211esac
66212fi
66213CCACHE=$ac_cv_path_CCACHE
66214if test -n "$CCACHE"; then
66215  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66216$as_echo "$CCACHE" >&6; }
66217else
66218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66219$as_echo "no" >&6; }
66220fi
66221
66222
66223          if test "x$CCACHE" = x; then
66224            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66225          fi
66226        else
66227          # Otherwise we believe it is a complete path. Use it as it is.
66228          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66229$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66230          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66231$as_echo_n "checking for CCACHE... " >&6; }
66232          if test ! -x "$tool_specified"; then
66233            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66234$as_echo "not found" >&6; }
66235            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66236          fi
66237          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66238$as_echo "$tool_specified" >&6; }
66239        fi
66240      fi
66241    fi
66242
66243  fi
66244
66245
66246
66247  if test "x$CCACHE" = x; then
66248    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66249  fi
66250
66251
66252      PATH="$OLD_PATH"
66253      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66254      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66255    else
66256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66257$as_echo "no" >&6; }
66258      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66259$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66260    fi
66261  elif test "x$enable_ccache" = xno; then
66262    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66263$as_echo "no, explicitly disabled" >&6; }
66264    CCACHE_STATUS="Disabled"
66265  elif test "x$enable_ccache" = x; then
66266    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66267$as_echo "no" >&6; }
66268  else
66269    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66270$as_echo "unknown" >&6; }
66271    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66272  fi
66273
66274
66275
66276# Check whether --with-ccache-dir was given.
66277if test "${with_ccache_dir+set}" = set; then :
66278  withval=$with_ccache_dir;
66279fi
66280
66281
66282  if test "x$with_ccache_dir" != x; then
66283    # When using a non home ccache directory, assume the use is to share ccache files
66284    # with other users. Thus change the umask.
66285    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66286    if test "x$CCACHE" = x; then
66287      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66288$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66289    fi
66290  fi
66291
66292  if test "x$CCACHE" != x; then
66293
66294  if test "x$CCACHE" != x; then
66295    if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
66296      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66297          $GREP -e '^1\.' -e '^2\.' -e '^3\.0\.' -e '^3\.1\.'`
66298      if test "x$HAS_BAD_CCACHE" != "x"; then
66299        as_fn_error $? "On macosx, ccache 3.2 or later is required, found $CCACHE_VERSION" "$LINENO" 5
66300      fi
66301    fi
66302    if test "x$USE_PRECOMPILED_HEADER" = "xtrue"; then
66303      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66304          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66305      if test "x$HAS_BAD_CCACHE" != "x"; then
66306        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66307      fi
66308      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66309$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66310      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66311      PUSHED_FLAGS="$CXXFLAGS"
66312      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66313      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66314/* end confdefs.h.  */
66315
66316int
66317main ()
66318{
66319
66320  ;
66321  return 0;
66322}
66323_ACEOF
66324if ac_fn_cxx_try_compile "$LINENO"; then :
66325  CC_KNOWS_CCACHE_TRICK=yes
66326else
66327  CC_KNOWS_CCACHE_TRICK=no
66328fi
66329rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66330      CXXFLAGS="$PUSHED_FLAGS"
66331      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66332        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66333$as_echo "yes" >&6; }
66334        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66335
66336        CCACHE_SLOPPINESS=pch_defines,time_macros
66337      else
66338        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66339$as_echo "no" >&6; }
66340        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66341      fi
66342    fi
66343
66344    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66345        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66346
66347    if test "x$SET_CCACHE_DIR" != x; then
66348      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66349      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66350    fi
66351  fi
66352
66353  fi
66354
66355
66356###############################################################################
66357#
66358# And now the finish...
66359#
66360###############################################################################
66361
66362# Check for some common pitfalls
66363
66364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66365    file_to_test="$SRC_ROOT/LICENSE"
66366    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66367      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
66368    fi
66369  fi
66370
66371
66372  # Did user specify any unknown variables?
66373
66374  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66375    # Replace the separating ! with spaces before presenting for end user.
66376    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66377    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66378$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66379  fi
66380
66381
66382  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66383$as_echo_n "checking if build directory is on local disk... " >&6; }
66384
66385  # df -l lists only local disks; if the given directory is not found then
66386  # a non-zero exit code is given
66387  if test "x$DF" = x; then
66388    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66389      # msys does not have df; use Windows "net use" instead.
66390      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66391      if test "x$IS_NETWORK_DISK" = x; then
66392        OUTPUT_DIR_IS_LOCAL="yes"
66393      else
66394        OUTPUT_DIR_IS_LOCAL="no"
66395      fi
66396    else
66397      # No df here, say it's local
66398      OUTPUT_DIR_IS_LOCAL="yes"
66399    fi
66400  else
66401    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66402      OUTPUT_DIR_IS_LOCAL="yes"
66403    else
66404      OUTPUT_DIR_IS_LOCAL="no"
66405    fi
66406  fi
66407
66408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66409$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66410
66411
66412
66413  # Check if the user has any old-style ALT_ variables set.
66414  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66415
66416  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66417  # Since we can't properly handle the dependencies for this, warn the user about the situation
66418  if test -e $OUTPUT_ROOT/spec.gmk; then
66419    IS_RECONFIGURE=yes
66420  else
66421    IS_RECONFIGURE=no
66422  fi
66423
66424
66425# At the end, call the custom hook. (Dummy macro if no custom sources available)
66426
66427
66428# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66429
66430  # Keep feature lists sorted and free of duplicates
66431  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66432  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66433  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66434  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66435  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66436  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66437  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66438
66439  # Validate features
66440  for variant in $JVM_VARIANTS; do
66441    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66442$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66443    features_var_name=JVM_FEATURES_$variant
66444    JVM_FEATURES_TO_TEST=${!features_var_name}
66445    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66446$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66447    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66448    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66449    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66450    if test "x$INVALID_FEATURES" != x; then
66451      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66452    fi
66453  done
66454
66455
66456# We're messing a bit with internal autoconf variables to put the config.status
66457# in the output directory instead of the current directory.
66458CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66459
66460# Create the actual output files. Now the main work of configure is done.
66461cat >confcache <<\_ACEOF
66462# This file is a shell script that caches the results of configure
66463# tests run on this system so they can be shared between configure
66464# scripts and configure runs, see configure's option --config-cache.
66465# It is not useful on other systems.  If it contains results you don't
66466# want to keep, you may remove or edit it.
66467#
66468# config.status only pays attention to the cache file if you give it
66469# the --recheck option to rerun configure.
66470#
66471# `ac_cv_env_foo' variables (set or unset) will be overridden when
66472# loading this file, other *unset* `ac_cv_foo' will be assigned the
66473# following values.
66474
66475_ACEOF
66476
66477# The following way of writing the cache mishandles newlines in values,
66478# but we know of no workaround that is simple, portable, and efficient.
66479# So, we kill variables containing newlines.
66480# Ultrix sh set writes to stderr and can't be redirected directly,
66481# and sets the high bit in the cache file unless we assign to the vars.
66482(
66483  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66484    eval ac_val=\$$ac_var
66485    case $ac_val in #(
66486    *${as_nl}*)
66487      case $ac_var in #(
66488      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66489$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66490      esac
66491      case $ac_var in #(
66492      _ | IFS | as_nl) ;; #(
66493      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66494      *) { eval $ac_var=; unset $ac_var;} ;;
66495      esac ;;
66496    esac
66497  done
66498
66499  (set) 2>&1 |
66500    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66501    *${as_nl}ac_space=\ *)
66502      # `set' does not quote correctly, so add quotes: double-quote
66503      # substitution turns \\\\ into \\, and sed turns \\ into \.
66504      sed -n \
66505	"s/'/'\\\\''/g;
66506	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66507      ;; #(
66508    *)
66509      # `set' quotes correctly as required by POSIX, so do not add quotes.
66510      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66511      ;;
66512    esac |
66513    sort
66514) |
66515  sed '
66516     /^ac_cv_env_/b end
66517     t clear
66518     :clear
66519     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66520     t end
66521     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66522     :end' >>confcache
66523if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66524  if test -w "$cache_file"; then
66525    if test "x$cache_file" != "x/dev/null"; then
66526      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66527$as_echo "$as_me: updating cache $cache_file" >&6;}
66528      if test ! -f "$cache_file" || test -h "$cache_file"; then
66529	cat confcache >"$cache_file"
66530      else
66531        case $cache_file in #(
66532        */* | ?:*)
66533	  mv -f confcache "$cache_file"$$ &&
66534	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66535        *)
66536	  mv -f confcache "$cache_file" ;;
66537	esac
66538      fi
66539    fi
66540  else
66541    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66542$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66543  fi
66544fi
66545rm -f confcache
66546
66547test "x$prefix" = xNONE && prefix=$ac_default_prefix
66548# Let make expand exec_prefix.
66549test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66550
66551# Transform confdefs.h into DEFS.
66552# Protect against shell expansion while executing Makefile rules.
66553# Protect against Makefile macro expansion.
66554#
66555# If the first sed substitution is executed (which looks for macros that
66556# take arguments), then branch to the quote section.  Otherwise,
66557# look for a macro that doesn't take arguments.
66558ac_script='
66559:mline
66560/\\$/{
66561 N
66562 s,\\\n,,
66563 b mline
66564}
66565t clear
66566:clear
66567s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66568t quote
66569s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66570t quote
66571b any
66572:quote
66573s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66574s/\[/\\&/g
66575s/\]/\\&/g
66576s/\$/$$/g
66577H
66578:any
66579${
66580	g
66581	s/^\n//
66582	s/\n/ /g
66583	p
66584}
66585'
66586DEFS=`sed -n "$ac_script" confdefs.h`
66587
66588
66589ac_libobjs=
66590ac_ltlibobjs=
66591U=
66592for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66593  # 1. Remove the extension, and $U if already installed.
66594  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66595  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66596  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66597  #    will be set to the directory where LIBOBJS objects are built.
66598  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66599  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66600done
66601LIBOBJS=$ac_libobjs
66602
66603LTLIBOBJS=$ac_ltlibobjs
66604
66605
66606
66607: "${CONFIG_STATUS=./config.status}"
66608ac_write_fail=0
66609ac_clean_files_save=$ac_clean_files
66610ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66611{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66612$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66613as_write_fail=0
66614cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66615#! $SHELL
66616# Generated by $as_me.
66617# Run this file to recreate the current configuration.
66618# Compiler output produced by configure, useful for debugging
66619# configure, is in config.log if it exists.
66620
66621debug=false
66622ac_cs_recheck=false
66623ac_cs_silent=false
66624
66625SHELL=\${CONFIG_SHELL-$SHELL}
66626export SHELL
66627_ASEOF
66628cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66629## -------------------- ##
66630## M4sh Initialization. ##
66631## -------------------- ##
66632
66633# Be more Bourne compatible
66634DUALCASE=1; export DUALCASE # for MKS sh
66635if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66636  emulate sh
66637  NULLCMD=:
66638  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66639  # is contrary to our usage.  Disable this feature.
66640  alias -g '${1+"$@"}'='"$@"'
66641  setopt NO_GLOB_SUBST
66642else
66643  case `(set -o) 2>/dev/null` in #(
66644  *posix*) :
66645    set -o posix ;; #(
66646  *) :
66647     ;;
66648esac
66649fi
66650
66651
66652as_nl='
66653'
66654export as_nl
66655# Printing a long string crashes Solaris 7 /usr/bin/printf.
66656as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66657as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66658as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66659# Prefer a ksh shell builtin over an external printf program on Solaris,
66660# but without wasting forks for bash or zsh.
66661if test -z "$BASH_VERSION$ZSH_VERSION" \
66662    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66663  as_echo='print -r --'
66664  as_echo_n='print -rn --'
66665elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66666  as_echo='printf %s\n'
66667  as_echo_n='printf %s'
66668else
66669  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66670    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66671    as_echo_n='/usr/ucb/echo -n'
66672  else
66673    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66674    as_echo_n_body='eval
66675      arg=$1;
66676      case $arg in #(
66677      *"$as_nl"*)
66678	expr "X$arg" : "X\\(.*\\)$as_nl";
66679	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66680      esac;
66681      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66682    '
66683    export as_echo_n_body
66684    as_echo_n='sh -c $as_echo_n_body as_echo'
66685  fi
66686  export as_echo_body
66687  as_echo='sh -c $as_echo_body as_echo'
66688fi
66689
66690# The user is always right.
66691if test "${PATH_SEPARATOR+set}" != set; then
66692  PATH_SEPARATOR=:
66693  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66694    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66695      PATH_SEPARATOR=';'
66696  }
66697fi
66698
66699
66700# IFS
66701# We need space, tab and new line, in precisely that order.  Quoting is
66702# there to prevent editors from complaining about space-tab.
66703# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66704# splitting by setting IFS to empty value.)
66705IFS=" ""	$as_nl"
66706
66707# Find who we are.  Look in the path if we contain no directory separator.
66708as_myself=
66709case $0 in #((
66710  *[\\/]* ) as_myself=$0 ;;
66711  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66712for as_dir in $PATH
66713do
66714  IFS=$as_save_IFS
66715  test -z "$as_dir" && as_dir=.
66716    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66717  done
66718IFS=$as_save_IFS
66719
66720     ;;
66721esac
66722# We did not find ourselves, most probably we were run as `sh COMMAND'
66723# in which case we are not to be found in the path.
66724if test "x$as_myself" = x; then
66725  as_myself=$0
66726fi
66727if test ! -f "$as_myself"; then
66728  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66729  exit 1
66730fi
66731
66732# Unset variables that we do not need and which cause bugs (e.g. in
66733# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66734# suppresses any "Segmentation fault" message there.  '((' could
66735# trigger a bug in pdksh 5.2.14.
66736for as_var in BASH_ENV ENV MAIL MAILPATH
66737do eval test x\${$as_var+set} = xset \
66738  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66739done
66740PS1='$ '
66741PS2='> '
66742PS4='+ '
66743
66744# NLS nuisances.
66745LC_ALL=C
66746export LC_ALL
66747LANGUAGE=C
66748export LANGUAGE
66749
66750# CDPATH.
66751(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66752
66753
66754# as_fn_error STATUS ERROR [LINENO LOG_FD]
66755# ----------------------------------------
66756# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66757# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66758# script with STATUS, using 1 if that was 0.
66759as_fn_error ()
66760{
66761  as_status=$1; test $as_status -eq 0 && as_status=1
66762  if test "$4"; then
66763    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66764    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66765  fi
66766  $as_echo "$as_me: error: $2" >&2
66767  as_fn_exit $as_status
66768} # as_fn_error
66769
66770
66771# as_fn_set_status STATUS
66772# -----------------------
66773# Set $? to STATUS, without forking.
66774as_fn_set_status ()
66775{
66776  return $1
66777} # as_fn_set_status
66778
66779# as_fn_exit STATUS
66780# -----------------
66781# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66782as_fn_exit ()
66783{
66784  set +e
66785  as_fn_set_status $1
66786  exit $1
66787} # as_fn_exit
66788
66789# as_fn_unset VAR
66790# ---------------
66791# Portably unset VAR.
66792as_fn_unset ()
66793{
66794  { eval $1=; unset $1;}
66795}
66796as_unset=as_fn_unset
66797# as_fn_append VAR VALUE
66798# ----------------------
66799# Append the text in VALUE to the end of the definition contained in VAR. Take
66800# advantage of any shell optimizations that allow amortized linear growth over
66801# repeated appends, instead of the typical quadratic growth present in naive
66802# implementations.
66803if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66804  eval 'as_fn_append ()
66805  {
66806    eval $1+=\$2
66807  }'
66808else
66809  as_fn_append ()
66810  {
66811    eval $1=\$$1\$2
66812  }
66813fi # as_fn_append
66814
66815# as_fn_arith ARG...
66816# ------------------
66817# Perform arithmetic evaluation on the ARGs, and store the result in the
66818# global $as_val. Take advantage of shells that can avoid forks. The arguments
66819# must be portable across $(()) and expr.
66820if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66821  eval 'as_fn_arith ()
66822  {
66823    as_val=$(( $* ))
66824  }'
66825else
66826  as_fn_arith ()
66827  {
66828    as_val=`expr "$@" || test $? -eq 1`
66829  }
66830fi # as_fn_arith
66831
66832
66833if expr a : '\(a\)' >/dev/null 2>&1 &&
66834   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66835  as_expr=expr
66836else
66837  as_expr=false
66838fi
66839
66840if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66841  as_basename=basename
66842else
66843  as_basename=false
66844fi
66845
66846if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66847  as_dirname=dirname
66848else
66849  as_dirname=false
66850fi
66851
66852as_me=`$as_basename -- "$0" ||
66853$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66854	 X"$0" : 'X\(//\)$' \| \
66855	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66856$as_echo X/"$0" |
66857    sed '/^.*\/\([^/][^/]*\)\/*$/{
66858	    s//\1/
66859	    q
66860	  }
66861	  /^X\/\(\/\/\)$/{
66862	    s//\1/
66863	    q
66864	  }
66865	  /^X\/\(\/\).*/{
66866	    s//\1/
66867	    q
66868	  }
66869	  s/.*/./; q'`
66870
66871# Avoid depending upon Character Ranges.
66872as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66873as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66874as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66875as_cr_digits='0123456789'
66876as_cr_alnum=$as_cr_Letters$as_cr_digits
66877
66878ECHO_C= ECHO_N= ECHO_T=
66879case `echo -n x` in #(((((
66880-n*)
66881  case `echo 'xy\c'` in
66882  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66883  xy)  ECHO_C='\c';;
66884  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66885       ECHO_T='	';;
66886  esac;;
66887*)
66888  ECHO_N='-n';;
66889esac
66890
66891rm -f conf$$ conf$$.exe conf$$.file
66892if test -d conf$$.dir; then
66893  rm -f conf$$.dir/conf$$.file
66894else
66895  rm -f conf$$.dir
66896  mkdir conf$$.dir 2>/dev/null
66897fi
66898if (echo >conf$$.file) 2>/dev/null; then
66899  if ln -s conf$$.file conf$$ 2>/dev/null; then
66900    as_ln_s='ln -s'
66901    # ... but there are two gotchas:
66902    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66903    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66904    # In both cases, we have to default to `cp -pR'.
66905    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66906      as_ln_s='cp -pR'
66907  elif ln conf$$.file conf$$ 2>/dev/null; then
66908    as_ln_s=ln
66909  else
66910    as_ln_s='cp -pR'
66911  fi
66912else
66913  as_ln_s='cp -pR'
66914fi
66915rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66916rmdir conf$$.dir 2>/dev/null
66917
66918
66919# as_fn_mkdir_p
66920# -------------
66921# Create "$as_dir" as a directory, including parents if necessary.
66922as_fn_mkdir_p ()
66923{
66924
66925  case $as_dir in #(
66926  -*) as_dir=./$as_dir;;
66927  esac
66928  test -d "$as_dir" || eval $as_mkdir_p || {
66929    as_dirs=
66930    while :; do
66931      case $as_dir in #(
66932      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66933      *) as_qdir=$as_dir;;
66934      esac
66935      as_dirs="'$as_qdir' $as_dirs"
66936      as_dir=`$as_dirname -- "$as_dir" ||
66937$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66938	 X"$as_dir" : 'X\(//\)[^/]' \| \
66939	 X"$as_dir" : 'X\(//\)$' \| \
66940	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66941$as_echo X"$as_dir" |
66942    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66943	    s//\1/
66944	    q
66945	  }
66946	  /^X\(\/\/\)[^/].*/{
66947	    s//\1/
66948	    q
66949	  }
66950	  /^X\(\/\/\)$/{
66951	    s//\1/
66952	    q
66953	  }
66954	  /^X\(\/\).*/{
66955	    s//\1/
66956	    q
66957	  }
66958	  s/.*/./; q'`
66959      test -d "$as_dir" && break
66960    done
66961    test -z "$as_dirs" || eval "mkdir $as_dirs"
66962  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66963
66964
66965} # as_fn_mkdir_p
66966if mkdir -p . 2>/dev/null; then
66967  as_mkdir_p='mkdir -p "$as_dir"'
66968else
66969  test -d ./-p && rmdir ./-p
66970  as_mkdir_p=false
66971fi
66972
66973
66974# as_fn_executable_p FILE
66975# -----------------------
66976# Test if FILE is an executable regular file.
66977as_fn_executable_p ()
66978{
66979  test -f "$1" && test -x "$1"
66980} # as_fn_executable_p
66981as_test_x='test -x'
66982as_executable_p=as_fn_executable_p
66983
66984# Sed expression to map a string onto a valid CPP name.
66985as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66986
66987# Sed expression to map a string onto a valid variable name.
66988as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66989
66990
66991exec 6>&1
66992## ----------------------------------- ##
66993## Main body of $CONFIG_STATUS script. ##
66994## ----------------------------------- ##
66995_ASEOF
66996test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66997
66998cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66999# Save the log message, to keep $0 and so on meaningful, and to
67000# report actual input values of CONFIG_FILES etc. instead of their
67001# values after options handling.
67002ac_log="
67003This file was extended by OpenJDK $as_me jdk9, which was
67004generated by GNU Autoconf 2.69.  Invocation command line was
67005
67006  CONFIG_FILES    = $CONFIG_FILES
67007  CONFIG_HEADERS  = $CONFIG_HEADERS
67008  CONFIG_LINKS    = $CONFIG_LINKS
67009  CONFIG_COMMANDS = $CONFIG_COMMANDS
67010  $ $0 $@
67011
67012on `(hostname || uname -n) 2>/dev/null | sed 1q`
67013"
67014
67015_ACEOF
67016
67017case $ac_config_files in *"
67018"*) set x $ac_config_files; shift; ac_config_files=$*;;
67019esac
67020
67021
67022
67023cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67024# Files that config.status was made for.
67025config_files="$ac_config_files"
67026
67027_ACEOF
67028
67029cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67030ac_cs_usage="\
67031\`$as_me' instantiates files and other configuration actions
67032from templates according to the current configuration.  Unless the files
67033and actions are specified as TAGs, all are instantiated by default.
67034
67035Usage: $0 [OPTION]... [TAG]...
67036
67037  -h, --help       print this help, then exit
67038  -V, --version    print version number and configuration settings, then exit
67039      --config     print configuration, then exit
67040  -q, --quiet, --silent
67041                   do not print progress messages
67042  -d, --debug      don't remove temporary files
67043      --recheck    update $as_me by reconfiguring in the same conditions
67044      --file=FILE[:TEMPLATE]
67045                   instantiate the configuration file FILE
67046
67047Configuration files:
67048$config_files
67049
67050Report bugs to <build-dev@openjdk.java.net>.
67051OpenJDK home page: <http://openjdk.java.net>."
67052
67053_ACEOF
67054cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67055ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67056ac_cs_version="\\
67057OpenJDK config.status jdk9
67058configured by $0, generated by GNU Autoconf 2.69,
67059  with options \\"\$ac_cs_config\\"
67060
67061Copyright (C) 2012 Free Software Foundation, Inc.
67062This config.status script is free software; the Free Software Foundation
67063gives unlimited permission to copy, distribute and modify it."
67064
67065ac_pwd='$ac_pwd'
67066srcdir='$srcdir'
67067AWK='$AWK'
67068test -n "\$AWK" || AWK=awk
67069_ACEOF
67070
67071cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67072# The default lists apply if the user does not specify any file.
67073ac_need_defaults=:
67074while test $# != 0
67075do
67076  case $1 in
67077  --*=?*)
67078    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67079    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67080    ac_shift=:
67081    ;;
67082  --*=)
67083    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67084    ac_optarg=
67085    ac_shift=:
67086    ;;
67087  *)
67088    ac_option=$1
67089    ac_optarg=$2
67090    ac_shift=shift
67091    ;;
67092  esac
67093
67094  case $ac_option in
67095  # Handling of the options.
67096  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67097    ac_cs_recheck=: ;;
67098  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67099    $as_echo "$ac_cs_version"; exit ;;
67100  --config | --confi | --conf | --con | --co | --c )
67101    $as_echo "$ac_cs_config"; exit ;;
67102  --debug | --debu | --deb | --de | --d | -d )
67103    debug=: ;;
67104  --file | --fil | --fi | --f )
67105    $ac_shift
67106    case $ac_optarg in
67107    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67108    '') as_fn_error $? "missing file argument" ;;
67109    esac
67110    as_fn_append CONFIG_FILES " '$ac_optarg'"
67111    ac_need_defaults=false;;
67112  --he | --h |  --help | --hel | -h )
67113    $as_echo "$ac_cs_usage"; exit ;;
67114  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67115  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67116    ac_cs_silent=: ;;
67117
67118  # This is an error.
67119  -*) as_fn_error $? "unrecognized option: \`$1'
67120Try \`$0 --help' for more information." ;;
67121
67122  *) as_fn_append ac_config_targets " $1"
67123     ac_need_defaults=false ;;
67124
67125  esac
67126  shift
67127done
67128
67129ac_configure_extra_args=
67130
67131if $ac_cs_silent; then
67132  exec 6>/dev/null
67133  ac_configure_extra_args="$ac_configure_extra_args --silent"
67134fi
67135
67136_ACEOF
67137cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67138if \$ac_cs_recheck; then
67139  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67140  shift
67141  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67142  CONFIG_SHELL='$SHELL'
67143  export CONFIG_SHELL
67144  exec "\$@"
67145fi
67146
67147_ACEOF
67148cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67149exec 5>>config.log
67150{
67151  echo
67152  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67153## Running $as_me. ##
67154_ASBOX
67155  $as_echo "$ac_log"
67156} >&5
67157
67158_ACEOF
67159cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67160_ACEOF
67161
67162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67163
67164# Handling of arguments.
67165for ac_config_target in $ac_config_targets
67166do
67167  case $ac_config_target in
67168    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67169    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67170    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67171    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67172    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67173
67174  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67175  esac
67176done
67177
67178
67179# If the user did not use the arguments to specify the items to instantiate,
67180# then the envvar interface is used.  Set only those that are not.
67181# We use the long form for the default assignment because of an extremely
67182# bizarre bug on SunOS 4.1.3.
67183if $ac_need_defaults; then
67184  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67185fi
67186
67187# Have a temporary directory for convenience.  Make it in the build tree
67188# simply because there is no reason against having it here, and in addition,
67189# creating and moving files from /tmp can sometimes cause problems.
67190# Hook for its removal unless debugging.
67191# Note that there is a small window in which the directory will not be cleaned:
67192# after its creation but before its name has been assigned to `$tmp'.
67193$debug ||
67194{
67195  tmp= ac_tmp=
67196  trap 'exit_status=$?
67197  : "${ac_tmp:=$tmp}"
67198  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67199' 0
67200  trap 'as_fn_exit 1' 1 2 13 15
67201}
67202# Create a (secure) tmp directory for tmp files.
67203
67204{
67205  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67206  test -d "$tmp"
67207}  ||
67208{
67209  tmp=./conf$$-$RANDOM
67210  (umask 077 && mkdir "$tmp")
67211} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67212ac_tmp=$tmp
67213
67214# Set up the scripts for CONFIG_FILES section.
67215# No need to generate them if there are no CONFIG_FILES.
67216# This happens for instance with `./config.status config.h'.
67217if test -n "$CONFIG_FILES"; then
67218
67219
67220ac_cr=`echo X | tr X '\015'`
67221# On cygwin, bash can eat \r inside `` if the user requested igncr.
67222# But we know of no other shell where ac_cr would be empty at this
67223# point, so we can use a bashism as a fallback.
67224if test "x$ac_cr" = x; then
67225  eval ac_cr=\$\'\\r\'
67226fi
67227ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67228if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67229  ac_cs_awk_cr='\\r'
67230else
67231  ac_cs_awk_cr=$ac_cr
67232fi
67233
67234echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67235_ACEOF
67236
67237
67238{
67239  echo "cat >conf$$subs.awk <<_ACEOF" &&
67240  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67241  echo "_ACEOF"
67242} >conf$$subs.sh ||
67243  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67244ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67245ac_delim='%!_!# '
67246for ac_last_try in false false false false false :; do
67247  . ./conf$$subs.sh ||
67248    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67249
67250  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67251  if test $ac_delim_n = $ac_delim_num; then
67252    break
67253  elif $ac_last_try; then
67254    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67255  else
67256    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67257  fi
67258done
67259rm -f conf$$subs.sh
67260
67261cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67262cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67263_ACEOF
67264sed -n '
67265h
67266s/^/S["/; s/!.*/"]=/
67267p
67268g
67269s/^[^!]*!//
67270:repl
67271t repl
67272s/'"$ac_delim"'$//
67273t delim
67274:nl
67275h
67276s/\(.\{148\}\)..*/\1/
67277t more1
67278s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67279p
67280n
67281b repl
67282:more1
67283s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67284p
67285g
67286s/.\{148\}//
67287t nl
67288:delim
67289h
67290s/\(.\{148\}\)..*/\1/
67291t more2
67292s/["\\]/\\&/g; s/^/"/; s/$/"/
67293p
67294b
67295:more2
67296s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67297p
67298g
67299s/.\{148\}//
67300t delim
67301' <conf$$subs.awk | sed '
67302/^[^""]/{
67303  N
67304  s/\n//
67305}
67306' >>$CONFIG_STATUS || ac_write_fail=1
67307rm -f conf$$subs.awk
67308cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67309_ACAWK
67310cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67311  for (key in S) S_is_set[key] = 1
67312  FS = ""
67313
67314}
67315{
67316  line = $ 0
67317  nfields = split(line, field, "@")
67318  substed = 0
67319  len = length(field[1])
67320  for (i = 2; i < nfields; i++) {
67321    key = field[i]
67322    keylen = length(key)
67323    if (S_is_set[key]) {
67324      value = S[key]
67325      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67326      len += length(value) + length(field[++i])
67327      substed = 1
67328    } else
67329      len += 1 + keylen
67330  }
67331
67332  print line
67333}
67334
67335_ACAWK
67336_ACEOF
67337cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67338if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67339  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67340else
67341  cat
67342fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67343  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67344_ACEOF
67345
67346# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67347# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67348# trailing colons and then remove the whole line if VPATH becomes empty
67349# (actually we leave an empty line to preserve line numbers).
67350if test "x$srcdir" = x.; then
67351  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67352h
67353s///
67354s/^/:/
67355s/[	 ]*$/:/
67356s/:\$(srcdir):/:/g
67357s/:\${srcdir}:/:/g
67358s/:@srcdir@:/:/g
67359s/^:*//
67360s/:*$//
67361x
67362s/\(=[	 ]*\).*/\1/
67363G
67364s/\n//
67365s/^[^=]*=[	 ]*$//
67366}'
67367fi
67368
67369cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67370fi # test -n "$CONFIG_FILES"
67371
67372
67373eval set X "  :F $CONFIG_FILES      "
67374shift
67375for ac_tag
67376do
67377  case $ac_tag in
67378  :[FHLC]) ac_mode=$ac_tag; continue;;
67379  esac
67380  case $ac_mode$ac_tag in
67381  :[FHL]*:*);;
67382  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67383  :[FH]-) ac_tag=-:-;;
67384  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67385  esac
67386  ac_save_IFS=$IFS
67387  IFS=:
67388  set x $ac_tag
67389  IFS=$ac_save_IFS
67390  shift
67391  ac_file=$1
67392  shift
67393
67394  case $ac_mode in
67395  :L) ac_source=$1;;
67396  :[FH])
67397    ac_file_inputs=
67398    for ac_f
67399    do
67400      case $ac_f in
67401      -) ac_f="$ac_tmp/stdin";;
67402      *) # Look for the file first in the build tree, then in the source tree
67403	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67404	 # because $ac_f cannot contain `:'.
67405	 test -f "$ac_f" ||
67406	   case $ac_f in
67407	   [\\/$]*) false;;
67408	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67409	   esac ||
67410	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67411      esac
67412      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67413      as_fn_append ac_file_inputs " '$ac_f'"
67414    done
67415
67416    # Let's still pretend it is `configure' which instantiates (i.e., don't
67417    # use $as_me), people would be surprised to read:
67418    #    /* config.h.  Generated by config.status.  */
67419    configure_input='Generated from '`
67420	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67421	`' by configure.'
67422    if test x"$ac_file" != x-; then
67423      configure_input="$ac_file.  $configure_input"
67424      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67425$as_echo "$as_me: creating $ac_file" >&6;}
67426    fi
67427    # Neutralize special characters interpreted by sed in replacement strings.
67428    case $configure_input in #(
67429    *\&* | *\|* | *\\* )
67430       ac_sed_conf_input=`$as_echo "$configure_input" |
67431       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67432    *) ac_sed_conf_input=$configure_input;;
67433    esac
67434
67435    case $ac_tag in
67436    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67437      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67438    esac
67439    ;;
67440  esac
67441
67442  ac_dir=`$as_dirname -- "$ac_file" ||
67443$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67444	 X"$ac_file" : 'X\(//\)[^/]' \| \
67445	 X"$ac_file" : 'X\(//\)$' \| \
67446	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67447$as_echo X"$ac_file" |
67448    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67449	    s//\1/
67450	    q
67451	  }
67452	  /^X\(\/\/\)[^/].*/{
67453	    s//\1/
67454	    q
67455	  }
67456	  /^X\(\/\/\)$/{
67457	    s//\1/
67458	    q
67459	  }
67460	  /^X\(\/\).*/{
67461	    s//\1/
67462	    q
67463	  }
67464	  s/.*/./; q'`
67465  as_dir="$ac_dir"; as_fn_mkdir_p
67466  ac_builddir=.
67467
67468case "$ac_dir" in
67469.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67470*)
67471  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67472  # A ".." for each directory in $ac_dir_suffix.
67473  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67474  case $ac_top_builddir_sub in
67475  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67476  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67477  esac ;;
67478esac
67479ac_abs_top_builddir=$ac_pwd
67480ac_abs_builddir=$ac_pwd$ac_dir_suffix
67481# for backward compatibility:
67482ac_top_builddir=$ac_top_build_prefix
67483
67484case $srcdir in
67485  .)  # We are building in place.
67486    ac_srcdir=.
67487    ac_top_srcdir=$ac_top_builddir_sub
67488    ac_abs_top_srcdir=$ac_pwd ;;
67489  [\\/]* | ?:[\\/]* )  # Absolute name.
67490    ac_srcdir=$srcdir$ac_dir_suffix;
67491    ac_top_srcdir=$srcdir
67492    ac_abs_top_srcdir=$srcdir ;;
67493  *) # Relative name.
67494    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67495    ac_top_srcdir=$ac_top_build_prefix$srcdir
67496    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67497esac
67498ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67499
67500
67501  case $ac_mode in
67502  :F)
67503  #
67504  # CONFIG_FILE
67505  #
67506
67507_ACEOF
67508
67509cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67510# If the template does not know about datarootdir, expand it.
67511# FIXME: This hack should be removed a few years after 2.60.
67512ac_datarootdir_hack=; ac_datarootdir_seen=
67513ac_sed_dataroot='
67514/datarootdir/ {
67515  p
67516  q
67517}
67518/@datadir@/p
67519/@docdir@/p
67520/@infodir@/p
67521/@localedir@/p
67522/@mandir@/p'
67523case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67524*datarootdir*) ac_datarootdir_seen=yes;;
67525*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67526  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67527$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67528_ACEOF
67529cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67530  ac_datarootdir_hack='
67531  s&@datadir@&$datadir&g
67532  s&@docdir@&$docdir&g
67533  s&@infodir@&$infodir&g
67534  s&@localedir@&$localedir&g
67535  s&@mandir@&$mandir&g
67536  s&\\\${datarootdir}&$datarootdir&g' ;;
67537esac
67538_ACEOF
67539
67540# Neutralize VPATH when `$srcdir' = `.'.
67541# Shell code in configure.ac might set extrasub.
67542# FIXME: do we really want to maintain this feature?
67543cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67544ac_sed_extra="$ac_vpsub
67545$extrasub
67546_ACEOF
67547cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67548:t
67549/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67550s|@configure_input@|$ac_sed_conf_input|;t t
67551s&@top_builddir@&$ac_top_builddir_sub&;t t
67552s&@top_build_prefix@&$ac_top_build_prefix&;t t
67553s&@srcdir@&$ac_srcdir&;t t
67554s&@abs_srcdir@&$ac_abs_srcdir&;t t
67555s&@top_srcdir@&$ac_top_srcdir&;t t
67556s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67557s&@builddir@&$ac_builddir&;t t
67558s&@abs_builddir@&$ac_abs_builddir&;t t
67559s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67560$ac_datarootdir_hack
67561"
67562eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67563  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67564
67565test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67566  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67567  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67568      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67569  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67570which seems to be undefined.  Please make sure it is defined" >&5
67571$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67572which seems to be undefined.  Please make sure it is defined" >&2;}
67573
67574  rm -f "$ac_tmp/stdin"
67575  case $ac_file in
67576  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67577  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67578  esac \
67579  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67580 ;;
67581
67582
67583
67584  esac
67585
67586done # for ac_tag
67587
67588
67589as_fn_exit 0
67590_ACEOF
67591ac_clean_files=$ac_clean_files_save
67592
67593test $ac_write_fail = 0 ||
67594  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67595
67596
67597# configure is writing to config.log, and then calls config.status.
67598# config.status does its own redirection, appending to config.log.
67599# Unfortunately, on DOS this fails, as config.log is still kept open
67600# by configure, so config.status won't be able to write to it; its
67601# output is simply discarded.  So we exec the FD to /dev/null,
67602# effectively closing config.log, so it can be properly (re)opened and
67603# appended to by config.status.  When coming back to configure, we
67604# need to make the FD available again.
67605if test "$no_create" != yes; then
67606  ac_cs_success=:
67607  ac_config_status_args=
67608  test "$silent" = yes &&
67609    ac_config_status_args="$ac_config_status_args --quiet"
67610  exec 5>/dev/null
67611  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67612  exec 5>>config.log
67613  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67614  # would make configure fail if this is the last instruction.
67615  $ac_cs_success || as_fn_exit 1
67616fi
67617if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67618  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67619$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67620fi
67621
67622
67623# After AC_OUTPUT, we need to do final work
67624
67625
67626  # Try to move config.log (generated by autoconf) to the configure-support directory.
67627  if test -e ./config.log; then
67628    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67629  fi
67630
67631  # Rotate our log file (configure.log)
67632  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67633    $RM -f "$OUTPUT_ROOT/configure.log.old"
67634  fi
67635  if test -e "$OUTPUT_ROOT/configure.log"; then
67636    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67637  fi
67638
67639  # Move configure.log from current directory to the build output root
67640  if test -e ./configure.log; then
67641    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67642  fi
67643
67644  # Make the compare script executable
67645  $CHMOD +x $OUTPUT_ROOT/compare.sh
67646
67647
67648# Finally output some useful information to the user
67649
67650  # Finally output some useful information to the user
67651
67652  printf "\n"
67653  printf "====================================================\n"
67654  if test "x$no_create" != "xyes"; then
67655    if test "x$IS_RECONFIGURE" != "xyes"; then
67656      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67657    else
67658      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67659    fi
67660  else
67661    if test "x$IS_RECONFIGURE" != "xyes"; then
67662      printf "A configuration has been successfully checked but not created\n"
67663    else
67664      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67665    fi
67666  fi
67667  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67668    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67669  else
67670    printf "using default settings.\n"
67671  fi
67672
67673  printf "\n"
67674  printf "Configuration summary:\n"
67675  printf "* Debug level:    $DEBUG_LEVEL\n"
67676  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67677  printf "* JDK variant:    $JDK_VARIANT\n"
67678  printf "* JVM variants:   $JVM_VARIANTS\n"
67679  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67680  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67681
67682  printf "\n"
67683  printf "Tools summary:\n"
67684  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67685    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67686  fi
67687  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67688  if test "x$TOOLCHAIN_VERSION" != "x"; then
67689    print_version=" $TOOLCHAIN_VERSION"
67690  fi
67691  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67692  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67693  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67694
67695  printf "\n"
67696  printf "Build performance summary:\n"
67697  printf "* Cores to use:   $JOBS\n"
67698  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67699  if test "x$CCACHE_STATUS" != "x"; then
67700    printf "* ccache status:  $CCACHE_STATUS\n"
67701  fi
67702  printf "\n"
67703
67704  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67705    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67706    printf "will result in longer build times.\n"
67707    printf "\n"
67708  fi
67709
67710  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67711    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67712    printf "These are not respected, and will be ignored. It is recommended\n"
67713    printf "that you clean your environment. The following variables are set:\n"
67714    printf "$FOUND_ALT_VARIABLES\n"
67715    printf "\n"
67716  fi
67717
67718  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67719    printf "WARNING: Your build output directory is not on a local disk.\n"
67720    printf "This will severely degrade build performance!\n"
67721    printf "It is recommended that you create an output directory on a local disk,\n"
67722    printf "and run the configure script again from that directory.\n"
67723    printf "\n"
67724  fi
67725
67726  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67727    printf "WARNING: The result of this configuration has overridden an older\n"
67728    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67729    printf "proper build. Failure to do so might result in strange build problems.\n"
67730    printf "\n"
67731  fi
67732
67733  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67734    printf "WARNING: The result of this configuration was not saved.\n"
67735    printf "You should run without '--no-create | -n' to create the configuration.\n"
67736    printf "\n"
67737  fi
67738
67739
67740
67741  # Locate config.log.
67742  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67743    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67744  elif test -e "./config.log"; then
67745    CONFIG_LOG_PATH="."
67746  fi
67747
67748  if test -e "$CONFIG_LOG_PATH/config.log"; then
67749    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67750    if test $? -eq 0; then
67751      printf "The following warnings were produced. Repeated here for convenience:\n"
67752      # We must quote sed expression (using []) to stop m4 from eating the [].
67753      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67754      printf "\n"
67755    fi
67756  fi
67757
67758