generated-configure.sh revision 2199:8626b4558efc
1#!/bin/bash
2#
3# ##########################################################
4# ### THIS FILE IS AUTOMATICALLY GENERATED. DO NOT EDIT. ###
5# ##########################################################
6#
7#! /bin/sh
8# Guess values for system-dependent variables and create Makefiles.
9# Generated by GNU Autoconf 2.69 for OpenJDK jdk9.
10#
11# Report bugs to <build-dev@openjdk.java.net>.
12#
13#
14# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
15#
16#
17# This configure script is free software; the Free Software Foundation
18# gives unlimited permission to copy, distribute and modify it.
19## -------------------- ##
20## M4sh Initialization. ##
21## -------------------- ##
22
23# Be more Bourne compatible
24DUALCASE=1; export DUALCASE # for MKS sh
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
26  emulate sh
27  NULLCMD=:
28  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
29  # is contrary to our usage.  Disable this feature.
30  alias -g '${1+"$@"}'='"$@"'
31  setopt NO_GLOB_SUBST
32else
33  case `(set -o) 2>/dev/null` in #(
34  *posix*) :
35    set -o posix ;; #(
36  *) :
37     ;;
38esac
39fi
40
41
42as_nl='
43'
44export as_nl
45# Printing a long string crashes Solaris 7 /usr/bin/printf.
46as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
47as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
48as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
49# Prefer a ksh shell builtin over an external printf program on Solaris,
50# but without wasting forks for bash or zsh.
51if test -z "$BASH_VERSION$ZSH_VERSION" \
52    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
53  as_echo='print -r --'
54  as_echo_n='print -rn --'
55elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
56  as_echo='printf %s\n'
57  as_echo_n='printf %s'
58else
59  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
60    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
61    as_echo_n='/usr/ucb/echo -n'
62  else
63    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
64    as_echo_n_body='eval
65      arg=$1;
66      case $arg in #(
67      *"$as_nl"*)
68	expr "X$arg" : "X\\(.*\\)$as_nl";
69	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
70      esac;
71      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
72    '
73    export as_echo_n_body
74    as_echo_n='sh -c $as_echo_n_body as_echo'
75  fi
76  export as_echo_body
77  as_echo='sh -c $as_echo_body as_echo'
78fi
79
80# The user is always right.
81if test "${PATH_SEPARATOR+set}" != set; then
82  PATH_SEPARATOR=:
83  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
84    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
85      PATH_SEPARATOR=';'
86  }
87fi
88
89
90# IFS
91# We need space, tab and new line, in precisely that order.  Quoting is
92# there to prevent editors from complaining about space-tab.
93# (If _AS_PATH_WALK were called with IFS unset, it would disable word
94# splitting by setting IFS to empty value.)
95IFS=" ""	$as_nl"
96
97# Find who we are.  Look in the path if we contain no directory separator.
98as_myself=
99case $0 in #((
100  *[\\/]* ) as_myself=$0 ;;
101  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
102for as_dir in $PATH
103do
104  IFS=$as_save_IFS
105  test -z "$as_dir" && as_dir=.
106    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
107  done
108IFS=$as_save_IFS
109
110     ;;
111esac
112# We did not find ourselves, most probably we were run as `sh COMMAND'
113# in which case we are not to be found in the path.
114if test "x$as_myself" = x; then
115  as_myself=$0
116fi
117if test ! -f "$as_myself"; then
118  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
119  exit 1
120fi
121
122# Unset variables that we do not need and which cause bugs (e.g. in
123# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
124# suppresses any "Segmentation fault" message there.  '((' could
125# trigger a bug in pdksh 5.2.14.
126for as_var in BASH_ENV ENV MAIL MAILPATH
127do eval test x\${$as_var+set} = xset \
128  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
129done
130PS1='$ '
131PS2='> '
132PS4='+ '
133
134# NLS nuisances.
135LC_ALL=C
136export LC_ALL
137LANGUAGE=C
138export LANGUAGE
139
140# CDPATH.
141(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
142
143# Use a proper internal environment variable to ensure we don't fall
144  # into an infinite loop, continuously re-executing ourselves.
145  if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then
146    _as_can_reexec=no; export _as_can_reexec;
147    # We cannot yet assume a decent shell, so we have to provide a
148# neutralization value for shells without unset; and this also
149# works around shells that cannot unset nonexistent variables.
150# Preserve -v and -x to the replacement shell.
151BASH_ENV=/dev/null
152ENV=/dev/null
153(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
154case $- in # ((((
155  *v*x* | *x*v* ) as_opts=-vx ;;
156  *v* ) as_opts=-v ;;
157  *x* ) as_opts=-x ;;
158  * ) as_opts= ;;
159esac
160exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
161# Admittedly, this is quite paranoid, since all the known shells bail
162# out after a failed `exec'.
163$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
164as_fn_exit 255
165  fi
166  # We don't want this to propagate to other subprocesses.
167          { _as_can_reexec=; unset _as_can_reexec;}
168if test "x$CONFIG_SHELL" = x; then
169  as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then :
170  emulate sh
171  NULLCMD=:
172  # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which
173  # is contrary to our usage.  Disable this feature.
174  alias -g '\${1+\"\$@\"}'='\"\$@\"'
175  setopt NO_GLOB_SUBST
176else
177  case \`(set -o) 2>/dev/null\` in #(
178  *posix*) :
179    set -o posix ;; #(
180  *) :
181     ;;
182esac
183fi
184"
185  as_required="as_fn_return () { (exit \$1); }
186as_fn_success () { as_fn_return 0; }
187as_fn_failure () { as_fn_return 1; }
188as_fn_ret_success () { return 0; }
189as_fn_ret_failure () { return 1; }
190
191exitcode=0
192as_fn_success || { exitcode=1; echo as_fn_success failed.; }
193as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; }
194as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; }
195as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; }
196if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then :
197
198else
199  exitcode=1; echo positional parameters were not saved.
200fi
201test x\$exitcode = x0 || exit 1
202test -x / || exit 1"
203  as_suggested="  as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO
204  as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO
205  eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" &&
206  test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1
207test \$(( 1 + 1 )) = 2 || exit 1"
208  if (eval "$as_required") 2>/dev/null; then :
209  as_have_required=yes
210else
211  as_have_required=no
212fi
213  if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then :
214
215else
216  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
217as_found=false
218for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
219do
220  IFS=$as_save_IFS
221  test -z "$as_dir" && as_dir=.
222  as_found=:
223  case $as_dir in #(
224	 /*)
225	   for as_base in sh bash ksh sh5; do
226	     # Try only shells that exist, to save several forks.
227	     as_shell=$as_dir/$as_base
228	     if { test -f "$as_shell" || test -f "$as_shell.exe"; } &&
229		    { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then :
230  CONFIG_SHELL=$as_shell as_have_required=yes
231		   if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then :
232  break 2
233fi
234fi
235	   done;;
236       esac
237  as_found=false
238done
239$as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } &&
240	      { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then :
241  CONFIG_SHELL=$SHELL as_have_required=yes
242fi; }
243IFS=$as_save_IFS
244
245
246      if test "x$CONFIG_SHELL" != x; then :
247  export CONFIG_SHELL
248             # We cannot yet assume a decent shell, so we have to provide a
249# neutralization value for shells without unset; and this also
250# works around shells that cannot unset nonexistent variables.
251# Preserve -v and -x to the replacement shell.
252BASH_ENV=/dev/null
253ENV=/dev/null
254(unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV
255case $- in # ((((
256  *v*x* | *x*v* ) as_opts=-vx ;;
257  *v* ) as_opts=-v ;;
258  *x* ) as_opts=-x ;;
259  * ) as_opts= ;;
260esac
261exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"}
262# Admittedly, this is quite paranoid, since all the known shells bail
263# out after a failed `exec'.
264$as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2
265exit 255
266fi
267
268    if test x$as_have_required = xno; then :
269  $as_echo "$0: This script requires a shell more modern than all"
270  $as_echo "$0: the shells that I found on your system."
271  if test x${ZSH_VERSION+set} = xset ; then
272    $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should"
273    $as_echo "$0: be upgraded to zsh 4.3.4 or later."
274  else
275    $as_echo "$0: Please tell bug-autoconf@gnu.org and
276$0: build-dev@openjdk.java.net about your system, including
277$0: any error possibly output before this message. Then
278$0: install a modern shell, or manually run the script
279$0: under such a shell if you do have one."
280  fi
281  exit 1
282fi
283fi
284fi
285SHELL=${CONFIG_SHELL-/bin/sh}
286export SHELL
287# Unset more variables known to interfere with behavior of common tools.
288CLICOLOR_FORCE= GREP_OPTIONS=
289unset CLICOLOR_FORCE GREP_OPTIONS
290
291## --------------------- ##
292## M4sh Shell Functions. ##
293## --------------------- ##
294# as_fn_unset VAR
295# ---------------
296# Portably unset VAR.
297as_fn_unset ()
298{
299  { eval $1=; unset $1;}
300}
301as_unset=as_fn_unset
302
303# as_fn_set_status STATUS
304# -----------------------
305# Set $? to STATUS, without forking.
306as_fn_set_status ()
307{
308  return $1
309} # as_fn_set_status
310
311# as_fn_exit STATUS
312# -----------------
313# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
314as_fn_exit ()
315{
316  set +e
317  as_fn_set_status $1
318  exit $1
319} # as_fn_exit
320
321# as_fn_mkdir_p
322# -------------
323# Create "$as_dir" as a directory, including parents if necessary.
324as_fn_mkdir_p ()
325{
326
327  case $as_dir in #(
328  -*) as_dir=./$as_dir;;
329  esac
330  test -d "$as_dir" || eval $as_mkdir_p || {
331    as_dirs=
332    while :; do
333      case $as_dir in #(
334      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
335      *) as_qdir=$as_dir;;
336      esac
337      as_dirs="'$as_qdir' $as_dirs"
338      as_dir=`$as_dirname -- "$as_dir" ||
339$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
340	 X"$as_dir" : 'X\(//\)[^/]' \| \
341	 X"$as_dir" : 'X\(//\)$' \| \
342	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
343$as_echo X"$as_dir" |
344    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
345	    s//\1/
346	    q
347	  }
348	  /^X\(\/\/\)[^/].*/{
349	    s//\1/
350	    q
351	  }
352	  /^X\(\/\/\)$/{
353	    s//\1/
354	    q
355	  }
356	  /^X\(\/\).*/{
357	    s//\1/
358	    q
359	  }
360	  s/.*/./; q'`
361      test -d "$as_dir" && break
362    done
363    test -z "$as_dirs" || eval "mkdir $as_dirs"
364  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
365
366
367} # as_fn_mkdir_p
368
369# as_fn_executable_p FILE
370# -----------------------
371# Test if FILE is an executable regular file.
372as_fn_executable_p ()
373{
374  test -f "$1" && test -x "$1"
375} # as_fn_executable_p
376# as_fn_append VAR VALUE
377# ----------------------
378# Append the text in VALUE to the end of the definition contained in VAR. Take
379# advantage of any shell optimizations that allow amortized linear growth over
380# repeated appends, instead of the typical quadratic growth present in naive
381# implementations.
382if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
383  eval 'as_fn_append ()
384  {
385    eval $1+=\$2
386  }'
387else
388  as_fn_append ()
389  {
390    eval $1=\$$1\$2
391  }
392fi # as_fn_append
393
394# as_fn_arith ARG...
395# ------------------
396# Perform arithmetic evaluation on the ARGs, and store the result in the
397# global $as_val. Take advantage of shells that can avoid forks. The arguments
398# must be portable across $(()) and expr.
399if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
400  eval 'as_fn_arith ()
401  {
402    as_val=$(( $* ))
403  }'
404else
405  as_fn_arith ()
406  {
407    as_val=`expr "$@" || test $? -eq 1`
408  }
409fi # as_fn_arith
410
411
412# as_fn_error STATUS ERROR [LINENO LOG_FD]
413# ----------------------------------------
414# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
415# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
416# script with STATUS, using 1 if that was 0.
417as_fn_error ()
418{
419  as_status=$1; test $as_status -eq 0 && as_status=1
420  if test "$4"; then
421    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
422    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
423  fi
424  $as_echo "$as_me: error: $2" >&2
425  as_fn_exit $as_status
426} # as_fn_error
427
428if expr a : '\(a\)' >/dev/null 2>&1 &&
429   test "X`expr 00001 : '.*\(...\)'`" = X001; then
430  as_expr=expr
431else
432  as_expr=false
433fi
434
435if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
436  as_basename=basename
437else
438  as_basename=false
439fi
440
441if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
442  as_dirname=dirname
443else
444  as_dirname=false
445fi
446
447as_me=`$as_basename -- "$0" ||
448$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
449	 X"$0" : 'X\(//\)$' \| \
450	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
451$as_echo X/"$0" |
452    sed '/^.*\/\([^/][^/]*\)\/*$/{
453	    s//\1/
454	    q
455	  }
456	  /^X\/\(\/\/\)$/{
457	    s//\1/
458	    q
459	  }
460	  /^X\/\(\/\).*/{
461	    s//\1/
462	    q
463	  }
464	  s/.*/./; q'`
465
466# Avoid depending upon Character Ranges.
467as_cr_letters='abcdefghijklmnopqrstuvwxyz'
468as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
469as_cr_Letters=$as_cr_letters$as_cr_LETTERS
470as_cr_digits='0123456789'
471as_cr_alnum=$as_cr_Letters$as_cr_digits
472
473
474  as_lineno_1=$LINENO as_lineno_1a=$LINENO
475  as_lineno_2=$LINENO as_lineno_2a=$LINENO
476  eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" &&
477  test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || {
478  # Blame Lee E. McMahon (1931-1989) for sed's syntax.  :-)
479  sed -n '
480    p
481    /[$]LINENO/=
482  ' <$as_myself |
483    sed '
484      s/[$]LINENO.*/&-/
485      t lineno
486      b
487      :lineno
488      N
489      :loop
490      s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/
491      t loop
492      s/-\n.*//
493    ' >$as_me.lineno &&
494  chmod +x "$as_me.lineno" ||
495    { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; }
496
497  # If we had to re-execute with $CONFIG_SHELL, we're ensured to have
498  # already done that, so ensure we don't try to do so again and fall
499  # in an infinite loop.  This has already happened in practice.
500  _as_can_reexec=no; export _as_can_reexec
501  # Don't try to exec as it changes $[0], causing all sort of problems
502  # (the dirname of $[0] is not the place where we might find the
503  # original and so on.  Autoconf is especially sensitive to this).
504  . "./$as_me.lineno"
505  # Exit status is that of the last command.
506  exit
507}
508
509ECHO_C= ECHO_N= ECHO_T=
510case `echo -n x` in #(((((
511-n*)
512  case `echo 'xy\c'` in
513  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
514  xy)  ECHO_C='\c';;
515  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
516       ECHO_T='	';;
517  esac;;
518*)
519  ECHO_N='-n';;
520esac
521
522rm -f conf$$ conf$$.exe conf$$.file
523if test -d conf$$.dir; then
524  rm -f conf$$.dir/conf$$.file
525else
526  rm -f conf$$.dir
527  mkdir conf$$.dir 2>/dev/null
528fi
529if (echo >conf$$.file) 2>/dev/null; then
530  if ln -s conf$$.file conf$$ 2>/dev/null; then
531    as_ln_s='ln -s'
532    # ... but there are two gotchas:
533    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
534    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
535    # In both cases, we have to default to `cp -pR'.
536    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
537      as_ln_s='cp -pR'
538  elif ln conf$$.file conf$$ 2>/dev/null; then
539    as_ln_s=ln
540  else
541    as_ln_s='cp -pR'
542  fi
543else
544  as_ln_s='cp -pR'
545fi
546rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
547rmdir conf$$.dir 2>/dev/null
548
549if mkdir -p . 2>/dev/null; then
550  as_mkdir_p='mkdir -p "$as_dir"'
551else
552  test -d ./-p && rmdir ./-p
553  as_mkdir_p=false
554fi
555
556as_test_x='test -x'
557as_executable_p=as_fn_executable_p
558
559# Sed expression to map a string onto a valid CPP name.
560as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
561
562# Sed expression to map a string onto a valid variable name.
563as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
564
565
566test -n "$DJDIR" || exec 7<&0 </dev/null
567exec 6>&1
568
569# Name of the host.
570# hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status,
571# so uname gets run too.
572ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
573
574#
575# Initializations.
576#
577ac_default_prefix=/usr/local
578ac_clean_files=
579ac_config_libobj_dir=.
580LIBOBJS=
581cross_compiling=no
582subdirs=
583MFLAGS=
584MAKEFLAGS=
585
586# Identity of this package.
587PACKAGE_NAME='OpenJDK'
588PACKAGE_TARNAME='openjdk'
589PACKAGE_VERSION='jdk9'
590PACKAGE_STRING='OpenJDK jdk9'
591PACKAGE_BUGREPORT='build-dev@openjdk.java.net'
592PACKAGE_URL='http://openjdk.java.net'
593
594# Factoring default headers for most tests.
595ac_includes_default="\
596#include <stdio.h>
597#ifdef HAVE_SYS_TYPES_H
598# include <sys/types.h>
599#endif
600#ifdef HAVE_SYS_STAT_H
601# include <sys/stat.h>
602#endif
603#ifdef STDC_HEADERS
604# include <stdlib.h>
605# include <stddef.h>
606#else
607# ifdef HAVE_STDLIB_H
608#  include <stdlib.h>
609# endif
610#endif
611#ifdef HAVE_STRING_H
612# if !defined STDC_HEADERS && defined HAVE_MEMORY_H
613#  include <memory.h>
614# endif
615# include <string.h>
616#endif
617#ifdef HAVE_STRINGS_H
618# include <strings.h>
619#endif
620#ifdef HAVE_INTTYPES_H
621# include <inttypes.h>
622#endif
623#ifdef HAVE_STDINT_H
624# include <stdint.h>
625#endif
626#ifdef HAVE_UNISTD_H
627# include <unistd.h>
628#endif"
629
630ac_subst_vars='LTLIBOBJS
631LIBOBJS
632CFLAGS_CCACHE
633CCACHE
634USE_PRECOMPILED_HEADER
635BUILD_ICECC
636ICECC
637ICECC_WRAPPER
638ICECC_CREATE_ENV
639ICECC_CMD
640ENABLE_JAVAC_SERVER
641ENABLE_SJAVAC
642SJAVAC_SERVER_JAVA_FLAGS
643SJAVAC_SERVER_JAVA
644JAVA_TOOL_FLAGS_SMALL
645JAVA_FLAGS_SMALL
646JAVA_FLAGS_JAVAC
647JAVA_FLAGS_BIG
648JAVA_FLAGS
649TEST_JOBS
650JOBS
651MEMORY_SIZE
652NUM_CORES
653ENABLE_GENERATE_CLASSLIST
654BUILD_FAILURE_HANDLER
655ENABLE_INTREE_EC
656STLPORT_LIB
657LIBZIP_CAN_USE_MMAP
658LIBDL
659LIBM
660USE_EXTERNAL_LCMS
661LCMS_LIBS
662LCMS_CFLAGS
663USE_EXTERNAL_LIBZ
664USE_EXTERNAL_LIBPNG
665PNG_LIBS
666PNG_CFLAGS
667USE_EXTERNAL_LIBGIF
668USE_EXTERNAL_LIBJPEG
669LLVM_LIBS
670LLVM_LDFLAGS
671LLVM_CFLAGS
672LLVM_CONFIG
673LIBFFI_LIBS
674LIBFFI_CFLAGS
675ALSA_LIBS
676ALSA_CFLAGS
677FREETYPE_BUNDLE_LIB_PATH
678FREETYPE_LIBS
679FREETYPE_CFLAGS
680CUPS_CFLAGS
681X_EXTRA_LIBS
682X_LIBS
683X_PRE_LIBS
684X_CFLAGS
685XMKMF
686MSVCP_DLL
687MSVCR_DLL
688LIBCXX
689STATIC_CXX_SETTING
690FIXPATH_DETACH_FLAG
691FIXPATH
692BUILD_GTEST
693VALID_JVM_FEATURES
694JVM_FEATURES_custom
695JVM_FEATURES_zeroshark
696JVM_FEATURES_zero
697JVM_FEATURES_minimal
698JVM_FEATURES_core
699JVM_FEATURES_client
700JVM_FEATURES_server
701INCLUDE_DTRACE
702GCOV_ENABLED
703STRIP_POLICY
704DEBUG_BINARIES
705ZIP_EXTERNAL_DEBUG_SYMBOLS
706COPY_DEBUG_SYMBOLS
707COMPILE_WITH_DEBUG_SYMBOLS
708CFLAGS_WARNINGS_ARE_ERRORS
709BUILD_CC_DISABLE_WARNING_PREFIX
710DISABLE_WARNING_PREFIX
711HOTSPOT_SET_WARNINGS_AS_ERRORS
712WARNINGS_AS_ERRORS
713COMPILER_SUPPORTS_TARGET_BITS_FLAG
714ZERO_ARCHFLAG
715LDFLAGS_TESTEXE
716LDFLAGS_TESTLIB
717CXXFLAGS_TESTEXE
718CXXFLAGS_TESTLIB
719CFLAGS_TESTEXE
720CFLAGS_TESTLIB
721OPENJDK_BUILD_JVM_LIBS
722OPENJDK_BUILD_JVM_ASFLAGS
723OPENJDK_BUILD_JVM_LDFLAGS
724OPENJDK_BUILD_JVM_CFLAGS
725OPENJDK_BUILD_LDFLAGS_HASH_STYLE
726OPENJDK_BUILD_LDFLAGS_CXX_JDK
727OPENJDK_BUILD_JDKEXE_LIBS
728OPENJDK_BUILD_JDKLIB_LIBS
729OPENJDK_BUILD_LDFLAGS_JDKEXE
730OPENJDK_BUILD_LDFLAGS_JDKLIB
731OPENJDK_BUILD_CXXFLAGS_JDKEXE
732OPENJDK_BUILD_CXXFLAGS_JDKLIB
733OPENJDK_BUILD_CFLAGS_JDKEXE
734OPENJDK_BUILD_CFLAGS_JDKLIB
735OPENJDK_BUILD_CXXSTD_CXXFLAG
736JVM_LIBS
737JVM_ASFLAGS
738JVM_LDFLAGS
739JVM_CFLAGS
740LDFLAGS_HASH_STYLE
741LDFLAGS_CXX_JDK
742JDKEXE_LIBS
743JDKLIB_LIBS
744LDFLAGS_JDKEXE
745LDFLAGS_JDKLIB
746CXXFLAGS_JDKEXE
747CXXFLAGS_JDKLIB
748CFLAGS_JDKEXE
749CFLAGS_JDKLIB
750MACOSX_VERSION_MIN
751NO_LIFETIME_DSE_CFLAG
752NO_NULL_POINTER_CHECK_CFLAG
753CXXSTD_CXXFLAG
754CXX_O_FLAG_SIZE
755CXX_O_FLAG_NONE
756CXX_O_FLAG_DEBUG
757CXX_O_FLAG_NORM
758CXX_O_FLAG_HI
759CXX_O_FLAG_HIGHEST
760CXX_O_FLAG_HIGHEST_JVM
761C_O_FLAG_SIZE
762C_O_FLAG_NONE
763C_O_FLAG_DEBUG
764C_O_FLAG_NORM
765C_O_FLAG_HI
766C_O_FLAG_HIGHEST
767C_O_FLAG_HIGHEST_JVM
768JVM_CFLAGS_SYMBOLS
769CXXFLAGS_DEBUG_SYMBOLS
770CFLAGS_DEBUG_SYMBOLS
771CXX_FLAG_DEPS
772C_FLAG_DEPS
773SHARED_LIBRARY_FLAGS
774SET_SHARED_LIBRARY_MAPFILE
775SET_SHARED_LIBRARY_NAME
776SET_SHARED_LIBRARY_ORIGIN
777SET_EXECUTABLE_ORIGIN
778CXX_FLAG_REORDER
779C_FLAG_REORDER
780JVM_RCFLAGS
781RC_FLAGS
782AR_OUT_OPTION
783LD_OUT_OPTION
784EXE_OUT_OPTION
785CC_OUT_OPTION
786STRIPFLAGS
787ARFLAGS
788COMPILER_BINDCMD_FILE_FLAG
789COMPILER_COMMAND_FILE_FLAG
790COMPILER_TARGET_BITS_FLAG
791JT_HOME
792JTREGEXE
793HOTSPOT_TOOLCHAIN_TYPE
794USING_BROKEN_SUSE_LD
795PACKAGE_PATH
796USE_CLANG
797HOTSPOT_LD
798HOTSPOT_CXX
799HOTSPOT_RC
800HOTSPOT_MT
801BUILD_AS
802BUILD_LDCXX
803BUILD_LD
804BUILD_STRIP
805BUILD_OBJCOPY
806BUILD_AR
807BUILD_NM
808BUILD_CXX
809BUILD_CC
810BUILD_SYSROOT_LDFLAGS
811BUILD_SYSROOT_CFLAGS
812ac_ct_OBJDUMP
813OBJDUMP
814ac_ct_OBJCOPY
815OBJCOPY
816ac_ct_NM
817ac_ct_STRIP
818GNM
819NM
820STRIP
821MSBUILD
822DUMPBIN
823RC
824MT
825LIPO
826ac_ct_AR
827AR
828AS
829LDCXX
830LD
831CXXCPP
832CPP
833CXX_VERSION_NUMBER
834CC_VERSION_NUMBER
835ac_ct_CXX
836CXXFLAGS
837CXX
838TOOLCHAIN_PATH_CXX
839POTENTIAL_CXX
840OBJEXT
841EXEEXT
842ac_ct_CC
843CPPFLAGS
844LDFLAGS
845CFLAGS
846CC
847TOOLCHAIN_PATH_CC
848POTENTIAL_CC
849TOOLCHAIN_VERSION
850VS_LIB
851VS_INCLUDE
852VS_PATH
853CYGWIN_LINK
854SYSROOT_LDFLAGS
855SYSROOT_CFLAGS
856EXTRA_LDFLAGS
857EXTRA_CXXFLAGS
858EXTRA_CFLAGS
859LEGACY_EXTRA_LDFLAGS
860LEGACY_EXTRA_CXXFLAGS
861LEGACY_EXTRA_CFLAGS
862EXE_SUFFIX
863OBJ_SUFFIX
864STATIC_LIBRARY
865SHARED_LIBRARY
866STATIC_LIBRARY_SUFFIX
867SHARED_LIBRARY_SUFFIX
868LIBRARY_PREFIX
869TOOLCHAIN_TYPE
870STATIC_BUILD
871IMPORT_MODULES_MAKE
872IMPORT_MODULES_SRC
873IMPORT_MODULES_CONF
874IMPORT_MODULES_LIBS
875IMPORT_MODULES_CMDS
876IMPORT_MODULES_CLASSES
877BUILD_HOTSPOT
878HOTSPOT_DIST
879BUILD_OUTPUT
880JDK_TOPDIR
881NASHORN_TOPDIR
882HOTSPOT_TOPDIR
883JAXWS_TOPDIR
884JAXP_TOPDIR
885CORBA_TOPDIR
886LANGTOOLS_TOPDIR
887EXTERNAL_BUILDJDK
888BUILD_JDK
889CREATE_BUILDJDK
890JLINK
891JMOD
892BOOT_JDK_BITS
893JAVAC_FLAGS
894BOOT_JDK_MODULAR
895BOOT_JDK_SOURCETARGET
896JARSIGNER
897JAR
898JAVAH
899JAVAC
900JAVA
901BOOT_JDK
902JAVA_CHECK
903JAVAC_CHECK
904VERSION_IS_GA
905VERSION_SHORT
906VERSION_STRING
907VERSION_NUMBER_FOUR_POSITIONS
908VERSION_NUMBER
909VERSION_OPT
910VERSION_BUILD
911VERSION_PRE
912VERSION_PATCH
913VERSION_SECURITY
914VERSION_MINOR
915VERSION_MAJOR
916MACOSX_BUNDLE_ID_BASE
917MACOSX_BUNDLE_NAME_BASE
918HOTSPOT_VM_DISTRO
919COMPANY_NAME
920JDK_RC_PLATFORM_NAME
921PRODUCT_SUFFIX
922PRODUCT_NAME
923LAUNCHER_NAME
924JLINK_KEEP_PACKAGED_MODULES
925COPYRIGHT_YEAR
926COMPRESS_JARS
927INCLUDE_SA
928UNLIMITED_CRYPTO
929CACERTS_FILE
930BUILD_HEADLESS
931SUPPORT_HEADFUL
932SUPPORT_HEADLESS
933DEFAULT_MAKE_TARGET
934OS_VERSION_MICRO
935OS_VERSION_MINOR
936OS_VERSION_MAJOR
937PKG_CONFIG
938BASH_ARGS
939SETFILE
940CODESIGN
941XATTR
942DSYMUTIL
943IS_GNU_TIME
944PATCH
945DTRACE
946TIME
947STAT
948HG
949READELF
950OTOOL
951LDD
952ZIP
953UNZIP
954TAR_SUPPORTS_TRANSFORM
955TAR_INCLUDE_PARAM
956TAR_CREATE_EXTRA_PARAM
957TAR_TYPE
958FIND_DELETE
959OUTPUT_SYNC
960OUTPUT_SYNC_SUPPORTED
961CHECK_TOOLSDIR_MAKE
962CHECK_TOOLSDIR_GMAKE
963CHECK_MAKE
964CHECK_GMAKE
965MAKE
966PKGHANDLER
967CONFIGURESUPPORT_OUTPUTDIR
968OUTPUT_ROOT
969CONF_NAME
970SPEC
971SDKROOT
972XCODEBUILD
973VALID_JVM_VARIANTS
974JVM_VARIANTS
975DEBUG_LEVEL
976HOTSPOT_DEBUG_LEVEL
977JDK_VARIANT
978SET_OPENJDK
979USERNAME
980CANONICAL_TOPDIR
981ORIGINAL_TOPDIR
982TOPDIR
983PATH_SEP
984ZERO_ARCHDEF
985HOTSPOT_BUILD_CPU_DEFINE
986HOTSPOT_BUILD_CPU_ARCH
987HOTSPOT_BUILD_CPU
988HOTSPOT_BUILD_OS_TYPE
989HOTSPOT_BUILD_OS
990OPENJDK_BUILD_BUNDLE_PLATFORM
991OPENJDK_BUILD_CPU_BUNDLE
992OPENJDK_BUILD_OS_BUNDLE
993OPENJDK_BUILD_OS_EXPORT_DIR
994OPENJDK_BUILD_CPU_JLI_CFLAGS
995OPENJDK_BUILD_CPU_OSARCH
996OPENJDK_BUILD_CPU_ISADIR
997OPENJDK_BUILD_CPU_LIBDIR
998OPENJDK_BUILD_CPU_LEGACY_LIB
999OPENJDK_BUILD_CPU_LEGACY
1000HOTSPOT_TARGET_CPU_DEFINE
1001HOTSPOT_TARGET_CPU_ARCH
1002HOTSPOT_TARGET_CPU
1003HOTSPOT_TARGET_OS_TYPE
1004HOTSPOT_TARGET_OS
1005DEFINE_CROSS_COMPILE_ARCH
1006LP64
1007OPENJDK_TARGET_BUNDLE_PLATFORM
1008OPENJDK_TARGET_CPU_BUNDLE
1009OPENJDK_TARGET_OS_BUNDLE
1010OPENJDK_TARGET_OS_EXPORT_DIR
1011OPENJDK_TARGET_CPU_JLI_CFLAGS
1012OPENJDK_TARGET_CPU_OSARCH
1013OPENJDK_TARGET_CPU_ISADIR
1014OPENJDK_TARGET_CPU_LIBDIR
1015OPENJDK_TARGET_CPU_LEGACY_LIB
1016OPENJDK_TARGET_CPU_LEGACY
1017REQUIRED_OS_VERSION
1018REQUIRED_OS_NAME
1019COMPILE_TYPE
1020OPENJDK_TARGET_CPU_ENDIAN
1021OPENJDK_TARGET_CPU_BITS
1022OPENJDK_TARGET_CPU_ARCH
1023OPENJDK_TARGET_CPU
1024OPENJDK_TARGET_OS_ENV
1025OPENJDK_TARGET_OS_TYPE
1026OPENJDK_TARGET_OS
1027OPENJDK_BUILD_CPU_ENDIAN
1028OPENJDK_BUILD_CPU_BITS
1029OPENJDK_BUILD_CPU_ARCH
1030OPENJDK_BUILD_CPU
1031OPENJDK_BUILD_OS_ENV
1032OPENJDK_BUILD_OS_TYPE
1033OPENJDK_BUILD_OS
1034OPENJDK_BUILD_AUTOCONF_NAME
1035OPENJDK_TARGET_AUTOCONF_NAME
1036target_os
1037target_vendor
1038target_cpu
1039target
1040host_os
1041host_vendor
1042host_cpu
1043host
1044build_os
1045build_vendor
1046build_cpu
1047build
1048NICE
1049CPIO
1050DF
1051READLINK
1052CYGPATH
1053SED
1054FGREP
1055EGREP
1056GREP
1057AWK
1058XARGS
1059WHICH
1060WC
1061UNIQ
1062UNAME
1063TR
1064TOUCH
1065TEE
1066TAR
1067TAIL
1068SORT
1069SH
1070RMDIR
1071RM
1072PRINTF
1073NAWK
1074MV
1075MKTEMP
1076MKDIR
1077LS
1078LN
1079GZIP
1080GUNZIP
1081HEAD
1082FIND
1083FILE
1084EXPR
1085ECHO
1086DIRNAME
1087DIFF
1088DATE
1089CUT
1090CP
1091COMM
1092CMP
1093CHMOD
1094CAT
1095BASH
1096BASENAME
1097DATE_WHEN_CONFIGURED
1098ORIGINAL_PATH
1099CONFIGURE_COMMAND_LINE
1100target_alias
1101host_alias
1102build_alias
1103LIBS
1104ECHO_T
1105ECHO_N
1106ECHO_C
1107DEFS
1108mandir
1109localedir
1110libdir
1111psdir
1112pdfdir
1113dvidir
1114htmldir
1115infodir
1116docdir
1117oldincludedir
1118includedir
1119localstatedir
1120sharedstatedir
1121sysconfdir
1122datadir
1123datarootdir
1124libexecdir
1125sbindir
1126bindir
1127program_transform_name
1128prefix
1129exec_prefix
1130PACKAGE_URL
1131PACKAGE_BUGREPORT
1132PACKAGE_STRING
1133PACKAGE_VERSION
1134PACKAGE_TARNAME
1135PACKAGE_NAME
1136PATH_SEPARATOR
1137SHELL'
1138ac_subst_files=''
1139ac_user_opts='
1140enable_option_checking
1141with_target_bits
1142enable_openjdk_only
1143with_custom_make_dir
1144with_jdk_variant
1145enable_debug
1146with_debug_level
1147with_jvm_variants
1148with_devkit
1149with_sys_root
1150with_sysroot
1151with_tools_dir
1152with_toolchain_path
1153with_extra_path
1154with_sdk_name
1155with_conf_name
1156with_output_sync
1157with_default_make_target
1158enable_headful
1159with_cacerts_file
1160enable_unlimited_crypto
1161with_copyright_year
1162enable_keep_packaged_modules
1163with_milestone
1164with_update_version
1165with_user_release_suffix
1166with_build_number
1167with_version_string
1168with_version_pre
1169with_version_opt
1170with_version_build
1171with_version_major
1172with_version_minor
1173with_version_security
1174with_version_patch
1175with_boot_jdk
1176with_build_jdk
1177with_add_source_root
1178with_override_source_root
1179with_adds_and_overrides
1180with_override_langtools
1181with_override_corba
1182with_override_jaxp
1183with_override_jaxws
1184with_override_hotspot
1185with_override_nashorn
1186with_override_jdk
1187with_import_hotspot
1188with_import_modules
1189enable_static_build
1190with_toolchain_type
1191with_extra_cflags
1192with_extra_cxxflags
1193with_extra_ldflags
1194with_toolchain_version
1195with_build_devkit
1196with_jtreg
1197enable_warnings_as_errors
1198with_native_debug_symbols
1199enable_debug_symbols
1200enable_zip_debug_info
1201enable_native_coverage
1202enable_dtrace
1203with_jvm_features
1204with_jvm_interpreter
1205enable_hotspot_gtest
1206with_stdc__lib
1207with_msvcr_dll
1208with_msvcp_dll
1209with_x
1210with_cups
1211with_cups_include
1212with_freetype
1213with_freetype_include
1214with_freetype_lib
1215with_freetype_src
1216enable_freetype_bundling
1217with_alsa
1218with_alsa_include
1219with_alsa_lib
1220with_libffi
1221with_libffi_include
1222with_libffi_lib
1223with_libjpeg
1224with_giflib
1225with_libpng
1226with_zlib
1227with_lcms
1228with_dxsdk
1229with_dxsdk_lib
1230with_dxsdk_include
1231enable_jtreg_failure_handler
1232enable_generate_classlist
1233with_num_cores
1234with_memory_size
1235with_jobs
1236with_test_jobs
1237with_boot_jdk_jvmargs
1238with_sjavac_server_java
1239enable_sjavac
1240enable_javac_server
1241enable_icecc
1242enable_precompiled_headers
1243enable_ccache
1244with_ccache_dir
1245'
1246      ac_precious_vars='build_alias
1247host_alias
1248target_alias
1249BASENAME
1250BASH
1251CAT
1252CHMOD
1253CMP
1254COMM
1255CP
1256CUT
1257DATE
1258DIFF
1259DIRNAME
1260ECHO
1261EXPR
1262FILE
1263FIND
1264HEAD
1265GUNZIP
1266GZIP
1267LN
1268LS
1269MKDIR
1270MKTEMP
1271MV
1272NAWK
1273PRINTF
1274RM
1275RMDIR
1276SH
1277SORT
1278TAIL
1279TAR
1280TEE
1281TOUCH
1282TR
1283UNAME
1284UNIQ
1285WC
1286WHICH
1287XARGS
1288AWK
1289GREP
1290EGREP
1291FGREP
1292SED
1293CYGPATH
1294READLINK
1295DF
1296CPIO
1297NICE
1298MAKE
1299UNZIP
1300ZIP
1301LDD
1302OTOOL
1303READELF
1304HG
1305STAT
1306TIME
1307DTRACE
1308PATCH
1309DSYMUTIL
1310XATTR
1311CODESIGN
1312SETFILE
1313PKG_CONFIG
1314JAVA
1315JAVAC
1316JAVAH
1317JAR
1318JARSIGNER
1319CC
1320CFLAGS
1321LDFLAGS
1322LIBS
1323CPPFLAGS
1324CXX
1325CXXFLAGS
1326CCC
1327CPP
1328CXXCPP
1329AS
1330AR
1331LIPO
1332STRIP
1333NM
1334GNM
1335OBJCOPY
1336OBJDUMP
1337BUILD_CC
1338BUILD_CXX
1339BUILD_NM
1340BUILD_AR
1341BUILD_OBJCOPY
1342BUILD_STRIP
1343JTREGEXE
1344XMKMF
1345FREETYPE_CFLAGS
1346FREETYPE_LIBS
1347ALSA_CFLAGS
1348ALSA_LIBS
1349LIBFFI_CFLAGS
1350LIBFFI_LIBS
1351PNG_CFLAGS
1352PNG_LIBS
1353LCMS_CFLAGS
1354LCMS_LIBS
1355ICECC_CMD
1356ICECC_CREATE_ENV
1357ICECC_WRAPPER
1358CCACHE'
1359
1360
1361# Initialize some variables set by options.
1362ac_init_help=
1363ac_init_version=false
1364ac_unrecognized_opts=
1365ac_unrecognized_sep=
1366# The variables have the same names as the options, with
1367# dashes changed to underlines.
1368cache_file=/dev/null
1369exec_prefix=NONE
1370no_create=
1371no_recursion=
1372prefix=NONE
1373program_prefix=NONE
1374program_suffix=NONE
1375program_transform_name=s,x,x,
1376silent=
1377site=
1378srcdir=
1379verbose=
1380x_includes=NONE
1381x_libraries=NONE
1382
1383# Installation directory options.
1384# These are left unexpanded so users can "make install exec_prefix=/foo"
1385# and all the variables that are supposed to be based on exec_prefix
1386# by default will actually change.
1387# Use braces instead of parens because sh, perl, etc. also accept them.
1388# (The list follows the same order as the GNU Coding Standards.)
1389bindir='${exec_prefix}/bin'
1390sbindir='${exec_prefix}/sbin'
1391libexecdir='${exec_prefix}/libexec'
1392datarootdir='${prefix}/share'
1393datadir='${datarootdir}'
1394sysconfdir='${prefix}/etc'
1395sharedstatedir='${prefix}/com'
1396localstatedir='${prefix}/var'
1397includedir='${prefix}/include'
1398oldincludedir='/usr/include'
1399docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1400infodir='${datarootdir}/info'
1401htmldir='${docdir}'
1402dvidir='${docdir}'
1403pdfdir='${docdir}'
1404psdir='${docdir}'
1405libdir='${exec_prefix}/lib'
1406localedir='${datarootdir}/locale'
1407mandir='${datarootdir}/man'
1408
1409ac_prev=
1410ac_dashdash=
1411for ac_option
1412do
1413  # If the previous option needs an argument, assign it.
1414  if test -n "$ac_prev"; then
1415    eval $ac_prev=\$ac_option
1416    ac_prev=
1417    continue
1418  fi
1419
1420  case $ac_option in
1421  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1422  *=)   ac_optarg= ;;
1423  *)    ac_optarg=yes ;;
1424  esac
1425
1426  # Accept the important Cygnus configure options, so we can diagnose typos.
1427
1428  case $ac_dashdash$ac_option in
1429  --)
1430    ac_dashdash=yes ;;
1431
1432  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1433    ac_prev=bindir ;;
1434  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1435    bindir=$ac_optarg ;;
1436
1437  -build | --build | --buil | --bui | --bu)
1438    ac_prev=build_alias ;;
1439  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1440    build_alias=$ac_optarg ;;
1441
1442  -cache-file | --cache-file | --cache-fil | --cache-fi \
1443  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1444    ac_prev=cache_file ;;
1445  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1446  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1447    cache_file=$ac_optarg ;;
1448
1449  --config-cache | -C)
1450    cache_file=config.cache ;;
1451
1452  -datadir | --datadir | --datadi | --datad)
1453    ac_prev=datadir ;;
1454  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1455    datadir=$ac_optarg ;;
1456
1457  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1458  | --dataroo | --dataro | --datar)
1459    ac_prev=datarootdir ;;
1460  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1461  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1462    datarootdir=$ac_optarg ;;
1463
1464  -disable-* | --disable-*)
1465    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1466    # Reject names that are not valid shell variable names.
1467    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1468      as_fn_error $? "invalid feature name: $ac_useropt"
1469    ac_useropt_orig=$ac_useropt
1470    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1471    case $ac_user_opts in
1472      *"
1473"enable_$ac_useropt"
1474"*) ;;
1475      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1476	 ac_unrecognized_sep=', ';;
1477    esac
1478    eval enable_$ac_useropt=no ;;
1479
1480  -docdir | --docdir | --docdi | --doc | --do)
1481    ac_prev=docdir ;;
1482  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1483    docdir=$ac_optarg ;;
1484
1485  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1486    ac_prev=dvidir ;;
1487  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1488    dvidir=$ac_optarg ;;
1489
1490  -enable-* | --enable-*)
1491    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1492    # Reject names that are not valid shell variable names.
1493    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1494      as_fn_error $? "invalid feature name: $ac_useropt"
1495    ac_useropt_orig=$ac_useropt
1496    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1497    case $ac_user_opts in
1498      *"
1499"enable_$ac_useropt"
1500"*) ;;
1501      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1502	 ac_unrecognized_sep=', ';;
1503    esac
1504    eval enable_$ac_useropt=\$ac_optarg ;;
1505
1506  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1507  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1508  | --exec | --exe | --ex)
1509    ac_prev=exec_prefix ;;
1510  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1511  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1512  | --exec=* | --exe=* | --ex=*)
1513    exec_prefix=$ac_optarg ;;
1514
1515  -gas | --gas | --ga | --g)
1516    # Obsolete; use --with-gas.
1517    with_gas=yes ;;
1518
1519  -help | --help | --hel | --he | -h)
1520    ac_init_help=long ;;
1521  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1522    ac_init_help=recursive ;;
1523  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1524    ac_init_help=short ;;
1525
1526  -host | --host | --hos | --ho)
1527    ac_prev=host_alias ;;
1528  -host=* | --host=* | --hos=* | --ho=*)
1529    host_alias=$ac_optarg ;;
1530
1531  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1532    ac_prev=htmldir ;;
1533  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1534  | --ht=*)
1535    htmldir=$ac_optarg ;;
1536
1537  -includedir | --includedir | --includedi | --included | --include \
1538  | --includ | --inclu | --incl | --inc)
1539    ac_prev=includedir ;;
1540  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1541  | --includ=* | --inclu=* | --incl=* | --inc=*)
1542    includedir=$ac_optarg ;;
1543
1544  -infodir | --infodir | --infodi | --infod | --info | --inf)
1545    ac_prev=infodir ;;
1546  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1547    infodir=$ac_optarg ;;
1548
1549  -libdir | --libdir | --libdi | --libd)
1550    ac_prev=libdir ;;
1551  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1552    libdir=$ac_optarg ;;
1553
1554  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1555  | --libexe | --libex | --libe)
1556    ac_prev=libexecdir ;;
1557  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1558  | --libexe=* | --libex=* | --libe=*)
1559    libexecdir=$ac_optarg ;;
1560
1561  -localedir | --localedir | --localedi | --localed | --locale)
1562    ac_prev=localedir ;;
1563  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1564    localedir=$ac_optarg ;;
1565
1566  -localstatedir | --localstatedir | --localstatedi | --localstated \
1567  | --localstate | --localstat | --localsta | --localst | --locals)
1568    ac_prev=localstatedir ;;
1569  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1570  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1571    localstatedir=$ac_optarg ;;
1572
1573  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1574    ac_prev=mandir ;;
1575  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1576    mandir=$ac_optarg ;;
1577
1578  -nfp | --nfp | --nf)
1579    # Obsolete; use --without-fp.
1580    with_fp=no ;;
1581
1582  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1583  | --no-cr | --no-c | -n)
1584    no_create=yes ;;
1585
1586  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1587  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1588    no_recursion=yes ;;
1589
1590  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1591  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1592  | --oldin | --oldi | --old | --ol | --o)
1593    ac_prev=oldincludedir ;;
1594  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1595  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1596  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1597    oldincludedir=$ac_optarg ;;
1598
1599  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1600    ac_prev=prefix ;;
1601  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1602    prefix=$ac_optarg ;;
1603
1604  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1605  | --program-pre | --program-pr | --program-p)
1606    ac_prev=program_prefix ;;
1607  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1608  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1609    program_prefix=$ac_optarg ;;
1610
1611  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1612  | --program-suf | --program-su | --program-s)
1613    ac_prev=program_suffix ;;
1614  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1615  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1616    program_suffix=$ac_optarg ;;
1617
1618  -program-transform-name | --program-transform-name \
1619  | --program-transform-nam | --program-transform-na \
1620  | --program-transform-n | --program-transform- \
1621  | --program-transform | --program-transfor \
1622  | --program-transfo | --program-transf \
1623  | --program-trans | --program-tran \
1624  | --progr-tra | --program-tr | --program-t)
1625    ac_prev=program_transform_name ;;
1626  -program-transform-name=* | --program-transform-name=* \
1627  | --program-transform-nam=* | --program-transform-na=* \
1628  | --program-transform-n=* | --program-transform-=* \
1629  | --program-transform=* | --program-transfor=* \
1630  | --program-transfo=* | --program-transf=* \
1631  | --program-trans=* | --program-tran=* \
1632  | --progr-tra=* | --program-tr=* | --program-t=*)
1633    program_transform_name=$ac_optarg ;;
1634
1635  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1636    ac_prev=pdfdir ;;
1637  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1638    pdfdir=$ac_optarg ;;
1639
1640  -psdir | --psdir | --psdi | --psd | --ps)
1641    ac_prev=psdir ;;
1642  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1643    psdir=$ac_optarg ;;
1644
1645  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1646  | -silent | --silent | --silen | --sile | --sil)
1647    silent=yes ;;
1648
1649  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1650    ac_prev=sbindir ;;
1651  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1652  | --sbi=* | --sb=*)
1653    sbindir=$ac_optarg ;;
1654
1655  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1656  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1657  | --sharedst | --shareds | --shared | --share | --shar \
1658  | --sha | --sh)
1659    ac_prev=sharedstatedir ;;
1660  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1661  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1662  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1663  | --sha=* | --sh=*)
1664    sharedstatedir=$ac_optarg ;;
1665
1666  -site | --site | --sit)
1667    ac_prev=site ;;
1668  -site=* | --site=* | --sit=*)
1669    site=$ac_optarg ;;
1670
1671  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1672    ac_prev=srcdir ;;
1673  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1674    srcdir=$ac_optarg ;;
1675
1676  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1677  | --syscon | --sysco | --sysc | --sys | --sy)
1678    ac_prev=sysconfdir ;;
1679  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1680  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1681    sysconfdir=$ac_optarg ;;
1682
1683  -target | --target | --targe | --targ | --tar | --ta | --t)
1684    ac_prev=target_alias ;;
1685  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1686    target_alias=$ac_optarg ;;
1687
1688  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1689    verbose=yes ;;
1690
1691  -version | --version | --versio | --versi | --vers | -V)
1692    ac_init_version=: ;;
1693
1694  -with-* | --with-*)
1695    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1696    # Reject names that are not valid shell variable names.
1697    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1698      as_fn_error $? "invalid package name: $ac_useropt"
1699    ac_useropt_orig=$ac_useropt
1700    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1701    case $ac_user_opts in
1702      *"
1703"with_$ac_useropt"
1704"*) ;;
1705      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1706	 ac_unrecognized_sep=', ';;
1707    esac
1708    eval with_$ac_useropt=\$ac_optarg ;;
1709
1710  -without-* | --without-*)
1711    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1712    # Reject names that are not valid shell variable names.
1713    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1714      as_fn_error $? "invalid package name: $ac_useropt"
1715    ac_useropt_orig=$ac_useropt
1716    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1717    case $ac_user_opts in
1718      *"
1719"with_$ac_useropt"
1720"*) ;;
1721      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1722	 ac_unrecognized_sep=', ';;
1723    esac
1724    eval with_$ac_useropt=no ;;
1725
1726  --x)
1727    # Obsolete; use --with-x.
1728    with_x=yes ;;
1729
1730  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1731  | --x-incl | --x-inc | --x-in | --x-i)
1732    ac_prev=x_includes ;;
1733  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1734  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1735    x_includes=$ac_optarg ;;
1736
1737  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1738  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1739    ac_prev=x_libraries ;;
1740  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1741  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1742    x_libraries=$ac_optarg ;;
1743
1744  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1745Try \`$0 --help' for more information"
1746    ;;
1747
1748  *=*)
1749    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1750    # Reject names that are not valid shell variable names.
1751    case $ac_envvar in #(
1752      '' | [0-9]* | *[!_$as_cr_alnum]* )
1753      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1754    esac
1755    eval $ac_envvar=\$ac_optarg
1756    export $ac_envvar ;;
1757
1758  *)
1759    # FIXME: should be removed in autoconf 3.0.
1760    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1761    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1762      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1763    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1764    ;;
1765
1766  esac
1767done
1768
1769if test -n "$ac_prev"; then
1770  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1771  as_fn_error $? "missing argument to $ac_option"
1772fi
1773
1774if test -n "$ac_unrecognized_opts"; then
1775  case $enable_option_checking in
1776    no) ;;
1777    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1778    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1779  esac
1780fi
1781
1782# Check all directory arguments for consistency.
1783for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1784		datadir sysconfdir sharedstatedir localstatedir includedir \
1785		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1786		libdir localedir mandir
1787do
1788  eval ac_val=\$$ac_var
1789  # Remove trailing slashes.
1790  case $ac_val in
1791    */ )
1792      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1793      eval $ac_var=\$ac_val;;
1794  esac
1795  # Be sure to have absolute directory names.
1796  case $ac_val in
1797    [\\/$]* | ?:[\\/]* )  continue;;
1798    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1799  esac
1800  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1801done
1802
1803# There might be people who depend on the old broken behavior: `$host'
1804# used to hold the argument of --host etc.
1805# FIXME: To remove some day.
1806build=$build_alias
1807host=$host_alias
1808target=$target_alias
1809
1810# FIXME: To remove some day.
1811if test "x$host_alias" != x; then
1812  if test "x$build_alias" = x; then
1813    cross_compiling=maybe
1814  elif test "x$build_alias" != "x$host_alias"; then
1815    cross_compiling=yes
1816  fi
1817fi
1818
1819ac_tool_prefix=
1820test -n "$host_alias" && ac_tool_prefix=$host_alias-
1821
1822test "$silent" = yes && exec 6>/dev/null
1823
1824
1825ac_pwd=`pwd` && test -n "$ac_pwd" &&
1826ac_ls_di=`ls -di .` &&
1827ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1828  as_fn_error $? "working directory cannot be determined"
1829test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1830  as_fn_error $? "pwd does not report name of working directory"
1831
1832
1833# Find the source files, if location was not specified.
1834if test -z "$srcdir"; then
1835  ac_srcdir_defaulted=yes
1836  # Try the directory containing this script, then the parent directory.
1837  ac_confdir=`$as_dirname -- "$as_myself" ||
1838$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1839	 X"$as_myself" : 'X\(//\)[^/]' \| \
1840	 X"$as_myself" : 'X\(//\)$' \| \
1841	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1842$as_echo X"$as_myself" |
1843    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1844	    s//\1/
1845	    q
1846	  }
1847	  /^X\(\/\/\)[^/].*/{
1848	    s//\1/
1849	    q
1850	  }
1851	  /^X\(\/\/\)$/{
1852	    s//\1/
1853	    q
1854	  }
1855	  /^X\(\/\).*/{
1856	    s//\1/
1857	    q
1858	  }
1859	  s/.*/./; q'`
1860  srcdir=$ac_confdir
1861  if test ! -r "$srcdir/$ac_unique_file"; then
1862    srcdir=..
1863  fi
1864else
1865  ac_srcdir_defaulted=no
1866fi
1867if test ! -r "$srcdir/$ac_unique_file"; then
1868  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1869  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1870fi
1871ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1872ac_abs_confdir=`(
1873	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1874	pwd)`
1875# When building in place, set srcdir=.
1876if test "$ac_abs_confdir" = "$ac_pwd"; then
1877  srcdir=.
1878fi
1879# Remove unnecessary trailing slashes from srcdir.
1880# Double slashes in file names in object file debugging info
1881# mess up M-x gdb in Emacs.
1882case $srcdir in
1883*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1884esac
1885for ac_var in $ac_precious_vars; do
1886  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_env_${ac_var}_value=\$${ac_var}
1888  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1889  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1890done
1891
1892#
1893# Report the --help message.
1894#
1895if test "$ac_init_help" = "long"; then
1896  # Omit some internal or obsolete options to make the list less imposing.
1897  # This message is too long to be a string in the A/UX 3.1 sh.
1898  cat <<_ACEOF
1899\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1900
1901Usage: $0 [OPTION]... [VAR=VALUE]...
1902
1903To assign environment variables (e.g., CC, CFLAGS...), specify them as
1904VAR=VALUE.  See below for descriptions of some of the useful variables.
1905
1906Defaults for the options are specified in brackets.
1907
1908Configuration:
1909  -h, --help              display this help and exit
1910      --help=short        display options specific to this package
1911      --help=recursive    display the short help of all the included packages
1912  -V, --version           display version information and exit
1913  -q, --quiet, --silent   do not print \`checking ...' messages
1914      --cache-file=FILE   cache test results in FILE [disabled]
1915  -C, --config-cache      alias for \`--cache-file=config.cache'
1916  -n, --no-create         do not create output files
1917      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1918
1919Installation directories:
1920  --prefix=PREFIX         install architecture-independent files in PREFIX
1921                          [$ac_default_prefix]
1922  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1923                          [PREFIX]
1924
1925By default, \`make install' will install all the files in
1926\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1927an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1928for instance \`--prefix=\$HOME'.
1929
1930For better control, use the options below.
1931
1932Fine tuning of the installation directories:
1933  --bindir=DIR            user executables [EPREFIX/bin]
1934  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1935  --libexecdir=DIR        program executables [EPREFIX/libexec]
1936  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1937  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1938  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1939  --libdir=DIR            object code libraries [EPREFIX/lib]
1940  --includedir=DIR        C header files [PREFIX/include]
1941  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1942  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1943  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1944  --infodir=DIR           info documentation [DATAROOTDIR/info]
1945  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1946  --mandir=DIR            man documentation [DATAROOTDIR/man]
1947  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1948  --htmldir=DIR           html documentation [DOCDIR]
1949  --dvidir=DIR            dvi documentation [DOCDIR]
1950  --pdfdir=DIR            pdf documentation [DOCDIR]
1951  --psdir=DIR             ps documentation [DOCDIR]
1952_ACEOF
1953
1954  cat <<\_ACEOF
1955
1956X features:
1957  --x-includes=DIR    X include files are in DIR
1958  --x-libraries=DIR   X library files are in DIR
1959
1960System types:
1961  --build=BUILD     configure for building on BUILD [guessed]
1962  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1963  --target=TARGET   configure for building compilers for TARGET [HOST]
1964_ACEOF
1965fi
1966
1967if test -n "$ac_init_help"; then
1968  case $ac_init_help in
1969     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1970   esac
1971  cat <<\_ACEOF
1972
1973Optional Features:
1974  --disable-option-checking  ignore unrecognized --enable/--with options
1975  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1976  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1977  --enable-openjdk-only   suppress building custom source even if present
1978                          [disabled]
1979  --enable-debug          set the debug level to fastdebug (shorthand for
1980                          --with-debug-level=fastdebug) [disabled]
1981  --disable-headful       disable building headful support (graphical UI
1982                          support) [enabled]
1983  --enable-unlimited-crypto
1984                          Enable unlimited crypto policy [disabled]
1985  --disable-keep-packaged-modules
1986                          Do not keep packaged modules in jdk image [enable]
1987  --enable-static-build   enable static library build [disabled]
1988  --disable-warnings-as-errors
1989                          do not consider native warnings to be an error
1990                          [enabled]
1991  --enable-debug-symbols  Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-zip-debug-info Deprecated. Option is kept for backwards
1994                          compatibility and is ignored
1995  --enable-native-coverage
1996                          enable native compilation with code coverage
1997                          data[disabled]
1998  --enable-dtrace[=yes/no/auto]
1999                          enable dtrace. Default is auto, where dtrace is
2000                          enabled if all dependencies are present.
2001  --disable-hotspot-gtest Disables building of the Hotspot unit tests
2002  --disable-freetype-bundling
2003                          disable bundling of the freetype library with the
2004                          build result [enabled on Windows or when using
2005                          --with-freetype, disabled otherwise]
2006  --enable-jtreg-failure-handler
2007                          forces build of the jtreg failure handler to be
2008                          enabled, missing dependencies become fatal errors.
2009                          Default is auto, where the failure handler is built
2010                          if all dependencies are present and otherwise just
2011                          disabled.
2012  --disable-generate-classlist
2013                          forces enabling or disabling of the generation of a
2014                          CDS classlist at build time. Default is to generate
2015                          it when either the server or client JVMs are built.
2016  --enable-sjavac         use sjavac to do fast incremental compiles
2017                          [disabled]
2018  --disable-javac-server  disable javac server [enabled]
2019  --enable-icecc          enable distribted compilation of native code using
2020                          icecc/icecream [disabled]
2021  --disable-precompiled-headers
2022                          disable using precompiled headers when compiling C++
2023                          [enabled]
2024  --enable-ccache         enable using ccache to speed up recompilations
2025                          [disabled]
2026
2027Optional Packages:
2028  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2029  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2030  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2031                          support it), e.g. --with-target-bits=32 [guessed]
2032  --with-custom-make-dir  Deprecated. Option is kept for backwards
2033                          compatibility and is ignored
2034  --with-jdk-variant      JDK variant to build (normal) [normal]
2035  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2036                          optimized) [release]
2037  --with-jvm-variants     JVM variants (separated by commas) to build
2038                          (server,client,minimal,core,zero,zeroshark,custom)
2039                          [server]
2040  --with-devkit           use this devkit for compilers, tools and resources
2041  --with-sys-root         alias for --with-sysroot for backwards compatability
2042  --with-sysroot          use this directory as sysroot
2043  --with-tools-dir        alias for --with-toolchain-path for backwards
2044                          compatibility
2045  --with-toolchain-path   prepend these directories when searching for
2046                          toolchain binaries (compilers etc)
2047  --with-extra-path       prepend these directories to the default path
2048  --with-sdk-name         use the platform SDK of the given name. [macosx]
2049  --with-conf-name        use this as the name of the configuration [generated
2050                          from important configuration options]
2051  --with-output-sync      set make output sync type if supported by make.
2052                          [recurse]
2053  --with-default-make-target
2054                          set the default make target [exploded-image]
2055  --with-cacerts-file     specify alternative cacerts file
2056  --with-copyright-year   Set copyright year value for build [current year]
2057  --with-milestone        Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-update-version   Deprecated. Option is kept for backwards
2060                          compatibility and is ignored
2061  --with-user-release-suffix
2062                          Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-build-number     Deprecated. Option is kept for backwards
2065                          compatibility and is ignored
2066  --with-version-string   Set version string [calculated]
2067  --with-version-pre      Set the base part of the version 'PRE' field
2068                          (pre-release identifier) ['internal']
2069  --with-version-opt      Set version 'OPT' field (build metadata)
2070                          [<timestamp>.<user>.<dirname>]
2071  --with-version-build    Set version 'BUILD' field (build number) [not
2072                          specified]
2073  --with-version-major    Set version 'MAJOR' field (first number) [current
2074                          source value]
2075  --with-version-minor    Set version 'MINOR' field (second number) [current
2076                          source value]
2077  --with-version-security Set version 'SECURITY' field (third number) [current
2078                          source value]
2079  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2080                          specified]
2081  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2082  --with-build-jdk        path to JDK of same version as is being built[the
2083                          newly built JDK]
2084  --with-add-source-root  Deprecated. Option is kept for backwards
2085                          compatibility and is ignored
2086  --with-override-source-root
2087                          Deprecated. Option is kept for backwards
2088                          compatibility and is ignored
2089  --with-adds-and-overrides
2090                          Deprecated. Option is kept for backwards
2091                          compatibility and is ignored
2092  --with-override-langtools
2093                          Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-corba   Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxp    Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-jaxws   Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-hotspot Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-nashorn Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-override-jdk     Deprecated. Option is kept for backwards
2106                          compatibility and is ignored
2107  --with-import-hotspot   import hotspot binaries from this jdk image or
2108                          hotspot build dist dir instead of building from
2109                          source
2110  --with-import-modules   import a set of prebuilt modules either as a zip
2111                          file or an exploded directory
2112  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2113                          to show possible values [platform dependent]
2114  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2115  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2116  --with-extra-ldflags    extra flags to be used when linking jdk
2117  --with-toolchain-version
2118                          the version of the toolchain to look for, use
2119                          '--help' to show possible values [platform
2120                          dependent]
2121  --with-build-devkit     Devkit to use for the build platform toolchain
2122  --with-jtreg            Regression Test Harness [probed]
2123  --with-native-debug-symbols
2124                          set the native debug symbol configuration (none,
2125                          internal, external, zipped) [varying]
2126  --with-jvm-features     additional JVM features to enable (separated by
2127                          comma), use '--help' to show possible values [none]
2128  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2129                          compatibility and is ignored
2130  --with-stdc++lib=<static>,<dynamic>,<default>
2131                          force linking of the C++ runtime on Linux to either
2132                          static or dynamic, default is static with dynamic as
2133                          fallback
2134  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2135                          (Windows only) [probed]
2136  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2137                          (Windows only) [probed]
2138  --with-x                use the X Window System
2139  --with-cups             specify prefix directory for the cups package
2140                          (expecting the headers under PATH/include)
2141  --with-cups-include     specify directory for the cups include files
2142  --with-freetype         specify prefix directory for the freetype package
2143                          (expecting the libraries under PATH/lib and the
2144                          headers under PATH/include)
2145  --with-freetype-include specify directory for the freetype include files
2146  --with-freetype-lib     specify directory for the freetype library
2147  --with-freetype-src     specify directory with freetype sources to
2148                          automatically build the library (experimental,
2149                          Windows-only)
2150  --with-alsa             specify prefix directory for the alsa package
2151                          (expecting the libraries under PATH/lib and the
2152                          headers under PATH/include)
2153  --with-alsa-include     specify directory for the alsa include files
2154  --with-alsa-lib         specify directory for the alsa library
2155  --with-libffi           specify prefix directory for the libffi package
2156                          (expecting the libraries under PATH/lib and the
2157                          headers under PATH/include)
2158  --with-libffi-include   specify directory for the libffi include files
2159  --with-libffi-lib       specify directory for the libffi library
2160  --with-libjpeg          use libjpeg from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-giflib           use giflib from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-libpng           use libpng from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-zlib             use zlib from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-lcms             use lcms2 from build system or OpenJDK source
2169                          (system, bundled) [bundled]
2170  --with-dxsdk            Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-dxsdk-include    Deprecated. Option is kept for backwards
2175                          compatibility and is ignored
2176  --with-num-cores        number of cores in the build system, e.g.
2177                          --with-num-cores=8 [probed]
2178  --with-memory-size      memory (in MB) available in the build system, e.g.
2179                          --with-memory-size=1024 [probed]
2180  --with-jobs             number of parallel jobs to let make run [calculated
2181                          based on cores and memory]
2182  --with-test-jobs        number of parallel tests jobs to run [based on build
2183                          jobs]
2184  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2185                          invocations of boot JDK, overriding the default
2186                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2187                          -enableassertions"
2188  --with-sjavac-server-java
2189                          use this java binary for running the sjavac
2190                          background server [Boot JDK java]
2191  --with-ccache-dir       where to store ccache files [~/.ccache]
2192
2193Some influential environment variables:
2194  BASENAME    Override default value for BASENAME
2195  BASH        Override default value for BASH
2196  CAT         Override default value for CAT
2197  CHMOD       Override default value for CHMOD
2198  CMP         Override default value for CMP
2199  COMM        Override default value for COMM
2200  CP          Override default value for CP
2201  CUT         Override default value for CUT
2202  DATE        Override default value for DATE
2203  DIFF        Override default value for DIFF
2204  DIRNAME     Override default value for DIRNAME
2205  ECHO        Override default value for ECHO
2206  EXPR        Override default value for EXPR
2207  FILE        Override default value for FILE
2208  FIND        Override default value for FIND
2209  HEAD        Override default value for HEAD
2210  GUNZIP      Override default value for GUNZIP
2211  GZIP        Override default value for GZIP
2212  LN          Override default value for LN
2213  LS          Override default value for LS
2214  MKDIR       Override default value for MKDIR
2215  MKTEMP      Override default value for MKTEMP
2216  MV          Override default value for MV
2217  NAWK        Override default value for NAWK
2218  PRINTF      Override default value for PRINTF
2219  RM          Override default value for RM
2220  RMDIR       Override default value for RMDIR
2221  SH          Override default value for SH
2222  SORT        Override default value for SORT
2223  TAIL        Override default value for TAIL
2224  TAR         Override default value for TAR
2225  TEE         Override default value for TEE
2226  TOUCH       Override default value for TOUCH
2227  TR          Override default value for TR
2228  UNAME       Override default value for UNAME
2229  UNIQ        Override default value for UNIQ
2230  WC          Override default value for WC
2231  WHICH       Override default value for WHICH
2232  XARGS       Override default value for XARGS
2233  AWK         Override default value for AWK
2234  GREP        Override default value for GREP
2235  EGREP       Override default value for EGREP
2236  FGREP       Override default value for FGREP
2237  SED         Override default value for SED
2238  CYGPATH     Override default value for CYGPATH
2239  READLINK    Override default value for READLINK
2240  DF          Override default value for DF
2241  CPIO        Override default value for CPIO
2242  NICE        Override default value for NICE
2243  MAKE        Override default value for MAKE
2244  UNZIP       Override default value for UNZIP
2245  ZIP         Override default value for ZIP
2246  LDD         Override default value for LDD
2247  OTOOL       Override default value for OTOOL
2248  READELF     Override default value for READELF
2249  HG          Override default value for HG
2250  STAT        Override default value for STAT
2251  TIME        Override default value for TIME
2252  DTRACE      Override default value for DTRACE
2253  PATCH       Override default value for PATCH
2254  DSYMUTIL    Override default value for DSYMUTIL
2255  XATTR       Override default value for XATTR
2256  CODESIGN    Override default value for CODESIGN
2257  SETFILE     Override default value for SETFILE
2258  PKG_CONFIG  path to pkg-config utility
2259  JAVA        Override default value for JAVA
2260  JAVAC       Override default value for JAVAC
2261  JAVAH       Override default value for JAVAH
2262  JAR         Override default value for JAR
2263  JARSIGNER   Override default value for JARSIGNER
2264  CC          C compiler command
2265  CFLAGS      C compiler flags
2266  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2267              nonstandard directory <lib dir>
2268  LIBS        libraries to pass to the linker, e.g. -l<library>
2269  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2270              you have headers in a nonstandard directory <include dir>
2271  CXX         C++ compiler command
2272  CXXFLAGS    C++ compiler flags
2273  CPP         C preprocessor
2274  CXXCPP      C++ preprocessor
2275  AS          Override default value for AS
2276  AR          Override default value for AR
2277  LIPO        Override default value for LIPO
2278  STRIP       Override default value for STRIP
2279  NM          Override default value for NM
2280  GNM         Override default value for GNM
2281  OBJCOPY     Override default value for OBJCOPY
2282  OBJDUMP     Override default value for OBJDUMP
2283  BUILD_CC    Override default value for BUILD_CC
2284  BUILD_CXX   Override default value for BUILD_CXX
2285  BUILD_NM    Override default value for BUILD_NM
2286  BUILD_AR    Override default value for BUILD_AR
2287  BUILD_OBJCOPY
2288              Override default value for BUILD_OBJCOPY
2289  BUILD_STRIP Override default value for BUILD_STRIP
2290  JTREGEXE    Override default value for JTREGEXE
2291  XMKMF       Path to xmkmf, Makefile generator for X Window System
2292  FREETYPE_CFLAGS
2293              C compiler flags for FREETYPE, overriding pkg-config
2294  FREETYPE_LIBS
2295              linker flags for FREETYPE, overriding pkg-config
2296  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2297  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2298  LIBFFI_CFLAGS
2299              C compiler flags for LIBFFI, overriding pkg-config
2300  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2301  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2302  PNG_LIBS    linker flags for PNG, overriding pkg-config
2303  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2304  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2305  ICECC_CMD   Override default value for ICECC_CMD
2306  ICECC_CREATE_ENV
2307              Override default value for ICECC_CREATE_ENV
2308  ICECC_WRAPPER
2309              Override default value for ICECC_WRAPPER
2310  CCACHE      Override default value for CCACHE
2311
2312Use these variables to override the choices made by `configure' or to help
2313it to find libraries and programs with nonstandard names/locations.
2314
2315Report bugs to <build-dev@openjdk.java.net>.
2316OpenJDK home page: <http://openjdk.java.net>.
2317_ACEOF
2318ac_status=$?
2319fi
2320
2321if test "$ac_init_help" = "recursive"; then
2322  # If there are subdirs, report their specific --help.
2323  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2324    test -d "$ac_dir" ||
2325      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2326      continue
2327    ac_builddir=.
2328
2329case "$ac_dir" in
2330.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2331*)
2332  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2333  # A ".." for each directory in $ac_dir_suffix.
2334  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2335  case $ac_top_builddir_sub in
2336  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2337  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2338  esac ;;
2339esac
2340ac_abs_top_builddir=$ac_pwd
2341ac_abs_builddir=$ac_pwd$ac_dir_suffix
2342# for backward compatibility:
2343ac_top_builddir=$ac_top_build_prefix
2344
2345case $srcdir in
2346  .)  # We are building in place.
2347    ac_srcdir=.
2348    ac_top_srcdir=$ac_top_builddir_sub
2349    ac_abs_top_srcdir=$ac_pwd ;;
2350  [\\/]* | ?:[\\/]* )  # Absolute name.
2351    ac_srcdir=$srcdir$ac_dir_suffix;
2352    ac_top_srcdir=$srcdir
2353    ac_abs_top_srcdir=$srcdir ;;
2354  *) # Relative name.
2355    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2356    ac_top_srcdir=$ac_top_build_prefix$srcdir
2357    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2358esac
2359ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2360
2361    cd "$ac_dir" || { ac_status=$?; continue; }
2362    # Check for guested configure.
2363    if test -f "$ac_srcdir/configure.gnu"; then
2364      echo &&
2365      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2366    elif test -f "$ac_srcdir/configure"; then
2367      echo &&
2368      $SHELL "$ac_srcdir/configure" --help=recursive
2369    else
2370      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2371    fi || ac_status=$?
2372    cd "$ac_pwd" || { ac_status=$?; break; }
2373  done
2374fi
2375
2376test -n "$ac_init_help" && exit $ac_status
2377if $ac_init_version; then
2378  cat <<\_ACEOF
2379OpenJDK configure jdk9
2380generated by GNU Autoconf 2.69
2381
2382Copyright (C) 2012 Free Software Foundation, Inc.
2383This configure script is free software; the Free Software Foundation
2384gives unlimited permission to copy, distribute and modify it.
2385_ACEOF
2386  exit
2387fi
2388
2389## ------------------------ ##
2390## Autoconf initialization. ##
2391## ------------------------ ##
2392
2393# ac_fn_c_try_compile LINENO
2394# --------------------------
2395# Try to compile conftest.$ac_ext, and return whether this succeeded.
2396ac_fn_c_try_compile ()
2397{
2398  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2399  rm -f conftest.$ac_objext
2400  if { { ac_try="$ac_compile"
2401case "(($ac_try" in
2402  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2403  *) ac_try_echo=$ac_try;;
2404esac
2405eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2406$as_echo "$ac_try_echo"; } >&5
2407  (eval "$ac_compile") 2>conftest.err
2408  ac_status=$?
2409  if test -s conftest.err; then
2410    grep -v '^ *+' conftest.err >conftest.er1
2411    cat conftest.er1 >&5
2412    mv -f conftest.er1 conftest.err
2413  fi
2414  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2415  test $ac_status = 0; } && {
2416	 test -z "$ac_c_werror_flag" ||
2417	 test ! -s conftest.err
2418       } && test -s conftest.$ac_objext; then :
2419  ac_retval=0
2420else
2421  $as_echo "$as_me: failed program was:" >&5
2422sed 's/^/| /' conftest.$ac_ext >&5
2423
2424	ac_retval=1
2425fi
2426  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2427  as_fn_set_status $ac_retval
2428
2429} # ac_fn_c_try_compile
2430
2431# ac_fn_cxx_try_compile LINENO
2432# ----------------------------
2433# Try to compile conftest.$ac_ext, and return whether this succeeded.
2434ac_fn_cxx_try_compile ()
2435{
2436  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2437  rm -f conftest.$ac_objext
2438  if { { ac_try="$ac_compile"
2439case "(($ac_try" in
2440  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2441  *) ac_try_echo=$ac_try;;
2442esac
2443eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2444$as_echo "$ac_try_echo"; } >&5
2445  (eval "$ac_compile") 2>conftest.err
2446  ac_status=$?
2447  if test -s conftest.err; then
2448    grep -v '^ *+' conftest.err >conftest.er1
2449    cat conftest.er1 >&5
2450    mv -f conftest.er1 conftest.err
2451  fi
2452  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2453  test $ac_status = 0; } && {
2454	 test -z "$ac_cxx_werror_flag" ||
2455	 test ! -s conftest.err
2456       } && test -s conftest.$ac_objext; then :
2457  ac_retval=0
2458else
2459  $as_echo "$as_me: failed program was:" >&5
2460sed 's/^/| /' conftest.$ac_ext >&5
2461
2462	ac_retval=1
2463fi
2464  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2465  as_fn_set_status $ac_retval
2466
2467} # ac_fn_cxx_try_compile
2468
2469# ac_fn_c_try_cpp LINENO
2470# ----------------------
2471# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2472ac_fn_c_try_cpp ()
2473{
2474  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2475  if { { ac_try="$ac_cpp conftest.$ac_ext"
2476case "(($ac_try" in
2477  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2478  *) ac_try_echo=$ac_try;;
2479esac
2480eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2481$as_echo "$ac_try_echo"; } >&5
2482  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2483  ac_status=$?
2484  if test -s conftest.err; then
2485    grep -v '^ *+' conftest.err >conftest.er1
2486    cat conftest.er1 >&5
2487    mv -f conftest.er1 conftest.err
2488  fi
2489  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2490  test $ac_status = 0; } > conftest.i && {
2491	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2492	 test ! -s conftest.err
2493       }; then :
2494  ac_retval=0
2495else
2496  $as_echo "$as_me: failed program was:" >&5
2497sed 's/^/| /' conftest.$ac_ext >&5
2498
2499    ac_retval=1
2500fi
2501  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2502  as_fn_set_status $ac_retval
2503
2504} # ac_fn_c_try_cpp
2505
2506# ac_fn_cxx_try_cpp LINENO
2507# ------------------------
2508# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2509ac_fn_cxx_try_cpp ()
2510{
2511  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2512  if { { ac_try="$ac_cpp conftest.$ac_ext"
2513case "(($ac_try" in
2514  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2515  *) ac_try_echo=$ac_try;;
2516esac
2517eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2518$as_echo "$ac_try_echo"; } >&5
2519  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2520  ac_status=$?
2521  if test -s conftest.err; then
2522    grep -v '^ *+' conftest.err >conftest.er1
2523    cat conftest.er1 >&5
2524    mv -f conftest.er1 conftest.err
2525  fi
2526  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2527  test $ac_status = 0; } > conftest.i && {
2528	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2529	 test ! -s conftest.err
2530       }; then :
2531  ac_retval=0
2532else
2533  $as_echo "$as_me: failed program was:" >&5
2534sed 's/^/| /' conftest.$ac_ext >&5
2535
2536    ac_retval=1
2537fi
2538  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2539  as_fn_set_status $ac_retval
2540
2541} # ac_fn_cxx_try_cpp
2542
2543# ac_fn_c_try_link LINENO
2544# -----------------------
2545# Try to link conftest.$ac_ext, and return whether this succeeded.
2546ac_fn_c_try_link ()
2547{
2548  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2549  rm -f conftest.$ac_objext conftest$ac_exeext
2550  if { { ac_try="$ac_link"
2551case "(($ac_try" in
2552  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2553  *) ac_try_echo=$ac_try;;
2554esac
2555eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2556$as_echo "$ac_try_echo"; } >&5
2557  (eval "$ac_link") 2>conftest.err
2558  ac_status=$?
2559  if test -s conftest.err; then
2560    grep -v '^ *+' conftest.err >conftest.er1
2561    cat conftest.er1 >&5
2562    mv -f conftest.er1 conftest.err
2563  fi
2564  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2565  test $ac_status = 0; } && {
2566	 test -z "$ac_c_werror_flag" ||
2567	 test ! -s conftest.err
2568       } && test -s conftest$ac_exeext && {
2569	 test "$cross_compiling" = yes ||
2570	 test -x conftest$ac_exeext
2571       }; then :
2572  ac_retval=0
2573else
2574  $as_echo "$as_me: failed program was:" >&5
2575sed 's/^/| /' conftest.$ac_ext >&5
2576
2577	ac_retval=1
2578fi
2579  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2580  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2581  # interfere with the next link command; also delete a directory that is
2582  # left behind by Apple's compiler.  We do this before executing the actions.
2583  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2584  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2585  as_fn_set_status $ac_retval
2586
2587} # ac_fn_c_try_link
2588
2589# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2590# ---------------------------------------------------------
2591# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2592# the include files in INCLUDES and setting the cache variable VAR
2593# accordingly.
2594ac_fn_cxx_check_header_mongrel ()
2595{
2596  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2597  if eval \${$3+:} false; then :
2598  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2599$as_echo_n "checking for $2... " >&6; }
2600if eval \${$3+:} false; then :
2601  $as_echo_n "(cached) " >&6
2602fi
2603eval ac_res=\$$3
2604	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2605$as_echo "$ac_res" >&6; }
2606else
2607  # Is the header compilable?
2608{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2609$as_echo_n "checking $2 usability... " >&6; }
2610cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2611/* end confdefs.h.  */
2612$4
2613#include <$2>
2614_ACEOF
2615if ac_fn_cxx_try_compile "$LINENO"; then :
2616  ac_header_compiler=yes
2617else
2618  ac_header_compiler=no
2619fi
2620rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2622$as_echo "$ac_header_compiler" >&6; }
2623
2624# Is the header present?
2625{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2626$as_echo_n "checking $2 presence... " >&6; }
2627cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2628/* end confdefs.h.  */
2629#include <$2>
2630_ACEOF
2631if ac_fn_cxx_try_cpp "$LINENO"; then :
2632  ac_header_preproc=yes
2633else
2634  ac_header_preproc=no
2635fi
2636rm -f conftest.err conftest.i conftest.$ac_ext
2637{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2638$as_echo "$ac_header_preproc" >&6; }
2639
2640# So?  What about this header?
2641case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2642  yes:no: )
2643    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2644$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2646$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2647    ;;
2648  no:yes:* )
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2650$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2652$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2654$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2655    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2656$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2657    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2658$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2659( $as_echo "## ----------------------------------------- ##
2660## Report this to build-dev@openjdk.java.net ##
2661## ----------------------------------------- ##"
2662     ) | sed "s/^/$as_me: WARNING:     /" >&2
2663    ;;
2664esac
2665  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2666$as_echo_n "checking for $2... " >&6; }
2667if eval \${$3+:} false; then :
2668  $as_echo_n "(cached) " >&6
2669else
2670  eval "$3=\$ac_header_compiler"
2671fi
2672eval ac_res=\$$3
2673	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2674$as_echo "$ac_res" >&6; }
2675fi
2676  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2677
2678} # ac_fn_cxx_check_header_mongrel
2679
2680# ac_fn_cxx_try_run LINENO
2681# ------------------------
2682# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2683# that executables *can* be run.
2684ac_fn_cxx_try_run ()
2685{
2686  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2687  if { { ac_try="$ac_link"
2688case "(($ac_try" in
2689  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2690  *) ac_try_echo=$ac_try;;
2691esac
2692eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2693$as_echo "$ac_try_echo"; } >&5
2694  (eval "$ac_link") 2>&5
2695  ac_status=$?
2696  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2697  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2698  { { case "(($ac_try" in
2699  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2700  *) ac_try_echo=$ac_try;;
2701esac
2702eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2703$as_echo "$ac_try_echo"; } >&5
2704  (eval "$ac_try") 2>&5
2705  ac_status=$?
2706  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2707  test $ac_status = 0; }; }; then :
2708  ac_retval=0
2709else
2710  $as_echo "$as_me: program exited with status $ac_status" >&5
2711       $as_echo "$as_me: failed program was:" >&5
2712sed 's/^/| /' conftest.$ac_ext >&5
2713
2714       ac_retval=$ac_status
2715fi
2716  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2717  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2718  as_fn_set_status $ac_retval
2719
2720} # ac_fn_cxx_try_run
2721
2722# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2723# ---------------------------------------------------------
2724# Tests whether HEADER exists and can be compiled using the include files in
2725# INCLUDES, setting the cache variable VAR accordingly.
2726ac_fn_cxx_check_header_compile ()
2727{
2728  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2729  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2730$as_echo_n "checking for $2... " >&6; }
2731if eval \${$3+:} false; then :
2732  $as_echo_n "(cached) " >&6
2733else
2734  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2735/* end confdefs.h.  */
2736$4
2737#include <$2>
2738_ACEOF
2739if ac_fn_cxx_try_compile "$LINENO"; then :
2740  eval "$3=yes"
2741else
2742  eval "$3=no"
2743fi
2744rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2745fi
2746eval ac_res=\$$3
2747	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2748$as_echo "$ac_res" >&6; }
2749  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2750
2751} # ac_fn_cxx_check_header_compile
2752
2753# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2754# ----------------------------------------------
2755# Tries to find the compile-time value of EXPR in a program that includes
2756# INCLUDES, setting VAR accordingly. Returns whether the value could be
2757# computed
2758ac_fn_cxx_compute_int ()
2759{
2760  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2761  if test "$cross_compiling" = yes; then
2762    # Depending upon the size, compute the lo and hi bounds.
2763cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2764/* end confdefs.h.  */
2765$4
2766int
2767main ()
2768{
2769static int test_array [1 - 2 * !(($2) >= 0)];
2770test_array [0] = 0;
2771return test_array [0];
2772
2773  ;
2774  return 0;
2775}
2776_ACEOF
2777if ac_fn_cxx_try_compile "$LINENO"; then :
2778  ac_lo=0 ac_mid=0
2779  while :; do
2780    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2781/* end confdefs.h.  */
2782$4
2783int
2784main ()
2785{
2786static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2787test_array [0] = 0;
2788return test_array [0];
2789
2790  ;
2791  return 0;
2792}
2793_ACEOF
2794if ac_fn_cxx_try_compile "$LINENO"; then :
2795  ac_hi=$ac_mid; break
2796else
2797  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2798			if test $ac_lo -le $ac_mid; then
2799			  ac_lo= ac_hi=
2800			  break
2801			fi
2802			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2803fi
2804rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2805  done
2806else
2807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2808/* end confdefs.h.  */
2809$4
2810int
2811main ()
2812{
2813static int test_array [1 - 2 * !(($2) < 0)];
2814test_array [0] = 0;
2815return test_array [0];
2816
2817  ;
2818  return 0;
2819}
2820_ACEOF
2821if ac_fn_cxx_try_compile "$LINENO"; then :
2822  ac_hi=-1 ac_mid=-1
2823  while :; do
2824    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2825/* end confdefs.h.  */
2826$4
2827int
2828main ()
2829{
2830static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2831test_array [0] = 0;
2832return test_array [0];
2833
2834  ;
2835  return 0;
2836}
2837_ACEOF
2838if ac_fn_cxx_try_compile "$LINENO"; then :
2839  ac_lo=$ac_mid; break
2840else
2841  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2842			if test $ac_mid -le $ac_hi; then
2843			  ac_lo= ac_hi=
2844			  break
2845			fi
2846			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2847fi
2848rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2849  done
2850else
2851  ac_lo= ac_hi=
2852fi
2853rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2854fi
2855rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2856# Binary search between lo and hi bounds.
2857while test "x$ac_lo" != "x$ac_hi"; do
2858  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2859  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2860/* end confdefs.h.  */
2861$4
2862int
2863main ()
2864{
2865static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2866test_array [0] = 0;
2867return test_array [0];
2868
2869  ;
2870  return 0;
2871}
2872_ACEOF
2873if ac_fn_cxx_try_compile "$LINENO"; then :
2874  ac_hi=$ac_mid
2875else
2876  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2877fi
2878rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2879done
2880case $ac_lo in #((
2881?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2882'') ac_retval=1 ;;
2883esac
2884  else
2885    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2886/* end confdefs.h.  */
2887$4
2888static long int longval () { return $2; }
2889static unsigned long int ulongval () { return $2; }
2890#include <stdio.h>
2891#include <stdlib.h>
2892int
2893main ()
2894{
2895
2896  FILE *f = fopen ("conftest.val", "w");
2897  if (! f)
2898    return 1;
2899  if (($2) < 0)
2900    {
2901      long int i = longval ();
2902      if (i != ($2))
2903	return 1;
2904      fprintf (f, "%ld", i);
2905    }
2906  else
2907    {
2908      unsigned long int i = ulongval ();
2909      if (i != ($2))
2910	return 1;
2911      fprintf (f, "%lu", i);
2912    }
2913  /* Do not output a trailing newline, as this causes \r\n confusion
2914     on some platforms.  */
2915  return ferror (f) || fclose (f) != 0;
2916
2917  ;
2918  return 0;
2919}
2920_ACEOF
2921if ac_fn_cxx_try_run "$LINENO"; then :
2922  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2923else
2924  ac_retval=1
2925fi
2926rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2927  conftest.$ac_objext conftest.beam conftest.$ac_ext
2928rm -f conftest.val
2929
2930  fi
2931  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2932  as_fn_set_status $ac_retval
2933
2934} # ac_fn_cxx_compute_int
2935
2936# ac_fn_cxx_try_link LINENO
2937# -------------------------
2938# Try to link conftest.$ac_ext, and return whether this succeeded.
2939ac_fn_cxx_try_link ()
2940{
2941  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2942  rm -f conftest.$ac_objext conftest$ac_exeext
2943  if { { ac_try="$ac_link"
2944case "(($ac_try" in
2945  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2946  *) ac_try_echo=$ac_try;;
2947esac
2948eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2949$as_echo "$ac_try_echo"; } >&5
2950  (eval "$ac_link") 2>conftest.err
2951  ac_status=$?
2952  if test -s conftest.err; then
2953    grep -v '^ *+' conftest.err >conftest.er1
2954    cat conftest.er1 >&5
2955    mv -f conftest.er1 conftest.err
2956  fi
2957  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2958  test $ac_status = 0; } && {
2959	 test -z "$ac_cxx_werror_flag" ||
2960	 test ! -s conftest.err
2961       } && test -s conftest$ac_exeext && {
2962	 test "$cross_compiling" = yes ||
2963	 test -x conftest$ac_exeext
2964       }; then :
2965  ac_retval=0
2966else
2967  $as_echo "$as_me: failed program was:" >&5
2968sed 's/^/| /' conftest.$ac_ext >&5
2969
2970	ac_retval=1
2971fi
2972  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2973  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2974  # interfere with the next link command; also delete a directory that is
2975  # left behind by Apple's compiler.  We do this before executing the actions.
2976  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2977  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2978  as_fn_set_status $ac_retval
2979
2980} # ac_fn_cxx_try_link
2981
2982# ac_fn_cxx_check_func LINENO FUNC VAR
2983# ------------------------------------
2984# Tests whether FUNC exists, setting the cache variable VAR accordingly
2985ac_fn_cxx_check_func ()
2986{
2987  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2988  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2989$as_echo_n "checking for $2... " >&6; }
2990if eval \${$3+:} false; then :
2991  $as_echo_n "(cached) " >&6
2992else
2993  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2994/* end confdefs.h.  */
2995/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2996   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2997#define $2 innocuous_$2
2998
2999/* System header to define __stub macros and hopefully few prototypes,
3000    which can conflict with char $2 (); below.
3001    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
3002    <limits.h> exists even on freestanding compilers.  */
3003
3004#ifdef __STDC__
3005# include <limits.h>
3006#else
3007# include <assert.h>
3008#endif
3009
3010#undef $2
3011
3012/* Override any GCC internal prototype to avoid an error.
3013   Use char because int might match the return type of a GCC
3014   builtin and then its argument prototype would still apply.  */
3015#ifdef __cplusplus
3016extern "C"
3017#endif
3018char $2 ();
3019/* The GNU C library defines this for functions which it implements
3020    to always fail with ENOSYS.  Some functions are actually named
3021    something starting with __ and the normal name is an alias.  */
3022#if defined __stub_$2 || defined __stub___$2
3023choke me
3024#endif
3025
3026int
3027main ()
3028{
3029return $2 ();
3030  ;
3031  return 0;
3032}
3033_ACEOF
3034if ac_fn_cxx_try_link "$LINENO"; then :
3035  eval "$3=yes"
3036else
3037  eval "$3=no"
3038fi
3039rm -f core conftest.err conftest.$ac_objext \
3040    conftest$ac_exeext conftest.$ac_ext
3041fi
3042eval ac_res=\$$3
3043	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3044$as_echo "$ac_res" >&6; }
3045  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3046
3047} # ac_fn_cxx_check_func
3048
3049# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3050# -------------------------------------------------------
3051# Tests whether HEADER exists and can be compiled using the include files in
3052# INCLUDES, setting the cache variable VAR accordingly.
3053ac_fn_c_check_header_compile ()
3054{
3055  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3056  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3057$as_echo_n "checking for $2... " >&6; }
3058if eval \${$3+:} false; then :
3059  $as_echo_n "(cached) " >&6
3060else
3061  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3062/* end confdefs.h.  */
3063$4
3064#include <$2>
3065_ACEOF
3066if ac_fn_c_try_compile "$LINENO"; then :
3067  eval "$3=yes"
3068else
3069  eval "$3=no"
3070fi
3071rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3072fi
3073eval ac_res=\$$3
3074	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3075$as_echo "$ac_res" >&6; }
3076  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3077
3078} # ac_fn_c_check_header_compile
3079cat >config.log <<_ACEOF
3080This file contains any messages produced by compilers while
3081running configure, to aid debugging if configure makes a mistake.
3082
3083It was created by OpenJDK $as_me jdk9, which was
3084generated by GNU Autoconf 2.69.  Invocation command line was
3085
3086  $ $0 $@
3087
3088_ACEOF
3089exec 5>>config.log
3090{
3091cat <<_ASUNAME
3092## --------- ##
3093## Platform. ##
3094## --------- ##
3095
3096hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3097uname -m = `(uname -m) 2>/dev/null || echo unknown`
3098uname -r = `(uname -r) 2>/dev/null || echo unknown`
3099uname -s = `(uname -s) 2>/dev/null || echo unknown`
3100uname -v = `(uname -v) 2>/dev/null || echo unknown`
3101
3102/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3103/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3104
3105/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3106/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3107/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3108/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3109/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3110/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3111/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3112
3113_ASUNAME
3114
3115as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3116for as_dir in $PATH
3117do
3118  IFS=$as_save_IFS
3119  test -z "$as_dir" && as_dir=.
3120    $as_echo "PATH: $as_dir"
3121  done
3122IFS=$as_save_IFS
3123
3124} >&5
3125
3126cat >&5 <<_ACEOF
3127
3128
3129## ----------- ##
3130## Core tests. ##
3131## ----------- ##
3132
3133_ACEOF
3134
3135
3136# Keep a trace of the command line.
3137# Strip out --no-create and --no-recursion so they do not pile up.
3138# Strip out --silent because we don't want to record it for future runs.
3139# Also quote any args containing shell meta-characters.
3140# Make two passes to allow for proper duplicate-argument suppression.
3141ac_configure_args=
3142ac_configure_args0=
3143ac_configure_args1=
3144ac_must_keep_next=false
3145for ac_pass in 1 2
3146do
3147  for ac_arg
3148  do
3149    case $ac_arg in
3150    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3151    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3152    | -silent | --silent | --silen | --sile | --sil)
3153      continue ;;
3154    *\'*)
3155      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3156    esac
3157    case $ac_pass in
3158    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3159    2)
3160      as_fn_append ac_configure_args1 " '$ac_arg'"
3161      if test $ac_must_keep_next = true; then
3162	ac_must_keep_next=false # Got value, back to normal.
3163      else
3164	case $ac_arg in
3165	  *=* | --config-cache | -C | -disable-* | --disable-* \
3166	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3167	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3168	  | -with-* | --with-* | -without-* | --without-* | --x)
3169	    case "$ac_configure_args0 " in
3170	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3171	    esac
3172	    ;;
3173	  -* ) ac_must_keep_next=true ;;
3174	esac
3175      fi
3176      as_fn_append ac_configure_args " '$ac_arg'"
3177      ;;
3178    esac
3179  done
3180done
3181{ ac_configure_args0=; unset ac_configure_args0;}
3182{ ac_configure_args1=; unset ac_configure_args1;}
3183
3184# When interrupted or exit'd, cleanup temporary files, and complete
3185# config.log.  We remove comments because anyway the quotes in there
3186# would cause problems or look ugly.
3187# WARNING: Use '\'' to represent an apostrophe within the trap.
3188# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3189trap 'exit_status=$?
3190  # Save into config.log some information that might help in debugging.
3191  {
3192    echo
3193
3194    $as_echo "## ---------------- ##
3195## Cache variables. ##
3196## ---------------- ##"
3197    echo
3198    # The following way of writing the cache mishandles newlines in values,
3199(
3200  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3201    eval ac_val=\$$ac_var
3202    case $ac_val in #(
3203    *${as_nl}*)
3204      case $ac_var in #(
3205      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3206$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3207      esac
3208      case $ac_var in #(
3209      _ | IFS | as_nl) ;; #(
3210      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3211      *) { eval $ac_var=; unset $ac_var;} ;;
3212      esac ;;
3213    esac
3214  done
3215  (set) 2>&1 |
3216    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3217    *${as_nl}ac_space=\ *)
3218      sed -n \
3219	"s/'\''/'\''\\\\'\'''\''/g;
3220	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3221      ;; #(
3222    *)
3223      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3224      ;;
3225    esac |
3226    sort
3227)
3228    echo
3229
3230    $as_echo "## ----------------- ##
3231## Output variables. ##
3232## ----------------- ##"
3233    echo
3234    for ac_var in $ac_subst_vars
3235    do
3236      eval ac_val=\$$ac_var
3237      case $ac_val in
3238      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3239      esac
3240      $as_echo "$ac_var='\''$ac_val'\''"
3241    done | sort
3242    echo
3243
3244    if test -n "$ac_subst_files"; then
3245      $as_echo "## ------------------- ##
3246## File substitutions. ##
3247## ------------------- ##"
3248      echo
3249      for ac_var in $ac_subst_files
3250      do
3251	eval ac_val=\$$ac_var
3252	case $ac_val in
3253	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3254	esac
3255	$as_echo "$ac_var='\''$ac_val'\''"
3256      done | sort
3257      echo
3258    fi
3259
3260    if test -s confdefs.h; then
3261      $as_echo "## ----------- ##
3262## confdefs.h. ##
3263## ----------- ##"
3264      echo
3265      cat confdefs.h
3266      echo
3267    fi
3268    test "$ac_signal" != 0 &&
3269      $as_echo "$as_me: caught signal $ac_signal"
3270    $as_echo "$as_me: exit $exit_status"
3271  } >&5
3272  rm -f core *.core core.conftest.* &&
3273    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3274    exit $exit_status
3275' 0
3276for ac_signal in 1 2 13 15; do
3277  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3278done
3279ac_signal=0
3280
3281# confdefs.h avoids OS command line length limits that DEFS can exceed.
3282rm -f -r conftest* confdefs.h
3283
3284$as_echo "/* confdefs.h */" > confdefs.h
3285
3286# Predefined preprocessor variables.
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_NAME "$PACKAGE_NAME"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_VERSION "$PACKAGE_VERSION"
3298_ACEOF
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_STRING "$PACKAGE_STRING"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3306_ACEOF
3307
3308cat >>confdefs.h <<_ACEOF
3309#define PACKAGE_URL "$PACKAGE_URL"
3310_ACEOF
3311
3312
3313# Let the site file select an alternate cache file if it wants to.
3314# Prefer an explicitly selected file to automatically selected ones.
3315ac_site_file1=NONE
3316ac_site_file2=NONE
3317if test -n "$CONFIG_SITE"; then
3318  # We do not want a PATH search for config.site.
3319  case $CONFIG_SITE in #((
3320    -*)  ac_site_file1=./$CONFIG_SITE;;
3321    */*) ac_site_file1=$CONFIG_SITE;;
3322    *)   ac_site_file1=./$CONFIG_SITE;;
3323  esac
3324elif test "x$prefix" != xNONE; then
3325  ac_site_file1=$prefix/share/config.site
3326  ac_site_file2=$prefix/etc/config.site
3327else
3328  ac_site_file1=$ac_default_prefix/share/config.site
3329  ac_site_file2=$ac_default_prefix/etc/config.site
3330fi
3331for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3332do
3333  test "x$ac_site_file" = xNONE && continue
3334  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3335    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3336$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3337    sed 's/^/| /' "$ac_site_file" >&5
3338    . "$ac_site_file" \
3339      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3340$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3341as_fn_error $? "failed to load site script $ac_site_file
3342See \`config.log' for more details" "$LINENO" 5; }
3343  fi
3344done
3345
3346if test -r "$cache_file"; then
3347  # Some versions of bash will fail to source /dev/null (special files
3348  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3349  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3350    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3351$as_echo "$as_me: loading cache $cache_file" >&6;}
3352    case $cache_file in
3353      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3354      *)                      . "./$cache_file";;
3355    esac
3356  fi
3357else
3358  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3359$as_echo "$as_me: creating cache $cache_file" >&6;}
3360  >$cache_file
3361fi
3362
3363# Check that the precious variables saved in the cache have kept the same
3364# value.
3365ac_cache_corrupted=false
3366for ac_var in $ac_precious_vars; do
3367  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3368  eval ac_new_set=\$ac_env_${ac_var}_set
3369  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3370  eval ac_new_val=\$ac_env_${ac_var}_value
3371  case $ac_old_set,$ac_new_set in
3372    set,)
3373      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3374$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3375      ac_cache_corrupted=: ;;
3376    ,set)
3377      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3378$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3379      ac_cache_corrupted=: ;;
3380    ,);;
3381    *)
3382      if test "x$ac_old_val" != "x$ac_new_val"; then
3383	# differences in whitespace do not lead to failure.
3384	ac_old_val_w=`echo x $ac_old_val`
3385	ac_new_val_w=`echo x $ac_new_val`
3386	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3387	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3388$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3389	  ac_cache_corrupted=:
3390	else
3391	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3392$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3393	  eval $ac_var=\$ac_old_val
3394	fi
3395	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3396$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3397	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3398$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3399      fi;;
3400  esac
3401  # Pass precious variables to config.status.
3402  if test "$ac_new_set" = set; then
3403    case $ac_new_val in
3404    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3405    *) ac_arg=$ac_var=$ac_new_val ;;
3406    esac
3407    case " $ac_configure_args " in
3408      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3409      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3410    esac
3411  fi
3412done
3413if $ac_cache_corrupted; then
3414  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3415$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3416  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3417$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3418  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3419fi
3420## -------------------- ##
3421## Main body of script. ##
3422## -------------------- ##
3423
3424ac_ext=c
3425ac_cpp='$CPP $CPPFLAGS'
3426ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3427ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3428ac_compiler_gnu=$ac_cv_c_compiler_gnu
3429
3430
3431
3432ac_aux_dir=
3433for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3434  if test -f "$ac_dir/install-sh"; then
3435    ac_aux_dir=$ac_dir
3436    ac_install_sh="$ac_aux_dir/install-sh -c"
3437    break
3438  elif test -f "$ac_dir/install.sh"; then
3439    ac_aux_dir=$ac_dir
3440    ac_install_sh="$ac_aux_dir/install.sh -c"
3441    break
3442  elif test -f "$ac_dir/shtool"; then
3443    ac_aux_dir=$ac_dir
3444    ac_install_sh="$ac_aux_dir/shtool install -c"
3445    break
3446  fi
3447done
3448if test -z "$ac_aux_dir"; then
3449  as_fn_error $? "cannot find install-sh, install.sh, or shtool in $TOPDIR/common/autoconf/build-aux \"$srcdir\"/$TOPDIR/common/autoconf/build-aux" "$LINENO" 5
3450fi
3451
3452# These three variables are undocumented and unsupported,
3453# and are intended to be withdrawn in a future Autoconf release.
3454# They can cause serious problems if a builder's source tree is in a directory
3455# whose full name contains unusual characters.
3456ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3457ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3458ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3459
3460
3461# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3462
3463#
3464# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3465# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3466#
3467# This code is free software; you can redistribute it and/or modify it
3468# under the terms of the GNU General Public License version 2 only, as
3469# published by the Free Software Foundation.  Oracle designates this
3470# particular file as subject to the "Classpath" exception as provided
3471# by Oracle in the LICENSE file that accompanied this code.
3472#
3473# This code is distributed in the hope that it will be useful, but WITHOUT
3474# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3475# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3476# version 2 for more details (a copy is included in the LICENSE file that
3477# accompanied this code).
3478#
3479# You should have received a copy of the GNU General Public License version
3480# 2 along with this work; if not, write to the Free Software Foundation,
3481# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3482#
3483# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3484# or visit www.oracle.com if you need additional information or have any
3485# questions.
3486#
3487
3488#
3489# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3490#
3491# This program is free software; you can redistribute it and/or modify
3492# it under the terms of the GNU General Public License as published by
3493# the Free Software Foundation; either version 2 of the License, or
3494# (at your option) any later version.
3495#
3496# This program is distributed in the hope that it will be useful, but
3497# WITHOUT ANY WARRANTY; without even the implied warranty of
3498# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3499# General Public License for more details.
3500#
3501# You should have received a copy of the GNU General Public License
3502# along with this program; if not, write to the Free Software
3503# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3504#
3505# As a special exception to the GNU General Public License, if you
3506# distribute this file as part of a program that contains a
3507# configuration script generated by Autoconf, you may include it under
3508# the same distribution terms that you use for the rest of that program.
3509
3510# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3511# ----------------------------------
3512# PKG_PROG_PKG_CONFIG
3513
3514# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3515#
3516# Check to see whether a particular set of modules exists.  Similar
3517# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3518#
3519#
3520# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3521# this or PKG_CHECK_MODULES is called, or make sure to call
3522# PKG_CHECK_EXISTS manually
3523# --------------------------------------------------------------
3524
3525
3526
3527# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3528# ---------------------------------------------
3529# _PKG_CONFIG
3530
3531# _PKG_SHORT_ERRORS_SUPPORTED
3532# -----------------------------
3533# _PKG_SHORT_ERRORS_SUPPORTED
3534
3535
3536# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3537# [ACTION-IF-NOT-FOUND])
3538#
3539#
3540# Note that if there is a possibility the first call to
3541# PKG_CHECK_MODULES might not happen, you should be sure to include an
3542# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3543#
3544#
3545# --------------------------------------------------------------
3546# PKG_CHECK_MODULES
3547
3548
3549# Include these first...
3550#
3551# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3552# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3553#
3554# This code is free software; you can redistribute it and/or modify it
3555# under the terms of the GNU General Public License version 2 only, as
3556# published by the Free Software Foundation.  Oracle designates this
3557# particular file as subject to the "Classpath" exception as provided
3558# by Oracle in the LICENSE file that accompanied this code.
3559#
3560# This code is distributed in the hope that it will be useful, but WITHOUT
3561# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3562# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3563# version 2 for more details (a copy is included in the LICENSE file that
3564# accompanied this code).
3565#
3566# You should have received a copy of the GNU General Public License version
3567# 2 along with this work; if not, write to the Free Software Foundation,
3568# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3569#
3570# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3571# or visit www.oracle.com if you need additional information or have any
3572# questions.
3573#
3574
3575# Create a function/macro that takes a series of named arguments. The call is
3576# similar to AC_DEFUN, but the setup of the function looks like this:
3577# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3578# ... do something
3579#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3580# ])
3581# A star (*) in front of a named argument means that it is required and it's
3582# presence will be verified. To pass e.g. the first value as a normal indexed
3583# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3584# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3585# "ARG_FOO".
3586#
3587# The generated function can be called like this:
3588# MYFUNC(FOO: [foo-val],
3589#     BAR: [
3590#         $ECHO hello world
3591#     ])
3592# Note that the argument value must start on the same line as the argument name.
3593#
3594# Argument 1: Name of the function to define
3595# Argument 2: List of legal named arguments, with a * prefix for required arguments
3596# Argument 3: Argument array to treat as named, typically $@
3597# Argument 4: The main function body
3598
3599
3600# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3601# If so, then append $1 to $2 \
3602# Also set JVM_ARG_OK to true/false depending on outcome.
3603
3604
3605# Appends a string to a path variable, only adding the : when needed.
3606
3607
3608# Prepends a string to a path variable, only adding the : when needed.
3609
3610
3611# This will make sure the given variable points to a full and proper
3612# path. This means:
3613# 1) There will be no spaces in the path. On unix platforms,
3614#    spaces in the path will result in an error. On Windows,
3615#    the path will be rewritten using short-style to be space-free.
3616# 2) The path will be absolute, and it will be in unix-style (on
3617#     cygwin).
3618# $1: The name of the variable to fix
3619
3620
3621# This will make sure the given variable points to a executable
3622# with a full and proper path. This means:
3623# 1) There will be no spaces in the path. On unix platforms,
3624#    spaces in the path will result in an error. On Windows,
3625#    the path will be rewritten using short-style to be space-free.
3626# 2) The path will be absolute, and it will be in unix-style (on
3627#     cygwin).
3628# Any arguments given to the executable is preserved.
3629# If the input variable does not have a directory specification, then
3630# it need to be in the PATH.
3631# $1: The name of the variable to fix
3632
3633
3634
3635
3636# Register a --with argument but mark it as deprecated
3637# $1: The name of the with argument to deprecate, not including --with-
3638
3639
3640# Register a --enable argument but mark it as deprecated
3641# $1: The name of the with argument to deprecate, not including --enable-
3642# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3643# $3: Messages to user.
3644
3645
3646
3647
3648# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3649# $1: variable to check
3650
3651
3652# Check that there are no unprocessed overridden variables left.
3653# If so, they are an incorrect argument and we will exit with an error.
3654
3655
3656# Setup a tool for the given variable. If correctly specified by the user,
3657# use that value, otherwise search for the tool using the supplied code snippet.
3658# $1: variable to set
3659# $2: code snippet to call to look for the tool
3660# $3: code snippet to call if variable was used to find tool
3661
3662
3663# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3664# $1: variable to set
3665# $2: executable name (or list of names) to look for
3666
3667
3668# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3669# $1: variable to set
3670# $2: executable name (or list of names) to look for
3671
3672
3673# Like BASIC_PATH_PROGS but fails if no tool was found.
3674# $1: variable to set
3675# $2: executable name (or list of names) to look for
3676
3677
3678# Like BASIC_SETUP_TOOL but fails if no tool was found.
3679# $1: variable to set
3680# $2: autoconf macro to call to look for the special tool
3681
3682
3683# Setup the most fundamental tools that relies on not much else to set up,
3684# but is used by much of the early bootstrap code.
3685
3686
3687# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3688
3689
3690# Evaluates platform specific overrides for devkit variables.
3691# $1: Name of variable
3692
3693
3694
3695
3696
3697
3698#%%% Simple tools %%%
3699
3700# Check if we have found a usable version of make
3701# $1: the path to a potential make binary (or empty)
3702# $2: the description on how we found this
3703
3704
3705
3706
3707# Goes looking for a usable version of GNU make.
3708
3709
3710
3711
3712
3713
3714
3715
3716# Check if build directory is on local disk. If not possible to determine,
3717# we prefer to claim it's local.
3718# Argument 1: directory to test
3719# Argument 2: what to do if it is on local disk
3720# Argument 3: what to do otherwise (remote disk or failure)
3721
3722
3723# Check that source files have basic read permissions set. This might
3724# not be the case in cygwin in certain conditions.
3725
3726
3727
3728
3729# Check for support for specific options in bash
3730
3731
3732################################################################################
3733#
3734# Default make target
3735#
3736
3737
3738# Code to run after AC_OUTPUT
3739
3740
3741#
3742# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3743# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3744#
3745# This code is free software; you can redistribute it and/or modify it
3746# under the terms of the GNU General Public License version 2 only, as
3747# published by the Free Software Foundation.  Oracle designates this
3748# particular file as subject to the "Classpath" exception as provided
3749# by Oracle in the LICENSE file that accompanied this code.
3750#
3751# This code is distributed in the hope that it will be useful, but WITHOUT
3752# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3753# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3754# version 2 for more details (a copy is included in the LICENSE file that
3755# accompanied this code).
3756#
3757# You should have received a copy of the GNU General Public License version
3758# 2 along with this work; if not, write to the Free Software Foundation,
3759# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3760#
3761# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3762# or visit www.oracle.com if you need additional information or have any
3763# questions.
3764#
3765
3766
3767
3768
3769
3770# Helper function which possibly converts a path using DOS-style short mode.
3771# If so, the updated path is stored in $new_path.
3772# $1: The path to check
3773
3774
3775# Helper function which possibly converts a path using DOS-style short mode.
3776# If so, the updated path is stored in $new_path.
3777# $1: The path to check
3778
3779
3780# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3781# and could probably be heavily simplified. However, all changes in this
3782# area tend to need lot of testing in different scenarios, and in lack of
3783# proper unit testing, cleaning this up has not been deemed worth the effort
3784# at the moment.
3785
3786
3787
3788
3789
3790
3791
3792
3793
3794# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3795
3796
3797
3798
3799# ... then the rest
3800#
3801# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3802# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3803#
3804# This code is free software; you can redistribute it and/or modify it
3805# under the terms of the GNU General Public License version 2 only, as
3806# published by the Free Software Foundation.  Oracle designates this
3807# particular file as subject to the "Classpath" exception as provided
3808# by Oracle in the LICENSE file that accompanied this code.
3809#
3810# This code is distributed in the hope that it will be useful, but WITHOUT
3811# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3812# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3813# version 2 for more details (a copy is included in the LICENSE file that
3814# accompanied this code).
3815#
3816# You should have received a copy of the GNU General Public License version
3817# 2 along with this work; if not, write to the Free Software Foundation,
3818# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3819#
3820# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3821# or visit www.oracle.com if you need additional information or have any
3822# questions.
3823#
3824
3825########################################################################
3826# This file handles detection of the Boot JDK. The Boot JDK detection
3827# process has been developed as a response to solve a complex real-world
3828# problem. Initially, it was simple, but it has grown as platform after
3829# platform, idiosyncracy after idiosyncracy has been supported.
3830#
3831# The basic idea is this:
3832# 1) You need an acceptable *) JDK to use as a Boot JDK
3833# 2) There are several ways to locate a JDK, that are mostly platform
3834#    dependent **)
3835# 3) You can have multiple JDKs installed
3836# 4) If possible, configure should try to dig out an acceptable JDK
3837#    automatically, without having to resort to command-line options
3838#
3839# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3840#     javac) and not a JRE, etc.
3841#
3842# **) On Windows we typically use a well-known path.
3843#     On MacOSX we typically use the tool java_home.
3844#     On Linux we typically find javac in the $PATH, and then follow a
3845#     chain of symlinks that often ends up in a real JDK.
3846#
3847# This leads to the code where we check in different ways to locate a
3848# JDK, and if one is found, check if it is acceptable. If not, we print
3849# our reasons for rejecting it (useful when debugging non-working
3850# configure situations) and continue checking the next one.
3851########################################################################
3852
3853# Execute the check given as argument, and verify the result
3854# If the Boot JDK was previously found, do nothing
3855# $1 A command line (typically autoconf macro) to execute
3856
3857
3858# Test: Is bootjdk explicitely set by command line arguments?
3859
3860
3861# Test: Is $JAVA_HOME set?
3862
3863
3864# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3865
3866
3867# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3868# $1: Argument to the java_home binary (optional)
3869
3870
3871# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3872
3873
3874# Look for a jdk in the given path. If there are multiple, try to select the newest.
3875# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3876# $1 = Path to directory containing jdk installations.
3877# $2 = String to append to the found JDK directory to get the proper JDK home
3878
3879
3880# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3881# environmental variable as base for where to look.
3882# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3883
3884
3885# Test: Is there a JDK installed in default, well-known locations?
3886
3887
3888# Check that a command-line tool in the Boot JDK is correct
3889# $1 = name of variable to assign
3890# $2 = name of binary
3891
3892
3893###############################################################################
3894#
3895# We need a Boot JDK to bootstrap the build.
3896#
3897
3898
3899
3900
3901
3902# BUILD_JDK: the location of the latest JDK that can run
3903#   on the host system and supports the target class file version
3904#   generated in this JDK build.  This variable should only be
3905#   used after the launchers are built.
3906#
3907
3908# Execute the check given as argument, and verify the result.
3909# If the JDK was previously found, do nothing.
3910# $1 A command line (typically autoconf macro) to execute
3911
3912
3913# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3914# is different than the host system doing the build (e.g. cross-compilation),
3915# a special BUILD_JDK is built as part of the build process.  An external
3916# prebuilt BUILD_JDK can also be supplied.
3917
3918
3919#
3920# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3921# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3922#
3923# This code is free software; you can redistribute it and/or modify it
3924# under the terms of the GNU General Public License version 2 only, as
3925# published by the Free Software Foundation.  Oracle designates this
3926# particular file as subject to the "Classpath" exception as provided
3927# by Oracle in the LICENSE file that accompanied this code.
3928#
3929# This code is distributed in the hope that it will be useful, but WITHOUT
3930# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3931# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3932# version 2 for more details (a copy is included in the LICENSE file that
3933# accompanied this code).
3934#
3935# You should have received a copy of the GNU General Public License version
3936# 2 along with this work; if not, write to the Free Software Foundation,
3937# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3938#
3939# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3940# or visit www.oracle.com if you need additional information or have any
3941# questions.
3942#
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954
3955
3956
3957
3958
3959
3960################################################################################
3961#
3962# Runs icecc-create-env once and prints the error if it fails
3963#
3964# $1: arguments to icecc-create-env
3965# $2: log file
3966#
3967
3968
3969################################################################################
3970#
3971# Optionally enable distributed compilation of native code using icecc/icecream
3972#
3973
3974
3975
3976
3977
3978
3979
3980#
3981# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3982# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3983#
3984# This code is free software; you can redistribute it and/or modify it
3985# under the terms of the GNU General Public License version 2 only, as
3986# published by the Free Software Foundation.  Oracle designates this
3987# particular file as subject to the "Classpath" exception as provided
3988# by Oracle in the LICENSE file that accompanied this code.
3989#
3990# This code is distributed in the hope that it will be useful, but WITHOUT
3991# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3992# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3993# version 2 for more details (a copy is included in the LICENSE file that
3994# accompanied this code).
3995#
3996# You should have received a copy of the GNU General Public License version
3997# 2 along with this work; if not, write to the Free Software Foundation,
3998# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3999#
4000# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4001# or visit www.oracle.com if you need additional information or have any
4002# questions.
4003#
4004
4005# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4006# corresponding configure arguments instead
4007
4008
4009# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4010# that configure can use them while detecting compilers.
4011# TOOLCHAIN_TYPE is available here.
4012# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4013
4014
4015
4016
4017
4018
4019# Documentation on common flags used for solstudio in HIGHEST.
4020#
4021# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4022#          done with care, there are some assumptions below that need to
4023#          be understood about the use of pointers, and IEEE behavior.
4024#
4025# -fns: Use non-standard floating point mode (not IEEE 754)
4026# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4027# -fsingle: Use single precision floating point with 'float'
4028# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4029#   (Source with excessing pointer casting and data access with mixed
4030#    pointer types are not recommended)
4031# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4034# -xrestrict: Pointer parameters to functions do not overlap
4035#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4036#    If you pass in multiple pointers to the same data, do not use this)
4037# -xlibmil: Inline some library routines
4038#   (If you expect perfect errno behavior, do not use this)
4039# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4040#   (If you expect perfect errno behavior, do not use this)
4041#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4042
4043    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4044    # Bug?
4045    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4046    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4047    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4048    #fi
4049
4050
4051
4052
4053
4054
4055################################################################################
4056# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4057#      conditionals against.
4058# $2 - Optional prefix for each variable defined.
4059
4060
4061# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4062#                                  IF_FALSE: [RUN-IF-FALSE])
4063# ------------------------------------------------------------
4064# Check that the C compiler supports an argument
4065
4066
4067
4068
4069# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4070#                                    IF_FALSE: [RUN-IF-FALSE])
4071# ------------------------------------------------------------
4072# Check that the C++ compiler supports an argument
4073
4074
4075
4076
4077# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4078#                                IF_FALSE: [RUN-IF-FALSE])
4079# ------------------------------------------------------------
4080# Check that the C and C++ compilers support an argument
4081
4082
4083
4084
4085# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4086#                                   IF_FALSE: [RUN-IF-FALSE])
4087# ------------------------------------------------------------
4088# Check that the linker support an argument
4089
4090
4091
4092
4093
4094
4095
4096
4097#
4098# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4099# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4100#
4101# This code is free software; you can redistribute it and/or modify it
4102# under the terms of the GNU General Public License version 2 only, as
4103# published by the Free Software Foundation.  Oracle designates this
4104# particular file as subject to the "Classpath" exception as provided
4105# by Oracle in the LICENSE file that accompanied this code.
4106#
4107# This code is distributed in the hope that it will be useful, but WITHOUT
4108# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4109# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4110# version 2 for more details (a copy is included in the LICENSE file that
4111# accompanied this code).
4112#
4113# You should have received a copy of the GNU General Public License version
4114# 2 along with this work; if not, write to the Free Software Foundation,
4115# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4116#
4117# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4118# or visit www.oracle.com if you need additional information or have any
4119# questions.
4120#
4121
4122
4123
4124
4125
4126cygwin_help() {
4127  case $1 in
4128    unzip)
4129      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4130      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4131      ;;
4132    zip)
4133      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4134      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4135      ;;
4136    make)
4137      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4138      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4139      ;;
4140    freetype)
4141      HELP_MSG="
4142The freetype library can now be build during the configure process.
4143Download the freetype sources and unpack them into an arbitrary directory:
4144
4145wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4146tar -xzf freetype-2.5.3.tar.gz
4147
4148Then run configure with '--with-freetype-src=<freetype_src>'. This will
4149automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4150builds or into '<freetype_src>/lib32' for 32-bit builds.
4151Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4152and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4153
4154Alternatively you can unpack the sources like this to use the default directory:
4155
4156tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4157      ;;
4158  esac
4159}
4160
4161msys_help() {
4162  PKGHANDLER_COMMAND=""
4163}
4164
4165apt_help() {
4166  case $1 in
4167    reduced)
4168      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4169    devkit)
4170      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4171    openjdk)
4172      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4173    alsa)
4174      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4175    cups)
4176      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4177    freetype)
4178      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4179    ffi)
4180      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4181    x11)
4182      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4183    ccache)
4184      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4185    dtrace)
4186      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4187  esac
4188}
4189
4190yum_help() {
4191  case $1 in
4192    devkit)
4193      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4194    openjdk)
4195      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4196    alsa)
4197      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4198    cups)
4199      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4200    freetype)
4201      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4202    x11)
4203      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4204    ccache)
4205      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4206  esac
4207}
4208
4209port_help() {
4210  PKGHANDLER_COMMAND=""
4211}
4212
4213pkgutil_help() {
4214  PKGHANDLER_COMMAND=""
4215}
4216
4217pkgadd_help() {
4218  PKGHANDLER_COMMAND=""
4219}
4220
4221# This function will check if we're called from the "configure" wrapper while
4222# printing --help. If so, we will print out additional information that can
4223# only be extracted within the autoconf script, and then exit. This must be
4224# called at the very beginning in configure.ac.
4225
4226
4227
4228
4229
4230
4231#
4232# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4233# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4234#
4235# This code is free software; you can redistribute it and/or modify it
4236# under the terms of the GNU General Public License version 2 only, as
4237# published by the Free Software Foundation.  Oracle designates this
4238# particular file as subject to the "Classpath" exception as provided
4239# by Oracle in the LICENSE file that accompanied this code.
4240#
4241# This code is distributed in the hope that it will be useful, but WITHOUT
4242# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4243# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4244# version 2 for more details (a copy is included in the LICENSE file that
4245# accompanied this code).
4246#
4247# You should have received a copy of the GNU General Public License version
4248# 2 along with this work; if not, write to the Free Software Foundation,
4249# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4250#
4251# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4252# or visit www.oracle.com if you need additional information or have any
4253# questions.
4254#
4255
4256# All valid JVM features, regardless of platform
4257VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4258    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4259
4260# All valid JVM variants
4261VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4262
4263###############################################################################
4264# Check if the specified JVM variant should be built. To be used in shell if
4265# constructs, like this:
4266# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4267#
4268# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4269
4270# Definition kept in one line to allow inlining in if statements.
4271# Additional [] needed to keep m4 from mangling shell constructs.
4272
4273
4274###############################################################################
4275# Check if the specified JVM features are explicitly enabled. To be used in
4276# shell if constructs, like this:
4277# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4278#
4279# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4280
4281# Definition kept in one line to allow inlining in if statements.
4282# Additional [] needed to keep m4 from mangling shell constructs.
4283
4284
4285###############################################################################
4286# Check which variants of the JVM that we want to build. Available variants are:
4287#   server: normal interpreter, and a tiered C1/C2 compiler
4288#   client: normal interpreter, and C1 (no C2 compiler)
4289#   minimal: reduced form of client with optional features stripped out
4290#   core: normal interpreter only, no compiler
4291#   zero: C++ based interpreter only, no compiler
4292#   zeroshark: C++ based interpreter, and a llvm-based compiler
4293#   custom: baseline JVM with no default features
4294#
4295
4296
4297###############################################################################
4298# Check if dtrace should be enabled and has all prerequisites present.
4299#
4300
4301
4302###############################################################################
4303# Set up all JVM features for each JVM variant.
4304#
4305
4306
4307###############################################################################
4308# Validate JVM features once all setup is complete, including custom setup.
4309#
4310
4311
4312################################################################################
4313# Check if gtest should be built
4314#
4315
4316
4317#
4318# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4319# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4320#
4321# This code is free software; you can redistribute it and/or modify it
4322# under the terms of the GNU General Public License version 2 only, as
4323# published by the Free Software Foundation.  Oracle designates this
4324# particular file as subject to the "Classpath" exception as provided
4325# by Oracle in the LICENSE file that accompanied this code.
4326#
4327# This code is distributed in the hope that it will be useful, but WITHOUT
4328# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4329# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4330# version 2 for more details (a copy is included in the LICENSE file that
4331# accompanied this code).
4332#
4333# You should have received a copy of the GNU General Public License version
4334# 2 along with this work; if not, write to the Free Software Foundation,
4335# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4336#
4337# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4338# or visit www.oracle.com if you need additional information or have any
4339# questions.
4340#
4341
4342###############################################################################
4343# Check which variant of the JDK that we want to build.
4344# Currently we have:
4345#    normal:   standard edition
4346# but the custom make system may add other variants
4347#
4348# Effectively the JDK variant gives a name to a specific set of
4349# modules to compile into the JDK.
4350
4351
4352###############################################################################
4353# Set the debug level
4354#    release: no debug information, all optimizations, no asserts.
4355#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4356#    fastdebug: debug information (-g), all optimizations, all asserts
4357#    slowdebug: debug information (-g), no optimizations, all asserts
4358
4359
4360###############################################################################
4361#
4362# Should we build only OpenJDK even if closed sources are present?
4363#
4364
4365
4366
4367
4368###############################################################################
4369#
4370# Enable or disable the elliptic curve crypto implementation
4371#
4372
4373
4374
4375
4376################################################################################
4377#
4378# Gcov coverage data for hotspot
4379#
4380
4381
4382################################################################################
4383#
4384# Static build support.  When enabled will generate static
4385# libraries instead of shared libraries for all JDK libs.
4386#
4387
4388
4389################################################################################
4390#
4391# jlink options.
4392# We always keep packaged modules in JDK image.
4393#
4394
4395
4396################################################################################
4397#
4398# Check if building of the jtreg failure handler should be enabled.
4399#
4400
4401
4402################################################################################
4403#
4404# Enable or disable generation of the classlist at build time
4405#
4406
4407
4408#
4409# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4410# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4411#
4412# This code is free software; you can redistribute it and/or modify it
4413# under the terms of the GNU General Public License version 2 only, as
4414# published by the Free Software Foundation.  Oracle designates this
4415# particular file as subject to the "Classpath" exception as provided
4416# by Oracle in the LICENSE file that accompanied this code.
4417#
4418# This code is distributed in the hope that it will be useful, but WITHOUT
4419# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4420# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4421# version 2 for more details (a copy is included in the LICENSE file that
4422# accompanied this code).
4423#
4424# You should have received a copy of the GNU General Public License version
4425# 2 along with this work; if not, write to the Free Software Foundation,
4426# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4427#
4428# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4429# or visit www.oracle.com if you need additional information or have any
4430# questions.
4431#
4432
4433###############################################################################
4434#
4435# Setup version numbers
4436#
4437
4438# Verify that a given string represents a valid version number, and assign it
4439# to a variable.
4440
4441# Argument 1: the variable to assign to
4442# Argument 2: the value given by the user
4443
4444
4445
4446
4447#
4448# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4449# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4450#
4451# This code is free software; you can redistribute it and/or modify it
4452# under the terms of the GNU General Public License version 2 only, as
4453# published by the Free Software Foundation.  Oracle designates this
4454# particular file as subject to the "Classpath" exception as provided
4455# by Oracle in the LICENSE file that accompanied this code.
4456#
4457# This code is distributed in the hope that it will be useful, but WITHOUT
4458# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4459# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4460# version 2 for more details (a copy is included in the LICENSE file that
4461# accompanied this code).
4462#
4463# You should have received a copy of the GNU General Public License version
4464# 2 along with this work; if not, write to the Free Software Foundation,
4465# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4466#
4467# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4468# or visit www.oracle.com if you need additional information or have any
4469# questions.
4470#
4471
4472# Major library component reside in separate files.
4473#
4474# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4475# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4476#
4477# This code is free software; you can redistribute it and/or modify it
4478# under the terms of the GNU General Public License version 2 only, as
4479# published by the Free Software Foundation.  Oracle designates this
4480# particular file as subject to the "Classpath" exception as provided
4481# by Oracle in the LICENSE file that accompanied this code.
4482#
4483# This code is distributed in the hope that it will be useful, but WITHOUT
4484# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4485# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4486# version 2 for more details (a copy is included in the LICENSE file that
4487# accompanied this code).
4488#
4489# You should have received a copy of the GNU General Public License version
4490# 2 along with this work; if not, write to the Free Software Foundation,
4491# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4492#
4493# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4494# or visit www.oracle.com if you need additional information or have any
4495# questions.
4496#
4497
4498################################################################################
4499# Setup alsa (Advanced Linux Sound Architecture)
4500################################################################################
4501
4502
4503#
4504# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4505# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4506#
4507# This code is free software; you can redistribute it and/or modify it
4508# under the terms of the GNU General Public License version 2 only, as
4509# published by the Free Software Foundation.  Oracle designates this
4510# particular file as subject to the "Classpath" exception as provided
4511# by Oracle in the LICENSE file that accompanied this code.
4512#
4513# This code is distributed in the hope that it will be useful, but WITHOUT
4514# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4515# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4516# version 2 for more details (a copy is included in the LICENSE file that
4517# accompanied this code).
4518#
4519# You should have received a copy of the GNU General Public License version
4520# 2 along with this work; if not, write to the Free Software Foundation,
4521# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4522#
4523# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4524# or visit www.oracle.com if you need additional information or have any
4525# questions.
4526#
4527
4528################################################################################
4529# Setup bundled libraries.
4530#
4531# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4532# OpenJDK repository. Default is to use these libraries as bundled, but they
4533# might be replaced by en external version by the user.
4534################################################################################
4535
4536
4537################################################################################
4538# Setup libjpeg
4539################################################################################
4540
4541
4542################################################################################
4543# Setup giflib
4544################################################################################
4545
4546
4547################################################################################
4548# Setup libpng
4549################################################################################
4550
4551
4552################################################################################
4553# Setup zlib
4554################################################################################
4555
4556
4557################################################################################
4558# Setup lcms (Little CMS)
4559################################################################################
4560
4561
4562#
4563# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4564# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4565#
4566# This code is free software; you can redistribute it and/or modify it
4567# under the terms of the GNU General Public License version 2 only, as
4568# published by the Free Software Foundation.  Oracle designates this
4569# particular file as subject to the "Classpath" exception as provided
4570# by Oracle in the LICENSE file that accompanied this code.
4571#
4572# This code is distributed in the hope that it will be useful, but WITHOUT
4573# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4574# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4575# version 2 for more details (a copy is included in the LICENSE file that
4576# accompanied this code).
4577#
4578# You should have received a copy of the GNU General Public License version
4579# 2 along with this work; if not, write to the Free Software Foundation,
4580# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4581#
4582# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4583# or visit www.oracle.com if you need additional information or have any
4584# questions.
4585#
4586
4587################################################################################
4588# Setup cups (Common Unix Printing System)
4589################################################################################
4590
4591
4592#
4593# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4594# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4595#
4596# This code is free software; you can redistribute it and/or modify it
4597# under the terms of the GNU General Public License version 2 only, as
4598# published by the Free Software Foundation.  Oracle designates this
4599# particular file as subject to the "Classpath" exception as provided
4600# by Oracle in the LICENSE file that accompanied this code.
4601#
4602# This code is distributed in the hope that it will be useful, but WITHOUT
4603# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4604# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4605# version 2 for more details (a copy is included in the LICENSE file that
4606# accompanied this code).
4607#
4608# You should have received a copy of the GNU General Public License version
4609# 2 along with this work; if not, write to the Free Software Foundation,
4610# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4611#
4612# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4613# or visit www.oracle.com if you need additional information or have any
4614# questions.
4615#
4616
4617################################################################################
4618# Setup libffi (Foreign Function Interface)
4619################################################################################
4620
4621
4622#
4623# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4624# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4625#
4626# This code is free software; you can redistribute it and/or modify it
4627# under the terms of the GNU General Public License version 2 only, as
4628# published by the Free Software Foundation.  Oracle designates this
4629# particular file as subject to the "Classpath" exception as provided
4630# by Oracle in the LICENSE file that accompanied this code.
4631#
4632# This code is distributed in the hope that it will be useful, but WITHOUT
4633# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4634# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4635# version 2 for more details (a copy is included in the LICENSE file that
4636# accompanied this code).
4637#
4638# You should have received a copy of the GNU General Public License version
4639# 2 along with this work; if not, write to the Free Software Foundation,
4640# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4641#
4642# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4643# or visit www.oracle.com if you need additional information or have any
4644# questions.
4645#
4646
4647################################################################################
4648# Build the freetype lib from source
4649################################################################################
4650
4651
4652################################################################################
4653# Check if a potential freeype library match is correct and usable
4654################################################################################
4655
4656
4657################################################################################
4658# Setup freetype (The FreeType2 font rendering library)
4659################################################################################
4660
4661
4662#
4663# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4664# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4665#
4666# This code is free software; you can redistribute it and/or modify it
4667# under the terms of the GNU General Public License version 2 only, as
4668# published by the Free Software Foundation.  Oracle designates this
4669# particular file as subject to the "Classpath" exception as provided
4670# by Oracle in the LICENSE file that accompanied this code.
4671#
4672# This code is distributed in the hope that it will be useful, but WITHOUT
4673# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4674# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4675# version 2 for more details (a copy is included in the LICENSE file that
4676# accompanied this code).
4677#
4678# You should have received a copy of the GNU General Public License version
4679# 2 along with this work; if not, write to the Free Software Foundation,
4680# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4681#
4682# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4683# or visit www.oracle.com if you need additional information or have any
4684# questions.
4685#
4686
4687################################################################################
4688# Setup the standard C/C++ runtime libraries.
4689#
4690# Most importantly, determine if stdc++ should be linked statically or
4691# dynamically.
4692################################################################################
4693
4694
4695#
4696# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4697# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4698#
4699# This code is free software; you can redistribute it and/or modify it
4700# under the terms of the GNU General Public License version 2 only, as
4701# published by the Free Software Foundation.  Oracle designates this
4702# particular file as subject to the "Classpath" exception as provided
4703# by Oracle in the LICENSE file that accompanied this code.
4704#
4705# This code is distributed in the hope that it will be useful, but WITHOUT
4706# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4707# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4708# version 2 for more details (a copy is included in the LICENSE file that
4709# accompanied this code).
4710#
4711# You should have received a copy of the GNU General Public License version
4712# 2 along with this work; if not, write to the Free Software Foundation,
4713# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4714#
4715# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4716# or visit www.oracle.com if you need additional information or have any
4717# questions.
4718#
4719
4720################################################################################
4721# Setup X11 Windows system
4722################################################################################
4723
4724
4725
4726################################################################################
4727# Determine which libraries are needed for this configuration
4728################################################################################
4729
4730
4731################################################################################
4732# Parse library options, and setup needed libraries
4733################################################################################
4734
4735
4736################################################################################
4737# Setup llvm (Low-Level VM)
4738################################################################################
4739
4740
4741################################################################################
4742# Setup various libraries, typically small system libraries
4743################################################################################
4744
4745
4746################################################################################
4747# libstlport.so.1 is needed for running gtest on Solaris. Find it to
4748# redistribute it in the test image.
4749################################################################################
4750
4751
4752
4753#
4754# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4755# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4756#
4757# This code is free software; you can redistribute it and/or modify it
4758# under the terms of the GNU General Public License version 2 only, as
4759# published by the Free Software Foundation.  Oracle designates this
4760# particular file as subject to the "Classpath" exception as provided
4761# by Oracle in the LICENSE file that accompanied this code.
4762#
4763# This code is distributed in the hope that it will be useful, but WITHOUT
4764# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4765# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4766# version 2 for more details (a copy is included in the LICENSE file that
4767# accompanied this code).
4768#
4769# You should have received a copy of the GNU General Public License version
4770# 2 along with this work; if not, write to the Free Software Foundation,
4771# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4772#
4773# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4774# or visit www.oracle.com if you need additional information or have any
4775# questions.
4776#
4777
4778# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4779# Converts autoconf style CPU name to OpenJDK style, into
4780# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4781
4782
4783# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4784# Converts autoconf style OS name to OpenJDK style, into
4785# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4786
4787
4788# Expects $host_os $host_cpu $build_os and $build_cpu
4789# and $with_target_bits to have been setup!
4790#
4791# Translate the standard triplet(quadruplet) definition
4792# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4793# OPENJDK_BUILD_OS, etc.
4794
4795
4796# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4797# accordingly. Must be done after setting up build and target system, but before
4798# doing anything else with these values.
4799
4800
4801# Setup the legacy variables, for controlling the old makefiles.
4802#
4803
4804
4805# $1 - Either TARGET or BUILD to setup the variables for.
4806
4807
4808
4809
4810#%%% Build and target systems %%%
4811
4812
4813
4814
4815# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4816# Add -mX to various FLAGS variables.
4817
4818
4819
4820
4821
4822
4823#
4824# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4825# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4826#
4827# This code is free software; you can redistribute it and/or modify it
4828# under the terms of the GNU General Public License version 2 only, as
4829# published by the Free Software Foundation.  Oracle designates this
4830# particular file as subject to the "Classpath" exception as provided
4831# by Oracle in the LICENSE file that accompanied this code.
4832#
4833# This code is distributed in the hope that it will be useful, but WITHOUT
4834# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4835# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4836# version 2 for more details (a copy is included in the LICENSE file that
4837# accompanied this code).
4838#
4839# You should have received a copy of the GNU General Public License version
4840# 2 along with this work; if not, write to the Free Software Foundation,
4841# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4842#
4843# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4844# or visit www.oracle.com if you need additional information or have any
4845# questions.
4846#
4847
4848
4849
4850
4851
4852
4853
4854################################################################################
4855# Define a mechanism for importing extra prebuilt modules
4856#
4857
4858
4859
4860#
4861# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4862# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4863#
4864# This code is free software; you can redistribute it and/or modify it
4865# under the terms of the GNU General Public License version 2 only, as
4866# published by the Free Software Foundation.  Oracle designates this
4867# particular file as subject to the "Classpath" exception as provided
4868# by Oracle in the LICENSE file that accompanied this code.
4869#
4870# This code is distributed in the hope that it will be useful, but WITHOUT
4871# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4872# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4873# version 2 for more details (a copy is included in the LICENSE file that
4874# accompanied this code).
4875#
4876# You should have received a copy of the GNU General Public License version
4877# 2 along with this work; if not, write to the Free Software Foundation,
4878# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4879#
4880# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4881# or visit www.oracle.com if you need additional information or have any
4882# questions.
4883#
4884
4885########################################################################
4886# This file is responsible for detecting, verifying and setting up the
4887# toolchain, i.e. the compiler, linker and related utilities. It will setup
4888# proper paths to the binaries, but it will not setup any flags.
4889#
4890# The binaries used is determined by the toolchain type, which is the family of
4891# compilers and related tools that are used.
4892########################################################################
4893
4894
4895# All valid toolchains, regardless of platform (used by help.m4)
4896VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4897
4898# These toolchains are valid on different platforms
4899VALID_TOOLCHAINS_linux="gcc clang"
4900VALID_TOOLCHAINS_solaris="solstudio"
4901VALID_TOOLCHAINS_macosx="gcc clang"
4902VALID_TOOLCHAINS_aix="xlc"
4903VALID_TOOLCHAINS_windows="microsoft"
4904
4905# Toolchain descriptions
4906TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4907TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4908TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4909TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4910TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4911
4912# Minimum supported versions, empty means unspecified
4913TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4914TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4915TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4916TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4917TOOLCHAIN_MINIMUM_VERSION_xlc=""
4918
4919# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4920# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4921# $1 - optional variable prefix for compiler and version variables (BUILD_)
4922# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4923
4924
4925# Check if the configured compiler (C and C++) is of a specific version or
4926# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4927#
4928# Arguments:
4929#   VERSION:   The version string to check against the found version
4930#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4931#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4932#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4933
4934
4935
4936
4937# Setup a number of variables describing how native output files are
4938# named on this platform/toolchain.
4939
4940
4941# Determine which toolchain type to use, and make sure it is valid for this
4942# platform. Setup various information about the selected toolchain.
4943
4944
4945# Before we start detecting the toolchain executables, we might need some
4946# special setup, e.g. additional paths etc.
4947
4948
4949# Restore path, etc
4950
4951
4952# Check if a compiler is of the toolchain type we expect, and save the version
4953# information from it. If the compiler does not match the expected type,
4954# this function will abort using AC_MSG_ERROR. If it matches, the version will
4955# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4956# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4957#
4958# $1 = compiler to test (CC or CXX)
4959# $2 = human readable name of compiler (C or C++)
4960
4961
4962# Try to locate the given C or C++ compiler in the path, or otherwise.
4963#
4964# $1 = compiler to test (CC or CXX)
4965# $2 = human readable name of compiler (C or C++)
4966# $3 = list of compiler names to search for
4967
4968
4969# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4970# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4971# archiver (AR). Verify that the compilers are correct according to the
4972# toolchain type.
4973
4974
4975# Setup additional tools that is considered a part of the toolchain, but not the
4976# core part. Many of these are highly platform-specific and do not exist,
4977# and/or are not needed on all platforms.
4978
4979
4980# Setup the build tools (i.e, the compiler and linker used to build programs
4981# that should be run on the build platform, not the target platform, as a build
4982# helper). Since the non-cross-compile case uses the normal, target compilers
4983# for this, we can only do this after these have been setup.
4984
4985
4986# Setup legacy variables that are still needed as alternative ways to refer to
4987# parts of the toolchain.
4988
4989
4990# Do some additional checks on the detected tools.
4991
4992
4993# Setup the JTReg Regression Test Harness.
4994
4995
4996#
4997# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4998# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4999#
5000# This code is free software; you can redistribute it and/or modify it
5001# under the terms of the GNU General Public License version 2 only, as
5002# published by the Free Software Foundation.  Oracle designates this
5003# particular file as subject to the "Classpath" exception as provided
5004# by Oracle in the LICENSE file that accompanied this code.
5005#
5006# This code is distributed in the hope that it will be useful, but WITHOUT
5007# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
5008# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
5009# version 2 for more details (a copy is included in the LICENSE file that
5010# accompanied this code).
5011#
5012# You should have received a copy of the GNU General Public License version
5013# 2 along with this work; if not, write to the Free Software Foundation,
5014# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
5015#
5016# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
5017# or visit www.oracle.com if you need additional information or have any
5018# questions.
5019#
5020
5021################################################################################
5022# The order of these defines the priority by which we try to find them.
5023VALID_VS_VERSIONS="2013 2012 2010"
5024
5025VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5026VS_VERSION_INTERNAL_2010=100
5027VS_MSVCR_2010=msvcr100.dll
5028# We don't use msvcp on Visual Studio 2010
5029#VS_MSVCP_2010=msvcp100.dll
5030VS_ENVVAR_2010="VS100COMNTOOLS"
5031VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5032VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5033VS_VS_PLATFORM_NAME_2010="v100"
5034VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5035
5036VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5037VS_VERSION_INTERNAL_2012=110
5038VS_MSVCR_2012=msvcr110.dll
5039VS_MSVCP_2012=msvcp110.dll
5040VS_ENVVAR_2012="VS110COMNTOOLS"
5041VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5042VS_SDK_INSTALLDIR_2012=
5043VS_VS_PLATFORM_NAME_2012="v110"
5044VS_SDK_PLATFORM_NAME_2012=
5045
5046VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5047VS_VERSION_INTERNAL_2013=120
5048VS_MSVCR_2013=msvcr120.dll
5049VS_MSVCP_2013=msvcp120.dll
5050VS_ENVVAR_2013="VS120COMNTOOLS"
5051VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5052VS_SDK_INSTALLDIR_2013=
5053VS_VS_PLATFORM_NAME_2013="v120"
5054VS_SDK_PLATFORM_NAME_2013=
5055
5056################################################################################
5057
5058
5059
5060################################################################################
5061
5062
5063
5064################################################################################
5065# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5066# build environment and assigns it to VS_ENV_CMD
5067
5068
5069################################################################################
5070
5071
5072
5073################################################################################
5074# Check if the VS env variables were setup prior to running configure.
5075# If not, then find vcvarsall.bat and run it automatically, and integrate
5076# the set env variables into the spec file.
5077
5078
5079
5080
5081
5082
5083
5084
5085
5086
5087
5088
5089
5090
5091# This line needs to be here, verbatim, after all includes and the dummy hook
5092# definitions. It is replaced with custom functionality when building
5093# custom sources.
5094#CUSTOM_AUTOCONF_INCLUDE
5095
5096# Do not change or remove the following line, it is needed for consistency checks:
5097DATE_WHEN_GENERATED=1467766758
5098
5099###############################################################################
5100#
5101# Initialization / Boot-strapping
5102#
5103# The bootstrapping process needs to solve the "chicken or the egg" problem,
5104# thus it jumps back and forth, each time gaining something needed later on.
5105#
5106###############################################################################
5107
5108# If we are requested to print additional help, do that and then exit.
5109# This must be the very first call.
5110
5111  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5112
5113    # Print available toolchains
5114    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5115    $PRINTF "Which are valid to use depends on the build platform.\n"
5116    for toolchain in $VALID_TOOLCHAINS_all; do
5117      # Use indirect variable referencing
5118      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5119      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5120      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5121    done
5122    $PRINTF "\n"
5123
5124    # Print available jvm features
5125    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5126    $PRINTF "Which are valid to use depends on the target platform.\n  "
5127    $PRINTF "%s " $VALID_JVM_FEATURES
5128    $PRINTF "\n"
5129
5130    # And now exit directly
5131    exit 0
5132  fi
5133
5134
5135# Basic initialization that must happen first of all in the normal process.
5136
5137  # Save the original command line. This is passed to us by the wrapper configure script.
5138
5139  # Save the path variable before it gets changed
5140  ORIGINAL_PATH="$PATH"
5141
5142  DATE_WHEN_CONFIGURED=`LANG=C date`
5143
5144  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5145$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5146  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5147$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5148
5149
5150  # Start with tools that do not need have cross compilation support
5151  # and can be expected to be found in the default PATH. These tools are
5152  # used by configure.
5153
5154  # First are all the simple required tools.
5155
5156
5157
5158  # Publish this variable in the help.
5159
5160
5161  if [ -z "${BASENAME+x}" ]; then
5162    # The variable is not set by user, try to locate tool using the code snippet
5163    for ac_prog in basename
5164do
5165  # Extract the first word of "$ac_prog", so it can be a program name with args.
5166set dummy $ac_prog; ac_word=$2
5167{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5168$as_echo_n "checking for $ac_word... " >&6; }
5169if ${ac_cv_path_BASENAME+:} false; then :
5170  $as_echo_n "(cached) " >&6
5171else
5172  case $BASENAME in
5173  [\\/]* | ?:[\\/]*)
5174  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5175  ;;
5176  *)
5177  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5178for as_dir in $PATH
5179do
5180  IFS=$as_save_IFS
5181  test -z "$as_dir" && as_dir=.
5182    for ac_exec_ext in '' $ac_executable_extensions; do
5183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5184    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5186    break 2
5187  fi
5188done
5189  done
5190IFS=$as_save_IFS
5191
5192  ;;
5193esac
5194fi
5195BASENAME=$ac_cv_path_BASENAME
5196if test -n "$BASENAME"; then
5197  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5198$as_echo "$BASENAME" >&6; }
5199else
5200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5201$as_echo "no" >&6; }
5202fi
5203
5204
5205  test -n "$BASENAME" && break
5206done
5207
5208  else
5209    # The variable is set, but is it from the command line or the environment?
5210
5211    # Try to remove the string !BASENAME! from our list.
5212    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5213    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5214      # If it failed, the variable was not from the command line. Ignore it,
5215      # but warn the user (except for BASH, which is always set by the calling BASH).
5216      if test "xBASENAME" != xBASH; then
5217        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5218$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5219      fi
5220      # Try to locate tool using the code snippet
5221      for ac_prog in basename
5222do
5223  # Extract the first word of "$ac_prog", so it can be a program name with args.
5224set dummy $ac_prog; ac_word=$2
5225{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5226$as_echo_n "checking for $ac_word... " >&6; }
5227if ${ac_cv_path_BASENAME+:} false; then :
5228  $as_echo_n "(cached) " >&6
5229else
5230  case $BASENAME in
5231  [\\/]* | ?:[\\/]*)
5232  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5233  ;;
5234  *)
5235  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5236for as_dir in $PATH
5237do
5238  IFS=$as_save_IFS
5239  test -z "$as_dir" && as_dir=.
5240    for ac_exec_ext in '' $ac_executable_extensions; do
5241  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5242    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5243    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5244    break 2
5245  fi
5246done
5247  done
5248IFS=$as_save_IFS
5249
5250  ;;
5251esac
5252fi
5253BASENAME=$ac_cv_path_BASENAME
5254if test -n "$BASENAME"; then
5255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5256$as_echo "$BASENAME" >&6; }
5257else
5258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5259$as_echo "no" >&6; }
5260fi
5261
5262
5263  test -n "$BASENAME" && break
5264done
5265
5266    else
5267      # If it succeeded, then it was overridden by the user. We will use it
5268      # for the tool.
5269
5270      # First remove it from the list of overridden variables, so we can test
5271      # for unknown variables in the end.
5272      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5273
5274      # Check if we try to supply an empty value
5275      if test "x$BASENAME" = x; then
5276        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5277$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5278        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5279$as_echo_n "checking for BASENAME... " >&6; }
5280        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5281$as_echo "disabled" >&6; }
5282      else
5283        # Check if the provided tool contains a complete path.
5284        tool_specified="$BASENAME"
5285        tool_basename="${tool_specified##*/}"
5286        if test "x$tool_basename" = "x$tool_specified"; then
5287          # A command without a complete path is provided, search $PATH.
5288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5289$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5290          # Extract the first word of "$tool_basename", so it can be a program name with args.
5291set dummy $tool_basename; ac_word=$2
5292{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5293$as_echo_n "checking for $ac_word... " >&6; }
5294if ${ac_cv_path_BASENAME+:} false; then :
5295  $as_echo_n "(cached) " >&6
5296else
5297  case $BASENAME in
5298  [\\/]* | ?:[\\/]*)
5299  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5300  ;;
5301  *)
5302  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5303for as_dir in $PATH
5304do
5305  IFS=$as_save_IFS
5306  test -z "$as_dir" && as_dir=.
5307    for ac_exec_ext in '' $ac_executable_extensions; do
5308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5309    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5311    break 2
5312  fi
5313done
5314  done
5315IFS=$as_save_IFS
5316
5317  ;;
5318esac
5319fi
5320BASENAME=$ac_cv_path_BASENAME
5321if test -n "$BASENAME"; then
5322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5323$as_echo "$BASENAME" >&6; }
5324else
5325  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5326$as_echo "no" >&6; }
5327fi
5328
5329
5330          if test "x$BASENAME" = x; then
5331            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5332          fi
5333        else
5334          # Otherwise we believe it is a complete path. Use it as it is.
5335          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5336$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5337          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5338$as_echo_n "checking for BASENAME... " >&6; }
5339          if test ! -x "$tool_specified"; then
5340            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5341$as_echo "not found" >&6; }
5342            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5343          fi
5344          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5345$as_echo "$tool_specified" >&6; }
5346        fi
5347      fi
5348    fi
5349
5350  fi
5351
5352
5353
5354  if test "x$BASENAME" = x; then
5355    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5356  fi
5357
5358
5359
5360
5361
5362  # Publish this variable in the help.
5363
5364
5365  if [ -z "${BASH+x}" ]; then
5366    # The variable is not set by user, try to locate tool using the code snippet
5367    for ac_prog in bash
5368do
5369  # Extract the first word of "$ac_prog", so it can be a program name with args.
5370set dummy $ac_prog; ac_word=$2
5371{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5372$as_echo_n "checking for $ac_word... " >&6; }
5373if ${ac_cv_path_BASH+:} false; then :
5374  $as_echo_n "(cached) " >&6
5375else
5376  case $BASH in
5377  [\\/]* | ?:[\\/]*)
5378  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5379  ;;
5380  *)
5381  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5382for as_dir in $PATH
5383do
5384  IFS=$as_save_IFS
5385  test -z "$as_dir" && as_dir=.
5386    for ac_exec_ext in '' $ac_executable_extensions; do
5387  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5388    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5389    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5390    break 2
5391  fi
5392done
5393  done
5394IFS=$as_save_IFS
5395
5396  ;;
5397esac
5398fi
5399BASH=$ac_cv_path_BASH
5400if test -n "$BASH"; then
5401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5402$as_echo "$BASH" >&6; }
5403else
5404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5405$as_echo "no" >&6; }
5406fi
5407
5408
5409  test -n "$BASH" && break
5410done
5411
5412  else
5413    # The variable is set, but is it from the command line or the environment?
5414
5415    # Try to remove the string !BASH! from our list.
5416    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5417    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5418      # If it failed, the variable was not from the command line. Ignore it,
5419      # but warn the user (except for BASH, which is always set by the calling BASH).
5420      if test "xBASH" != xBASH; then
5421        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5422$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5423      fi
5424      # Try to locate tool using the code snippet
5425      for ac_prog in bash
5426do
5427  # Extract the first word of "$ac_prog", so it can be a program name with args.
5428set dummy $ac_prog; ac_word=$2
5429{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5430$as_echo_n "checking for $ac_word... " >&6; }
5431if ${ac_cv_path_BASH+:} false; then :
5432  $as_echo_n "(cached) " >&6
5433else
5434  case $BASH in
5435  [\\/]* | ?:[\\/]*)
5436  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5437  ;;
5438  *)
5439  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5440for as_dir in $PATH
5441do
5442  IFS=$as_save_IFS
5443  test -z "$as_dir" && as_dir=.
5444    for ac_exec_ext in '' $ac_executable_extensions; do
5445  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5446    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5447    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5448    break 2
5449  fi
5450done
5451  done
5452IFS=$as_save_IFS
5453
5454  ;;
5455esac
5456fi
5457BASH=$ac_cv_path_BASH
5458if test -n "$BASH"; then
5459  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5460$as_echo "$BASH" >&6; }
5461else
5462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5463$as_echo "no" >&6; }
5464fi
5465
5466
5467  test -n "$BASH" && break
5468done
5469
5470    else
5471      # If it succeeded, then it was overridden by the user. We will use it
5472      # for the tool.
5473
5474      # First remove it from the list of overridden variables, so we can test
5475      # for unknown variables in the end.
5476      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5477
5478      # Check if we try to supply an empty value
5479      if test "x$BASH" = x; then
5480        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5481$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5482        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5483$as_echo_n "checking for BASH... " >&6; }
5484        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5485$as_echo "disabled" >&6; }
5486      else
5487        # Check if the provided tool contains a complete path.
5488        tool_specified="$BASH"
5489        tool_basename="${tool_specified##*/}"
5490        if test "x$tool_basename" = "x$tool_specified"; then
5491          # A command without a complete path is provided, search $PATH.
5492          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5493$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5494          # Extract the first word of "$tool_basename", so it can be a program name with args.
5495set dummy $tool_basename; ac_word=$2
5496{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5497$as_echo_n "checking for $ac_word... " >&6; }
5498if ${ac_cv_path_BASH+:} false; then :
5499  $as_echo_n "(cached) " >&6
5500else
5501  case $BASH in
5502  [\\/]* | ?:[\\/]*)
5503  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5504  ;;
5505  *)
5506  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5507for as_dir in $PATH
5508do
5509  IFS=$as_save_IFS
5510  test -z "$as_dir" && as_dir=.
5511    for ac_exec_ext in '' $ac_executable_extensions; do
5512  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5513    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5514    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5515    break 2
5516  fi
5517done
5518  done
5519IFS=$as_save_IFS
5520
5521  ;;
5522esac
5523fi
5524BASH=$ac_cv_path_BASH
5525if test -n "$BASH"; then
5526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5527$as_echo "$BASH" >&6; }
5528else
5529  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5530$as_echo "no" >&6; }
5531fi
5532
5533
5534          if test "x$BASH" = x; then
5535            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5536          fi
5537        else
5538          # Otherwise we believe it is a complete path. Use it as it is.
5539          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5540$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5541          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5542$as_echo_n "checking for BASH... " >&6; }
5543          if test ! -x "$tool_specified"; then
5544            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5545$as_echo "not found" >&6; }
5546            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5547          fi
5548          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5549$as_echo "$tool_specified" >&6; }
5550        fi
5551      fi
5552    fi
5553
5554  fi
5555
5556
5557
5558  if test "x$BASH" = x; then
5559    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5560  fi
5561
5562
5563
5564
5565
5566  # Publish this variable in the help.
5567
5568
5569  if [ -z "${CAT+x}" ]; then
5570    # The variable is not set by user, try to locate tool using the code snippet
5571    for ac_prog in cat
5572do
5573  # Extract the first word of "$ac_prog", so it can be a program name with args.
5574set dummy $ac_prog; ac_word=$2
5575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5576$as_echo_n "checking for $ac_word... " >&6; }
5577if ${ac_cv_path_CAT+:} false; then :
5578  $as_echo_n "(cached) " >&6
5579else
5580  case $CAT in
5581  [\\/]* | ?:[\\/]*)
5582  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5583  ;;
5584  *)
5585  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5586for as_dir in $PATH
5587do
5588  IFS=$as_save_IFS
5589  test -z "$as_dir" && as_dir=.
5590    for ac_exec_ext in '' $ac_executable_extensions; do
5591  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5592    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5593    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5594    break 2
5595  fi
5596done
5597  done
5598IFS=$as_save_IFS
5599
5600  ;;
5601esac
5602fi
5603CAT=$ac_cv_path_CAT
5604if test -n "$CAT"; then
5605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5606$as_echo "$CAT" >&6; }
5607else
5608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5609$as_echo "no" >&6; }
5610fi
5611
5612
5613  test -n "$CAT" && break
5614done
5615
5616  else
5617    # The variable is set, but is it from the command line or the environment?
5618
5619    # Try to remove the string !CAT! from our list.
5620    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5621    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5622      # If it failed, the variable was not from the command line. Ignore it,
5623      # but warn the user (except for BASH, which is always set by the calling BASH).
5624      if test "xCAT" != xBASH; then
5625        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5626$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5627      fi
5628      # Try to locate tool using the code snippet
5629      for ac_prog in cat
5630do
5631  # Extract the first word of "$ac_prog", so it can be a program name with args.
5632set dummy $ac_prog; ac_word=$2
5633{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5634$as_echo_n "checking for $ac_word... " >&6; }
5635if ${ac_cv_path_CAT+:} false; then :
5636  $as_echo_n "(cached) " >&6
5637else
5638  case $CAT in
5639  [\\/]* | ?:[\\/]*)
5640  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5641  ;;
5642  *)
5643  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5644for as_dir in $PATH
5645do
5646  IFS=$as_save_IFS
5647  test -z "$as_dir" && as_dir=.
5648    for ac_exec_ext in '' $ac_executable_extensions; do
5649  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5650    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5651    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5652    break 2
5653  fi
5654done
5655  done
5656IFS=$as_save_IFS
5657
5658  ;;
5659esac
5660fi
5661CAT=$ac_cv_path_CAT
5662if test -n "$CAT"; then
5663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5664$as_echo "$CAT" >&6; }
5665else
5666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5667$as_echo "no" >&6; }
5668fi
5669
5670
5671  test -n "$CAT" && break
5672done
5673
5674    else
5675      # If it succeeded, then it was overridden by the user. We will use it
5676      # for the tool.
5677
5678      # First remove it from the list of overridden variables, so we can test
5679      # for unknown variables in the end.
5680      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5681
5682      # Check if we try to supply an empty value
5683      if test "x$CAT" = x; then
5684        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5685$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5686        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5687$as_echo_n "checking for CAT... " >&6; }
5688        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5689$as_echo "disabled" >&6; }
5690      else
5691        # Check if the provided tool contains a complete path.
5692        tool_specified="$CAT"
5693        tool_basename="${tool_specified##*/}"
5694        if test "x$tool_basename" = "x$tool_specified"; then
5695          # A command without a complete path is provided, search $PATH.
5696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5697$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5698          # Extract the first word of "$tool_basename", so it can be a program name with args.
5699set dummy $tool_basename; ac_word=$2
5700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5701$as_echo_n "checking for $ac_word... " >&6; }
5702if ${ac_cv_path_CAT+:} false; then :
5703  $as_echo_n "(cached) " >&6
5704else
5705  case $CAT in
5706  [\\/]* | ?:[\\/]*)
5707  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5708  ;;
5709  *)
5710  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5711for as_dir in $PATH
5712do
5713  IFS=$as_save_IFS
5714  test -z "$as_dir" && as_dir=.
5715    for ac_exec_ext in '' $ac_executable_extensions; do
5716  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5717    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5718    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5719    break 2
5720  fi
5721done
5722  done
5723IFS=$as_save_IFS
5724
5725  ;;
5726esac
5727fi
5728CAT=$ac_cv_path_CAT
5729if test -n "$CAT"; then
5730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5731$as_echo "$CAT" >&6; }
5732else
5733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5734$as_echo "no" >&6; }
5735fi
5736
5737
5738          if test "x$CAT" = x; then
5739            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5740          fi
5741        else
5742          # Otherwise we believe it is a complete path. Use it as it is.
5743          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5744$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5745          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5746$as_echo_n "checking for CAT... " >&6; }
5747          if test ! -x "$tool_specified"; then
5748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5749$as_echo "not found" >&6; }
5750            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5751          fi
5752          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5753$as_echo "$tool_specified" >&6; }
5754        fi
5755      fi
5756    fi
5757
5758  fi
5759
5760
5761
5762  if test "x$CAT" = x; then
5763    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5764  fi
5765
5766
5767
5768
5769
5770  # Publish this variable in the help.
5771
5772
5773  if [ -z "${CHMOD+x}" ]; then
5774    # The variable is not set by user, try to locate tool using the code snippet
5775    for ac_prog in chmod
5776do
5777  # Extract the first word of "$ac_prog", so it can be a program name with args.
5778set dummy $ac_prog; ac_word=$2
5779{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5780$as_echo_n "checking for $ac_word... " >&6; }
5781if ${ac_cv_path_CHMOD+:} false; then :
5782  $as_echo_n "(cached) " >&6
5783else
5784  case $CHMOD in
5785  [\\/]* | ?:[\\/]*)
5786  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5787  ;;
5788  *)
5789  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5790for as_dir in $PATH
5791do
5792  IFS=$as_save_IFS
5793  test -z "$as_dir" && as_dir=.
5794    for ac_exec_ext in '' $ac_executable_extensions; do
5795  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5796    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5797    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5798    break 2
5799  fi
5800done
5801  done
5802IFS=$as_save_IFS
5803
5804  ;;
5805esac
5806fi
5807CHMOD=$ac_cv_path_CHMOD
5808if test -n "$CHMOD"; then
5809  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5810$as_echo "$CHMOD" >&6; }
5811else
5812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5813$as_echo "no" >&6; }
5814fi
5815
5816
5817  test -n "$CHMOD" && break
5818done
5819
5820  else
5821    # The variable is set, but is it from the command line or the environment?
5822
5823    # Try to remove the string !CHMOD! from our list.
5824    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5825    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5826      # If it failed, the variable was not from the command line. Ignore it,
5827      # but warn the user (except for BASH, which is always set by the calling BASH).
5828      if test "xCHMOD" != xBASH; then
5829        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5830$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5831      fi
5832      # Try to locate tool using the code snippet
5833      for ac_prog in chmod
5834do
5835  # Extract the first word of "$ac_prog", so it can be a program name with args.
5836set dummy $ac_prog; ac_word=$2
5837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5838$as_echo_n "checking for $ac_word... " >&6; }
5839if ${ac_cv_path_CHMOD+:} false; then :
5840  $as_echo_n "(cached) " >&6
5841else
5842  case $CHMOD in
5843  [\\/]* | ?:[\\/]*)
5844  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5845  ;;
5846  *)
5847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5848for as_dir in $PATH
5849do
5850  IFS=$as_save_IFS
5851  test -z "$as_dir" && as_dir=.
5852    for ac_exec_ext in '' $ac_executable_extensions; do
5853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5854    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5856    break 2
5857  fi
5858done
5859  done
5860IFS=$as_save_IFS
5861
5862  ;;
5863esac
5864fi
5865CHMOD=$ac_cv_path_CHMOD
5866if test -n "$CHMOD"; then
5867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5868$as_echo "$CHMOD" >&6; }
5869else
5870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5871$as_echo "no" >&6; }
5872fi
5873
5874
5875  test -n "$CHMOD" && break
5876done
5877
5878    else
5879      # If it succeeded, then it was overridden by the user. We will use it
5880      # for the tool.
5881
5882      # First remove it from the list of overridden variables, so we can test
5883      # for unknown variables in the end.
5884      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5885
5886      # Check if we try to supply an empty value
5887      if test "x$CHMOD" = x; then
5888        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5889$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5890        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5891$as_echo_n "checking for CHMOD... " >&6; }
5892        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5893$as_echo "disabled" >&6; }
5894      else
5895        # Check if the provided tool contains a complete path.
5896        tool_specified="$CHMOD"
5897        tool_basename="${tool_specified##*/}"
5898        if test "x$tool_basename" = "x$tool_specified"; then
5899          # A command without a complete path is provided, search $PATH.
5900          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5901$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5902          # Extract the first word of "$tool_basename", so it can be a program name with args.
5903set dummy $tool_basename; ac_word=$2
5904{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5905$as_echo_n "checking for $ac_word... " >&6; }
5906if ${ac_cv_path_CHMOD+:} false; then :
5907  $as_echo_n "(cached) " >&6
5908else
5909  case $CHMOD in
5910  [\\/]* | ?:[\\/]*)
5911  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5912  ;;
5913  *)
5914  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5915for as_dir in $PATH
5916do
5917  IFS=$as_save_IFS
5918  test -z "$as_dir" && as_dir=.
5919    for ac_exec_ext in '' $ac_executable_extensions; do
5920  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5921    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5922    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5923    break 2
5924  fi
5925done
5926  done
5927IFS=$as_save_IFS
5928
5929  ;;
5930esac
5931fi
5932CHMOD=$ac_cv_path_CHMOD
5933if test -n "$CHMOD"; then
5934  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5935$as_echo "$CHMOD" >&6; }
5936else
5937  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5938$as_echo "no" >&6; }
5939fi
5940
5941
5942          if test "x$CHMOD" = x; then
5943            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5944          fi
5945        else
5946          # Otherwise we believe it is a complete path. Use it as it is.
5947          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5948$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5949          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5950$as_echo_n "checking for CHMOD... " >&6; }
5951          if test ! -x "$tool_specified"; then
5952            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5953$as_echo "not found" >&6; }
5954            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5955          fi
5956          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5957$as_echo "$tool_specified" >&6; }
5958        fi
5959      fi
5960    fi
5961
5962  fi
5963
5964
5965
5966  if test "x$CHMOD" = x; then
5967    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5968  fi
5969
5970
5971
5972
5973
5974  # Publish this variable in the help.
5975
5976
5977  if [ -z "${CMP+x}" ]; then
5978    # The variable is not set by user, try to locate tool using the code snippet
5979    for ac_prog in cmp
5980do
5981  # Extract the first word of "$ac_prog", so it can be a program name with args.
5982set dummy $ac_prog; ac_word=$2
5983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5984$as_echo_n "checking for $ac_word... " >&6; }
5985if ${ac_cv_path_CMP+:} false; then :
5986  $as_echo_n "(cached) " >&6
5987else
5988  case $CMP in
5989  [\\/]* | ?:[\\/]*)
5990  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5991  ;;
5992  *)
5993  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5994for as_dir in $PATH
5995do
5996  IFS=$as_save_IFS
5997  test -z "$as_dir" && as_dir=.
5998    for ac_exec_ext in '' $ac_executable_extensions; do
5999  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6000    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6001    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6002    break 2
6003  fi
6004done
6005  done
6006IFS=$as_save_IFS
6007
6008  ;;
6009esac
6010fi
6011CMP=$ac_cv_path_CMP
6012if test -n "$CMP"; then
6013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6014$as_echo "$CMP" >&6; }
6015else
6016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6017$as_echo "no" >&6; }
6018fi
6019
6020
6021  test -n "$CMP" && break
6022done
6023
6024  else
6025    # The variable is set, but is it from the command line or the environment?
6026
6027    # Try to remove the string !CMP! from our list.
6028    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6029    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6030      # If it failed, the variable was not from the command line. Ignore it,
6031      # but warn the user (except for BASH, which is always set by the calling BASH).
6032      if test "xCMP" != xBASH; then
6033        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6034$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6035      fi
6036      # Try to locate tool using the code snippet
6037      for ac_prog in cmp
6038do
6039  # Extract the first word of "$ac_prog", so it can be a program name with args.
6040set dummy $ac_prog; ac_word=$2
6041{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6042$as_echo_n "checking for $ac_word... " >&6; }
6043if ${ac_cv_path_CMP+:} false; then :
6044  $as_echo_n "(cached) " >&6
6045else
6046  case $CMP in
6047  [\\/]* | ?:[\\/]*)
6048  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6049  ;;
6050  *)
6051  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6052for as_dir in $PATH
6053do
6054  IFS=$as_save_IFS
6055  test -z "$as_dir" && as_dir=.
6056    for ac_exec_ext in '' $ac_executable_extensions; do
6057  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6058    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6059    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6060    break 2
6061  fi
6062done
6063  done
6064IFS=$as_save_IFS
6065
6066  ;;
6067esac
6068fi
6069CMP=$ac_cv_path_CMP
6070if test -n "$CMP"; then
6071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6072$as_echo "$CMP" >&6; }
6073else
6074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6075$as_echo "no" >&6; }
6076fi
6077
6078
6079  test -n "$CMP" && break
6080done
6081
6082    else
6083      # If it succeeded, then it was overridden by the user. We will use it
6084      # for the tool.
6085
6086      # First remove it from the list of overridden variables, so we can test
6087      # for unknown variables in the end.
6088      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6089
6090      # Check if we try to supply an empty value
6091      if test "x$CMP" = x; then
6092        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6093$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6094        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6095$as_echo_n "checking for CMP... " >&6; }
6096        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6097$as_echo "disabled" >&6; }
6098      else
6099        # Check if the provided tool contains a complete path.
6100        tool_specified="$CMP"
6101        tool_basename="${tool_specified##*/}"
6102        if test "x$tool_basename" = "x$tool_specified"; then
6103          # A command without a complete path is provided, search $PATH.
6104          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6105$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6106          # Extract the first word of "$tool_basename", so it can be a program name with args.
6107set dummy $tool_basename; ac_word=$2
6108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6109$as_echo_n "checking for $ac_word... " >&6; }
6110if ${ac_cv_path_CMP+:} false; then :
6111  $as_echo_n "(cached) " >&6
6112else
6113  case $CMP in
6114  [\\/]* | ?:[\\/]*)
6115  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6116  ;;
6117  *)
6118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6119for as_dir in $PATH
6120do
6121  IFS=$as_save_IFS
6122  test -z "$as_dir" && as_dir=.
6123    for ac_exec_ext in '' $ac_executable_extensions; do
6124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6125    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6127    break 2
6128  fi
6129done
6130  done
6131IFS=$as_save_IFS
6132
6133  ;;
6134esac
6135fi
6136CMP=$ac_cv_path_CMP
6137if test -n "$CMP"; then
6138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6139$as_echo "$CMP" >&6; }
6140else
6141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6142$as_echo "no" >&6; }
6143fi
6144
6145
6146          if test "x$CMP" = x; then
6147            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6148          fi
6149        else
6150          # Otherwise we believe it is a complete path. Use it as it is.
6151          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6152$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6153          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6154$as_echo_n "checking for CMP... " >&6; }
6155          if test ! -x "$tool_specified"; then
6156            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6157$as_echo "not found" >&6; }
6158            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6159          fi
6160          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6161$as_echo "$tool_specified" >&6; }
6162        fi
6163      fi
6164    fi
6165
6166  fi
6167
6168
6169
6170  if test "x$CMP" = x; then
6171    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6172  fi
6173
6174
6175
6176
6177
6178  # Publish this variable in the help.
6179
6180
6181  if [ -z "${COMM+x}" ]; then
6182    # The variable is not set by user, try to locate tool using the code snippet
6183    for ac_prog in comm
6184do
6185  # Extract the first word of "$ac_prog", so it can be a program name with args.
6186set dummy $ac_prog; ac_word=$2
6187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6188$as_echo_n "checking for $ac_word... " >&6; }
6189if ${ac_cv_path_COMM+:} false; then :
6190  $as_echo_n "(cached) " >&6
6191else
6192  case $COMM in
6193  [\\/]* | ?:[\\/]*)
6194  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6195  ;;
6196  *)
6197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6198for as_dir in $PATH
6199do
6200  IFS=$as_save_IFS
6201  test -z "$as_dir" && as_dir=.
6202    for ac_exec_ext in '' $ac_executable_extensions; do
6203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6204    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6206    break 2
6207  fi
6208done
6209  done
6210IFS=$as_save_IFS
6211
6212  ;;
6213esac
6214fi
6215COMM=$ac_cv_path_COMM
6216if test -n "$COMM"; then
6217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6218$as_echo "$COMM" >&6; }
6219else
6220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6221$as_echo "no" >&6; }
6222fi
6223
6224
6225  test -n "$COMM" && break
6226done
6227
6228  else
6229    # The variable is set, but is it from the command line or the environment?
6230
6231    # Try to remove the string !COMM! from our list.
6232    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6233    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6234      # If it failed, the variable was not from the command line. Ignore it,
6235      # but warn the user (except for BASH, which is always set by the calling BASH).
6236      if test "xCOMM" != xBASH; then
6237        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6238$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6239      fi
6240      # Try to locate tool using the code snippet
6241      for ac_prog in comm
6242do
6243  # Extract the first word of "$ac_prog", so it can be a program name with args.
6244set dummy $ac_prog; ac_word=$2
6245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6246$as_echo_n "checking for $ac_word... " >&6; }
6247if ${ac_cv_path_COMM+:} false; then :
6248  $as_echo_n "(cached) " >&6
6249else
6250  case $COMM in
6251  [\\/]* | ?:[\\/]*)
6252  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6253  ;;
6254  *)
6255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6256for as_dir in $PATH
6257do
6258  IFS=$as_save_IFS
6259  test -z "$as_dir" && as_dir=.
6260    for ac_exec_ext in '' $ac_executable_extensions; do
6261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6262    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6264    break 2
6265  fi
6266done
6267  done
6268IFS=$as_save_IFS
6269
6270  ;;
6271esac
6272fi
6273COMM=$ac_cv_path_COMM
6274if test -n "$COMM"; then
6275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6276$as_echo "$COMM" >&6; }
6277else
6278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6279$as_echo "no" >&6; }
6280fi
6281
6282
6283  test -n "$COMM" && break
6284done
6285
6286    else
6287      # If it succeeded, then it was overridden by the user. We will use it
6288      # for the tool.
6289
6290      # First remove it from the list of overridden variables, so we can test
6291      # for unknown variables in the end.
6292      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6293
6294      # Check if we try to supply an empty value
6295      if test "x$COMM" = x; then
6296        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6297$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6298        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6299$as_echo_n "checking for COMM... " >&6; }
6300        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6301$as_echo "disabled" >&6; }
6302      else
6303        # Check if the provided tool contains a complete path.
6304        tool_specified="$COMM"
6305        tool_basename="${tool_specified##*/}"
6306        if test "x$tool_basename" = "x$tool_specified"; then
6307          # A command without a complete path is provided, search $PATH.
6308          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6309$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6310          # Extract the first word of "$tool_basename", so it can be a program name with args.
6311set dummy $tool_basename; ac_word=$2
6312{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6313$as_echo_n "checking for $ac_word... " >&6; }
6314if ${ac_cv_path_COMM+:} false; then :
6315  $as_echo_n "(cached) " >&6
6316else
6317  case $COMM in
6318  [\\/]* | ?:[\\/]*)
6319  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6320  ;;
6321  *)
6322  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6323for as_dir in $PATH
6324do
6325  IFS=$as_save_IFS
6326  test -z "$as_dir" && as_dir=.
6327    for ac_exec_ext in '' $ac_executable_extensions; do
6328  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6329    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6330    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6331    break 2
6332  fi
6333done
6334  done
6335IFS=$as_save_IFS
6336
6337  ;;
6338esac
6339fi
6340COMM=$ac_cv_path_COMM
6341if test -n "$COMM"; then
6342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6343$as_echo "$COMM" >&6; }
6344else
6345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6346$as_echo "no" >&6; }
6347fi
6348
6349
6350          if test "x$COMM" = x; then
6351            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6352          fi
6353        else
6354          # Otherwise we believe it is a complete path. Use it as it is.
6355          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6356$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6357          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6358$as_echo_n "checking for COMM... " >&6; }
6359          if test ! -x "$tool_specified"; then
6360            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6361$as_echo "not found" >&6; }
6362            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6363          fi
6364          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6365$as_echo "$tool_specified" >&6; }
6366        fi
6367      fi
6368    fi
6369
6370  fi
6371
6372
6373
6374  if test "x$COMM" = x; then
6375    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6376  fi
6377
6378
6379
6380
6381
6382  # Publish this variable in the help.
6383
6384
6385  if [ -z "${CP+x}" ]; then
6386    # The variable is not set by user, try to locate tool using the code snippet
6387    for ac_prog in cp
6388do
6389  # Extract the first word of "$ac_prog", so it can be a program name with args.
6390set dummy $ac_prog; ac_word=$2
6391{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6392$as_echo_n "checking for $ac_word... " >&6; }
6393if ${ac_cv_path_CP+:} false; then :
6394  $as_echo_n "(cached) " >&6
6395else
6396  case $CP in
6397  [\\/]* | ?:[\\/]*)
6398  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6399  ;;
6400  *)
6401  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6402for as_dir in $PATH
6403do
6404  IFS=$as_save_IFS
6405  test -z "$as_dir" && as_dir=.
6406    for ac_exec_ext in '' $ac_executable_extensions; do
6407  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6408    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6409    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6410    break 2
6411  fi
6412done
6413  done
6414IFS=$as_save_IFS
6415
6416  ;;
6417esac
6418fi
6419CP=$ac_cv_path_CP
6420if test -n "$CP"; then
6421  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6422$as_echo "$CP" >&6; }
6423else
6424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6425$as_echo "no" >&6; }
6426fi
6427
6428
6429  test -n "$CP" && break
6430done
6431
6432  else
6433    # The variable is set, but is it from the command line or the environment?
6434
6435    # Try to remove the string !CP! from our list.
6436    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6437    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6438      # If it failed, the variable was not from the command line. Ignore it,
6439      # but warn the user (except for BASH, which is always set by the calling BASH).
6440      if test "xCP" != xBASH; then
6441        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6442$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6443      fi
6444      # Try to locate tool using the code snippet
6445      for ac_prog in cp
6446do
6447  # Extract the first word of "$ac_prog", so it can be a program name with args.
6448set dummy $ac_prog; ac_word=$2
6449{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6450$as_echo_n "checking for $ac_word... " >&6; }
6451if ${ac_cv_path_CP+:} false; then :
6452  $as_echo_n "(cached) " >&6
6453else
6454  case $CP in
6455  [\\/]* | ?:[\\/]*)
6456  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6457  ;;
6458  *)
6459  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6460for as_dir in $PATH
6461do
6462  IFS=$as_save_IFS
6463  test -z "$as_dir" && as_dir=.
6464    for ac_exec_ext in '' $ac_executable_extensions; do
6465  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6466    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6467    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6468    break 2
6469  fi
6470done
6471  done
6472IFS=$as_save_IFS
6473
6474  ;;
6475esac
6476fi
6477CP=$ac_cv_path_CP
6478if test -n "$CP"; then
6479  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6480$as_echo "$CP" >&6; }
6481else
6482  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6483$as_echo "no" >&6; }
6484fi
6485
6486
6487  test -n "$CP" && break
6488done
6489
6490    else
6491      # If it succeeded, then it was overridden by the user. We will use it
6492      # for the tool.
6493
6494      # First remove it from the list of overridden variables, so we can test
6495      # for unknown variables in the end.
6496      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6497
6498      # Check if we try to supply an empty value
6499      if test "x$CP" = x; then
6500        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6501$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6502        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6503$as_echo_n "checking for CP... " >&6; }
6504        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6505$as_echo "disabled" >&6; }
6506      else
6507        # Check if the provided tool contains a complete path.
6508        tool_specified="$CP"
6509        tool_basename="${tool_specified##*/}"
6510        if test "x$tool_basename" = "x$tool_specified"; then
6511          # A command without a complete path is provided, search $PATH.
6512          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6513$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6514          # Extract the first word of "$tool_basename", so it can be a program name with args.
6515set dummy $tool_basename; ac_word=$2
6516{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6517$as_echo_n "checking for $ac_word... " >&6; }
6518if ${ac_cv_path_CP+:} false; then :
6519  $as_echo_n "(cached) " >&6
6520else
6521  case $CP in
6522  [\\/]* | ?:[\\/]*)
6523  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6524  ;;
6525  *)
6526  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6527for as_dir in $PATH
6528do
6529  IFS=$as_save_IFS
6530  test -z "$as_dir" && as_dir=.
6531    for ac_exec_ext in '' $ac_executable_extensions; do
6532  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6533    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6534    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6535    break 2
6536  fi
6537done
6538  done
6539IFS=$as_save_IFS
6540
6541  ;;
6542esac
6543fi
6544CP=$ac_cv_path_CP
6545if test -n "$CP"; then
6546  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6547$as_echo "$CP" >&6; }
6548else
6549  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6550$as_echo "no" >&6; }
6551fi
6552
6553
6554          if test "x$CP" = x; then
6555            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6556          fi
6557        else
6558          # Otherwise we believe it is a complete path. Use it as it is.
6559          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6560$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6561          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6562$as_echo_n "checking for CP... " >&6; }
6563          if test ! -x "$tool_specified"; then
6564            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6565$as_echo "not found" >&6; }
6566            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6567          fi
6568          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6569$as_echo "$tool_specified" >&6; }
6570        fi
6571      fi
6572    fi
6573
6574  fi
6575
6576
6577
6578  if test "x$CP" = x; then
6579    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6580  fi
6581
6582
6583
6584
6585
6586  # Publish this variable in the help.
6587
6588
6589  if [ -z "${CUT+x}" ]; then
6590    # The variable is not set by user, try to locate tool using the code snippet
6591    for ac_prog in cut
6592do
6593  # Extract the first word of "$ac_prog", so it can be a program name with args.
6594set dummy $ac_prog; ac_word=$2
6595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6596$as_echo_n "checking for $ac_word... " >&6; }
6597if ${ac_cv_path_CUT+:} false; then :
6598  $as_echo_n "(cached) " >&6
6599else
6600  case $CUT in
6601  [\\/]* | ?:[\\/]*)
6602  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6603  ;;
6604  *)
6605  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6606for as_dir in $PATH
6607do
6608  IFS=$as_save_IFS
6609  test -z "$as_dir" && as_dir=.
6610    for ac_exec_ext in '' $ac_executable_extensions; do
6611  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6612    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6613    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6614    break 2
6615  fi
6616done
6617  done
6618IFS=$as_save_IFS
6619
6620  ;;
6621esac
6622fi
6623CUT=$ac_cv_path_CUT
6624if test -n "$CUT"; then
6625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6626$as_echo "$CUT" >&6; }
6627else
6628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6629$as_echo "no" >&6; }
6630fi
6631
6632
6633  test -n "$CUT" && break
6634done
6635
6636  else
6637    # The variable is set, but is it from the command line or the environment?
6638
6639    # Try to remove the string !CUT! from our list.
6640    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6641    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6642      # If it failed, the variable was not from the command line. Ignore it,
6643      # but warn the user (except for BASH, which is always set by the calling BASH).
6644      if test "xCUT" != xBASH; then
6645        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6646$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6647      fi
6648      # Try to locate tool using the code snippet
6649      for ac_prog in cut
6650do
6651  # Extract the first word of "$ac_prog", so it can be a program name with args.
6652set dummy $ac_prog; ac_word=$2
6653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6654$as_echo_n "checking for $ac_word... " >&6; }
6655if ${ac_cv_path_CUT+:} false; then :
6656  $as_echo_n "(cached) " >&6
6657else
6658  case $CUT in
6659  [\\/]* | ?:[\\/]*)
6660  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6661  ;;
6662  *)
6663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6664for as_dir in $PATH
6665do
6666  IFS=$as_save_IFS
6667  test -z "$as_dir" && as_dir=.
6668    for ac_exec_ext in '' $ac_executable_extensions; do
6669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6670    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6672    break 2
6673  fi
6674done
6675  done
6676IFS=$as_save_IFS
6677
6678  ;;
6679esac
6680fi
6681CUT=$ac_cv_path_CUT
6682if test -n "$CUT"; then
6683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6684$as_echo "$CUT" >&6; }
6685else
6686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6687$as_echo "no" >&6; }
6688fi
6689
6690
6691  test -n "$CUT" && break
6692done
6693
6694    else
6695      # If it succeeded, then it was overridden by the user. We will use it
6696      # for the tool.
6697
6698      # First remove it from the list of overridden variables, so we can test
6699      # for unknown variables in the end.
6700      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6701
6702      # Check if we try to supply an empty value
6703      if test "x$CUT" = x; then
6704        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6705$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6706        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6707$as_echo_n "checking for CUT... " >&6; }
6708        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6709$as_echo "disabled" >&6; }
6710      else
6711        # Check if the provided tool contains a complete path.
6712        tool_specified="$CUT"
6713        tool_basename="${tool_specified##*/}"
6714        if test "x$tool_basename" = "x$tool_specified"; then
6715          # A command without a complete path is provided, search $PATH.
6716          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6717$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6718          # Extract the first word of "$tool_basename", so it can be a program name with args.
6719set dummy $tool_basename; ac_word=$2
6720{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6721$as_echo_n "checking for $ac_word... " >&6; }
6722if ${ac_cv_path_CUT+:} false; then :
6723  $as_echo_n "(cached) " >&6
6724else
6725  case $CUT in
6726  [\\/]* | ?:[\\/]*)
6727  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6728  ;;
6729  *)
6730  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6731for as_dir in $PATH
6732do
6733  IFS=$as_save_IFS
6734  test -z "$as_dir" && as_dir=.
6735    for ac_exec_ext in '' $ac_executable_extensions; do
6736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6737    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6739    break 2
6740  fi
6741done
6742  done
6743IFS=$as_save_IFS
6744
6745  ;;
6746esac
6747fi
6748CUT=$ac_cv_path_CUT
6749if test -n "$CUT"; then
6750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6751$as_echo "$CUT" >&6; }
6752else
6753  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6754$as_echo "no" >&6; }
6755fi
6756
6757
6758          if test "x$CUT" = x; then
6759            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6760          fi
6761        else
6762          # Otherwise we believe it is a complete path. Use it as it is.
6763          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6764$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6765          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6766$as_echo_n "checking for CUT... " >&6; }
6767          if test ! -x "$tool_specified"; then
6768            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6769$as_echo "not found" >&6; }
6770            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6771          fi
6772          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6773$as_echo "$tool_specified" >&6; }
6774        fi
6775      fi
6776    fi
6777
6778  fi
6779
6780
6781
6782  if test "x$CUT" = x; then
6783    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6784  fi
6785
6786
6787
6788
6789
6790  # Publish this variable in the help.
6791
6792
6793  if [ -z "${DATE+x}" ]; then
6794    # The variable is not set by user, try to locate tool using the code snippet
6795    for ac_prog in date
6796do
6797  # Extract the first word of "$ac_prog", so it can be a program name with args.
6798set dummy $ac_prog; ac_word=$2
6799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6800$as_echo_n "checking for $ac_word... " >&6; }
6801if ${ac_cv_path_DATE+:} false; then :
6802  $as_echo_n "(cached) " >&6
6803else
6804  case $DATE in
6805  [\\/]* | ?:[\\/]*)
6806  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6807  ;;
6808  *)
6809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6810for as_dir in $PATH
6811do
6812  IFS=$as_save_IFS
6813  test -z "$as_dir" && as_dir=.
6814    for ac_exec_ext in '' $ac_executable_extensions; do
6815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6816    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6818    break 2
6819  fi
6820done
6821  done
6822IFS=$as_save_IFS
6823
6824  ;;
6825esac
6826fi
6827DATE=$ac_cv_path_DATE
6828if test -n "$DATE"; then
6829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6830$as_echo "$DATE" >&6; }
6831else
6832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6833$as_echo "no" >&6; }
6834fi
6835
6836
6837  test -n "$DATE" && break
6838done
6839
6840  else
6841    # The variable is set, but is it from the command line or the environment?
6842
6843    # Try to remove the string !DATE! from our list.
6844    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6845    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6846      # If it failed, the variable was not from the command line. Ignore it,
6847      # but warn the user (except for BASH, which is always set by the calling BASH).
6848      if test "xDATE" != xBASH; then
6849        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6850$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6851      fi
6852      # Try to locate tool using the code snippet
6853      for ac_prog in date
6854do
6855  # Extract the first word of "$ac_prog", so it can be a program name with args.
6856set dummy $ac_prog; ac_word=$2
6857{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6858$as_echo_n "checking for $ac_word... " >&6; }
6859if ${ac_cv_path_DATE+:} false; then :
6860  $as_echo_n "(cached) " >&6
6861else
6862  case $DATE in
6863  [\\/]* | ?:[\\/]*)
6864  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6865  ;;
6866  *)
6867  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6868for as_dir in $PATH
6869do
6870  IFS=$as_save_IFS
6871  test -z "$as_dir" && as_dir=.
6872    for ac_exec_ext in '' $ac_executable_extensions; do
6873  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6874    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6875    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6876    break 2
6877  fi
6878done
6879  done
6880IFS=$as_save_IFS
6881
6882  ;;
6883esac
6884fi
6885DATE=$ac_cv_path_DATE
6886if test -n "$DATE"; then
6887  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6888$as_echo "$DATE" >&6; }
6889else
6890  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6891$as_echo "no" >&6; }
6892fi
6893
6894
6895  test -n "$DATE" && break
6896done
6897
6898    else
6899      # If it succeeded, then it was overridden by the user. We will use it
6900      # for the tool.
6901
6902      # First remove it from the list of overridden variables, so we can test
6903      # for unknown variables in the end.
6904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6905
6906      # Check if we try to supply an empty value
6907      if test "x$DATE" = x; then
6908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6909$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6911$as_echo_n "checking for DATE... " >&6; }
6912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6913$as_echo "disabled" >&6; }
6914      else
6915        # Check if the provided tool contains a complete path.
6916        tool_specified="$DATE"
6917        tool_basename="${tool_specified##*/}"
6918        if test "x$tool_basename" = "x$tool_specified"; then
6919          # A command without a complete path is provided, search $PATH.
6920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6921$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6922          # Extract the first word of "$tool_basename", so it can be a program name with args.
6923set dummy $tool_basename; ac_word=$2
6924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6925$as_echo_n "checking for $ac_word... " >&6; }
6926if ${ac_cv_path_DATE+:} false; then :
6927  $as_echo_n "(cached) " >&6
6928else
6929  case $DATE in
6930  [\\/]* | ?:[\\/]*)
6931  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6932  ;;
6933  *)
6934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6935for as_dir in $PATH
6936do
6937  IFS=$as_save_IFS
6938  test -z "$as_dir" && as_dir=.
6939    for ac_exec_ext in '' $ac_executable_extensions; do
6940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6941    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6943    break 2
6944  fi
6945done
6946  done
6947IFS=$as_save_IFS
6948
6949  ;;
6950esac
6951fi
6952DATE=$ac_cv_path_DATE
6953if test -n "$DATE"; then
6954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6955$as_echo "$DATE" >&6; }
6956else
6957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6958$as_echo "no" >&6; }
6959fi
6960
6961
6962          if test "x$DATE" = x; then
6963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6964          fi
6965        else
6966          # Otherwise we believe it is a complete path. Use it as it is.
6967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6968$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6970$as_echo_n "checking for DATE... " >&6; }
6971          if test ! -x "$tool_specified"; then
6972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6973$as_echo "not found" >&6; }
6974            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6975          fi
6976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6977$as_echo "$tool_specified" >&6; }
6978        fi
6979      fi
6980    fi
6981
6982  fi
6983
6984
6985
6986  if test "x$DATE" = x; then
6987    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6988  fi
6989
6990
6991
6992
6993
6994  # Publish this variable in the help.
6995
6996
6997  if [ -z "${DIFF+x}" ]; then
6998    # The variable is not set by user, try to locate tool using the code snippet
6999    for ac_prog in gdiff diff
7000do
7001  # Extract the first word of "$ac_prog", so it can be a program name with args.
7002set dummy $ac_prog; ac_word=$2
7003{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7004$as_echo_n "checking for $ac_word... " >&6; }
7005if ${ac_cv_path_DIFF+:} false; then :
7006  $as_echo_n "(cached) " >&6
7007else
7008  case $DIFF in
7009  [\\/]* | ?:[\\/]*)
7010  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7011  ;;
7012  *)
7013  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7014for as_dir in $PATH
7015do
7016  IFS=$as_save_IFS
7017  test -z "$as_dir" && as_dir=.
7018    for ac_exec_ext in '' $ac_executable_extensions; do
7019  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7020    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7021    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7022    break 2
7023  fi
7024done
7025  done
7026IFS=$as_save_IFS
7027
7028  ;;
7029esac
7030fi
7031DIFF=$ac_cv_path_DIFF
7032if test -n "$DIFF"; then
7033  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7034$as_echo "$DIFF" >&6; }
7035else
7036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7037$as_echo "no" >&6; }
7038fi
7039
7040
7041  test -n "$DIFF" && break
7042done
7043
7044  else
7045    # The variable is set, but is it from the command line or the environment?
7046
7047    # Try to remove the string !DIFF! from our list.
7048    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7049    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7050      # If it failed, the variable was not from the command line. Ignore it,
7051      # but warn the user (except for BASH, which is always set by the calling BASH).
7052      if test "xDIFF" != xBASH; then
7053        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7054$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7055      fi
7056      # Try to locate tool using the code snippet
7057      for ac_prog in gdiff diff
7058do
7059  # Extract the first word of "$ac_prog", so it can be a program name with args.
7060set dummy $ac_prog; ac_word=$2
7061{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7062$as_echo_n "checking for $ac_word... " >&6; }
7063if ${ac_cv_path_DIFF+:} false; then :
7064  $as_echo_n "(cached) " >&6
7065else
7066  case $DIFF in
7067  [\\/]* | ?:[\\/]*)
7068  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7069  ;;
7070  *)
7071  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7072for as_dir in $PATH
7073do
7074  IFS=$as_save_IFS
7075  test -z "$as_dir" && as_dir=.
7076    for ac_exec_ext in '' $ac_executable_extensions; do
7077  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7078    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7079    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7080    break 2
7081  fi
7082done
7083  done
7084IFS=$as_save_IFS
7085
7086  ;;
7087esac
7088fi
7089DIFF=$ac_cv_path_DIFF
7090if test -n "$DIFF"; then
7091  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7092$as_echo "$DIFF" >&6; }
7093else
7094  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7095$as_echo "no" >&6; }
7096fi
7097
7098
7099  test -n "$DIFF" && break
7100done
7101
7102    else
7103      # If it succeeded, then it was overridden by the user. We will use it
7104      # for the tool.
7105
7106      # First remove it from the list of overridden variables, so we can test
7107      # for unknown variables in the end.
7108      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7109
7110      # Check if we try to supply an empty value
7111      if test "x$DIFF" = x; then
7112        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7113$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7114        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7115$as_echo_n "checking for DIFF... " >&6; }
7116        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7117$as_echo "disabled" >&6; }
7118      else
7119        # Check if the provided tool contains a complete path.
7120        tool_specified="$DIFF"
7121        tool_basename="${tool_specified##*/}"
7122        if test "x$tool_basename" = "x$tool_specified"; then
7123          # A command without a complete path is provided, search $PATH.
7124          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7125$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7126          # Extract the first word of "$tool_basename", so it can be a program name with args.
7127set dummy $tool_basename; ac_word=$2
7128{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7129$as_echo_n "checking for $ac_word... " >&6; }
7130if ${ac_cv_path_DIFF+:} false; then :
7131  $as_echo_n "(cached) " >&6
7132else
7133  case $DIFF in
7134  [\\/]* | ?:[\\/]*)
7135  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7136  ;;
7137  *)
7138  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7139for as_dir in $PATH
7140do
7141  IFS=$as_save_IFS
7142  test -z "$as_dir" && as_dir=.
7143    for ac_exec_ext in '' $ac_executable_extensions; do
7144  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7145    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7146    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7147    break 2
7148  fi
7149done
7150  done
7151IFS=$as_save_IFS
7152
7153  ;;
7154esac
7155fi
7156DIFF=$ac_cv_path_DIFF
7157if test -n "$DIFF"; then
7158  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7159$as_echo "$DIFF" >&6; }
7160else
7161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7162$as_echo "no" >&6; }
7163fi
7164
7165
7166          if test "x$DIFF" = x; then
7167            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7168          fi
7169        else
7170          # Otherwise we believe it is a complete path. Use it as it is.
7171          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7172$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7173          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7174$as_echo_n "checking for DIFF... " >&6; }
7175          if test ! -x "$tool_specified"; then
7176            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7177$as_echo "not found" >&6; }
7178            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7179          fi
7180          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7181$as_echo "$tool_specified" >&6; }
7182        fi
7183      fi
7184    fi
7185
7186  fi
7187
7188
7189
7190  if test "x$DIFF" = x; then
7191    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7192  fi
7193
7194
7195
7196
7197
7198  # Publish this variable in the help.
7199
7200
7201  if [ -z "${DIRNAME+x}" ]; then
7202    # The variable is not set by user, try to locate tool using the code snippet
7203    for ac_prog in dirname
7204do
7205  # Extract the first word of "$ac_prog", so it can be a program name with args.
7206set dummy $ac_prog; ac_word=$2
7207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7208$as_echo_n "checking for $ac_word... " >&6; }
7209if ${ac_cv_path_DIRNAME+:} false; then :
7210  $as_echo_n "(cached) " >&6
7211else
7212  case $DIRNAME in
7213  [\\/]* | ?:[\\/]*)
7214  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7215  ;;
7216  *)
7217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7218for as_dir in $PATH
7219do
7220  IFS=$as_save_IFS
7221  test -z "$as_dir" && as_dir=.
7222    for ac_exec_ext in '' $ac_executable_extensions; do
7223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7224    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7226    break 2
7227  fi
7228done
7229  done
7230IFS=$as_save_IFS
7231
7232  ;;
7233esac
7234fi
7235DIRNAME=$ac_cv_path_DIRNAME
7236if test -n "$DIRNAME"; then
7237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7238$as_echo "$DIRNAME" >&6; }
7239else
7240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7241$as_echo "no" >&6; }
7242fi
7243
7244
7245  test -n "$DIRNAME" && break
7246done
7247
7248  else
7249    # The variable is set, but is it from the command line or the environment?
7250
7251    # Try to remove the string !DIRNAME! from our list.
7252    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7253    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7254      # If it failed, the variable was not from the command line. Ignore it,
7255      # but warn the user (except for BASH, which is always set by the calling BASH).
7256      if test "xDIRNAME" != xBASH; then
7257        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7258$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7259      fi
7260      # Try to locate tool using the code snippet
7261      for ac_prog in dirname
7262do
7263  # Extract the first word of "$ac_prog", so it can be a program name with args.
7264set dummy $ac_prog; ac_word=$2
7265{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7266$as_echo_n "checking for $ac_word... " >&6; }
7267if ${ac_cv_path_DIRNAME+:} false; then :
7268  $as_echo_n "(cached) " >&6
7269else
7270  case $DIRNAME in
7271  [\\/]* | ?:[\\/]*)
7272  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7273  ;;
7274  *)
7275  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7276for as_dir in $PATH
7277do
7278  IFS=$as_save_IFS
7279  test -z "$as_dir" && as_dir=.
7280    for ac_exec_ext in '' $ac_executable_extensions; do
7281  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7282    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7283    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7284    break 2
7285  fi
7286done
7287  done
7288IFS=$as_save_IFS
7289
7290  ;;
7291esac
7292fi
7293DIRNAME=$ac_cv_path_DIRNAME
7294if test -n "$DIRNAME"; then
7295  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7296$as_echo "$DIRNAME" >&6; }
7297else
7298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7299$as_echo "no" >&6; }
7300fi
7301
7302
7303  test -n "$DIRNAME" && break
7304done
7305
7306    else
7307      # If it succeeded, then it was overridden by the user. We will use it
7308      # for the tool.
7309
7310      # First remove it from the list of overridden variables, so we can test
7311      # for unknown variables in the end.
7312      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7313
7314      # Check if we try to supply an empty value
7315      if test "x$DIRNAME" = x; then
7316        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7317$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7318        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7319$as_echo_n "checking for DIRNAME... " >&6; }
7320        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7321$as_echo "disabled" >&6; }
7322      else
7323        # Check if the provided tool contains a complete path.
7324        tool_specified="$DIRNAME"
7325        tool_basename="${tool_specified##*/}"
7326        if test "x$tool_basename" = "x$tool_specified"; then
7327          # A command without a complete path is provided, search $PATH.
7328          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7329$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7330          # Extract the first word of "$tool_basename", so it can be a program name with args.
7331set dummy $tool_basename; ac_word=$2
7332{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7333$as_echo_n "checking for $ac_word... " >&6; }
7334if ${ac_cv_path_DIRNAME+:} false; then :
7335  $as_echo_n "(cached) " >&6
7336else
7337  case $DIRNAME in
7338  [\\/]* | ?:[\\/]*)
7339  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7340  ;;
7341  *)
7342  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7343for as_dir in $PATH
7344do
7345  IFS=$as_save_IFS
7346  test -z "$as_dir" && as_dir=.
7347    for ac_exec_ext in '' $ac_executable_extensions; do
7348  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7349    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7350    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7351    break 2
7352  fi
7353done
7354  done
7355IFS=$as_save_IFS
7356
7357  ;;
7358esac
7359fi
7360DIRNAME=$ac_cv_path_DIRNAME
7361if test -n "$DIRNAME"; then
7362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7363$as_echo "$DIRNAME" >&6; }
7364else
7365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7366$as_echo "no" >&6; }
7367fi
7368
7369
7370          if test "x$DIRNAME" = x; then
7371            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7372          fi
7373        else
7374          # Otherwise we believe it is a complete path. Use it as it is.
7375          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7376$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7377          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7378$as_echo_n "checking for DIRNAME... " >&6; }
7379          if test ! -x "$tool_specified"; then
7380            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7381$as_echo "not found" >&6; }
7382            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7383          fi
7384          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7385$as_echo "$tool_specified" >&6; }
7386        fi
7387      fi
7388    fi
7389
7390  fi
7391
7392
7393
7394  if test "x$DIRNAME" = x; then
7395    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7396  fi
7397
7398
7399
7400
7401
7402  # Publish this variable in the help.
7403
7404
7405  if [ -z "${ECHO+x}" ]; then
7406    # The variable is not set by user, try to locate tool using the code snippet
7407    for ac_prog in echo
7408do
7409  # Extract the first word of "$ac_prog", so it can be a program name with args.
7410set dummy $ac_prog; ac_word=$2
7411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7412$as_echo_n "checking for $ac_word... " >&6; }
7413if ${ac_cv_path_ECHO+:} false; then :
7414  $as_echo_n "(cached) " >&6
7415else
7416  case $ECHO in
7417  [\\/]* | ?:[\\/]*)
7418  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7419  ;;
7420  *)
7421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7422for as_dir in $PATH
7423do
7424  IFS=$as_save_IFS
7425  test -z "$as_dir" && as_dir=.
7426    for ac_exec_ext in '' $ac_executable_extensions; do
7427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7428    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7430    break 2
7431  fi
7432done
7433  done
7434IFS=$as_save_IFS
7435
7436  ;;
7437esac
7438fi
7439ECHO=$ac_cv_path_ECHO
7440if test -n "$ECHO"; then
7441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7442$as_echo "$ECHO" >&6; }
7443else
7444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7445$as_echo "no" >&6; }
7446fi
7447
7448
7449  test -n "$ECHO" && break
7450done
7451
7452  else
7453    # The variable is set, but is it from the command line or the environment?
7454
7455    # Try to remove the string !ECHO! from our list.
7456    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7457    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7458      # If it failed, the variable was not from the command line. Ignore it,
7459      # but warn the user (except for BASH, which is always set by the calling BASH).
7460      if test "xECHO" != xBASH; then
7461        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7462$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7463      fi
7464      # Try to locate tool using the code snippet
7465      for ac_prog in echo
7466do
7467  # Extract the first word of "$ac_prog", so it can be a program name with args.
7468set dummy $ac_prog; ac_word=$2
7469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7470$as_echo_n "checking for $ac_word... " >&6; }
7471if ${ac_cv_path_ECHO+:} false; then :
7472  $as_echo_n "(cached) " >&6
7473else
7474  case $ECHO in
7475  [\\/]* | ?:[\\/]*)
7476  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7477  ;;
7478  *)
7479  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7480for as_dir in $PATH
7481do
7482  IFS=$as_save_IFS
7483  test -z "$as_dir" && as_dir=.
7484    for ac_exec_ext in '' $ac_executable_extensions; do
7485  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7486    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7487    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7488    break 2
7489  fi
7490done
7491  done
7492IFS=$as_save_IFS
7493
7494  ;;
7495esac
7496fi
7497ECHO=$ac_cv_path_ECHO
7498if test -n "$ECHO"; then
7499  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7500$as_echo "$ECHO" >&6; }
7501else
7502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7503$as_echo "no" >&6; }
7504fi
7505
7506
7507  test -n "$ECHO" && break
7508done
7509
7510    else
7511      # If it succeeded, then it was overridden by the user. We will use it
7512      # for the tool.
7513
7514      # First remove it from the list of overridden variables, so we can test
7515      # for unknown variables in the end.
7516      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7517
7518      # Check if we try to supply an empty value
7519      if test "x$ECHO" = x; then
7520        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7521$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7522        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7523$as_echo_n "checking for ECHO... " >&6; }
7524        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7525$as_echo "disabled" >&6; }
7526      else
7527        # Check if the provided tool contains a complete path.
7528        tool_specified="$ECHO"
7529        tool_basename="${tool_specified##*/}"
7530        if test "x$tool_basename" = "x$tool_specified"; then
7531          # A command without a complete path is provided, search $PATH.
7532          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7533$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7534          # Extract the first word of "$tool_basename", so it can be a program name with args.
7535set dummy $tool_basename; ac_word=$2
7536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7537$as_echo_n "checking for $ac_word... " >&6; }
7538if ${ac_cv_path_ECHO+:} false; then :
7539  $as_echo_n "(cached) " >&6
7540else
7541  case $ECHO in
7542  [\\/]* | ?:[\\/]*)
7543  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7544  ;;
7545  *)
7546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7547for as_dir in $PATH
7548do
7549  IFS=$as_save_IFS
7550  test -z "$as_dir" && as_dir=.
7551    for ac_exec_ext in '' $ac_executable_extensions; do
7552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7553    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7555    break 2
7556  fi
7557done
7558  done
7559IFS=$as_save_IFS
7560
7561  ;;
7562esac
7563fi
7564ECHO=$ac_cv_path_ECHO
7565if test -n "$ECHO"; then
7566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7567$as_echo "$ECHO" >&6; }
7568else
7569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7570$as_echo "no" >&6; }
7571fi
7572
7573
7574          if test "x$ECHO" = x; then
7575            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7576          fi
7577        else
7578          # Otherwise we believe it is a complete path. Use it as it is.
7579          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7580$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7581          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7582$as_echo_n "checking for ECHO... " >&6; }
7583          if test ! -x "$tool_specified"; then
7584            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7585$as_echo "not found" >&6; }
7586            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7587          fi
7588          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7589$as_echo "$tool_specified" >&6; }
7590        fi
7591      fi
7592    fi
7593
7594  fi
7595
7596
7597
7598  if test "x$ECHO" = x; then
7599    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7600  fi
7601
7602
7603
7604
7605
7606  # Publish this variable in the help.
7607
7608
7609  if [ -z "${EXPR+x}" ]; then
7610    # The variable is not set by user, try to locate tool using the code snippet
7611    for ac_prog in expr
7612do
7613  # Extract the first word of "$ac_prog", so it can be a program name with args.
7614set dummy $ac_prog; ac_word=$2
7615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7616$as_echo_n "checking for $ac_word... " >&6; }
7617if ${ac_cv_path_EXPR+:} false; then :
7618  $as_echo_n "(cached) " >&6
7619else
7620  case $EXPR in
7621  [\\/]* | ?:[\\/]*)
7622  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7623  ;;
7624  *)
7625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7626for as_dir in $PATH
7627do
7628  IFS=$as_save_IFS
7629  test -z "$as_dir" && as_dir=.
7630    for ac_exec_ext in '' $ac_executable_extensions; do
7631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7632    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7634    break 2
7635  fi
7636done
7637  done
7638IFS=$as_save_IFS
7639
7640  ;;
7641esac
7642fi
7643EXPR=$ac_cv_path_EXPR
7644if test -n "$EXPR"; then
7645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7646$as_echo "$EXPR" >&6; }
7647else
7648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7649$as_echo "no" >&6; }
7650fi
7651
7652
7653  test -n "$EXPR" && break
7654done
7655
7656  else
7657    # The variable is set, but is it from the command line or the environment?
7658
7659    # Try to remove the string !EXPR! from our list.
7660    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7661    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7662      # If it failed, the variable was not from the command line. Ignore it,
7663      # but warn the user (except for BASH, which is always set by the calling BASH).
7664      if test "xEXPR" != xBASH; then
7665        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7666$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7667      fi
7668      # Try to locate tool using the code snippet
7669      for ac_prog in expr
7670do
7671  # Extract the first word of "$ac_prog", so it can be a program name with args.
7672set dummy $ac_prog; ac_word=$2
7673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7674$as_echo_n "checking for $ac_word... " >&6; }
7675if ${ac_cv_path_EXPR+:} false; then :
7676  $as_echo_n "(cached) " >&6
7677else
7678  case $EXPR in
7679  [\\/]* | ?:[\\/]*)
7680  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7681  ;;
7682  *)
7683  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7684for as_dir in $PATH
7685do
7686  IFS=$as_save_IFS
7687  test -z "$as_dir" && as_dir=.
7688    for ac_exec_ext in '' $ac_executable_extensions; do
7689  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7690    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7691    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7692    break 2
7693  fi
7694done
7695  done
7696IFS=$as_save_IFS
7697
7698  ;;
7699esac
7700fi
7701EXPR=$ac_cv_path_EXPR
7702if test -n "$EXPR"; then
7703  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7704$as_echo "$EXPR" >&6; }
7705else
7706  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7707$as_echo "no" >&6; }
7708fi
7709
7710
7711  test -n "$EXPR" && break
7712done
7713
7714    else
7715      # If it succeeded, then it was overridden by the user. We will use it
7716      # for the tool.
7717
7718      # First remove it from the list of overridden variables, so we can test
7719      # for unknown variables in the end.
7720      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7721
7722      # Check if we try to supply an empty value
7723      if test "x$EXPR" = x; then
7724        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7725$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7726        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7727$as_echo_n "checking for EXPR... " >&6; }
7728        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7729$as_echo "disabled" >&6; }
7730      else
7731        # Check if the provided tool contains a complete path.
7732        tool_specified="$EXPR"
7733        tool_basename="${tool_specified##*/}"
7734        if test "x$tool_basename" = "x$tool_specified"; then
7735          # A command without a complete path is provided, search $PATH.
7736          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7737$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7738          # Extract the first word of "$tool_basename", so it can be a program name with args.
7739set dummy $tool_basename; ac_word=$2
7740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7741$as_echo_n "checking for $ac_word... " >&6; }
7742if ${ac_cv_path_EXPR+:} false; then :
7743  $as_echo_n "(cached) " >&6
7744else
7745  case $EXPR in
7746  [\\/]* | ?:[\\/]*)
7747  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7748  ;;
7749  *)
7750  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7751for as_dir in $PATH
7752do
7753  IFS=$as_save_IFS
7754  test -z "$as_dir" && as_dir=.
7755    for ac_exec_ext in '' $ac_executable_extensions; do
7756  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7757    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7758    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7759    break 2
7760  fi
7761done
7762  done
7763IFS=$as_save_IFS
7764
7765  ;;
7766esac
7767fi
7768EXPR=$ac_cv_path_EXPR
7769if test -n "$EXPR"; then
7770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7771$as_echo "$EXPR" >&6; }
7772else
7773  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7774$as_echo "no" >&6; }
7775fi
7776
7777
7778          if test "x$EXPR" = x; then
7779            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7780          fi
7781        else
7782          # Otherwise we believe it is a complete path. Use it as it is.
7783          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7784$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7785          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7786$as_echo_n "checking for EXPR... " >&6; }
7787          if test ! -x "$tool_specified"; then
7788            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7789$as_echo "not found" >&6; }
7790            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7791          fi
7792          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7793$as_echo "$tool_specified" >&6; }
7794        fi
7795      fi
7796    fi
7797
7798  fi
7799
7800
7801
7802  if test "x$EXPR" = x; then
7803    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7804  fi
7805
7806
7807
7808
7809
7810  # Publish this variable in the help.
7811
7812
7813  if [ -z "${FILE+x}" ]; then
7814    # The variable is not set by user, try to locate tool using the code snippet
7815    for ac_prog in file
7816do
7817  # Extract the first word of "$ac_prog", so it can be a program name with args.
7818set dummy $ac_prog; ac_word=$2
7819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7820$as_echo_n "checking for $ac_word... " >&6; }
7821if ${ac_cv_path_FILE+:} false; then :
7822  $as_echo_n "(cached) " >&6
7823else
7824  case $FILE in
7825  [\\/]* | ?:[\\/]*)
7826  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7827  ;;
7828  *)
7829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7830for as_dir in $PATH
7831do
7832  IFS=$as_save_IFS
7833  test -z "$as_dir" && as_dir=.
7834    for ac_exec_ext in '' $ac_executable_extensions; do
7835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7836    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7838    break 2
7839  fi
7840done
7841  done
7842IFS=$as_save_IFS
7843
7844  ;;
7845esac
7846fi
7847FILE=$ac_cv_path_FILE
7848if test -n "$FILE"; then
7849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7850$as_echo "$FILE" >&6; }
7851else
7852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7853$as_echo "no" >&6; }
7854fi
7855
7856
7857  test -n "$FILE" && break
7858done
7859
7860  else
7861    # The variable is set, but is it from the command line or the environment?
7862
7863    # Try to remove the string !FILE! from our list.
7864    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7865    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7866      # If it failed, the variable was not from the command line. Ignore it,
7867      # but warn the user (except for BASH, which is always set by the calling BASH).
7868      if test "xFILE" != xBASH; then
7869        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7870$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7871      fi
7872      # Try to locate tool using the code snippet
7873      for ac_prog in file
7874do
7875  # Extract the first word of "$ac_prog", so it can be a program name with args.
7876set dummy $ac_prog; ac_word=$2
7877{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7878$as_echo_n "checking for $ac_word... " >&6; }
7879if ${ac_cv_path_FILE+:} false; then :
7880  $as_echo_n "(cached) " >&6
7881else
7882  case $FILE in
7883  [\\/]* | ?:[\\/]*)
7884  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7885  ;;
7886  *)
7887  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7888for as_dir in $PATH
7889do
7890  IFS=$as_save_IFS
7891  test -z "$as_dir" && as_dir=.
7892    for ac_exec_ext in '' $ac_executable_extensions; do
7893  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7894    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7895    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7896    break 2
7897  fi
7898done
7899  done
7900IFS=$as_save_IFS
7901
7902  ;;
7903esac
7904fi
7905FILE=$ac_cv_path_FILE
7906if test -n "$FILE"; then
7907  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7908$as_echo "$FILE" >&6; }
7909else
7910  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7911$as_echo "no" >&6; }
7912fi
7913
7914
7915  test -n "$FILE" && break
7916done
7917
7918    else
7919      # If it succeeded, then it was overridden by the user. We will use it
7920      # for the tool.
7921
7922      # First remove it from the list of overridden variables, so we can test
7923      # for unknown variables in the end.
7924      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7925
7926      # Check if we try to supply an empty value
7927      if test "x$FILE" = x; then
7928        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7929$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7930        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7931$as_echo_n "checking for FILE... " >&6; }
7932        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7933$as_echo "disabled" >&6; }
7934      else
7935        # Check if the provided tool contains a complete path.
7936        tool_specified="$FILE"
7937        tool_basename="${tool_specified##*/}"
7938        if test "x$tool_basename" = "x$tool_specified"; then
7939          # A command without a complete path is provided, search $PATH.
7940          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7941$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7942          # Extract the first word of "$tool_basename", so it can be a program name with args.
7943set dummy $tool_basename; ac_word=$2
7944{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7945$as_echo_n "checking for $ac_word... " >&6; }
7946if ${ac_cv_path_FILE+:} false; then :
7947  $as_echo_n "(cached) " >&6
7948else
7949  case $FILE in
7950  [\\/]* | ?:[\\/]*)
7951  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7952  ;;
7953  *)
7954  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7955for as_dir in $PATH
7956do
7957  IFS=$as_save_IFS
7958  test -z "$as_dir" && as_dir=.
7959    for ac_exec_ext in '' $ac_executable_extensions; do
7960  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7961    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7962    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7963    break 2
7964  fi
7965done
7966  done
7967IFS=$as_save_IFS
7968
7969  ;;
7970esac
7971fi
7972FILE=$ac_cv_path_FILE
7973if test -n "$FILE"; then
7974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7975$as_echo "$FILE" >&6; }
7976else
7977  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7978$as_echo "no" >&6; }
7979fi
7980
7981
7982          if test "x$FILE" = x; then
7983            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7984          fi
7985        else
7986          # Otherwise we believe it is a complete path. Use it as it is.
7987          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7988$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7989          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7990$as_echo_n "checking for FILE... " >&6; }
7991          if test ! -x "$tool_specified"; then
7992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7993$as_echo "not found" >&6; }
7994            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7995          fi
7996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7997$as_echo "$tool_specified" >&6; }
7998        fi
7999      fi
8000    fi
8001
8002  fi
8003
8004
8005
8006  if test "x$FILE" = x; then
8007    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
8008  fi
8009
8010
8011
8012
8013
8014  # Publish this variable in the help.
8015
8016
8017  if [ -z "${FIND+x}" ]; then
8018    # The variable is not set by user, try to locate tool using the code snippet
8019    for ac_prog in find
8020do
8021  # Extract the first word of "$ac_prog", so it can be a program name with args.
8022set dummy $ac_prog; ac_word=$2
8023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8024$as_echo_n "checking for $ac_word... " >&6; }
8025if ${ac_cv_path_FIND+:} false; then :
8026  $as_echo_n "(cached) " >&6
8027else
8028  case $FIND in
8029  [\\/]* | ?:[\\/]*)
8030  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8031  ;;
8032  *)
8033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8034for as_dir in $PATH
8035do
8036  IFS=$as_save_IFS
8037  test -z "$as_dir" && as_dir=.
8038    for ac_exec_ext in '' $ac_executable_extensions; do
8039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8040    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8042    break 2
8043  fi
8044done
8045  done
8046IFS=$as_save_IFS
8047
8048  ;;
8049esac
8050fi
8051FIND=$ac_cv_path_FIND
8052if test -n "$FIND"; then
8053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8054$as_echo "$FIND" >&6; }
8055else
8056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8057$as_echo "no" >&6; }
8058fi
8059
8060
8061  test -n "$FIND" && break
8062done
8063
8064  else
8065    # The variable is set, but is it from the command line or the environment?
8066
8067    # Try to remove the string !FIND! from our list.
8068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8070      # If it failed, the variable was not from the command line. Ignore it,
8071      # but warn the user (except for BASH, which is always set by the calling BASH).
8072      if test "xFIND" != xBASH; then
8073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8074$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8075      fi
8076      # Try to locate tool using the code snippet
8077      for ac_prog in find
8078do
8079  # Extract the first word of "$ac_prog", so it can be a program name with args.
8080set dummy $ac_prog; ac_word=$2
8081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8082$as_echo_n "checking for $ac_word... " >&6; }
8083if ${ac_cv_path_FIND+:} false; then :
8084  $as_echo_n "(cached) " >&6
8085else
8086  case $FIND in
8087  [\\/]* | ?:[\\/]*)
8088  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8089  ;;
8090  *)
8091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8092for as_dir in $PATH
8093do
8094  IFS=$as_save_IFS
8095  test -z "$as_dir" && as_dir=.
8096    for ac_exec_ext in '' $ac_executable_extensions; do
8097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8098    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8100    break 2
8101  fi
8102done
8103  done
8104IFS=$as_save_IFS
8105
8106  ;;
8107esac
8108fi
8109FIND=$ac_cv_path_FIND
8110if test -n "$FIND"; then
8111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8112$as_echo "$FIND" >&6; }
8113else
8114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8115$as_echo "no" >&6; }
8116fi
8117
8118
8119  test -n "$FIND" && break
8120done
8121
8122    else
8123      # If it succeeded, then it was overridden by the user. We will use it
8124      # for the tool.
8125
8126      # First remove it from the list of overridden variables, so we can test
8127      # for unknown variables in the end.
8128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8129
8130      # Check if we try to supply an empty value
8131      if test "x$FIND" = x; then
8132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8133$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8135$as_echo_n "checking for FIND... " >&6; }
8136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8137$as_echo "disabled" >&6; }
8138      else
8139        # Check if the provided tool contains a complete path.
8140        tool_specified="$FIND"
8141        tool_basename="${tool_specified##*/}"
8142        if test "x$tool_basename" = "x$tool_specified"; then
8143          # A command without a complete path is provided, search $PATH.
8144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8145$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8146          # Extract the first word of "$tool_basename", so it can be a program name with args.
8147set dummy $tool_basename; ac_word=$2
8148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8149$as_echo_n "checking for $ac_word... " >&6; }
8150if ${ac_cv_path_FIND+:} false; then :
8151  $as_echo_n "(cached) " >&6
8152else
8153  case $FIND in
8154  [\\/]* | ?:[\\/]*)
8155  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8156  ;;
8157  *)
8158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8159for as_dir in $PATH
8160do
8161  IFS=$as_save_IFS
8162  test -z "$as_dir" && as_dir=.
8163    for ac_exec_ext in '' $ac_executable_extensions; do
8164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8165    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8167    break 2
8168  fi
8169done
8170  done
8171IFS=$as_save_IFS
8172
8173  ;;
8174esac
8175fi
8176FIND=$ac_cv_path_FIND
8177if test -n "$FIND"; then
8178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8179$as_echo "$FIND" >&6; }
8180else
8181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8182$as_echo "no" >&6; }
8183fi
8184
8185
8186          if test "x$FIND" = x; then
8187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8188          fi
8189        else
8190          # Otherwise we believe it is a complete path. Use it as it is.
8191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8192$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8194$as_echo_n "checking for FIND... " >&6; }
8195          if test ! -x "$tool_specified"; then
8196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8197$as_echo "not found" >&6; }
8198            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8199          fi
8200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8201$as_echo "$tool_specified" >&6; }
8202        fi
8203      fi
8204    fi
8205
8206  fi
8207
8208
8209
8210  if test "x$FIND" = x; then
8211    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8212  fi
8213
8214
8215
8216
8217
8218  # Publish this variable in the help.
8219
8220
8221  if [ -z "${HEAD+x}" ]; then
8222    # The variable is not set by user, try to locate tool using the code snippet
8223    for ac_prog in head
8224do
8225  # Extract the first word of "$ac_prog", so it can be a program name with args.
8226set dummy $ac_prog; ac_word=$2
8227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8228$as_echo_n "checking for $ac_word... " >&6; }
8229if ${ac_cv_path_HEAD+:} false; then :
8230  $as_echo_n "(cached) " >&6
8231else
8232  case $HEAD in
8233  [\\/]* | ?:[\\/]*)
8234  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8235  ;;
8236  *)
8237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8238for as_dir in $PATH
8239do
8240  IFS=$as_save_IFS
8241  test -z "$as_dir" && as_dir=.
8242    for ac_exec_ext in '' $ac_executable_extensions; do
8243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8244    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8246    break 2
8247  fi
8248done
8249  done
8250IFS=$as_save_IFS
8251
8252  ;;
8253esac
8254fi
8255HEAD=$ac_cv_path_HEAD
8256if test -n "$HEAD"; then
8257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8258$as_echo "$HEAD" >&6; }
8259else
8260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8261$as_echo "no" >&6; }
8262fi
8263
8264
8265  test -n "$HEAD" && break
8266done
8267
8268  else
8269    # The variable is set, but is it from the command line or the environment?
8270
8271    # Try to remove the string !HEAD! from our list.
8272    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8273    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8274      # If it failed, the variable was not from the command line. Ignore it,
8275      # but warn the user (except for BASH, which is always set by the calling BASH).
8276      if test "xHEAD" != xBASH; then
8277        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8278$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8279      fi
8280      # Try to locate tool using the code snippet
8281      for ac_prog in head
8282do
8283  # Extract the first word of "$ac_prog", so it can be a program name with args.
8284set dummy $ac_prog; ac_word=$2
8285{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8286$as_echo_n "checking for $ac_word... " >&6; }
8287if ${ac_cv_path_HEAD+:} false; then :
8288  $as_echo_n "(cached) " >&6
8289else
8290  case $HEAD in
8291  [\\/]* | ?:[\\/]*)
8292  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8293  ;;
8294  *)
8295  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8296for as_dir in $PATH
8297do
8298  IFS=$as_save_IFS
8299  test -z "$as_dir" && as_dir=.
8300    for ac_exec_ext in '' $ac_executable_extensions; do
8301  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8302    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8303    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8304    break 2
8305  fi
8306done
8307  done
8308IFS=$as_save_IFS
8309
8310  ;;
8311esac
8312fi
8313HEAD=$ac_cv_path_HEAD
8314if test -n "$HEAD"; then
8315  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8316$as_echo "$HEAD" >&6; }
8317else
8318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8319$as_echo "no" >&6; }
8320fi
8321
8322
8323  test -n "$HEAD" && break
8324done
8325
8326    else
8327      # If it succeeded, then it was overridden by the user. We will use it
8328      # for the tool.
8329
8330      # First remove it from the list of overridden variables, so we can test
8331      # for unknown variables in the end.
8332      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8333
8334      # Check if we try to supply an empty value
8335      if test "x$HEAD" = x; then
8336        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8337$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8338        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8339$as_echo_n "checking for HEAD... " >&6; }
8340        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8341$as_echo "disabled" >&6; }
8342      else
8343        # Check if the provided tool contains a complete path.
8344        tool_specified="$HEAD"
8345        tool_basename="${tool_specified##*/}"
8346        if test "x$tool_basename" = "x$tool_specified"; then
8347          # A command without a complete path is provided, search $PATH.
8348          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8349$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8350          # Extract the first word of "$tool_basename", so it can be a program name with args.
8351set dummy $tool_basename; ac_word=$2
8352{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8353$as_echo_n "checking for $ac_word... " >&6; }
8354if ${ac_cv_path_HEAD+:} false; then :
8355  $as_echo_n "(cached) " >&6
8356else
8357  case $HEAD in
8358  [\\/]* | ?:[\\/]*)
8359  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8360  ;;
8361  *)
8362  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8363for as_dir in $PATH
8364do
8365  IFS=$as_save_IFS
8366  test -z "$as_dir" && as_dir=.
8367    for ac_exec_ext in '' $ac_executable_extensions; do
8368  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8369    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8370    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8371    break 2
8372  fi
8373done
8374  done
8375IFS=$as_save_IFS
8376
8377  ;;
8378esac
8379fi
8380HEAD=$ac_cv_path_HEAD
8381if test -n "$HEAD"; then
8382  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8383$as_echo "$HEAD" >&6; }
8384else
8385  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8386$as_echo "no" >&6; }
8387fi
8388
8389
8390          if test "x$HEAD" = x; then
8391            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8392          fi
8393        else
8394          # Otherwise we believe it is a complete path. Use it as it is.
8395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8396$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8397          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8398$as_echo_n "checking for HEAD... " >&6; }
8399          if test ! -x "$tool_specified"; then
8400            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8401$as_echo "not found" >&6; }
8402            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8403          fi
8404          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8405$as_echo "$tool_specified" >&6; }
8406        fi
8407      fi
8408    fi
8409
8410  fi
8411
8412
8413
8414  if test "x$HEAD" = x; then
8415    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8416  fi
8417
8418
8419
8420
8421
8422  # Publish this variable in the help.
8423
8424
8425  if [ -z "${GUNZIP+x}" ]; then
8426    # The variable is not set by user, try to locate tool using the code snippet
8427    for ac_prog in gunzip
8428do
8429  # Extract the first word of "$ac_prog", so it can be a program name with args.
8430set dummy $ac_prog; ac_word=$2
8431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8432$as_echo_n "checking for $ac_word... " >&6; }
8433if ${ac_cv_path_GUNZIP+:} false; then :
8434  $as_echo_n "(cached) " >&6
8435else
8436  case $GUNZIP in
8437  [\\/]* | ?:[\\/]*)
8438  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8439  ;;
8440  *)
8441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8442for as_dir in $PATH
8443do
8444  IFS=$as_save_IFS
8445  test -z "$as_dir" && as_dir=.
8446    for ac_exec_ext in '' $ac_executable_extensions; do
8447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8448    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8450    break 2
8451  fi
8452done
8453  done
8454IFS=$as_save_IFS
8455
8456  ;;
8457esac
8458fi
8459GUNZIP=$ac_cv_path_GUNZIP
8460if test -n "$GUNZIP"; then
8461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8462$as_echo "$GUNZIP" >&6; }
8463else
8464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8465$as_echo "no" >&6; }
8466fi
8467
8468
8469  test -n "$GUNZIP" && break
8470done
8471
8472  else
8473    # The variable is set, but is it from the command line or the environment?
8474
8475    # Try to remove the string !GUNZIP! from our list.
8476    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GUNZIP!/}
8477    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8478      # If it failed, the variable was not from the command line. Ignore it,
8479      # but warn the user (except for BASH, which is always set by the calling BASH).
8480      if test "xGUNZIP" != xBASH; then
8481        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&5
8482$as_echo "$as_me: WARNING: Ignoring value of GUNZIP from the environment. Use command line variables instead." >&2;}
8483      fi
8484      # Try to locate tool using the code snippet
8485      for ac_prog in gunzip
8486do
8487  # Extract the first word of "$ac_prog", so it can be a program name with args.
8488set dummy $ac_prog; ac_word=$2
8489{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8490$as_echo_n "checking for $ac_word... " >&6; }
8491if ${ac_cv_path_GUNZIP+:} false; then :
8492  $as_echo_n "(cached) " >&6
8493else
8494  case $GUNZIP in
8495  [\\/]* | ?:[\\/]*)
8496  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8497  ;;
8498  *)
8499  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8500for as_dir in $PATH
8501do
8502  IFS=$as_save_IFS
8503  test -z "$as_dir" && as_dir=.
8504    for ac_exec_ext in '' $ac_executable_extensions; do
8505  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8506    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8507    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8508    break 2
8509  fi
8510done
8511  done
8512IFS=$as_save_IFS
8513
8514  ;;
8515esac
8516fi
8517GUNZIP=$ac_cv_path_GUNZIP
8518if test -n "$GUNZIP"; then
8519  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8520$as_echo "$GUNZIP" >&6; }
8521else
8522  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8523$as_echo "no" >&6; }
8524fi
8525
8526
8527  test -n "$GUNZIP" && break
8528done
8529
8530    else
8531      # If it succeeded, then it was overridden by the user. We will use it
8532      # for the tool.
8533
8534      # First remove it from the list of overridden variables, so we can test
8535      # for unknown variables in the end.
8536      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8537
8538      # Check if we try to supply an empty value
8539      if test "x$GUNZIP" = x; then
8540        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GUNZIP= (no value)" >&5
8541$as_echo "$as_me: Setting user supplied tool GUNZIP= (no value)" >&6;}
8542        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8543$as_echo_n "checking for GUNZIP... " >&6; }
8544        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8545$as_echo "disabled" >&6; }
8546      else
8547        # Check if the provided tool contains a complete path.
8548        tool_specified="$GUNZIP"
8549        tool_basename="${tool_specified##*/}"
8550        if test "x$tool_basename" = "x$tool_specified"; then
8551          # A command without a complete path is provided, search $PATH.
8552          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GUNZIP=$tool_basename" >&5
8553$as_echo "$as_me: Will search for user supplied tool GUNZIP=$tool_basename" >&6;}
8554          # Extract the first word of "$tool_basename", so it can be a program name with args.
8555set dummy $tool_basename; ac_word=$2
8556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8557$as_echo_n "checking for $ac_word... " >&6; }
8558if ${ac_cv_path_GUNZIP+:} false; then :
8559  $as_echo_n "(cached) " >&6
8560else
8561  case $GUNZIP in
8562  [\\/]* | ?:[\\/]*)
8563  ac_cv_path_GUNZIP="$GUNZIP" # Let the user override the test with a path.
8564  ;;
8565  *)
8566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8567for as_dir in $PATH
8568do
8569  IFS=$as_save_IFS
8570  test -z "$as_dir" && as_dir=.
8571    for ac_exec_ext in '' $ac_executable_extensions; do
8572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8573    ac_cv_path_GUNZIP="$as_dir/$ac_word$ac_exec_ext"
8574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8575    break 2
8576  fi
8577done
8578  done
8579IFS=$as_save_IFS
8580
8581  ;;
8582esac
8583fi
8584GUNZIP=$ac_cv_path_GUNZIP
8585if test -n "$GUNZIP"; then
8586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GUNZIP" >&5
8587$as_echo "$GUNZIP" >&6; }
8588else
8589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8590$as_echo "no" >&6; }
8591fi
8592
8593
8594          if test "x$GUNZIP" = x; then
8595            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8596          fi
8597        else
8598          # Otherwise we believe it is a complete path. Use it as it is.
8599          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GUNZIP=$tool_specified" >&5
8600$as_echo "$as_me: Will use user supplied tool GUNZIP=$tool_specified" >&6;}
8601          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GUNZIP" >&5
8602$as_echo_n "checking for GUNZIP... " >&6; }
8603          if test ! -x "$tool_specified"; then
8604            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8605$as_echo "not found" >&6; }
8606            as_fn_error $? "User supplied tool GUNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8607          fi
8608          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8609$as_echo "$tool_specified" >&6; }
8610        fi
8611      fi
8612    fi
8613
8614  fi
8615
8616
8617
8618  if test "x$GUNZIP" = x; then
8619    as_fn_error $? "Could not find required tool for GUNZIP" "$LINENO" 5
8620  fi
8621
8622
8623
8624
8625
8626  # Publish this variable in the help.
8627
8628
8629  if [ -z "${GZIP+x}" ]; then
8630    # The variable is not set by user, try to locate tool using the code snippet
8631    for ac_prog in pigz gzip
8632do
8633  # Extract the first word of "$ac_prog", so it can be a program name with args.
8634set dummy $ac_prog; ac_word=$2
8635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8636$as_echo_n "checking for $ac_word... " >&6; }
8637if ${ac_cv_path_GZIP+:} false; then :
8638  $as_echo_n "(cached) " >&6
8639else
8640  case $GZIP in
8641  [\\/]* | ?:[\\/]*)
8642  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8643  ;;
8644  *)
8645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8646for as_dir in $PATH
8647do
8648  IFS=$as_save_IFS
8649  test -z "$as_dir" && as_dir=.
8650    for ac_exec_ext in '' $ac_executable_extensions; do
8651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8652    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8654    break 2
8655  fi
8656done
8657  done
8658IFS=$as_save_IFS
8659
8660  ;;
8661esac
8662fi
8663GZIP=$ac_cv_path_GZIP
8664if test -n "$GZIP"; then
8665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8666$as_echo "$GZIP" >&6; }
8667else
8668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8669$as_echo "no" >&6; }
8670fi
8671
8672
8673  test -n "$GZIP" && break
8674done
8675
8676  else
8677    # The variable is set, but is it from the command line or the environment?
8678
8679    # Try to remove the string !GZIP! from our list.
8680    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GZIP!/}
8681    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8682      # If it failed, the variable was not from the command line. Ignore it,
8683      # but warn the user (except for BASH, which is always set by the calling BASH).
8684      if test "xGZIP" != xBASH; then
8685        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&5
8686$as_echo "$as_me: WARNING: Ignoring value of GZIP from the environment. Use command line variables instead." >&2;}
8687      fi
8688      # Try to locate tool using the code snippet
8689      for ac_prog in pigz gzip
8690do
8691  # Extract the first word of "$ac_prog", so it can be a program name with args.
8692set dummy $ac_prog; ac_word=$2
8693{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8694$as_echo_n "checking for $ac_word... " >&6; }
8695if ${ac_cv_path_GZIP+:} false; then :
8696  $as_echo_n "(cached) " >&6
8697else
8698  case $GZIP in
8699  [\\/]* | ?:[\\/]*)
8700  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8701  ;;
8702  *)
8703  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8704for as_dir in $PATH
8705do
8706  IFS=$as_save_IFS
8707  test -z "$as_dir" && as_dir=.
8708    for ac_exec_ext in '' $ac_executable_extensions; do
8709  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8710    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8711    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8712    break 2
8713  fi
8714done
8715  done
8716IFS=$as_save_IFS
8717
8718  ;;
8719esac
8720fi
8721GZIP=$ac_cv_path_GZIP
8722if test -n "$GZIP"; then
8723  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8724$as_echo "$GZIP" >&6; }
8725else
8726  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8727$as_echo "no" >&6; }
8728fi
8729
8730
8731  test -n "$GZIP" && break
8732done
8733
8734    else
8735      # If it succeeded, then it was overridden by the user. We will use it
8736      # for the tool.
8737
8738      # First remove it from the list of overridden variables, so we can test
8739      # for unknown variables in the end.
8740      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8741
8742      # Check if we try to supply an empty value
8743      if test "x$GZIP" = x; then
8744        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GZIP= (no value)" >&5
8745$as_echo "$as_me: Setting user supplied tool GZIP= (no value)" >&6;}
8746        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8747$as_echo_n "checking for GZIP... " >&6; }
8748        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8749$as_echo "disabled" >&6; }
8750      else
8751        # Check if the provided tool contains a complete path.
8752        tool_specified="$GZIP"
8753        tool_basename="${tool_specified##*/}"
8754        if test "x$tool_basename" = "x$tool_specified"; then
8755          # A command without a complete path is provided, search $PATH.
8756          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GZIP=$tool_basename" >&5
8757$as_echo "$as_me: Will search for user supplied tool GZIP=$tool_basename" >&6;}
8758          # Extract the first word of "$tool_basename", so it can be a program name with args.
8759set dummy $tool_basename; ac_word=$2
8760{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8761$as_echo_n "checking for $ac_word... " >&6; }
8762if ${ac_cv_path_GZIP+:} false; then :
8763  $as_echo_n "(cached) " >&6
8764else
8765  case $GZIP in
8766  [\\/]* | ?:[\\/]*)
8767  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
8768  ;;
8769  *)
8770  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8771for as_dir in $PATH
8772do
8773  IFS=$as_save_IFS
8774  test -z "$as_dir" && as_dir=.
8775    for ac_exec_ext in '' $ac_executable_extensions; do
8776  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8777    ac_cv_path_GZIP="$as_dir/$ac_word$ac_exec_ext"
8778    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8779    break 2
8780  fi
8781done
8782  done
8783IFS=$as_save_IFS
8784
8785  ;;
8786esac
8787fi
8788GZIP=$ac_cv_path_GZIP
8789if test -n "$GZIP"; then
8790  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GZIP" >&5
8791$as_echo "$GZIP" >&6; }
8792else
8793  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8794$as_echo "no" >&6; }
8795fi
8796
8797
8798          if test "x$GZIP" = x; then
8799            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8800          fi
8801        else
8802          # Otherwise we believe it is a complete path. Use it as it is.
8803          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GZIP=$tool_specified" >&5
8804$as_echo "$as_me: Will use user supplied tool GZIP=$tool_specified" >&6;}
8805          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GZIP" >&5
8806$as_echo_n "checking for GZIP... " >&6; }
8807          if test ! -x "$tool_specified"; then
8808            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8809$as_echo "not found" >&6; }
8810            as_fn_error $? "User supplied tool GZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
8811          fi
8812          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8813$as_echo "$tool_specified" >&6; }
8814        fi
8815      fi
8816    fi
8817
8818  fi
8819
8820
8821
8822  if test "x$GZIP" = x; then
8823    as_fn_error $? "Could not find required tool for GZIP" "$LINENO" 5
8824  fi
8825
8826
8827
8828
8829
8830  # Publish this variable in the help.
8831
8832
8833  if [ -z "${LN+x}" ]; then
8834    # The variable is not set by user, try to locate tool using the code snippet
8835    for ac_prog in ln
8836do
8837  # Extract the first word of "$ac_prog", so it can be a program name with args.
8838set dummy $ac_prog; ac_word=$2
8839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8840$as_echo_n "checking for $ac_word... " >&6; }
8841if ${ac_cv_path_LN+:} false; then :
8842  $as_echo_n "(cached) " >&6
8843else
8844  case $LN in
8845  [\\/]* | ?:[\\/]*)
8846  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8847  ;;
8848  *)
8849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8850for as_dir in $PATH
8851do
8852  IFS=$as_save_IFS
8853  test -z "$as_dir" && as_dir=.
8854    for ac_exec_ext in '' $ac_executable_extensions; do
8855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8856    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8858    break 2
8859  fi
8860done
8861  done
8862IFS=$as_save_IFS
8863
8864  ;;
8865esac
8866fi
8867LN=$ac_cv_path_LN
8868if test -n "$LN"; then
8869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8870$as_echo "$LN" >&6; }
8871else
8872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8873$as_echo "no" >&6; }
8874fi
8875
8876
8877  test -n "$LN" && break
8878done
8879
8880  else
8881    # The variable is set, but is it from the command line or the environment?
8882
8883    # Try to remove the string !LN! from our list.
8884    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8885    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8886      # If it failed, the variable was not from the command line. Ignore it,
8887      # but warn the user (except for BASH, which is always set by the calling BASH).
8888      if test "xLN" != xBASH; then
8889        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8890$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8891      fi
8892      # Try to locate tool using the code snippet
8893      for ac_prog in ln
8894do
8895  # Extract the first word of "$ac_prog", so it can be a program name with args.
8896set dummy $ac_prog; ac_word=$2
8897{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8898$as_echo_n "checking for $ac_word... " >&6; }
8899if ${ac_cv_path_LN+:} false; then :
8900  $as_echo_n "(cached) " >&6
8901else
8902  case $LN in
8903  [\\/]* | ?:[\\/]*)
8904  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8905  ;;
8906  *)
8907  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8908for as_dir in $PATH
8909do
8910  IFS=$as_save_IFS
8911  test -z "$as_dir" && as_dir=.
8912    for ac_exec_ext in '' $ac_executable_extensions; do
8913  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8914    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8915    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8916    break 2
8917  fi
8918done
8919  done
8920IFS=$as_save_IFS
8921
8922  ;;
8923esac
8924fi
8925LN=$ac_cv_path_LN
8926if test -n "$LN"; then
8927  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8928$as_echo "$LN" >&6; }
8929else
8930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8931$as_echo "no" >&6; }
8932fi
8933
8934
8935  test -n "$LN" && break
8936done
8937
8938    else
8939      # If it succeeded, then it was overridden by the user. We will use it
8940      # for the tool.
8941
8942      # First remove it from the list of overridden variables, so we can test
8943      # for unknown variables in the end.
8944      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8945
8946      # Check if we try to supply an empty value
8947      if test "x$LN" = x; then
8948        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8949$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8950        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8951$as_echo_n "checking for LN... " >&6; }
8952        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8953$as_echo "disabled" >&6; }
8954      else
8955        # Check if the provided tool contains a complete path.
8956        tool_specified="$LN"
8957        tool_basename="${tool_specified##*/}"
8958        if test "x$tool_basename" = "x$tool_specified"; then
8959          # A command without a complete path is provided, search $PATH.
8960          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8961$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8962          # Extract the first word of "$tool_basename", so it can be a program name with args.
8963set dummy $tool_basename; ac_word=$2
8964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8965$as_echo_n "checking for $ac_word... " >&6; }
8966if ${ac_cv_path_LN+:} false; then :
8967  $as_echo_n "(cached) " >&6
8968else
8969  case $LN in
8970  [\\/]* | ?:[\\/]*)
8971  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8972  ;;
8973  *)
8974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8975for as_dir in $PATH
8976do
8977  IFS=$as_save_IFS
8978  test -z "$as_dir" && as_dir=.
8979    for ac_exec_ext in '' $ac_executable_extensions; do
8980  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8981    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8982    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8983    break 2
8984  fi
8985done
8986  done
8987IFS=$as_save_IFS
8988
8989  ;;
8990esac
8991fi
8992LN=$ac_cv_path_LN
8993if test -n "$LN"; then
8994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8995$as_echo "$LN" >&6; }
8996else
8997  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8998$as_echo "no" >&6; }
8999fi
9000
9001
9002          if test "x$LN" = x; then
9003            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9004          fi
9005        else
9006          # Otherwise we believe it is a complete path. Use it as it is.
9007          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
9008$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
9009          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
9010$as_echo_n "checking for LN... " >&6; }
9011          if test ! -x "$tool_specified"; then
9012            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9013$as_echo "not found" >&6; }
9014            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
9015          fi
9016          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9017$as_echo "$tool_specified" >&6; }
9018        fi
9019      fi
9020    fi
9021
9022  fi
9023
9024
9025
9026  if test "x$LN" = x; then
9027    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
9028  fi
9029
9030
9031
9032
9033
9034  # Publish this variable in the help.
9035
9036
9037  if [ -z "${LS+x}" ]; then
9038    # The variable is not set by user, try to locate tool using the code snippet
9039    for ac_prog in ls
9040do
9041  # Extract the first word of "$ac_prog", so it can be a program name with args.
9042set dummy $ac_prog; ac_word=$2
9043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9044$as_echo_n "checking for $ac_word... " >&6; }
9045if ${ac_cv_path_LS+:} false; then :
9046  $as_echo_n "(cached) " >&6
9047else
9048  case $LS in
9049  [\\/]* | ?:[\\/]*)
9050  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9051  ;;
9052  *)
9053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9054for as_dir in $PATH
9055do
9056  IFS=$as_save_IFS
9057  test -z "$as_dir" && as_dir=.
9058    for ac_exec_ext in '' $ac_executable_extensions; do
9059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9060    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9062    break 2
9063  fi
9064done
9065  done
9066IFS=$as_save_IFS
9067
9068  ;;
9069esac
9070fi
9071LS=$ac_cv_path_LS
9072if test -n "$LS"; then
9073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9074$as_echo "$LS" >&6; }
9075else
9076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9077$as_echo "no" >&6; }
9078fi
9079
9080
9081  test -n "$LS" && break
9082done
9083
9084  else
9085    # The variable is set, but is it from the command line or the environment?
9086
9087    # Try to remove the string !LS! from our list.
9088    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
9089    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9090      # If it failed, the variable was not from the command line. Ignore it,
9091      # but warn the user (except for BASH, which is always set by the calling BASH).
9092      if test "xLS" != xBASH; then
9093        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
9094$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
9095      fi
9096      # Try to locate tool using the code snippet
9097      for ac_prog in ls
9098do
9099  # Extract the first word of "$ac_prog", so it can be a program name with args.
9100set dummy $ac_prog; ac_word=$2
9101{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9102$as_echo_n "checking for $ac_word... " >&6; }
9103if ${ac_cv_path_LS+:} false; then :
9104  $as_echo_n "(cached) " >&6
9105else
9106  case $LS in
9107  [\\/]* | ?:[\\/]*)
9108  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9109  ;;
9110  *)
9111  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9112for as_dir in $PATH
9113do
9114  IFS=$as_save_IFS
9115  test -z "$as_dir" && as_dir=.
9116    for ac_exec_ext in '' $ac_executable_extensions; do
9117  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9118    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9119    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9120    break 2
9121  fi
9122done
9123  done
9124IFS=$as_save_IFS
9125
9126  ;;
9127esac
9128fi
9129LS=$ac_cv_path_LS
9130if test -n "$LS"; then
9131  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9132$as_echo "$LS" >&6; }
9133else
9134  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9135$as_echo "no" >&6; }
9136fi
9137
9138
9139  test -n "$LS" && break
9140done
9141
9142    else
9143      # If it succeeded, then it was overridden by the user. We will use it
9144      # for the tool.
9145
9146      # First remove it from the list of overridden variables, so we can test
9147      # for unknown variables in the end.
9148      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9149
9150      # Check if we try to supply an empty value
9151      if test "x$LS" = x; then
9152        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
9153$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
9154        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9155$as_echo_n "checking for LS... " >&6; }
9156        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9157$as_echo "disabled" >&6; }
9158      else
9159        # Check if the provided tool contains a complete path.
9160        tool_specified="$LS"
9161        tool_basename="${tool_specified##*/}"
9162        if test "x$tool_basename" = "x$tool_specified"; then
9163          # A command without a complete path is provided, search $PATH.
9164          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
9165$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
9166          # Extract the first word of "$tool_basename", so it can be a program name with args.
9167set dummy $tool_basename; ac_word=$2
9168{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9169$as_echo_n "checking for $ac_word... " >&6; }
9170if ${ac_cv_path_LS+:} false; then :
9171  $as_echo_n "(cached) " >&6
9172else
9173  case $LS in
9174  [\\/]* | ?:[\\/]*)
9175  ac_cv_path_LS="$LS" # Let the user override the test with a path.
9176  ;;
9177  *)
9178  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9179for as_dir in $PATH
9180do
9181  IFS=$as_save_IFS
9182  test -z "$as_dir" && as_dir=.
9183    for ac_exec_ext in '' $ac_executable_extensions; do
9184  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9185    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
9186    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9187    break 2
9188  fi
9189done
9190  done
9191IFS=$as_save_IFS
9192
9193  ;;
9194esac
9195fi
9196LS=$ac_cv_path_LS
9197if test -n "$LS"; then
9198  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
9199$as_echo "$LS" >&6; }
9200else
9201  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9202$as_echo "no" >&6; }
9203fi
9204
9205
9206          if test "x$LS" = x; then
9207            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9208          fi
9209        else
9210          # Otherwise we believe it is a complete path. Use it as it is.
9211          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
9212$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
9213          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
9214$as_echo_n "checking for LS... " >&6; }
9215          if test ! -x "$tool_specified"; then
9216            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9217$as_echo "not found" >&6; }
9218            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
9219          fi
9220          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9221$as_echo "$tool_specified" >&6; }
9222        fi
9223      fi
9224    fi
9225
9226  fi
9227
9228
9229
9230  if test "x$LS" = x; then
9231    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
9232  fi
9233
9234
9235
9236
9237
9238  # Publish this variable in the help.
9239
9240
9241  if [ -z "${MKDIR+x}" ]; then
9242    # The variable is not set by user, try to locate tool using the code snippet
9243    for ac_prog in mkdir
9244do
9245  # Extract the first word of "$ac_prog", so it can be a program name with args.
9246set dummy $ac_prog; ac_word=$2
9247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9248$as_echo_n "checking for $ac_word... " >&6; }
9249if ${ac_cv_path_MKDIR+:} false; then :
9250  $as_echo_n "(cached) " >&6
9251else
9252  case $MKDIR in
9253  [\\/]* | ?:[\\/]*)
9254  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9255  ;;
9256  *)
9257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9258for as_dir in $PATH
9259do
9260  IFS=$as_save_IFS
9261  test -z "$as_dir" && as_dir=.
9262    for ac_exec_ext in '' $ac_executable_extensions; do
9263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9264    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9266    break 2
9267  fi
9268done
9269  done
9270IFS=$as_save_IFS
9271
9272  ;;
9273esac
9274fi
9275MKDIR=$ac_cv_path_MKDIR
9276if test -n "$MKDIR"; then
9277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9278$as_echo "$MKDIR" >&6; }
9279else
9280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9281$as_echo "no" >&6; }
9282fi
9283
9284
9285  test -n "$MKDIR" && break
9286done
9287
9288  else
9289    # The variable is set, but is it from the command line or the environment?
9290
9291    # Try to remove the string !MKDIR! from our list.
9292    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
9293    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9294      # If it failed, the variable was not from the command line. Ignore it,
9295      # but warn the user (except for BASH, which is always set by the calling BASH).
9296      if test "xMKDIR" != xBASH; then
9297        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
9298$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
9299      fi
9300      # Try to locate tool using the code snippet
9301      for ac_prog in mkdir
9302do
9303  # Extract the first word of "$ac_prog", so it can be a program name with args.
9304set dummy $ac_prog; ac_word=$2
9305{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9306$as_echo_n "checking for $ac_word... " >&6; }
9307if ${ac_cv_path_MKDIR+:} false; then :
9308  $as_echo_n "(cached) " >&6
9309else
9310  case $MKDIR in
9311  [\\/]* | ?:[\\/]*)
9312  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9313  ;;
9314  *)
9315  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9316for as_dir in $PATH
9317do
9318  IFS=$as_save_IFS
9319  test -z "$as_dir" && as_dir=.
9320    for ac_exec_ext in '' $ac_executable_extensions; do
9321  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9322    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9323    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9324    break 2
9325  fi
9326done
9327  done
9328IFS=$as_save_IFS
9329
9330  ;;
9331esac
9332fi
9333MKDIR=$ac_cv_path_MKDIR
9334if test -n "$MKDIR"; then
9335  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9336$as_echo "$MKDIR" >&6; }
9337else
9338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9339$as_echo "no" >&6; }
9340fi
9341
9342
9343  test -n "$MKDIR" && break
9344done
9345
9346    else
9347      # If it succeeded, then it was overridden by the user. We will use it
9348      # for the tool.
9349
9350      # First remove it from the list of overridden variables, so we can test
9351      # for unknown variables in the end.
9352      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9353
9354      # Check if we try to supply an empty value
9355      if test "x$MKDIR" = x; then
9356        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
9357$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
9358        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9359$as_echo_n "checking for MKDIR... " >&6; }
9360        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9361$as_echo "disabled" >&6; }
9362      else
9363        # Check if the provided tool contains a complete path.
9364        tool_specified="$MKDIR"
9365        tool_basename="${tool_specified##*/}"
9366        if test "x$tool_basename" = "x$tool_specified"; then
9367          # A command without a complete path is provided, search $PATH.
9368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
9369$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
9370          # Extract the first word of "$tool_basename", so it can be a program name with args.
9371set dummy $tool_basename; ac_word=$2
9372{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9373$as_echo_n "checking for $ac_word... " >&6; }
9374if ${ac_cv_path_MKDIR+:} false; then :
9375  $as_echo_n "(cached) " >&6
9376else
9377  case $MKDIR in
9378  [\\/]* | ?:[\\/]*)
9379  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
9380  ;;
9381  *)
9382  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9383for as_dir in $PATH
9384do
9385  IFS=$as_save_IFS
9386  test -z "$as_dir" && as_dir=.
9387    for ac_exec_ext in '' $ac_executable_extensions; do
9388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9389    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
9390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9391    break 2
9392  fi
9393done
9394  done
9395IFS=$as_save_IFS
9396
9397  ;;
9398esac
9399fi
9400MKDIR=$ac_cv_path_MKDIR
9401if test -n "$MKDIR"; then
9402  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
9403$as_echo "$MKDIR" >&6; }
9404else
9405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9406$as_echo "no" >&6; }
9407fi
9408
9409
9410          if test "x$MKDIR" = x; then
9411            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9412          fi
9413        else
9414          # Otherwise we believe it is a complete path. Use it as it is.
9415          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
9416$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
9417          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
9418$as_echo_n "checking for MKDIR... " >&6; }
9419          if test ! -x "$tool_specified"; then
9420            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9421$as_echo "not found" >&6; }
9422            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
9423          fi
9424          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9425$as_echo "$tool_specified" >&6; }
9426        fi
9427      fi
9428    fi
9429
9430  fi
9431
9432
9433
9434  if test "x$MKDIR" = x; then
9435    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9436  fi
9437
9438
9439
9440
9441
9442  # Publish this variable in the help.
9443
9444
9445  if [ -z "${MKTEMP+x}" ]; then
9446    # The variable is not set by user, try to locate tool using the code snippet
9447    for ac_prog in mktemp
9448do
9449  # Extract the first word of "$ac_prog", so it can be a program name with args.
9450set dummy $ac_prog; ac_word=$2
9451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9452$as_echo_n "checking for $ac_word... " >&6; }
9453if ${ac_cv_path_MKTEMP+:} false; then :
9454  $as_echo_n "(cached) " >&6
9455else
9456  case $MKTEMP in
9457  [\\/]* | ?:[\\/]*)
9458  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9459  ;;
9460  *)
9461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9462for as_dir in $PATH
9463do
9464  IFS=$as_save_IFS
9465  test -z "$as_dir" && as_dir=.
9466    for ac_exec_ext in '' $ac_executable_extensions; do
9467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9468    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9470    break 2
9471  fi
9472done
9473  done
9474IFS=$as_save_IFS
9475
9476  ;;
9477esac
9478fi
9479MKTEMP=$ac_cv_path_MKTEMP
9480if test -n "$MKTEMP"; then
9481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9482$as_echo "$MKTEMP" >&6; }
9483else
9484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9485$as_echo "no" >&6; }
9486fi
9487
9488
9489  test -n "$MKTEMP" && break
9490done
9491
9492  else
9493    # The variable is set, but is it from the command line or the environment?
9494
9495    # Try to remove the string !MKTEMP! from our list.
9496    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9497    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9498      # If it failed, the variable was not from the command line. Ignore it,
9499      # but warn the user (except for BASH, which is always set by the calling BASH).
9500      if test "xMKTEMP" != xBASH; then
9501        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9502$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9503      fi
9504      # Try to locate tool using the code snippet
9505      for ac_prog in mktemp
9506do
9507  # Extract the first word of "$ac_prog", so it can be a program name with args.
9508set dummy $ac_prog; ac_word=$2
9509{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9510$as_echo_n "checking for $ac_word... " >&6; }
9511if ${ac_cv_path_MKTEMP+:} false; then :
9512  $as_echo_n "(cached) " >&6
9513else
9514  case $MKTEMP in
9515  [\\/]* | ?:[\\/]*)
9516  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9517  ;;
9518  *)
9519  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9520for as_dir in $PATH
9521do
9522  IFS=$as_save_IFS
9523  test -z "$as_dir" && as_dir=.
9524    for ac_exec_ext in '' $ac_executable_extensions; do
9525  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9526    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9527    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9528    break 2
9529  fi
9530done
9531  done
9532IFS=$as_save_IFS
9533
9534  ;;
9535esac
9536fi
9537MKTEMP=$ac_cv_path_MKTEMP
9538if test -n "$MKTEMP"; then
9539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9540$as_echo "$MKTEMP" >&6; }
9541else
9542  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9543$as_echo "no" >&6; }
9544fi
9545
9546
9547  test -n "$MKTEMP" && break
9548done
9549
9550    else
9551      # If it succeeded, then it was overridden by the user. We will use it
9552      # for the tool.
9553
9554      # First remove it from the list of overridden variables, so we can test
9555      # for unknown variables in the end.
9556      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9557
9558      # Check if we try to supply an empty value
9559      if test "x$MKTEMP" = x; then
9560        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9561$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9562        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9563$as_echo_n "checking for MKTEMP... " >&6; }
9564        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9565$as_echo "disabled" >&6; }
9566      else
9567        # Check if the provided tool contains a complete path.
9568        tool_specified="$MKTEMP"
9569        tool_basename="${tool_specified##*/}"
9570        if test "x$tool_basename" = "x$tool_specified"; then
9571          # A command without a complete path is provided, search $PATH.
9572          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9573$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9574          # Extract the first word of "$tool_basename", so it can be a program name with args.
9575set dummy $tool_basename; ac_word=$2
9576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9577$as_echo_n "checking for $ac_word... " >&6; }
9578if ${ac_cv_path_MKTEMP+:} false; then :
9579  $as_echo_n "(cached) " >&6
9580else
9581  case $MKTEMP in
9582  [\\/]* | ?:[\\/]*)
9583  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9584  ;;
9585  *)
9586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9587for as_dir in $PATH
9588do
9589  IFS=$as_save_IFS
9590  test -z "$as_dir" && as_dir=.
9591    for ac_exec_ext in '' $ac_executable_extensions; do
9592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9593    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9595    break 2
9596  fi
9597done
9598  done
9599IFS=$as_save_IFS
9600
9601  ;;
9602esac
9603fi
9604MKTEMP=$ac_cv_path_MKTEMP
9605if test -n "$MKTEMP"; then
9606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9607$as_echo "$MKTEMP" >&6; }
9608else
9609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9610$as_echo "no" >&6; }
9611fi
9612
9613
9614          if test "x$MKTEMP" = x; then
9615            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9616          fi
9617        else
9618          # Otherwise we believe it is a complete path. Use it as it is.
9619          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9620$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9621          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9622$as_echo_n "checking for MKTEMP... " >&6; }
9623          if test ! -x "$tool_specified"; then
9624            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9625$as_echo "not found" >&6; }
9626            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9627          fi
9628          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9629$as_echo "$tool_specified" >&6; }
9630        fi
9631      fi
9632    fi
9633
9634  fi
9635
9636
9637
9638  if test "x$MKTEMP" = x; then
9639    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9640  fi
9641
9642
9643
9644
9645
9646  # Publish this variable in the help.
9647
9648
9649  if [ -z "${MV+x}" ]; then
9650    # The variable is not set by user, try to locate tool using the code snippet
9651    for ac_prog in mv
9652do
9653  # Extract the first word of "$ac_prog", so it can be a program name with args.
9654set dummy $ac_prog; ac_word=$2
9655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9656$as_echo_n "checking for $ac_word... " >&6; }
9657if ${ac_cv_path_MV+:} false; then :
9658  $as_echo_n "(cached) " >&6
9659else
9660  case $MV in
9661  [\\/]* | ?:[\\/]*)
9662  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9663  ;;
9664  *)
9665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9666for as_dir in $PATH
9667do
9668  IFS=$as_save_IFS
9669  test -z "$as_dir" && as_dir=.
9670    for ac_exec_ext in '' $ac_executable_extensions; do
9671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9672    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9674    break 2
9675  fi
9676done
9677  done
9678IFS=$as_save_IFS
9679
9680  ;;
9681esac
9682fi
9683MV=$ac_cv_path_MV
9684if test -n "$MV"; then
9685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9686$as_echo "$MV" >&6; }
9687else
9688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9689$as_echo "no" >&6; }
9690fi
9691
9692
9693  test -n "$MV" && break
9694done
9695
9696  else
9697    # The variable is set, but is it from the command line or the environment?
9698
9699    # Try to remove the string !MV! from our list.
9700    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9701    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9702      # If it failed, the variable was not from the command line. Ignore it,
9703      # but warn the user (except for BASH, which is always set by the calling BASH).
9704      if test "xMV" != xBASH; then
9705        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9706$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9707      fi
9708      # Try to locate tool using the code snippet
9709      for ac_prog in mv
9710do
9711  # Extract the first word of "$ac_prog", so it can be a program name with args.
9712set dummy $ac_prog; ac_word=$2
9713{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9714$as_echo_n "checking for $ac_word... " >&6; }
9715if ${ac_cv_path_MV+:} false; then :
9716  $as_echo_n "(cached) " >&6
9717else
9718  case $MV in
9719  [\\/]* | ?:[\\/]*)
9720  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9721  ;;
9722  *)
9723  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9724for as_dir in $PATH
9725do
9726  IFS=$as_save_IFS
9727  test -z "$as_dir" && as_dir=.
9728    for ac_exec_ext in '' $ac_executable_extensions; do
9729  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9730    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9731    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9732    break 2
9733  fi
9734done
9735  done
9736IFS=$as_save_IFS
9737
9738  ;;
9739esac
9740fi
9741MV=$ac_cv_path_MV
9742if test -n "$MV"; then
9743  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9744$as_echo "$MV" >&6; }
9745else
9746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9747$as_echo "no" >&6; }
9748fi
9749
9750
9751  test -n "$MV" && break
9752done
9753
9754    else
9755      # If it succeeded, then it was overridden by the user. We will use it
9756      # for the tool.
9757
9758      # First remove it from the list of overridden variables, so we can test
9759      # for unknown variables in the end.
9760      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9761
9762      # Check if we try to supply an empty value
9763      if test "x$MV" = x; then
9764        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9765$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9766        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9767$as_echo_n "checking for MV... " >&6; }
9768        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9769$as_echo "disabled" >&6; }
9770      else
9771        # Check if the provided tool contains a complete path.
9772        tool_specified="$MV"
9773        tool_basename="${tool_specified##*/}"
9774        if test "x$tool_basename" = "x$tool_specified"; then
9775          # A command without a complete path is provided, search $PATH.
9776          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9777$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9778          # Extract the first word of "$tool_basename", so it can be a program name with args.
9779set dummy $tool_basename; ac_word=$2
9780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9781$as_echo_n "checking for $ac_word... " >&6; }
9782if ${ac_cv_path_MV+:} false; then :
9783  $as_echo_n "(cached) " >&6
9784else
9785  case $MV in
9786  [\\/]* | ?:[\\/]*)
9787  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9788  ;;
9789  *)
9790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9791for as_dir in $PATH
9792do
9793  IFS=$as_save_IFS
9794  test -z "$as_dir" && as_dir=.
9795    for ac_exec_ext in '' $ac_executable_extensions; do
9796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9797    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9799    break 2
9800  fi
9801done
9802  done
9803IFS=$as_save_IFS
9804
9805  ;;
9806esac
9807fi
9808MV=$ac_cv_path_MV
9809if test -n "$MV"; then
9810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9811$as_echo "$MV" >&6; }
9812else
9813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9814$as_echo "no" >&6; }
9815fi
9816
9817
9818          if test "x$MV" = x; then
9819            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9820          fi
9821        else
9822          # Otherwise we believe it is a complete path. Use it as it is.
9823          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9824$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9825          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9826$as_echo_n "checking for MV... " >&6; }
9827          if test ! -x "$tool_specified"; then
9828            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9829$as_echo "not found" >&6; }
9830            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9831          fi
9832          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9833$as_echo "$tool_specified" >&6; }
9834        fi
9835      fi
9836    fi
9837
9838  fi
9839
9840
9841
9842  if test "x$MV" = x; then
9843    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9844  fi
9845
9846
9847
9848
9849
9850  # Publish this variable in the help.
9851
9852
9853  if [ -z "${NAWK+x}" ]; then
9854    # The variable is not set by user, try to locate tool using the code snippet
9855    for ac_prog in nawk gawk awk
9856do
9857  # Extract the first word of "$ac_prog", so it can be a program name with args.
9858set dummy $ac_prog; ac_word=$2
9859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9860$as_echo_n "checking for $ac_word... " >&6; }
9861if ${ac_cv_path_NAWK+:} false; then :
9862  $as_echo_n "(cached) " >&6
9863else
9864  case $NAWK in
9865  [\\/]* | ?:[\\/]*)
9866  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9867  ;;
9868  *)
9869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9870for as_dir in $PATH
9871do
9872  IFS=$as_save_IFS
9873  test -z "$as_dir" && as_dir=.
9874    for ac_exec_ext in '' $ac_executable_extensions; do
9875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9876    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9878    break 2
9879  fi
9880done
9881  done
9882IFS=$as_save_IFS
9883
9884  ;;
9885esac
9886fi
9887NAWK=$ac_cv_path_NAWK
9888if test -n "$NAWK"; then
9889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9890$as_echo "$NAWK" >&6; }
9891else
9892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9893$as_echo "no" >&6; }
9894fi
9895
9896
9897  test -n "$NAWK" && break
9898done
9899
9900  else
9901    # The variable is set, but is it from the command line or the environment?
9902
9903    # Try to remove the string !NAWK! from our list.
9904    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9905    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9906      # If it failed, the variable was not from the command line. Ignore it,
9907      # but warn the user (except for BASH, which is always set by the calling BASH).
9908      if test "xNAWK" != xBASH; then
9909        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9910$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9911      fi
9912      # Try to locate tool using the code snippet
9913      for ac_prog in nawk gawk awk
9914do
9915  # Extract the first word of "$ac_prog", so it can be a program name with args.
9916set dummy $ac_prog; ac_word=$2
9917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9918$as_echo_n "checking for $ac_word... " >&6; }
9919if ${ac_cv_path_NAWK+:} false; then :
9920  $as_echo_n "(cached) " >&6
9921else
9922  case $NAWK in
9923  [\\/]* | ?:[\\/]*)
9924  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9925  ;;
9926  *)
9927  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9928for as_dir in $PATH
9929do
9930  IFS=$as_save_IFS
9931  test -z "$as_dir" && as_dir=.
9932    for ac_exec_ext in '' $ac_executable_extensions; do
9933  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9934    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9935    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9936    break 2
9937  fi
9938done
9939  done
9940IFS=$as_save_IFS
9941
9942  ;;
9943esac
9944fi
9945NAWK=$ac_cv_path_NAWK
9946if test -n "$NAWK"; then
9947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9948$as_echo "$NAWK" >&6; }
9949else
9950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9951$as_echo "no" >&6; }
9952fi
9953
9954
9955  test -n "$NAWK" && break
9956done
9957
9958    else
9959      # If it succeeded, then it was overridden by the user. We will use it
9960      # for the tool.
9961
9962      # First remove it from the list of overridden variables, so we can test
9963      # for unknown variables in the end.
9964      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9965
9966      # Check if we try to supply an empty value
9967      if test "x$NAWK" = x; then
9968        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9969$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9970        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9971$as_echo_n "checking for NAWK... " >&6; }
9972        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9973$as_echo "disabled" >&6; }
9974      else
9975        # Check if the provided tool contains a complete path.
9976        tool_specified="$NAWK"
9977        tool_basename="${tool_specified##*/}"
9978        if test "x$tool_basename" = "x$tool_specified"; then
9979          # A command without a complete path is provided, search $PATH.
9980          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9981$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9982          # Extract the first word of "$tool_basename", so it can be a program name with args.
9983set dummy $tool_basename; ac_word=$2
9984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9985$as_echo_n "checking for $ac_word... " >&6; }
9986if ${ac_cv_path_NAWK+:} false; then :
9987  $as_echo_n "(cached) " >&6
9988else
9989  case $NAWK in
9990  [\\/]* | ?:[\\/]*)
9991  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9992  ;;
9993  *)
9994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9995for as_dir in $PATH
9996do
9997  IFS=$as_save_IFS
9998  test -z "$as_dir" && as_dir=.
9999    for ac_exec_ext in '' $ac_executable_extensions; do
10000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10001    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
10002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10003    break 2
10004  fi
10005done
10006  done
10007IFS=$as_save_IFS
10008
10009  ;;
10010esac
10011fi
10012NAWK=$ac_cv_path_NAWK
10013if test -n "$NAWK"; then
10014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
10015$as_echo "$NAWK" >&6; }
10016else
10017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10018$as_echo "no" >&6; }
10019fi
10020
10021
10022          if test "x$NAWK" = x; then
10023            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10024          fi
10025        else
10026          # Otherwise we believe it is a complete path. Use it as it is.
10027          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
10028$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
10029          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
10030$as_echo_n "checking for NAWK... " >&6; }
10031          if test ! -x "$tool_specified"; then
10032            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10033$as_echo "not found" >&6; }
10034            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
10035          fi
10036          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10037$as_echo "$tool_specified" >&6; }
10038        fi
10039      fi
10040    fi
10041
10042  fi
10043
10044
10045
10046  if test "x$NAWK" = x; then
10047    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
10048  fi
10049
10050
10051
10052
10053
10054  # Publish this variable in the help.
10055
10056
10057  if [ -z "${PRINTF+x}" ]; then
10058    # The variable is not set by user, try to locate tool using the code snippet
10059    for ac_prog in printf
10060do
10061  # Extract the first word of "$ac_prog", so it can be a program name with args.
10062set dummy $ac_prog; ac_word=$2
10063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10064$as_echo_n "checking for $ac_word... " >&6; }
10065if ${ac_cv_path_PRINTF+:} false; then :
10066  $as_echo_n "(cached) " >&6
10067else
10068  case $PRINTF in
10069  [\\/]* | ?:[\\/]*)
10070  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10071  ;;
10072  *)
10073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10074for as_dir in $PATH
10075do
10076  IFS=$as_save_IFS
10077  test -z "$as_dir" && as_dir=.
10078    for ac_exec_ext in '' $ac_executable_extensions; do
10079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10080    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10082    break 2
10083  fi
10084done
10085  done
10086IFS=$as_save_IFS
10087
10088  ;;
10089esac
10090fi
10091PRINTF=$ac_cv_path_PRINTF
10092if test -n "$PRINTF"; then
10093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10094$as_echo "$PRINTF" >&6; }
10095else
10096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10097$as_echo "no" >&6; }
10098fi
10099
10100
10101  test -n "$PRINTF" && break
10102done
10103
10104  else
10105    # The variable is set, but is it from the command line or the environment?
10106
10107    # Try to remove the string !PRINTF! from our list.
10108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
10109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10110      # If it failed, the variable was not from the command line. Ignore it,
10111      # but warn the user (except for BASH, which is always set by the calling BASH).
10112      if test "xPRINTF" != xBASH; then
10113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
10114$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
10115      fi
10116      # Try to locate tool using the code snippet
10117      for ac_prog in printf
10118do
10119  # Extract the first word of "$ac_prog", so it can be a program name with args.
10120set dummy $ac_prog; ac_word=$2
10121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10122$as_echo_n "checking for $ac_word... " >&6; }
10123if ${ac_cv_path_PRINTF+:} false; then :
10124  $as_echo_n "(cached) " >&6
10125else
10126  case $PRINTF in
10127  [\\/]* | ?:[\\/]*)
10128  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10129  ;;
10130  *)
10131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10132for as_dir in $PATH
10133do
10134  IFS=$as_save_IFS
10135  test -z "$as_dir" && as_dir=.
10136    for ac_exec_ext in '' $ac_executable_extensions; do
10137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10138    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10140    break 2
10141  fi
10142done
10143  done
10144IFS=$as_save_IFS
10145
10146  ;;
10147esac
10148fi
10149PRINTF=$ac_cv_path_PRINTF
10150if test -n "$PRINTF"; then
10151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10152$as_echo "$PRINTF" >&6; }
10153else
10154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10155$as_echo "no" >&6; }
10156fi
10157
10158
10159  test -n "$PRINTF" && break
10160done
10161
10162    else
10163      # If it succeeded, then it was overridden by the user. We will use it
10164      # for the tool.
10165
10166      # First remove it from the list of overridden variables, so we can test
10167      # for unknown variables in the end.
10168      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10169
10170      # Check if we try to supply an empty value
10171      if test "x$PRINTF" = x; then
10172        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
10173$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
10174        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10175$as_echo_n "checking for PRINTF... " >&6; }
10176        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10177$as_echo "disabled" >&6; }
10178      else
10179        # Check if the provided tool contains a complete path.
10180        tool_specified="$PRINTF"
10181        tool_basename="${tool_specified##*/}"
10182        if test "x$tool_basename" = "x$tool_specified"; then
10183          # A command without a complete path is provided, search $PATH.
10184          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
10185$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
10186          # Extract the first word of "$tool_basename", so it can be a program name with args.
10187set dummy $tool_basename; ac_word=$2
10188{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10189$as_echo_n "checking for $ac_word... " >&6; }
10190if ${ac_cv_path_PRINTF+:} false; then :
10191  $as_echo_n "(cached) " >&6
10192else
10193  case $PRINTF in
10194  [\\/]* | ?:[\\/]*)
10195  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
10196  ;;
10197  *)
10198  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10199for as_dir in $PATH
10200do
10201  IFS=$as_save_IFS
10202  test -z "$as_dir" && as_dir=.
10203    for ac_exec_ext in '' $ac_executable_extensions; do
10204  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10205    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
10206    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10207    break 2
10208  fi
10209done
10210  done
10211IFS=$as_save_IFS
10212
10213  ;;
10214esac
10215fi
10216PRINTF=$ac_cv_path_PRINTF
10217if test -n "$PRINTF"; then
10218  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
10219$as_echo "$PRINTF" >&6; }
10220else
10221  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10222$as_echo "no" >&6; }
10223fi
10224
10225
10226          if test "x$PRINTF" = x; then
10227            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10228          fi
10229        else
10230          # Otherwise we believe it is a complete path. Use it as it is.
10231          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
10232$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
10233          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
10234$as_echo_n "checking for PRINTF... " >&6; }
10235          if test ! -x "$tool_specified"; then
10236            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10237$as_echo "not found" >&6; }
10238            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
10239          fi
10240          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10241$as_echo "$tool_specified" >&6; }
10242        fi
10243      fi
10244    fi
10245
10246  fi
10247
10248
10249
10250  if test "x$PRINTF" = x; then
10251    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
10252  fi
10253
10254
10255
10256
10257
10258  # Publish this variable in the help.
10259
10260
10261  if [ -z "${RM+x}" ]; then
10262    # The variable is not set by user, try to locate tool using the code snippet
10263    for ac_prog in rm
10264do
10265  # Extract the first word of "$ac_prog", so it can be a program name with args.
10266set dummy $ac_prog; ac_word=$2
10267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10268$as_echo_n "checking for $ac_word... " >&6; }
10269if ${ac_cv_path_RM+:} false; then :
10270  $as_echo_n "(cached) " >&6
10271else
10272  case $RM in
10273  [\\/]* | ?:[\\/]*)
10274  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10275  ;;
10276  *)
10277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10278for as_dir in $PATH
10279do
10280  IFS=$as_save_IFS
10281  test -z "$as_dir" && as_dir=.
10282    for ac_exec_ext in '' $ac_executable_extensions; do
10283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10284    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10286    break 2
10287  fi
10288done
10289  done
10290IFS=$as_save_IFS
10291
10292  ;;
10293esac
10294fi
10295RM=$ac_cv_path_RM
10296if test -n "$RM"; then
10297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10298$as_echo "$RM" >&6; }
10299else
10300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10301$as_echo "no" >&6; }
10302fi
10303
10304
10305  test -n "$RM" && break
10306done
10307
10308  else
10309    # The variable is set, but is it from the command line or the environment?
10310
10311    # Try to remove the string !RM! from our list.
10312    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
10313    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10314      # If it failed, the variable was not from the command line. Ignore it,
10315      # but warn the user (except for BASH, which is always set by the calling BASH).
10316      if test "xRM" != xBASH; then
10317        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
10318$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
10319      fi
10320      # Try to locate tool using the code snippet
10321      for ac_prog in rm
10322do
10323  # Extract the first word of "$ac_prog", so it can be a program name with args.
10324set dummy $ac_prog; ac_word=$2
10325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10326$as_echo_n "checking for $ac_word... " >&6; }
10327if ${ac_cv_path_RM+:} false; then :
10328  $as_echo_n "(cached) " >&6
10329else
10330  case $RM in
10331  [\\/]* | ?:[\\/]*)
10332  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10333  ;;
10334  *)
10335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10336for as_dir in $PATH
10337do
10338  IFS=$as_save_IFS
10339  test -z "$as_dir" && as_dir=.
10340    for ac_exec_ext in '' $ac_executable_extensions; do
10341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10342    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10344    break 2
10345  fi
10346done
10347  done
10348IFS=$as_save_IFS
10349
10350  ;;
10351esac
10352fi
10353RM=$ac_cv_path_RM
10354if test -n "$RM"; then
10355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10356$as_echo "$RM" >&6; }
10357else
10358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10359$as_echo "no" >&6; }
10360fi
10361
10362
10363  test -n "$RM" && break
10364done
10365
10366    else
10367      # If it succeeded, then it was overridden by the user. We will use it
10368      # for the tool.
10369
10370      # First remove it from the list of overridden variables, so we can test
10371      # for unknown variables in the end.
10372      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10373
10374      # Check if we try to supply an empty value
10375      if test "x$RM" = x; then
10376        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
10377$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
10378        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10379$as_echo_n "checking for RM... " >&6; }
10380        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10381$as_echo "disabled" >&6; }
10382      else
10383        # Check if the provided tool contains a complete path.
10384        tool_specified="$RM"
10385        tool_basename="${tool_specified##*/}"
10386        if test "x$tool_basename" = "x$tool_specified"; then
10387          # A command without a complete path is provided, search $PATH.
10388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
10389$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
10390          # Extract the first word of "$tool_basename", so it can be a program name with args.
10391set dummy $tool_basename; ac_word=$2
10392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10393$as_echo_n "checking for $ac_word... " >&6; }
10394if ${ac_cv_path_RM+:} false; then :
10395  $as_echo_n "(cached) " >&6
10396else
10397  case $RM in
10398  [\\/]* | ?:[\\/]*)
10399  ac_cv_path_RM="$RM" # Let the user override the test with a path.
10400  ;;
10401  *)
10402  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10403for as_dir in $PATH
10404do
10405  IFS=$as_save_IFS
10406  test -z "$as_dir" && as_dir=.
10407    for ac_exec_ext in '' $ac_executable_extensions; do
10408  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10409    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
10410    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10411    break 2
10412  fi
10413done
10414  done
10415IFS=$as_save_IFS
10416
10417  ;;
10418esac
10419fi
10420RM=$ac_cv_path_RM
10421if test -n "$RM"; then
10422  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
10423$as_echo "$RM" >&6; }
10424else
10425  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10426$as_echo "no" >&6; }
10427fi
10428
10429
10430          if test "x$RM" = x; then
10431            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10432          fi
10433        else
10434          # Otherwise we believe it is a complete path. Use it as it is.
10435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10436$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10437          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10438$as_echo_n "checking for RM... " >&6; }
10439          if test ! -x "$tool_specified"; then
10440            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10441$as_echo "not found" >&6; }
10442            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10443          fi
10444          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10445$as_echo "$tool_specified" >&6; }
10446        fi
10447      fi
10448    fi
10449
10450  fi
10451
10452
10453
10454  if test "x$RM" = x; then
10455    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10456  fi
10457
10458
10459
10460
10461
10462  # Publish this variable in the help.
10463
10464
10465  if [ -z "${RMDIR+x}" ]; then
10466    # The variable is not set by user, try to locate tool using the code snippet
10467    for ac_prog in rmdir
10468do
10469  # Extract the first word of "$ac_prog", so it can be a program name with args.
10470set dummy $ac_prog; ac_word=$2
10471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10472$as_echo_n "checking for $ac_word... " >&6; }
10473if ${ac_cv_path_RMDIR+:} false; then :
10474  $as_echo_n "(cached) " >&6
10475else
10476  case $RMDIR in
10477  [\\/]* | ?:[\\/]*)
10478  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10479  ;;
10480  *)
10481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10482for as_dir in $PATH
10483do
10484  IFS=$as_save_IFS
10485  test -z "$as_dir" && as_dir=.
10486    for ac_exec_ext in '' $ac_executable_extensions; do
10487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10488    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10490    break 2
10491  fi
10492done
10493  done
10494IFS=$as_save_IFS
10495
10496  ;;
10497esac
10498fi
10499RMDIR=$ac_cv_path_RMDIR
10500if test -n "$RMDIR"; then
10501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10502$as_echo "$RMDIR" >&6; }
10503else
10504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10505$as_echo "no" >&6; }
10506fi
10507
10508
10509  test -n "$RMDIR" && break
10510done
10511
10512  else
10513    # The variable is set, but is it from the command line or the environment?
10514
10515    # Try to remove the string !RMDIR! from our list.
10516    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10517    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10518      # If it failed, the variable was not from the command line. Ignore it,
10519      # but warn the user (except for BASH, which is always set by the calling BASH).
10520      if test "xRMDIR" != xBASH; then
10521        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10522$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10523      fi
10524      # Try to locate tool using the code snippet
10525      for ac_prog in rmdir
10526do
10527  # Extract the first word of "$ac_prog", so it can be a program name with args.
10528set dummy $ac_prog; ac_word=$2
10529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10530$as_echo_n "checking for $ac_word... " >&6; }
10531if ${ac_cv_path_RMDIR+:} false; then :
10532  $as_echo_n "(cached) " >&6
10533else
10534  case $RMDIR in
10535  [\\/]* | ?:[\\/]*)
10536  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10537  ;;
10538  *)
10539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10540for as_dir in $PATH
10541do
10542  IFS=$as_save_IFS
10543  test -z "$as_dir" && as_dir=.
10544    for ac_exec_ext in '' $ac_executable_extensions; do
10545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10546    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10548    break 2
10549  fi
10550done
10551  done
10552IFS=$as_save_IFS
10553
10554  ;;
10555esac
10556fi
10557RMDIR=$ac_cv_path_RMDIR
10558if test -n "$RMDIR"; then
10559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10560$as_echo "$RMDIR" >&6; }
10561else
10562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10563$as_echo "no" >&6; }
10564fi
10565
10566
10567  test -n "$RMDIR" && break
10568done
10569
10570    else
10571      # If it succeeded, then it was overridden by the user. We will use it
10572      # for the tool.
10573
10574      # First remove it from the list of overridden variables, so we can test
10575      # for unknown variables in the end.
10576      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10577
10578      # Check if we try to supply an empty value
10579      if test "x$RMDIR" = x; then
10580        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10581$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10582        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10583$as_echo_n "checking for RMDIR... " >&6; }
10584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10585$as_echo "disabled" >&6; }
10586      else
10587        # Check if the provided tool contains a complete path.
10588        tool_specified="$RMDIR"
10589        tool_basename="${tool_specified##*/}"
10590        if test "x$tool_basename" = "x$tool_specified"; then
10591          # A command without a complete path is provided, search $PATH.
10592          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10593$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10594          # Extract the first word of "$tool_basename", so it can be a program name with args.
10595set dummy $tool_basename; ac_word=$2
10596{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10597$as_echo_n "checking for $ac_word... " >&6; }
10598if ${ac_cv_path_RMDIR+:} false; then :
10599  $as_echo_n "(cached) " >&6
10600else
10601  case $RMDIR in
10602  [\\/]* | ?:[\\/]*)
10603  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10604  ;;
10605  *)
10606  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10607for as_dir in $PATH
10608do
10609  IFS=$as_save_IFS
10610  test -z "$as_dir" && as_dir=.
10611    for ac_exec_ext in '' $ac_executable_extensions; do
10612  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10613    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10614    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10615    break 2
10616  fi
10617done
10618  done
10619IFS=$as_save_IFS
10620
10621  ;;
10622esac
10623fi
10624RMDIR=$ac_cv_path_RMDIR
10625if test -n "$RMDIR"; then
10626  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10627$as_echo "$RMDIR" >&6; }
10628else
10629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10630$as_echo "no" >&6; }
10631fi
10632
10633
10634          if test "x$RMDIR" = x; then
10635            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10636          fi
10637        else
10638          # Otherwise we believe it is a complete path. Use it as it is.
10639          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10640$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10641          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10642$as_echo_n "checking for RMDIR... " >&6; }
10643          if test ! -x "$tool_specified"; then
10644            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10645$as_echo "not found" >&6; }
10646            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10647          fi
10648          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10649$as_echo "$tool_specified" >&6; }
10650        fi
10651      fi
10652    fi
10653
10654  fi
10655
10656
10657
10658  if test "x$RMDIR" = x; then
10659    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10660  fi
10661
10662
10663
10664
10665
10666  # Publish this variable in the help.
10667
10668
10669  if [ -z "${SH+x}" ]; then
10670    # The variable is not set by user, try to locate tool using the code snippet
10671    for ac_prog in sh
10672do
10673  # Extract the first word of "$ac_prog", so it can be a program name with args.
10674set dummy $ac_prog; ac_word=$2
10675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10676$as_echo_n "checking for $ac_word... " >&6; }
10677if ${ac_cv_path_SH+:} false; then :
10678  $as_echo_n "(cached) " >&6
10679else
10680  case $SH in
10681  [\\/]* | ?:[\\/]*)
10682  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10683  ;;
10684  *)
10685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10686for as_dir in $PATH
10687do
10688  IFS=$as_save_IFS
10689  test -z "$as_dir" && as_dir=.
10690    for ac_exec_ext in '' $ac_executable_extensions; do
10691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10692    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10694    break 2
10695  fi
10696done
10697  done
10698IFS=$as_save_IFS
10699
10700  ;;
10701esac
10702fi
10703SH=$ac_cv_path_SH
10704if test -n "$SH"; then
10705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10706$as_echo "$SH" >&6; }
10707else
10708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10709$as_echo "no" >&6; }
10710fi
10711
10712
10713  test -n "$SH" && break
10714done
10715
10716  else
10717    # The variable is set, but is it from the command line or the environment?
10718
10719    # Try to remove the string !SH! from our list.
10720    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10721    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10722      # If it failed, the variable was not from the command line. Ignore it,
10723      # but warn the user (except for BASH, which is always set by the calling BASH).
10724      if test "xSH" != xBASH; then
10725        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10726$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10727      fi
10728      # Try to locate tool using the code snippet
10729      for ac_prog in sh
10730do
10731  # Extract the first word of "$ac_prog", so it can be a program name with args.
10732set dummy $ac_prog; ac_word=$2
10733{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10734$as_echo_n "checking for $ac_word... " >&6; }
10735if ${ac_cv_path_SH+:} false; then :
10736  $as_echo_n "(cached) " >&6
10737else
10738  case $SH in
10739  [\\/]* | ?:[\\/]*)
10740  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10741  ;;
10742  *)
10743  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10744for as_dir in $PATH
10745do
10746  IFS=$as_save_IFS
10747  test -z "$as_dir" && as_dir=.
10748    for ac_exec_ext in '' $ac_executable_extensions; do
10749  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10750    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10751    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10752    break 2
10753  fi
10754done
10755  done
10756IFS=$as_save_IFS
10757
10758  ;;
10759esac
10760fi
10761SH=$ac_cv_path_SH
10762if test -n "$SH"; then
10763  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10764$as_echo "$SH" >&6; }
10765else
10766  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10767$as_echo "no" >&6; }
10768fi
10769
10770
10771  test -n "$SH" && break
10772done
10773
10774    else
10775      # If it succeeded, then it was overridden by the user. We will use it
10776      # for the tool.
10777
10778      # First remove it from the list of overridden variables, so we can test
10779      # for unknown variables in the end.
10780      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10781
10782      # Check if we try to supply an empty value
10783      if test "x$SH" = x; then
10784        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10785$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10786        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10787$as_echo_n "checking for SH... " >&6; }
10788        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10789$as_echo "disabled" >&6; }
10790      else
10791        # Check if the provided tool contains a complete path.
10792        tool_specified="$SH"
10793        tool_basename="${tool_specified##*/}"
10794        if test "x$tool_basename" = "x$tool_specified"; then
10795          # A command without a complete path is provided, search $PATH.
10796          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10797$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10798          # Extract the first word of "$tool_basename", so it can be a program name with args.
10799set dummy $tool_basename; ac_word=$2
10800{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10801$as_echo_n "checking for $ac_word... " >&6; }
10802if ${ac_cv_path_SH+:} false; then :
10803  $as_echo_n "(cached) " >&6
10804else
10805  case $SH in
10806  [\\/]* | ?:[\\/]*)
10807  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10808  ;;
10809  *)
10810  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10811for as_dir in $PATH
10812do
10813  IFS=$as_save_IFS
10814  test -z "$as_dir" && as_dir=.
10815    for ac_exec_ext in '' $ac_executable_extensions; do
10816  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10817    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10818    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10819    break 2
10820  fi
10821done
10822  done
10823IFS=$as_save_IFS
10824
10825  ;;
10826esac
10827fi
10828SH=$ac_cv_path_SH
10829if test -n "$SH"; then
10830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10831$as_echo "$SH" >&6; }
10832else
10833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10834$as_echo "no" >&6; }
10835fi
10836
10837
10838          if test "x$SH" = x; then
10839            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10840          fi
10841        else
10842          # Otherwise we believe it is a complete path. Use it as it is.
10843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10844$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10845          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10846$as_echo_n "checking for SH... " >&6; }
10847          if test ! -x "$tool_specified"; then
10848            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10849$as_echo "not found" >&6; }
10850            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10851          fi
10852          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10853$as_echo "$tool_specified" >&6; }
10854        fi
10855      fi
10856    fi
10857
10858  fi
10859
10860
10861
10862  if test "x$SH" = x; then
10863    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10864  fi
10865
10866
10867
10868
10869
10870  # Publish this variable in the help.
10871
10872
10873  if [ -z "${SORT+x}" ]; then
10874    # The variable is not set by user, try to locate tool using the code snippet
10875    for ac_prog in sort
10876do
10877  # Extract the first word of "$ac_prog", so it can be a program name with args.
10878set dummy $ac_prog; ac_word=$2
10879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10880$as_echo_n "checking for $ac_word... " >&6; }
10881if ${ac_cv_path_SORT+:} false; then :
10882  $as_echo_n "(cached) " >&6
10883else
10884  case $SORT in
10885  [\\/]* | ?:[\\/]*)
10886  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10887  ;;
10888  *)
10889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10890for as_dir in $PATH
10891do
10892  IFS=$as_save_IFS
10893  test -z "$as_dir" && as_dir=.
10894    for ac_exec_ext in '' $ac_executable_extensions; do
10895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10896    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10898    break 2
10899  fi
10900done
10901  done
10902IFS=$as_save_IFS
10903
10904  ;;
10905esac
10906fi
10907SORT=$ac_cv_path_SORT
10908if test -n "$SORT"; then
10909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10910$as_echo "$SORT" >&6; }
10911else
10912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10913$as_echo "no" >&6; }
10914fi
10915
10916
10917  test -n "$SORT" && break
10918done
10919
10920  else
10921    # The variable is set, but is it from the command line or the environment?
10922
10923    # Try to remove the string !SORT! from our list.
10924    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10925    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10926      # If it failed, the variable was not from the command line. Ignore it,
10927      # but warn the user (except for BASH, which is always set by the calling BASH).
10928      if test "xSORT" != xBASH; then
10929        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10930$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10931      fi
10932      # Try to locate tool using the code snippet
10933      for ac_prog in sort
10934do
10935  # Extract the first word of "$ac_prog", so it can be a program name with args.
10936set dummy $ac_prog; ac_word=$2
10937{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10938$as_echo_n "checking for $ac_word... " >&6; }
10939if ${ac_cv_path_SORT+:} false; then :
10940  $as_echo_n "(cached) " >&6
10941else
10942  case $SORT in
10943  [\\/]* | ?:[\\/]*)
10944  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10945  ;;
10946  *)
10947  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10948for as_dir in $PATH
10949do
10950  IFS=$as_save_IFS
10951  test -z "$as_dir" && as_dir=.
10952    for ac_exec_ext in '' $ac_executable_extensions; do
10953  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10954    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10955    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10956    break 2
10957  fi
10958done
10959  done
10960IFS=$as_save_IFS
10961
10962  ;;
10963esac
10964fi
10965SORT=$ac_cv_path_SORT
10966if test -n "$SORT"; then
10967  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10968$as_echo "$SORT" >&6; }
10969else
10970  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10971$as_echo "no" >&6; }
10972fi
10973
10974
10975  test -n "$SORT" && break
10976done
10977
10978    else
10979      # If it succeeded, then it was overridden by the user. We will use it
10980      # for the tool.
10981
10982      # First remove it from the list of overridden variables, so we can test
10983      # for unknown variables in the end.
10984      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10985
10986      # Check if we try to supply an empty value
10987      if test "x$SORT" = x; then
10988        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10989$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10990        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10991$as_echo_n "checking for SORT... " >&6; }
10992        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10993$as_echo "disabled" >&6; }
10994      else
10995        # Check if the provided tool contains a complete path.
10996        tool_specified="$SORT"
10997        tool_basename="${tool_specified##*/}"
10998        if test "x$tool_basename" = "x$tool_specified"; then
10999          # A command without a complete path is provided, search $PATH.
11000          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
11001$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
11002          # Extract the first word of "$tool_basename", so it can be a program name with args.
11003set dummy $tool_basename; ac_word=$2
11004{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11005$as_echo_n "checking for $ac_word... " >&6; }
11006if ${ac_cv_path_SORT+:} false; then :
11007  $as_echo_n "(cached) " >&6
11008else
11009  case $SORT in
11010  [\\/]* | ?:[\\/]*)
11011  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
11012  ;;
11013  *)
11014  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11015for as_dir in $PATH
11016do
11017  IFS=$as_save_IFS
11018  test -z "$as_dir" && as_dir=.
11019    for ac_exec_ext in '' $ac_executable_extensions; do
11020  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11021    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
11022    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11023    break 2
11024  fi
11025done
11026  done
11027IFS=$as_save_IFS
11028
11029  ;;
11030esac
11031fi
11032SORT=$ac_cv_path_SORT
11033if test -n "$SORT"; then
11034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
11035$as_echo "$SORT" >&6; }
11036else
11037  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11038$as_echo "no" >&6; }
11039fi
11040
11041
11042          if test "x$SORT" = x; then
11043            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11044          fi
11045        else
11046          # Otherwise we believe it is a complete path. Use it as it is.
11047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
11048$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
11049          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
11050$as_echo_n "checking for SORT... " >&6; }
11051          if test ! -x "$tool_specified"; then
11052            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11053$as_echo "not found" >&6; }
11054            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
11055          fi
11056          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11057$as_echo "$tool_specified" >&6; }
11058        fi
11059      fi
11060    fi
11061
11062  fi
11063
11064
11065
11066  if test "x$SORT" = x; then
11067    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
11068  fi
11069
11070
11071
11072
11073
11074  # Publish this variable in the help.
11075
11076
11077  if [ -z "${TAIL+x}" ]; then
11078    # The variable is not set by user, try to locate tool using the code snippet
11079    for ac_prog in tail
11080do
11081  # Extract the first word of "$ac_prog", so it can be a program name with args.
11082set dummy $ac_prog; ac_word=$2
11083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11084$as_echo_n "checking for $ac_word... " >&6; }
11085if ${ac_cv_path_TAIL+:} false; then :
11086  $as_echo_n "(cached) " >&6
11087else
11088  case $TAIL in
11089  [\\/]* | ?:[\\/]*)
11090  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11091  ;;
11092  *)
11093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11094for as_dir in $PATH
11095do
11096  IFS=$as_save_IFS
11097  test -z "$as_dir" && as_dir=.
11098    for ac_exec_ext in '' $ac_executable_extensions; do
11099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11100    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11102    break 2
11103  fi
11104done
11105  done
11106IFS=$as_save_IFS
11107
11108  ;;
11109esac
11110fi
11111TAIL=$ac_cv_path_TAIL
11112if test -n "$TAIL"; then
11113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11114$as_echo "$TAIL" >&6; }
11115else
11116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11117$as_echo "no" >&6; }
11118fi
11119
11120
11121  test -n "$TAIL" && break
11122done
11123
11124  else
11125    # The variable is set, but is it from the command line or the environment?
11126
11127    # Try to remove the string !TAIL! from our list.
11128    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
11129    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11130      # If it failed, the variable was not from the command line. Ignore it,
11131      # but warn the user (except for BASH, which is always set by the calling BASH).
11132      if test "xTAIL" != xBASH; then
11133        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
11134$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
11135      fi
11136      # Try to locate tool using the code snippet
11137      for ac_prog in tail
11138do
11139  # Extract the first word of "$ac_prog", so it can be a program name with args.
11140set dummy $ac_prog; ac_word=$2
11141{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11142$as_echo_n "checking for $ac_word... " >&6; }
11143if ${ac_cv_path_TAIL+:} false; then :
11144  $as_echo_n "(cached) " >&6
11145else
11146  case $TAIL in
11147  [\\/]* | ?:[\\/]*)
11148  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11149  ;;
11150  *)
11151  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11152for as_dir in $PATH
11153do
11154  IFS=$as_save_IFS
11155  test -z "$as_dir" && as_dir=.
11156    for ac_exec_ext in '' $ac_executable_extensions; do
11157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11158    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11160    break 2
11161  fi
11162done
11163  done
11164IFS=$as_save_IFS
11165
11166  ;;
11167esac
11168fi
11169TAIL=$ac_cv_path_TAIL
11170if test -n "$TAIL"; then
11171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11172$as_echo "$TAIL" >&6; }
11173else
11174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11175$as_echo "no" >&6; }
11176fi
11177
11178
11179  test -n "$TAIL" && break
11180done
11181
11182    else
11183      # If it succeeded, then it was overridden by the user. We will use it
11184      # for the tool.
11185
11186      # First remove it from the list of overridden variables, so we can test
11187      # for unknown variables in the end.
11188      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11189
11190      # Check if we try to supply an empty value
11191      if test "x$TAIL" = x; then
11192        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
11193$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
11194        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11195$as_echo_n "checking for TAIL... " >&6; }
11196        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11197$as_echo "disabled" >&6; }
11198      else
11199        # Check if the provided tool contains a complete path.
11200        tool_specified="$TAIL"
11201        tool_basename="${tool_specified##*/}"
11202        if test "x$tool_basename" = "x$tool_specified"; then
11203          # A command without a complete path is provided, search $PATH.
11204          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
11205$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
11206          # Extract the first word of "$tool_basename", so it can be a program name with args.
11207set dummy $tool_basename; ac_word=$2
11208{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11209$as_echo_n "checking for $ac_word... " >&6; }
11210if ${ac_cv_path_TAIL+:} false; then :
11211  $as_echo_n "(cached) " >&6
11212else
11213  case $TAIL in
11214  [\\/]* | ?:[\\/]*)
11215  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
11216  ;;
11217  *)
11218  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11219for as_dir in $PATH
11220do
11221  IFS=$as_save_IFS
11222  test -z "$as_dir" && as_dir=.
11223    for ac_exec_ext in '' $ac_executable_extensions; do
11224  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11225    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
11226    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11227    break 2
11228  fi
11229done
11230  done
11231IFS=$as_save_IFS
11232
11233  ;;
11234esac
11235fi
11236TAIL=$ac_cv_path_TAIL
11237if test -n "$TAIL"; then
11238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
11239$as_echo "$TAIL" >&6; }
11240else
11241  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11242$as_echo "no" >&6; }
11243fi
11244
11245
11246          if test "x$TAIL" = x; then
11247            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11248          fi
11249        else
11250          # Otherwise we believe it is a complete path. Use it as it is.
11251          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
11252$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
11253          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
11254$as_echo_n "checking for TAIL... " >&6; }
11255          if test ! -x "$tool_specified"; then
11256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11257$as_echo "not found" >&6; }
11258            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
11259          fi
11260          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11261$as_echo "$tool_specified" >&6; }
11262        fi
11263      fi
11264    fi
11265
11266  fi
11267
11268
11269
11270  if test "x$TAIL" = x; then
11271    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
11272  fi
11273
11274
11275
11276
11277
11278  # Publish this variable in the help.
11279
11280
11281  if [ -z "${TAR+x}" ]; then
11282    # The variable is not set by user, try to locate tool using the code snippet
11283    for ac_prog in gtar tar
11284do
11285  # Extract the first word of "$ac_prog", so it can be a program name with args.
11286set dummy $ac_prog; ac_word=$2
11287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11288$as_echo_n "checking for $ac_word... " >&6; }
11289if ${ac_cv_path_TAR+:} false; then :
11290  $as_echo_n "(cached) " >&6
11291else
11292  case $TAR in
11293  [\\/]* | ?:[\\/]*)
11294  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11295  ;;
11296  *)
11297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11298for as_dir in $PATH
11299do
11300  IFS=$as_save_IFS
11301  test -z "$as_dir" && as_dir=.
11302    for ac_exec_ext in '' $ac_executable_extensions; do
11303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11304    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11306    break 2
11307  fi
11308done
11309  done
11310IFS=$as_save_IFS
11311
11312  ;;
11313esac
11314fi
11315TAR=$ac_cv_path_TAR
11316if test -n "$TAR"; then
11317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11318$as_echo "$TAR" >&6; }
11319else
11320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11321$as_echo "no" >&6; }
11322fi
11323
11324
11325  test -n "$TAR" && break
11326done
11327
11328  else
11329    # The variable is set, but is it from the command line or the environment?
11330
11331    # Try to remove the string !TAR! from our list.
11332    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
11333    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11334      # If it failed, the variable was not from the command line. Ignore it,
11335      # but warn the user (except for BASH, which is always set by the calling BASH).
11336      if test "xTAR" != xBASH; then
11337        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
11338$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
11339      fi
11340      # Try to locate tool using the code snippet
11341      for ac_prog in gtar tar
11342do
11343  # Extract the first word of "$ac_prog", so it can be a program name with args.
11344set dummy $ac_prog; ac_word=$2
11345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11346$as_echo_n "checking for $ac_word... " >&6; }
11347if ${ac_cv_path_TAR+:} false; then :
11348  $as_echo_n "(cached) " >&6
11349else
11350  case $TAR in
11351  [\\/]* | ?:[\\/]*)
11352  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11353  ;;
11354  *)
11355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11356for as_dir in $PATH
11357do
11358  IFS=$as_save_IFS
11359  test -z "$as_dir" && as_dir=.
11360    for ac_exec_ext in '' $ac_executable_extensions; do
11361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11362    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11364    break 2
11365  fi
11366done
11367  done
11368IFS=$as_save_IFS
11369
11370  ;;
11371esac
11372fi
11373TAR=$ac_cv_path_TAR
11374if test -n "$TAR"; then
11375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11376$as_echo "$TAR" >&6; }
11377else
11378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11379$as_echo "no" >&6; }
11380fi
11381
11382
11383  test -n "$TAR" && break
11384done
11385
11386    else
11387      # If it succeeded, then it was overridden by the user. We will use it
11388      # for the tool.
11389
11390      # First remove it from the list of overridden variables, so we can test
11391      # for unknown variables in the end.
11392      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11393
11394      # Check if we try to supply an empty value
11395      if test "x$TAR" = x; then
11396        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
11397$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
11398        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11399$as_echo_n "checking for TAR... " >&6; }
11400        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11401$as_echo "disabled" >&6; }
11402      else
11403        # Check if the provided tool contains a complete path.
11404        tool_specified="$TAR"
11405        tool_basename="${tool_specified##*/}"
11406        if test "x$tool_basename" = "x$tool_specified"; then
11407          # A command without a complete path is provided, search $PATH.
11408          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
11409$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
11410          # Extract the first word of "$tool_basename", so it can be a program name with args.
11411set dummy $tool_basename; ac_word=$2
11412{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11413$as_echo_n "checking for $ac_word... " >&6; }
11414if ${ac_cv_path_TAR+:} false; then :
11415  $as_echo_n "(cached) " >&6
11416else
11417  case $TAR in
11418  [\\/]* | ?:[\\/]*)
11419  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
11420  ;;
11421  *)
11422  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11423for as_dir in $PATH
11424do
11425  IFS=$as_save_IFS
11426  test -z "$as_dir" && as_dir=.
11427    for ac_exec_ext in '' $ac_executable_extensions; do
11428  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11429    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11430    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11431    break 2
11432  fi
11433done
11434  done
11435IFS=$as_save_IFS
11436
11437  ;;
11438esac
11439fi
11440TAR=$ac_cv_path_TAR
11441if test -n "$TAR"; then
11442  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11443$as_echo "$TAR" >&6; }
11444else
11445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11446$as_echo "no" >&6; }
11447fi
11448
11449
11450          if test "x$TAR" = x; then
11451            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11452          fi
11453        else
11454          # Otherwise we believe it is a complete path. Use it as it is.
11455          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11456$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11457          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11458$as_echo_n "checking for TAR... " >&6; }
11459          if test ! -x "$tool_specified"; then
11460            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11461$as_echo "not found" >&6; }
11462            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11463          fi
11464          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11465$as_echo "$tool_specified" >&6; }
11466        fi
11467      fi
11468    fi
11469
11470  fi
11471
11472
11473
11474  if test "x$TAR" = x; then
11475    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11476  fi
11477
11478
11479
11480
11481
11482  # Publish this variable in the help.
11483
11484
11485  if [ -z "${TEE+x}" ]; then
11486    # The variable is not set by user, try to locate tool using the code snippet
11487    for ac_prog in tee
11488do
11489  # Extract the first word of "$ac_prog", so it can be a program name with args.
11490set dummy $ac_prog; ac_word=$2
11491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11492$as_echo_n "checking for $ac_word... " >&6; }
11493if ${ac_cv_path_TEE+:} false; then :
11494  $as_echo_n "(cached) " >&6
11495else
11496  case $TEE in
11497  [\\/]* | ?:[\\/]*)
11498  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11499  ;;
11500  *)
11501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11502for as_dir in $PATH
11503do
11504  IFS=$as_save_IFS
11505  test -z "$as_dir" && as_dir=.
11506    for ac_exec_ext in '' $ac_executable_extensions; do
11507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11508    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11510    break 2
11511  fi
11512done
11513  done
11514IFS=$as_save_IFS
11515
11516  ;;
11517esac
11518fi
11519TEE=$ac_cv_path_TEE
11520if test -n "$TEE"; then
11521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11522$as_echo "$TEE" >&6; }
11523else
11524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11525$as_echo "no" >&6; }
11526fi
11527
11528
11529  test -n "$TEE" && break
11530done
11531
11532  else
11533    # The variable is set, but is it from the command line or the environment?
11534
11535    # Try to remove the string !TEE! from our list.
11536    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11537    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11538      # If it failed, the variable was not from the command line. Ignore it,
11539      # but warn the user (except for BASH, which is always set by the calling BASH).
11540      if test "xTEE" != xBASH; then
11541        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11542$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11543      fi
11544      # Try to locate tool using the code snippet
11545      for ac_prog in tee
11546do
11547  # Extract the first word of "$ac_prog", so it can be a program name with args.
11548set dummy $ac_prog; ac_word=$2
11549{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11550$as_echo_n "checking for $ac_word... " >&6; }
11551if ${ac_cv_path_TEE+:} false; then :
11552  $as_echo_n "(cached) " >&6
11553else
11554  case $TEE in
11555  [\\/]* | ?:[\\/]*)
11556  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11557  ;;
11558  *)
11559  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11560for as_dir in $PATH
11561do
11562  IFS=$as_save_IFS
11563  test -z "$as_dir" && as_dir=.
11564    for ac_exec_ext in '' $ac_executable_extensions; do
11565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11566    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11568    break 2
11569  fi
11570done
11571  done
11572IFS=$as_save_IFS
11573
11574  ;;
11575esac
11576fi
11577TEE=$ac_cv_path_TEE
11578if test -n "$TEE"; then
11579  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11580$as_echo "$TEE" >&6; }
11581else
11582  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11583$as_echo "no" >&6; }
11584fi
11585
11586
11587  test -n "$TEE" && break
11588done
11589
11590    else
11591      # If it succeeded, then it was overridden by the user. We will use it
11592      # for the tool.
11593
11594      # First remove it from the list of overridden variables, so we can test
11595      # for unknown variables in the end.
11596      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11597
11598      # Check if we try to supply an empty value
11599      if test "x$TEE" = x; then
11600        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11601$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11602        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11603$as_echo_n "checking for TEE... " >&6; }
11604        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11605$as_echo "disabled" >&6; }
11606      else
11607        # Check if the provided tool contains a complete path.
11608        tool_specified="$TEE"
11609        tool_basename="${tool_specified##*/}"
11610        if test "x$tool_basename" = "x$tool_specified"; then
11611          # A command without a complete path is provided, search $PATH.
11612          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11613$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11614          # Extract the first word of "$tool_basename", so it can be a program name with args.
11615set dummy $tool_basename; ac_word=$2
11616{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11617$as_echo_n "checking for $ac_word... " >&6; }
11618if ${ac_cv_path_TEE+:} false; then :
11619  $as_echo_n "(cached) " >&6
11620else
11621  case $TEE in
11622  [\\/]* | ?:[\\/]*)
11623  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11624  ;;
11625  *)
11626  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11627for as_dir in $PATH
11628do
11629  IFS=$as_save_IFS
11630  test -z "$as_dir" && as_dir=.
11631    for ac_exec_ext in '' $ac_executable_extensions; do
11632  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11633    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11634    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11635    break 2
11636  fi
11637done
11638  done
11639IFS=$as_save_IFS
11640
11641  ;;
11642esac
11643fi
11644TEE=$ac_cv_path_TEE
11645if test -n "$TEE"; then
11646  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11647$as_echo "$TEE" >&6; }
11648else
11649  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11650$as_echo "no" >&6; }
11651fi
11652
11653
11654          if test "x$TEE" = x; then
11655            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11656          fi
11657        else
11658          # Otherwise we believe it is a complete path. Use it as it is.
11659          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11660$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11661          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11662$as_echo_n "checking for TEE... " >&6; }
11663          if test ! -x "$tool_specified"; then
11664            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11665$as_echo "not found" >&6; }
11666            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11667          fi
11668          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11669$as_echo "$tool_specified" >&6; }
11670        fi
11671      fi
11672    fi
11673
11674  fi
11675
11676
11677
11678  if test "x$TEE" = x; then
11679    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11680  fi
11681
11682
11683
11684
11685
11686  # Publish this variable in the help.
11687
11688
11689  if [ -z "${TOUCH+x}" ]; then
11690    # The variable is not set by user, try to locate tool using the code snippet
11691    for ac_prog in touch
11692do
11693  # Extract the first word of "$ac_prog", so it can be a program name with args.
11694set dummy $ac_prog; ac_word=$2
11695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11696$as_echo_n "checking for $ac_word... " >&6; }
11697if ${ac_cv_path_TOUCH+:} false; then :
11698  $as_echo_n "(cached) " >&6
11699else
11700  case $TOUCH in
11701  [\\/]* | ?:[\\/]*)
11702  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11703  ;;
11704  *)
11705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11706for as_dir in $PATH
11707do
11708  IFS=$as_save_IFS
11709  test -z "$as_dir" && as_dir=.
11710    for ac_exec_ext in '' $ac_executable_extensions; do
11711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11712    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11714    break 2
11715  fi
11716done
11717  done
11718IFS=$as_save_IFS
11719
11720  ;;
11721esac
11722fi
11723TOUCH=$ac_cv_path_TOUCH
11724if test -n "$TOUCH"; then
11725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11726$as_echo "$TOUCH" >&6; }
11727else
11728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11729$as_echo "no" >&6; }
11730fi
11731
11732
11733  test -n "$TOUCH" && break
11734done
11735
11736  else
11737    # The variable is set, but is it from the command line or the environment?
11738
11739    # Try to remove the string !TOUCH! from our list.
11740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11742      # If it failed, the variable was not from the command line. Ignore it,
11743      # but warn the user (except for BASH, which is always set by the calling BASH).
11744      if test "xTOUCH" != xBASH; then
11745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11746$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11747      fi
11748      # Try to locate tool using the code snippet
11749      for ac_prog in touch
11750do
11751  # Extract the first word of "$ac_prog", so it can be a program name with args.
11752set dummy $ac_prog; ac_word=$2
11753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11754$as_echo_n "checking for $ac_word... " >&6; }
11755if ${ac_cv_path_TOUCH+:} false; then :
11756  $as_echo_n "(cached) " >&6
11757else
11758  case $TOUCH in
11759  [\\/]* | ?:[\\/]*)
11760  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11761  ;;
11762  *)
11763  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11764for as_dir in $PATH
11765do
11766  IFS=$as_save_IFS
11767  test -z "$as_dir" && as_dir=.
11768    for ac_exec_ext in '' $ac_executable_extensions; do
11769  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11770    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11771    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11772    break 2
11773  fi
11774done
11775  done
11776IFS=$as_save_IFS
11777
11778  ;;
11779esac
11780fi
11781TOUCH=$ac_cv_path_TOUCH
11782if test -n "$TOUCH"; then
11783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11784$as_echo "$TOUCH" >&6; }
11785else
11786  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11787$as_echo "no" >&6; }
11788fi
11789
11790
11791  test -n "$TOUCH" && break
11792done
11793
11794    else
11795      # If it succeeded, then it was overridden by the user. We will use it
11796      # for the tool.
11797
11798      # First remove it from the list of overridden variables, so we can test
11799      # for unknown variables in the end.
11800      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11801
11802      # Check if we try to supply an empty value
11803      if test "x$TOUCH" = x; then
11804        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11805$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11806        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11807$as_echo_n "checking for TOUCH... " >&6; }
11808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11809$as_echo "disabled" >&6; }
11810      else
11811        # Check if the provided tool contains a complete path.
11812        tool_specified="$TOUCH"
11813        tool_basename="${tool_specified##*/}"
11814        if test "x$tool_basename" = "x$tool_specified"; then
11815          # A command without a complete path is provided, search $PATH.
11816          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11817$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11818          # Extract the first word of "$tool_basename", so it can be a program name with args.
11819set dummy $tool_basename; ac_word=$2
11820{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11821$as_echo_n "checking for $ac_word... " >&6; }
11822if ${ac_cv_path_TOUCH+:} false; then :
11823  $as_echo_n "(cached) " >&6
11824else
11825  case $TOUCH in
11826  [\\/]* | ?:[\\/]*)
11827  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11828  ;;
11829  *)
11830  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11831for as_dir in $PATH
11832do
11833  IFS=$as_save_IFS
11834  test -z "$as_dir" && as_dir=.
11835    for ac_exec_ext in '' $ac_executable_extensions; do
11836  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11837    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11838    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11839    break 2
11840  fi
11841done
11842  done
11843IFS=$as_save_IFS
11844
11845  ;;
11846esac
11847fi
11848TOUCH=$ac_cv_path_TOUCH
11849if test -n "$TOUCH"; then
11850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11851$as_echo "$TOUCH" >&6; }
11852else
11853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11854$as_echo "no" >&6; }
11855fi
11856
11857
11858          if test "x$TOUCH" = x; then
11859            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11860          fi
11861        else
11862          # Otherwise we believe it is a complete path. Use it as it is.
11863          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11864$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11865          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11866$as_echo_n "checking for TOUCH... " >&6; }
11867          if test ! -x "$tool_specified"; then
11868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11869$as_echo "not found" >&6; }
11870            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11871          fi
11872          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11873$as_echo "$tool_specified" >&6; }
11874        fi
11875      fi
11876    fi
11877
11878  fi
11879
11880
11881
11882  if test "x$TOUCH" = x; then
11883    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11884  fi
11885
11886
11887
11888
11889
11890  # Publish this variable in the help.
11891
11892
11893  if [ -z "${TR+x}" ]; then
11894    # The variable is not set by user, try to locate tool using the code snippet
11895    for ac_prog in tr
11896do
11897  # Extract the first word of "$ac_prog", so it can be a program name with args.
11898set dummy $ac_prog; ac_word=$2
11899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11900$as_echo_n "checking for $ac_word... " >&6; }
11901if ${ac_cv_path_TR+:} false; then :
11902  $as_echo_n "(cached) " >&6
11903else
11904  case $TR in
11905  [\\/]* | ?:[\\/]*)
11906  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11907  ;;
11908  *)
11909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11910for as_dir in $PATH
11911do
11912  IFS=$as_save_IFS
11913  test -z "$as_dir" && as_dir=.
11914    for ac_exec_ext in '' $ac_executable_extensions; do
11915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11916    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11918    break 2
11919  fi
11920done
11921  done
11922IFS=$as_save_IFS
11923
11924  ;;
11925esac
11926fi
11927TR=$ac_cv_path_TR
11928if test -n "$TR"; then
11929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11930$as_echo "$TR" >&6; }
11931else
11932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11933$as_echo "no" >&6; }
11934fi
11935
11936
11937  test -n "$TR" && break
11938done
11939
11940  else
11941    # The variable is set, but is it from the command line or the environment?
11942
11943    # Try to remove the string !TR! from our list.
11944    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11945    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11946      # If it failed, the variable was not from the command line. Ignore it,
11947      # but warn the user (except for BASH, which is always set by the calling BASH).
11948      if test "xTR" != xBASH; then
11949        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11950$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11951      fi
11952      # Try to locate tool using the code snippet
11953      for ac_prog in tr
11954do
11955  # Extract the first word of "$ac_prog", so it can be a program name with args.
11956set dummy $ac_prog; ac_word=$2
11957{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11958$as_echo_n "checking for $ac_word... " >&6; }
11959if ${ac_cv_path_TR+:} false; then :
11960  $as_echo_n "(cached) " >&6
11961else
11962  case $TR in
11963  [\\/]* | ?:[\\/]*)
11964  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11965  ;;
11966  *)
11967  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11968for as_dir in $PATH
11969do
11970  IFS=$as_save_IFS
11971  test -z "$as_dir" && as_dir=.
11972    for ac_exec_ext in '' $ac_executable_extensions; do
11973  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11974    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11975    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11976    break 2
11977  fi
11978done
11979  done
11980IFS=$as_save_IFS
11981
11982  ;;
11983esac
11984fi
11985TR=$ac_cv_path_TR
11986if test -n "$TR"; then
11987  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11988$as_echo "$TR" >&6; }
11989else
11990  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11991$as_echo "no" >&6; }
11992fi
11993
11994
11995  test -n "$TR" && break
11996done
11997
11998    else
11999      # If it succeeded, then it was overridden by the user. We will use it
12000      # for the tool.
12001
12002      # First remove it from the list of overridden variables, so we can test
12003      # for unknown variables in the end.
12004      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12005
12006      # Check if we try to supply an empty value
12007      if test "x$TR" = x; then
12008        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
12009$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
12010        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12011$as_echo_n "checking for TR... " >&6; }
12012        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12013$as_echo "disabled" >&6; }
12014      else
12015        # Check if the provided tool contains a complete path.
12016        tool_specified="$TR"
12017        tool_basename="${tool_specified##*/}"
12018        if test "x$tool_basename" = "x$tool_specified"; then
12019          # A command without a complete path is provided, search $PATH.
12020          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
12021$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
12022          # Extract the first word of "$tool_basename", so it can be a program name with args.
12023set dummy $tool_basename; ac_word=$2
12024{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12025$as_echo_n "checking for $ac_word... " >&6; }
12026if ${ac_cv_path_TR+:} false; then :
12027  $as_echo_n "(cached) " >&6
12028else
12029  case $TR in
12030  [\\/]* | ?:[\\/]*)
12031  ac_cv_path_TR="$TR" # Let the user override the test with a path.
12032  ;;
12033  *)
12034  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12035for as_dir in $PATH
12036do
12037  IFS=$as_save_IFS
12038  test -z "$as_dir" && as_dir=.
12039    for ac_exec_ext in '' $ac_executable_extensions; do
12040  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12041    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
12042    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12043    break 2
12044  fi
12045done
12046  done
12047IFS=$as_save_IFS
12048
12049  ;;
12050esac
12051fi
12052TR=$ac_cv_path_TR
12053if test -n "$TR"; then
12054  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
12055$as_echo "$TR" >&6; }
12056else
12057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12058$as_echo "no" >&6; }
12059fi
12060
12061
12062          if test "x$TR" = x; then
12063            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12064          fi
12065        else
12066          # Otherwise we believe it is a complete path. Use it as it is.
12067          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
12068$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
12069          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
12070$as_echo_n "checking for TR... " >&6; }
12071          if test ! -x "$tool_specified"; then
12072            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12073$as_echo "not found" >&6; }
12074            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
12075          fi
12076          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12077$as_echo "$tool_specified" >&6; }
12078        fi
12079      fi
12080    fi
12081
12082  fi
12083
12084
12085
12086  if test "x$TR" = x; then
12087    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
12088  fi
12089
12090
12091
12092
12093
12094  # Publish this variable in the help.
12095
12096
12097  if [ -z "${UNAME+x}" ]; then
12098    # The variable is not set by user, try to locate tool using the code snippet
12099    for ac_prog in uname
12100do
12101  # Extract the first word of "$ac_prog", so it can be a program name with args.
12102set dummy $ac_prog; ac_word=$2
12103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12104$as_echo_n "checking for $ac_word... " >&6; }
12105if ${ac_cv_path_UNAME+:} false; then :
12106  $as_echo_n "(cached) " >&6
12107else
12108  case $UNAME in
12109  [\\/]* | ?:[\\/]*)
12110  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12111  ;;
12112  *)
12113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12114for as_dir in $PATH
12115do
12116  IFS=$as_save_IFS
12117  test -z "$as_dir" && as_dir=.
12118    for ac_exec_ext in '' $ac_executable_extensions; do
12119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12120    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12122    break 2
12123  fi
12124done
12125  done
12126IFS=$as_save_IFS
12127
12128  ;;
12129esac
12130fi
12131UNAME=$ac_cv_path_UNAME
12132if test -n "$UNAME"; then
12133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12134$as_echo "$UNAME" >&6; }
12135else
12136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12137$as_echo "no" >&6; }
12138fi
12139
12140
12141  test -n "$UNAME" && break
12142done
12143
12144  else
12145    # The variable is set, but is it from the command line or the environment?
12146
12147    # Try to remove the string !UNAME! from our list.
12148    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
12149    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12150      # If it failed, the variable was not from the command line. Ignore it,
12151      # but warn the user (except for BASH, which is always set by the calling BASH).
12152      if test "xUNAME" != xBASH; then
12153        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
12154$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
12155      fi
12156      # Try to locate tool using the code snippet
12157      for ac_prog in uname
12158do
12159  # Extract the first word of "$ac_prog", so it can be a program name with args.
12160set dummy $ac_prog; ac_word=$2
12161{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12162$as_echo_n "checking for $ac_word... " >&6; }
12163if ${ac_cv_path_UNAME+:} false; then :
12164  $as_echo_n "(cached) " >&6
12165else
12166  case $UNAME in
12167  [\\/]* | ?:[\\/]*)
12168  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12169  ;;
12170  *)
12171  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12172for as_dir in $PATH
12173do
12174  IFS=$as_save_IFS
12175  test -z "$as_dir" && as_dir=.
12176    for ac_exec_ext in '' $ac_executable_extensions; do
12177  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12178    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12179    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12180    break 2
12181  fi
12182done
12183  done
12184IFS=$as_save_IFS
12185
12186  ;;
12187esac
12188fi
12189UNAME=$ac_cv_path_UNAME
12190if test -n "$UNAME"; then
12191  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12192$as_echo "$UNAME" >&6; }
12193else
12194  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12195$as_echo "no" >&6; }
12196fi
12197
12198
12199  test -n "$UNAME" && break
12200done
12201
12202    else
12203      # If it succeeded, then it was overridden by the user. We will use it
12204      # for the tool.
12205
12206      # First remove it from the list of overridden variables, so we can test
12207      # for unknown variables in the end.
12208      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12209
12210      # Check if we try to supply an empty value
12211      if test "x$UNAME" = x; then
12212        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
12213$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
12214        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12215$as_echo_n "checking for UNAME... " >&6; }
12216        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12217$as_echo "disabled" >&6; }
12218      else
12219        # Check if the provided tool contains a complete path.
12220        tool_specified="$UNAME"
12221        tool_basename="${tool_specified##*/}"
12222        if test "x$tool_basename" = "x$tool_specified"; then
12223          # A command without a complete path is provided, search $PATH.
12224          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
12225$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
12226          # Extract the first word of "$tool_basename", so it can be a program name with args.
12227set dummy $tool_basename; ac_word=$2
12228{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12229$as_echo_n "checking for $ac_word... " >&6; }
12230if ${ac_cv_path_UNAME+:} false; then :
12231  $as_echo_n "(cached) " >&6
12232else
12233  case $UNAME in
12234  [\\/]* | ?:[\\/]*)
12235  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
12236  ;;
12237  *)
12238  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12239for as_dir in $PATH
12240do
12241  IFS=$as_save_IFS
12242  test -z "$as_dir" && as_dir=.
12243    for ac_exec_ext in '' $ac_executable_extensions; do
12244  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12245    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
12246    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12247    break 2
12248  fi
12249done
12250  done
12251IFS=$as_save_IFS
12252
12253  ;;
12254esac
12255fi
12256UNAME=$ac_cv_path_UNAME
12257if test -n "$UNAME"; then
12258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
12259$as_echo "$UNAME" >&6; }
12260else
12261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12262$as_echo "no" >&6; }
12263fi
12264
12265
12266          if test "x$UNAME" = x; then
12267            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12268          fi
12269        else
12270          # Otherwise we believe it is a complete path. Use it as it is.
12271          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
12272$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
12273          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
12274$as_echo_n "checking for UNAME... " >&6; }
12275          if test ! -x "$tool_specified"; then
12276            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12277$as_echo "not found" >&6; }
12278            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
12279          fi
12280          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12281$as_echo "$tool_specified" >&6; }
12282        fi
12283      fi
12284    fi
12285
12286  fi
12287
12288
12289
12290  if test "x$UNAME" = x; then
12291    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
12292  fi
12293
12294
12295
12296
12297
12298  # Publish this variable in the help.
12299
12300
12301  if [ -z "${UNIQ+x}" ]; then
12302    # The variable is not set by user, try to locate tool using the code snippet
12303    for ac_prog in uniq
12304do
12305  # Extract the first word of "$ac_prog", so it can be a program name with args.
12306set dummy $ac_prog; ac_word=$2
12307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12308$as_echo_n "checking for $ac_word... " >&6; }
12309if ${ac_cv_path_UNIQ+:} false; then :
12310  $as_echo_n "(cached) " >&6
12311else
12312  case $UNIQ in
12313  [\\/]* | ?:[\\/]*)
12314  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12315  ;;
12316  *)
12317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12318for as_dir in $PATH
12319do
12320  IFS=$as_save_IFS
12321  test -z "$as_dir" && as_dir=.
12322    for ac_exec_ext in '' $ac_executable_extensions; do
12323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12324    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12326    break 2
12327  fi
12328done
12329  done
12330IFS=$as_save_IFS
12331
12332  ;;
12333esac
12334fi
12335UNIQ=$ac_cv_path_UNIQ
12336if test -n "$UNIQ"; then
12337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12338$as_echo "$UNIQ" >&6; }
12339else
12340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12341$as_echo "no" >&6; }
12342fi
12343
12344
12345  test -n "$UNIQ" && break
12346done
12347
12348  else
12349    # The variable is set, but is it from the command line or the environment?
12350
12351    # Try to remove the string !UNIQ! from our list.
12352    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
12353    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12354      # If it failed, the variable was not from the command line. Ignore it,
12355      # but warn the user (except for BASH, which is always set by the calling BASH).
12356      if test "xUNIQ" != xBASH; then
12357        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
12358$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
12359      fi
12360      # Try to locate tool using the code snippet
12361      for ac_prog in uniq
12362do
12363  # Extract the first word of "$ac_prog", so it can be a program name with args.
12364set dummy $ac_prog; ac_word=$2
12365{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12366$as_echo_n "checking for $ac_word... " >&6; }
12367if ${ac_cv_path_UNIQ+:} false; then :
12368  $as_echo_n "(cached) " >&6
12369else
12370  case $UNIQ in
12371  [\\/]* | ?:[\\/]*)
12372  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12373  ;;
12374  *)
12375  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12376for as_dir in $PATH
12377do
12378  IFS=$as_save_IFS
12379  test -z "$as_dir" && as_dir=.
12380    for ac_exec_ext in '' $ac_executable_extensions; do
12381  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12382    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12383    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12384    break 2
12385  fi
12386done
12387  done
12388IFS=$as_save_IFS
12389
12390  ;;
12391esac
12392fi
12393UNIQ=$ac_cv_path_UNIQ
12394if test -n "$UNIQ"; then
12395  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12396$as_echo "$UNIQ" >&6; }
12397else
12398  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12399$as_echo "no" >&6; }
12400fi
12401
12402
12403  test -n "$UNIQ" && break
12404done
12405
12406    else
12407      # If it succeeded, then it was overridden by the user. We will use it
12408      # for the tool.
12409
12410      # First remove it from the list of overridden variables, so we can test
12411      # for unknown variables in the end.
12412      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12413
12414      # Check if we try to supply an empty value
12415      if test "x$UNIQ" = x; then
12416        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
12417$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
12418        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12419$as_echo_n "checking for UNIQ... " >&6; }
12420        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12421$as_echo "disabled" >&6; }
12422      else
12423        # Check if the provided tool contains a complete path.
12424        tool_specified="$UNIQ"
12425        tool_basename="${tool_specified##*/}"
12426        if test "x$tool_basename" = "x$tool_specified"; then
12427          # A command without a complete path is provided, search $PATH.
12428          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12429$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12430          # Extract the first word of "$tool_basename", so it can be a program name with args.
12431set dummy $tool_basename; ac_word=$2
12432{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12433$as_echo_n "checking for $ac_word... " >&6; }
12434if ${ac_cv_path_UNIQ+:} false; then :
12435  $as_echo_n "(cached) " >&6
12436else
12437  case $UNIQ in
12438  [\\/]* | ?:[\\/]*)
12439  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12440  ;;
12441  *)
12442  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12443for as_dir in $PATH
12444do
12445  IFS=$as_save_IFS
12446  test -z "$as_dir" && as_dir=.
12447    for ac_exec_ext in '' $ac_executable_extensions; do
12448  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12449    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12450    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12451    break 2
12452  fi
12453done
12454  done
12455IFS=$as_save_IFS
12456
12457  ;;
12458esac
12459fi
12460UNIQ=$ac_cv_path_UNIQ
12461if test -n "$UNIQ"; then
12462  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12463$as_echo "$UNIQ" >&6; }
12464else
12465  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12466$as_echo "no" >&6; }
12467fi
12468
12469
12470          if test "x$UNIQ" = x; then
12471            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12472          fi
12473        else
12474          # Otherwise we believe it is a complete path. Use it as it is.
12475          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12476$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12477          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12478$as_echo_n "checking for UNIQ... " >&6; }
12479          if test ! -x "$tool_specified"; then
12480            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12481$as_echo "not found" >&6; }
12482            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12483          fi
12484          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12485$as_echo "$tool_specified" >&6; }
12486        fi
12487      fi
12488    fi
12489
12490  fi
12491
12492
12493
12494  if test "x$UNIQ" = x; then
12495    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12496  fi
12497
12498
12499
12500
12501
12502  # Publish this variable in the help.
12503
12504
12505  if [ -z "${WC+x}" ]; then
12506    # The variable is not set by user, try to locate tool using the code snippet
12507    for ac_prog in wc
12508do
12509  # Extract the first word of "$ac_prog", so it can be a program name with args.
12510set dummy $ac_prog; ac_word=$2
12511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12512$as_echo_n "checking for $ac_word... " >&6; }
12513if ${ac_cv_path_WC+:} false; then :
12514  $as_echo_n "(cached) " >&6
12515else
12516  case $WC in
12517  [\\/]* | ?:[\\/]*)
12518  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12519  ;;
12520  *)
12521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12522for as_dir in $PATH
12523do
12524  IFS=$as_save_IFS
12525  test -z "$as_dir" && as_dir=.
12526    for ac_exec_ext in '' $ac_executable_extensions; do
12527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12528    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12530    break 2
12531  fi
12532done
12533  done
12534IFS=$as_save_IFS
12535
12536  ;;
12537esac
12538fi
12539WC=$ac_cv_path_WC
12540if test -n "$WC"; then
12541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12542$as_echo "$WC" >&6; }
12543else
12544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12545$as_echo "no" >&6; }
12546fi
12547
12548
12549  test -n "$WC" && break
12550done
12551
12552  else
12553    # The variable is set, but is it from the command line or the environment?
12554
12555    # Try to remove the string !WC! from our list.
12556    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12557    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12558      # If it failed, the variable was not from the command line. Ignore it,
12559      # but warn the user (except for BASH, which is always set by the calling BASH).
12560      if test "xWC" != xBASH; then
12561        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12562$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12563      fi
12564      # Try to locate tool using the code snippet
12565      for ac_prog in wc
12566do
12567  # Extract the first word of "$ac_prog", so it can be a program name with args.
12568set dummy $ac_prog; ac_word=$2
12569{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12570$as_echo_n "checking for $ac_word... " >&6; }
12571if ${ac_cv_path_WC+:} false; then :
12572  $as_echo_n "(cached) " >&6
12573else
12574  case $WC in
12575  [\\/]* | ?:[\\/]*)
12576  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12577  ;;
12578  *)
12579  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12580for as_dir in $PATH
12581do
12582  IFS=$as_save_IFS
12583  test -z "$as_dir" && as_dir=.
12584    for ac_exec_ext in '' $ac_executable_extensions; do
12585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12586    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12588    break 2
12589  fi
12590done
12591  done
12592IFS=$as_save_IFS
12593
12594  ;;
12595esac
12596fi
12597WC=$ac_cv_path_WC
12598if test -n "$WC"; then
12599  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12600$as_echo "$WC" >&6; }
12601else
12602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12603$as_echo "no" >&6; }
12604fi
12605
12606
12607  test -n "$WC" && break
12608done
12609
12610    else
12611      # If it succeeded, then it was overridden by the user. We will use it
12612      # for the tool.
12613
12614      # First remove it from the list of overridden variables, so we can test
12615      # for unknown variables in the end.
12616      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12617
12618      # Check if we try to supply an empty value
12619      if test "x$WC" = x; then
12620        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12621$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12622        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12623$as_echo_n "checking for WC... " >&6; }
12624        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12625$as_echo "disabled" >&6; }
12626      else
12627        # Check if the provided tool contains a complete path.
12628        tool_specified="$WC"
12629        tool_basename="${tool_specified##*/}"
12630        if test "x$tool_basename" = "x$tool_specified"; then
12631          # A command without a complete path is provided, search $PATH.
12632          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12633$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12634          # Extract the first word of "$tool_basename", so it can be a program name with args.
12635set dummy $tool_basename; ac_word=$2
12636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12637$as_echo_n "checking for $ac_word... " >&6; }
12638if ${ac_cv_path_WC+:} false; then :
12639  $as_echo_n "(cached) " >&6
12640else
12641  case $WC in
12642  [\\/]* | ?:[\\/]*)
12643  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12644  ;;
12645  *)
12646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12647for as_dir in $PATH
12648do
12649  IFS=$as_save_IFS
12650  test -z "$as_dir" && as_dir=.
12651    for ac_exec_ext in '' $ac_executable_extensions; do
12652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12653    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12655    break 2
12656  fi
12657done
12658  done
12659IFS=$as_save_IFS
12660
12661  ;;
12662esac
12663fi
12664WC=$ac_cv_path_WC
12665if test -n "$WC"; then
12666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12667$as_echo "$WC" >&6; }
12668else
12669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12670$as_echo "no" >&6; }
12671fi
12672
12673
12674          if test "x$WC" = x; then
12675            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12676          fi
12677        else
12678          # Otherwise we believe it is a complete path. Use it as it is.
12679          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12680$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12681          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12682$as_echo_n "checking for WC... " >&6; }
12683          if test ! -x "$tool_specified"; then
12684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12685$as_echo "not found" >&6; }
12686            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12687          fi
12688          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12689$as_echo "$tool_specified" >&6; }
12690        fi
12691      fi
12692    fi
12693
12694  fi
12695
12696
12697
12698  if test "x$WC" = x; then
12699    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12700  fi
12701
12702
12703
12704
12705
12706  # Publish this variable in the help.
12707
12708
12709  if [ -z "${WHICH+x}" ]; then
12710    # The variable is not set by user, try to locate tool using the code snippet
12711    for ac_prog in which
12712do
12713  # Extract the first word of "$ac_prog", so it can be a program name with args.
12714set dummy $ac_prog; ac_word=$2
12715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12716$as_echo_n "checking for $ac_word... " >&6; }
12717if ${ac_cv_path_WHICH+:} false; then :
12718  $as_echo_n "(cached) " >&6
12719else
12720  case $WHICH in
12721  [\\/]* | ?:[\\/]*)
12722  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12723  ;;
12724  *)
12725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12726for as_dir in $PATH
12727do
12728  IFS=$as_save_IFS
12729  test -z "$as_dir" && as_dir=.
12730    for ac_exec_ext in '' $ac_executable_extensions; do
12731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12732    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12734    break 2
12735  fi
12736done
12737  done
12738IFS=$as_save_IFS
12739
12740  ;;
12741esac
12742fi
12743WHICH=$ac_cv_path_WHICH
12744if test -n "$WHICH"; then
12745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12746$as_echo "$WHICH" >&6; }
12747else
12748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12749$as_echo "no" >&6; }
12750fi
12751
12752
12753  test -n "$WHICH" && break
12754done
12755
12756  else
12757    # The variable is set, but is it from the command line or the environment?
12758
12759    # Try to remove the string !WHICH! from our list.
12760    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12761    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12762      # If it failed, the variable was not from the command line. Ignore it,
12763      # but warn the user (except for BASH, which is always set by the calling BASH).
12764      if test "xWHICH" != xBASH; then
12765        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12766$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12767      fi
12768      # Try to locate tool using the code snippet
12769      for ac_prog in which
12770do
12771  # Extract the first word of "$ac_prog", so it can be a program name with args.
12772set dummy $ac_prog; ac_word=$2
12773{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12774$as_echo_n "checking for $ac_word... " >&6; }
12775if ${ac_cv_path_WHICH+:} false; then :
12776  $as_echo_n "(cached) " >&6
12777else
12778  case $WHICH in
12779  [\\/]* | ?:[\\/]*)
12780  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12781  ;;
12782  *)
12783  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12784for as_dir in $PATH
12785do
12786  IFS=$as_save_IFS
12787  test -z "$as_dir" && as_dir=.
12788    for ac_exec_ext in '' $ac_executable_extensions; do
12789  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12790    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12791    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12792    break 2
12793  fi
12794done
12795  done
12796IFS=$as_save_IFS
12797
12798  ;;
12799esac
12800fi
12801WHICH=$ac_cv_path_WHICH
12802if test -n "$WHICH"; then
12803  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12804$as_echo "$WHICH" >&6; }
12805else
12806  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12807$as_echo "no" >&6; }
12808fi
12809
12810
12811  test -n "$WHICH" && break
12812done
12813
12814    else
12815      # If it succeeded, then it was overridden by the user. We will use it
12816      # for the tool.
12817
12818      # First remove it from the list of overridden variables, so we can test
12819      # for unknown variables in the end.
12820      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12821
12822      # Check if we try to supply an empty value
12823      if test "x$WHICH" = x; then
12824        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12825$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12826        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12827$as_echo_n "checking for WHICH... " >&6; }
12828        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12829$as_echo "disabled" >&6; }
12830      else
12831        # Check if the provided tool contains a complete path.
12832        tool_specified="$WHICH"
12833        tool_basename="${tool_specified##*/}"
12834        if test "x$tool_basename" = "x$tool_specified"; then
12835          # A command without a complete path is provided, search $PATH.
12836          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12837$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12838          # Extract the first word of "$tool_basename", so it can be a program name with args.
12839set dummy $tool_basename; ac_word=$2
12840{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12841$as_echo_n "checking for $ac_word... " >&6; }
12842if ${ac_cv_path_WHICH+:} false; then :
12843  $as_echo_n "(cached) " >&6
12844else
12845  case $WHICH in
12846  [\\/]* | ?:[\\/]*)
12847  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12848  ;;
12849  *)
12850  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12851for as_dir in $PATH
12852do
12853  IFS=$as_save_IFS
12854  test -z "$as_dir" && as_dir=.
12855    for ac_exec_ext in '' $ac_executable_extensions; do
12856  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12857    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12858    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12859    break 2
12860  fi
12861done
12862  done
12863IFS=$as_save_IFS
12864
12865  ;;
12866esac
12867fi
12868WHICH=$ac_cv_path_WHICH
12869if test -n "$WHICH"; then
12870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12871$as_echo "$WHICH" >&6; }
12872else
12873  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12874$as_echo "no" >&6; }
12875fi
12876
12877
12878          if test "x$WHICH" = x; then
12879            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12880          fi
12881        else
12882          # Otherwise we believe it is a complete path. Use it as it is.
12883          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12884$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12885          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12886$as_echo_n "checking for WHICH... " >&6; }
12887          if test ! -x "$tool_specified"; then
12888            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12889$as_echo "not found" >&6; }
12890            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12891          fi
12892          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12893$as_echo "$tool_specified" >&6; }
12894        fi
12895      fi
12896    fi
12897
12898  fi
12899
12900
12901
12902  if test "x$WHICH" = x; then
12903    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12904  fi
12905
12906
12907
12908
12909
12910  # Publish this variable in the help.
12911
12912
12913  if [ -z "${XARGS+x}" ]; then
12914    # The variable is not set by user, try to locate tool using the code snippet
12915    for ac_prog in xargs
12916do
12917  # Extract the first word of "$ac_prog", so it can be a program name with args.
12918set dummy $ac_prog; ac_word=$2
12919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12920$as_echo_n "checking for $ac_word... " >&6; }
12921if ${ac_cv_path_XARGS+:} false; then :
12922  $as_echo_n "(cached) " >&6
12923else
12924  case $XARGS in
12925  [\\/]* | ?:[\\/]*)
12926  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12927  ;;
12928  *)
12929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12930for as_dir in $PATH
12931do
12932  IFS=$as_save_IFS
12933  test -z "$as_dir" && as_dir=.
12934    for ac_exec_ext in '' $ac_executable_extensions; do
12935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12936    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12938    break 2
12939  fi
12940done
12941  done
12942IFS=$as_save_IFS
12943
12944  ;;
12945esac
12946fi
12947XARGS=$ac_cv_path_XARGS
12948if test -n "$XARGS"; then
12949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12950$as_echo "$XARGS" >&6; }
12951else
12952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12953$as_echo "no" >&6; }
12954fi
12955
12956
12957  test -n "$XARGS" && break
12958done
12959
12960  else
12961    # The variable is set, but is it from the command line or the environment?
12962
12963    # Try to remove the string !XARGS! from our list.
12964    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12965    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12966      # If it failed, the variable was not from the command line. Ignore it,
12967      # but warn the user (except for BASH, which is always set by the calling BASH).
12968      if test "xXARGS" != xBASH; then
12969        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12970$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12971      fi
12972      # Try to locate tool using the code snippet
12973      for ac_prog in xargs
12974do
12975  # Extract the first word of "$ac_prog", so it can be a program name with args.
12976set dummy $ac_prog; ac_word=$2
12977{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12978$as_echo_n "checking for $ac_word... " >&6; }
12979if ${ac_cv_path_XARGS+:} false; then :
12980  $as_echo_n "(cached) " >&6
12981else
12982  case $XARGS in
12983  [\\/]* | ?:[\\/]*)
12984  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12985  ;;
12986  *)
12987  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12988for as_dir in $PATH
12989do
12990  IFS=$as_save_IFS
12991  test -z "$as_dir" && as_dir=.
12992    for ac_exec_ext in '' $ac_executable_extensions; do
12993  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12994    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12995    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12996    break 2
12997  fi
12998done
12999  done
13000IFS=$as_save_IFS
13001
13002  ;;
13003esac
13004fi
13005XARGS=$ac_cv_path_XARGS
13006if test -n "$XARGS"; then
13007  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13008$as_echo "$XARGS" >&6; }
13009else
13010  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13011$as_echo "no" >&6; }
13012fi
13013
13014
13015  test -n "$XARGS" && break
13016done
13017
13018    else
13019      # If it succeeded, then it was overridden by the user. We will use it
13020      # for the tool.
13021
13022      # First remove it from the list of overridden variables, so we can test
13023      # for unknown variables in the end.
13024      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13025
13026      # Check if we try to supply an empty value
13027      if test "x$XARGS" = x; then
13028        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
13029$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
13030        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13031$as_echo_n "checking for XARGS... " >&6; }
13032        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13033$as_echo "disabled" >&6; }
13034      else
13035        # Check if the provided tool contains a complete path.
13036        tool_specified="$XARGS"
13037        tool_basename="${tool_specified##*/}"
13038        if test "x$tool_basename" = "x$tool_specified"; then
13039          # A command without a complete path is provided, search $PATH.
13040          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
13041$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
13042          # Extract the first word of "$tool_basename", so it can be a program name with args.
13043set dummy $tool_basename; ac_word=$2
13044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13045$as_echo_n "checking for $ac_word... " >&6; }
13046if ${ac_cv_path_XARGS+:} false; then :
13047  $as_echo_n "(cached) " >&6
13048else
13049  case $XARGS in
13050  [\\/]* | ?:[\\/]*)
13051  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
13052  ;;
13053  *)
13054  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13055for as_dir in $PATH
13056do
13057  IFS=$as_save_IFS
13058  test -z "$as_dir" && as_dir=.
13059    for ac_exec_ext in '' $ac_executable_extensions; do
13060  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13061    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
13062    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13063    break 2
13064  fi
13065done
13066  done
13067IFS=$as_save_IFS
13068
13069  ;;
13070esac
13071fi
13072XARGS=$ac_cv_path_XARGS
13073if test -n "$XARGS"; then
13074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
13075$as_echo "$XARGS" >&6; }
13076else
13077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13078$as_echo "no" >&6; }
13079fi
13080
13081
13082          if test "x$XARGS" = x; then
13083            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13084          fi
13085        else
13086          # Otherwise we believe it is a complete path. Use it as it is.
13087          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
13088$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
13089          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
13090$as_echo_n "checking for XARGS... " >&6; }
13091          if test ! -x "$tool_specified"; then
13092            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13093$as_echo "not found" >&6; }
13094            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
13095          fi
13096          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13097$as_echo "$tool_specified" >&6; }
13098        fi
13099      fi
13100    fi
13101
13102  fi
13103
13104
13105
13106  if test "x$XARGS" = x; then
13107    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
13108  fi
13109
13110
13111
13112  # Then required tools that require some special treatment.
13113
13114
13115  # Publish this variable in the help.
13116
13117
13118  if [ -z "${AWK+x}" ]; then
13119    # The variable is not set by user, try to locate tool using the code snippet
13120    for ac_prog in gawk mawk nawk awk
13121do
13122  # Extract the first word of "$ac_prog", so it can be a program name with args.
13123set dummy $ac_prog; ac_word=$2
13124{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13125$as_echo_n "checking for $ac_word... " >&6; }
13126if ${ac_cv_prog_AWK+:} false; then :
13127  $as_echo_n "(cached) " >&6
13128else
13129  if test -n "$AWK"; then
13130  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13131else
13132as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13133for as_dir in $PATH
13134do
13135  IFS=$as_save_IFS
13136  test -z "$as_dir" && as_dir=.
13137    for ac_exec_ext in '' $ac_executable_extensions; do
13138  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13139    ac_cv_prog_AWK="$ac_prog"
13140    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13141    break 2
13142  fi
13143done
13144  done
13145IFS=$as_save_IFS
13146
13147fi
13148fi
13149AWK=$ac_cv_prog_AWK
13150if test -n "$AWK"; then
13151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13152$as_echo "$AWK" >&6; }
13153else
13154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13155$as_echo "no" >&6; }
13156fi
13157
13158
13159  test -n "$AWK" && break
13160done
13161
13162  else
13163    # The variable is set, but is it from the command line or the environment?
13164
13165    # Try to remove the string !AWK! from our list.
13166    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
13167    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13168      # If it failed, the variable was not from the command line. Ignore it,
13169      # but warn the user (except for BASH, which is always set by the calling BASH).
13170      if test "xAWK" != xBASH; then
13171        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
13172$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
13173      fi
13174      # Try to locate tool using the code snippet
13175      for ac_prog in gawk mawk nawk awk
13176do
13177  # Extract the first word of "$ac_prog", so it can be a program name with args.
13178set dummy $ac_prog; ac_word=$2
13179{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13180$as_echo_n "checking for $ac_word... " >&6; }
13181if ${ac_cv_prog_AWK+:} false; then :
13182  $as_echo_n "(cached) " >&6
13183else
13184  if test -n "$AWK"; then
13185  ac_cv_prog_AWK="$AWK" # Let the user override the test.
13186else
13187as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13188for as_dir in $PATH
13189do
13190  IFS=$as_save_IFS
13191  test -z "$as_dir" && as_dir=.
13192    for ac_exec_ext in '' $ac_executable_extensions; do
13193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13194    ac_cv_prog_AWK="$ac_prog"
13195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13196    break 2
13197  fi
13198done
13199  done
13200IFS=$as_save_IFS
13201
13202fi
13203fi
13204AWK=$ac_cv_prog_AWK
13205if test -n "$AWK"; then
13206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13207$as_echo "$AWK" >&6; }
13208else
13209  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13210$as_echo "no" >&6; }
13211fi
13212
13213
13214  test -n "$AWK" && break
13215done
13216
13217    else
13218      # If it succeeded, then it was overridden by the user. We will use it
13219      # for the tool.
13220
13221      # First remove it from the list of overridden variables, so we can test
13222      # for unknown variables in the end.
13223      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13224
13225      # Check if we try to supply an empty value
13226      if test "x$AWK" = x; then
13227        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
13228$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
13229        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13230$as_echo_n "checking for AWK... " >&6; }
13231        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13232$as_echo "disabled" >&6; }
13233      else
13234        # Check if the provided tool contains a complete path.
13235        tool_specified="$AWK"
13236        tool_basename="${tool_specified##*/}"
13237        if test "x$tool_basename" = "x$tool_specified"; then
13238          # A command without a complete path is provided, search $PATH.
13239          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
13240$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
13241          # Extract the first word of "$tool_basename", so it can be a program name with args.
13242set dummy $tool_basename; ac_word=$2
13243{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13244$as_echo_n "checking for $ac_word... " >&6; }
13245if ${ac_cv_path_AWK+:} false; then :
13246  $as_echo_n "(cached) " >&6
13247else
13248  case $AWK in
13249  [\\/]* | ?:[\\/]*)
13250  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
13251  ;;
13252  *)
13253  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13254for as_dir in $PATH
13255do
13256  IFS=$as_save_IFS
13257  test -z "$as_dir" && as_dir=.
13258    for ac_exec_ext in '' $ac_executable_extensions; do
13259  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13260    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
13261    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13262    break 2
13263  fi
13264done
13265  done
13266IFS=$as_save_IFS
13267
13268  ;;
13269esac
13270fi
13271AWK=$ac_cv_path_AWK
13272if test -n "$AWK"; then
13273  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
13274$as_echo "$AWK" >&6; }
13275else
13276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13277$as_echo "no" >&6; }
13278fi
13279
13280
13281          if test "x$AWK" = x; then
13282            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13283          fi
13284        else
13285          # Otherwise we believe it is a complete path. Use it as it is.
13286          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
13287$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
13288          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
13289$as_echo_n "checking for AWK... " >&6; }
13290          if test ! -x "$tool_specified"; then
13291            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13292$as_echo "not found" >&6; }
13293            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
13294          fi
13295          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13296$as_echo "$tool_specified" >&6; }
13297        fi
13298      fi
13299    fi
13300
13301  fi
13302
13303
13304  if test "x$AWK" = x; then
13305    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
13306  fi
13307
13308
13309
13310
13311  # Publish this variable in the help.
13312
13313
13314  if [ -z "${GREP+x}" ]; then
13315    # The variable is not set by user, try to locate tool using the code snippet
13316    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13317$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13318if ${ac_cv_path_GREP+:} false; then :
13319  $as_echo_n "(cached) " >&6
13320else
13321  if test -z "$GREP"; then
13322  ac_path_GREP_found=false
13323  # Loop through the user's path and test for each of PROGNAME-LIST
13324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13325for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13326do
13327  IFS=$as_save_IFS
13328  test -z "$as_dir" && as_dir=.
13329    for ac_prog in grep ggrep; do
13330    for ac_exec_ext in '' $ac_executable_extensions; do
13331      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13332      as_fn_executable_p "$ac_path_GREP" || continue
13333# Check for GNU ac_path_GREP and select it if it is found.
13334  # Check for GNU $ac_path_GREP
13335case `"$ac_path_GREP" --version 2>&1` in
13336*GNU*)
13337  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13338*)
13339  ac_count=0
13340  $as_echo_n 0123456789 >"conftest.in"
13341  while :
13342  do
13343    cat "conftest.in" "conftest.in" >"conftest.tmp"
13344    mv "conftest.tmp" "conftest.in"
13345    cp "conftest.in" "conftest.nl"
13346    $as_echo 'GREP' >> "conftest.nl"
13347    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13348    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13349    as_fn_arith $ac_count + 1 && ac_count=$as_val
13350    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13351      # Best one so far, save it but keep looking for a better one
13352      ac_cv_path_GREP="$ac_path_GREP"
13353      ac_path_GREP_max=$ac_count
13354    fi
13355    # 10*(2^10) chars as input seems more than enough
13356    test $ac_count -gt 10 && break
13357  done
13358  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13359esac
13360
13361      $ac_path_GREP_found && break 3
13362    done
13363  done
13364  done
13365IFS=$as_save_IFS
13366  if test -z "$ac_cv_path_GREP"; then
13367    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13368  fi
13369else
13370  ac_cv_path_GREP=$GREP
13371fi
13372
13373fi
13374{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13375$as_echo "$ac_cv_path_GREP" >&6; }
13376 GREP="$ac_cv_path_GREP"
13377
13378
13379  else
13380    # The variable is set, but is it from the command line or the environment?
13381
13382    # Try to remove the string !GREP! from our list.
13383    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
13384    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13385      # If it failed, the variable was not from the command line. Ignore it,
13386      # but warn the user (except for BASH, which is always set by the calling BASH).
13387      if test "xGREP" != xBASH; then
13388        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
13389$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
13390      fi
13391      # Try to locate tool using the code snippet
13392      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
13393$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
13394if ${ac_cv_path_GREP+:} false; then :
13395  $as_echo_n "(cached) " >&6
13396else
13397  if test -z "$GREP"; then
13398  ac_path_GREP_found=false
13399  # Loop through the user's path and test for each of PROGNAME-LIST
13400  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13401for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13402do
13403  IFS=$as_save_IFS
13404  test -z "$as_dir" && as_dir=.
13405    for ac_prog in grep ggrep; do
13406    for ac_exec_ext in '' $ac_executable_extensions; do
13407      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
13408      as_fn_executable_p "$ac_path_GREP" || continue
13409# Check for GNU ac_path_GREP and select it if it is found.
13410  # Check for GNU $ac_path_GREP
13411case `"$ac_path_GREP" --version 2>&1` in
13412*GNU*)
13413  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
13414*)
13415  ac_count=0
13416  $as_echo_n 0123456789 >"conftest.in"
13417  while :
13418  do
13419    cat "conftest.in" "conftest.in" >"conftest.tmp"
13420    mv "conftest.tmp" "conftest.in"
13421    cp "conftest.in" "conftest.nl"
13422    $as_echo 'GREP' >> "conftest.nl"
13423    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13424    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13425    as_fn_arith $ac_count + 1 && ac_count=$as_val
13426    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13427      # Best one so far, save it but keep looking for a better one
13428      ac_cv_path_GREP="$ac_path_GREP"
13429      ac_path_GREP_max=$ac_count
13430    fi
13431    # 10*(2^10) chars as input seems more than enough
13432    test $ac_count -gt 10 && break
13433  done
13434  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13435esac
13436
13437      $ac_path_GREP_found && break 3
13438    done
13439  done
13440  done
13441IFS=$as_save_IFS
13442  if test -z "$ac_cv_path_GREP"; then
13443    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13444  fi
13445else
13446  ac_cv_path_GREP=$GREP
13447fi
13448
13449fi
13450{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13451$as_echo "$ac_cv_path_GREP" >&6; }
13452 GREP="$ac_cv_path_GREP"
13453
13454
13455    else
13456      # If it succeeded, then it was overridden by the user. We will use it
13457      # for the tool.
13458
13459      # First remove it from the list of overridden variables, so we can test
13460      # for unknown variables in the end.
13461      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13462
13463      # Check if we try to supply an empty value
13464      if test "x$GREP" = x; then
13465        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13466$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13467        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13468$as_echo_n "checking for GREP... " >&6; }
13469        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13470$as_echo "disabled" >&6; }
13471      else
13472        # Check if the provided tool contains a complete path.
13473        tool_specified="$GREP"
13474        tool_basename="${tool_specified##*/}"
13475        if test "x$tool_basename" = "x$tool_specified"; then
13476          # A command without a complete path is provided, search $PATH.
13477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13478$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13479          # Extract the first word of "$tool_basename", so it can be a program name with args.
13480set dummy $tool_basename; ac_word=$2
13481{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13482$as_echo_n "checking for $ac_word... " >&6; }
13483if ${ac_cv_path_GREP+:} false; then :
13484  $as_echo_n "(cached) " >&6
13485else
13486  case $GREP in
13487  [\\/]* | ?:[\\/]*)
13488  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13489  ;;
13490  *)
13491  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13492for as_dir in $PATH
13493do
13494  IFS=$as_save_IFS
13495  test -z "$as_dir" && as_dir=.
13496    for ac_exec_ext in '' $ac_executable_extensions; do
13497  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13498    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13499    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13500    break 2
13501  fi
13502done
13503  done
13504IFS=$as_save_IFS
13505
13506  ;;
13507esac
13508fi
13509GREP=$ac_cv_path_GREP
13510if test -n "$GREP"; then
13511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13512$as_echo "$GREP" >&6; }
13513else
13514  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13515$as_echo "no" >&6; }
13516fi
13517
13518
13519          if test "x$GREP" = x; then
13520            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13521          fi
13522        else
13523          # Otherwise we believe it is a complete path. Use it as it is.
13524          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13525$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13526          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13527$as_echo_n "checking for GREP... " >&6; }
13528          if test ! -x "$tool_specified"; then
13529            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13530$as_echo "not found" >&6; }
13531            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13532          fi
13533          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13534$as_echo "$tool_specified" >&6; }
13535        fi
13536      fi
13537    fi
13538
13539  fi
13540
13541
13542  if test "x$GREP" = x; then
13543    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13544  fi
13545
13546
13547
13548
13549  # Publish this variable in the help.
13550
13551
13552  if [ -z "${EGREP+x}" ]; then
13553    # The variable is not set by user, try to locate tool using the code snippet
13554    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13555$as_echo_n "checking for egrep... " >&6; }
13556if ${ac_cv_path_EGREP+:} false; then :
13557  $as_echo_n "(cached) " >&6
13558else
13559  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13560   then ac_cv_path_EGREP="$GREP -E"
13561   else
13562     if test -z "$EGREP"; then
13563  ac_path_EGREP_found=false
13564  # Loop through the user's path and test for each of PROGNAME-LIST
13565  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13566for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13567do
13568  IFS=$as_save_IFS
13569  test -z "$as_dir" && as_dir=.
13570    for ac_prog in egrep; do
13571    for ac_exec_ext in '' $ac_executable_extensions; do
13572      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13573      as_fn_executable_p "$ac_path_EGREP" || continue
13574# Check for GNU ac_path_EGREP and select it if it is found.
13575  # Check for GNU $ac_path_EGREP
13576case `"$ac_path_EGREP" --version 2>&1` in
13577*GNU*)
13578  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13579*)
13580  ac_count=0
13581  $as_echo_n 0123456789 >"conftest.in"
13582  while :
13583  do
13584    cat "conftest.in" "conftest.in" >"conftest.tmp"
13585    mv "conftest.tmp" "conftest.in"
13586    cp "conftest.in" "conftest.nl"
13587    $as_echo 'EGREP' >> "conftest.nl"
13588    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13589    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13590    as_fn_arith $ac_count + 1 && ac_count=$as_val
13591    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13592      # Best one so far, save it but keep looking for a better one
13593      ac_cv_path_EGREP="$ac_path_EGREP"
13594      ac_path_EGREP_max=$ac_count
13595    fi
13596    # 10*(2^10) chars as input seems more than enough
13597    test $ac_count -gt 10 && break
13598  done
13599  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13600esac
13601
13602      $ac_path_EGREP_found && break 3
13603    done
13604  done
13605  done
13606IFS=$as_save_IFS
13607  if test -z "$ac_cv_path_EGREP"; then
13608    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13609  fi
13610else
13611  ac_cv_path_EGREP=$EGREP
13612fi
13613
13614   fi
13615fi
13616{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13617$as_echo "$ac_cv_path_EGREP" >&6; }
13618 EGREP="$ac_cv_path_EGREP"
13619
13620
13621  else
13622    # The variable is set, but is it from the command line or the environment?
13623
13624    # Try to remove the string !EGREP! from our list.
13625    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13626    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13627      # If it failed, the variable was not from the command line. Ignore it,
13628      # but warn the user (except for BASH, which is always set by the calling BASH).
13629      if test "xEGREP" != xBASH; then
13630        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13631$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13632      fi
13633      # Try to locate tool using the code snippet
13634      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13635$as_echo_n "checking for egrep... " >&6; }
13636if ${ac_cv_path_EGREP+:} false; then :
13637  $as_echo_n "(cached) " >&6
13638else
13639  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13640   then ac_cv_path_EGREP="$GREP -E"
13641   else
13642     if test -z "$EGREP"; then
13643  ac_path_EGREP_found=false
13644  # Loop through the user's path and test for each of PROGNAME-LIST
13645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13646for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13647do
13648  IFS=$as_save_IFS
13649  test -z "$as_dir" && as_dir=.
13650    for ac_prog in egrep; do
13651    for ac_exec_ext in '' $ac_executable_extensions; do
13652      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13653      as_fn_executable_p "$ac_path_EGREP" || continue
13654# Check for GNU ac_path_EGREP and select it if it is found.
13655  # Check for GNU $ac_path_EGREP
13656case `"$ac_path_EGREP" --version 2>&1` in
13657*GNU*)
13658  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13659*)
13660  ac_count=0
13661  $as_echo_n 0123456789 >"conftest.in"
13662  while :
13663  do
13664    cat "conftest.in" "conftest.in" >"conftest.tmp"
13665    mv "conftest.tmp" "conftest.in"
13666    cp "conftest.in" "conftest.nl"
13667    $as_echo 'EGREP' >> "conftest.nl"
13668    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13669    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13670    as_fn_arith $ac_count + 1 && ac_count=$as_val
13671    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13672      # Best one so far, save it but keep looking for a better one
13673      ac_cv_path_EGREP="$ac_path_EGREP"
13674      ac_path_EGREP_max=$ac_count
13675    fi
13676    # 10*(2^10) chars as input seems more than enough
13677    test $ac_count -gt 10 && break
13678  done
13679  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13680esac
13681
13682      $ac_path_EGREP_found && break 3
13683    done
13684  done
13685  done
13686IFS=$as_save_IFS
13687  if test -z "$ac_cv_path_EGREP"; then
13688    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13689  fi
13690else
13691  ac_cv_path_EGREP=$EGREP
13692fi
13693
13694   fi
13695fi
13696{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13697$as_echo "$ac_cv_path_EGREP" >&6; }
13698 EGREP="$ac_cv_path_EGREP"
13699
13700
13701    else
13702      # If it succeeded, then it was overridden by the user. We will use it
13703      # for the tool.
13704
13705      # First remove it from the list of overridden variables, so we can test
13706      # for unknown variables in the end.
13707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13708
13709      # Check if we try to supply an empty value
13710      if test "x$EGREP" = x; then
13711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13712$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13714$as_echo_n "checking for EGREP... " >&6; }
13715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13716$as_echo "disabled" >&6; }
13717      else
13718        # Check if the provided tool contains a complete path.
13719        tool_specified="$EGREP"
13720        tool_basename="${tool_specified##*/}"
13721        if test "x$tool_basename" = "x$tool_specified"; then
13722          # A command without a complete path is provided, search $PATH.
13723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13724$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13725          # Extract the first word of "$tool_basename", so it can be a program name with args.
13726set dummy $tool_basename; ac_word=$2
13727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13728$as_echo_n "checking for $ac_word... " >&6; }
13729if ${ac_cv_path_EGREP+:} false; then :
13730  $as_echo_n "(cached) " >&6
13731else
13732  case $EGREP in
13733  [\\/]* | ?:[\\/]*)
13734  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13735  ;;
13736  *)
13737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13738for as_dir in $PATH
13739do
13740  IFS=$as_save_IFS
13741  test -z "$as_dir" && as_dir=.
13742    for ac_exec_ext in '' $ac_executable_extensions; do
13743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13744    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13746    break 2
13747  fi
13748done
13749  done
13750IFS=$as_save_IFS
13751
13752  ;;
13753esac
13754fi
13755EGREP=$ac_cv_path_EGREP
13756if test -n "$EGREP"; then
13757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13758$as_echo "$EGREP" >&6; }
13759else
13760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13761$as_echo "no" >&6; }
13762fi
13763
13764
13765          if test "x$EGREP" = x; then
13766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13767          fi
13768        else
13769          # Otherwise we believe it is a complete path. Use it as it is.
13770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13771$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13773$as_echo_n "checking for EGREP... " >&6; }
13774          if test ! -x "$tool_specified"; then
13775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13776$as_echo "not found" >&6; }
13777            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13778          fi
13779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13780$as_echo "$tool_specified" >&6; }
13781        fi
13782      fi
13783    fi
13784
13785  fi
13786
13787
13788  if test "x$EGREP" = x; then
13789    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13790  fi
13791
13792
13793
13794
13795  # Publish this variable in the help.
13796
13797
13798  if [ -z "${FGREP+x}" ]; then
13799    # The variable is not set by user, try to locate tool using the code snippet
13800    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13801$as_echo_n "checking for fgrep... " >&6; }
13802if ${ac_cv_path_FGREP+:} false; then :
13803  $as_echo_n "(cached) " >&6
13804else
13805  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13806   then ac_cv_path_FGREP="$GREP -F"
13807   else
13808     if test -z "$FGREP"; then
13809  ac_path_FGREP_found=false
13810  # Loop through the user's path and test for each of PROGNAME-LIST
13811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13812for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13813do
13814  IFS=$as_save_IFS
13815  test -z "$as_dir" && as_dir=.
13816    for ac_prog in fgrep; do
13817    for ac_exec_ext in '' $ac_executable_extensions; do
13818      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13819      as_fn_executable_p "$ac_path_FGREP" || continue
13820# Check for GNU ac_path_FGREP and select it if it is found.
13821  # Check for GNU $ac_path_FGREP
13822case `"$ac_path_FGREP" --version 2>&1` in
13823*GNU*)
13824  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13825*)
13826  ac_count=0
13827  $as_echo_n 0123456789 >"conftest.in"
13828  while :
13829  do
13830    cat "conftest.in" "conftest.in" >"conftest.tmp"
13831    mv "conftest.tmp" "conftest.in"
13832    cp "conftest.in" "conftest.nl"
13833    $as_echo 'FGREP' >> "conftest.nl"
13834    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13835    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13836    as_fn_arith $ac_count + 1 && ac_count=$as_val
13837    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13838      # Best one so far, save it but keep looking for a better one
13839      ac_cv_path_FGREP="$ac_path_FGREP"
13840      ac_path_FGREP_max=$ac_count
13841    fi
13842    # 10*(2^10) chars as input seems more than enough
13843    test $ac_count -gt 10 && break
13844  done
13845  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13846esac
13847
13848      $ac_path_FGREP_found && break 3
13849    done
13850  done
13851  done
13852IFS=$as_save_IFS
13853  if test -z "$ac_cv_path_FGREP"; then
13854    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13855  fi
13856else
13857  ac_cv_path_FGREP=$FGREP
13858fi
13859
13860   fi
13861fi
13862{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13863$as_echo "$ac_cv_path_FGREP" >&6; }
13864 FGREP="$ac_cv_path_FGREP"
13865
13866
13867  else
13868    # The variable is set, but is it from the command line or the environment?
13869
13870    # Try to remove the string !FGREP! from our list.
13871    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13872    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13873      # If it failed, the variable was not from the command line. Ignore it,
13874      # but warn the user (except for BASH, which is always set by the calling BASH).
13875      if test "xFGREP" != xBASH; then
13876        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13877$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13878      fi
13879      # Try to locate tool using the code snippet
13880      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13881$as_echo_n "checking for fgrep... " >&6; }
13882if ${ac_cv_path_FGREP+:} false; then :
13883  $as_echo_n "(cached) " >&6
13884else
13885  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13886   then ac_cv_path_FGREP="$GREP -F"
13887   else
13888     if test -z "$FGREP"; then
13889  ac_path_FGREP_found=false
13890  # Loop through the user's path and test for each of PROGNAME-LIST
13891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13892for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13893do
13894  IFS=$as_save_IFS
13895  test -z "$as_dir" && as_dir=.
13896    for ac_prog in fgrep; do
13897    for ac_exec_ext in '' $ac_executable_extensions; do
13898      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13899      as_fn_executable_p "$ac_path_FGREP" || continue
13900# Check for GNU ac_path_FGREP and select it if it is found.
13901  # Check for GNU $ac_path_FGREP
13902case `"$ac_path_FGREP" --version 2>&1` in
13903*GNU*)
13904  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13905*)
13906  ac_count=0
13907  $as_echo_n 0123456789 >"conftest.in"
13908  while :
13909  do
13910    cat "conftest.in" "conftest.in" >"conftest.tmp"
13911    mv "conftest.tmp" "conftest.in"
13912    cp "conftest.in" "conftest.nl"
13913    $as_echo 'FGREP' >> "conftest.nl"
13914    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13915    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13916    as_fn_arith $ac_count + 1 && ac_count=$as_val
13917    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13918      # Best one so far, save it but keep looking for a better one
13919      ac_cv_path_FGREP="$ac_path_FGREP"
13920      ac_path_FGREP_max=$ac_count
13921    fi
13922    # 10*(2^10) chars as input seems more than enough
13923    test $ac_count -gt 10 && break
13924  done
13925  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13926esac
13927
13928      $ac_path_FGREP_found && break 3
13929    done
13930  done
13931  done
13932IFS=$as_save_IFS
13933  if test -z "$ac_cv_path_FGREP"; then
13934    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13935  fi
13936else
13937  ac_cv_path_FGREP=$FGREP
13938fi
13939
13940   fi
13941fi
13942{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13943$as_echo "$ac_cv_path_FGREP" >&6; }
13944 FGREP="$ac_cv_path_FGREP"
13945
13946
13947    else
13948      # If it succeeded, then it was overridden by the user. We will use it
13949      # for the tool.
13950
13951      # First remove it from the list of overridden variables, so we can test
13952      # for unknown variables in the end.
13953      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13954
13955      # Check if we try to supply an empty value
13956      if test "x$FGREP" = x; then
13957        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13958$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13959        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13960$as_echo_n "checking for FGREP... " >&6; }
13961        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13962$as_echo "disabled" >&6; }
13963      else
13964        # Check if the provided tool contains a complete path.
13965        tool_specified="$FGREP"
13966        tool_basename="${tool_specified##*/}"
13967        if test "x$tool_basename" = "x$tool_specified"; then
13968          # A command without a complete path is provided, search $PATH.
13969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13970$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13971          # Extract the first word of "$tool_basename", so it can be a program name with args.
13972set dummy $tool_basename; ac_word=$2
13973{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13974$as_echo_n "checking for $ac_word... " >&6; }
13975if ${ac_cv_path_FGREP+:} false; then :
13976  $as_echo_n "(cached) " >&6
13977else
13978  case $FGREP in
13979  [\\/]* | ?:[\\/]*)
13980  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13981  ;;
13982  *)
13983  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13984for as_dir in $PATH
13985do
13986  IFS=$as_save_IFS
13987  test -z "$as_dir" && as_dir=.
13988    for ac_exec_ext in '' $ac_executable_extensions; do
13989  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13990    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13991    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13992    break 2
13993  fi
13994done
13995  done
13996IFS=$as_save_IFS
13997
13998  ;;
13999esac
14000fi
14001FGREP=$ac_cv_path_FGREP
14002if test -n "$FGREP"; then
14003  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
14004$as_echo "$FGREP" >&6; }
14005else
14006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14007$as_echo "no" >&6; }
14008fi
14009
14010
14011          if test "x$FGREP" = x; then
14012            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14013          fi
14014        else
14015          # Otherwise we believe it is a complete path. Use it as it is.
14016          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
14017$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
14018          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
14019$as_echo_n "checking for FGREP... " >&6; }
14020          if test ! -x "$tool_specified"; then
14021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14022$as_echo "not found" >&6; }
14023            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
14024          fi
14025          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14026$as_echo "$tool_specified" >&6; }
14027        fi
14028      fi
14029    fi
14030
14031  fi
14032
14033
14034  if test "x$FGREP" = x; then
14035    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
14036  fi
14037
14038
14039
14040
14041  # Publish this variable in the help.
14042
14043
14044  if [ -z "${SED+x}" ]; then
14045    # The variable is not set by user, try to locate tool using the code snippet
14046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14047$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14048if ${ac_cv_path_SED+:} false; then :
14049  $as_echo_n "(cached) " >&6
14050else
14051            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14052     for ac_i in 1 2 3 4 5 6 7; do
14053       ac_script="$ac_script$as_nl$ac_script"
14054     done
14055     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14056     { ac_script=; unset ac_script;}
14057     if test -z "$SED"; then
14058  ac_path_SED_found=false
14059  # Loop through the user's path and test for each of PROGNAME-LIST
14060  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14061for as_dir in $PATH
14062do
14063  IFS=$as_save_IFS
14064  test -z "$as_dir" && as_dir=.
14065    for ac_prog in sed gsed; do
14066    for ac_exec_ext in '' $ac_executable_extensions; do
14067      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14068      as_fn_executable_p "$ac_path_SED" || continue
14069# Check for GNU ac_path_SED and select it if it is found.
14070  # Check for GNU $ac_path_SED
14071case `"$ac_path_SED" --version 2>&1` in
14072*GNU*)
14073  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14074*)
14075  ac_count=0
14076  $as_echo_n 0123456789 >"conftest.in"
14077  while :
14078  do
14079    cat "conftest.in" "conftest.in" >"conftest.tmp"
14080    mv "conftest.tmp" "conftest.in"
14081    cp "conftest.in" "conftest.nl"
14082    $as_echo '' >> "conftest.nl"
14083    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14084    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14085    as_fn_arith $ac_count + 1 && ac_count=$as_val
14086    if test $ac_count -gt ${ac_path_SED_max-0}; then
14087      # Best one so far, save it but keep looking for a better one
14088      ac_cv_path_SED="$ac_path_SED"
14089      ac_path_SED_max=$ac_count
14090    fi
14091    # 10*(2^10) chars as input seems more than enough
14092    test $ac_count -gt 10 && break
14093  done
14094  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14095esac
14096
14097      $ac_path_SED_found && break 3
14098    done
14099  done
14100  done
14101IFS=$as_save_IFS
14102  if test -z "$ac_cv_path_SED"; then
14103    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14104  fi
14105else
14106  ac_cv_path_SED=$SED
14107fi
14108
14109fi
14110{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14111$as_echo "$ac_cv_path_SED" >&6; }
14112 SED="$ac_cv_path_SED"
14113  rm -f conftest.sed
14114
14115  else
14116    # The variable is set, but is it from the command line or the environment?
14117
14118    # Try to remove the string !SED! from our list.
14119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
14120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14121      # If it failed, the variable was not from the command line. Ignore it,
14122      # but warn the user (except for BASH, which is always set by the calling BASH).
14123      if test "xSED" != xBASH; then
14124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
14125$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
14126      fi
14127      # Try to locate tool using the code snippet
14128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
14129$as_echo_n "checking for a sed that does not truncate output... " >&6; }
14130if ${ac_cv_path_SED+:} false; then :
14131  $as_echo_n "(cached) " >&6
14132else
14133            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
14134     for ac_i in 1 2 3 4 5 6 7; do
14135       ac_script="$ac_script$as_nl$ac_script"
14136     done
14137     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
14138     { ac_script=; unset ac_script;}
14139     if test -z "$SED"; then
14140  ac_path_SED_found=false
14141  # Loop through the user's path and test for each of PROGNAME-LIST
14142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14143for as_dir in $PATH
14144do
14145  IFS=$as_save_IFS
14146  test -z "$as_dir" && as_dir=.
14147    for ac_prog in sed gsed; do
14148    for ac_exec_ext in '' $ac_executable_extensions; do
14149      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
14150      as_fn_executable_p "$ac_path_SED" || continue
14151# Check for GNU ac_path_SED and select it if it is found.
14152  # Check for GNU $ac_path_SED
14153case `"$ac_path_SED" --version 2>&1` in
14154*GNU*)
14155  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
14156*)
14157  ac_count=0
14158  $as_echo_n 0123456789 >"conftest.in"
14159  while :
14160  do
14161    cat "conftest.in" "conftest.in" >"conftest.tmp"
14162    mv "conftest.tmp" "conftest.in"
14163    cp "conftest.in" "conftest.nl"
14164    $as_echo '' >> "conftest.nl"
14165    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
14166    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
14167    as_fn_arith $ac_count + 1 && ac_count=$as_val
14168    if test $ac_count -gt ${ac_path_SED_max-0}; then
14169      # Best one so far, save it but keep looking for a better one
14170      ac_cv_path_SED="$ac_path_SED"
14171      ac_path_SED_max=$ac_count
14172    fi
14173    # 10*(2^10) chars as input seems more than enough
14174    test $ac_count -gt 10 && break
14175  done
14176  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
14177esac
14178
14179      $ac_path_SED_found && break 3
14180    done
14181  done
14182  done
14183IFS=$as_save_IFS
14184  if test -z "$ac_cv_path_SED"; then
14185    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
14186  fi
14187else
14188  ac_cv_path_SED=$SED
14189fi
14190
14191fi
14192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
14193$as_echo "$ac_cv_path_SED" >&6; }
14194 SED="$ac_cv_path_SED"
14195  rm -f conftest.sed
14196
14197    else
14198      # If it succeeded, then it was overridden by the user. We will use it
14199      # for the tool.
14200
14201      # First remove it from the list of overridden variables, so we can test
14202      # for unknown variables in the end.
14203      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14204
14205      # Check if we try to supply an empty value
14206      if test "x$SED" = x; then
14207        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
14208$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
14209        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14210$as_echo_n "checking for SED... " >&6; }
14211        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14212$as_echo "disabled" >&6; }
14213      else
14214        # Check if the provided tool contains a complete path.
14215        tool_specified="$SED"
14216        tool_basename="${tool_specified##*/}"
14217        if test "x$tool_basename" = "x$tool_specified"; then
14218          # A command without a complete path is provided, search $PATH.
14219          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
14220$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
14221          # Extract the first word of "$tool_basename", so it can be a program name with args.
14222set dummy $tool_basename; ac_word=$2
14223{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14224$as_echo_n "checking for $ac_word... " >&6; }
14225if ${ac_cv_path_SED+:} false; then :
14226  $as_echo_n "(cached) " >&6
14227else
14228  case $SED in
14229  [\\/]* | ?:[\\/]*)
14230  ac_cv_path_SED="$SED" # Let the user override the test with a path.
14231  ;;
14232  *)
14233  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14234for as_dir in $PATH
14235do
14236  IFS=$as_save_IFS
14237  test -z "$as_dir" && as_dir=.
14238    for ac_exec_ext in '' $ac_executable_extensions; do
14239  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14240    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
14241    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14242    break 2
14243  fi
14244done
14245  done
14246IFS=$as_save_IFS
14247
14248  ;;
14249esac
14250fi
14251SED=$ac_cv_path_SED
14252if test -n "$SED"; then
14253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
14254$as_echo "$SED" >&6; }
14255else
14256  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14257$as_echo "no" >&6; }
14258fi
14259
14260
14261          if test "x$SED" = x; then
14262            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14263          fi
14264        else
14265          # Otherwise we believe it is a complete path. Use it as it is.
14266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
14267$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
14268          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
14269$as_echo_n "checking for SED... " >&6; }
14270          if test ! -x "$tool_specified"; then
14271            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14272$as_echo "not found" >&6; }
14273            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
14274          fi
14275          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14276$as_echo "$tool_specified" >&6; }
14277        fi
14278      fi
14279    fi
14280
14281  fi
14282
14283
14284  if test "x$SED" = x; then
14285    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
14286  fi
14287
14288
14289
14290  # Always force rm.
14291  RM="$RM -f"
14292
14293  # pwd behaves differently on various platforms and some don't support the -L flag.
14294  # Always use the bash builtin pwd to get uniform behavior.
14295  THEPWDCMD=pwd
14296
14297  # These are not required on all platforms
14298
14299
14300  # Publish this variable in the help.
14301
14302
14303  if [ -z "${CYGPATH+x}" ]; then
14304    # The variable is not set by user, try to locate tool using the code snippet
14305    for ac_prog in cygpath
14306do
14307  # Extract the first word of "$ac_prog", so it can be a program name with args.
14308set dummy $ac_prog; ac_word=$2
14309{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14310$as_echo_n "checking for $ac_word... " >&6; }
14311if ${ac_cv_path_CYGPATH+:} false; then :
14312  $as_echo_n "(cached) " >&6
14313else
14314  case $CYGPATH in
14315  [\\/]* | ?:[\\/]*)
14316  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14317  ;;
14318  *)
14319  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14320for as_dir in $PATH
14321do
14322  IFS=$as_save_IFS
14323  test -z "$as_dir" && as_dir=.
14324    for ac_exec_ext in '' $ac_executable_extensions; do
14325  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14326    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14327    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14328    break 2
14329  fi
14330done
14331  done
14332IFS=$as_save_IFS
14333
14334  ;;
14335esac
14336fi
14337CYGPATH=$ac_cv_path_CYGPATH
14338if test -n "$CYGPATH"; then
14339  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14340$as_echo "$CYGPATH" >&6; }
14341else
14342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14343$as_echo "no" >&6; }
14344fi
14345
14346
14347  test -n "$CYGPATH" && break
14348done
14349
14350  else
14351    # The variable is set, but is it from the command line or the environment?
14352
14353    # Try to remove the string !CYGPATH! from our list.
14354    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
14355    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14356      # If it failed, the variable was not from the command line. Ignore it,
14357      # but warn the user (except for BASH, which is always set by the calling BASH).
14358      if test "xCYGPATH" != xBASH; then
14359        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
14360$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
14361      fi
14362      # Try to locate tool using the code snippet
14363      for ac_prog in cygpath
14364do
14365  # Extract the first word of "$ac_prog", so it can be a program name with args.
14366set dummy $ac_prog; ac_word=$2
14367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14368$as_echo_n "checking for $ac_word... " >&6; }
14369if ${ac_cv_path_CYGPATH+:} false; then :
14370  $as_echo_n "(cached) " >&6
14371else
14372  case $CYGPATH in
14373  [\\/]* | ?:[\\/]*)
14374  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14375  ;;
14376  *)
14377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14378for as_dir in $PATH
14379do
14380  IFS=$as_save_IFS
14381  test -z "$as_dir" && as_dir=.
14382    for ac_exec_ext in '' $ac_executable_extensions; do
14383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14384    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14386    break 2
14387  fi
14388done
14389  done
14390IFS=$as_save_IFS
14391
14392  ;;
14393esac
14394fi
14395CYGPATH=$ac_cv_path_CYGPATH
14396if test -n "$CYGPATH"; then
14397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14398$as_echo "$CYGPATH" >&6; }
14399else
14400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14401$as_echo "no" >&6; }
14402fi
14403
14404
14405  test -n "$CYGPATH" && break
14406done
14407
14408    else
14409      # If it succeeded, then it was overridden by the user. We will use it
14410      # for the tool.
14411
14412      # First remove it from the list of overridden variables, so we can test
14413      # for unknown variables in the end.
14414      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14415
14416      # Check if we try to supply an empty value
14417      if test "x$CYGPATH" = x; then
14418        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
14419$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
14420        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14421$as_echo_n "checking for CYGPATH... " >&6; }
14422        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14423$as_echo "disabled" >&6; }
14424      else
14425        # Check if the provided tool contains a complete path.
14426        tool_specified="$CYGPATH"
14427        tool_basename="${tool_specified##*/}"
14428        if test "x$tool_basename" = "x$tool_specified"; then
14429          # A command without a complete path is provided, search $PATH.
14430          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14431$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14432          # Extract the first word of "$tool_basename", so it can be a program name with args.
14433set dummy $tool_basename; ac_word=$2
14434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14435$as_echo_n "checking for $ac_word... " >&6; }
14436if ${ac_cv_path_CYGPATH+:} false; then :
14437  $as_echo_n "(cached) " >&6
14438else
14439  case $CYGPATH in
14440  [\\/]* | ?:[\\/]*)
14441  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14442  ;;
14443  *)
14444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14445for as_dir in $PATH
14446do
14447  IFS=$as_save_IFS
14448  test -z "$as_dir" && as_dir=.
14449    for ac_exec_ext in '' $ac_executable_extensions; do
14450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14451    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14453    break 2
14454  fi
14455done
14456  done
14457IFS=$as_save_IFS
14458
14459  ;;
14460esac
14461fi
14462CYGPATH=$ac_cv_path_CYGPATH
14463if test -n "$CYGPATH"; then
14464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14465$as_echo "$CYGPATH" >&6; }
14466else
14467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14468$as_echo "no" >&6; }
14469fi
14470
14471
14472          if test "x$CYGPATH" = x; then
14473            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14474          fi
14475        else
14476          # Otherwise we believe it is a complete path. Use it as it is.
14477          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14478$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14479          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14480$as_echo_n "checking for CYGPATH... " >&6; }
14481          if test ! -x "$tool_specified"; then
14482            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14483$as_echo "not found" >&6; }
14484            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14485          fi
14486          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14487$as_echo "$tool_specified" >&6; }
14488        fi
14489      fi
14490    fi
14491
14492  fi
14493
14494
14495
14496
14497  # Publish this variable in the help.
14498
14499
14500  if [ -z "${READLINK+x}" ]; then
14501    # The variable is not set by user, try to locate tool using the code snippet
14502    for ac_prog in greadlink readlink
14503do
14504  # Extract the first word of "$ac_prog", so it can be a program name with args.
14505set dummy $ac_prog; ac_word=$2
14506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14507$as_echo_n "checking for $ac_word... " >&6; }
14508if ${ac_cv_path_READLINK+:} false; then :
14509  $as_echo_n "(cached) " >&6
14510else
14511  case $READLINK in
14512  [\\/]* | ?:[\\/]*)
14513  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14514  ;;
14515  *)
14516  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14517for as_dir in $PATH
14518do
14519  IFS=$as_save_IFS
14520  test -z "$as_dir" && as_dir=.
14521    for ac_exec_ext in '' $ac_executable_extensions; do
14522  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14523    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14524    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14525    break 2
14526  fi
14527done
14528  done
14529IFS=$as_save_IFS
14530
14531  ;;
14532esac
14533fi
14534READLINK=$ac_cv_path_READLINK
14535if test -n "$READLINK"; then
14536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14537$as_echo "$READLINK" >&6; }
14538else
14539  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14540$as_echo "no" >&6; }
14541fi
14542
14543
14544  test -n "$READLINK" && break
14545done
14546
14547  else
14548    # The variable is set, but is it from the command line or the environment?
14549
14550    # Try to remove the string !READLINK! from our list.
14551    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14552    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14553      # If it failed, the variable was not from the command line. Ignore it,
14554      # but warn the user (except for BASH, which is always set by the calling BASH).
14555      if test "xREADLINK" != xBASH; then
14556        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14557$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14558      fi
14559      # Try to locate tool using the code snippet
14560      for ac_prog in greadlink readlink
14561do
14562  # Extract the first word of "$ac_prog", so it can be a program name with args.
14563set dummy $ac_prog; ac_word=$2
14564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14565$as_echo_n "checking for $ac_word... " >&6; }
14566if ${ac_cv_path_READLINK+:} false; then :
14567  $as_echo_n "(cached) " >&6
14568else
14569  case $READLINK in
14570  [\\/]* | ?:[\\/]*)
14571  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14572  ;;
14573  *)
14574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14575for as_dir in $PATH
14576do
14577  IFS=$as_save_IFS
14578  test -z "$as_dir" && as_dir=.
14579    for ac_exec_ext in '' $ac_executable_extensions; do
14580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14581    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14583    break 2
14584  fi
14585done
14586  done
14587IFS=$as_save_IFS
14588
14589  ;;
14590esac
14591fi
14592READLINK=$ac_cv_path_READLINK
14593if test -n "$READLINK"; then
14594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14595$as_echo "$READLINK" >&6; }
14596else
14597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14598$as_echo "no" >&6; }
14599fi
14600
14601
14602  test -n "$READLINK" && break
14603done
14604
14605    else
14606      # If it succeeded, then it was overridden by the user. We will use it
14607      # for the tool.
14608
14609      # First remove it from the list of overridden variables, so we can test
14610      # for unknown variables in the end.
14611      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14612
14613      # Check if we try to supply an empty value
14614      if test "x$READLINK" = x; then
14615        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14616$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14617        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14618$as_echo_n "checking for READLINK... " >&6; }
14619        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14620$as_echo "disabled" >&6; }
14621      else
14622        # Check if the provided tool contains a complete path.
14623        tool_specified="$READLINK"
14624        tool_basename="${tool_specified##*/}"
14625        if test "x$tool_basename" = "x$tool_specified"; then
14626          # A command without a complete path is provided, search $PATH.
14627          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14628$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14629          # Extract the first word of "$tool_basename", so it can be a program name with args.
14630set dummy $tool_basename; ac_word=$2
14631{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14632$as_echo_n "checking for $ac_word... " >&6; }
14633if ${ac_cv_path_READLINK+:} false; then :
14634  $as_echo_n "(cached) " >&6
14635else
14636  case $READLINK in
14637  [\\/]* | ?:[\\/]*)
14638  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14639  ;;
14640  *)
14641  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14642for as_dir in $PATH
14643do
14644  IFS=$as_save_IFS
14645  test -z "$as_dir" && as_dir=.
14646    for ac_exec_ext in '' $ac_executable_extensions; do
14647  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14648    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14649    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14650    break 2
14651  fi
14652done
14653  done
14654IFS=$as_save_IFS
14655
14656  ;;
14657esac
14658fi
14659READLINK=$ac_cv_path_READLINK
14660if test -n "$READLINK"; then
14661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14662$as_echo "$READLINK" >&6; }
14663else
14664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14665$as_echo "no" >&6; }
14666fi
14667
14668
14669          if test "x$READLINK" = x; then
14670            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14671          fi
14672        else
14673          # Otherwise we believe it is a complete path. Use it as it is.
14674          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14675$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14676          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14677$as_echo_n "checking for READLINK... " >&6; }
14678          if test ! -x "$tool_specified"; then
14679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14680$as_echo "not found" >&6; }
14681            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14682          fi
14683          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14684$as_echo "$tool_specified" >&6; }
14685        fi
14686      fi
14687    fi
14688
14689  fi
14690
14691
14692
14693
14694  # Publish this variable in the help.
14695
14696
14697  if [ -z "${DF+x}" ]; then
14698    # The variable is not set by user, try to locate tool using the code snippet
14699    for ac_prog in df
14700do
14701  # Extract the first word of "$ac_prog", so it can be a program name with args.
14702set dummy $ac_prog; ac_word=$2
14703{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14704$as_echo_n "checking for $ac_word... " >&6; }
14705if ${ac_cv_path_DF+:} false; then :
14706  $as_echo_n "(cached) " >&6
14707else
14708  case $DF in
14709  [\\/]* | ?:[\\/]*)
14710  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14711  ;;
14712  *)
14713  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14714for as_dir in $PATH
14715do
14716  IFS=$as_save_IFS
14717  test -z "$as_dir" && as_dir=.
14718    for ac_exec_ext in '' $ac_executable_extensions; do
14719  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14720    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14721    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14722    break 2
14723  fi
14724done
14725  done
14726IFS=$as_save_IFS
14727
14728  ;;
14729esac
14730fi
14731DF=$ac_cv_path_DF
14732if test -n "$DF"; then
14733  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14734$as_echo "$DF" >&6; }
14735else
14736  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14737$as_echo "no" >&6; }
14738fi
14739
14740
14741  test -n "$DF" && break
14742done
14743
14744  else
14745    # The variable is set, but is it from the command line or the environment?
14746
14747    # Try to remove the string !DF! from our list.
14748    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14749    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14750      # If it failed, the variable was not from the command line. Ignore it,
14751      # but warn the user (except for BASH, which is always set by the calling BASH).
14752      if test "xDF" != xBASH; then
14753        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14754$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14755      fi
14756      # Try to locate tool using the code snippet
14757      for ac_prog in df
14758do
14759  # Extract the first word of "$ac_prog", so it can be a program name with args.
14760set dummy $ac_prog; ac_word=$2
14761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14762$as_echo_n "checking for $ac_word... " >&6; }
14763if ${ac_cv_path_DF+:} false; then :
14764  $as_echo_n "(cached) " >&6
14765else
14766  case $DF in
14767  [\\/]* | ?:[\\/]*)
14768  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14769  ;;
14770  *)
14771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14772for as_dir in $PATH
14773do
14774  IFS=$as_save_IFS
14775  test -z "$as_dir" && as_dir=.
14776    for ac_exec_ext in '' $ac_executable_extensions; do
14777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14778    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14780    break 2
14781  fi
14782done
14783  done
14784IFS=$as_save_IFS
14785
14786  ;;
14787esac
14788fi
14789DF=$ac_cv_path_DF
14790if test -n "$DF"; then
14791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14792$as_echo "$DF" >&6; }
14793else
14794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14795$as_echo "no" >&6; }
14796fi
14797
14798
14799  test -n "$DF" && break
14800done
14801
14802    else
14803      # If it succeeded, then it was overridden by the user. We will use it
14804      # for the tool.
14805
14806      # First remove it from the list of overridden variables, so we can test
14807      # for unknown variables in the end.
14808      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14809
14810      # Check if we try to supply an empty value
14811      if test "x$DF" = x; then
14812        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14813$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14814        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14815$as_echo_n "checking for DF... " >&6; }
14816        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14817$as_echo "disabled" >&6; }
14818      else
14819        # Check if the provided tool contains a complete path.
14820        tool_specified="$DF"
14821        tool_basename="${tool_specified##*/}"
14822        if test "x$tool_basename" = "x$tool_specified"; then
14823          # A command without a complete path is provided, search $PATH.
14824          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14825$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14826          # Extract the first word of "$tool_basename", so it can be a program name with args.
14827set dummy $tool_basename; ac_word=$2
14828{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14829$as_echo_n "checking for $ac_word... " >&6; }
14830if ${ac_cv_path_DF+:} false; then :
14831  $as_echo_n "(cached) " >&6
14832else
14833  case $DF in
14834  [\\/]* | ?:[\\/]*)
14835  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14836  ;;
14837  *)
14838  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14839for as_dir in $PATH
14840do
14841  IFS=$as_save_IFS
14842  test -z "$as_dir" && as_dir=.
14843    for ac_exec_ext in '' $ac_executable_extensions; do
14844  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14845    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14846    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14847    break 2
14848  fi
14849done
14850  done
14851IFS=$as_save_IFS
14852
14853  ;;
14854esac
14855fi
14856DF=$ac_cv_path_DF
14857if test -n "$DF"; then
14858  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14859$as_echo "$DF" >&6; }
14860else
14861  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14862$as_echo "no" >&6; }
14863fi
14864
14865
14866          if test "x$DF" = x; then
14867            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14868          fi
14869        else
14870          # Otherwise we believe it is a complete path. Use it as it is.
14871          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14872$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14873          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14874$as_echo_n "checking for DF... " >&6; }
14875          if test ! -x "$tool_specified"; then
14876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14877$as_echo "not found" >&6; }
14878            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14879          fi
14880          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14881$as_echo "$tool_specified" >&6; }
14882        fi
14883      fi
14884    fi
14885
14886  fi
14887
14888
14889
14890
14891  # Publish this variable in the help.
14892
14893
14894  if [ -z "${CPIO+x}" ]; then
14895    # The variable is not set by user, try to locate tool using the code snippet
14896    for ac_prog in cpio bsdcpio
14897do
14898  # Extract the first word of "$ac_prog", so it can be a program name with args.
14899set dummy $ac_prog; ac_word=$2
14900{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14901$as_echo_n "checking for $ac_word... " >&6; }
14902if ${ac_cv_path_CPIO+:} false; then :
14903  $as_echo_n "(cached) " >&6
14904else
14905  case $CPIO in
14906  [\\/]* | ?:[\\/]*)
14907  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14908  ;;
14909  *)
14910  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14911for as_dir in $PATH
14912do
14913  IFS=$as_save_IFS
14914  test -z "$as_dir" && as_dir=.
14915    for ac_exec_ext in '' $ac_executable_extensions; do
14916  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14917    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14918    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14919    break 2
14920  fi
14921done
14922  done
14923IFS=$as_save_IFS
14924
14925  ;;
14926esac
14927fi
14928CPIO=$ac_cv_path_CPIO
14929if test -n "$CPIO"; then
14930  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14931$as_echo "$CPIO" >&6; }
14932else
14933  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14934$as_echo "no" >&6; }
14935fi
14936
14937
14938  test -n "$CPIO" && break
14939done
14940
14941  else
14942    # The variable is set, but is it from the command line or the environment?
14943
14944    # Try to remove the string !CPIO! from our list.
14945    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14946    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14947      # If it failed, the variable was not from the command line. Ignore it,
14948      # but warn the user (except for BASH, which is always set by the calling BASH).
14949      if test "xCPIO" != xBASH; then
14950        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14951$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14952      fi
14953      # Try to locate tool using the code snippet
14954      for ac_prog in cpio bsdcpio
14955do
14956  # Extract the first word of "$ac_prog", so it can be a program name with args.
14957set dummy $ac_prog; ac_word=$2
14958{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14959$as_echo_n "checking for $ac_word... " >&6; }
14960if ${ac_cv_path_CPIO+:} false; then :
14961  $as_echo_n "(cached) " >&6
14962else
14963  case $CPIO in
14964  [\\/]* | ?:[\\/]*)
14965  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14966  ;;
14967  *)
14968  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14969for as_dir in $PATH
14970do
14971  IFS=$as_save_IFS
14972  test -z "$as_dir" && as_dir=.
14973    for ac_exec_ext in '' $ac_executable_extensions; do
14974  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14975    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14976    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14977    break 2
14978  fi
14979done
14980  done
14981IFS=$as_save_IFS
14982
14983  ;;
14984esac
14985fi
14986CPIO=$ac_cv_path_CPIO
14987if test -n "$CPIO"; then
14988  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14989$as_echo "$CPIO" >&6; }
14990else
14991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14992$as_echo "no" >&6; }
14993fi
14994
14995
14996  test -n "$CPIO" && break
14997done
14998
14999    else
15000      # If it succeeded, then it was overridden by the user. We will use it
15001      # for the tool.
15002
15003      # First remove it from the list of overridden variables, so we can test
15004      # for unknown variables in the end.
15005      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15006
15007      # Check if we try to supply an empty value
15008      if test "x$CPIO" = x; then
15009        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
15010$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
15011        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15012$as_echo_n "checking for CPIO... " >&6; }
15013        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15014$as_echo "disabled" >&6; }
15015      else
15016        # Check if the provided tool contains a complete path.
15017        tool_specified="$CPIO"
15018        tool_basename="${tool_specified##*/}"
15019        if test "x$tool_basename" = "x$tool_specified"; then
15020          # A command without a complete path is provided, search $PATH.
15021          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
15022$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
15023          # Extract the first word of "$tool_basename", so it can be a program name with args.
15024set dummy $tool_basename; ac_word=$2
15025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15026$as_echo_n "checking for $ac_word... " >&6; }
15027if ${ac_cv_path_CPIO+:} false; then :
15028  $as_echo_n "(cached) " >&6
15029else
15030  case $CPIO in
15031  [\\/]* | ?:[\\/]*)
15032  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
15033  ;;
15034  *)
15035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15036for as_dir in $PATH
15037do
15038  IFS=$as_save_IFS
15039  test -z "$as_dir" && as_dir=.
15040    for ac_exec_ext in '' $ac_executable_extensions; do
15041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15042    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
15043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15044    break 2
15045  fi
15046done
15047  done
15048IFS=$as_save_IFS
15049
15050  ;;
15051esac
15052fi
15053CPIO=$ac_cv_path_CPIO
15054if test -n "$CPIO"; then
15055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
15056$as_echo "$CPIO" >&6; }
15057else
15058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15059$as_echo "no" >&6; }
15060fi
15061
15062
15063          if test "x$CPIO" = x; then
15064            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15065          fi
15066        else
15067          # Otherwise we believe it is a complete path. Use it as it is.
15068          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
15069$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
15070          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
15071$as_echo_n "checking for CPIO... " >&6; }
15072          if test ! -x "$tool_specified"; then
15073            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15074$as_echo "not found" >&6; }
15075            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
15076          fi
15077          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15078$as_echo "$tool_specified" >&6; }
15079        fi
15080      fi
15081    fi
15082
15083  fi
15084
15085
15086
15087
15088  # Publish this variable in the help.
15089
15090
15091  if [ -z "${NICE+x}" ]; then
15092    # The variable is not set by user, try to locate tool using the code snippet
15093    for ac_prog in nice
15094do
15095  # Extract the first word of "$ac_prog", so it can be a program name with args.
15096set dummy $ac_prog; ac_word=$2
15097{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15098$as_echo_n "checking for $ac_word... " >&6; }
15099if ${ac_cv_path_NICE+:} false; then :
15100  $as_echo_n "(cached) " >&6
15101else
15102  case $NICE in
15103  [\\/]* | ?:[\\/]*)
15104  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15105  ;;
15106  *)
15107  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15108for as_dir in $PATH
15109do
15110  IFS=$as_save_IFS
15111  test -z "$as_dir" && as_dir=.
15112    for ac_exec_ext in '' $ac_executable_extensions; do
15113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15114    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15116    break 2
15117  fi
15118done
15119  done
15120IFS=$as_save_IFS
15121
15122  ;;
15123esac
15124fi
15125NICE=$ac_cv_path_NICE
15126if test -n "$NICE"; then
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15128$as_echo "$NICE" >&6; }
15129else
15130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15131$as_echo "no" >&6; }
15132fi
15133
15134
15135  test -n "$NICE" && break
15136done
15137
15138  else
15139    # The variable is set, but is it from the command line or the environment?
15140
15141    # Try to remove the string !NICE! from our list.
15142    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
15143    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
15144      # If it failed, the variable was not from the command line. Ignore it,
15145      # but warn the user (except for BASH, which is always set by the calling BASH).
15146      if test "xNICE" != xBASH; then
15147        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
15148$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
15149      fi
15150      # Try to locate tool using the code snippet
15151      for ac_prog in nice
15152do
15153  # Extract the first word of "$ac_prog", so it can be a program name with args.
15154set dummy $ac_prog; ac_word=$2
15155{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15156$as_echo_n "checking for $ac_word... " >&6; }
15157if ${ac_cv_path_NICE+:} false; then :
15158  $as_echo_n "(cached) " >&6
15159else
15160  case $NICE in
15161  [\\/]* | ?:[\\/]*)
15162  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15163  ;;
15164  *)
15165  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15166for as_dir in $PATH
15167do
15168  IFS=$as_save_IFS
15169  test -z "$as_dir" && as_dir=.
15170    for ac_exec_ext in '' $ac_executable_extensions; do
15171  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15172    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15173    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15174    break 2
15175  fi
15176done
15177  done
15178IFS=$as_save_IFS
15179
15180  ;;
15181esac
15182fi
15183NICE=$ac_cv_path_NICE
15184if test -n "$NICE"; then
15185  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15186$as_echo "$NICE" >&6; }
15187else
15188  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15189$as_echo "no" >&6; }
15190fi
15191
15192
15193  test -n "$NICE" && break
15194done
15195
15196    else
15197      # If it succeeded, then it was overridden by the user. We will use it
15198      # for the tool.
15199
15200      # First remove it from the list of overridden variables, so we can test
15201      # for unknown variables in the end.
15202      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
15203
15204      # Check if we try to supply an empty value
15205      if test "x$NICE" = x; then
15206        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
15207$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
15208        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15209$as_echo_n "checking for NICE... " >&6; }
15210        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
15211$as_echo "disabled" >&6; }
15212      else
15213        # Check if the provided tool contains a complete path.
15214        tool_specified="$NICE"
15215        tool_basename="${tool_specified##*/}"
15216        if test "x$tool_basename" = "x$tool_specified"; then
15217          # A command without a complete path is provided, search $PATH.
15218          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
15219$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
15220          # Extract the first word of "$tool_basename", so it can be a program name with args.
15221set dummy $tool_basename; ac_word=$2
15222{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
15223$as_echo_n "checking for $ac_word... " >&6; }
15224if ${ac_cv_path_NICE+:} false; then :
15225  $as_echo_n "(cached) " >&6
15226else
15227  case $NICE in
15228  [\\/]* | ?:[\\/]*)
15229  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
15230  ;;
15231  *)
15232  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
15233for as_dir in $PATH
15234do
15235  IFS=$as_save_IFS
15236  test -z "$as_dir" && as_dir=.
15237    for ac_exec_ext in '' $ac_executable_extensions; do
15238  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
15239    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
15240    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
15241    break 2
15242  fi
15243done
15244  done
15245IFS=$as_save_IFS
15246
15247  ;;
15248esac
15249fi
15250NICE=$ac_cv_path_NICE
15251if test -n "$NICE"; then
15252  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
15253$as_echo "$NICE" >&6; }
15254else
15255  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
15256$as_echo "no" >&6; }
15257fi
15258
15259
15260          if test "x$NICE" = x; then
15261            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
15262          fi
15263        else
15264          # Otherwise we believe it is a complete path. Use it as it is.
15265          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
15266$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
15267          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
15268$as_echo_n "checking for NICE... " >&6; }
15269          if test ! -x "$tool_specified"; then
15270            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
15271$as_echo "not found" >&6; }
15272            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
15273          fi
15274          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
15275$as_echo "$tool_specified" >&6; }
15276        fi
15277      fi
15278    fi
15279
15280  fi
15281
15282
15283
15284
15285# Now we can determine OpenJDK build and target platforms. This is required to
15286# have early on.
15287# Make sure we can run config.sub.
15288$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
15289  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
15290
15291{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
15292$as_echo_n "checking build system type... " >&6; }
15293if ${ac_cv_build+:} false; then :
15294  $as_echo_n "(cached) " >&6
15295else
15296  ac_build_alias=$build_alias
15297test "x$ac_build_alias" = x &&
15298  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
15299test "x$ac_build_alias" = x &&
15300  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
15301ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
15302  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
15303
15304fi
15305{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
15306$as_echo "$ac_cv_build" >&6; }
15307case $ac_cv_build in
15308*-*-*) ;;
15309*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
15310esac
15311build=$ac_cv_build
15312ac_save_IFS=$IFS; IFS='-'
15313set x $ac_cv_build
15314shift
15315build_cpu=$1
15316build_vendor=$2
15317shift; shift
15318# Remember, the first character of IFS is used to create $*,
15319# except with old shells:
15320build_os=$*
15321IFS=$ac_save_IFS
15322case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
15323
15324
15325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
15326$as_echo_n "checking host system type... " >&6; }
15327if ${ac_cv_host+:} false; then :
15328  $as_echo_n "(cached) " >&6
15329else
15330  if test "x$host_alias" = x; then
15331  ac_cv_host=$ac_cv_build
15332else
15333  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
15334    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
15335fi
15336
15337fi
15338{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
15339$as_echo "$ac_cv_host" >&6; }
15340case $ac_cv_host in
15341*-*-*) ;;
15342*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
15343esac
15344host=$ac_cv_host
15345ac_save_IFS=$IFS; IFS='-'
15346set x $ac_cv_host
15347shift
15348host_cpu=$1
15349host_vendor=$2
15350shift; shift
15351# Remember, the first character of IFS is used to create $*,
15352# except with old shells:
15353host_os=$*
15354IFS=$ac_save_IFS
15355case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
15356
15357
15358{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
15359$as_echo_n "checking target system type... " >&6; }
15360if ${ac_cv_target+:} false; then :
15361  $as_echo_n "(cached) " >&6
15362else
15363  if test "x$target_alias" = x; then
15364  ac_cv_target=$ac_cv_host
15365else
15366  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
15367    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
15368fi
15369
15370fi
15371{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
15372$as_echo "$ac_cv_target" >&6; }
15373case $ac_cv_target in
15374*-*-*) ;;
15375*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
15376esac
15377target=$ac_cv_target
15378ac_save_IFS=$IFS; IFS='-'
15379set x $ac_cv_target
15380shift
15381target_cpu=$1
15382target_vendor=$2
15383shift; shift
15384# Remember, the first character of IFS is used to create $*,
15385# except with old shells:
15386target_os=$*
15387IFS=$ac_save_IFS
15388case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
15389
15390
15391# The aliases save the names the user supplied, while $host etc.
15392# will get canonicalized.
15393test -n "$target_alias" &&
15394  test "$program_prefix$program_suffix$program_transform_name" = \
15395    NONENONEs,x,x, &&
15396  program_prefix=${target_alias}-
15397
15398  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
15399  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
15400  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
15401  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
15402  # to use the configure naming style.
15403
15404
15405
15406
15407
15408  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
15409  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
15410  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
15411  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
15412  OPENJDK_TARGET_AUTOCONF_NAME="$host"
15413  OPENJDK_BUILD_AUTOCONF_NAME="$build"
15414
15415
15416
15417  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15418
15419  case "$build_os" in
15420    *linux*)
15421      VAR_OS=linux
15422      VAR_OS_TYPE=unix
15423      ;;
15424    *solaris*)
15425      VAR_OS=solaris
15426      VAR_OS_TYPE=unix
15427      ;;
15428    *darwin*)
15429      VAR_OS=macosx
15430      VAR_OS_TYPE=unix
15431      ;;
15432    *bsd*)
15433      VAR_OS=bsd
15434      VAR_OS_TYPE=unix
15435      ;;
15436    *cygwin*)
15437      VAR_OS=windows
15438      VAR_OS_ENV=windows.cygwin
15439      ;;
15440    *mingw*)
15441      VAR_OS=windows
15442      VAR_OS_ENV=windows.msys
15443      ;;
15444    *aix*)
15445      VAR_OS=aix
15446      VAR_OS_TYPE=unix
15447      ;;
15448    *)
15449      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15450      ;;
15451  esac
15452
15453
15454  # First argument is the cpu name from the trip/quad
15455  case "$build_cpu" in
15456    x86_64)
15457      VAR_CPU=x86_64
15458      VAR_CPU_ARCH=x86
15459      VAR_CPU_BITS=64
15460      VAR_CPU_ENDIAN=little
15461      ;;
15462    i?86)
15463      VAR_CPU=x86
15464      VAR_CPU_ARCH=x86
15465      VAR_CPU_BITS=32
15466      VAR_CPU_ENDIAN=little
15467      ;;
15468    arm*)
15469      VAR_CPU=arm
15470      VAR_CPU_ARCH=arm
15471      VAR_CPU_BITS=32
15472      VAR_CPU_ENDIAN=little
15473      ;;
15474    aarch64)
15475      VAR_CPU=aarch64
15476      VAR_CPU_ARCH=aarch64
15477      VAR_CPU_BITS=64
15478      VAR_CPU_ENDIAN=little
15479      ;;
15480    powerpc)
15481      VAR_CPU=ppc
15482      VAR_CPU_ARCH=ppc
15483      VAR_CPU_BITS=32
15484      VAR_CPU_ENDIAN=big
15485      ;;
15486    powerpc64)
15487      VAR_CPU=ppc64
15488      VAR_CPU_ARCH=ppc
15489      VAR_CPU_BITS=64
15490      VAR_CPU_ENDIAN=big
15491      ;;
15492    powerpc64le)
15493      VAR_CPU=ppc64le
15494      VAR_CPU_ARCH=ppc
15495      VAR_CPU_BITS=64
15496      VAR_CPU_ENDIAN=little
15497      ;;
15498    s390)
15499      VAR_CPU=s390
15500      VAR_CPU_ARCH=s390
15501      VAR_CPU_BITS=32
15502      VAR_CPU_ENDIAN=big
15503      ;;
15504    s390x)
15505      VAR_CPU=s390x
15506      VAR_CPU_ARCH=s390
15507      VAR_CPU_BITS=64
15508      VAR_CPU_ENDIAN=big
15509      ;;
15510    sparc)
15511      VAR_CPU=sparc
15512      VAR_CPU_ARCH=sparc
15513      VAR_CPU_BITS=32
15514      VAR_CPU_ENDIAN=big
15515      ;;
15516    sparcv9|sparc64)
15517      VAR_CPU=sparcv9
15518      VAR_CPU_ARCH=sparc
15519      VAR_CPU_BITS=64
15520      VAR_CPU_ENDIAN=big
15521      ;;
15522    *)
15523      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15524      ;;
15525  esac
15526
15527  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15528  OPENJDK_BUILD_OS="$VAR_OS"
15529  if test "x$VAR_OS_TYPE" != x; then
15530    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15531  else
15532    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15533  fi
15534  if test "x$VAR_OS_ENV" != x; then
15535    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15536  else
15537    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15538  fi
15539  OPENJDK_BUILD_CPU="$VAR_CPU"
15540  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15541  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15542  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15543
15544
15545
15546
15547
15548
15549
15550
15551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15552$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15553  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15554$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15555
15556  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15557
15558  case "$host_os" in
15559    *linux*)
15560      VAR_OS=linux
15561      VAR_OS_TYPE=unix
15562      ;;
15563    *solaris*)
15564      VAR_OS=solaris
15565      VAR_OS_TYPE=unix
15566      ;;
15567    *darwin*)
15568      VAR_OS=macosx
15569      VAR_OS_TYPE=unix
15570      ;;
15571    *bsd*)
15572      VAR_OS=bsd
15573      VAR_OS_TYPE=unix
15574      ;;
15575    *cygwin*)
15576      VAR_OS=windows
15577      VAR_OS_ENV=windows.cygwin
15578      ;;
15579    *mingw*)
15580      VAR_OS=windows
15581      VAR_OS_ENV=windows.msys
15582      ;;
15583    *aix*)
15584      VAR_OS=aix
15585      VAR_OS_TYPE=unix
15586      ;;
15587    *)
15588      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15589      ;;
15590  esac
15591
15592
15593  # First argument is the cpu name from the trip/quad
15594  case "$host_cpu" in
15595    x86_64)
15596      VAR_CPU=x86_64
15597      VAR_CPU_ARCH=x86
15598      VAR_CPU_BITS=64
15599      VAR_CPU_ENDIAN=little
15600      ;;
15601    i?86)
15602      VAR_CPU=x86
15603      VAR_CPU_ARCH=x86
15604      VAR_CPU_BITS=32
15605      VAR_CPU_ENDIAN=little
15606      ;;
15607    arm*)
15608      VAR_CPU=arm
15609      VAR_CPU_ARCH=arm
15610      VAR_CPU_BITS=32
15611      VAR_CPU_ENDIAN=little
15612      ;;
15613    aarch64)
15614      VAR_CPU=aarch64
15615      VAR_CPU_ARCH=aarch64
15616      VAR_CPU_BITS=64
15617      VAR_CPU_ENDIAN=little
15618      ;;
15619    powerpc)
15620      VAR_CPU=ppc
15621      VAR_CPU_ARCH=ppc
15622      VAR_CPU_BITS=32
15623      VAR_CPU_ENDIAN=big
15624      ;;
15625    powerpc64)
15626      VAR_CPU=ppc64
15627      VAR_CPU_ARCH=ppc
15628      VAR_CPU_BITS=64
15629      VAR_CPU_ENDIAN=big
15630      ;;
15631    powerpc64le)
15632      VAR_CPU=ppc64le
15633      VAR_CPU_ARCH=ppc
15634      VAR_CPU_BITS=64
15635      VAR_CPU_ENDIAN=little
15636      ;;
15637    s390)
15638      VAR_CPU=s390
15639      VAR_CPU_ARCH=s390
15640      VAR_CPU_BITS=32
15641      VAR_CPU_ENDIAN=big
15642      ;;
15643    s390x)
15644      VAR_CPU=s390x
15645      VAR_CPU_ARCH=s390
15646      VAR_CPU_BITS=64
15647      VAR_CPU_ENDIAN=big
15648      ;;
15649    sparc)
15650      VAR_CPU=sparc
15651      VAR_CPU_ARCH=sparc
15652      VAR_CPU_BITS=32
15653      VAR_CPU_ENDIAN=big
15654      ;;
15655    sparcv9|sparc64)
15656      VAR_CPU=sparcv9
15657      VAR_CPU_ARCH=sparc
15658      VAR_CPU_BITS=64
15659      VAR_CPU_ENDIAN=big
15660      ;;
15661    *)
15662      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15663      ;;
15664  esac
15665
15666  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15667  OPENJDK_TARGET_OS="$VAR_OS"
15668  if test "x$VAR_OS_TYPE" != x; then
15669    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15670  else
15671    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15672  fi
15673  if test "x$VAR_OS_ENV" != x; then
15674    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15675  else
15676    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15677  fi
15678  OPENJDK_TARGET_CPU="$VAR_CPU"
15679  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15680  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15681  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15682
15683
15684
15685
15686
15687
15688
15689
15690  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15691$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15692  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15693$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15694
15695
15696
15697# Check whether --with-target-bits was given.
15698if test "${with_target_bits+set}" = set; then :
15699  withval=$with_target_bits;
15700fi
15701
15702
15703  # We have three types of compiles:
15704  # native  == normal compilation, target system == build system
15705  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15706  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15707  #
15708  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15709    # We're doing a proper cross-compilation
15710    COMPILE_TYPE="cross"
15711  else
15712    COMPILE_TYPE="native"
15713  fi
15714
15715  if test "x$with_target_bits" != x; then
15716    if test "x$COMPILE_TYPE" = "xcross"; then
15717      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15718    fi
15719
15720    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15721      # A reduced build is requested
15722      COMPILE_TYPE="reduced"
15723      OPENJDK_TARGET_CPU_BITS=32
15724      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15725        OPENJDK_TARGET_CPU=x86
15726      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15727        OPENJDK_TARGET_CPU=sparc
15728      else
15729        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15730      fi
15731    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15732      as_fn_error $? "It is not possible to use --with-target-bits=64 on a 32 bit system. Use proper cross-compilation instead." "$LINENO" 5
15733    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15734      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15735$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15736    else
15737      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15738    fi
15739  fi
15740
15741
15742  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15743$as_echo_n "checking compilation type... " >&6; }
15744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15745$as_echo "$COMPILE_TYPE" >&6; }
15746
15747
15748  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15749    REQUIRED_OS_NAME=SunOS
15750    REQUIRED_OS_VERSION=5.10
15751  fi
15752  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15753    REQUIRED_OS_NAME=Linux
15754    REQUIRED_OS_VERSION=2.6
15755  fi
15756  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15757    REQUIRED_OS_NAME=Windows
15758    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15759      REQUIRED_OS_VERSION=5.2
15760    else
15761      REQUIRED_OS_VERSION=5.1
15762    fi
15763  fi
15764  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15765    REQUIRED_OS_NAME=Darwin
15766    REQUIRED_OS_VERSION=11.2
15767  fi
15768  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15769    REQUIRED_OS_NAME=AIX
15770    REQUIRED_OS_VERSION=7.1
15771  fi
15772
15773
15774
15775
15776
15777
15778  # Also store the legacy naming of the cpu.
15779  # Ie i586 and amd64 instead of x86 and x86_64
15780  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15781  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15782    OPENJDK_TARGET_CPU_LEGACY="i586"
15783  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15784    # On all platforms except MacOSX replace x86_64 with amd64.
15785    OPENJDK_TARGET_CPU_LEGACY="amd64"
15786  fi
15787
15788
15789  # And the second legacy naming of the cpu.
15790  # Ie i386 and amd64 instead of x86 and x86_64.
15791  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15792  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15793    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15794  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15795    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15796  fi
15797
15798
15799  # This is the name of the cpu (but using i386 and amd64 instead of
15800  # x86 and x86_64, respectively), preceeded by a /, to be used when
15801  # locating libraries. On macosx, it's empty, though.
15802  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15803  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15804    OPENJDK_TARGET_CPU_LIBDIR=""
15805  fi
15806
15807
15808  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15809  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15810  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15811  OPENJDK_TARGET_CPU_ISADIR=""
15812  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15813    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15814      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15815    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15816      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15817    fi
15818  fi
15819
15820
15821  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15822  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15823  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15824    # On linux only, we replace x86 with i386.
15825    OPENJDK_TARGET_CPU_OSARCH="i386"
15826  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15827    # On all platforms except macosx, we replace x86_64 with amd64.
15828    OPENJDK_TARGET_CPU_OSARCH="amd64"
15829  fi
15830
15831
15832  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15833  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15834    OPENJDK_TARGET_CPU_JLI="i386"
15835  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15836    # On all platforms except macosx, we replace x86_64 with amd64.
15837    OPENJDK_TARGET_CPU_JLI="amd64"
15838  fi
15839  # Now setup the -D flags for building libjli.
15840  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15841  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15842    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15843      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15844    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15845      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15846    fi
15847  fi
15848
15849
15850  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15851      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15852  else
15853      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15854  fi
15855
15856
15857  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
15858  # Macosx is osx and x86_64 is x64
15859  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15860    OPENJDK_TARGET_OS_BUNDLE="osx"
15861  else
15862    OPENJDK_TARGET_OS_BUNDLE="$OPENJDK_TARGET_OS"
15863  fi
15864  if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15865    OPENJDK_TARGET_CPU_BUNDLE="x64"
15866  else
15867    OPENJDK_TARGET_CPU_BUNDLE="$OPENJDK_TARGET_CPU"
15868  fi
15869  OPENJDK_TARGET_BUNDLE_PLATFORM="${OPENJDK_TARGET_OS_BUNDLE}-${OPENJDK_TARGET_CPU_BUNDLE}"
15870
15871
15872
15873
15874  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15875    A_LP64="LP64:="
15876    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15877    # unpack200.exe
15878    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15879      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15880    fi
15881  fi
15882  LP64=$A_LP64
15883
15884
15885  if test "x$COMPILE_TYPE" = "xcross"; then
15886    # FIXME: ... or should this include reduced builds..?
15887    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15888  else
15889    DEFINE_CROSS_COMPILE_ARCH=""
15890  fi
15891
15892
15893  # Convert openjdk platform names to hotspot names
15894
15895  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15896  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15897    HOTSPOT_TARGET_OS=bsd
15898  fi
15899
15900
15901  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15902  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15903    HOTSPOT_TARGET_OS_TYPE=posix
15904  fi
15905
15906
15907  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15908  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15909    HOTSPOT_TARGET_CPU=x86_32
15910  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15911    HOTSPOT_TARGET_CPU=sparc
15912  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15913    HOTSPOT_TARGET_CPU=ppc_64
15914  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15915    HOTSPOT_TARGET_CPU=ppc_64
15916  fi
15917
15918
15919  # This is identical with OPENJDK_*, but define anyway for consistency.
15920  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15921
15922
15923  # Setup HOTSPOT_TARGET_CPU_DEFINE
15924  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15925    HOTSPOT_TARGET_CPU_DEFINE=IA32
15926  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15927    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15928  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15929    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15930  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15931    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15932  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15933    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15934  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15935    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15936
15937  # The cpu defines below are for zero, we don't support them directly.
15938  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15939    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15940  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15941    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15942  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15943    HOTSPOT_TARGET_CPU_DEFINE=S390
15944  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15945    HOTSPOT_TARGET_CPU_DEFINE=S390
15946  fi
15947
15948
15949
15950
15951  # Also store the legacy naming of the cpu.
15952  # Ie i586 and amd64 instead of x86 and x86_64
15953  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15954  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15955    OPENJDK_BUILD_CPU_LEGACY="i586"
15956  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15957    # On all platforms except MacOSX replace x86_64 with amd64.
15958    OPENJDK_BUILD_CPU_LEGACY="amd64"
15959  fi
15960
15961
15962  # And the second legacy naming of the cpu.
15963  # Ie i386 and amd64 instead of x86 and x86_64.
15964  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15965  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15966    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15967  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15968    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15969  fi
15970
15971
15972  # This is the name of the cpu (but using i386 and amd64 instead of
15973  # x86 and x86_64, respectively), preceeded by a /, to be used when
15974  # locating libraries. On macosx, it's empty, though.
15975  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15976  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15977    OPENJDK_BUILD_CPU_LIBDIR=""
15978  fi
15979
15980
15981  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15982  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15983  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15984  OPENJDK_BUILD_CPU_ISADIR=""
15985  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15986    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15987      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15988    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15989      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15990    fi
15991  fi
15992
15993
15994  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15995  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15996  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15997    # On linux only, we replace x86 with i386.
15998    OPENJDK_BUILD_CPU_OSARCH="i386"
15999  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16000    # On all platforms except macosx, we replace x86_64 with amd64.
16001    OPENJDK_BUILD_CPU_OSARCH="amd64"
16002  fi
16003
16004
16005  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
16006  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16007    OPENJDK_BUILD_CPU_JLI="i386"
16008  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16009    # On all platforms except macosx, we replace x86_64 with amd64.
16010    OPENJDK_BUILD_CPU_JLI="amd64"
16011  fi
16012  # Now setup the -D flags for building libjli.
16013  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
16014  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
16015    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
16016      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
16017    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
16018      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
16019    fi
16020  fi
16021
16022
16023  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16024      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
16025  else
16026      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
16027  fi
16028
16029
16030  # The new version string in JDK 9 also defined new naming of OS and ARCH for bundles
16031  # Macosx is osx and x86_64 is x64
16032  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16033    OPENJDK_BUILD_OS_BUNDLE="osx"
16034  else
16035    OPENJDK_BUILD_OS_BUNDLE="$OPENJDK_TARGET_OS"
16036  fi
16037  if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16038    OPENJDK_BUILD_CPU_BUNDLE="x64"
16039  else
16040    OPENJDK_BUILD_CPU_BUNDLE="$OPENJDK_BUILD_CPU"
16041  fi
16042  OPENJDK_BUILD_BUNDLE_PLATFORM="${OPENJDK_BUILD_OS_BUNDLE}-${OPENJDK_BUILD_CPU_BUNDLE}"
16043
16044
16045
16046
16047  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
16048    A_LP64="LP64:="
16049    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
16050    # unpack200.exe
16051    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
16052      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
16053    fi
16054  fi
16055  LP64=$A_LP64
16056
16057
16058  if test "x$COMPILE_TYPE" = "xcross"; then
16059    # FIXME: ... or should this include reduced builds..?
16060    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
16061  else
16062    DEFINE_CROSS_COMPILE_ARCH=""
16063  fi
16064
16065
16066  # Convert openjdk platform names to hotspot names
16067
16068  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
16069  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
16070    HOTSPOT_BUILD_OS=bsd
16071  fi
16072
16073
16074  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
16075  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
16076    HOTSPOT_BUILD_OS_TYPE=posix
16077  fi
16078
16079
16080  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
16081  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16082    HOTSPOT_BUILD_CPU=x86_32
16083  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16084    HOTSPOT_BUILD_CPU=sparc
16085  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16086    HOTSPOT_BUILD_CPU=ppc_64
16087  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16088    HOTSPOT_BUILD_CPU=ppc_64
16089  fi
16090
16091
16092  # This is identical with OPENJDK_*, but define anyway for consistency.
16093  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
16094
16095
16096  # Setup HOTSPOT_BUILD_CPU_DEFINE
16097  if test "x$OPENJDK_BUILD_CPU" = xx86; then
16098    HOTSPOT_BUILD_CPU_DEFINE=IA32
16099  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
16100    HOTSPOT_BUILD_CPU_DEFINE=AMD64
16101  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
16102    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16103  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
16104    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
16105  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
16106    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16107  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
16108    HOTSPOT_BUILD_CPU_DEFINE=PPC64
16109
16110  # The cpu defines below are for zero, we don't support them directly.
16111  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
16112    HOTSPOT_BUILD_CPU_DEFINE=SPARC
16113  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
16114    HOTSPOT_BUILD_CPU_DEFINE=PPC32
16115  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
16116    HOTSPOT_BUILD_CPU_DEFINE=S390
16117  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
16118    HOTSPOT_BUILD_CPU_DEFINE=S390
16119  fi
16120
16121
16122
16123
16124  # ZERO_ARCHDEF is used to enable architecture-specific code.
16125  # This is used in legacy hotspot build.
16126  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
16127
16128
16129
16130
16131
16132# Continue setting up basic stuff. Most remaining code require fundamental tools.
16133
16134  # Save the current directory this script was started from
16135  CURDIR="$PWD"
16136
16137  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
16138  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
16139  # was not available at that time.
16140  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
16141  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
16142    ORIGINAL_PATH="$REWRITTEN_PATH"
16143    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
16144$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
16145  fi
16146
16147  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
16148    PATH_SEP=";"
16149
16150  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
16151  if test $SRC_ROOT_LENGTH -gt 100; then
16152    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
16153  fi
16154
16155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16156    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
16157$as_echo_n "checking cygwin release... " >&6; }
16158    CYGWIN_VERSION=`$UNAME -r`
16159    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
16160$as_echo "$CYGWIN_VERSION" >&6; }
16161    WINDOWS_ENV_VENDOR='cygwin'
16162    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
16163
16164    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
16165    if test "x$CYGWIN_VERSION_OLD" != x; then
16166      { $as_echo "$as_me:${as_lineno-$LINENO}: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&5
16167$as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but at least cygwin 1.7 is required. Please upgrade." >&6;}
16168      as_fn_error $? "Cannot continue" "$LINENO" 5
16169    fi
16170    if test "x$CYGPATH" = x; then
16171      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
16172    fi
16173    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
16174$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
16175    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16176    cygwin_winpath_root=`cd / ; cmd /c cd | $GREP ".*"`
16177    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
16178    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
16179    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
16180$as_echo "$CYGWIN_ROOT_PATH" >&6; }
16181    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
16182    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
16183    if test "x$test_cygdrive_prefix" = x; then
16184      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
16185    fi
16186  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16187    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
16188$as_echo_n "checking msys release... " >&6; }
16189    MSYS_VERSION=`$UNAME -r`
16190    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
16191$as_echo "$MSYS_VERSION" >&6; }
16192
16193    WINDOWS_ENV_VENDOR='msys'
16194    WINDOWS_ENV_VERSION="$MSYS_VERSION"
16195
16196    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
16197$as_echo_n "checking msys root directory as unix-style path... " >&6; }
16198    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
16199    MSYS_ROOT_PATH=`cd / ; cmd /c cd | $GREP ".*"`
16200
16201  windows_path="$MSYS_ROOT_PATH"
16202  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16203    unix_path=`$CYGPATH -u "$windows_path"`
16204    MSYS_ROOT_PATH="$unix_path"
16205  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16206    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16207    MSYS_ROOT_PATH="$unix_path"
16208  fi
16209
16210    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
16211$as_echo "$MSYS_ROOT_PATH" >&6; }
16212    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
16213  else
16214    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
16215  fi
16216
16217  # Test if windows or unix (cygwin/msys) find is first in path.
16218  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
16219$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
16220  FIND_BINARY_OUTPUT=`find --version 2>&1`
16221  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
16222    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
16223$as_echo "unix style" >&6; }
16224  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
16225    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
16226$as_echo "Windows" >&6; }
16227    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
16228$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
16229    { $as_echo "$as_me:${as_lineno-$LINENO}: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&5
16230$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
16231    as_fn_error $? "Cannot continue" "$LINENO" 5
16232  else
16233    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
16234$as_echo "unknown" >&6; }
16235    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
16236$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
16237  fi
16238
16239  else
16240    PATH_SEP=":"
16241  fi
16242
16243
16244  # We get the top-level directory from the supporting wrappers.
16245  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
16246$as_echo_n "checking for top-level directory... " >&6; }
16247  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
16248$as_echo "$TOPDIR" >&6; }
16249
16250
16251  # Save the original version of TOPDIR for string comparisons
16252  ORIGINAL_TOPDIR="$TOPDIR"
16253
16254
16255  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
16256
16257  # Only process if variable expands to non-empty
16258
16259  if test "x$CURDIR" != x; then
16260    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16261
16262  # Input might be given as Windows format, start by converting to
16263  # unix format.
16264  path="$CURDIR"
16265  new_path=`$CYGPATH -u "$path"`
16266
16267  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16268  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16269  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16270  # "foo.exe" is OK but "foo" is an error.
16271  #
16272  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16273  # It is also a way to make sure we got the proper file name for the real test later on.
16274  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16275  if test "x$test_shortpath" = x; then
16276    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16277$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16278    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
16279  fi
16280
16281  # Call helper function which possibly converts this using DOS-style short mode.
16282  # If so, the updated path is stored in $new_path.
16283
16284  input_path="$new_path"
16285  # Check if we need to convert this using DOS-style short mode. If the path
16286  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16287  # take no chances and rewrite it.
16288  # Note: m4 eats our [], so we need to use [ and ] instead.
16289  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16290  if test "x$has_forbidden_chars" != x; then
16291    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16292    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16293    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16294    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16295      # Going to short mode and back again did indeed matter. Since short mode is
16296      # case insensitive, let's make it lowercase to improve readability.
16297      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16298      # Now convert it back to Unix-style (cygpath)
16299      input_path=`$CYGPATH -u "$shortmode_path"`
16300      new_path="$input_path"
16301    fi
16302  fi
16303
16304  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16305  if test "x$test_cygdrive_prefix" = x; then
16306    # As a simple fix, exclude /usr/bin since it's not a real path.
16307    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16308      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16309      # a path prefixed by /cygdrive for fixpath to work.
16310      new_path="$CYGWIN_ROOT_PATH$input_path"
16311    fi
16312  fi
16313
16314
16315  if test "x$path" != "x$new_path"; then
16316    CURDIR="$new_path"
16317    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16318$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16319  fi
16320
16321    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16322
16323  path="$CURDIR"
16324  has_colon=`$ECHO $path | $GREP ^.:`
16325  new_path="$path"
16326  if test "x$has_colon" = x; then
16327    # Not in mixed or Windows style, start by that.
16328    new_path=`cmd //c echo $path`
16329  fi
16330
16331
16332  input_path="$new_path"
16333  # Check if we need to convert this using DOS-style short mode. If the path
16334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16335  # take no chances and rewrite it.
16336  # Note: m4 eats our [], so we need to use [ and ] instead.
16337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16338  if test "x$has_forbidden_chars" != x; then
16339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16340    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16341  fi
16342
16343
16344  windows_path="$new_path"
16345  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16346    unix_path=`$CYGPATH -u "$windows_path"`
16347    new_path="$unix_path"
16348  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16349    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16350    new_path="$unix_path"
16351  fi
16352
16353  if test "x$path" != "x$new_path"; then
16354    CURDIR="$new_path"
16355    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
16356$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
16357  fi
16358
16359  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16360  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16361
16362    else
16363      # We're on a unix platform. Hooray! :)
16364      path="$CURDIR"
16365      has_space=`$ECHO "$path" | $GREP " "`
16366      if test "x$has_space" != x; then
16367        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
16368$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
16369        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16370      fi
16371
16372      # Use eval to expand a potential ~
16373      eval path="$path"
16374      if test ! -f "$path" && test ! -d "$path"; then
16375        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16376      fi
16377
16378      if test -d "$path"; then
16379        CURDIR="`cd "$path"; $THEPWDCMD -L`"
16380      else
16381        dir="`$DIRNAME "$path"`"
16382        base="`$BASENAME "$path"`"
16383        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16384      fi
16385    fi
16386  fi
16387
16388
16389  # Only process if variable expands to non-empty
16390
16391  if test "x$TOPDIR" != x; then
16392    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16393
16394  # Input might be given as Windows format, start by converting to
16395  # unix format.
16396  path="$TOPDIR"
16397  new_path=`$CYGPATH -u "$path"`
16398
16399  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16400  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16401  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16402  # "foo.exe" is OK but "foo" is an error.
16403  #
16404  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16405  # It is also a way to make sure we got the proper file name for the real test later on.
16406  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16407  if test "x$test_shortpath" = x; then
16408    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16409$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16410    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
16411  fi
16412
16413  # Call helper function which possibly converts this using DOS-style short mode.
16414  # If so, the updated path is stored in $new_path.
16415
16416  input_path="$new_path"
16417  # Check if we need to convert this using DOS-style short mode. If the path
16418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16419  # take no chances and rewrite it.
16420  # Note: m4 eats our [], so we need to use [ and ] instead.
16421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16422  if test "x$has_forbidden_chars" != x; then
16423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16427      # Going to short mode and back again did indeed matter. Since short mode is
16428      # case insensitive, let's make it lowercase to improve readability.
16429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16430      # Now convert it back to Unix-style (cygpath)
16431      input_path=`$CYGPATH -u "$shortmode_path"`
16432      new_path="$input_path"
16433    fi
16434  fi
16435
16436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16437  if test "x$test_cygdrive_prefix" = x; then
16438    # As a simple fix, exclude /usr/bin since it's not a real path.
16439    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16441      # a path prefixed by /cygdrive for fixpath to work.
16442      new_path="$CYGWIN_ROOT_PATH$input_path"
16443    fi
16444  fi
16445
16446
16447  if test "x$path" != "x$new_path"; then
16448    TOPDIR="$new_path"
16449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16450$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16451  fi
16452
16453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16454
16455  path="$TOPDIR"
16456  has_colon=`$ECHO $path | $GREP ^.:`
16457  new_path="$path"
16458  if test "x$has_colon" = x; then
16459    # Not in mixed or Windows style, start by that.
16460    new_path=`cmd //c echo $path`
16461  fi
16462
16463
16464  input_path="$new_path"
16465  # Check if we need to convert this using DOS-style short mode. If the path
16466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16467  # take no chances and rewrite it.
16468  # Note: m4 eats our [], so we need to use [ and ] instead.
16469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16470  if test "x$has_forbidden_chars" != x; then
16471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16473  fi
16474
16475
16476  windows_path="$new_path"
16477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16478    unix_path=`$CYGPATH -u "$windows_path"`
16479    new_path="$unix_path"
16480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16482    new_path="$unix_path"
16483  fi
16484
16485  if test "x$path" != "x$new_path"; then
16486    TOPDIR="$new_path"
16487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16488$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16489  fi
16490
16491  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16492  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16493
16494    else
16495      # We're on a unix platform. Hooray! :)
16496      path="$TOPDIR"
16497      has_space=`$ECHO "$path" | $GREP " "`
16498      if test "x$has_space" != x; then
16499        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16500$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16501        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16502      fi
16503
16504      # Use eval to expand a potential ~
16505      eval path="$path"
16506      if test ! -f "$path" && test ! -d "$path"; then
16507        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16508      fi
16509
16510      if test -d "$path"; then
16511        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16512      else
16513        dir="`$DIRNAME "$path"`"
16514        base="`$BASENAME "$path"`"
16515        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16516      fi
16517    fi
16518  fi
16519
16520  # SRC_ROOT is a traditional alias for TOPDIR.
16521  SRC_ROOT=$TOPDIR
16522
16523  # Calculate a canonical version of TOPDIR for string comparisons
16524  CANONICAL_TOPDIR=$TOPDIR
16525
16526  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16527    # Follow a chain of symbolic links. Use readlink
16528    # where it exists, else fall back to horribly
16529    # complicated shell code.
16530    if test "x$READLINK_TESTED" != yes; then
16531      # On MacOSX there is a readlink tool with a different
16532      # purpose than the GNU readlink tool. Check the found readlink.
16533      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16534      if test "x$ISGNU" = x; then
16535        # A readlink that we do not know how to use.
16536        # Are there other non-GNU readlinks out there?
16537        READLINK_TESTED=yes
16538        READLINK=
16539      fi
16540    fi
16541
16542    if test "x$READLINK" != x; then
16543      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16544    else
16545      # Save the current directory for restoring afterwards
16546      STARTDIR=$PWD
16547      COUNTER=0
16548      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16549      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16550      cd $sym_link_dir
16551      # Use -P flag to resolve symlinks in directories.
16552      cd `$THEPWDCMD -P`
16553      sym_link_dir=`$THEPWDCMD -P`
16554      # Resolve file symlinks
16555      while test $COUNTER -lt 20; do
16556        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16557        if test "x$ISLINK" == x; then
16558          # This is not a symbolic link! We are done!
16559          break
16560        fi
16561        # Again resolve directory symlinks since the target of the just found
16562        # link could be in a different directory
16563        cd `$DIRNAME $ISLINK`
16564        sym_link_dir=`$THEPWDCMD -P`
16565        sym_link_file=`$BASENAME $ISLINK`
16566        let COUNTER=COUNTER+1
16567      done
16568      cd $STARTDIR
16569      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16570    fi
16571  fi
16572
16573
16574
16575  # Locate the directory of this script.
16576  AUTOCONF_DIR=$TOPDIR/common/autoconf
16577
16578  # Setup username (for use in adhoc version strings etc)
16579  # Outer [ ] to quote m4.
16580   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16581
16582
16583
16584# Check if it's a pure open build or if custom sources are to be used.
16585
16586  # Check whether --enable-openjdk-only was given.
16587if test "${enable_openjdk_only+set}" = set; then :
16588  enableval=$enable_openjdk_only;
16589else
16590  enable_openjdk_only="no"
16591fi
16592
16593
16594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16595$as_echo_n "checking for presence of closed sources... " >&6; }
16596  if test -d "$SRC_ROOT/jdk/src/closed"; then
16597    CLOSED_SOURCE_PRESENT=yes
16598  else
16599    CLOSED_SOURCE_PRESENT=no
16600  fi
16601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16602$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16603
16604  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16605$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16606  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16608$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16609
16610  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16611    OPENJDK=true
16612    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16613      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16614$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16615    fi
16616  else
16617    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16618      OPENJDK=true
16619    else
16620      OPENJDK=false
16621    fi
16622  fi
16623
16624  if test "x$OPENJDK" = "xtrue"; then
16625    SET_OPENJDK="OPENJDK=true"
16626  fi
16627
16628
16629
16630  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16631  # the IncludeCustomExtension macro.
16632
16633
16634# Check whether --with-custom-make-dir was given.
16635if test "${with_custom_make_dir+set}" = set; then :
16636  withval=$with_custom_make_dir; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&5
16637$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16638fi
16639
16640
16641
16642
16643# These are needed to be able to create a configuration name (and thus the output directory)
16644
16645  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16646$as_echo_n "checking which variant of the JDK to build... " >&6; }
16647
16648# Check whether --with-jdk-variant was given.
16649if test "${with_jdk_variant+set}" = set; then :
16650  withval=$with_jdk_variant;
16651fi
16652
16653
16654  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16655    JDK_VARIANT="normal"
16656  else
16657    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16658  fi
16659
16660
16661
16662  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16663$as_echo "$JDK_VARIANT" >&6; }
16664
16665
16666  DEBUG_LEVEL="release"
16667  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16668$as_echo_n "checking which debug level to use... " >&6; }
16669  # Check whether --enable-debug was given.
16670if test "${enable_debug+set}" = set; then :
16671  enableval=$enable_debug;
16672        ENABLE_DEBUG="${enableval}"
16673        DEBUG_LEVEL="fastdebug"
16674
16675else
16676  ENABLE_DEBUG="no"
16677fi
16678
16679
16680
16681# Check whether --with-debug-level was given.
16682if test "${with_debug_level+set}" = set; then :
16683  withval=$with_debug_level;
16684        DEBUG_LEVEL="${withval}"
16685        if test "x$ENABLE_DEBUG" = xyes; then
16686          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16687        fi
16688
16689fi
16690
16691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16692$as_echo "$DEBUG_LEVEL" >&6; }
16693
16694  if test "x$DEBUG_LEVEL" != xrelease && \
16695      test "x$DEBUG_LEVEL" != xoptimized && \
16696      test "x$DEBUG_LEVEL" != xfastdebug && \
16697      test "x$DEBUG_LEVEL" != xslowdebug; then
16698    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16699  fi
16700
16701  # Translate DEBUG_LEVEL to debug level used by Hotspot
16702  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16703  if test "x$DEBUG_LEVEL" = xrelease; then
16704    HOTSPOT_DEBUG_LEVEL="product"
16705  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16706    HOTSPOT_DEBUG_LEVEL="debug"
16707  fi
16708
16709  if test "x$DEBUG_LEVEL" = xoptimized; then
16710    # The debug level 'optimized' is a little special because it is currently only
16711    # applicable to the HotSpot build where it means to build a completely
16712    # optimized version of the VM without any debugging code (like for the
16713    # 'release' debug level which is called 'product' in the HotSpot build) but
16714    # with the exception that it can contain additional code which is otherwise
16715    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16716    # test new and/or experimental features which are not intended for customer
16717    # shipment. Because these new features need to be tested and benchmarked in
16718    # real world scenarios, we want to build the containing JDK at the 'release'
16719    # debug level.
16720    DEBUG_LEVEL="release"
16721  fi
16722
16723
16724
16725
16726
16727
16728# Check whether --with-jvm-variants was given.
16729if test "${with_jvm_variants+set}" = set; then :
16730  withval=$with_jvm_variants;
16731fi
16732
16733
16734  if test "x$with_jvm_variants" = x; then
16735    with_jvm_variants="server"
16736  fi
16737  JVM_VARIANTS_OPT="$with_jvm_variants"
16738
16739  # Has the user listed more than one variant?
16740  # Additional [] needed to keep m4 from mangling shell constructs.
16741  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16742    BUILDING_MULTIPLE_JVM_VARIANTS=true
16743  else
16744    BUILDING_MULTIPLE_JVM_VARIANTS=false
16745  fi
16746  # Replace the commas with AND for use in the build directory name.
16747  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16748
16749  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16750$as_echo_n "checking which variants of the JVM to build... " >&6; }
16751  # JVM_VARIANTS is a space-separated list.
16752  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16753  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16754  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16755$as_echo "$JVM_VARIANTS" >&6; }
16756
16757  # Check that the selected variants are valid
16758
16759  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16760  # Notice that the original variant failes on SLES 10 and 11
16761  NEEDLE=${VALID_JVM_VARIANTS// /$'\n'}
16762  STACK=${JVM_VARIANTS// /$'\n'}
16763  INVALID_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16764  if test "x$INVALID_VARIANTS" != x; then
16765    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16766$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16767    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16768  fi
16769
16770  # All "special" variants share the same output directory ("server")
16771  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16772  NEEDLE=${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}
16773  STACK=${JVM_VARIANTS// /$'\n'}
16774  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
16775  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16776    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16777  fi
16778
16779
16780
16781
16782  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16783    # zero behaves as a platform and rewrites these values. This is really weird. :(
16784    # We are guaranteed that we do not build any other variants when building zero.
16785    HOTSPOT_TARGET_CPU=zero
16786    HOTSPOT_TARGET_CPU_ARCH=zero
16787  fi
16788
16789
16790# With basic setup done, call the custom early hook.
16791
16792
16793# Check if we have devkits, extra paths or sysroot set.
16794
16795
16796# Check whether --with-devkit was given.
16797if test "${with_devkit+set}" = set; then :
16798  withval=$with_devkit;
16799
16800  # Only process if variable expands to non-empty
16801
16802  if test "x$with_devkit" != x; then
16803    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16804
16805  # Input might be given as Windows format, start by converting to
16806  # unix format.
16807  path="$with_devkit"
16808  new_path=`$CYGPATH -u "$path"`
16809
16810  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16811  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16812  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16813  # "foo.exe" is OK but "foo" is an error.
16814  #
16815  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16816  # It is also a way to make sure we got the proper file name for the real test later on.
16817  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16818  if test "x$test_shortpath" = x; then
16819    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16820$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16821    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16822  fi
16823
16824  # Call helper function which possibly converts this using DOS-style short mode.
16825  # If so, the updated path is stored in $new_path.
16826
16827  input_path="$new_path"
16828  # Check if we need to convert this using DOS-style short mode. If the path
16829  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16830  # take no chances and rewrite it.
16831  # Note: m4 eats our [], so we need to use [ and ] instead.
16832  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16833  if test "x$has_forbidden_chars" != x; then
16834    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16835    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16836    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16837    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16838      # Going to short mode and back again did indeed matter. Since short mode is
16839      # case insensitive, let's make it lowercase to improve readability.
16840      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16841      # Now convert it back to Unix-style (cygpath)
16842      input_path=`$CYGPATH -u "$shortmode_path"`
16843      new_path="$input_path"
16844    fi
16845  fi
16846
16847  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16848  if test "x$test_cygdrive_prefix" = x; then
16849    # As a simple fix, exclude /usr/bin since it's not a real path.
16850    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16851      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16852      # a path prefixed by /cygdrive for fixpath to work.
16853      new_path="$CYGWIN_ROOT_PATH$input_path"
16854    fi
16855  fi
16856
16857
16858  if test "x$path" != "x$new_path"; then
16859    with_devkit="$new_path"
16860    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16861$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16862  fi
16863
16864    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16865
16866  path="$with_devkit"
16867  has_colon=`$ECHO $path | $GREP ^.:`
16868  new_path="$path"
16869  if test "x$has_colon" = x; then
16870    # Not in mixed or Windows style, start by that.
16871    new_path=`cmd //c echo $path`
16872  fi
16873
16874
16875  input_path="$new_path"
16876  # Check if we need to convert this using DOS-style short mode. If the path
16877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16878  # take no chances and rewrite it.
16879  # Note: m4 eats our [], so we need to use [ and ] instead.
16880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16881  if test "x$has_forbidden_chars" != x; then
16882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16883    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16884  fi
16885
16886
16887  windows_path="$new_path"
16888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16889    unix_path=`$CYGPATH -u "$windows_path"`
16890    new_path="$unix_path"
16891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16893    new_path="$unix_path"
16894  fi
16895
16896  if test "x$path" != "x$new_path"; then
16897    with_devkit="$new_path"
16898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16899$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16900  fi
16901
16902  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16903  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16904
16905    else
16906      # We're on a unix platform. Hooray! :)
16907      path="$with_devkit"
16908      has_space=`$ECHO "$path" | $GREP " "`
16909      if test "x$has_space" != x; then
16910        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16911$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16912        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16913      fi
16914
16915      # Use eval to expand a potential ~
16916      eval path="$path"
16917      if test ! -f "$path" && test ! -d "$path"; then
16918        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16919      fi
16920
16921      if test -d "$path"; then
16922        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16923      else
16924        dir="`$DIRNAME "$path"`"
16925        base="`$BASENAME "$path"`"
16926        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16927      fi
16928    fi
16929  fi
16930
16931        DEVKIT_ROOT="$with_devkit"
16932        # Check for a meta data info file in the root of the devkit
16933        if test -f "$DEVKIT_ROOT/devkit.info"; then
16934          . $DEVKIT_ROOT/devkit.info
16935          # This potentially sets the following:
16936          # A descriptive name of the devkit
16937
16938  if test "x$DEVKIT_NAME" = x; then
16939    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16940  fi
16941
16942          # Corresponds to --with-extra-path
16943
16944  if test "x$DEVKIT_EXTRA_PATH" = x; then
16945    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16946  fi
16947
16948          # Corresponds to --with-toolchain-path
16949
16950  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16951    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16952  fi
16953
16954          # Corresponds to --with-sysroot
16955
16956  if test "x$DEVKIT_SYSROOT" = x; then
16957    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16958  fi
16959
16960
16961          # Identifies the Visual Studio version in the devkit
16962
16963  if test "x$DEVKIT_VS_VERSION" = x; then
16964    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16965  fi
16966
16967          # The Visual Studio include environment variable
16968
16969  if test "x$DEVKIT_VS_INCLUDE" = x; then
16970    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16971  fi
16972
16973          # The Visual Studio lib environment variable
16974
16975  if test "x$DEVKIT_VS_LIB" = x; then
16976    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16977  fi
16978
16979          # Corresponds to --with-msvcr-dll
16980
16981  if test "x$DEVKIT_MSVCR_DLL" = x; then
16982    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16983  fi
16984
16985          # Corresponds to --with-msvcp-dll
16986
16987  if test "x$DEVKIT_MSVCP_DLL" = x; then
16988    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16989  fi
16990
16991        fi
16992
16993        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16994$as_echo_n "checking for devkit... " >&6; }
16995        if test "x$DEVKIT_NAME" != x; then
16996          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16997$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16998        else
16999          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
17000$as_echo "$DEVKIT_ROOT" >&6; }
17001        fi
17002
17003
17004  if test "x$DEVKIT_EXTRA_PATH" != x; then
17005    if test "x$EXTRA_PATH" = x; then
17006      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
17007    else
17008      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
17009    fi
17010  fi
17011
17012
17013        # Fallback default of just /bin if DEVKIT_PATH is not defined
17014        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
17015          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
17016        fi
17017
17018  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
17019    if test "x$TOOLCHAIN_PATH" = x; then
17020      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
17021    else
17022      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
17023    fi
17024  fi
17025
17026
17027        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
17028        # places for backwards compatiblity.
17029        if test "x$DEVKIT_SYSROOT" != x; then
17030          SYSROOT="$DEVKIT_SYSROOT"
17031        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
17032          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
17033        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
17034          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
17035        fi
17036
17037
17038fi
17039
17040
17041  # You can force the sysroot if the sysroot encoded into the compiler tools
17042  # is not correct.
17043
17044# Check whether --with-sys-root was given.
17045if test "${with_sys_root+set}" = set; then :
17046  withval=$with_sys_root; SYSROOT=$with_sys_root
17047
17048fi
17049
17050
17051
17052# Check whether --with-sysroot was given.
17053if test "${with_sysroot+set}" = set; then :
17054  withval=$with_sysroot; SYSROOT=$with_sysroot
17055
17056fi
17057
17058
17059
17060# Check whether --with-tools-dir was given.
17061if test "${with_tools_dir+set}" = set; then :
17062  withval=$with_tools_dir;
17063  if test "x$with_tools_dir" != x; then
17064    if test "x$TOOLCHAIN_PATH" = x; then
17065      TOOLCHAIN_PATH="$with_tools_dir"
17066    else
17067      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
17068    fi
17069  fi
17070
17071
17072fi
17073
17074
17075
17076# Check whether --with-toolchain-path was given.
17077if test "${with_toolchain_path+set}" = set; then :
17078  withval=$with_toolchain_path;
17079  if test "x$with_toolchain_path" != x; then
17080    if test "x$TOOLCHAIN_PATH" = x; then
17081      TOOLCHAIN_PATH="$with_toolchain_path"
17082    else
17083      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
17084    fi
17085  fi
17086
17087
17088fi
17089
17090
17091
17092# Check whether --with-extra-path was given.
17093if test "${with_extra_path+set}" = set; then :
17094  withval=$with_extra_path;
17095  if test "x$with_extra_path" != x; then
17096    if test "x$EXTRA_PATH" = x; then
17097      EXTRA_PATH="$with_extra_path"
17098    else
17099      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
17100    fi
17101  fi
17102
17103
17104fi
17105
17106
17107  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
17108    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
17109    # If not, detect if Xcode is installed by running xcodebuild -version
17110    # if no Xcode installed, xcodebuild exits with 1
17111    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
17112    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
17113      # We need to use xcodebuild in the toolchain dir provided by the user, this will
17114      # fall back on the stub binary in /usr/bin/xcodebuild
17115      # Extract the first word of "xcodebuild", so it can be a program name with args.
17116set dummy xcodebuild; ac_word=$2
17117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17118$as_echo_n "checking for $ac_word... " >&6; }
17119if ${ac_cv_path_XCODEBUILD+:} false; then :
17120  $as_echo_n "(cached) " >&6
17121else
17122  case $XCODEBUILD in
17123  [\\/]* | ?:[\\/]*)
17124  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
17125  ;;
17126  *)
17127  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17128for as_dir in $TOOLCHAIN_PATH
17129do
17130  IFS=$as_save_IFS
17131  test -z "$as_dir" && as_dir=.
17132    for ac_exec_ext in '' $ac_executable_extensions; do
17133  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17134    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
17135    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17136    break 2
17137  fi
17138done
17139  done
17140IFS=$as_save_IFS
17141
17142  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
17143  ;;
17144esac
17145fi
17146XCODEBUILD=$ac_cv_path_XCODEBUILD
17147if test -n "$XCODEBUILD"; then
17148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
17149$as_echo "$XCODEBUILD" >&6; }
17150else
17151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17152$as_echo "no" >&6; }
17153fi
17154
17155
17156    else
17157      # this should result in SYSROOT being empty, unless --with-sysroot is provided
17158      # when only the command line tools are installed there are no SDKs, so headers
17159      # are copied into the system frameworks
17160      XCODEBUILD=
17161
17162    fi
17163
17164    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
17165$as_echo_n "checking for sdk name... " >&6; }
17166
17167# Check whether --with-sdk-name was given.
17168if test "${with_sdk_name+set}" = set; then :
17169  withval=$with_sdk_name; SDKNAME=$with_sdk_name
17170
17171fi
17172
17173    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
17174$as_echo "$SDKNAME" >&6; }
17175
17176    # if toolchain path is specified then don't rely on system headers, they may not compile
17177    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
17178    test -z "$TOOLCHAIN_PATH" && \
17179      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
17180
17181    if test -z "$SYSROOT"; then
17182      if test -n "$XCODEBUILD"; then
17183        # if we don't have system headers, use default SDK name (last resort)
17184        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17185          SDKNAME=${SDKNAME:-macosx}
17186        fi
17187
17188        if test -n "$SDKNAME"; then
17189          # Call xcodebuild to determine SYSROOT
17190          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | $GREP '^Path: ' | $SED 's/Path: //'`
17191        fi
17192      else
17193        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
17194          as_fn_error $? "No xcodebuild tool and no system framework headers found, use --with-sysroot or --with-sdk-name to provide a path to a valid SDK" "$LINENO" 5
17195        fi
17196      fi
17197    else
17198      # warn user if --with-sdk-name was also set
17199      if test -n "$with_sdk_name"; then
17200        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
17201$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
17202      fi
17203    fi
17204
17205    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
17206      # If no system framework headers, then SYSROOT must be set, or we won't build
17207      as_fn_error $? "Unable to determine SYSROOT and no headers found in /System/Library/Frameworks. Check Xcode configuration, --with-sysroot or --with-sdk-name arguments." "$LINENO" 5
17208    fi
17209
17210    # Perform a basic sanity test
17211    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
17212      if test -z "$SYSROOT"; then
17213        as_fn_error $? "Unable to find required framework headers, provide a path to an SDK via --with-sysroot or --with-sdk-name and be sure Xcode is installed properly" "$LINENO" 5
17214      else
17215        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
17216      fi
17217    fi
17218
17219    # set SDKROOT too, Xcode tools will pick it up
17220    SDKROOT=$SYSROOT
17221
17222  fi
17223
17224  # Prepend the extra path to the global path
17225
17226  if test "x$EXTRA_PATH" != x; then
17227    if test "x$PATH" = x; then
17228      PATH="$EXTRA_PATH"
17229    else
17230      PATH="$EXTRA_PATH:$PATH"
17231    fi
17232  fi
17233
17234
17235  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
17236    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
17237    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
17238  fi
17239
17240  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
17241$as_echo_n "checking for sysroot... " >&6; }
17242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
17243$as_echo "$SYSROOT" >&6; }
17244  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
17245$as_echo_n "checking for toolchain path... " >&6; }
17246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
17247$as_echo "$TOOLCHAIN_PATH" >&6; }
17248  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
17249$as_echo_n "checking for extra path... " >&6; }
17250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
17251$as_echo "$EXTRA_PATH" >&6; }
17252
17253
17254# To properly create a configuration name, we need to have the OpenJDK target
17255# and options (variants and debug level) parsed.
17256
17257
17258
17259# Check whether --with-conf-name was given.
17260if test "${with_conf_name+set}" = set; then :
17261  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
17262fi
17263
17264
17265  # Test from where we are running configure, in or outside of src root.
17266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
17267$as_echo_n "checking where to store configuration... " >&6; }
17268  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
17269      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
17270      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
17271    # We are running configure from the src root.
17272    # Create a default ./build/target-variant-debuglevel output root.
17273    if test "x${CONF_NAME}" = x; then
17274      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
17275$as_echo "in default location" >&6; }
17276      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
17277    else
17278      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
17279$as_echo "in build directory with custom name" >&6; }
17280    fi
17281    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
17282    $MKDIR -p "$OUTPUT_ROOT"
17283    if test ! -d "$OUTPUT_ROOT"; then
17284      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
17285    fi
17286  else
17287    # We are running configure from outside of the src dir.
17288    # Then use the current directory as output dir!
17289    # If configuration is situated in normal build directory, just use the build
17290    # directory name as configuration name, otherwise use the complete path.
17291    if test "x${CONF_NAME}" = x; then
17292      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
17293    fi
17294    OUTPUT_ROOT="$CURDIR"
17295    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
17296$as_echo "in current directory" >&6; }
17297
17298    # WARNING: This might be a bad thing to do. You need to be sure you want to
17299    # have a configuration in this directory. Do some sanity checks!
17300
17301    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
17302      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
17303      # other files
17304      files_present=`$LS $OUTPUT_ROOT`
17305      # Configure has already touched config.log and confdefs.h in the current dir when this check
17306      # is performed.
17307      filtered_files=`$ECHO "$files_present" \
17308          | $SED -e 's/config.log//g' \
17309              -e 's/configure.log//g' \
17310              -e 's/confdefs.h//g' \
17311              -e 's/ //g' \
17312          | $TR -d '\n'`
17313      if test "x$filtered_files" != x; then
17314        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
17315$as_echo "$as_me: Current directory is $CURDIR." >&6;}
17316        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
17317$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
17318        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
17319$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
17320        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
17321$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
17322        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
17323$as_echo "$as_me: seriously mess up just about everything." >&6;}
17324        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
17325$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
17326        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
17327$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
17328        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
17329      fi
17330    fi
17331  fi
17332  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
17333$as_echo_n "checking what configuration name to use... " >&6; }
17334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
17335$as_echo "$CONF_NAME" >&6; }
17336
17337
17338  # Only process if variable expands to non-empty
17339
17340  if test "x$OUTPUT_ROOT" != x; then
17341    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17342
17343  # Input might be given as Windows format, start by converting to
17344  # unix format.
17345  path="$OUTPUT_ROOT"
17346  new_path=`$CYGPATH -u "$path"`
17347
17348  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17349  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17350  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17351  # "foo.exe" is OK but "foo" is an error.
17352  #
17353  # This test is therefore slightly more accurate than "test -f" to check for file precense.
17354  # It is also a way to make sure we got the proper file name for the real test later on.
17355  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17356  if test "x$test_shortpath" = x; then
17357    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17358$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17359    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
17360  fi
17361
17362  # Call helper function which possibly converts this using DOS-style short mode.
17363  # If so, the updated path is stored in $new_path.
17364
17365  input_path="$new_path"
17366  # Check if we need to convert this using DOS-style short mode. If the path
17367  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17368  # take no chances and rewrite it.
17369  # Note: m4 eats our [], so we need to use [ and ] instead.
17370  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17371  if test "x$has_forbidden_chars" != x; then
17372    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17373    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17374    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17375    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17376      # Going to short mode and back again did indeed matter. Since short mode is
17377      # case insensitive, let's make it lowercase to improve readability.
17378      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17379      # Now convert it back to Unix-style (cygpath)
17380      input_path=`$CYGPATH -u "$shortmode_path"`
17381      new_path="$input_path"
17382    fi
17383  fi
17384
17385  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17386  if test "x$test_cygdrive_prefix" = x; then
17387    # As a simple fix, exclude /usr/bin since it's not a real path.
17388    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
17389      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17390      # a path prefixed by /cygdrive for fixpath to work.
17391      new_path="$CYGWIN_ROOT_PATH$input_path"
17392    fi
17393  fi
17394
17395
17396  if test "x$path" != "x$new_path"; then
17397    OUTPUT_ROOT="$new_path"
17398    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17399$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17400  fi
17401
17402    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17403
17404  path="$OUTPUT_ROOT"
17405  has_colon=`$ECHO $path | $GREP ^.:`
17406  new_path="$path"
17407  if test "x$has_colon" = x; then
17408    # Not in mixed or Windows style, start by that.
17409    new_path=`cmd //c echo $path`
17410  fi
17411
17412
17413  input_path="$new_path"
17414  # Check if we need to convert this using DOS-style short mode. If the path
17415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17416  # take no chances and rewrite it.
17417  # Note: m4 eats our [], so we need to use [ and ] instead.
17418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17419  if test "x$has_forbidden_chars" != x; then
17420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17421    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17422  fi
17423
17424
17425  windows_path="$new_path"
17426  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17427    unix_path=`$CYGPATH -u "$windows_path"`
17428    new_path="$unix_path"
17429  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17430    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17431    new_path="$unix_path"
17432  fi
17433
17434  if test "x$path" != "x$new_path"; then
17435    OUTPUT_ROOT="$new_path"
17436    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
17437$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
17438  fi
17439
17440  # Save the first 10 bytes of this path to the storage, so fixpath can work.
17441  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17442
17443    else
17444      # We're on a unix platform. Hooray! :)
17445      path="$OUTPUT_ROOT"
17446      has_space=`$ECHO "$path" | $GREP " "`
17447      if test "x$has_space" != x; then
17448        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
17449$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
17450        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
17451      fi
17452
17453      # Use eval to expand a potential ~
17454      eval path="$path"
17455      if test ! -f "$path" && test ! -d "$path"; then
17456        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
17457      fi
17458
17459      if test -d "$path"; then
17460        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
17461      else
17462        dir="`$DIRNAME "$path"`"
17463        base="`$BASENAME "$path"`"
17464        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17465      fi
17466    fi
17467  fi
17468
17469
17470  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17471  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17472
17473  SPEC=$OUTPUT_ROOT/spec.gmk
17474
17475  CONF_NAME=$CONF_NAME
17476
17477  OUTPUT_ROOT=$OUTPUT_ROOT
17478
17479
17480
17481  # The spec.gmk file contains all variables for the make system.
17482  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17483
17484  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17485  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17486
17487  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17488  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17489
17490  # The compare.sh is used to compare the build output to other builds.
17491  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17492
17493  # The generated Makefile knows where the spec.gmk is and where the source is.
17494  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17495  # which will look for generated configurations
17496  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17497
17498
17499
17500# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17501
17502  for ac_prog in apt-get yum port pkgutil pkgadd
17503do
17504  # Extract the first word of "$ac_prog", so it can be a program name with args.
17505set dummy $ac_prog; ac_word=$2
17506{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17507$as_echo_n "checking for $ac_word... " >&6; }
17508if ${ac_cv_prog_PKGHANDLER+:} false; then :
17509  $as_echo_n "(cached) " >&6
17510else
17511  if test -n "$PKGHANDLER"; then
17512  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17513else
17514as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17515for as_dir in $PATH
17516do
17517  IFS=$as_save_IFS
17518  test -z "$as_dir" && as_dir=.
17519    for ac_exec_ext in '' $ac_executable_extensions; do
17520  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17521    ac_cv_prog_PKGHANDLER="$ac_prog"
17522    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17523    break 2
17524  fi
17525done
17526  done
17527IFS=$as_save_IFS
17528
17529fi
17530fi
17531PKGHANDLER=$ac_cv_prog_PKGHANDLER
17532if test -n "$PKGHANDLER"; then
17533  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17534$as_echo "$PKGHANDLER" >&6; }
17535else
17536  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17537$as_echo "no" >&6; }
17538fi
17539
17540
17541  test -n "$PKGHANDLER" && break
17542done
17543
17544
17545
17546# Setup tools that requires more complex handling, or that is not needed by the configure script.
17547
17548
17549
17550  # Publish this variable in the help.
17551
17552
17553  if [ -z "${MAKE+x}" ]; then
17554    # The variable is not set by user, try to locate tool using the code snippet
17555
17556    # Try our hardest to locate a correct version of GNU make
17557    for ac_prog in gmake
17558do
17559  # Extract the first word of "$ac_prog", so it can be a program name with args.
17560set dummy $ac_prog; ac_word=$2
17561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17562$as_echo_n "checking for $ac_word... " >&6; }
17563if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17564  $as_echo_n "(cached) " >&6
17565else
17566  case $CHECK_GMAKE in
17567  [\\/]* | ?:[\\/]*)
17568  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17569  ;;
17570  *)
17571  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17572for as_dir in $PATH
17573do
17574  IFS=$as_save_IFS
17575  test -z "$as_dir" && as_dir=.
17576    for ac_exec_ext in '' $ac_executable_extensions; do
17577  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17578    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17579    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17580    break 2
17581  fi
17582done
17583  done
17584IFS=$as_save_IFS
17585
17586  ;;
17587esac
17588fi
17589CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17590if test -n "$CHECK_GMAKE"; then
17591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17592$as_echo "$CHECK_GMAKE" >&6; }
17593else
17594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17595$as_echo "no" >&6; }
17596fi
17597
17598
17599  test -n "$CHECK_GMAKE" && break
17600done
17601
17602
17603  MAKE_CANDIDATE=""$CHECK_GMAKE""
17604  DESCRIPTION="gmake in PATH"
17605
17606  # On Cygwin, we require a newer version of make than on other platforms
17607  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17608    MAKE_VERSION_EXPR="-e 4\."
17609    MAKE_REQUIRED_VERSION="4.0"
17610   else
17611    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17612    MAKE_REQUIRED_VERSION="3.81"
17613  fi
17614
17615  if test "x$MAKE_CANDIDATE" != x; then
17616    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17617$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17618    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17619    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17620    if test "x$IS_GNU_MAKE" = x; then
17621      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17622$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17623    else
17624      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17625      if test "x$IS_MODERN_MAKE" = x; then
17626        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
17627$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
17628      else
17629        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17630          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17631            MAKE_EXPECTED_ENV='cygwin'
17632          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17633            MAKE_EXPECTED_ENV='msys'
17634          else
17635            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17636          fi
17637          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17638          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17639        else
17640          # Not relevant for non-Windows
17641          IS_MAKE_CORRECT_ENV=true
17642        fi
17643        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17644          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
17645$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
17646        else
17647          FOUND_MAKE=$MAKE_CANDIDATE
17648
17649  # Only process if variable expands to non-empty
17650
17651  if test "x$FOUND_MAKE" != x; then
17652    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17653
17654  # First separate the path from the arguments. This will split at the first
17655  # space.
17656  complete="$FOUND_MAKE"
17657  path="${complete%% *}"
17658  tmp="$complete EOL"
17659  arguments="${tmp#* }"
17660
17661  # Input might be given as Windows format, start by converting to
17662  # unix format.
17663  new_path=`$CYGPATH -u "$path"`
17664
17665  # Now try to locate executable using which
17666  new_path=`$WHICH "$new_path" 2> /dev/null`
17667  # bat and cmd files are not always considered executable in cygwin causing which
17668  # to not find them
17669  if test "x$new_path" = x \
17670      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17671      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17672    new_path=`$CYGPATH -u "$path"`
17673  fi
17674  if test "x$new_path" = x; then
17675    # Oops. Which didn't find the executable.
17676    # The splitting of arguments from the executable at a space might have been incorrect,
17677    # since paths with space are more likely in Windows. Give it another try with the whole
17678    # argument.
17679    path="$complete"
17680    arguments="EOL"
17681    new_path=`$CYGPATH -u "$path"`
17682    new_path=`$WHICH "$new_path" 2> /dev/null`
17683    # bat and cmd files are not always considered executable in cygwin causing which
17684    # to not find them
17685    if test "x$new_path" = x \
17686        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17687        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17688      new_path=`$CYGPATH -u "$path"`
17689    fi
17690    if test "x$new_path" = x; then
17691      # It's still not found. Now this is an unrecoverable error.
17692      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17693$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17694      has_space=`$ECHO "$complete" | $GREP " "`
17695      if test "x$has_space" != x; then
17696        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17697$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17698      fi
17699      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17700    fi
17701  fi
17702
17703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17706  # "foo.exe" is OK but "foo" is an error.
17707  #
17708  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17709  # It is also a way to make sure we got the proper file name for the real test later on.
17710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17711  if test "x$test_shortpath" = x; then
17712    # Short path failed, file does not exist as specified.
17713    # Try adding .exe or .cmd
17714    if test -f "${new_path}.exe"; then
17715      input_to_shortpath="${new_path}.exe"
17716    elif test -f "${new_path}.cmd"; then
17717      input_to_shortpath="${new_path}.cmd"
17718    else
17719      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17720$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17721      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17722$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17723      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17724    fi
17725  else
17726    input_to_shortpath="$new_path"
17727  fi
17728
17729  # Call helper function which possibly converts this using DOS-style short mode.
17730  # If so, the updated path is stored in $new_path.
17731  new_path="$input_to_shortpath"
17732
17733  input_path="$input_to_shortpath"
17734  # Check if we need to convert this using DOS-style short mode. If the path
17735  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17736  # take no chances and rewrite it.
17737  # Note: m4 eats our [], so we need to use [ and ] instead.
17738  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17739  if test "x$has_forbidden_chars" != x; then
17740    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17741    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17742    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17743    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17744      # Going to short mode and back again did indeed matter. Since short mode is
17745      # case insensitive, let's make it lowercase to improve readability.
17746      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17747      # Now convert it back to Unix-style (cygpath)
17748      input_path=`$CYGPATH -u "$shortmode_path"`
17749      new_path="$input_path"
17750    fi
17751  fi
17752
17753  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17754  if test "x$test_cygdrive_prefix" = x; then
17755    # As a simple fix, exclude /usr/bin since it's not a real path.
17756    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17757      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17758      # a path prefixed by /cygdrive for fixpath to work.
17759      new_path="$CYGWIN_ROOT_PATH$input_path"
17760    fi
17761  fi
17762
17763  # remove trailing .exe if any
17764  new_path="${new_path/%.exe/}"
17765
17766    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17767
17768  # First separate the path from the arguments. This will split at the first
17769  # space.
17770  complete="$FOUND_MAKE"
17771  path="${complete%% *}"
17772  tmp="$complete EOL"
17773  arguments="${tmp#* }"
17774
17775  # Input might be given as Windows format, start by converting to
17776  # unix format.
17777  new_path="$path"
17778
17779  windows_path="$new_path"
17780  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17781    unix_path=`$CYGPATH -u "$windows_path"`
17782    new_path="$unix_path"
17783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17784    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17785    new_path="$unix_path"
17786  fi
17787
17788
17789  # Now try to locate executable using which
17790  new_path=`$WHICH "$new_path" 2> /dev/null`
17791
17792  if test "x$new_path" = x; then
17793    # Oops. Which didn't find the executable.
17794    # The splitting of arguments from the executable at a space might have been incorrect,
17795    # since paths with space are more likely in Windows. Give it another try with the whole
17796    # argument.
17797    path="$complete"
17798    arguments="EOL"
17799    new_path="$path"
17800
17801  windows_path="$new_path"
17802  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17803    unix_path=`$CYGPATH -u "$windows_path"`
17804    new_path="$unix_path"
17805  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17806    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17807    new_path="$unix_path"
17808  fi
17809
17810
17811    new_path=`$WHICH "$new_path" 2> /dev/null`
17812    # bat and cmd files are not always considered executable in MSYS causing which
17813    # to not find them
17814    if test "x$new_path" = x \
17815        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17816        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17817      new_path="$path"
17818
17819  windows_path="$new_path"
17820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17821    unix_path=`$CYGPATH -u "$windows_path"`
17822    new_path="$unix_path"
17823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17825    new_path="$unix_path"
17826  fi
17827
17828    fi
17829
17830    if test "x$new_path" = x; then
17831      # It's still not found. Now this is an unrecoverable error.
17832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17833$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17834      has_space=`$ECHO "$complete" | $GREP " "`
17835      if test "x$has_space" != x; then
17836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17838      fi
17839      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17840    fi
17841  fi
17842
17843  # Now new_path has a complete unix path to the binary
17844  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17845    # Keep paths in /bin as-is, but remove trailing .exe if any
17846    new_path="${new_path/%.exe/}"
17847    # Do not save /bin paths to all_fixpath_prefixes!
17848  else
17849    # Not in mixed or Windows style, start by that.
17850    new_path=`cmd //c echo $new_path`
17851
17852  input_path="$new_path"
17853  # Check if we need to convert this using DOS-style short mode. If the path
17854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17855  # take no chances and rewrite it.
17856  # Note: m4 eats our [], so we need to use [ and ] instead.
17857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17858  if test "x$has_forbidden_chars" != x; then
17859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17860    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17861  fi
17862
17863    # Output is in $new_path
17864
17865  windows_path="$new_path"
17866  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17867    unix_path=`$CYGPATH -u "$windows_path"`
17868    new_path="$unix_path"
17869  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17870    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17871    new_path="$unix_path"
17872  fi
17873
17874    # remove trailing .exe if any
17875    new_path="${new_path/%.exe/}"
17876
17877    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17878    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17879  fi
17880
17881    else
17882      # We're on a unix platform. Hooray! :)
17883      # First separate the path from the arguments. This will split at the first
17884      # space.
17885      complete="$FOUND_MAKE"
17886      path="${complete%% *}"
17887      tmp="$complete EOL"
17888      arguments="${tmp#* }"
17889
17890      # Cannot rely on the command "which" here since it doesn't always work.
17891      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17892      if test -z "$is_absolute_path"; then
17893        # Path to executable is not absolute. Find it.
17894        IFS_save="$IFS"
17895        IFS=:
17896        for p in $PATH; do
17897          if test -f "$p/$path" && test -x "$p/$path"; then
17898            new_path="$p/$path"
17899            break
17900          fi
17901        done
17902        IFS="$IFS_save"
17903      else
17904        # This is an absolute path, we can use it without further modifications.
17905        new_path="$path"
17906      fi
17907
17908      if test "x$new_path" = x; then
17909        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17910$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17911        has_space=`$ECHO "$complete" | $GREP " "`
17912        if test "x$has_space" != x; then
17913          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17914$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17915        fi
17916        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17917      fi
17918    fi
17919
17920    # Now join together the path and the arguments once again
17921    if test "x$arguments" != xEOL; then
17922      new_complete="$new_path ${arguments% *}"
17923    else
17924      new_complete="$new_path"
17925    fi
17926
17927    if test "x$complete" != "x$new_complete"; then
17928      FOUND_MAKE="$new_complete"
17929      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17930$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17931    fi
17932  fi
17933
17934        fi
17935      fi
17936    fi
17937  fi
17938
17939
17940    if test "x$FOUND_MAKE" = x; then
17941      for ac_prog in make
17942do
17943  # Extract the first word of "$ac_prog", so it can be a program name with args.
17944set dummy $ac_prog; ac_word=$2
17945{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17946$as_echo_n "checking for $ac_word... " >&6; }
17947if ${ac_cv_path_CHECK_MAKE+:} false; then :
17948  $as_echo_n "(cached) " >&6
17949else
17950  case $CHECK_MAKE in
17951  [\\/]* | ?:[\\/]*)
17952  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17953  ;;
17954  *)
17955  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17956for as_dir in $PATH
17957do
17958  IFS=$as_save_IFS
17959  test -z "$as_dir" && as_dir=.
17960    for ac_exec_ext in '' $ac_executable_extensions; do
17961  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17962    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17963    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17964    break 2
17965  fi
17966done
17967  done
17968IFS=$as_save_IFS
17969
17970  ;;
17971esac
17972fi
17973CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17974if test -n "$CHECK_MAKE"; then
17975  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17976$as_echo "$CHECK_MAKE" >&6; }
17977else
17978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17979$as_echo "no" >&6; }
17980fi
17981
17982
17983  test -n "$CHECK_MAKE" && break
17984done
17985
17986
17987  MAKE_CANDIDATE=""$CHECK_MAKE""
17988  DESCRIPTION="make in PATH"
17989
17990  # On Cygwin, we require a newer version of make than on other platforms
17991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17992    MAKE_VERSION_EXPR="-e 4\."
17993    MAKE_REQUIRED_VERSION="4.0"
17994   else
17995    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17996    MAKE_REQUIRED_VERSION="3.81"
17997  fi
17998
17999  if test "x$MAKE_CANDIDATE" != x; then
18000    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18001$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18002    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18003    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18004    if test "x$IS_GNU_MAKE" = x; then
18005      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18006$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18007    else
18008      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18009      if test "x$IS_MODERN_MAKE" = x; then
18010        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18011$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18012      else
18013        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18014          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18015            MAKE_EXPECTED_ENV='cygwin'
18016          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18017            MAKE_EXPECTED_ENV='msys'
18018          else
18019            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18020          fi
18021          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18022          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18023        else
18024          # Not relevant for non-Windows
18025          IS_MAKE_CORRECT_ENV=true
18026        fi
18027        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18028          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18029$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18030        else
18031          FOUND_MAKE=$MAKE_CANDIDATE
18032
18033  # Only process if variable expands to non-empty
18034
18035  if test "x$FOUND_MAKE" != x; then
18036    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18037
18038  # First separate the path from the arguments. This will split at the first
18039  # space.
18040  complete="$FOUND_MAKE"
18041  path="${complete%% *}"
18042  tmp="$complete EOL"
18043  arguments="${tmp#* }"
18044
18045  # Input might be given as Windows format, start by converting to
18046  # unix format.
18047  new_path=`$CYGPATH -u "$path"`
18048
18049  # Now try to locate executable using which
18050  new_path=`$WHICH "$new_path" 2> /dev/null`
18051  # bat and cmd files are not always considered executable in cygwin causing which
18052  # to not find them
18053  if test "x$new_path" = x \
18054      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18055      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18056    new_path=`$CYGPATH -u "$path"`
18057  fi
18058  if test "x$new_path" = x; then
18059    # Oops. Which didn't find the executable.
18060    # The splitting of arguments from the executable at a space might have been incorrect,
18061    # since paths with space are more likely in Windows. Give it another try with the whole
18062    # argument.
18063    path="$complete"
18064    arguments="EOL"
18065    new_path=`$CYGPATH -u "$path"`
18066    new_path=`$WHICH "$new_path" 2> /dev/null`
18067    # bat and cmd files are not always considered executable in cygwin causing which
18068    # to not find them
18069    if test "x$new_path" = x \
18070        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18071        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18072      new_path=`$CYGPATH -u "$path"`
18073    fi
18074    if test "x$new_path" = x; then
18075      # It's still not found. Now this is an unrecoverable error.
18076      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18077$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18078      has_space=`$ECHO "$complete" | $GREP " "`
18079      if test "x$has_space" != x; then
18080        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18081$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18082      fi
18083      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18084    fi
18085  fi
18086
18087  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18088  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18089  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18090  # "foo.exe" is OK but "foo" is an error.
18091  #
18092  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18093  # It is also a way to make sure we got the proper file name for the real test later on.
18094  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18095  if test "x$test_shortpath" = x; then
18096    # Short path failed, file does not exist as specified.
18097    # Try adding .exe or .cmd
18098    if test -f "${new_path}.exe"; then
18099      input_to_shortpath="${new_path}.exe"
18100    elif test -f "${new_path}.cmd"; then
18101      input_to_shortpath="${new_path}.cmd"
18102    else
18103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18104$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18105      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18106$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18107      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18108    fi
18109  else
18110    input_to_shortpath="$new_path"
18111  fi
18112
18113  # Call helper function which possibly converts this using DOS-style short mode.
18114  # If so, the updated path is stored in $new_path.
18115  new_path="$input_to_shortpath"
18116
18117  input_path="$input_to_shortpath"
18118  # Check if we need to convert this using DOS-style short mode. If the path
18119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18120  # take no chances and rewrite it.
18121  # Note: m4 eats our [], so we need to use [ and ] instead.
18122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18123  if test "x$has_forbidden_chars" != x; then
18124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18128      # Going to short mode and back again did indeed matter. Since short mode is
18129      # case insensitive, let's make it lowercase to improve readability.
18130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18131      # Now convert it back to Unix-style (cygpath)
18132      input_path=`$CYGPATH -u "$shortmode_path"`
18133      new_path="$input_path"
18134    fi
18135  fi
18136
18137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18138  if test "x$test_cygdrive_prefix" = x; then
18139    # As a simple fix, exclude /usr/bin since it's not a real path.
18140    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18142      # a path prefixed by /cygdrive for fixpath to work.
18143      new_path="$CYGWIN_ROOT_PATH$input_path"
18144    fi
18145  fi
18146
18147  # remove trailing .exe if any
18148  new_path="${new_path/%.exe/}"
18149
18150    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18151
18152  # First separate the path from the arguments. This will split at the first
18153  # space.
18154  complete="$FOUND_MAKE"
18155  path="${complete%% *}"
18156  tmp="$complete EOL"
18157  arguments="${tmp#* }"
18158
18159  # Input might be given as Windows format, start by converting to
18160  # unix format.
18161  new_path="$path"
18162
18163  windows_path="$new_path"
18164  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18165    unix_path=`$CYGPATH -u "$windows_path"`
18166    new_path="$unix_path"
18167  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18168    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18169    new_path="$unix_path"
18170  fi
18171
18172
18173  # Now try to locate executable using which
18174  new_path=`$WHICH "$new_path" 2> /dev/null`
18175
18176  if test "x$new_path" = x; then
18177    # Oops. Which didn't find the executable.
18178    # The splitting of arguments from the executable at a space might have been incorrect,
18179    # since paths with space are more likely in Windows. Give it another try with the whole
18180    # argument.
18181    path="$complete"
18182    arguments="EOL"
18183    new_path="$path"
18184
18185  windows_path="$new_path"
18186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18187    unix_path=`$CYGPATH -u "$windows_path"`
18188    new_path="$unix_path"
18189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18191    new_path="$unix_path"
18192  fi
18193
18194
18195    new_path=`$WHICH "$new_path" 2> /dev/null`
18196    # bat and cmd files are not always considered executable in MSYS causing which
18197    # to not find them
18198    if test "x$new_path" = x \
18199        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18200        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18201      new_path="$path"
18202
18203  windows_path="$new_path"
18204  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18205    unix_path=`$CYGPATH -u "$windows_path"`
18206    new_path="$unix_path"
18207  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18208    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18209    new_path="$unix_path"
18210  fi
18211
18212    fi
18213
18214    if test "x$new_path" = x; then
18215      # It's still not found. Now this is an unrecoverable error.
18216      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18217$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18218      has_space=`$ECHO "$complete" | $GREP " "`
18219      if test "x$has_space" != x; then
18220        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18221$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18222      fi
18223      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18224    fi
18225  fi
18226
18227  # Now new_path has a complete unix path to the binary
18228  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18229    # Keep paths in /bin as-is, but remove trailing .exe if any
18230    new_path="${new_path/%.exe/}"
18231    # Do not save /bin paths to all_fixpath_prefixes!
18232  else
18233    # Not in mixed or Windows style, start by that.
18234    new_path=`cmd //c echo $new_path`
18235
18236  input_path="$new_path"
18237  # Check if we need to convert this using DOS-style short mode. If the path
18238  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18239  # take no chances and rewrite it.
18240  # Note: m4 eats our [], so we need to use [ and ] instead.
18241  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18242  if test "x$has_forbidden_chars" != x; then
18243    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18244    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18245  fi
18246
18247    # Output is in $new_path
18248
18249  windows_path="$new_path"
18250  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18251    unix_path=`$CYGPATH -u "$windows_path"`
18252    new_path="$unix_path"
18253  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18254    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18255    new_path="$unix_path"
18256  fi
18257
18258    # remove trailing .exe if any
18259    new_path="${new_path/%.exe/}"
18260
18261    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18262    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18263  fi
18264
18265    else
18266      # We're on a unix platform. Hooray! :)
18267      # First separate the path from the arguments. This will split at the first
18268      # space.
18269      complete="$FOUND_MAKE"
18270      path="${complete%% *}"
18271      tmp="$complete EOL"
18272      arguments="${tmp#* }"
18273
18274      # Cannot rely on the command "which" here since it doesn't always work.
18275      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18276      if test -z "$is_absolute_path"; then
18277        # Path to executable is not absolute. Find it.
18278        IFS_save="$IFS"
18279        IFS=:
18280        for p in $PATH; do
18281          if test -f "$p/$path" && test -x "$p/$path"; then
18282            new_path="$p/$path"
18283            break
18284          fi
18285        done
18286        IFS="$IFS_save"
18287      else
18288        # This is an absolute path, we can use it without further modifications.
18289        new_path="$path"
18290      fi
18291
18292      if test "x$new_path" = x; then
18293        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18294$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18295        has_space=`$ECHO "$complete" | $GREP " "`
18296        if test "x$has_space" != x; then
18297          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18298$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18299        fi
18300        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18301      fi
18302    fi
18303
18304    # Now join together the path and the arguments once again
18305    if test "x$arguments" != xEOL; then
18306      new_complete="$new_path ${arguments% *}"
18307    else
18308      new_complete="$new_path"
18309    fi
18310
18311    if test "x$complete" != "x$new_complete"; then
18312      FOUND_MAKE="$new_complete"
18313      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18314$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18315    fi
18316  fi
18317
18318        fi
18319      fi
18320    fi
18321  fi
18322
18323    fi
18324
18325    if test "x$FOUND_MAKE" = x; then
18326      if test "x$TOOLCHAIN_PATH" != x; then
18327        # We have a toolchain path, check that as well before giving up.
18328        OLD_PATH=$PATH
18329        PATH=$TOOLCHAIN_PATH:$PATH
18330        for ac_prog in gmake
18331do
18332  # Extract the first word of "$ac_prog", so it can be a program name with args.
18333set dummy $ac_prog; ac_word=$2
18334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18335$as_echo_n "checking for $ac_word... " >&6; }
18336if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
18337  $as_echo_n "(cached) " >&6
18338else
18339  case $CHECK_TOOLSDIR_GMAKE in
18340  [\\/]* | ?:[\\/]*)
18341  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
18342  ;;
18343  *)
18344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18345for as_dir in $PATH
18346do
18347  IFS=$as_save_IFS
18348  test -z "$as_dir" && as_dir=.
18349    for ac_exec_ext in '' $ac_executable_extensions; do
18350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18351    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18353    break 2
18354  fi
18355done
18356  done
18357IFS=$as_save_IFS
18358
18359  ;;
18360esac
18361fi
18362CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
18363if test -n "$CHECK_TOOLSDIR_GMAKE"; then
18364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
18365$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
18366else
18367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18368$as_echo "no" >&6; }
18369fi
18370
18371
18372  test -n "$CHECK_TOOLSDIR_GMAKE" && break
18373done
18374
18375
18376  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
18377  DESCRIPTION="gmake in tools-dir"
18378
18379  # On Cygwin, we require a newer version of make than on other platforms
18380  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18381    MAKE_VERSION_EXPR="-e 4\."
18382    MAKE_REQUIRED_VERSION="4.0"
18383   else
18384    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18385    MAKE_REQUIRED_VERSION="3.81"
18386  fi
18387
18388  if test "x$MAKE_CANDIDATE" != x; then
18389    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18390$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18391    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18392    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18393    if test "x$IS_GNU_MAKE" = x; then
18394      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18395$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18396    else
18397      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18398      if test "x$IS_MODERN_MAKE" = x; then
18399        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18400$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18401      else
18402        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18403          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18404            MAKE_EXPECTED_ENV='cygwin'
18405          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18406            MAKE_EXPECTED_ENV='msys'
18407          else
18408            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18409          fi
18410          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18411          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18412        else
18413          # Not relevant for non-Windows
18414          IS_MAKE_CORRECT_ENV=true
18415        fi
18416        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18417          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18418$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18419        else
18420          FOUND_MAKE=$MAKE_CANDIDATE
18421
18422  # Only process if variable expands to non-empty
18423
18424  if test "x$FOUND_MAKE" != x; then
18425    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18426
18427  # First separate the path from the arguments. This will split at the first
18428  # space.
18429  complete="$FOUND_MAKE"
18430  path="${complete%% *}"
18431  tmp="$complete EOL"
18432  arguments="${tmp#* }"
18433
18434  # Input might be given as Windows format, start by converting to
18435  # unix format.
18436  new_path=`$CYGPATH -u "$path"`
18437
18438  # Now try to locate executable using which
18439  new_path=`$WHICH "$new_path" 2> /dev/null`
18440  # bat and cmd files are not always considered executable in cygwin causing which
18441  # to not find them
18442  if test "x$new_path" = x \
18443      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18444      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18445    new_path=`$CYGPATH -u "$path"`
18446  fi
18447  if test "x$new_path" = x; then
18448    # Oops. Which didn't find the executable.
18449    # The splitting of arguments from the executable at a space might have been incorrect,
18450    # since paths with space are more likely in Windows. Give it another try with the whole
18451    # argument.
18452    path="$complete"
18453    arguments="EOL"
18454    new_path=`$CYGPATH -u "$path"`
18455    new_path=`$WHICH "$new_path" 2> /dev/null`
18456    # bat and cmd files are not always considered executable in cygwin causing which
18457    # to not find them
18458    if test "x$new_path" = x \
18459        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18460        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18461      new_path=`$CYGPATH -u "$path"`
18462    fi
18463    if test "x$new_path" = x; then
18464      # It's still not found. Now this is an unrecoverable error.
18465      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18466$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18467      has_space=`$ECHO "$complete" | $GREP " "`
18468      if test "x$has_space" != x; then
18469        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18470$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18471      fi
18472      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18473    fi
18474  fi
18475
18476  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18477  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18478  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18479  # "foo.exe" is OK but "foo" is an error.
18480  #
18481  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18482  # It is also a way to make sure we got the proper file name for the real test later on.
18483  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18484  if test "x$test_shortpath" = x; then
18485    # Short path failed, file does not exist as specified.
18486    # Try adding .exe or .cmd
18487    if test -f "${new_path}.exe"; then
18488      input_to_shortpath="${new_path}.exe"
18489    elif test -f "${new_path}.cmd"; then
18490      input_to_shortpath="${new_path}.cmd"
18491    else
18492      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18493$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18494      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18495$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18496      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18497    fi
18498  else
18499    input_to_shortpath="$new_path"
18500  fi
18501
18502  # Call helper function which possibly converts this using DOS-style short mode.
18503  # If so, the updated path is stored in $new_path.
18504  new_path="$input_to_shortpath"
18505
18506  input_path="$input_to_shortpath"
18507  # Check if we need to convert this using DOS-style short mode. If the path
18508  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18509  # take no chances and rewrite it.
18510  # Note: m4 eats our [], so we need to use [ and ] instead.
18511  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18512  if test "x$has_forbidden_chars" != x; then
18513    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18514    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18515    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18516    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18517      # Going to short mode and back again did indeed matter. Since short mode is
18518      # case insensitive, let's make it lowercase to improve readability.
18519      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18520      # Now convert it back to Unix-style (cygpath)
18521      input_path=`$CYGPATH -u "$shortmode_path"`
18522      new_path="$input_path"
18523    fi
18524  fi
18525
18526  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18527  if test "x$test_cygdrive_prefix" = x; then
18528    # As a simple fix, exclude /usr/bin since it's not a real path.
18529    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18530      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18531      # a path prefixed by /cygdrive for fixpath to work.
18532      new_path="$CYGWIN_ROOT_PATH$input_path"
18533    fi
18534  fi
18535
18536  # remove trailing .exe if any
18537  new_path="${new_path/%.exe/}"
18538
18539    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18540
18541  # First separate the path from the arguments. This will split at the first
18542  # space.
18543  complete="$FOUND_MAKE"
18544  path="${complete%% *}"
18545  tmp="$complete EOL"
18546  arguments="${tmp#* }"
18547
18548  # Input might be given as Windows format, start by converting to
18549  # unix format.
18550  new_path="$path"
18551
18552  windows_path="$new_path"
18553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18554    unix_path=`$CYGPATH -u "$windows_path"`
18555    new_path="$unix_path"
18556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18558    new_path="$unix_path"
18559  fi
18560
18561
18562  # Now try to locate executable using which
18563  new_path=`$WHICH "$new_path" 2> /dev/null`
18564
18565  if test "x$new_path" = x; then
18566    # Oops. Which didn't find the executable.
18567    # The splitting of arguments from the executable at a space might have been incorrect,
18568    # since paths with space are more likely in Windows. Give it another try with the whole
18569    # argument.
18570    path="$complete"
18571    arguments="EOL"
18572    new_path="$path"
18573
18574  windows_path="$new_path"
18575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18576    unix_path=`$CYGPATH -u "$windows_path"`
18577    new_path="$unix_path"
18578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18580    new_path="$unix_path"
18581  fi
18582
18583
18584    new_path=`$WHICH "$new_path" 2> /dev/null`
18585    # bat and cmd files are not always considered executable in MSYS causing which
18586    # to not find them
18587    if test "x$new_path" = x \
18588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18590      new_path="$path"
18591
18592  windows_path="$new_path"
18593  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18594    unix_path=`$CYGPATH -u "$windows_path"`
18595    new_path="$unix_path"
18596  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18597    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18598    new_path="$unix_path"
18599  fi
18600
18601    fi
18602
18603    if test "x$new_path" = x; then
18604      # It's still not found. Now this is an unrecoverable error.
18605      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18606$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18607      has_space=`$ECHO "$complete" | $GREP " "`
18608      if test "x$has_space" != x; then
18609        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18610$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18611      fi
18612      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18613    fi
18614  fi
18615
18616  # Now new_path has a complete unix path to the binary
18617  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18618    # Keep paths in /bin as-is, but remove trailing .exe if any
18619    new_path="${new_path/%.exe/}"
18620    # Do not save /bin paths to all_fixpath_prefixes!
18621  else
18622    # Not in mixed or Windows style, start by that.
18623    new_path=`cmd //c echo $new_path`
18624
18625  input_path="$new_path"
18626  # Check if we need to convert this using DOS-style short mode. If the path
18627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18628  # take no chances and rewrite it.
18629  # Note: m4 eats our [], so we need to use [ and ] instead.
18630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18631  if test "x$has_forbidden_chars" != x; then
18632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18634  fi
18635
18636    # Output is in $new_path
18637
18638  windows_path="$new_path"
18639  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18640    unix_path=`$CYGPATH -u "$windows_path"`
18641    new_path="$unix_path"
18642  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18643    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18644    new_path="$unix_path"
18645  fi
18646
18647    # remove trailing .exe if any
18648    new_path="${new_path/%.exe/}"
18649
18650    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18651    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18652  fi
18653
18654    else
18655      # We're on a unix platform. Hooray! :)
18656      # First separate the path from the arguments. This will split at the first
18657      # space.
18658      complete="$FOUND_MAKE"
18659      path="${complete%% *}"
18660      tmp="$complete EOL"
18661      arguments="${tmp#* }"
18662
18663      # Cannot rely on the command "which" here since it doesn't always work.
18664      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18665      if test -z "$is_absolute_path"; then
18666        # Path to executable is not absolute. Find it.
18667        IFS_save="$IFS"
18668        IFS=:
18669        for p in $PATH; do
18670          if test -f "$p/$path" && test -x "$p/$path"; then
18671            new_path="$p/$path"
18672            break
18673          fi
18674        done
18675        IFS="$IFS_save"
18676      else
18677        # This is an absolute path, we can use it without further modifications.
18678        new_path="$path"
18679      fi
18680
18681      if test "x$new_path" = x; then
18682        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18683$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18684        has_space=`$ECHO "$complete" | $GREP " "`
18685        if test "x$has_space" != x; then
18686          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18687$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18688        fi
18689        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18690      fi
18691    fi
18692
18693    # Now join together the path and the arguments once again
18694    if test "x$arguments" != xEOL; then
18695      new_complete="$new_path ${arguments% *}"
18696    else
18697      new_complete="$new_path"
18698    fi
18699
18700    if test "x$complete" != "x$new_complete"; then
18701      FOUND_MAKE="$new_complete"
18702      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18703$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18704    fi
18705  fi
18706
18707        fi
18708      fi
18709    fi
18710  fi
18711
18712        if test "x$FOUND_MAKE" = x; then
18713          for ac_prog in make
18714do
18715  # Extract the first word of "$ac_prog", so it can be a program name with args.
18716set dummy $ac_prog; ac_word=$2
18717{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18718$as_echo_n "checking for $ac_word... " >&6; }
18719if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18720  $as_echo_n "(cached) " >&6
18721else
18722  case $CHECK_TOOLSDIR_MAKE in
18723  [\\/]* | ?:[\\/]*)
18724  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18725  ;;
18726  *)
18727  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18728for as_dir in $PATH
18729do
18730  IFS=$as_save_IFS
18731  test -z "$as_dir" && as_dir=.
18732    for ac_exec_ext in '' $ac_executable_extensions; do
18733  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18734    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18735    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18736    break 2
18737  fi
18738done
18739  done
18740IFS=$as_save_IFS
18741
18742  ;;
18743esac
18744fi
18745CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18746if test -n "$CHECK_TOOLSDIR_MAKE"; then
18747  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18748$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18749else
18750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18751$as_echo "no" >&6; }
18752fi
18753
18754
18755  test -n "$CHECK_TOOLSDIR_MAKE" && break
18756done
18757
18758
18759  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18760  DESCRIPTION="make in tools-dir"
18761
18762  # On Cygwin, we require a newer version of make than on other platforms
18763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18764    MAKE_VERSION_EXPR="-e 4\."
18765    MAKE_REQUIRED_VERSION="4.0"
18766   else
18767    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18768    MAKE_REQUIRED_VERSION="3.81"
18769  fi
18770
18771  if test "x$MAKE_CANDIDATE" != x; then
18772    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18773$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18774    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18775    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18776    if test "x$IS_GNU_MAKE" = x; then
18777      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18778$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18779    else
18780      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18781      if test "x$IS_MODERN_MAKE" = x; then
18782        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
18783$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
18784      else
18785        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18786          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18787            MAKE_EXPECTED_ENV='cygwin'
18788          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18789            MAKE_EXPECTED_ENV='msys'
18790          else
18791            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18792          fi
18793          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18794          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18795        else
18796          # Not relevant for non-Windows
18797          IS_MAKE_CORRECT_ENV=true
18798        fi
18799        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18800          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
18801$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
18802        else
18803          FOUND_MAKE=$MAKE_CANDIDATE
18804
18805  # Only process if variable expands to non-empty
18806
18807  if test "x$FOUND_MAKE" != x; then
18808    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18809
18810  # First separate the path from the arguments. This will split at the first
18811  # space.
18812  complete="$FOUND_MAKE"
18813  path="${complete%% *}"
18814  tmp="$complete EOL"
18815  arguments="${tmp#* }"
18816
18817  # Input might be given as Windows format, start by converting to
18818  # unix format.
18819  new_path=`$CYGPATH -u "$path"`
18820
18821  # Now try to locate executable using which
18822  new_path=`$WHICH "$new_path" 2> /dev/null`
18823  # bat and cmd files are not always considered executable in cygwin causing which
18824  # to not find them
18825  if test "x$new_path" = x \
18826      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18827      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18828    new_path=`$CYGPATH -u "$path"`
18829  fi
18830  if test "x$new_path" = x; then
18831    # Oops. Which didn't find the executable.
18832    # The splitting of arguments from the executable at a space might have been incorrect,
18833    # since paths with space are more likely in Windows. Give it another try with the whole
18834    # argument.
18835    path="$complete"
18836    arguments="EOL"
18837    new_path=`$CYGPATH -u "$path"`
18838    new_path=`$WHICH "$new_path" 2> /dev/null`
18839    # bat and cmd files are not always considered executable in cygwin causing which
18840    # to not find them
18841    if test "x$new_path" = x \
18842        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18843        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18844      new_path=`$CYGPATH -u "$path"`
18845    fi
18846    if test "x$new_path" = x; then
18847      # It's still not found. Now this is an unrecoverable error.
18848      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18849$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18850      has_space=`$ECHO "$complete" | $GREP " "`
18851      if test "x$has_space" != x; then
18852        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18853$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18854      fi
18855      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18856    fi
18857  fi
18858
18859  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18860  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18861  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18862  # "foo.exe" is OK but "foo" is an error.
18863  #
18864  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18865  # It is also a way to make sure we got the proper file name for the real test later on.
18866  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18867  if test "x$test_shortpath" = x; then
18868    # Short path failed, file does not exist as specified.
18869    # Try adding .exe or .cmd
18870    if test -f "${new_path}.exe"; then
18871      input_to_shortpath="${new_path}.exe"
18872    elif test -f "${new_path}.cmd"; then
18873      input_to_shortpath="${new_path}.cmd"
18874    else
18875      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18876$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18877      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18878$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18879      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18880    fi
18881  else
18882    input_to_shortpath="$new_path"
18883  fi
18884
18885  # Call helper function which possibly converts this using DOS-style short mode.
18886  # If so, the updated path is stored in $new_path.
18887  new_path="$input_to_shortpath"
18888
18889  input_path="$input_to_shortpath"
18890  # Check if we need to convert this using DOS-style short mode. If the path
18891  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18892  # take no chances and rewrite it.
18893  # Note: m4 eats our [], so we need to use [ and ] instead.
18894  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18895  if test "x$has_forbidden_chars" != x; then
18896    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18897    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18898    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18899    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18900      # Going to short mode and back again did indeed matter. Since short mode is
18901      # case insensitive, let's make it lowercase to improve readability.
18902      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18903      # Now convert it back to Unix-style (cygpath)
18904      input_path=`$CYGPATH -u "$shortmode_path"`
18905      new_path="$input_path"
18906    fi
18907  fi
18908
18909  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18910  if test "x$test_cygdrive_prefix" = x; then
18911    # As a simple fix, exclude /usr/bin since it's not a real path.
18912    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18913      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18914      # a path prefixed by /cygdrive for fixpath to work.
18915      new_path="$CYGWIN_ROOT_PATH$input_path"
18916    fi
18917  fi
18918
18919  # remove trailing .exe if any
18920  new_path="${new_path/%.exe/}"
18921
18922    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18923
18924  # First separate the path from the arguments. This will split at the first
18925  # space.
18926  complete="$FOUND_MAKE"
18927  path="${complete%% *}"
18928  tmp="$complete EOL"
18929  arguments="${tmp#* }"
18930
18931  # Input might be given as Windows format, start by converting to
18932  # unix format.
18933  new_path="$path"
18934
18935  windows_path="$new_path"
18936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18937    unix_path=`$CYGPATH -u "$windows_path"`
18938    new_path="$unix_path"
18939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18941    new_path="$unix_path"
18942  fi
18943
18944
18945  # Now try to locate executable using which
18946  new_path=`$WHICH "$new_path" 2> /dev/null`
18947
18948  if test "x$new_path" = x; then
18949    # Oops. Which didn't find the executable.
18950    # The splitting of arguments from the executable at a space might have been incorrect,
18951    # since paths with space are more likely in Windows. Give it another try with the whole
18952    # argument.
18953    path="$complete"
18954    arguments="EOL"
18955    new_path="$path"
18956
18957  windows_path="$new_path"
18958  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18959    unix_path=`$CYGPATH -u "$windows_path"`
18960    new_path="$unix_path"
18961  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18962    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18963    new_path="$unix_path"
18964  fi
18965
18966
18967    new_path=`$WHICH "$new_path" 2> /dev/null`
18968    # bat and cmd files are not always considered executable in MSYS causing which
18969    # to not find them
18970    if test "x$new_path" = x \
18971        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18972        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18973      new_path="$path"
18974
18975  windows_path="$new_path"
18976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18977    unix_path=`$CYGPATH -u "$windows_path"`
18978    new_path="$unix_path"
18979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18981    new_path="$unix_path"
18982  fi
18983
18984    fi
18985
18986    if test "x$new_path" = x; then
18987      # It's still not found. Now this is an unrecoverable error.
18988      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18989$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18990      has_space=`$ECHO "$complete" | $GREP " "`
18991      if test "x$has_space" != x; then
18992        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18993$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18994      fi
18995      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18996    fi
18997  fi
18998
18999  # Now new_path has a complete unix path to the binary
19000  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19001    # Keep paths in /bin as-is, but remove trailing .exe if any
19002    new_path="${new_path/%.exe/}"
19003    # Do not save /bin paths to all_fixpath_prefixes!
19004  else
19005    # Not in mixed or Windows style, start by that.
19006    new_path=`cmd //c echo $new_path`
19007
19008  input_path="$new_path"
19009  # Check if we need to convert this using DOS-style short mode. If the path
19010  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19011  # take no chances and rewrite it.
19012  # Note: m4 eats our [], so we need to use [ and ] instead.
19013  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19014  if test "x$has_forbidden_chars" != x; then
19015    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19016    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19017  fi
19018
19019    # Output is in $new_path
19020
19021  windows_path="$new_path"
19022  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19023    unix_path=`$CYGPATH -u "$windows_path"`
19024    new_path="$unix_path"
19025  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19026    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19027    new_path="$unix_path"
19028  fi
19029
19030    # remove trailing .exe if any
19031    new_path="${new_path/%.exe/}"
19032
19033    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19034    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19035  fi
19036
19037    else
19038      # We're on a unix platform. Hooray! :)
19039      # First separate the path from the arguments. This will split at the first
19040      # space.
19041      complete="$FOUND_MAKE"
19042      path="${complete%% *}"
19043      tmp="$complete EOL"
19044      arguments="${tmp#* }"
19045
19046      # Cannot rely on the command "which" here since it doesn't always work.
19047      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19048      if test -z "$is_absolute_path"; then
19049        # Path to executable is not absolute. Find it.
19050        IFS_save="$IFS"
19051        IFS=:
19052        for p in $PATH; do
19053          if test -f "$p/$path" && test -x "$p/$path"; then
19054            new_path="$p/$path"
19055            break
19056          fi
19057        done
19058        IFS="$IFS_save"
19059      else
19060        # This is an absolute path, we can use it without further modifications.
19061        new_path="$path"
19062      fi
19063
19064      if test "x$new_path" = x; then
19065        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19066$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19067        has_space=`$ECHO "$complete" | $GREP " "`
19068        if test "x$has_space" != x; then
19069          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19070$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19071        fi
19072        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19073      fi
19074    fi
19075
19076    # Now join together the path and the arguments once again
19077    if test "x$arguments" != xEOL; then
19078      new_complete="$new_path ${arguments% *}"
19079    else
19080      new_complete="$new_path"
19081    fi
19082
19083    if test "x$complete" != "x$new_complete"; then
19084      FOUND_MAKE="$new_complete"
19085      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19086$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19087    fi
19088  fi
19089
19090        fi
19091      fi
19092    fi
19093  fi
19094
19095        fi
19096        PATH=$OLD_PATH
19097      fi
19098    fi
19099
19100    if test "x$FOUND_MAKE" = x; then
19101      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
19102    fi
19103
19104  else
19105    # The variable is set, but is it from the command line or the environment?
19106
19107    # Try to remove the string !MAKE! from our list.
19108    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
19109    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
19110      # If it failed, the variable was not from the command line. Ignore it,
19111      # but warn the user (except for BASH, which is always set by the calling BASH).
19112      if test "xMAKE" != xBASH; then
19113        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
19114$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
19115      fi
19116      # Try to locate tool using the code snippet
19117
19118    # Try our hardest to locate a correct version of GNU make
19119    for ac_prog in gmake
19120do
19121  # Extract the first word of "$ac_prog", so it can be a program name with args.
19122set dummy $ac_prog; ac_word=$2
19123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19124$as_echo_n "checking for $ac_word... " >&6; }
19125if ${ac_cv_path_CHECK_GMAKE+:} false; then :
19126  $as_echo_n "(cached) " >&6
19127else
19128  case $CHECK_GMAKE in
19129  [\\/]* | ?:[\\/]*)
19130  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
19131  ;;
19132  *)
19133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19134for as_dir in $PATH
19135do
19136  IFS=$as_save_IFS
19137  test -z "$as_dir" && as_dir=.
19138    for ac_exec_ext in '' $ac_executable_extensions; do
19139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19140    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19142    break 2
19143  fi
19144done
19145  done
19146IFS=$as_save_IFS
19147
19148  ;;
19149esac
19150fi
19151CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
19152if test -n "$CHECK_GMAKE"; then
19153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
19154$as_echo "$CHECK_GMAKE" >&6; }
19155else
19156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19157$as_echo "no" >&6; }
19158fi
19159
19160
19161  test -n "$CHECK_GMAKE" && break
19162done
19163
19164
19165  MAKE_CANDIDATE=""$CHECK_GMAKE""
19166  DESCRIPTION="gmake in PATH"
19167
19168  # On Cygwin, we require a newer version of make than on other platforms
19169  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19170    MAKE_VERSION_EXPR="-e 4\."
19171    MAKE_REQUIRED_VERSION="4.0"
19172   else
19173    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19174    MAKE_REQUIRED_VERSION="3.81"
19175  fi
19176
19177  if test "x$MAKE_CANDIDATE" != x; then
19178    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19179$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19180    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19181    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19182    if test "x$IS_GNU_MAKE" = x; then
19183      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19184$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19185    else
19186      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19187      if test "x$IS_MODERN_MAKE" = x; then
19188        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19189$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19190      else
19191        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19192          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19193            MAKE_EXPECTED_ENV='cygwin'
19194          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19195            MAKE_EXPECTED_ENV='msys'
19196          else
19197            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19198          fi
19199          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19200          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19201        else
19202          # Not relevant for non-Windows
19203          IS_MAKE_CORRECT_ENV=true
19204        fi
19205        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19206          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19207$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19208        else
19209          FOUND_MAKE=$MAKE_CANDIDATE
19210
19211  # Only process if variable expands to non-empty
19212
19213  if test "x$FOUND_MAKE" != x; then
19214    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19215
19216  # First separate the path from the arguments. This will split at the first
19217  # space.
19218  complete="$FOUND_MAKE"
19219  path="${complete%% *}"
19220  tmp="$complete EOL"
19221  arguments="${tmp#* }"
19222
19223  # Input might be given as Windows format, start by converting to
19224  # unix format.
19225  new_path=`$CYGPATH -u "$path"`
19226
19227  # Now try to locate executable using which
19228  new_path=`$WHICH "$new_path" 2> /dev/null`
19229  # bat and cmd files are not always considered executable in cygwin causing which
19230  # to not find them
19231  if test "x$new_path" = x \
19232      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19233      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19234    new_path=`$CYGPATH -u "$path"`
19235  fi
19236  if test "x$new_path" = x; then
19237    # Oops. Which didn't find the executable.
19238    # The splitting of arguments from the executable at a space might have been incorrect,
19239    # since paths with space are more likely in Windows. Give it another try with the whole
19240    # argument.
19241    path="$complete"
19242    arguments="EOL"
19243    new_path=`$CYGPATH -u "$path"`
19244    new_path=`$WHICH "$new_path" 2> /dev/null`
19245    # bat and cmd files are not always considered executable in cygwin causing which
19246    # to not find them
19247    if test "x$new_path" = x \
19248        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19249        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19250      new_path=`$CYGPATH -u "$path"`
19251    fi
19252    if test "x$new_path" = x; then
19253      # It's still not found. Now this is an unrecoverable error.
19254      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19255$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19256      has_space=`$ECHO "$complete" | $GREP " "`
19257      if test "x$has_space" != x; then
19258        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19259$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19260      fi
19261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19262    fi
19263  fi
19264
19265  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19266  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19267  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19268  # "foo.exe" is OK but "foo" is an error.
19269  #
19270  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19271  # It is also a way to make sure we got the proper file name for the real test later on.
19272  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19273  if test "x$test_shortpath" = x; then
19274    # Short path failed, file does not exist as specified.
19275    # Try adding .exe or .cmd
19276    if test -f "${new_path}.exe"; then
19277      input_to_shortpath="${new_path}.exe"
19278    elif test -f "${new_path}.cmd"; then
19279      input_to_shortpath="${new_path}.cmd"
19280    else
19281      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19282$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19283      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19284$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19285      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19286    fi
19287  else
19288    input_to_shortpath="$new_path"
19289  fi
19290
19291  # Call helper function which possibly converts this using DOS-style short mode.
19292  # If so, the updated path is stored in $new_path.
19293  new_path="$input_to_shortpath"
19294
19295  input_path="$input_to_shortpath"
19296  # Check if we need to convert this using DOS-style short mode. If the path
19297  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19298  # take no chances and rewrite it.
19299  # Note: m4 eats our [], so we need to use [ and ] instead.
19300  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19301  if test "x$has_forbidden_chars" != x; then
19302    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19303    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19304    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19305    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19306      # Going to short mode and back again did indeed matter. Since short mode is
19307      # case insensitive, let's make it lowercase to improve readability.
19308      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19309      # Now convert it back to Unix-style (cygpath)
19310      input_path=`$CYGPATH -u "$shortmode_path"`
19311      new_path="$input_path"
19312    fi
19313  fi
19314
19315  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19316  if test "x$test_cygdrive_prefix" = x; then
19317    # As a simple fix, exclude /usr/bin since it's not a real path.
19318    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19319      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19320      # a path prefixed by /cygdrive for fixpath to work.
19321      new_path="$CYGWIN_ROOT_PATH$input_path"
19322    fi
19323  fi
19324
19325  # remove trailing .exe if any
19326  new_path="${new_path/%.exe/}"
19327
19328    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19329
19330  # First separate the path from the arguments. This will split at the first
19331  # space.
19332  complete="$FOUND_MAKE"
19333  path="${complete%% *}"
19334  tmp="$complete EOL"
19335  arguments="${tmp#* }"
19336
19337  # Input might be given as Windows format, start by converting to
19338  # unix format.
19339  new_path="$path"
19340
19341  windows_path="$new_path"
19342  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19343    unix_path=`$CYGPATH -u "$windows_path"`
19344    new_path="$unix_path"
19345  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19346    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19347    new_path="$unix_path"
19348  fi
19349
19350
19351  # Now try to locate executable using which
19352  new_path=`$WHICH "$new_path" 2> /dev/null`
19353
19354  if test "x$new_path" = x; then
19355    # Oops. Which didn't find the executable.
19356    # The splitting of arguments from the executable at a space might have been incorrect,
19357    # since paths with space are more likely in Windows. Give it another try with the whole
19358    # argument.
19359    path="$complete"
19360    arguments="EOL"
19361    new_path="$path"
19362
19363  windows_path="$new_path"
19364  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19365    unix_path=`$CYGPATH -u "$windows_path"`
19366    new_path="$unix_path"
19367  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19368    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19369    new_path="$unix_path"
19370  fi
19371
19372
19373    new_path=`$WHICH "$new_path" 2> /dev/null`
19374    # bat and cmd files are not always considered executable in MSYS causing which
19375    # to not find them
19376    if test "x$new_path" = x \
19377        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19378        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19379      new_path="$path"
19380
19381  windows_path="$new_path"
19382  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19383    unix_path=`$CYGPATH -u "$windows_path"`
19384    new_path="$unix_path"
19385  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19386    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19387    new_path="$unix_path"
19388  fi
19389
19390    fi
19391
19392    if test "x$new_path" = x; then
19393      # It's still not found. Now this is an unrecoverable error.
19394      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19395$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19396      has_space=`$ECHO "$complete" | $GREP " "`
19397      if test "x$has_space" != x; then
19398        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19399$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19400      fi
19401      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19402    fi
19403  fi
19404
19405  # Now new_path has a complete unix path to the binary
19406  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19407    # Keep paths in /bin as-is, but remove trailing .exe if any
19408    new_path="${new_path/%.exe/}"
19409    # Do not save /bin paths to all_fixpath_prefixes!
19410  else
19411    # Not in mixed or Windows style, start by that.
19412    new_path=`cmd //c echo $new_path`
19413
19414  input_path="$new_path"
19415  # Check if we need to convert this using DOS-style short mode. If the path
19416  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19417  # take no chances and rewrite it.
19418  # Note: m4 eats our [], so we need to use [ and ] instead.
19419  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19420  if test "x$has_forbidden_chars" != x; then
19421    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19422    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19423  fi
19424
19425    # Output is in $new_path
19426
19427  windows_path="$new_path"
19428  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19429    unix_path=`$CYGPATH -u "$windows_path"`
19430    new_path="$unix_path"
19431  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19432    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19433    new_path="$unix_path"
19434  fi
19435
19436    # remove trailing .exe if any
19437    new_path="${new_path/%.exe/}"
19438
19439    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19440    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19441  fi
19442
19443    else
19444      # We're on a unix platform. Hooray! :)
19445      # First separate the path from the arguments. This will split at the first
19446      # space.
19447      complete="$FOUND_MAKE"
19448      path="${complete%% *}"
19449      tmp="$complete EOL"
19450      arguments="${tmp#* }"
19451
19452      # Cannot rely on the command "which" here since it doesn't always work.
19453      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19454      if test -z "$is_absolute_path"; then
19455        # Path to executable is not absolute. Find it.
19456        IFS_save="$IFS"
19457        IFS=:
19458        for p in $PATH; do
19459          if test -f "$p/$path" && test -x "$p/$path"; then
19460            new_path="$p/$path"
19461            break
19462          fi
19463        done
19464        IFS="$IFS_save"
19465      else
19466        # This is an absolute path, we can use it without further modifications.
19467        new_path="$path"
19468      fi
19469
19470      if test "x$new_path" = x; then
19471        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19472$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19473        has_space=`$ECHO "$complete" | $GREP " "`
19474        if test "x$has_space" != x; then
19475          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19476$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19477        fi
19478        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19479      fi
19480    fi
19481
19482    # Now join together the path and the arguments once again
19483    if test "x$arguments" != xEOL; then
19484      new_complete="$new_path ${arguments% *}"
19485    else
19486      new_complete="$new_path"
19487    fi
19488
19489    if test "x$complete" != "x$new_complete"; then
19490      FOUND_MAKE="$new_complete"
19491      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19492$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19493    fi
19494  fi
19495
19496        fi
19497      fi
19498    fi
19499  fi
19500
19501
19502    if test "x$FOUND_MAKE" = x; then
19503      for ac_prog in make
19504do
19505  # Extract the first word of "$ac_prog", so it can be a program name with args.
19506set dummy $ac_prog; ac_word=$2
19507{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19508$as_echo_n "checking for $ac_word... " >&6; }
19509if ${ac_cv_path_CHECK_MAKE+:} false; then :
19510  $as_echo_n "(cached) " >&6
19511else
19512  case $CHECK_MAKE in
19513  [\\/]* | ?:[\\/]*)
19514  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19515  ;;
19516  *)
19517  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19518for as_dir in $PATH
19519do
19520  IFS=$as_save_IFS
19521  test -z "$as_dir" && as_dir=.
19522    for ac_exec_ext in '' $ac_executable_extensions; do
19523  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19524    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19525    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19526    break 2
19527  fi
19528done
19529  done
19530IFS=$as_save_IFS
19531
19532  ;;
19533esac
19534fi
19535CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19536if test -n "$CHECK_MAKE"; then
19537  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19538$as_echo "$CHECK_MAKE" >&6; }
19539else
19540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19541$as_echo "no" >&6; }
19542fi
19543
19544
19545  test -n "$CHECK_MAKE" && break
19546done
19547
19548
19549  MAKE_CANDIDATE=""$CHECK_MAKE""
19550  DESCRIPTION="make in PATH"
19551
19552  # On Cygwin, we require a newer version of make than on other platforms
19553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19554    MAKE_VERSION_EXPR="-e 4\."
19555    MAKE_REQUIRED_VERSION="4.0"
19556   else
19557    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19558    MAKE_REQUIRED_VERSION="3.81"
19559  fi
19560
19561  if test "x$MAKE_CANDIDATE" != x; then
19562    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19563$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19564    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19565    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19566    if test "x$IS_GNU_MAKE" = x; then
19567      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19568$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19569    else
19570      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19571      if test "x$IS_MODERN_MAKE" = x; then
19572        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19573$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19574      else
19575        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19576          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19577            MAKE_EXPECTED_ENV='cygwin'
19578          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19579            MAKE_EXPECTED_ENV='msys'
19580          else
19581            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19582          fi
19583          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19584          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19585        else
19586          # Not relevant for non-Windows
19587          IS_MAKE_CORRECT_ENV=true
19588        fi
19589        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19590          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19591$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19592        else
19593          FOUND_MAKE=$MAKE_CANDIDATE
19594
19595  # Only process if variable expands to non-empty
19596
19597  if test "x$FOUND_MAKE" != x; then
19598    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19599
19600  # First separate the path from the arguments. This will split at the first
19601  # space.
19602  complete="$FOUND_MAKE"
19603  path="${complete%% *}"
19604  tmp="$complete EOL"
19605  arguments="${tmp#* }"
19606
19607  # Input might be given as Windows format, start by converting to
19608  # unix format.
19609  new_path=`$CYGPATH -u "$path"`
19610
19611  # Now try to locate executable using which
19612  new_path=`$WHICH "$new_path" 2> /dev/null`
19613  # bat and cmd files are not always considered executable in cygwin causing which
19614  # to not find them
19615  if test "x$new_path" = x \
19616      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19617      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19618    new_path=`$CYGPATH -u "$path"`
19619  fi
19620  if test "x$new_path" = x; then
19621    # Oops. Which didn't find the executable.
19622    # The splitting of arguments from the executable at a space might have been incorrect,
19623    # since paths with space are more likely in Windows. Give it another try with the whole
19624    # argument.
19625    path="$complete"
19626    arguments="EOL"
19627    new_path=`$CYGPATH -u "$path"`
19628    new_path=`$WHICH "$new_path" 2> /dev/null`
19629    # bat and cmd files are not always considered executable in cygwin causing which
19630    # to not find them
19631    if test "x$new_path" = x \
19632        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19633        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19634      new_path=`$CYGPATH -u "$path"`
19635    fi
19636    if test "x$new_path" = x; then
19637      # It's still not found. Now this is an unrecoverable error.
19638      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19639$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19640      has_space=`$ECHO "$complete" | $GREP " "`
19641      if test "x$has_space" != x; then
19642        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19643$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19644      fi
19645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19646    fi
19647  fi
19648
19649  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19650  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19651  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19652  # "foo.exe" is OK but "foo" is an error.
19653  #
19654  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19655  # It is also a way to make sure we got the proper file name for the real test later on.
19656  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19657  if test "x$test_shortpath" = x; then
19658    # Short path failed, file does not exist as specified.
19659    # Try adding .exe or .cmd
19660    if test -f "${new_path}.exe"; then
19661      input_to_shortpath="${new_path}.exe"
19662    elif test -f "${new_path}.cmd"; then
19663      input_to_shortpath="${new_path}.cmd"
19664    else
19665      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19666$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19667      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19668$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19669      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19670    fi
19671  else
19672    input_to_shortpath="$new_path"
19673  fi
19674
19675  # Call helper function which possibly converts this using DOS-style short mode.
19676  # If so, the updated path is stored in $new_path.
19677  new_path="$input_to_shortpath"
19678
19679  input_path="$input_to_shortpath"
19680  # Check if we need to convert this using DOS-style short mode. If the path
19681  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19682  # take no chances and rewrite it.
19683  # Note: m4 eats our [], so we need to use [ and ] instead.
19684  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19685  if test "x$has_forbidden_chars" != x; then
19686    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19687    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19688    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19689    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19690      # Going to short mode and back again did indeed matter. Since short mode is
19691      # case insensitive, let's make it lowercase to improve readability.
19692      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19693      # Now convert it back to Unix-style (cygpath)
19694      input_path=`$CYGPATH -u "$shortmode_path"`
19695      new_path="$input_path"
19696    fi
19697  fi
19698
19699  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19700  if test "x$test_cygdrive_prefix" = x; then
19701    # As a simple fix, exclude /usr/bin since it's not a real path.
19702    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19703      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19704      # a path prefixed by /cygdrive for fixpath to work.
19705      new_path="$CYGWIN_ROOT_PATH$input_path"
19706    fi
19707  fi
19708
19709  # remove trailing .exe if any
19710  new_path="${new_path/%.exe/}"
19711
19712    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19713
19714  # First separate the path from the arguments. This will split at the first
19715  # space.
19716  complete="$FOUND_MAKE"
19717  path="${complete%% *}"
19718  tmp="$complete EOL"
19719  arguments="${tmp#* }"
19720
19721  # Input might be given as Windows format, start by converting to
19722  # unix format.
19723  new_path="$path"
19724
19725  windows_path="$new_path"
19726  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19727    unix_path=`$CYGPATH -u "$windows_path"`
19728    new_path="$unix_path"
19729  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19730    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19731    new_path="$unix_path"
19732  fi
19733
19734
19735  # Now try to locate executable using which
19736  new_path=`$WHICH "$new_path" 2> /dev/null`
19737
19738  if test "x$new_path" = x; then
19739    # Oops. Which didn't find the executable.
19740    # The splitting of arguments from the executable at a space might have been incorrect,
19741    # since paths with space are more likely in Windows. Give it another try with the whole
19742    # argument.
19743    path="$complete"
19744    arguments="EOL"
19745    new_path="$path"
19746
19747  windows_path="$new_path"
19748  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19749    unix_path=`$CYGPATH -u "$windows_path"`
19750    new_path="$unix_path"
19751  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19752    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19753    new_path="$unix_path"
19754  fi
19755
19756
19757    new_path=`$WHICH "$new_path" 2> /dev/null`
19758    # bat and cmd files are not always considered executable in MSYS causing which
19759    # to not find them
19760    if test "x$new_path" = x \
19761        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19762        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19763      new_path="$path"
19764
19765  windows_path="$new_path"
19766  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19767    unix_path=`$CYGPATH -u "$windows_path"`
19768    new_path="$unix_path"
19769  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19770    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19771    new_path="$unix_path"
19772  fi
19773
19774    fi
19775
19776    if test "x$new_path" = x; then
19777      # It's still not found. Now this is an unrecoverable error.
19778      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19779$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19780      has_space=`$ECHO "$complete" | $GREP " "`
19781      if test "x$has_space" != x; then
19782        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19783$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19784      fi
19785      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19786    fi
19787  fi
19788
19789  # Now new_path has a complete unix path to the binary
19790  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19791    # Keep paths in /bin as-is, but remove trailing .exe if any
19792    new_path="${new_path/%.exe/}"
19793    # Do not save /bin paths to all_fixpath_prefixes!
19794  else
19795    # Not in mixed or Windows style, start by that.
19796    new_path=`cmd //c echo $new_path`
19797
19798  input_path="$new_path"
19799  # Check if we need to convert this using DOS-style short mode. If the path
19800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19801  # take no chances and rewrite it.
19802  # Note: m4 eats our [], so we need to use [ and ] instead.
19803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19804  if test "x$has_forbidden_chars" != x; then
19805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19806    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19807  fi
19808
19809    # Output is in $new_path
19810
19811  windows_path="$new_path"
19812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19813    unix_path=`$CYGPATH -u "$windows_path"`
19814    new_path="$unix_path"
19815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19817    new_path="$unix_path"
19818  fi
19819
19820    # remove trailing .exe if any
19821    new_path="${new_path/%.exe/}"
19822
19823    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19824    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19825  fi
19826
19827    else
19828      # We're on a unix platform. Hooray! :)
19829      # First separate the path from the arguments. This will split at the first
19830      # space.
19831      complete="$FOUND_MAKE"
19832      path="${complete%% *}"
19833      tmp="$complete EOL"
19834      arguments="${tmp#* }"
19835
19836      # Cannot rely on the command "which" here since it doesn't always work.
19837      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19838      if test -z "$is_absolute_path"; then
19839        # Path to executable is not absolute. Find it.
19840        IFS_save="$IFS"
19841        IFS=:
19842        for p in $PATH; do
19843          if test -f "$p/$path" && test -x "$p/$path"; then
19844            new_path="$p/$path"
19845            break
19846          fi
19847        done
19848        IFS="$IFS_save"
19849      else
19850        # This is an absolute path, we can use it without further modifications.
19851        new_path="$path"
19852      fi
19853
19854      if test "x$new_path" = x; then
19855        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19856$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19857        has_space=`$ECHO "$complete" | $GREP " "`
19858        if test "x$has_space" != x; then
19859          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19860$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19861        fi
19862        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19863      fi
19864    fi
19865
19866    # Now join together the path and the arguments once again
19867    if test "x$arguments" != xEOL; then
19868      new_complete="$new_path ${arguments% *}"
19869    else
19870      new_complete="$new_path"
19871    fi
19872
19873    if test "x$complete" != "x$new_complete"; then
19874      FOUND_MAKE="$new_complete"
19875      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19876$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19877    fi
19878  fi
19879
19880        fi
19881      fi
19882    fi
19883  fi
19884
19885    fi
19886
19887    if test "x$FOUND_MAKE" = x; then
19888      if test "x$TOOLCHAIN_PATH" != x; then
19889        # We have a toolchain path, check that as well before giving up.
19890        OLD_PATH=$PATH
19891        PATH=$TOOLCHAIN_PATH:$PATH
19892        for ac_prog in gmake
19893do
19894  # Extract the first word of "$ac_prog", so it can be a program name with args.
19895set dummy $ac_prog; ac_word=$2
19896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19897$as_echo_n "checking for $ac_word... " >&6; }
19898if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19899  $as_echo_n "(cached) " >&6
19900else
19901  case $CHECK_TOOLSDIR_GMAKE in
19902  [\\/]* | ?:[\\/]*)
19903  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19904  ;;
19905  *)
19906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19907for as_dir in $PATH
19908do
19909  IFS=$as_save_IFS
19910  test -z "$as_dir" && as_dir=.
19911    for ac_exec_ext in '' $ac_executable_extensions; do
19912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19913    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19915    break 2
19916  fi
19917done
19918  done
19919IFS=$as_save_IFS
19920
19921  ;;
19922esac
19923fi
19924CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19925if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19927$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19928else
19929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19930$as_echo "no" >&6; }
19931fi
19932
19933
19934  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19935done
19936
19937
19938  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19939  DESCRIPTION="gmake in tools-dir"
19940
19941  # On Cygwin, we require a newer version of make than on other platforms
19942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19943    MAKE_VERSION_EXPR="-e 4\."
19944    MAKE_REQUIRED_VERSION="4.0"
19945   else
19946    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19947    MAKE_REQUIRED_VERSION="3.81"
19948  fi
19949
19950  if test "x$MAKE_CANDIDATE" != x; then
19951    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19952$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19953    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19954    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19955    if test "x$IS_GNU_MAKE" = x; then
19956      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19957$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19958    else
19959      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19960      if test "x$IS_MODERN_MAKE" = x; then
19961        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
19962$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
19963      else
19964        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19965          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19966            MAKE_EXPECTED_ENV='cygwin'
19967          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19968            MAKE_EXPECTED_ENV='msys'
19969          else
19970            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19971          fi
19972          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19973          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19974        else
19975          # Not relevant for non-Windows
19976          IS_MAKE_CORRECT_ENV=true
19977        fi
19978        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19979          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
19980$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
19981        else
19982          FOUND_MAKE=$MAKE_CANDIDATE
19983
19984  # Only process if variable expands to non-empty
19985
19986  if test "x$FOUND_MAKE" != x; then
19987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19988
19989  # First separate the path from the arguments. This will split at the first
19990  # space.
19991  complete="$FOUND_MAKE"
19992  path="${complete%% *}"
19993  tmp="$complete EOL"
19994  arguments="${tmp#* }"
19995
19996  # Input might be given as Windows format, start by converting to
19997  # unix format.
19998  new_path=`$CYGPATH -u "$path"`
19999
20000  # Now try to locate executable using which
20001  new_path=`$WHICH "$new_path" 2> /dev/null`
20002  # bat and cmd files are not always considered executable in cygwin causing which
20003  # to not find them
20004  if test "x$new_path" = x \
20005      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20006      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20007    new_path=`$CYGPATH -u "$path"`
20008  fi
20009  if test "x$new_path" = x; then
20010    # Oops. Which didn't find the executable.
20011    # The splitting of arguments from the executable at a space might have been incorrect,
20012    # since paths with space are more likely in Windows. Give it another try with the whole
20013    # argument.
20014    path="$complete"
20015    arguments="EOL"
20016    new_path=`$CYGPATH -u "$path"`
20017    new_path=`$WHICH "$new_path" 2> /dev/null`
20018    # bat and cmd files are not always considered executable in cygwin causing which
20019    # to not find them
20020    if test "x$new_path" = x \
20021        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20022        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20023      new_path=`$CYGPATH -u "$path"`
20024    fi
20025    if test "x$new_path" = x; then
20026      # It's still not found. Now this is an unrecoverable error.
20027      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20028$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20029      has_space=`$ECHO "$complete" | $GREP " "`
20030      if test "x$has_space" != x; then
20031        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20032$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20033      fi
20034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20035    fi
20036  fi
20037
20038  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20039  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20040  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20041  # "foo.exe" is OK but "foo" is an error.
20042  #
20043  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20044  # It is also a way to make sure we got the proper file name for the real test later on.
20045  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20046  if test "x$test_shortpath" = x; then
20047    # Short path failed, file does not exist as specified.
20048    # Try adding .exe or .cmd
20049    if test -f "${new_path}.exe"; then
20050      input_to_shortpath="${new_path}.exe"
20051    elif test -f "${new_path}.cmd"; then
20052      input_to_shortpath="${new_path}.cmd"
20053    else
20054      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20055$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20056      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20057$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20058      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20059    fi
20060  else
20061    input_to_shortpath="$new_path"
20062  fi
20063
20064  # Call helper function which possibly converts this using DOS-style short mode.
20065  # If so, the updated path is stored in $new_path.
20066  new_path="$input_to_shortpath"
20067
20068  input_path="$input_to_shortpath"
20069  # Check if we need to convert this using DOS-style short mode. If the path
20070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20071  # take no chances and rewrite it.
20072  # Note: m4 eats our [], so we need to use [ and ] instead.
20073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20074  if test "x$has_forbidden_chars" != x; then
20075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20079      # Going to short mode and back again did indeed matter. Since short mode is
20080      # case insensitive, let's make it lowercase to improve readability.
20081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20082      # Now convert it back to Unix-style (cygpath)
20083      input_path=`$CYGPATH -u "$shortmode_path"`
20084      new_path="$input_path"
20085    fi
20086  fi
20087
20088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20089  if test "x$test_cygdrive_prefix" = x; then
20090    # As a simple fix, exclude /usr/bin since it's not a real path.
20091    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20093      # a path prefixed by /cygdrive for fixpath to work.
20094      new_path="$CYGWIN_ROOT_PATH$input_path"
20095    fi
20096  fi
20097
20098  # remove trailing .exe if any
20099  new_path="${new_path/%.exe/}"
20100
20101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20102
20103  # First separate the path from the arguments. This will split at the first
20104  # space.
20105  complete="$FOUND_MAKE"
20106  path="${complete%% *}"
20107  tmp="$complete EOL"
20108  arguments="${tmp#* }"
20109
20110  # Input might be given as Windows format, start by converting to
20111  # unix format.
20112  new_path="$path"
20113
20114  windows_path="$new_path"
20115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20116    unix_path=`$CYGPATH -u "$windows_path"`
20117    new_path="$unix_path"
20118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20120    new_path="$unix_path"
20121  fi
20122
20123
20124  # Now try to locate executable using which
20125  new_path=`$WHICH "$new_path" 2> /dev/null`
20126
20127  if test "x$new_path" = x; then
20128    # Oops. Which didn't find the executable.
20129    # The splitting of arguments from the executable at a space might have been incorrect,
20130    # since paths with space are more likely in Windows. Give it another try with the whole
20131    # argument.
20132    path="$complete"
20133    arguments="EOL"
20134    new_path="$path"
20135
20136  windows_path="$new_path"
20137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20138    unix_path=`$CYGPATH -u "$windows_path"`
20139    new_path="$unix_path"
20140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20142    new_path="$unix_path"
20143  fi
20144
20145
20146    new_path=`$WHICH "$new_path" 2> /dev/null`
20147    # bat and cmd files are not always considered executable in MSYS causing which
20148    # to not find them
20149    if test "x$new_path" = x \
20150        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20151        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20152      new_path="$path"
20153
20154  windows_path="$new_path"
20155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20156    unix_path=`$CYGPATH -u "$windows_path"`
20157    new_path="$unix_path"
20158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20160    new_path="$unix_path"
20161  fi
20162
20163    fi
20164
20165    if test "x$new_path" = x; then
20166      # It's still not found. Now this is an unrecoverable error.
20167      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20168$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20169      has_space=`$ECHO "$complete" | $GREP " "`
20170      if test "x$has_space" != x; then
20171        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20172$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20173      fi
20174      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20175    fi
20176  fi
20177
20178  # Now new_path has a complete unix path to the binary
20179  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20180    # Keep paths in /bin as-is, but remove trailing .exe if any
20181    new_path="${new_path/%.exe/}"
20182    # Do not save /bin paths to all_fixpath_prefixes!
20183  else
20184    # Not in mixed or Windows style, start by that.
20185    new_path=`cmd //c echo $new_path`
20186
20187  input_path="$new_path"
20188  # Check if we need to convert this using DOS-style short mode. If the path
20189  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20190  # take no chances and rewrite it.
20191  # Note: m4 eats our [], so we need to use [ and ] instead.
20192  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20193  if test "x$has_forbidden_chars" != x; then
20194    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20195    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20196  fi
20197
20198    # Output is in $new_path
20199
20200  windows_path="$new_path"
20201  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20202    unix_path=`$CYGPATH -u "$windows_path"`
20203    new_path="$unix_path"
20204  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20205    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20206    new_path="$unix_path"
20207  fi
20208
20209    # remove trailing .exe if any
20210    new_path="${new_path/%.exe/}"
20211
20212    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20213    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20214  fi
20215
20216    else
20217      # We're on a unix platform. Hooray! :)
20218      # First separate the path from the arguments. This will split at the first
20219      # space.
20220      complete="$FOUND_MAKE"
20221      path="${complete%% *}"
20222      tmp="$complete EOL"
20223      arguments="${tmp#* }"
20224
20225      # Cannot rely on the command "which" here since it doesn't always work.
20226      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20227      if test -z "$is_absolute_path"; then
20228        # Path to executable is not absolute. Find it.
20229        IFS_save="$IFS"
20230        IFS=:
20231        for p in $PATH; do
20232          if test -f "$p/$path" && test -x "$p/$path"; then
20233            new_path="$p/$path"
20234            break
20235          fi
20236        done
20237        IFS="$IFS_save"
20238      else
20239        # This is an absolute path, we can use it without further modifications.
20240        new_path="$path"
20241      fi
20242
20243      if test "x$new_path" = x; then
20244        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20245$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20246        has_space=`$ECHO "$complete" | $GREP " "`
20247        if test "x$has_space" != x; then
20248          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20249$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20250        fi
20251        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20252      fi
20253    fi
20254
20255    # Now join together the path and the arguments once again
20256    if test "x$arguments" != xEOL; then
20257      new_complete="$new_path ${arguments% *}"
20258    else
20259      new_complete="$new_path"
20260    fi
20261
20262    if test "x$complete" != "x$new_complete"; then
20263      FOUND_MAKE="$new_complete"
20264      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20265$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20266    fi
20267  fi
20268
20269        fi
20270      fi
20271    fi
20272  fi
20273
20274        if test "x$FOUND_MAKE" = x; then
20275          for ac_prog in make
20276do
20277  # Extract the first word of "$ac_prog", so it can be a program name with args.
20278set dummy $ac_prog; ac_word=$2
20279{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20280$as_echo_n "checking for $ac_word... " >&6; }
20281if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
20282  $as_echo_n "(cached) " >&6
20283else
20284  case $CHECK_TOOLSDIR_MAKE in
20285  [\\/]* | ?:[\\/]*)
20286  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
20287  ;;
20288  *)
20289  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20290for as_dir in $PATH
20291do
20292  IFS=$as_save_IFS
20293  test -z "$as_dir" && as_dir=.
20294    for ac_exec_ext in '' $ac_executable_extensions; do
20295  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20296    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
20297    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20298    break 2
20299  fi
20300done
20301  done
20302IFS=$as_save_IFS
20303
20304  ;;
20305esac
20306fi
20307CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
20308if test -n "$CHECK_TOOLSDIR_MAKE"; then
20309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
20310$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
20311else
20312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20313$as_echo "no" >&6; }
20314fi
20315
20316
20317  test -n "$CHECK_TOOLSDIR_MAKE" && break
20318done
20319
20320
20321  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
20322  DESCRIPTION="make in tools-dir"
20323
20324  # On Cygwin, we require a newer version of make than on other platforms
20325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20326    MAKE_VERSION_EXPR="-e 4\."
20327    MAKE_REQUIRED_VERSION="4.0"
20328   else
20329    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20330    MAKE_REQUIRED_VERSION="3.81"
20331  fi
20332
20333  if test "x$MAKE_CANDIDATE" != x; then
20334    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20335$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20336    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20337    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20338    if test "x$IS_GNU_MAKE" = x; then
20339      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20340$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20341    else
20342      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20343      if test "x$IS_MODERN_MAKE" = x; then
20344        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20345$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20346      else
20347        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20348          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20349            MAKE_EXPECTED_ENV='cygwin'
20350          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20351            MAKE_EXPECTED_ENV='msys'
20352          else
20353            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20354          fi
20355          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20356          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20357        else
20358          # Not relevant for non-Windows
20359          IS_MAKE_CORRECT_ENV=true
20360        fi
20361        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20362          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
20363$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
20364        else
20365          FOUND_MAKE=$MAKE_CANDIDATE
20366
20367  # Only process if variable expands to non-empty
20368
20369  if test "x$FOUND_MAKE" != x; then
20370    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20371
20372  # First separate the path from the arguments. This will split at the first
20373  # space.
20374  complete="$FOUND_MAKE"
20375  path="${complete%% *}"
20376  tmp="$complete EOL"
20377  arguments="${tmp#* }"
20378
20379  # Input might be given as Windows format, start by converting to
20380  # unix format.
20381  new_path=`$CYGPATH -u "$path"`
20382
20383  # Now try to locate executable using which
20384  new_path=`$WHICH "$new_path" 2> /dev/null`
20385  # bat and cmd files are not always considered executable in cygwin causing which
20386  # to not find them
20387  if test "x$new_path" = x \
20388      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20389      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20390    new_path=`$CYGPATH -u "$path"`
20391  fi
20392  if test "x$new_path" = x; then
20393    # Oops. Which didn't find the executable.
20394    # The splitting of arguments from the executable at a space might have been incorrect,
20395    # since paths with space are more likely in Windows. Give it another try with the whole
20396    # argument.
20397    path="$complete"
20398    arguments="EOL"
20399    new_path=`$CYGPATH -u "$path"`
20400    new_path=`$WHICH "$new_path" 2> /dev/null`
20401    # bat and cmd files are not always considered executable in cygwin causing which
20402    # to not find them
20403    if test "x$new_path" = x \
20404        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20405        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20406      new_path=`$CYGPATH -u "$path"`
20407    fi
20408    if test "x$new_path" = x; then
20409      # It's still not found. Now this is an unrecoverable error.
20410      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20411$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20412      has_space=`$ECHO "$complete" | $GREP " "`
20413      if test "x$has_space" != x; then
20414        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20415$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20416      fi
20417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20418    fi
20419  fi
20420
20421  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20422  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20423  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20424  # "foo.exe" is OK but "foo" is an error.
20425  #
20426  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20427  # It is also a way to make sure we got the proper file name for the real test later on.
20428  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20429  if test "x$test_shortpath" = x; then
20430    # Short path failed, file does not exist as specified.
20431    # Try adding .exe or .cmd
20432    if test -f "${new_path}.exe"; then
20433      input_to_shortpath="${new_path}.exe"
20434    elif test -f "${new_path}.cmd"; then
20435      input_to_shortpath="${new_path}.cmd"
20436    else
20437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20438$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20439      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20440$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20441      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20442    fi
20443  else
20444    input_to_shortpath="$new_path"
20445  fi
20446
20447  # Call helper function which possibly converts this using DOS-style short mode.
20448  # If so, the updated path is stored in $new_path.
20449  new_path="$input_to_shortpath"
20450
20451  input_path="$input_to_shortpath"
20452  # Check if we need to convert this using DOS-style short mode. If the path
20453  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20454  # take no chances and rewrite it.
20455  # Note: m4 eats our [], so we need to use [ and ] instead.
20456  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20457  if test "x$has_forbidden_chars" != x; then
20458    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20459    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20460    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20461    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20462      # Going to short mode and back again did indeed matter. Since short mode is
20463      # case insensitive, let's make it lowercase to improve readability.
20464      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20465      # Now convert it back to Unix-style (cygpath)
20466      input_path=`$CYGPATH -u "$shortmode_path"`
20467      new_path="$input_path"
20468    fi
20469  fi
20470
20471  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20472  if test "x$test_cygdrive_prefix" = x; then
20473    # As a simple fix, exclude /usr/bin since it's not a real path.
20474    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20475      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20476      # a path prefixed by /cygdrive for fixpath to work.
20477      new_path="$CYGWIN_ROOT_PATH$input_path"
20478    fi
20479  fi
20480
20481  # remove trailing .exe if any
20482  new_path="${new_path/%.exe/}"
20483
20484    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20485
20486  # First separate the path from the arguments. This will split at the first
20487  # space.
20488  complete="$FOUND_MAKE"
20489  path="${complete%% *}"
20490  tmp="$complete EOL"
20491  arguments="${tmp#* }"
20492
20493  # Input might be given as Windows format, start by converting to
20494  # unix format.
20495  new_path="$path"
20496
20497  windows_path="$new_path"
20498  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20499    unix_path=`$CYGPATH -u "$windows_path"`
20500    new_path="$unix_path"
20501  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20502    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20503    new_path="$unix_path"
20504  fi
20505
20506
20507  # Now try to locate executable using which
20508  new_path=`$WHICH "$new_path" 2> /dev/null`
20509
20510  if test "x$new_path" = x; then
20511    # Oops. Which didn't find the executable.
20512    # The splitting of arguments from the executable at a space might have been incorrect,
20513    # since paths with space are more likely in Windows. Give it another try with the whole
20514    # argument.
20515    path="$complete"
20516    arguments="EOL"
20517    new_path="$path"
20518
20519  windows_path="$new_path"
20520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20521    unix_path=`$CYGPATH -u "$windows_path"`
20522    new_path="$unix_path"
20523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20525    new_path="$unix_path"
20526  fi
20527
20528
20529    new_path=`$WHICH "$new_path" 2> /dev/null`
20530    # bat and cmd files are not always considered executable in MSYS causing which
20531    # to not find them
20532    if test "x$new_path" = x \
20533        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20534        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20535      new_path="$path"
20536
20537  windows_path="$new_path"
20538  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20539    unix_path=`$CYGPATH -u "$windows_path"`
20540    new_path="$unix_path"
20541  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20542    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20543    new_path="$unix_path"
20544  fi
20545
20546    fi
20547
20548    if test "x$new_path" = x; then
20549      # It's still not found. Now this is an unrecoverable error.
20550      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20551$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20552      has_space=`$ECHO "$complete" | $GREP " "`
20553      if test "x$has_space" != x; then
20554        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20555$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20556      fi
20557      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20558    fi
20559  fi
20560
20561  # Now new_path has a complete unix path to the binary
20562  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20563    # Keep paths in /bin as-is, but remove trailing .exe if any
20564    new_path="${new_path/%.exe/}"
20565    # Do not save /bin paths to all_fixpath_prefixes!
20566  else
20567    # Not in mixed or Windows style, start by that.
20568    new_path=`cmd //c echo $new_path`
20569
20570  input_path="$new_path"
20571  # Check if we need to convert this using DOS-style short mode. If the path
20572  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20573  # take no chances and rewrite it.
20574  # Note: m4 eats our [], so we need to use [ and ] instead.
20575  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20576  if test "x$has_forbidden_chars" != x; then
20577    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20578    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20579  fi
20580
20581    # Output is in $new_path
20582
20583  windows_path="$new_path"
20584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20585    unix_path=`$CYGPATH -u "$windows_path"`
20586    new_path="$unix_path"
20587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20589    new_path="$unix_path"
20590  fi
20591
20592    # remove trailing .exe if any
20593    new_path="${new_path/%.exe/}"
20594
20595    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20596    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20597  fi
20598
20599    else
20600      # We're on a unix platform. Hooray! :)
20601      # First separate the path from the arguments. This will split at the first
20602      # space.
20603      complete="$FOUND_MAKE"
20604      path="${complete%% *}"
20605      tmp="$complete EOL"
20606      arguments="${tmp#* }"
20607
20608      # Cannot rely on the command "which" here since it doesn't always work.
20609      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20610      if test -z "$is_absolute_path"; then
20611        # Path to executable is not absolute. Find it.
20612        IFS_save="$IFS"
20613        IFS=:
20614        for p in $PATH; do
20615          if test -f "$p/$path" && test -x "$p/$path"; then
20616            new_path="$p/$path"
20617            break
20618          fi
20619        done
20620        IFS="$IFS_save"
20621      else
20622        # This is an absolute path, we can use it without further modifications.
20623        new_path="$path"
20624      fi
20625
20626      if test "x$new_path" = x; then
20627        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20628$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20629        has_space=`$ECHO "$complete" | $GREP " "`
20630        if test "x$has_space" != x; then
20631          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20632$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20633        fi
20634        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20635      fi
20636    fi
20637
20638    # Now join together the path and the arguments once again
20639    if test "x$arguments" != xEOL; then
20640      new_complete="$new_path ${arguments% *}"
20641    else
20642      new_complete="$new_path"
20643    fi
20644
20645    if test "x$complete" != "x$new_complete"; then
20646      FOUND_MAKE="$new_complete"
20647      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20648$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20649    fi
20650  fi
20651
20652        fi
20653      fi
20654    fi
20655  fi
20656
20657        fi
20658        PATH=$OLD_PATH
20659      fi
20660    fi
20661
20662    if test "x$FOUND_MAKE" = x; then
20663      as_fn_error $? "Cannot find GNU make $MAKE_REQUIRED_VERSION or newer! Please put it in the path, or add e.g. MAKE=/opt/gmake3.81/make as argument to configure." "$LINENO" 5
20664    fi
20665
20666    else
20667      # If it succeeded, then it was overridden by the user. We will use it
20668      # for the tool.
20669
20670      # First remove it from the list of overridden variables, so we can test
20671      # for unknown variables in the end.
20672      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20673
20674      # Check if we try to supply an empty value
20675      if test "x$MAKE" = x; then
20676        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20677$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20678        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20679$as_echo_n "checking for MAKE... " >&6; }
20680        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20681$as_echo "disabled" >&6; }
20682      else
20683        # Check if the provided tool contains a complete path.
20684        tool_specified="$MAKE"
20685        tool_basename="${tool_specified##*/}"
20686        if test "x$tool_basename" = "x$tool_specified"; then
20687          # A command without a complete path is provided, search $PATH.
20688          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20689$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20690          # Extract the first word of "$tool_basename", so it can be a program name with args.
20691set dummy $tool_basename; ac_word=$2
20692{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20693$as_echo_n "checking for $ac_word... " >&6; }
20694if ${ac_cv_path_MAKE+:} false; then :
20695  $as_echo_n "(cached) " >&6
20696else
20697  case $MAKE in
20698  [\\/]* | ?:[\\/]*)
20699  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20700  ;;
20701  *)
20702  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20703for as_dir in $PATH
20704do
20705  IFS=$as_save_IFS
20706  test -z "$as_dir" && as_dir=.
20707    for ac_exec_ext in '' $ac_executable_extensions; do
20708  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20709    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20710    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20711    break 2
20712  fi
20713done
20714  done
20715IFS=$as_save_IFS
20716
20717  ;;
20718esac
20719fi
20720MAKE=$ac_cv_path_MAKE
20721if test -n "$MAKE"; then
20722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20723$as_echo "$MAKE" >&6; }
20724else
20725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20726$as_echo "no" >&6; }
20727fi
20728
20729
20730          if test "x$MAKE" = x; then
20731            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20732          fi
20733        else
20734          # Otherwise we believe it is a complete path. Use it as it is.
20735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20736$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20737          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20738$as_echo_n "checking for MAKE... " >&6; }
20739          if test ! -x "$tool_specified"; then
20740            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20741$as_echo "not found" >&6; }
20742            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20743          fi
20744          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20745$as_echo "$tool_specified" >&6; }
20746        fi
20747      fi
20748    fi
20749
20750    # If MAKE was set by user, verify the version
20751
20752  MAKE_CANDIDATE=""$MAKE""
20753  DESCRIPTION="user supplied MAKE=$MAKE"
20754
20755  # On Cygwin, we require a newer version of make than on other platforms
20756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20757    MAKE_VERSION_EXPR="-e 4\."
20758    MAKE_REQUIRED_VERSION="4.0"
20759   else
20760    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20761    MAKE_REQUIRED_VERSION="3.81"
20762  fi
20763
20764  if test "x$MAKE_CANDIDATE" != x; then
20765    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20766$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20767    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20768    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20769    if test "x$IS_GNU_MAKE" = x; then
20770      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20771$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20772    else
20773      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20774      if test "x$IS_MODERN_MAKE" = x; then
20775        { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&5
20776$as_echo "$as_me: Found GNU make at $MAKE_CANDIDATE, however this is not version $MAKE_REQUIRED_VERSION or later. (it is: $MAKE_VERSION_STRING). Ignoring." >&6;}
20777      else
20778        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20779          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20780            MAKE_EXPECTED_ENV='cygwin'
20781          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20782            MAKE_EXPECTED_ENV='msys'
20783          else
20784            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20785          fi
20786          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20787          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20788        else
20789          # Not relevant for non-Windows
20790          IS_MAKE_CORRECT_ENV=true
20791        fi
20792        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20793          { $as_echo "$as_me:${as_lineno-$LINENO}: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&5
20794$as_echo "$as_me: Found GNU make version $MAKE_VERSION_STRING at $MAKE_CANDIDATE, but it is not for $MAKE_EXPECTED_ENV (it says: $MAKE_BUILT_FOR). Ignoring." >&6;}
20795        else
20796          FOUND_MAKE=$MAKE_CANDIDATE
20797
20798  # Only process if variable expands to non-empty
20799
20800  if test "x$FOUND_MAKE" != x; then
20801    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20802
20803  # First separate the path from the arguments. This will split at the first
20804  # space.
20805  complete="$FOUND_MAKE"
20806  path="${complete%% *}"
20807  tmp="$complete EOL"
20808  arguments="${tmp#* }"
20809
20810  # Input might be given as Windows format, start by converting to
20811  # unix format.
20812  new_path=`$CYGPATH -u "$path"`
20813
20814  # Now try to locate executable using which
20815  new_path=`$WHICH "$new_path" 2> /dev/null`
20816  # bat and cmd files are not always considered executable in cygwin causing which
20817  # to not find them
20818  if test "x$new_path" = x \
20819      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20820      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20821    new_path=`$CYGPATH -u "$path"`
20822  fi
20823  if test "x$new_path" = x; then
20824    # Oops. Which didn't find the executable.
20825    # The splitting of arguments from the executable at a space might have been incorrect,
20826    # since paths with space are more likely in Windows. Give it another try with the whole
20827    # argument.
20828    path="$complete"
20829    arguments="EOL"
20830    new_path=`$CYGPATH -u "$path"`
20831    new_path=`$WHICH "$new_path" 2> /dev/null`
20832    # bat and cmd files are not always considered executable in cygwin causing which
20833    # to not find them
20834    if test "x$new_path" = x \
20835        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20836        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20837      new_path=`$CYGPATH -u "$path"`
20838    fi
20839    if test "x$new_path" = x; then
20840      # It's still not found. Now this is an unrecoverable error.
20841      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20842$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20843      has_space=`$ECHO "$complete" | $GREP " "`
20844      if test "x$has_space" != x; then
20845        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20846$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20847      fi
20848      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20849    fi
20850  fi
20851
20852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20855  # "foo.exe" is OK but "foo" is an error.
20856  #
20857  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20858  # It is also a way to make sure we got the proper file name for the real test later on.
20859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20860  if test "x$test_shortpath" = x; then
20861    # Short path failed, file does not exist as specified.
20862    # Try adding .exe or .cmd
20863    if test -f "${new_path}.exe"; then
20864      input_to_shortpath="${new_path}.exe"
20865    elif test -f "${new_path}.cmd"; then
20866      input_to_shortpath="${new_path}.cmd"
20867    else
20868      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20869$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20870      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20871$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20872      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20873    fi
20874  else
20875    input_to_shortpath="$new_path"
20876  fi
20877
20878  # Call helper function which possibly converts this using DOS-style short mode.
20879  # If so, the updated path is stored in $new_path.
20880  new_path="$input_to_shortpath"
20881
20882  input_path="$input_to_shortpath"
20883  # Check if we need to convert this using DOS-style short mode. If the path
20884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20885  # take no chances and rewrite it.
20886  # Note: m4 eats our [], so we need to use [ and ] instead.
20887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20888  if test "x$has_forbidden_chars" != x; then
20889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20893      # Going to short mode and back again did indeed matter. Since short mode is
20894      # case insensitive, let's make it lowercase to improve readability.
20895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20896      # Now convert it back to Unix-style (cygpath)
20897      input_path=`$CYGPATH -u "$shortmode_path"`
20898      new_path="$input_path"
20899    fi
20900  fi
20901
20902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20903  if test "x$test_cygdrive_prefix" = x; then
20904    # As a simple fix, exclude /usr/bin since it's not a real path.
20905    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20907      # a path prefixed by /cygdrive for fixpath to work.
20908      new_path="$CYGWIN_ROOT_PATH$input_path"
20909    fi
20910  fi
20911
20912  # remove trailing .exe if any
20913  new_path="${new_path/%.exe/}"
20914
20915    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20916
20917  # First separate the path from the arguments. This will split at the first
20918  # space.
20919  complete="$FOUND_MAKE"
20920  path="${complete%% *}"
20921  tmp="$complete EOL"
20922  arguments="${tmp#* }"
20923
20924  # Input might be given as Windows format, start by converting to
20925  # unix format.
20926  new_path="$path"
20927
20928  windows_path="$new_path"
20929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20930    unix_path=`$CYGPATH -u "$windows_path"`
20931    new_path="$unix_path"
20932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20934    new_path="$unix_path"
20935  fi
20936
20937
20938  # Now try to locate executable using which
20939  new_path=`$WHICH "$new_path" 2> /dev/null`
20940
20941  if test "x$new_path" = x; then
20942    # Oops. Which didn't find the executable.
20943    # The splitting of arguments from the executable at a space might have been incorrect,
20944    # since paths with space are more likely in Windows. Give it another try with the whole
20945    # argument.
20946    path="$complete"
20947    arguments="EOL"
20948    new_path="$path"
20949
20950  windows_path="$new_path"
20951  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20952    unix_path=`$CYGPATH -u "$windows_path"`
20953    new_path="$unix_path"
20954  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20955    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20956    new_path="$unix_path"
20957  fi
20958
20959
20960    new_path=`$WHICH "$new_path" 2> /dev/null`
20961    # bat and cmd files are not always considered executable in MSYS causing which
20962    # to not find them
20963    if test "x$new_path" = x \
20964        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20965        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20966      new_path="$path"
20967
20968  windows_path="$new_path"
20969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20970    unix_path=`$CYGPATH -u "$windows_path"`
20971    new_path="$unix_path"
20972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20974    new_path="$unix_path"
20975  fi
20976
20977    fi
20978
20979    if test "x$new_path" = x; then
20980      # It's still not found. Now this is an unrecoverable error.
20981      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20982$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20983      has_space=`$ECHO "$complete" | $GREP " "`
20984      if test "x$has_space" != x; then
20985        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20986$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20987      fi
20988      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20989    fi
20990  fi
20991
20992  # Now new_path has a complete unix path to the binary
20993  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20994    # Keep paths in /bin as-is, but remove trailing .exe if any
20995    new_path="${new_path/%.exe/}"
20996    # Do not save /bin paths to all_fixpath_prefixes!
20997  else
20998    # Not in mixed or Windows style, start by that.
20999    new_path=`cmd //c echo $new_path`
21000
21001  input_path="$new_path"
21002  # Check if we need to convert this using DOS-style short mode. If the path
21003  # contains just simple characters, use it. Otherwise (spaces, weird characters),
21004  # take no chances and rewrite it.
21005  # Note: m4 eats our [], so we need to use [ and ] instead.
21006  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
21007  if test "x$has_forbidden_chars" != x; then
21008    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
21009    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
21010  fi
21011
21012    # Output is in $new_path
21013
21014  windows_path="$new_path"
21015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
21016    unix_path=`$CYGPATH -u "$windows_path"`
21017    new_path="$unix_path"
21018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
21019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
21020    new_path="$unix_path"
21021  fi
21022
21023    # remove trailing .exe if any
21024    new_path="${new_path/%.exe/}"
21025
21026    # Save the first 10 bytes of this path to the storage, so fixpath can work.
21027    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
21028  fi
21029
21030    else
21031      # We're on a unix platform. Hooray! :)
21032      # First separate the path from the arguments. This will split at the first
21033      # space.
21034      complete="$FOUND_MAKE"
21035      path="${complete%% *}"
21036      tmp="$complete EOL"
21037      arguments="${tmp#* }"
21038
21039      # Cannot rely on the command "which" here since it doesn't always work.
21040      is_absolute_path=`$ECHO "$path" | $GREP ^/`
21041      if test -z "$is_absolute_path"; then
21042        # Path to executable is not absolute. Find it.
21043        IFS_save="$IFS"
21044        IFS=:
21045        for p in $PATH; do
21046          if test -f "$p/$path" && test -x "$p/$path"; then
21047            new_path="$p/$path"
21048            break
21049          fi
21050        done
21051        IFS="$IFS_save"
21052      else
21053        # This is an absolute path, we can use it without further modifications.
21054        new_path="$path"
21055      fi
21056
21057      if test "x$new_path" = x; then
21058        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
21059$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
21060        has_space=`$ECHO "$complete" | $GREP " "`
21061        if test "x$has_space" != x; then
21062          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
21063$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
21064        fi
21065        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
21066      fi
21067    fi
21068
21069    # Now join together the path and the arguments once again
21070    if test "x$arguments" != xEOL; then
21071      new_complete="$new_path ${arguments% *}"
21072    else
21073      new_complete="$new_path"
21074    fi
21075
21076    if test "x$complete" != "x$new_complete"; then
21077      FOUND_MAKE="$new_complete"
21078      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
21079$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
21080    fi
21081  fi
21082
21083        fi
21084      fi
21085    fi
21086  fi
21087
21088    if test "x$FOUND_MAKE" = x; then
21089      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
21090    fi
21091
21092  fi
21093
21094
21095  MAKE=$FOUND_MAKE
21096
21097  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
21098$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
21099
21100
21101  # Check if make supports the output sync option and if so, setup using it.
21102  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
21103$as_echo_n "checking if make --output-sync is supported... " >&6; }
21104  if $MAKE --version -O > /dev/null 2>&1; then
21105    OUTPUT_SYNC_SUPPORTED=true
21106    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21107$as_echo "yes" >&6; }
21108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
21109$as_echo_n "checking for output-sync value... " >&6; }
21110
21111# Check whether --with-output-sync was given.
21112if test "${with_output_sync+set}" = set; then :
21113  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
21114fi
21115
21116    if test "x$OUTPUT_SYNC" = "x"; then
21117      OUTPUT_SYNC=none
21118    fi
21119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
21120$as_echo "$OUTPUT_SYNC" >&6; }
21121    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
21122      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
21123    fi
21124  else
21125    OUTPUT_SYNC_SUPPORTED=false
21126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21127$as_echo "no" >&6; }
21128  fi
21129
21130
21131
21132
21133
21134
21135  # Test if find supports -delete
21136  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
21137$as_echo_n "checking if find supports -delete... " >&6; }
21138  FIND_DELETE="-delete"
21139
21140  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
21141
21142  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
21143
21144  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
21145  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
21146    # No, it does not.
21147    $RM $DELETEDIR/TestIfFindSupportsDelete
21148    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
21149      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
21150      FIND_DELETE="-print | $XARGS $RM"
21151    else
21152      FIND_DELETE="-exec $RM \{\} \+"
21153    fi
21154    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21155$as_echo "no" >&6; }
21156  else
21157    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
21158$as_echo "yes" >&6; }
21159  fi
21160  $RMDIR $DELETEDIR
21161
21162
21163
21164  # Test which kind of tar was found
21165  if test "x$($TAR --version | $GREP "GNU tar")" != "x"; then
21166    TAR_TYPE="gnu"
21167  elif test "x$($TAR -v | $GREP "bsdtar")" != "x"; then
21168    TAR_TYPE="bsd"
21169  elif test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
21170    TAR_TYPE="solaris"
21171  fi
21172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of tar was found" >&5
21173$as_echo_n "checking what type of tar was found... " >&6; }
21174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR_TYPE" >&5
21175$as_echo "$TAR_TYPE" >&6; }
21176
21177  TAR_CREATE_FILE_PARAM=""
21178
21179  if test "x$TAR_TYPE" = "xgnu"; then
21180    TAR_INCLUDE_PARAM="T"
21181    TAR_SUPPORTS_TRANSFORM="true"
21182    if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
21183      # When using gnu tar for Solaris targets, need to use compatibility mode
21184      TAR_CREATE_EXTRA_PARAM="--format=ustar"
21185    fi
21186  else
21187    TAR_INCLUDE_PARAM="I"
21188    TAR_SUPPORTS_TRANSFORM="false"
21189  fi
21190
21191
21192
21193
21194
21195
21196  # These tools might not be installed by default,
21197  # need hint on how to install them.
21198
21199
21200
21201  # Publish this variable in the help.
21202
21203
21204  if [ -z "${UNZIP+x}" ]; then
21205    # The variable is not set by user, try to locate tool using the code snippet
21206    for ac_prog in unzip
21207do
21208  # Extract the first word of "$ac_prog", so it can be a program name with args.
21209set dummy $ac_prog; ac_word=$2
21210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21211$as_echo_n "checking for $ac_word... " >&6; }
21212if ${ac_cv_path_UNZIP+:} false; then :
21213  $as_echo_n "(cached) " >&6
21214else
21215  case $UNZIP in
21216  [\\/]* | ?:[\\/]*)
21217  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21218  ;;
21219  *)
21220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21221for as_dir in $PATH
21222do
21223  IFS=$as_save_IFS
21224  test -z "$as_dir" && as_dir=.
21225    for ac_exec_ext in '' $ac_executable_extensions; do
21226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21227    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21229    break 2
21230  fi
21231done
21232  done
21233IFS=$as_save_IFS
21234
21235  ;;
21236esac
21237fi
21238UNZIP=$ac_cv_path_UNZIP
21239if test -n "$UNZIP"; then
21240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21241$as_echo "$UNZIP" >&6; }
21242else
21243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21244$as_echo "no" >&6; }
21245fi
21246
21247
21248  test -n "$UNZIP" && break
21249done
21250
21251  else
21252    # The variable is set, but is it from the command line or the environment?
21253
21254    # Try to remove the string !UNZIP! from our list.
21255    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
21256    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21257      # If it failed, the variable was not from the command line. Ignore it,
21258      # but warn the user (except for BASH, which is always set by the calling BASH).
21259      if test "xUNZIP" != xBASH; then
21260        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
21261$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
21262      fi
21263      # Try to locate tool using the code snippet
21264      for ac_prog in unzip
21265do
21266  # Extract the first word of "$ac_prog", so it can be a program name with args.
21267set dummy $ac_prog; ac_word=$2
21268{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21269$as_echo_n "checking for $ac_word... " >&6; }
21270if ${ac_cv_path_UNZIP+:} false; then :
21271  $as_echo_n "(cached) " >&6
21272else
21273  case $UNZIP in
21274  [\\/]* | ?:[\\/]*)
21275  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21276  ;;
21277  *)
21278  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21279for as_dir in $PATH
21280do
21281  IFS=$as_save_IFS
21282  test -z "$as_dir" && as_dir=.
21283    for ac_exec_ext in '' $ac_executable_extensions; do
21284  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21285    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21286    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21287    break 2
21288  fi
21289done
21290  done
21291IFS=$as_save_IFS
21292
21293  ;;
21294esac
21295fi
21296UNZIP=$ac_cv_path_UNZIP
21297if test -n "$UNZIP"; then
21298  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21299$as_echo "$UNZIP" >&6; }
21300else
21301  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21302$as_echo "no" >&6; }
21303fi
21304
21305
21306  test -n "$UNZIP" && break
21307done
21308
21309    else
21310      # If it succeeded, then it was overridden by the user. We will use it
21311      # for the tool.
21312
21313      # First remove it from the list of overridden variables, so we can test
21314      # for unknown variables in the end.
21315      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21316
21317      # Check if we try to supply an empty value
21318      if test "x$UNZIP" = x; then
21319        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
21320$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
21321        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21322$as_echo_n "checking for UNZIP... " >&6; }
21323        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21324$as_echo "disabled" >&6; }
21325      else
21326        # Check if the provided tool contains a complete path.
21327        tool_specified="$UNZIP"
21328        tool_basename="${tool_specified##*/}"
21329        if test "x$tool_basename" = "x$tool_specified"; then
21330          # A command without a complete path is provided, search $PATH.
21331          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
21332$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
21333          # Extract the first word of "$tool_basename", so it can be a program name with args.
21334set dummy $tool_basename; ac_word=$2
21335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21336$as_echo_n "checking for $ac_word... " >&6; }
21337if ${ac_cv_path_UNZIP+:} false; then :
21338  $as_echo_n "(cached) " >&6
21339else
21340  case $UNZIP in
21341  [\\/]* | ?:[\\/]*)
21342  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
21343  ;;
21344  *)
21345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21346for as_dir in $PATH
21347do
21348  IFS=$as_save_IFS
21349  test -z "$as_dir" && as_dir=.
21350    for ac_exec_ext in '' $ac_executable_extensions; do
21351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21352    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
21353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21354    break 2
21355  fi
21356done
21357  done
21358IFS=$as_save_IFS
21359
21360  ;;
21361esac
21362fi
21363UNZIP=$ac_cv_path_UNZIP
21364if test -n "$UNZIP"; then
21365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
21366$as_echo "$UNZIP" >&6; }
21367else
21368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21369$as_echo "no" >&6; }
21370fi
21371
21372
21373          if test "x$UNZIP" = x; then
21374            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21375          fi
21376        else
21377          # Otherwise we believe it is a complete path. Use it as it is.
21378          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
21379$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
21380          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
21381$as_echo_n "checking for UNZIP... " >&6; }
21382          if test ! -x "$tool_specified"; then
21383            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21384$as_echo "not found" >&6; }
21385            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21386          fi
21387          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21388$as_echo "$tool_specified" >&6; }
21389        fi
21390      fi
21391    fi
21392
21393  fi
21394
21395
21396
21397  if test "x$UNZIP" = x; then
21398    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
21399  fi
21400
21401
21402
21403
21404
21405  # Publish this variable in the help.
21406
21407
21408  if [ -z "${ZIP+x}" ]; then
21409    # The variable is not set by user, try to locate tool using the code snippet
21410    for ac_prog in zip
21411do
21412  # Extract the first word of "$ac_prog", so it can be a program name with args.
21413set dummy $ac_prog; ac_word=$2
21414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21415$as_echo_n "checking for $ac_word... " >&6; }
21416if ${ac_cv_path_ZIP+:} false; then :
21417  $as_echo_n "(cached) " >&6
21418else
21419  case $ZIP in
21420  [\\/]* | ?:[\\/]*)
21421  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21422  ;;
21423  *)
21424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21425for as_dir in $PATH
21426do
21427  IFS=$as_save_IFS
21428  test -z "$as_dir" && as_dir=.
21429    for ac_exec_ext in '' $ac_executable_extensions; do
21430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21431    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21433    break 2
21434  fi
21435done
21436  done
21437IFS=$as_save_IFS
21438
21439  ;;
21440esac
21441fi
21442ZIP=$ac_cv_path_ZIP
21443if test -n "$ZIP"; then
21444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21445$as_echo "$ZIP" >&6; }
21446else
21447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21448$as_echo "no" >&6; }
21449fi
21450
21451
21452  test -n "$ZIP" && break
21453done
21454
21455  else
21456    # The variable is set, but is it from the command line or the environment?
21457
21458    # Try to remove the string !ZIP! from our list.
21459    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
21460    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21461      # If it failed, the variable was not from the command line. Ignore it,
21462      # but warn the user (except for BASH, which is always set by the calling BASH).
21463      if test "xZIP" != xBASH; then
21464        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
21465$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
21466      fi
21467      # Try to locate tool using the code snippet
21468      for ac_prog in zip
21469do
21470  # Extract the first word of "$ac_prog", so it can be a program name with args.
21471set dummy $ac_prog; ac_word=$2
21472{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21473$as_echo_n "checking for $ac_word... " >&6; }
21474if ${ac_cv_path_ZIP+:} false; then :
21475  $as_echo_n "(cached) " >&6
21476else
21477  case $ZIP in
21478  [\\/]* | ?:[\\/]*)
21479  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21480  ;;
21481  *)
21482  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21483for as_dir in $PATH
21484do
21485  IFS=$as_save_IFS
21486  test -z "$as_dir" && as_dir=.
21487    for ac_exec_ext in '' $ac_executable_extensions; do
21488  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21489    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21490    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21491    break 2
21492  fi
21493done
21494  done
21495IFS=$as_save_IFS
21496
21497  ;;
21498esac
21499fi
21500ZIP=$ac_cv_path_ZIP
21501if test -n "$ZIP"; then
21502  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21503$as_echo "$ZIP" >&6; }
21504else
21505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21506$as_echo "no" >&6; }
21507fi
21508
21509
21510  test -n "$ZIP" && break
21511done
21512
21513    else
21514      # If it succeeded, then it was overridden by the user. We will use it
21515      # for the tool.
21516
21517      # First remove it from the list of overridden variables, so we can test
21518      # for unknown variables in the end.
21519      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21520
21521      # Check if we try to supply an empty value
21522      if test "x$ZIP" = x; then
21523        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21524$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21525        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21526$as_echo_n "checking for ZIP... " >&6; }
21527        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21528$as_echo "disabled" >&6; }
21529      else
21530        # Check if the provided tool contains a complete path.
21531        tool_specified="$ZIP"
21532        tool_basename="${tool_specified##*/}"
21533        if test "x$tool_basename" = "x$tool_specified"; then
21534          # A command without a complete path is provided, search $PATH.
21535          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21536$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21537          # Extract the first word of "$tool_basename", so it can be a program name with args.
21538set dummy $tool_basename; ac_word=$2
21539{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21540$as_echo_n "checking for $ac_word... " >&6; }
21541if ${ac_cv_path_ZIP+:} false; then :
21542  $as_echo_n "(cached) " >&6
21543else
21544  case $ZIP in
21545  [\\/]* | ?:[\\/]*)
21546  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21547  ;;
21548  *)
21549  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21550for as_dir in $PATH
21551do
21552  IFS=$as_save_IFS
21553  test -z "$as_dir" && as_dir=.
21554    for ac_exec_ext in '' $ac_executable_extensions; do
21555  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21556    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21557    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21558    break 2
21559  fi
21560done
21561  done
21562IFS=$as_save_IFS
21563
21564  ;;
21565esac
21566fi
21567ZIP=$ac_cv_path_ZIP
21568if test -n "$ZIP"; then
21569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21570$as_echo "$ZIP" >&6; }
21571else
21572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21573$as_echo "no" >&6; }
21574fi
21575
21576
21577          if test "x$ZIP" = x; then
21578            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21579          fi
21580        else
21581          # Otherwise we believe it is a complete path. Use it as it is.
21582          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21583$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21584          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21585$as_echo_n "checking for ZIP... " >&6; }
21586          if test ! -x "$tool_specified"; then
21587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21588$as_echo "not found" >&6; }
21589            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21590          fi
21591          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21592$as_echo "$tool_specified" >&6; }
21593        fi
21594      fi
21595    fi
21596
21597  fi
21598
21599
21600
21601  if test "x$ZIP" = x; then
21602    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21603  fi
21604
21605
21606
21607  # Non-required basic tools
21608
21609
21610
21611  # Publish this variable in the help.
21612
21613
21614  if [ -z "${LDD+x}" ]; then
21615    # The variable is not set by user, try to locate tool using the code snippet
21616    for ac_prog in ldd
21617do
21618  # Extract the first word of "$ac_prog", so it can be a program name with args.
21619set dummy $ac_prog; ac_word=$2
21620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21621$as_echo_n "checking for $ac_word... " >&6; }
21622if ${ac_cv_path_LDD+:} false; then :
21623  $as_echo_n "(cached) " >&6
21624else
21625  case $LDD in
21626  [\\/]* | ?:[\\/]*)
21627  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21628  ;;
21629  *)
21630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21631for as_dir in $PATH
21632do
21633  IFS=$as_save_IFS
21634  test -z "$as_dir" && as_dir=.
21635    for ac_exec_ext in '' $ac_executable_extensions; do
21636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21637    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21639    break 2
21640  fi
21641done
21642  done
21643IFS=$as_save_IFS
21644
21645  ;;
21646esac
21647fi
21648LDD=$ac_cv_path_LDD
21649if test -n "$LDD"; then
21650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21651$as_echo "$LDD" >&6; }
21652else
21653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21654$as_echo "no" >&6; }
21655fi
21656
21657
21658  test -n "$LDD" && break
21659done
21660
21661  else
21662    # The variable is set, but is it from the command line or the environment?
21663
21664    # Try to remove the string !LDD! from our list.
21665    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21666    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21667      # If it failed, the variable was not from the command line. Ignore it,
21668      # but warn the user (except for BASH, which is always set by the calling BASH).
21669      if test "xLDD" != xBASH; then
21670        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21671$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21672      fi
21673      # Try to locate tool using the code snippet
21674      for ac_prog in ldd
21675do
21676  # Extract the first word of "$ac_prog", so it can be a program name with args.
21677set dummy $ac_prog; ac_word=$2
21678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21679$as_echo_n "checking for $ac_word... " >&6; }
21680if ${ac_cv_path_LDD+:} false; then :
21681  $as_echo_n "(cached) " >&6
21682else
21683  case $LDD in
21684  [\\/]* | ?:[\\/]*)
21685  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21686  ;;
21687  *)
21688  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21689for as_dir in $PATH
21690do
21691  IFS=$as_save_IFS
21692  test -z "$as_dir" && as_dir=.
21693    for ac_exec_ext in '' $ac_executable_extensions; do
21694  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21695    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21696    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21697    break 2
21698  fi
21699done
21700  done
21701IFS=$as_save_IFS
21702
21703  ;;
21704esac
21705fi
21706LDD=$ac_cv_path_LDD
21707if test -n "$LDD"; then
21708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21709$as_echo "$LDD" >&6; }
21710else
21711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21712$as_echo "no" >&6; }
21713fi
21714
21715
21716  test -n "$LDD" && break
21717done
21718
21719    else
21720      # If it succeeded, then it was overridden by the user. We will use it
21721      # for the tool.
21722
21723      # First remove it from the list of overridden variables, so we can test
21724      # for unknown variables in the end.
21725      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21726
21727      # Check if we try to supply an empty value
21728      if test "x$LDD" = x; then
21729        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21730$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21731        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21732$as_echo_n "checking for LDD... " >&6; }
21733        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21734$as_echo "disabled" >&6; }
21735      else
21736        # Check if the provided tool contains a complete path.
21737        tool_specified="$LDD"
21738        tool_basename="${tool_specified##*/}"
21739        if test "x$tool_basename" = "x$tool_specified"; then
21740          # A command without a complete path is provided, search $PATH.
21741          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21742$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21743          # Extract the first word of "$tool_basename", so it can be a program name with args.
21744set dummy $tool_basename; ac_word=$2
21745{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21746$as_echo_n "checking for $ac_word... " >&6; }
21747if ${ac_cv_path_LDD+:} false; then :
21748  $as_echo_n "(cached) " >&6
21749else
21750  case $LDD in
21751  [\\/]* | ?:[\\/]*)
21752  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21753  ;;
21754  *)
21755  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21756for as_dir in $PATH
21757do
21758  IFS=$as_save_IFS
21759  test -z "$as_dir" && as_dir=.
21760    for ac_exec_ext in '' $ac_executable_extensions; do
21761  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21762    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21763    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21764    break 2
21765  fi
21766done
21767  done
21768IFS=$as_save_IFS
21769
21770  ;;
21771esac
21772fi
21773LDD=$ac_cv_path_LDD
21774if test -n "$LDD"; then
21775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21776$as_echo "$LDD" >&6; }
21777else
21778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21779$as_echo "no" >&6; }
21780fi
21781
21782
21783          if test "x$LDD" = x; then
21784            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21785          fi
21786        else
21787          # Otherwise we believe it is a complete path. Use it as it is.
21788          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21789$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21790          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21791$as_echo_n "checking for LDD... " >&6; }
21792          if test ! -x "$tool_specified"; then
21793            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21794$as_echo "not found" >&6; }
21795            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21796          fi
21797          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21798$as_echo "$tool_specified" >&6; }
21799        fi
21800      fi
21801    fi
21802
21803  fi
21804
21805
21806  if test "x$LDD" = "x"; then
21807    # List shared lib dependencies is used for
21808    # debug output and checking for forbidden dependencies.
21809    # We can build without it.
21810    LDD="true"
21811  fi
21812
21813
21814  # Publish this variable in the help.
21815
21816
21817  if [ -z "${OTOOL+x}" ]; then
21818    # The variable is not set by user, try to locate tool using the code snippet
21819    for ac_prog in otool
21820do
21821  # Extract the first word of "$ac_prog", so it can be a program name with args.
21822set dummy $ac_prog; ac_word=$2
21823{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21824$as_echo_n "checking for $ac_word... " >&6; }
21825if ${ac_cv_path_OTOOL+:} false; then :
21826  $as_echo_n "(cached) " >&6
21827else
21828  case $OTOOL in
21829  [\\/]* | ?:[\\/]*)
21830  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21831  ;;
21832  *)
21833  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21834for as_dir in $PATH
21835do
21836  IFS=$as_save_IFS
21837  test -z "$as_dir" && as_dir=.
21838    for ac_exec_ext in '' $ac_executable_extensions; do
21839  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21840    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21841    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21842    break 2
21843  fi
21844done
21845  done
21846IFS=$as_save_IFS
21847
21848  ;;
21849esac
21850fi
21851OTOOL=$ac_cv_path_OTOOL
21852if test -n "$OTOOL"; then
21853  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21854$as_echo "$OTOOL" >&6; }
21855else
21856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21857$as_echo "no" >&6; }
21858fi
21859
21860
21861  test -n "$OTOOL" && break
21862done
21863
21864  else
21865    # The variable is set, but is it from the command line or the environment?
21866
21867    # Try to remove the string !OTOOL! from our list.
21868    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21869    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21870      # If it failed, the variable was not from the command line. Ignore it,
21871      # but warn the user (except for BASH, which is always set by the calling BASH).
21872      if test "xOTOOL" != xBASH; then
21873        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21874$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21875      fi
21876      # Try to locate tool using the code snippet
21877      for ac_prog in otool
21878do
21879  # Extract the first word of "$ac_prog", so it can be a program name with args.
21880set dummy $ac_prog; ac_word=$2
21881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21882$as_echo_n "checking for $ac_word... " >&6; }
21883if ${ac_cv_path_OTOOL+:} false; then :
21884  $as_echo_n "(cached) " >&6
21885else
21886  case $OTOOL in
21887  [\\/]* | ?:[\\/]*)
21888  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21889  ;;
21890  *)
21891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21892for as_dir in $PATH
21893do
21894  IFS=$as_save_IFS
21895  test -z "$as_dir" && as_dir=.
21896    for ac_exec_ext in '' $ac_executable_extensions; do
21897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21898    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21900    break 2
21901  fi
21902done
21903  done
21904IFS=$as_save_IFS
21905
21906  ;;
21907esac
21908fi
21909OTOOL=$ac_cv_path_OTOOL
21910if test -n "$OTOOL"; then
21911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21912$as_echo "$OTOOL" >&6; }
21913else
21914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21915$as_echo "no" >&6; }
21916fi
21917
21918
21919  test -n "$OTOOL" && break
21920done
21921
21922    else
21923      # If it succeeded, then it was overridden by the user. We will use it
21924      # for the tool.
21925
21926      # First remove it from the list of overridden variables, so we can test
21927      # for unknown variables in the end.
21928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21929
21930      # Check if we try to supply an empty value
21931      if test "x$OTOOL" = x; then
21932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21933$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21935$as_echo_n "checking for OTOOL... " >&6; }
21936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21937$as_echo "disabled" >&6; }
21938      else
21939        # Check if the provided tool contains a complete path.
21940        tool_specified="$OTOOL"
21941        tool_basename="${tool_specified##*/}"
21942        if test "x$tool_basename" = "x$tool_specified"; then
21943          # A command without a complete path is provided, search $PATH.
21944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21945$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21946          # Extract the first word of "$tool_basename", so it can be a program name with args.
21947set dummy $tool_basename; ac_word=$2
21948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21949$as_echo_n "checking for $ac_word... " >&6; }
21950if ${ac_cv_path_OTOOL+:} false; then :
21951  $as_echo_n "(cached) " >&6
21952else
21953  case $OTOOL in
21954  [\\/]* | ?:[\\/]*)
21955  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21956  ;;
21957  *)
21958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21959for as_dir in $PATH
21960do
21961  IFS=$as_save_IFS
21962  test -z "$as_dir" && as_dir=.
21963    for ac_exec_ext in '' $ac_executable_extensions; do
21964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21965    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21967    break 2
21968  fi
21969done
21970  done
21971IFS=$as_save_IFS
21972
21973  ;;
21974esac
21975fi
21976OTOOL=$ac_cv_path_OTOOL
21977if test -n "$OTOOL"; then
21978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21979$as_echo "$OTOOL" >&6; }
21980else
21981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21982$as_echo "no" >&6; }
21983fi
21984
21985
21986          if test "x$OTOOL" = x; then
21987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21988          fi
21989        else
21990          # Otherwise we believe it is a complete path. Use it as it is.
21991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21992$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21994$as_echo_n "checking for OTOOL... " >&6; }
21995          if test ! -x "$tool_specified"; then
21996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21997$as_echo "not found" >&6; }
21998            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21999          fi
22000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22001$as_echo "$tool_specified" >&6; }
22002        fi
22003      fi
22004    fi
22005
22006  fi
22007
22008
22009  if test "x$OTOOL" = "x"; then
22010    OTOOL="true"
22011  fi
22012
22013
22014  # Publish this variable in the help.
22015
22016
22017  if [ -z "${READELF+x}" ]; then
22018    # The variable is not set by user, try to locate tool using the code snippet
22019    for ac_prog in greadelf readelf
22020do
22021  # Extract the first word of "$ac_prog", so it can be a program name with args.
22022set dummy $ac_prog; ac_word=$2
22023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22024$as_echo_n "checking for $ac_word... " >&6; }
22025if ${ac_cv_path_READELF+:} false; then :
22026  $as_echo_n "(cached) " >&6
22027else
22028  case $READELF in
22029  [\\/]* | ?:[\\/]*)
22030  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22031  ;;
22032  *)
22033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22034for as_dir in $PATH
22035do
22036  IFS=$as_save_IFS
22037  test -z "$as_dir" && as_dir=.
22038    for ac_exec_ext in '' $ac_executable_extensions; do
22039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22040    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22042    break 2
22043  fi
22044done
22045  done
22046IFS=$as_save_IFS
22047
22048  ;;
22049esac
22050fi
22051READELF=$ac_cv_path_READELF
22052if test -n "$READELF"; then
22053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22054$as_echo "$READELF" >&6; }
22055else
22056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22057$as_echo "no" >&6; }
22058fi
22059
22060
22061  test -n "$READELF" && break
22062done
22063
22064  else
22065    # The variable is set, but is it from the command line or the environment?
22066
22067    # Try to remove the string !READELF! from our list.
22068    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
22069    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22070      # If it failed, the variable was not from the command line. Ignore it,
22071      # but warn the user (except for BASH, which is always set by the calling BASH).
22072      if test "xREADELF" != xBASH; then
22073        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
22074$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
22075      fi
22076      # Try to locate tool using the code snippet
22077      for ac_prog in greadelf readelf
22078do
22079  # Extract the first word of "$ac_prog", so it can be a program name with args.
22080set dummy $ac_prog; ac_word=$2
22081{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22082$as_echo_n "checking for $ac_word... " >&6; }
22083if ${ac_cv_path_READELF+:} false; then :
22084  $as_echo_n "(cached) " >&6
22085else
22086  case $READELF in
22087  [\\/]* | ?:[\\/]*)
22088  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22089  ;;
22090  *)
22091  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22092for as_dir in $PATH
22093do
22094  IFS=$as_save_IFS
22095  test -z "$as_dir" && as_dir=.
22096    for ac_exec_ext in '' $ac_executable_extensions; do
22097  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22098    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22099    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22100    break 2
22101  fi
22102done
22103  done
22104IFS=$as_save_IFS
22105
22106  ;;
22107esac
22108fi
22109READELF=$ac_cv_path_READELF
22110if test -n "$READELF"; then
22111  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22112$as_echo "$READELF" >&6; }
22113else
22114  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22115$as_echo "no" >&6; }
22116fi
22117
22118
22119  test -n "$READELF" && break
22120done
22121
22122    else
22123      # If it succeeded, then it was overridden by the user. We will use it
22124      # for the tool.
22125
22126      # First remove it from the list of overridden variables, so we can test
22127      # for unknown variables in the end.
22128      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22129
22130      # Check if we try to supply an empty value
22131      if test "x$READELF" = x; then
22132        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
22133$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
22134        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22135$as_echo_n "checking for READELF... " >&6; }
22136        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22137$as_echo "disabled" >&6; }
22138      else
22139        # Check if the provided tool contains a complete path.
22140        tool_specified="$READELF"
22141        tool_basename="${tool_specified##*/}"
22142        if test "x$tool_basename" = "x$tool_specified"; then
22143          # A command without a complete path is provided, search $PATH.
22144          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
22145$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
22146          # Extract the first word of "$tool_basename", so it can be a program name with args.
22147set dummy $tool_basename; ac_word=$2
22148{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22149$as_echo_n "checking for $ac_word... " >&6; }
22150if ${ac_cv_path_READELF+:} false; then :
22151  $as_echo_n "(cached) " >&6
22152else
22153  case $READELF in
22154  [\\/]* | ?:[\\/]*)
22155  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
22156  ;;
22157  *)
22158  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22159for as_dir in $PATH
22160do
22161  IFS=$as_save_IFS
22162  test -z "$as_dir" && as_dir=.
22163    for ac_exec_ext in '' $ac_executable_extensions; do
22164  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22165    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
22166    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22167    break 2
22168  fi
22169done
22170  done
22171IFS=$as_save_IFS
22172
22173  ;;
22174esac
22175fi
22176READELF=$ac_cv_path_READELF
22177if test -n "$READELF"; then
22178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
22179$as_echo "$READELF" >&6; }
22180else
22181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22182$as_echo "no" >&6; }
22183fi
22184
22185
22186          if test "x$READELF" = x; then
22187            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22188          fi
22189        else
22190          # Otherwise we believe it is a complete path. Use it as it is.
22191          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
22192$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
22193          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
22194$as_echo_n "checking for READELF... " >&6; }
22195          if test ! -x "$tool_specified"; then
22196            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22197$as_echo "not found" >&6; }
22198            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
22199          fi
22200          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22201$as_echo "$tool_specified" >&6; }
22202        fi
22203      fi
22204    fi
22205
22206  fi
22207
22208
22209
22210
22211  # Publish this variable in the help.
22212
22213
22214  if [ -z "${HG+x}" ]; then
22215    # The variable is not set by user, try to locate tool using the code snippet
22216    for ac_prog in hg
22217do
22218  # Extract the first word of "$ac_prog", so it can be a program name with args.
22219set dummy $ac_prog; ac_word=$2
22220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22221$as_echo_n "checking for $ac_word... " >&6; }
22222if ${ac_cv_path_HG+:} false; then :
22223  $as_echo_n "(cached) " >&6
22224else
22225  case $HG in
22226  [\\/]* | ?:[\\/]*)
22227  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22228  ;;
22229  *)
22230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22231for as_dir in $PATH
22232do
22233  IFS=$as_save_IFS
22234  test -z "$as_dir" && as_dir=.
22235    for ac_exec_ext in '' $ac_executable_extensions; do
22236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22237    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22239    break 2
22240  fi
22241done
22242  done
22243IFS=$as_save_IFS
22244
22245  ;;
22246esac
22247fi
22248HG=$ac_cv_path_HG
22249if test -n "$HG"; then
22250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22251$as_echo "$HG" >&6; }
22252else
22253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22254$as_echo "no" >&6; }
22255fi
22256
22257
22258  test -n "$HG" && break
22259done
22260
22261  else
22262    # The variable is set, but is it from the command line or the environment?
22263
22264    # Try to remove the string !HG! from our list.
22265    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
22266    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22267      # If it failed, the variable was not from the command line. Ignore it,
22268      # but warn the user (except for BASH, which is always set by the calling BASH).
22269      if test "xHG" != xBASH; then
22270        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
22271$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
22272      fi
22273      # Try to locate tool using the code snippet
22274      for ac_prog in hg
22275do
22276  # Extract the first word of "$ac_prog", so it can be a program name with args.
22277set dummy $ac_prog; ac_word=$2
22278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22279$as_echo_n "checking for $ac_word... " >&6; }
22280if ${ac_cv_path_HG+:} false; then :
22281  $as_echo_n "(cached) " >&6
22282else
22283  case $HG in
22284  [\\/]* | ?:[\\/]*)
22285  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22286  ;;
22287  *)
22288  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22289for as_dir in $PATH
22290do
22291  IFS=$as_save_IFS
22292  test -z "$as_dir" && as_dir=.
22293    for ac_exec_ext in '' $ac_executable_extensions; do
22294  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22295    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22296    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22297    break 2
22298  fi
22299done
22300  done
22301IFS=$as_save_IFS
22302
22303  ;;
22304esac
22305fi
22306HG=$ac_cv_path_HG
22307if test -n "$HG"; then
22308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22309$as_echo "$HG" >&6; }
22310else
22311  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22312$as_echo "no" >&6; }
22313fi
22314
22315
22316  test -n "$HG" && break
22317done
22318
22319    else
22320      # If it succeeded, then it was overridden by the user. We will use it
22321      # for the tool.
22322
22323      # First remove it from the list of overridden variables, so we can test
22324      # for unknown variables in the end.
22325      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22326
22327      # Check if we try to supply an empty value
22328      if test "x$HG" = x; then
22329        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
22330$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
22331        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22332$as_echo_n "checking for HG... " >&6; }
22333        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22334$as_echo "disabled" >&6; }
22335      else
22336        # Check if the provided tool contains a complete path.
22337        tool_specified="$HG"
22338        tool_basename="${tool_specified##*/}"
22339        if test "x$tool_basename" = "x$tool_specified"; then
22340          # A command without a complete path is provided, search $PATH.
22341          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
22342$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
22343          # Extract the first word of "$tool_basename", so it can be a program name with args.
22344set dummy $tool_basename; ac_word=$2
22345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22346$as_echo_n "checking for $ac_word... " >&6; }
22347if ${ac_cv_path_HG+:} false; then :
22348  $as_echo_n "(cached) " >&6
22349else
22350  case $HG in
22351  [\\/]* | ?:[\\/]*)
22352  ac_cv_path_HG="$HG" # Let the user override the test with a path.
22353  ;;
22354  *)
22355  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22356for as_dir in $PATH
22357do
22358  IFS=$as_save_IFS
22359  test -z "$as_dir" && as_dir=.
22360    for ac_exec_ext in '' $ac_executable_extensions; do
22361  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22362    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
22363    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22364    break 2
22365  fi
22366done
22367  done
22368IFS=$as_save_IFS
22369
22370  ;;
22371esac
22372fi
22373HG=$ac_cv_path_HG
22374if test -n "$HG"; then
22375  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
22376$as_echo "$HG" >&6; }
22377else
22378  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22379$as_echo "no" >&6; }
22380fi
22381
22382
22383          if test "x$HG" = x; then
22384            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22385          fi
22386        else
22387          # Otherwise we believe it is a complete path. Use it as it is.
22388          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
22389$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
22390          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
22391$as_echo_n "checking for HG... " >&6; }
22392          if test ! -x "$tool_specified"; then
22393            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22394$as_echo "not found" >&6; }
22395            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
22396          fi
22397          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22398$as_echo "$tool_specified" >&6; }
22399        fi
22400      fi
22401    fi
22402
22403  fi
22404
22405
22406
22407
22408  # Publish this variable in the help.
22409
22410
22411  if [ -z "${STAT+x}" ]; then
22412    # The variable is not set by user, try to locate tool using the code snippet
22413    for ac_prog in stat
22414do
22415  # Extract the first word of "$ac_prog", so it can be a program name with args.
22416set dummy $ac_prog; ac_word=$2
22417{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22418$as_echo_n "checking for $ac_word... " >&6; }
22419if ${ac_cv_path_STAT+:} false; then :
22420  $as_echo_n "(cached) " >&6
22421else
22422  case $STAT in
22423  [\\/]* | ?:[\\/]*)
22424  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22425  ;;
22426  *)
22427  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22428for as_dir in $PATH
22429do
22430  IFS=$as_save_IFS
22431  test -z "$as_dir" && as_dir=.
22432    for ac_exec_ext in '' $ac_executable_extensions; do
22433  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22434    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22435    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22436    break 2
22437  fi
22438done
22439  done
22440IFS=$as_save_IFS
22441
22442  ;;
22443esac
22444fi
22445STAT=$ac_cv_path_STAT
22446if test -n "$STAT"; then
22447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22448$as_echo "$STAT" >&6; }
22449else
22450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22451$as_echo "no" >&6; }
22452fi
22453
22454
22455  test -n "$STAT" && break
22456done
22457
22458  else
22459    # The variable is set, but is it from the command line or the environment?
22460
22461    # Try to remove the string !STAT! from our list.
22462    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
22463    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22464      # If it failed, the variable was not from the command line. Ignore it,
22465      # but warn the user (except for BASH, which is always set by the calling BASH).
22466      if test "xSTAT" != xBASH; then
22467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
22468$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
22469      fi
22470      # Try to locate tool using the code snippet
22471      for ac_prog in stat
22472do
22473  # Extract the first word of "$ac_prog", so it can be a program name with args.
22474set dummy $ac_prog; ac_word=$2
22475{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22476$as_echo_n "checking for $ac_word... " >&6; }
22477if ${ac_cv_path_STAT+:} false; then :
22478  $as_echo_n "(cached) " >&6
22479else
22480  case $STAT in
22481  [\\/]* | ?:[\\/]*)
22482  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22483  ;;
22484  *)
22485  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22486for as_dir in $PATH
22487do
22488  IFS=$as_save_IFS
22489  test -z "$as_dir" && as_dir=.
22490    for ac_exec_ext in '' $ac_executable_extensions; do
22491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22492    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22494    break 2
22495  fi
22496done
22497  done
22498IFS=$as_save_IFS
22499
22500  ;;
22501esac
22502fi
22503STAT=$ac_cv_path_STAT
22504if test -n "$STAT"; then
22505  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22506$as_echo "$STAT" >&6; }
22507else
22508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22509$as_echo "no" >&6; }
22510fi
22511
22512
22513  test -n "$STAT" && break
22514done
22515
22516    else
22517      # If it succeeded, then it was overridden by the user. We will use it
22518      # for the tool.
22519
22520      # First remove it from the list of overridden variables, so we can test
22521      # for unknown variables in the end.
22522      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22523
22524      # Check if we try to supply an empty value
22525      if test "x$STAT" = x; then
22526        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22527$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22529$as_echo_n "checking for STAT... " >&6; }
22530        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22531$as_echo "disabled" >&6; }
22532      else
22533        # Check if the provided tool contains a complete path.
22534        tool_specified="$STAT"
22535        tool_basename="${tool_specified##*/}"
22536        if test "x$tool_basename" = "x$tool_specified"; then
22537          # A command without a complete path is provided, search $PATH.
22538          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22539$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22540          # Extract the first word of "$tool_basename", so it can be a program name with args.
22541set dummy $tool_basename; ac_word=$2
22542{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22543$as_echo_n "checking for $ac_word... " >&6; }
22544if ${ac_cv_path_STAT+:} false; then :
22545  $as_echo_n "(cached) " >&6
22546else
22547  case $STAT in
22548  [\\/]* | ?:[\\/]*)
22549  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22550  ;;
22551  *)
22552  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22553for as_dir in $PATH
22554do
22555  IFS=$as_save_IFS
22556  test -z "$as_dir" && as_dir=.
22557    for ac_exec_ext in '' $ac_executable_extensions; do
22558  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22559    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22560    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22561    break 2
22562  fi
22563done
22564  done
22565IFS=$as_save_IFS
22566
22567  ;;
22568esac
22569fi
22570STAT=$ac_cv_path_STAT
22571if test -n "$STAT"; then
22572  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22573$as_echo "$STAT" >&6; }
22574else
22575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22576$as_echo "no" >&6; }
22577fi
22578
22579
22580          if test "x$STAT" = x; then
22581            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22582          fi
22583        else
22584          # Otherwise we believe it is a complete path. Use it as it is.
22585          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22586$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22587          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22588$as_echo_n "checking for STAT... " >&6; }
22589          if test ! -x "$tool_specified"; then
22590            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22591$as_echo "not found" >&6; }
22592            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22593          fi
22594          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22595$as_echo "$tool_specified" >&6; }
22596        fi
22597      fi
22598    fi
22599
22600  fi
22601
22602
22603
22604
22605  # Publish this variable in the help.
22606
22607
22608  if [ -z "${TIME+x}" ]; then
22609    # The variable is not set by user, try to locate tool using the code snippet
22610    for ac_prog in time
22611do
22612  # Extract the first word of "$ac_prog", so it can be a program name with args.
22613set dummy $ac_prog; ac_word=$2
22614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22615$as_echo_n "checking for $ac_word... " >&6; }
22616if ${ac_cv_path_TIME+:} false; then :
22617  $as_echo_n "(cached) " >&6
22618else
22619  case $TIME in
22620  [\\/]* | ?:[\\/]*)
22621  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22622  ;;
22623  *)
22624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22625for as_dir in $PATH
22626do
22627  IFS=$as_save_IFS
22628  test -z "$as_dir" && as_dir=.
22629    for ac_exec_ext in '' $ac_executable_extensions; do
22630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22631    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22633    break 2
22634  fi
22635done
22636  done
22637IFS=$as_save_IFS
22638
22639  ;;
22640esac
22641fi
22642TIME=$ac_cv_path_TIME
22643if test -n "$TIME"; then
22644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22645$as_echo "$TIME" >&6; }
22646else
22647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22648$as_echo "no" >&6; }
22649fi
22650
22651
22652  test -n "$TIME" && break
22653done
22654
22655  else
22656    # The variable is set, but is it from the command line or the environment?
22657
22658    # Try to remove the string !TIME! from our list.
22659    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22660    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22661      # If it failed, the variable was not from the command line. Ignore it,
22662      # but warn the user (except for BASH, which is always set by the calling BASH).
22663      if test "xTIME" != xBASH; then
22664        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22665$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22666      fi
22667      # Try to locate tool using the code snippet
22668      for ac_prog in time
22669do
22670  # Extract the first word of "$ac_prog", so it can be a program name with args.
22671set dummy $ac_prog; ac_word=$2
22672{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22673$as_echo_n "checking for $ac_word... " >&6; }
22674if ${ac_cv_path_TIME+:} false; then :
22675  $as_echo_n "(cached) " >&6
22676else
22677  case $TIME in
22678  [\\/]* | ?:[\\/]*)
22679  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22680  ;;
22681  *)
22682  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22683for as_dir in $PATH
22684do
22685  IFS=$as_save_IFS
22686  test -z "$as_dir" && as_dir=.
22687    for ac_exec_ext in '' $ac_executable_extensions; do
22688  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22689    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22690    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22691    break 2
22692  fi
22693done
22694  done
22695IFS=$as_save_IFS
22696
22697  ;;
22698esac
22699fi
22700TIME=$ac_cv_path_TIME
22701if test -n "$TIME"; then
22702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22703$as_echo "$TIME" >&6; }
22704else
22705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22706$as_echo "no" >&6; }
22707fi
22708
22709
22710  test -n "$TIME" && break
22711done
22712
22713    else
22714      # If it succeeded, then it was overridden by the user. We will use it
22715      # for the tool.
22716
22717      # First remove it from the list of overridden variables, so we can test
22718      # for unknown variables in the end.
22719      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22720
22721      # Check if we try to supply an empty value
22722      if test "x$TIME" = x; then
22723        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22724$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22725        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22726$as_echo_n "checking for TIME... " >&6; }
22727        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22728$as_echo "disabled" >&6; }
22729      else
22730        # Check if the provided tool contains a complete path.
22731        tool_specified="$TIME"
22732        tool_basename="${tool_specified##*/}"
22733        if test "x$tool_basename" = "x$tool_specified"; then
22734          # A command without a complete path is provided, search $PATH.
22735          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22736$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22737          # Extract the first word of "$tool_basename", so it can be a program name with args.
22738set dummy $tool_basename; ac_word=$2
22739{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22740$as_echo_n "checking for $ac_word... " >&6; }
22741if ${ac_cv_path_TIME+:} false; then :
22742  $as_echo_n "(cached) " >&6
22743else
22744  case $TIME in
22745  [\\/]* | ?:[\\/]*)
22746  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22747  ;;
22748  *)
22749  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22750for as_dir in $PATH
22751do
22752  IFS=$as_save_IFS
22753  test -z "$as_dir" && as_dir=.
22754    for ac_exec_ext in '' $ac_executable_extensions; do
22755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22756    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22758    break 2
22759  fi
22760done
22761  done
22762IFS=$as_save_IFS
22763
22764  ;;
22765esac
22766fi
22767TIME=$ac_cv_path_TIME
22768if test -n "$TIME"; then
22769  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22770$as_echo "$TIME" >&6; }
22771else
22772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22773$as_echo "no" >&6; }
22774fi
22775
22776
22777          if test "x$TIME" = x; then
22778            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22779          fi
22780        else
22781          # Otherwise we believe it is a complete path. Use it as it is.
22782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22783$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22784          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22785$as_echo_n "checking for TIME... " >&6; }
22786          if test ! -x "$tool_specified"; then
22787            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22788$as_echo "not found" >&6; }
22789            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22790          fi
22791          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22792$as_echo "$tool_specified" >&6; }
22793        fi
22794      fi
22795    fi
22796
22797  fi
22798
22799
22800
22801
22802  # Publish this variable in the help.
22803
22804
22805  if [ -z "${DTRACE+x}" ]; then
22806    # The variable is not set by user, try to locate tool using the code snippet
22807    for ac_prog in dtrace
22808do
22809  # Extract the first word of "$ac_prog", so it can be a program name with args.
22810set dummy $ac_prog; ac_word=$2
22811{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22812$as_echo_n "checking for $ac_word... " >&6; }
22813if ${ac_cv_path_DTRACE+:} false; then :
22814  $as_echo_n "(cached) " >&6
22815else
22816  case $DTRACE in
22817  [\\/]* | ?:[\\/]*)
22818  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22819  ;;
22820  *)
22821  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22822for as_dir in $PATH
22823do
22824  IFS=$as_save_IFS
22825  test -z "$as_dir" && as_dir=.
22826    for ac_exec_ext in '' $ac_executable_extensions; do
22827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22828    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22830    break 2
22831  fi
22832done
22833  done
22834IFS=$as_save_IFS
22835
22836  ;;
22837esac
22838fi
22839DTRACE=$ac_cv_path_DTRACE
22840if test -n "$DTRACE"; then
22841  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22842$as_echo "$DTRACE" >&6; }
22843else
22844  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22845$as_echo "no" >&6; }
22846fi
22847
22848
22849  test -n "$DTRACE" && break
22850done
22851
22852  else
22853    # The variable is set, but is it from the command line or the environment?
22854
22855    # Try to remove the string !DTRACE! from our list.
22856    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22857    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22858      # If it failed, the variable was not from the command line. Ignore it,
22859      # but warn the user (except for BASH, which is always set by the calling BASH).
22860      if test "xDTRACE" != xBASH; then
22861        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22862$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22863      fi
22864      # Try to locate tool using the code snippet
22865      for ac_prog in dtrace
22866do
22867  # Extract the first word of "$ac_prog", so it can be a program name with args.
22868set dummy $ac_prog; ac_word=$2
22869{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22870$as_echo_n "checking for $ac_word... " >&6; }
22871if ${ac_cv_path_DTRACE+:} false; then :
22872  $as_echo_n "(cached) " >&6
22873else
22874  case $DTRACE in
22875  [\\/]* | ?:[\\/]*)
22876  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22877  ;;
22878  *)
22879  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22880for as_dir in $PATH
22881do
22882  IFS=$as_save_IFS
22883  test -z "$as_dir" && as_dir=.
22884    for ac_exec_ext in '' $ac_executable_extensions; do
22885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22886    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22888    break 2
22889  fi
22890done
22891  done
22892IFS=$as_save_IFS
22893
22894  ;;
22895esac
22896fi
22897DTRACE=$ac_cv_path_DTRACE
22898if test -n "$DTRACE"; then
22899  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22900$as_echo "$DTRACE" >&6; }
22901else
22902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22903$as_echo "no" >&6; }
22904fi
22905
22906
22907  test -n "$DTRACE" && break
22908done
22909
22910    else
22911      # If it succeeded, then it was overridden by the user. We will use it
22912      # for the tool.
22913
22914      # First remove it from the list of overridden variables, so we can test
22915      # for unknown variables in the end.
22916      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22917
22918      # Check if we try to supply an empty value
22919      if test "x$DTRACE" = x; then
22920        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22921$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22922        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22923$as_echo_n "checking for DTRACE... " >&6; }
22924        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22925$as_echo "disabled" >&6; }
22926      else
22927        # Check if the provided tool contains a complete path.
22928        tool_specified="$DTRACE"
22929        tool_basename="${tool_specified##*/}"
22930        if test "x$tool_basename" = "x$tool_specified"; then
22931          # A command without a complete path is provided, search $PATH.
22932          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22933$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22934          # Extract the first word of "$tool_basename", so it can be a program name with args.
22935set dummy $tool_basename; ac_word=$2
22936{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22937$as_echo_n "checking for $ac_word... " >&6; }
22938if ${ac_cv_path_DTRACE+:} false; then :
22939  $as_echo_n "(cached) " >&6
22940else
22941  case $DTRACE in
22942  [\\/]* | ?:[\\/]*)
22943  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22944  ;;
22945  *)
22946  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22947for as_dir in $PATH
22948do
22949  IFS=$as_save_IFS
22950  test -z "$as_dir" && as_dir=.
22951    for ac_exec_ext in '' $ac_executable_extensions; do
22952  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22953    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22954    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22955    break 2
22956  fi
22957done
22958  done
22959IFS=$as_save_IFS
22960
22961  ;;
22962esac
22963fi
22964DTRACE=$ac_cv_path_DTRACE
22965if test -n "$DTRACE"; then
22966  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22967$as_echo "$DTRACE" >&6; }
22968else
22969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22970$as_echo "no" >&6; }
22971fi
22972
22973
22974          if test "x$DTRACE" = x; then
22975            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22976          fi
22977        else
22978          # Otherwise we believe it is a complete path. Use it as it is.
22979          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22980$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22981          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22982$as_echo_n "checking for DTRACE... " >&6; }
22983          if test ! -x "$tool_specified"; then
22984            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22985$as_echo "not found" >&6; }
22986            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22987          fi
22988          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22989$as_echo "$tool_specified" >&6; }
22990        fi
22991      fi
22992    fi
22993
22994  fi
22995
22996
22997
22998
22999  # Publish this variable in the help.
23000
23001
23002  if [ -z "${PATCH+x}" ]; then
23003    # The variable is not set by user, try to locate tool using the code snippet
23004    for ac_prog in gpatch patch
23005do
23006  # Extract the first word of "$ac_prog", so it can be a program name with args.
23007set dummy $ac_prog; ac_word=$2
23008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23009$as_echo_n "checking for $ac_word... " >&6; }
23010if ${ac_cv_path_PATCH+:} false; then :
23011  $as_echo_n "(cached) " >&6
23012else
23013  case $PATCH in
23014  [\\/]* | ?:[\\/]*)
23015  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23016  ;;
23017  *)
23018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23019for as_dir in $PATH
23020do
23021  IFS=$as_save_IFS
23022  test -z "$as_dir" && as_dir=.
23023    for ac_exec_ext in '' $ac_executable_extensions; do
23024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23025    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23027    break 2
23028  fi
23029done
23030  done
23031IFS=$as_save_IFS
23032
23033  ;;
23034esac
23035fi
23036PATCH=$ac_cv_path_PATCH
23037if test -n "$PATCH"; then
23038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23039$as_echo "$PATCH" >&6; }
23040else
23041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23042$as_echo "no" >&6; }
23043fi
23044
23045
23046  test -n "$PATCH" && break
23047done
23048
23049  else
23050    # The variable is set, but is it from the command line or the environment?
23051
23052    # Try to remove the string !PATCH! from our list.
23053    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
23054    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23055      # If it failed, the variable was not from the command line. Ignore it,
23056      # but warn the user (except for BASH, which is always set by the calling BASH).
23057      if test "xPATCH" != xBASH; then
23058        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
23059$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
23060      fi
23061      # Try to locate tool using the code snippet
23062      for ac_prog in gpatch patch
23063do
23064  # Extract the first word of "$ac_prog", so it can be a program name with args.
23065set dummy $ac_prog; ac_word=$2
23066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23067$as_echo_n "checking for $ac_word... " >&6; }
23068if ${ac_cv_path_PATCH+:} false; then :
23069  $as_echo_n "(cached) " >&6
23070else
23071  case $PATCH in
23072  [\\/]* | ?:[\\/]*)
23073  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23074  ;;
23075  *)
23076  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23077for as_dir in $PATH
23078do
23079  IFS=$as_save_IFS
23080  test -z "$as_dir" && as_dir=.
23081    for ac_exec_ext in '' $ac_executable_extensions; do
23082  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23083    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23084    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23085    break 2
23086  fi
23087done
23088  done
23089IFS=$as_save_IFS
23090
23091  ;;
23092esac
23093fi
23094PATCH=$ac_cv_path_PATCH
23095if test -n "$PATCH"; then
23096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23097$as_echo "$PATCH" >&6; }
23098else
23099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23100$as_echo "no" >&6; }
23101fi
23102
23103
23104  test -n "$PATCH" && break
23105done
23106
23107    else
23108      # If it succeeded, then it was overridden by the user. We will use it
23109      # for the tool.
23110
23111      # First remove it from the list of overridden variables, so we can test
23112      # for unknown variables in the end.
23113      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23114
23115      # Check if we try to supply an empty value
23116      if test "x$PATCH" = x; then
23117        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
23118$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
23119        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23120$as_echo_n "checking for PATCH... " >&6; }
23121        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23122$as_echo "disabled" >&6; }
23123      else
23124        # Check if the provided tool contains a complete path.
23125        tool_specified="$PATCH"
23126        tool_basename="${tool_specified##*/}"
23127        if test "x$tool_basename" = "x$tool_specified"; then
23128          # A command without a complete path is provided, search $PATH.
23129          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
23130$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
23131          # Extract the first word of "$tool_basename", so it can be a program name with args.
23132set dummy $tool_basename; ac_word=$2
23133{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23134$as_echo_n "checking for $ac_word... " >&6; }
23135if ${ac_cv_path_PATCH+:} false; then :
23136  $as_echo_n "(cached) " >&6
23137else
23138  case $PATCH in
23139  [\\/]* | ?:[\\/]*)
23140  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
23141  ;;
23142  *)
23143  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23144for as_dir in $PATH
23145do
23146  IFS=$as_save_IFS
23147  test -z "$as_dir" && as_dir=.
23148    for ac_exec_ext in '' $ac_executable_extensions; do
23149  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23150    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
23151    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23152    break 2
23153  fi
23154done
23155  done
23156IFS=$as_save_IFS
23157
23158  ;;
23159esac
23160fi
23161PATCH=$ac_cv_path_PATCH
23162if test -n "$PATCH"; then
23163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
23164$as_echo "$PATCH" >&6; }
23165else
23166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23167$as_echo "no" >&6; }
23168fi
23169
23170
23171          if test "x$PATCH" = x; then
23172            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23173          fi
23174        else
23175          # Otherwise we believe it is a complete path. Use it as it is.
23176          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
23177$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
23178          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
23179$as_echo_n "checking for PATCH... " >&6; }
23180          if test ! -x "$tool_specified"; then
23181            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23182$as_echo "not found" >&6; }
23183            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
23184          fi
23185          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23186$as_echo "$tool_specified" >&6; }
23187        fi
23188      fi
23189    fi
23190
23191  fi
23192
23193
23194  # Check if it's GNU time
23195  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
23196  if test "x$IS_GNU_TIME" != x; then
23197    IS_GNU_TIME=yes
23198  else
23199    IS_GNU_TIME=no
23200  fi
23201
23202
23203  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
23204
23205
23206
23207  # Publish this variable in the help.
23208
23209
23210  if [ -z "${DSYMUTIL+x}" ]; then
23211    # The variable is not set by user, try to locate tool using the code snippet
23212    for ac_prog in dsymutil
23213do
23214  # Extract the first word of "$ac_prog", so it can be a program name with args.
23215set dummy $ac_prog; ac_word=$2
23216{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23217$as_echo_n "checking for $ac_word... " >&6; }
23218if ${ac_cv_path_DSYMUTIL+:} false; then :
23219  $as_echo_n "(cached) " >&6
23220else
23221  case $DSYMUTIL in
23222  [\\/]* | ?:[\\/]*)
23223  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23224  ;;
23225  *)
23226  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23227for as_dir in $PATH
23228do
23229  IFS=$as_save_IFS
23230  test -z "$as_dir" && as_dir=.
23231    for ac_exec_ext in '' $ac_executable_extensions; do
23232  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23233    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23234    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23235    break 2
23236  fi
23237done
23238  done
23239IFS=$as_save_IFS
23240
23241  ;;
23242esac
23243fi
23244DSYMUTIL=$ac_cv_path_DSYMUTIL
23245if test -n "$DSYMUTIL"; then
23246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23247$as_echo "$DSYMUTIL" >&6; }
23248else
23249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23250$as_echo "no" >&6; }
23251fi
23252
23253
23254  test -n "$DSYMUTIL" && break
23255done
23256
23257  else
23258    # The variable is set, but is it from the command line or the environment?
23259
23260    # Try to remove the string !DSYMUTIL! from our list.
23261    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
23262    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23263      # If it failed, the variable was not from the command line. Ignore it,
23264      # but warn the user (except for BASH, which is always set by the calling BASH).
23265      if test "xDSYMUTIL" != xBASH; then
23266        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
23267$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
23268      fi
23269      # Try to locate tool using the code snippet
23270      for ac_prog in dsymutil
23271do
23272  # Extract the first word of "$ac_prog", so it can be a program name with args.
23273set dummy $ac_prog; ac_word=$2
23274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23275$as_echo_n "checking for $ac_word... " >&6; }
23276if ${ac_cv_path_DSYMUTIL+:} false; then :
23277  $as_echo_n "(cached) " >&6
23278else
23279  case $DSYMUTIL in
23280  [\\/]* | ?:[\\/]*)
23281  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23282  ;;
23283  *)
23284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23285for as_dir in $PATH
23286do
23287  IFS=$as_save_IFS
23288  test -z "$as_dir" && as_dir=.
23289    for ac_exec_ext in '' $ac_executable_extensions; do
23290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23291    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23293    break 2
23294  fi
23295done
23296  done
23297IFS=$as_save_IFS
23298
23299  ;;
23300esac
23301fi
23302DSYMUTIL=$ac_cv_path_DSYMUTIL
23303if test -n "$DSYMUTIL"; then
23304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23305$as_echo "$DSYMUTIL" >&6; }
23306else
23307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23308$as_echo "no" >&6; }
23309fi
23310
23311
23312  test -n "$DSYMUTIL" && break
23313done
23314
23315    else
23316      # If it succeeded, then it was overridden by the user. We will use it
23317      # for the tool.
23318
23319      # First remove it from the list of overridden variables, so we can test
23320      # for unknown variables in the end.
23321      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23322
23323      # Check if we try to supply an empty value
23324      if test "x$DSYMUTIL" = x; then
23325        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
23326$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23328$as_echo_n "checking for DSYMUTIL... " >&6; }
23329        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23330$as_echo "disabled" >&6; }
23331      else
23332        # Check if the provided tool contains a complete path.
23333        tool_specified="$DSYMUTIL"
23334        tool_basename="${tool_specified##*/}"
23335        if test "x$tool_basename" = "x$tool_specified"; then
23336          # A command without a complete path is provided, search $PATH.
23337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
23338$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
23339          # Extract the first word of "$tool_basename", so it can be a program name with args.
23340set dummy $tool_basename; ac_word=$2
23341{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23342$as_echo_n "checking for $ac_word... " >&6; }
23343if ${ac_cv_path_DSYMUTIL+:} false; then :
23344  $as_echo_n "(cached) " >&6
23345else
23346  case $DSYMUTIL in
23347  [\\/]* | ?:[\\/]*)
23348  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
23349  ;;
23350  *)
23351  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23352for as_dir in $PATH
23353do
23354  IFS=$as_save_IFS
23355  test -z "$as_dir" && as_dir=.
23356    for ac_exec_ext in '' $ac_executable_extensions; do
23357  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23358    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
23359    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23360    break 2
23361  fi
23362done
23363  done
23364IFS=$as_save_IFS
23365
23366  ;;
23367esac
23368fi
23369DSYMUTIL=$ac_cv_path_DSYMUTIL
23370if test -n "$DSYMUTIL"; then
23371  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
23372$as_echo "$DSYMUTIL" >&6; }
23373else
23374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23375$as_echo "no" >&6; }
23376fi
23377
23378
23379          if test "x$DSYMUTIL" = x; then
23380            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23381          fi
23382        else
23383          # Otherwise we believe it is a complete path. Use it as it is.
23384          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
23385$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
23386          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
23387$as_echo_n "checking for DSYMUTIL... " >&6; }
23388          if test ! -x "$tool_specified"; then
23389            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23390$as_echo "not found" >&6; }
23391            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
23392          fi
23393          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23394$as_echo "$tool_specified" >&6; }
23395        fi
23396      fi
23397    fi
23398
23399  fi
23400
23401
23402
23403  if test "x$DSYMUTIL" = x; then
23404    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
23405  fi
23406
23407
23408
23409
23410
23411  # Publish this variable in the help.
23412
23413
23414  if [ -z "${XATTR+x}" ]; then
23415    # The variable is not set by user, try to locate tool using the code snippet
23416    for ac_prog in xattr
23417do
23418  # Extract the first word of "$ac_prog", so it can be a program name with args.
23419set dummy $ac_prog; ac_word=$2
23420{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23421$as_echo_n "checking for $ac_word... " >&6; }
23422if ${ac_cv_path_XATTR+:} false; then :
23423  $as_echo_n "(cached) " >&6
23424else
23425  case $XATTR in
23426  [\\/]* | ?:[\\/]*)
23427  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23428  ;;
23429  *)
23430  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23431for as_dir in $PATH
23432do
23433  IFS=$as_save_IFS
23434  test -z "$as_dir" && as_dir=.
23435    for ac_exec_ext in '' $ac_executable_extensions; do
23436  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23437    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23438    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23439    break 2
23440  fi
23441done
23442  done
23443IFS=$as_save_IFS
23444
23445  ;;
23446esac
23447fi
23448XATTR=$ac_cv_path_XATTR
23449if test -n "$XATTR"; then
23450  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23451$as_echo "$XATTR" >&6; }
23452else
23453  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23454$as_echo "no" >&6; }
23455fi
23456
23457
23458  test -n "$XATTR" && break
23459done
23460
23461  else
23462    # The variable is set, but is it from the command line or the environment?
23463
23464    # Try to remove the string !XATTR! from our list.
23465    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
23466    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23467      # If it failed, the variable was not from the command line. Ignore it,
23468      # but warn the user (except for BASH, which is always set by the calling BASH).
23469      if test "xXATTR" != xBASH; then
23470        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
23471$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
23472      fi
23473      # Try to locate tool using the code snippet
23474      for ac_prog in xattr
23475do
23476  # Extract the first word of "$ac_prog", so it can be a program name with args.
23477set dummy $ac_prog; ac_word=$2
23478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23479$as_echo_n "checking for $ac_word... " >&6; }
23480if ${ac_cv_path_XATTR+:} false; then :
23481  $as_echo_n "(cached) " >&6
23482else
23483  case $XATTR in
23484  [\\/]* | ?:[\\/]*)
23485  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23486  ;;
23487  *)
23488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23489for as_dir in $PATH
23490do
23491  IFS=$as_save_IFS
23492  test -z "$as_dir" && as_dir=.
23493    for ac_exec_ext in '' $ac_executable_extensions; do
23494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23495    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23497    break 2
23498  fi
23499done
23500  done
23501IFS=$as_save_IFS
23502
23503  ;;
23504esac
23505fi
23506XATTR=$ac_cv_path_XATTR
23507if test -n "$XATTR"; then
23508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23509$as_echo "$XATTR" >&6; }
23510else
23511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23512$as_echo "no" >&6; }
23513fi
23514
23515
23516  test -n "$XATTR" && break
23517done
23518
23519    else
23520      # If it succeeded, then it was overridden by the user. We will use it
23521      # for the tool.
23522
23523      # First remove it from the list of overridden variables, so we can test
23524      # for unknown variables in the end.
23525      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23526
23527      # Check if we try to supply an empty value
23528      if test "x$XATTR" = x; then
23529        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23530$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23531        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23532$as_echo_n "checking for XATTR... " >&6; }
23533        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23534$as_echo "disabled" >&6; }
23535      else
23536        # Check if the provided tool contains a complete path.
23537        tool_specified="$XATTR"
23538        tool_basename="${tool_specified##*/}"
23539        if test "x$tool_basename" = "x$tool_specified"; then
23540          # A command without a complete path is provided, search $PATH.
23541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23542$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23543          # Extract the first word of "$tool_basename", so it can be a program name with args.
23544set dummy $tool_basename; ac_word=$2
23545{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23546$as_echo_n "checking for $ac_word... " >&6; }
23547if ${ac_cv_path_XATTR+:} false; then :
23548  $as_echo_n "(cached) " >&6
23549else
23550  case $XATTR in
23551  [\\/]* | ?:[\\/]*)
23552  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23553  ;;
23554  *)
23555  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23556for as_dir in $PATH
23557do
23558  IFS=$as_save_IFS
23559  test -z "$as_dir" && as_dir=.
23560    for ac_exec_ext in '' $ac_executable_extensions; do
23561  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23562    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23563    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23564    break 2
23565  fi
23566done
23567  done
23568IFS=$as_save_IFS
23569
23570  ;;
23571esac
23572fi
23573XATTR=$ac_cv_path_XATTR
23574if test -n "$XATTR"; then
23575  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23576$as_echo "$XATTR" >&6; }
23577else
23578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23579$as_echo "no" >&6; }
23580fi
23581
23582
23583          if test "x$XATTR" = x; then
23584            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23585          fi
23586        else
23587          # Otherwise we believe it is a complete path. Use it as it is.
23588          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23589$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23590          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23591$as_echo_n "checking for XATTR... " >&6; }
23592          if test ! -x "$tool_specified"; then
23593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23594$as_echo "not found" >&6; }
23595            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23596          fi
23597          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23598$as_echo "$tool_specified" >&6; }
23599        fi
23600      fi
23601    fi
23602
23603  fi
23604
23605
23606
23607  if test "x$XATTR" = x; then
23608    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23609  fi
23610
23611
23612
23613
23614  # Publish this variable in the help.
23615
23616
23617  if [ -z "${CODESIGN+x}" ]; then
23618    # The variable is not set by user, try to locate tool using the code snippet
23619    for ac_prog in codesign
23620do
23621  # Extract the first word of "$ac_prog", so it can be a program name with args.
23622set dummy $ac_prog; ac_word=$2
23623{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23624$as_echo_n "checking for $ac_word... " >&6; }
23625if ${ac_cv_path_CODESIGN+:} false; then :
23626  $as_echo_n "(cached) " >&6
23627else
23628  case $CODESIGN in
23629  [\\/]* | ?:[\\/]*)
23630  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23631  ;;
23632  *)
23633  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23634for as_dir in $PATH
23635do
23636  IFS=$as_save_IFS
23637  test -z "$as_dir" && as_dir=.
23638    for ac_exec_ext in '' $ac_executable_extensions; do
23639  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23640    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23641    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23642    break 2
23643  fi
23644done
23645  done
23646IFS=$as_save_IFS
23647
23648  ;;
23649esac
23650fi
23651CODESIGN=$ac_cv_path_CODESIGN
23652if test -n "$CODESIGN"; then
23653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23654$as_echo "$CODESIGN" >&6; }
23655else
23656  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23657$as_echo "no" >&6; }
23658fi
23659
23660
23661  test -n "$CODESIGN" && break
23662done
23663
23664  else
23665    # The variable is set, but is it from the command line or the environment?
23666
23667    # Try to remove the string !CODESIGN! from our list.
23668    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23669    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23670      # If it failed, the variable was not from the command line. Ignore it,
23671      # but warn the user (except for BASH, which is always set by the calling BASH).
23672      if test "xCODESIGN" != xBASH; then
23673        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23674$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23675      fi
23676      # Try to locate tool using the code snippet
23677      for ac_prog in codesign
23678do
23679  # Extract the first word of "$ac_prog", so it can be a program name with args.
23680set dummy $ac_prog; ac_word=$2
23681{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23682$as_echo_n "checking for $ac_word... " >&6; }
23683if ${ac_cv_path_CODESIGN+:} false; then :
23684  $as_echo_n "(cached) " >&6
23685else
23686  case $CODESIGN in
23687  [\\/]* | ?:[\\/]*)
23688  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23689  ;;
23690  *)
23691  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23692for as_dir in $PATH
23693do
23694  IFS=$as_save_IFS
23695  test -z "$as_dir" && as_dir=.
23696    for ac_exec_ext in '' $ac_executable_extensions; do
23697  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23698    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23699    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23700    break 2
23701  fi
23702done
23703  done
23704IFS=$as_save_IFS
23705
23706  ;;
23707esac
23708fi
23709CODESIGN=$ac_cv_path_CODESIGN
23710if test -n "$CODESIGN"; then
23711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23712$as_echo "$CODESIGN" >&6; }
23713else
23714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23715$as_echo "no" >&6; }
23716fi
23717
23718
23719  test -n "$CODESIGN" && break
23720done
23721
23722    else
23723      # If it succeeded, then it was overridden by the user. We will use it
23724      # for the tool.
23725
23726      # First remove it from the list of overridden variables, so we can test
23727      # for unknown variables in the end.
23728      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23729
23730      # Check if we try to supply an empty value
23731      if test "x$CODESIGN" = x; then
23732        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23733$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23734        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23735$as_echo_n "checking for CODESIGN... " >&6; }
23736        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23737$as_echo "disabled" >&6; }
23738      else
23739        # Check if the provided tool contains a complete path.
23740        tool_specified="$CODESIGN"
23741        tool_basename="${tool_specified##*/}"
23742        if test "x$tool_basename" = "x$tool_specified"; then
23743          # A command without a complete path is provided, search $PATH.
23744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23745$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23746          # Extract the first word of "$tool_basename", so it can be a program name with args.
23747set dummy $tool_basename; ac_word=$2
23748{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23749$as_echo_n "checking for $ac_word... " >&6; }
23750if ${ac_cv_path_CODESIGN+:} false; then :
23751  $as_echo_n "(cached) " >&6
23752else
23753  case $CODESIGN in
23754  [\\/]* | ?:[\\/]*)
23755  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23756  ;;
23757  *)
23758  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23759for as_dir in $PATH
23760do
23761  IFS=$as_save_IFS
23762  test -z "$as_dir" && as_dir=.
23763    for ac_exec_ext in '' $ac_executable_extensions; do
23764  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23765    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23766    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23767    break 2
23768  fi
23769done
23770  done
23771IFS=$as_save_IFS
23772
23773  ;;
23774esac
23775fi
23776CODESIGN=$ac_cv_path_CODESIGN
23777if test -n "$CODESIGN"; then
23778  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23779$as_echo "$CODESIGN" >&6; }
23780else
23781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23782$as_echo "no" >&6; }
23783fi
23784
23785
23786          if test "x$CODESIGN" = x; then
23787            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23788          fi
23789        else
23790          # Otherwise we believe it is a complete path. Use it as it is.
23791          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23792$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23793          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23794$as_echo_n "checking for CODESIGN... " >&6; }
23795          if test ! -x "$tool_specified"; then
23796            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23797$as_echo "not found" >&6; }
23798            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23799          fi
23800          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23801$as_echo "$tool_specified" >&6; }
23802        fi
23803      fi
23804    fi
23805
23806  fi
23807
23808
23809    if test "x$CODESIGN" != "x"; then
23810      # Verify that the openjdk_codesign certificate is present
23811      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23812$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23813      $RM codesign-testfile
23814      $TOUCH codesign-testfile
23815      $CODESIGN -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23816      $RM codesign-testfile
23817      if test "x$CODESIGN" = x; then
23818        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23819$as_echo "no" >&6; }
23820      else
23821        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23822$as_echo "yes" >&6; }
23823      fi
23824    fi
23825
23826
23827
23828  # Publish this variable in the help.
23829
23830
23831  if [ -z "${SETFILE+x}" ]; then
23832    # The variable is not set by user, try to locate tool using the code snippet
23833    for ac_prog in SetFile
23834do
23835  # Extract the first word of "$ac_prog", so it can be a program name with args.
23836set dummy $ac_prog; ac_word=$2
23837{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23838$as_echo_n "checking for $ac_word... " >&6; }
23839if ${ac_cv_path_SETFILE+:} false; then :
23840  $as_echo_n "(cached) " >&6
23841else
23842  case $SETFILE in
23843  [\\/]* | ?:[\\/]*)
23844  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23845  ;;
23846  *)
23847  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23848for as_dir in $PATH
23849do
23850  IFS=$as_save_IFS
23851  test -z "$as_dir" && as_dir=.
23852    for ac_exec_ext in '' $ac_executable_extensions; do
23853  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23854    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23855    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23856    break 2
23857  fi
23858done
23859  done
23860IFS=$as_save_IFS
23861
23862  ;;
23863esac
23864fi
23865SETFILE=$ac_cv_path_SETFILE
23866if test -n "$SETFILE"; then
23867  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23868$as_echo "$SETFILE" >&6; }
23869else
23870  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23871$as_echo "no" >&6; }
23872fi
23873
23874
23875  test -n "$SETFILE" && break
23876done
23877
23878  else
23879    # The variable is set, but is it from the command line or the environment?
23880
23881    # Try to remove the string !SETFILE! from our list.
23882    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23883    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23884      # If it failed, the variable was not from the command line. Ignore it,
23885      # but warn the user (except for BASH, which is always set by the calling BASH).
23886      if test "xSETFILE" != xBASH; then
23887        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23888$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23889      fi
23890      # Try to locate tool using the code snippet
23891      for ac_prog in SetFile
23892do
23893  # Extract the first word of "$ac_prog", so it can be a program name with args.
23894set dummy $ac_prog; ac_word=$2
23895{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23896$as_echo_n "checking for $ac_word... " >&6; }
23897if ${ac_cv_path_SETFILE+:} false; then :
23898  $as_echo_n "(cached) " >&6
23899else
23900  case $SETFILE in
23901  [\\/]* | ?:[\\/]*)
23902  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23903  ;;
23904  *)
23905  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23906for as_dir in $PATH
23907do
23908  IFS=$as_save_IFS
23909  test -z "$as_dir" && as_dir=.
23910    for ac_exec_ext in '' $ac_executable_extensions; do
23911  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23912    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23913    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23914    break 2
23915  fi
23916done
23917  done
23918IFS=$as_save_IFS
23919
23920  ;;
23921esac
23922fi
23923SETFILE=$ac_cv_path_SETFILE
23924if test -n "$SETFILE"; then
23925  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23926$as_echo "$SETFILE" >&6; }
23927else
23928  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23929$as_echo "no" >&6; }
23930fi
23931
23932
23933  test -n "$SETFILE" && break
23934done
23935
23936    else
23937      # If it succeeded, then it was overridden by the user. We will use it
23938      # for the tool.
23939
23940      # First remove it from the list of overridden variables, so we can test
23941      # for unknown variables in the end.
23942      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23943
23944      # Check if we try to supply an empty value
23945      if test "x$SETFILE" = x; then
23946        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23947$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23948        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23949$as_echo_n "checking for SETFILE... " >&6; }
23950        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23951$as_echo "disabled" >&6; }
23952      else
23953        # Check if the provided tool contains a complete path.
23954        tool_specified="$SETFILE"
23955        tool_basename="${tool_specified##*/}"
23956        if test "x$tool_basename" = "x$tool_specified"; then
23957          # A command without a complete path is provided, search $PATH.
23958          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23959$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23960          # Extract the first word of "$tool_basename", so it can be a program name with args.
23961set dummy $tool_basename; ac_word=$2
23962{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23963$as_echo_n "checking for $ac_word... " >&6; }
23964if ${ac_cv_path_SETFILE+:} false; then :
23965  $as_echo_n "(cached) " >&6
23966else
23967  case $SETFILE in
23968  [\\/]* | ?:[\\/]*)
23969  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23970  ;;
23971  *)
23972  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23973for as_dir in $PATH
23974do
23975  IFS=$as_save_IFS
23976  test -z "$as_dir" && as_dir=.
23977    for ac_exec_ext in '' $ac_executable_extensions; do
23978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23979    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23981    break 2
23982  fi
23983done
23984  done
23985IFS=$as_save_IFS
23986
23987  ;;
23988esac
23989fi
23990SETFILE=$ac_cv_path_SETFILE
23991if test -n "$SETFILE"; then
23992  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23993$as_echo "$SETFILE" >&6; }
23994else
23995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23996$as_echo "no" >&6; }
23997fi
23998
23999
24000          if test "x$SETFILE" = x; then
24001            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
24002          fi
24003        else
24004          # Otherwise we believe it is a complete path. Use it as it is.
24005          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
24006$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
24007          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
24008$as_echo_n "checking for SETFILE... " >&6; }
24009          if test ! -x "$tool_specified"; then
24010            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
24011$as_echo "not found" >&6; }
24012            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
24013          fi
24014          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
24015$as_echo "$tool_specified" >&6; }
24016        fi
24017      fi
24018    fi
24019
24020  fi
24021
24022
24023
24024  if test "x$SETFILE" = x; then
24025    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
24026  fi
24027
24028
24029  fi
24030
24031
24032  # Test if bash supports pipefail.
24033  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
24034$as_echo_n "checking if bash supports pipefail... " >&6; }
24035  if ${BASH} -c 'set -o pipefail'; then
24036    BASH_ARGS="$BASH_ARGS -o pipefail"
24037    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24038$as_echo "yes" >&6; }
24039  else
24040    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24041$as_echo "no" >&6; }
24042  fi
24043
24044  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
24045$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
24046  if ${BASH} -e -c 'true'; then
24047    BASH_ARGS="$BASH_ARGS -e"
24048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24049$as_echo "yes" >&6; }
24050  else
24051    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24052$as_echo "no" >&6; }
24053  fi
24054
24055
24056
24057
24058# Check if pkg-config is available.
24059
24060
24061if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
24062	if test -n "$ac_tool_prefix"; then
24063  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
24064set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
24065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24066$as_echo_n "checking for $ac_word... " >&6; }
24067if ${ac_cv_path_PKG_CONFIG+:} false; then :
24068  $as_echo_n "(cached) " >&6
24069else
24070  case $PKG_CONFIG in
24071  [\\/]* | ?:[\\/]*)
24072  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
24073  ;;
24074  *)
24075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24076for as_dir in $PATH
24077do
24078  IFS=$as_save_IFS
24079  test -z "$as_dir" && as_dir=.
24080    for ac_exec_ext in '' $ac_executable_extensions; do
24081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24082    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24084    break 2
24085  fi
24086done
24087  done
24088IFS=$as_save_IFS
24089
24090  ;;
24091esac
24092fi
24093PKG_CONFIG=$ac_cv_path_PKG_CONFIG
24094if test -n "$PKG_CONFIG"; then
24095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
24096$as_echo "$PKG_CONFIG" >&6; }
24097else
24098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24099$as_echo "no" >&6; }
24100fi
24101
24102
24103fi
24104if test -z "$ac_cv_path_PKG_CONFIG"; then
24105  ac_pt_PKG_CONFIG=$PKG_CONFIG
24106  # Extract the first word of "pkg-config", so it can be a program name with args.
24107set dummy pkg-config; ac_word=$2
24108{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
24109$as_echo_n "checking for $ac_word... " >&6; }
24110if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
24111  $as_echo_n "(cached) " >&6
24112else
24113  case $ac_pt_PKG_CONFIG in
24114  [\\/]* | ?:[\\/]*)
24115  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
24116  ;;
24117  *)
24118  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
24119for as_dir in $PATH
24120do
24121  IFS=$as_save_IFS
24122  test -z "$as_dir" && as_dir=.
24123    for ac_exec_ext in '' $ac_executable_extensions; do
24124  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
24125    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
24126    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
24127    break 2
24128  fi
24129done
24130  done
24131IFS=$as_save_IFS
24132
24133  ;;
24134esac
24135fi
24136ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
24137if test -n "$ac_pt_PKG_CONFIG"; then
24138  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
24139$as_echo "$ac_pt_PKG_CONFIG" >&6; }
24140else
24141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24142$as_echo "no" >&6; }
24143fi
24144
24145  if test "x$ac_pt_PKG_CONFIG" = x; then
24146    PKG_CONFIG=""
24147  else
24148    case $cross_compiling:$ac_tool_warned in
24149yes:)
24150{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
24151$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
24152ac_tool_warned=yes ;;
24153esac
24154    PKG_CONFIG=$ac_pt_PKG_CONFIG
24155  fi
24156else
24157  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
24158fi
24159
24160fi
24161if test -n "$PKG_CONFIG"; then
24162	_pkg_min_version=0.9.0
24163	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
24164$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
24165	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
24166		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24167$as_echo "yes" >&6; }
24168	else
24169		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24170$as_echo "no" >&6; }
24171		PKG_CONFIG=""
24172	fi
24173
24174fi
24175
24176# After basic tools have been setup, we can check build os specific details.
24177
24178  ###############################################################################
24179
24180  # Note that this is the build platform OS version!
24181
24182  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
24183  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
24184  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
24185  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
24186
24187
24188
24189
24190
24191# Misc basic settings
24192
24193
24194# Check whether --with-default-make-target was given.
24195if test "${with_default_make_target+set}" = set; then :
24196  withval=$with_default_make_target;
24197fi
24198
24199  if test "x$with_default_make_target" = "x" \
24200      || test "x$with_default_make_target" = "xyes"; then
24201    DEFAULT_MAKE_TARGET="exploded-image"
24202  elif test "x$with_default_make_target" = "xno"; then
24203    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
24204  else
24205    DEFAULT_MAKE_TARGET="$with_default_make_target"
24206  fi
24207
24208
24209
24210
24211###############################################################################
24212#
24213# Determine OpenJDK variants, options and version numbers.
24214#
24215###############################################################################
24216
24217# We need build & target for this.
24218
24219  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
24220  # We always build headless support.
24221  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
24222$as_echo_n "checking headful support... " >&6; }
24223  # Check whether --enable-headful was given.
24224if test "${enable_headful+set}" = set; then :
24225  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
24226else
24227  SUPPORT_HEADFUL=yes
24228fi
24229
24230
24231  SUPPORT_HEADLESS=yes
24232  BUILD_HEADLESS="BUILD_HEADLESS:=true"
24233
24234  if test "x$SUPPORT_HEADFUL" = xyes; then
24235    # We are building both headful and headless.
24236    headful_msg="include support for both headful and headless"
24237  fi
24238
24239  if test "x$SUPPORT_HEADFUL" = xno; then
24240    # Thus we are building headless only.
24241    BUILD_HEADLESS="BUILD_HEADLESS:=true"
24242    headful_msg="headless only"
24243  fi
24244
24245  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
24246$as_echo "$headful_msg" >&6; }
24247
24248
24249
24250
24251
24252  # Choose cacerts source file
24253
24254# Check whether --with-cacerts-file was given.
24255if test "${with_cacerts_file+set}" = set; then :
24256  withval=$with_cacerts_file;
24257fi
24258
24259  if test "x$with_cacerts_file" != x; then
24260    CACERTS_FILE=$with_cacerts_file
24261  fi
24262
24263
24264  # Enable or disable unlimited crypto
24265  # Check whether --enable-unlimited-crypto was given.
24266if test "${enable_unlimited_crypto+set}" = set; then :
24267  enableval=$enable_unlimited_crypto;
24268else
24269  enable_unlimited_crypto=no
24270fi
24271
24272  if test "x$enable_unlimited_crypto" = "xyes"; then
24273    UNLIMITED_CRYPTO=true
24274  else
24275    UNLIMITED_CRYPTO=false
24276  fi
24277
24278
24279  # Should we build the serviceability agent (SA)?
24280  INCLUDE_SA=true
24281  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
24282    INCLUDE_SA=false
24283  fi
24284  if test "x$OPENJDK_TARGET_OS" = xaix ; then
24285    INCLUDE_SA=false
24286  fi
24287
24288
24289  # Compress jars
24290  COMPRESS_JARS=false
24291
24292
24293
24294  # Setup default copyright year. Mostly overridden when building close to a new year.
24295
24296# Check whether --with-copyright-year was given.
24297if test "${with_copyright_year+set}" = set; then :
24298  withval=$with_copyright_year;
24299fi
24300
24301  if test "x$with_copyright_year" = xyes; then
24302    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
24303  elif test "x$with_copyright_year" != x; then
24304    COPYRIGHT_YEAR="$with_copyright_year"
24305  else
24306    COPYRIGHT_YEAR=`$DATE +'%Y'`
24307  fi
24308
24309
24310
24311  # Check whether --enable-keep-packaged-modules was given.
24312if test "${enable_keep_packaged_modules+set}" = set; then :
24313  enableval=$enable_keep_packaged_modules;
24314fi
24315
24316
24317  if test "x$enable_keep_packaged_modules" = "xyes"; then
24318    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24319$as_echo_n "checking if packaged modules are kept... " >&6; }
24320    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
24321$as_echo "yes" >&6; }
24322    JLINK_KEEP_PACKAGED_MODULES=true
24323  elif test "x$enable_keep_packaged_modules" = "xno"; then
24324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
24325$as_echo_n "checking if packaged modules are kept... " >&6; }
24326    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
24327$as_echo "no" >&6; }
24328    JLINK_KEEP_PACKAGED_MODULES=false
24329  elif test "x$enable_keep_packaged_modules" = "x"; then
24330    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
24331$as_echo "yes (default)" >&6; }
24332    JLINK_KEEP_PACKAGED_MODULES=true
24333  else
24334    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
24335  fi
24336
24337
24338
24339
24340  # Warn user that old version arguments are deprecated.
24341
24342
24343# Check whether --with-milestone was given.
24344if test "${with_milestone+set}" = set; then :
24345  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
24346$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
24347fi
24348
24349
24350
24351
24352# Check whether --with-update-version was given.
24353if test "${with_update_version+set}" = set; then :
24354  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
24355$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
24356fi
24357
24358
24359
24360
24361# Check whether --with-user-release-suffix was given.
24362if test "${with_user_release_suffix+set}" = set; then :
24363  withval=$with_user_release_suffix; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&5
24364$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
24365fi
24366
24367
24368
24369
24370# Check whether --with-build-number was given.
24371if test "${with_build_number+set}" = set; then :
24372  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
24373$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
24374fi
24375
24376
24377
24378  # Source the version numbers file
24379  . $AUTOCONF_DIR/version-numbers
24380
24381  # Some non-version number information is set in that file
24382
24383
24384
24385
24386
24387
24388
24389
24390
24391  # Override version from arguments
24392
24393  # If --with-version-string is set, process it first. It is possible to
24394  # override parts with more specific flags, since these are processed later.
24395
24396# Check whether --with-version-string was given.
24397if test "${with_version_string+set}" = set; then :
24398  withval=$with_version_string;
24399fi
24400
24401  if test "x$with_version_string" = xyes; then
24402    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
24403  elif test "x$with_version_string" != x; then
24404    # Additional [] needed to keep m4 from mangling shell constructs.
24405    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
24406      VERSION_MAJOR=${BASH_REMATCH[1]}
24407      VERSION_MINOR=${BASH_REMATCH[3]}
24408      VERSION_SECURITY=${BASH_REMATCH[5]}
24409      VERSION_PATCH=${BASH_REMATCH[7]}
24410      VERSION_PRE=${BASH_REMATCH[9]}
24411      version_plus_separator=${BASH_REMATCH[11]}
24412      VERSION_BUILD=${BASH_REMATCH[12]}
24413      VERSION_OPT=${BASH_REMATCH[14]}
24414      # Unspecified numerical fields are interpreted as 0.
24415      if test "x$VERSION_MINOR" = x; then
24416        VERSION_MINOR=0
24417      fi
24418      if test "x$VERSION_SECURITY" = x; then
24419        VERSION_SECURITY=0
24420      fi
24421      if test "x$VERSION_PATCH" = x; then
24422        VERSION_PATCH=0
24423      fi
24424      if test "x$version_plus_separator" != x \
24425          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
24426        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
24427      fi
24428      # Stop the version part process from setting default values.
24429      # We still allow them to explicitely override though.
24430      NO_DEFAULT_VERSION_PARTS=true
24431    else
24432      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
24433    fi
24434  fi
24435
24436
24437# Check whether --with-version-pre was given.
24438if test "${with_version_pre+set}" = set; then :
24439  withval=$with_version_pre; with_version_pre_present=true
24440else
24441  with_version_pre_present=false
24442fi
24443
24444
24445  if test "x$with_version_pre_present" = xtrue; then
24446    if test "x$with_version_pre" = xyes; then
24447      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
24448    elif test "x$with_version_pre" = xno; then
24449      # Interpret --without-* as empty string instead of the literal "no"
24450      VERSION_PRE=
24451    else
24452      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
24453       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
24454      if test "x$VERSION_PRE" != "x$with_version_pre"; then
24455        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
24456$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
24457      fi
24458    fi
24459  else
24460    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24461      # Default is to use "internal" as pre
24462      VERSION_PRE="internal"
24463    fi
24464  fi
24465
24466
24467# Check whether --with-version-opt was given.
24468if test "${with_version_opt+set}" = set; then :
24469  withval=$with_version_opt; with_version_opt_present=true
24470else
24471  with_version_opt_present=false
24472fi
24473
24474
24475  if test "x$with_version_opt_present" = xtrue; then
24476    if test "x$with_version_opt" = xyes; then
24477      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
24478    elif test "x$with_version_opt" = xno; then
24479      # Interpret --without-* as empty string instead of the literal "no"
24480      VERSION_OPT=
24481    else
24482      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
24483       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
24484      if test "x$VERSION_OPT" != "x$with_version_opt"; then
24485        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
24486$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
24487      fi
24488    fi
24489  else
24490    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24491      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24492      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24493      # Outer [ ] to quote m4.
24494       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24495      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24496    fi
24497  fi
24498
24499
24500# Check whether --with-version-build was given.
24501if test "${with_version_build+set}" = set; then :
24502  withval=$with_version_build; with_version_build_present=true
24503else
24504  with_version_build_present=false
24505fi
24506
24507
24508  if test "x$with_version_build_present" = xtrue; then
24509    if test "x$with_version_build" = xyes; then
24510      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24511    elif test "x$with_version_build" = xno; then
24512      # Interpret --without-* as empty string instead of the literal "no"
24513      VERSION_BUILD=
24514    elif test "x$with_version_build" = x; then
24515      VERSION_BUILD=
24516    else
24517
24518  # Additional [] needed to keep m4 from mangling shell constructs.
24519  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24520    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24521  fi
24522  # Extract the version number without leading zeros.
24523  cleaned_value=${BASH_REMATCH[1]}
24524  if test "x$cleaned_value" = x; then
24525    # Special case for zero
24526    cleaned_value=${BASH_REMATCH[2]}
24527  fi
24528
24529  if test $cleaned_value -gt 255; then
24530    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24531  fi
24532  if test "x$cleaned_value" != "x$with_version_build"; then
24533    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24534$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24535  fi
24536  VERSION_BUILD=$cleaned_value
24537
24538    fi
24539  else
24540    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24541      # Default is to not have a build number.
24542      VERSION_BUILD=""
24543      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24544      VERSION_BUILD=0
24545    fi
24546  fi
24547
24548
24549# Check whether --with-version-major was given.
24550if test "${with_version_major+set}" = set; then :
24551  withval=$with_version_major; with_version_major_present=true
24552else
24553  with_version_major_present=false
24554fi
24555
24556
24557  if test "x$with_version_major_present" = xtrue; then
24558    if test "x$with_version_major" = xyes; then
24559      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24560    else
24561
24562  # Additional [] needed to keep m4 from mangling shell constructs.
24563  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24564    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24565  fi
24566  # Extract the version number without leading zeros.
24567  cleaned_value=${BASH_REMATCH[1]}
24568  if test "x$cleaned_value" = x; then
24569    # Special case for zero
24570    cleaned_value=${BASH_REMATCH[2]}
24571  fi
24572
24573  if test $cleaned_value -gt 255; then
24574    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24575  fi
24576  if test "x$cleaned_value" != "x$with_version_major"; then
24577    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24578$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24579  fi
24580  VERSION_MAJOR=$cleaned_value
24581
24582    fi
24583  else
24584    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24585      # Default is to get value from version-numbers
24586      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24587    fi
24588  fi
24589
24590
24591# Check whether --with-version-minor was given.
24592if test "${with_version_minor+set}" = set; then :
24593  withval=$with_version_minor; with_version_minor_present=true
24594else
24595  with_version_minor_present=false
24596fi
24597
24598
24599  if test "x$with_version_minor_present" = xtrue; then
24600    if test "x$with_version_minor" = xyes; then
24601      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24602    elif test "x$with_version_minor" = xno; then
24603      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24604      VERSION_MINOR=0
24605    elif test "x$with_version_minor" = x; then
24606      VERSION_MINOR=0
24607    else
24608
24609  # Additional [] needed to keep m4 from mangling shell constructs.
24610  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24611    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24612  fi
24613  # Extract the version number without leading zeros.
24614  cleaned_value=${BASH_REMATCH[1]}
24615  if test "x$cleaned_value" = x; then
24616    # Special case for zero
24617    cleaned_value=${BASH_REMATCH[2]}
24618  fi
24619
24620  if test $cleaned_value -gt 255; then
24621    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24622  fi
24623  if test "x$cleaned_value" != "x$with_version_minor"; then
24624    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24625$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24626  fi
24627  VERSION_MINOR=$cleaned_value
24628
24629    fi
24630  else
24631    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24632      # Default is 0, if unspecified
24633      VERSION_MINOR=0
24634    fi
24635  fi
24636
24637
24638# Check whether --with-version-security was given.
24639if test "${with_version_security+set}" = set; then :
24640  withval=$with_version_security; with_version_security_present=true
24641else
24642  with_version_security_present=false
24643fi
24644
24645
24646  if test "x$with_version_security_present" = xtrue; then
24647    if test "x$with_version_security" = xyes; then
24648      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24649    elif test "x$with_version_security" = xno; then
24650      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24651      VERSION_SECURITY=0
24652    elif test "x$with_version_security" = x; then
24653      VERSION_SECURITY=0
24654    else
24655
24656  # Additional [] needed to keep m4 from mangling shell constructs.
24657  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24658    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24659  fi
24660  # Extract the version number without leading zeros.
24661  cleaned_value=${BASH_REMATCH[1]}
24662  if test "x$cleaned_value" = x; then
24663    # Special case for zero
24664    cleaned_value=${BASH_REMATCH[2]}
24665  fi
24666
24667  if test $cleaned_value -gt 255; then
24668    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24669  fi
24670  if test "x$cleaned_value" != "x$with_version_security"; then
24671    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24672$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24673  fi
24674  VERSION_SECURITY=$cleaned_value
24675
24676    fi
24677  else
24678    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24679      # Default is 0, if unspecified
24680      VERSION_SECURITY=0
24681    fi
24682  fi
24683
24684
24685# Check whether --with-version-patch was given.
24686if test "${with_version_patch+set}" = set; then :
24687  withval=$with_version_patch; with_version_patch_present=true
24688else
24689  with_version_patch_present=false
24690fi
24691
24692
24693  if test "x$with_version_patch_present" = xtrue; then
24694    if test "x$with_version_patch" = xyes; then
24695      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24696    elif test "x$with_version_patch" = xno; then
24697      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24698      VERSION_PATCH=0
24699    elif test "x$with_version_patch" = x; then
24700      VERSION_PATCH=0
24701    else
24702
24703  # Additional [] needed to keep m4 from mangling shell constructs.
24704  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24705    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24706  fi
24707  # Extract the version number without leading zeros.
24708  cleaned_value=${BASH_REMATCH[1]}
24709  if test "x$cleaned_value" = x; then
24710    # Special case for zero
24711    cleaned_value=${BASH_REMATCH[2]}
24712  fi
24713
24714  if test $cleaned_value -gt 255; then
24715    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24716  fi
24717  if test "x$cleaned_value" != "x$with_version_patch"; then
24718    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24719$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24720  fi
24721  VERSION_PATCH=$cleaned_value
24722
24723    fi
24724  else
24725    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24726      # Default is 0, if unspecified
24727      VERSION_PATCH=0
24728    fi
24729  fi
24730
24731  # Calculate derived version properties
24732
24733  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24734  if test "x$VERSION_PRE" = x; then
24735    VERSION_IS_GA=true
24736  else
24737    VERSION_IS_GA=false
24738  fi
24739
24740  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24741  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24742
24743  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24744  # Strip trailing zeroes from stripped_version_number
24745  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24746  VERSION_NUMBER=$stripped_version_number
24747
24748  # The complete version string, with additional build information
24749  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24750    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24751  else
24752    # If either build or opt is set, we need a + separator
24753    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24754  fi
24755
24756  # The short version string, just VERSION_NUMBER and PRE, if present.
24757  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24758
24759  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24760$as_echo_n "checking for version string... " >&6; }
24761  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24762$as_echo "$VERSION_STRING" >&6; }
24763
24764
24765
24766
24767
24768
24769
24770
24771
24772
24773
24774
24775
24776
24777
24778###############################################################################
24779#
24780# Setup BootJDK, used to bootstrap the build.
24781#
24782###############################################################################
24783
24784
24785  BOOT_JDK_FOUND=no
24786
24787# Check whether --with-boot-jdk was given.
24788if test "${with_boot_jdk+set}" = set; then :
24789  withval=$with_boot_jdk;
24790fi
24791
24792
24793  # We look for the Boot JDK through various means, going from more certain to
24794  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24795  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24796  # must check if this is indeed valid; otherwise we'll continue looking.
24797
24798  # Test: Is bootjdk explicitely set by command line arguments?
24799
24800  if test "x$BOOT_JDK_FOUND" = xno; then
24801    # Now execute the test
24802
24803  if test "x$with_boot_jdk" != x; then
24804    BOOT_JDK=$with_boot_jdk
24805    BOOT_JDK_FOUND=maybe
24806    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24807$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24808  fi
24809
24810
24811    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24812    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24813      # Do we have a bin/java?
24814      if test ! -x "$BOOT_JDK/bin/java"; then
24815        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24816$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24817        BOOT_JDK_FOUND=no
24818      else
24819        # Do we have a bin/javac?
24820        if test ! -x "$BOOT_JDK/bin/javac"; then
24821          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24822$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24823          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24824$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24825          BOOT_JDK_FOUND=no
24826        else
24827          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24828          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
24829
24830          # Extra M4 quote needed to protect [] in grep expression.
24831          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24832          if test "x$FOUND_CORRECT_VERSION" = x; then
24833            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24835            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24836$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24837            BOOT_JDK_FOUND=no
24838          else
24839            # We're done! :-)
24840            BOOT_JDK_FOUND=yes
24841
24842  # Only process if variable expands to non-empty
24843
24844  if test "x$BOOT_JDK" != x; then
24845    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24846
24847  # Input might be given as Windows format, start by converting to
24848  # unix format.
24849  path="$BOOT_JDK"
24850  new_path=`$CYGPATH -u "$path"`
24851
24852  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24853  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24854  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24855  # "foo.exe" is OK but "foo" is an error.
24856  #
24857  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24858  # It is also a way to make sure we got the proper file name for the real test later on.
24859  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24860  if test "x$test_shortpath" = x; then
24861    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24862$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24863    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24864  fi
24865
24866  # Call helper function which possibly converts this using DOS-style short mode.
24867  # If so, the updated path is stored in $new_path.
24868
24869  input_path="$new_path"
24870  # Check if we need to convert this using DOS-style short mode. If the path
24871  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24872  # take no chances and rewrite it.
24873  # Note: m4 eats our [], so we need to use [ and ] instead.
24874  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24875  if test "x$has_forbidden_chars" != x; then
24876    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24877    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24878    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24879    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24880      # Going to short mode and back again did indeed matter. Since short mode is
24881      # case insensitive, let's make it lowercase to improve readability.
24882      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24883      # Now convert it back to Unix-style (cygpath)
24884      input_path=`$CYGPATH -u "$shortmode_path"`
24885      new_path="$input_path"
24886    fi
24887  fi
24888
24889  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24890  if test "x$test_cygdrive_prefix" = x; then
24891    # As a simple fix, exclude /usr/bin since it's not a real path.
24892    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24893      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24894      # a path prefixed by /cygdrive for fixpath to work.
24895      new_path="$CYGWIN_ROOT_PATH$input_path"
24896    fi
24897  fi
24898
24899
24900  if test "x$path" != "x$new_path"; then
24901    BOOT_JDK="$new_path"
24902    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24903$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24904  fi
24905
24906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24907
24908  path="$BOOT_JDK"
24909  has_colon=`$ECHO $path | $GREP ^.:`
24910  new_path="$path"
24911  if test "x$has_colon" = x; then
24912    # Not in mixed or Windows style, start by that.
24913    new_path=`cmd //c echo $path`
24914  fi
24915
24916
24917  input_path="$new_path"
24918  # Check if we need to convert this using DOS-style short mode. If the path
24919  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24920  # take no chances and rewrite it.
24921  # Note: m4 eats our [], so we need to use [ and ] instead.
24922  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24923  if test "x$has_forbidden_chars" != x; then
24924    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24925    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24926  fi
24927
24928
24929  windows_path="$new_path"
24930  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24931    unix_path=`$CYGPATH -u "$windows_path"`
24932    new_path="$unix_path"
24933  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24934    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24935    new_path="$unix_path"
24936  fi
24937
24938  if test "x$path" != "x$new_path"; then
24939    BOOT_JDK="$new_path"
24940    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24941$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24942  fi
24943
24944  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24945  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24946
24947    else
24948      # We're on a unix platform. Hooray! :)
24949      path="$BOOT_JDK"
24950      has_space=`$ECHO "$path" | $GREP " "`
24951      if test "x$has_space" != x; then
24952        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24953$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24954        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24955      fi
24956
24957      # Use eval to expand a potential ~
24958      eval path="$path"
24959      if test ! -f "$path" && test ! -d "$path"; then
24960        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24961      fi
24962
24963      if test -d "$path"; then
24964        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24965      else
24966        dir="`$DIRNAME "$path"`"
24967        base="`$BASENAME "$path"`"
24968        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24969      fi
24970    fi
24971  fi
24972
24973            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24974$as_echo_n "checking for Boot JDK... " >&6; }
24975            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24976$as_echo "$BOOT_JDK" >&6; }
24977            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24978$as_echo_n "checking Boot JDK version... " >&6; }
24979            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24980            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24981$as_echo "$BOOT_JDK_VERSION" >&6; }
24982          fi # end check jdk version
24983        fi # end check javac
24984      fi # end check java
24985    fi # end check boot jdk found
24986  fi
24987
24988  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24989    # Having specified an argument which is incorrect will produce an instant failure;
24990    # we should not go on looking
24991    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24992  fi
24993
24994  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24995
24996  if test "x$BOOT_JDK_FOUND" = xno; then
24997    # Now execute the test
24998
24999  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
25000    # First check at user selected default
25001
25002  if test "x$BOOT_JDK_FOUND" = xno; then
25003    # Now execute the test
25004
25005  if test -x /usr/libexec/java_home; then
25006    BOOT_JDK=`/usr/libexec/java_home `
25007    BOOT_JDK_FOUND=maybe
25008    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
25009$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
25010  fi
25011
25012
25013    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25014    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25015      # Do we have a bin/java?
25016      if test ! -x "$BOOT_JDK/bin/java"; then
25017        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25018$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25019        BOOT_JDK_FOUND=no
25020      else
25021        # Do we have a bin/javac?
25022        if test ! -x "$BOOT_JDK/bin/javac"; then
25023          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25024$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25025          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25026$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25027          BOOT_JDK_FOUND=no
25028        else
25029          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25030          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25031
25032          # Extra M4 quote needed to protect [] in grep expression.
25033          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25034          if test "x$FOUND_CORRECT_VERSION" = x; then
25035            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25036$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25037            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25038$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25039            BOOT_JDK_FOUND=no
25040          else
25041            # We're done! :-)
25042            BOOT_JDK_FOUND=yes
25043
25044  # Only process if variable expands to non-empty
25045
25046  if test "x$BOOT_JDK" != x; then
25047    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25048
25049  # Input might be given as Windows format, start by converting to
25050  # unix format.
25051  path="$BOOT_JDK"
25052  new_path=`$CYGPATH -u "$path"`
25053
25054  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25055  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25056  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25057  # "foo.exe" is OK but "foo" is an error.
25058  #
25059  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25060  # It is also a way to make sure we got the proper file name for the real test later on.
25061  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25062  if test "x$test_shortpath" = x; then
25063    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25064$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25065    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25066  fi
25067
25068  # Call helper function which possibly converts this using DOS-style short mode.
25069  # If so, the updated path is stored in $new_path.
25070
25071  input_path="$new_path"
25072  # Check if we need to convert this using DOS-style short mode. If the path
25073  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25074  # take no chances and rewrite it.
25075  # Note: m4 eats our [], so we need to use [ and ] instead.
25076  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25077  if test "x$has_forbidden_chars" != x; then
25078    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25079    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25080    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25081    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25082      # Going to short mode and back again did indeed matter. Since short mode is
25083      # case insensitive, let's make it lowercase to improve readability.
25084      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25085      # Now convert it back to Unix-style (cygpath)
25086      input_path=`$CYGPATH -u "$shortmode_path"`
25087      new_path="$input_path"
25088    fi
25089  fi
25090
25091  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25092  if test "x$test_cygdrive_prefix" = x; then
25093    # As a simple fix, exclude /usr/bin since it's not a real path.
25094    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25095      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25096      # a path prefixed by /cygdrive for fixpath to work.
25097      new_path="$CYGWIN_ROOT_PATH$input_path"
25098    fi
25099  fi
25100
25101
25102  if test "x$path" != "x$new_path"; then
25103    BOOT_JDK="$new_path"
25104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25105$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25106  fi
25107
25108    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25109
25110  path="$BOOT_JDK"
25111  has_colon=`$ECHO $path | $GREP ^.:`
25112  new_path="$path"
25113  if test "x$has_colon" = x; then
25114    # Not in mixed or Windows style, start by that.
25115    new_path=`cmd //c echo $path`
25116  fi
25117
25118
25119  input_path="$new_path"
25120  # Check if we need to convert this using DOS-style short mode. If the path
25121  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25122  # take no chances and rewrite it.
25123  # Note: m4 eats our [], so we need to use [ and ] instead.
25124  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25125  if test "x$has_forbidden_chars" != x; then
25126    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25127    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25128  fi
25129
25130
25131  windows_path="$new_path"
25132  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25133    unix_path=`$CYGPATH -u "$windows_path"`
25134    new_path="$unix_path"
25135  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25136    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25137    new_path="$unix_path"
25138  fi
25139
25140  if test "x$path" != "x$new_path"; then
25141    BOOT_JDK="$new_path"
25142    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25143$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25144  fi
25145
25146  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25147  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25148
25149    else
25150      # We're on a unix platform. Hooray! :)
25151      path="$BOOT_JDK"
25152      has_space=`$ECHO "$path" | $GREP " "`
25153      if test "x$has_space" != x; then
25154        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25155$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25156        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25157      fi
25158
25159      # Use eval to expand a potential ~
25160      eval path="$path"
25161      if test ! -f "$path" && test ! -d "$path"; then
25162        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25163      fi
25164
25165      if test -d "$path"; then
25166        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25167      else
25168        dir="`$DIRNAME "$path"`"
25169        base="`$BASENAME "$path"`"
25170        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25171      fi
25172    fi
25173  fi
25174
25175            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25176$as_echo_n "checking for Boot JDK... " >&6; }
25177            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25178$as_echo "$BOOT_JDK" >&6; }
25179            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25180$as_echo_n "checking Boot JDK version... " >&6; }
25181            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25182            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25183$as_echo "$BOOT_JDK_VERSION" >&6; }
25184          fi # end check jdk version
25185        fi # end check javac
25186      fi # end check java
25187    fi # end check boot jdk found
25188  fi
25189
25190    # If that did not work out (e.g. too old), try explicit versions instead
25191
25192  if test "x$BOOT_JDK_FOUND" = xno; then
25193    # Now execute the test
25194
25195  if test -x /usr/libexec/java_home; then
25196    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
25197    BOOT_JDK_FOUND=maybe
25198    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
25199$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
25200  fi
25201
25202
25203    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25204    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25205      # Do we have a bin/java?
25206      if test ! -x "$BOOT_JDK/bin/java"; then
25207        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25208$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25209        BOOT_JDK_FOUND=no
25210      else
25211        # Do we have a bin/javac?
25212        if test ! -x "$BOOT_JDK/bin/javac"; then
25213          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25214$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25215          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25216$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25217          BOOT_JDK_FOUND=no
25218        else
25219          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25220          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25221
25222          # Extra M4 quote needed to protect [] in grep expression.
25223          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25224          if test "x$FOUND_CORRECT_VERSION" = x; then
25225            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25226$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25227            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25228$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25229            BOOT_JDK_FOUND=no
25230          else
25231            # We're done! :-)
25232            BOOT_JDK_FOUND=yes
25233
25234  # Only process if variable expands to non-empty
25235
25236  if test "x$BOOT_JDK" != x; then
25237    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25238
25239  # Input might be given as Windows format, start by converting to
25240  # unix format.
25241  path="$BOOT_JDK"
25242  new_path=`$CYGPATH -u "$path"`
25243
25244  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25245  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25246  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25247  # "foo.exe" is OK but "foo" is an error.
25248  #
25249  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25250  # It is also a way to make sure we got the proper file name for the real test later on.
25251  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25252  if test "x$test_shortpath" = x; then
25253    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25254$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25255    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25256  fi
25257
25258  # Call helper function which possibly converts this using DOS-style short mode.
25259  # If so, the updated path is stored in $new_path.
25260
25261  input_path="$new_path"
25262  # Check if we need to convert this using DOS-style short mode. If the path
25263  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25264  # take no chances and rewrite it.
25265  # Note: m4 eats our [], so we need to use [ and ] instead.
25266  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25267  if test "x$has_forbidden_chars" != x; then
25268    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25269    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25270    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25271    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25272      # Going to short mode and back again did indeed matter. Since short mode is
25273      # case insensitive, let's make it lowercase to improve readability.
25274      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25275      # Now convert it back to Unix-style (cygpath)
25276      input_path=`$CYGPATH -u "$shortmode_path"`
25277      new_path="$input_path"
25278    fi
25279  fi
25280
25281  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25282  if test "x$test_cygdrive_prefix" = x; then
25283    # As a simple fix, exclude /usr/bin since it's not a real path.
25284    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25285      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25286      # a path prefixed by /cygdrive for fixpath to work.
25287      new_path="$CYGWIN_ROOT_PATH$input_path"
25288    fi
25289  fi
25290
25291
25292  if test "x$path" != "x$new_path"; then
25293    BOOT_JDK="$new_path"
25294    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25295$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25296  fi
25297
25298    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25299
25300  path="$BOOT_JDK"
25301  has_colon=`$ECHO $path | $GREP ^.:`
25302  new_path="$path"
25303  if test "x$has_colon" = x; then
25304    # Not in mixed or Windows style, start by that.
25305    new_path=`cmd //c echo $path`
25306  fi
25307
25308
25309  input_path="$new_path"
25310  # Check if we need to convert this using DOS-style short mode. If the path
25311  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25312  # take no chances and rewrite it.
25313  # Note: m4 eats our [], so we need to use [ and ] instead.
25314  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25315  if test "x$has_forbidden_chars" != x; then
25316    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25317    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25318  fi
25319
25320
25321  windows_path="$new_path"
25322  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25323    unix_path=`$CYGPATH -u "$windows_path"`
25324    new_path="$unix_path"
25325  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25326    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25327    new_path="$unix_path"
25328  fi
25329
25330  if test "x$path" != "x$new_path"; then
25331    BOOT_JDK="$new_path"
25332    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25333$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25334  fi
25335
25336  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25337  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25338
25339    else
25340      # We're on a unix platform. Hooray! :)
25341      path="$BOOT_JDK"
25342      has_space=`$ECHO "$path" | $GREP " "`
25343      if test "x$has_space" != x; then
25344        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25345$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25346        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25347      fi
25348
25349      # Use eval to expand a potential ~
25350      eval path="$path"
25351      if test ! -f "$path" && test ! -d "$path"; then
25352        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25353      fi
25354
25355      if test -d "$path"; then
25356        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25357      else
25358        dir="`$DIRNAME "$path"`"
25359        base="`$BASENAME "$path"`"
25360        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25361      fi
25362    fi
25363  fi
25364
25365            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25366$as_echo_n "checking for Boot JDK... " >&6; }
25367            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25368$as_echo "$BOOT_JDK" >&6; }
25369            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25370$as_echo_n "checking Boot JDK version... " >&6; }
25371            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25372            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25373$as_echo "$BOOT_JDK_VERSION" >&6; }
25374          fi # end check jdk version
25375        fi # end check javac
25376      fi # end check java
25377    fi # end check boot jdk found
25378  fi
25379
25380
25381  if test "x$BOOT_JDK_FOUND" = xno; then
25382    # Now execute the test
25383
25384  if test -x /usr/libexec/java_home; then
25385    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
25386    BOOT_JDK_FOUND=maybe
25387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
25388$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
25389  fi
25390
25391
25392    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25393    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25394      # Do we have a bin/java?
25395      if test ! -x "$BOOT_JDK/bin/java"; then
25396        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25397$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25398        BOOT_JDK_FOUND=no
25399      else
25400        # Do we have a bin/javac?
25401        if test ! -x "$BOOT_JDK/bin/javac"; then
25402          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25403$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25404          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25405$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25406          BOOT_JDK_FOUND=no
25407        else
25408          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25409          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25410
25411          # Extra M4 quote needed to protect [] in grep expression.
25412          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25413          if test "x$FOUND_CORRECT_VERSION" = x; then
25414            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25415$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25416            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25417$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25418            BOOT_JDK_FOUND=no
25419          else
25420            # We're done! :-)
25421            BOOT_JDK_FOUND=yes
25422
25423  # Only process if variable expands to non-empty
25424
25425  if test "x$BOOT_JDK" != x; then
25426    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25427
25428  # Input might be given as Windows format, start by converting to
25429  # unix format.
25430  path="$BOOT_JDK"
25431  new_path=`$CYGPATH -u "$path"`
25432
25433  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25434  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25435  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25436  # "foo.exe" is OK but "foo" is an error.
25437  #
25438  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25439  # It is also a way to make sure we got the proper file name for the real test later on.
25440  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25441  if test "x$test_shortpath" = x; then
25442    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25443$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25444    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25445  fi
25446
25447  # Call helper function which possibly converts this using DOS-style short mode.
25448  # If so, the updated path is stored in $new_path.
25449
25450  input_path="$new_path"
25451  # Check if we need to convert this using DOS-style short mode. If the path
25452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25453  # take no chances and rewrite it.
25454  # Note: m4 eats our [], so we need to use [ and ] instead.
25455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25456  if test "x$has_forbidden_chars" != x; then
25457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25458    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25459    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25460    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25461      # Going to short mode and back again did indeed matter. Since short mode is
25462      # case insensitive, let's make it lowercase to improve readability.
25463      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25464      # Now convert it back to Unix-style (cygpath)
25465      input_path=`$CYGPATH -u "$shortmode_path"`
25466      new_path="$input_path"
25467    fi
25468  fi
25469
25470  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25471  if test "x$test_cygdrive_prefix" = x; then
25472    # As a simple fix, exclude /usr/bin since it's not a real path.
25473    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25474      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25475      # a path prefixed by /cygdrive for fixpath to work.
25476      new_path="$CYGWIN_ROOT_PATH$input_path"
25477    fi
25478  fi
25479
25480
25481  if test "x$path" != "x$new_path"; then
25482    BOOT_JDK="$new_path"
25483    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25484$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25485  fi
25486
25487    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25488
25489  path="$BOOT_JDK"
25490  has_colon=`$ECHO $path | $GREP ^.:`
25491  new_path="$path"
25492  if test "x$has_colon" = x; then
25493    # Not in mixed or Windows style, start by that.
25494    new_path=`cmd //c echo $path`
25495  fi
25496
25497
25498  input_path="$new_path"
25499  # Check if we need to convert this using DOS-style short mode. If the path
25500  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25501  # take no chances and rewrite it.
25502  # Note: m4 eats our [], so we need to use [ and ] instead.
25503  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25504  if test "x$has_forbidden_chars" != x; then
25505    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25506    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25507  fi
25508
25509
25510  windows_path="$new_path"
25511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25512    unix_path=`$CYGPATH -u "$windows_path"`
25513    new_path="$unix_path"
25514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25516    new_path="$unix_path"
25517  fi
25518
25519  if test "x$path" != "x$new_path"; then
25520    BOOT_JDK="$new_path"
25521    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25522$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25523  fi
25524
25525  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25526  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25527
25528    else
25529      # We're on a unix platform. Hooray! :)
25530      path="$BOOT_JDK"
25531      has_space=`$ECHO "$path" | $GREP " "`
25532      if test "x$has_space" != x; then
25533        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25534$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25535        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25536      fi
25537
25538      # Use eval to expand a potential ~
25539      eval path="$path"
25540      if test ! -f "$path" && test ! -d "$path"; then
25541        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25542      fi
25543
25544      if test -d "$path"; then
25545        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25546      else
25547        dir="`$DIRNAME "$path"`"
25548        base="`$BASENAME "$path"`"
25549        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25550      fi
25551    fi
25552  fi
25553
25554            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25555$as_echo_n "checking for Boot JDK... " >&6; }
25556            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25557$as_echo "$BOOT_JDK" >&6; }
25558            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25559$as_echo_n "checking Boot JDK version... " >&6; }
25560            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25561            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25562$as_echo "$BOOT_JDK_VERSION" >&6; }
25563          fi # end check jdk version
25564        fi # end check javac
25565      fi # end check java
25566    fi # end check boot jdk found
25567  fi
25568
25569
25570  if test "x$BOOT_JDK_FOUND" = xno; then
25571    # Now execute the test
25572
25573  if test -x /usr/libexec/java_home; then
25574    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25575    BOOT_JDK_FOUND=maybe
25576    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25577$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25578  fi
25579
25580
25581    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25582    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25583      # Do we have a bin/java?
25584      if test ! -x "$BOOT_JDK/bin/java"; then
25585        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25586$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25587        BOOT_JDK_FOUND=no
25588      else
25589        # Do we have a bin/javac?
25590        if test ! -x "$BOOT_JDK/bin/javac"; then
25591          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25592$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25593          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25594$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25595          BOOT_JDK_FOUND=no
25596        else
25597          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25598          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25599
25600          # Extra M4 quote needed to protect [] in grep expression.
25601          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25602          if test "x$FOUND_CORRECT_VERSION" = x; then
25603            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25604$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25605            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25606$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25607            BOOT_JDK_FOUND=no
25608          else
25609            # We're done! :-)
25610            BOOT_JDK_FOUND=yes
25611
25612  # Only process if variable expands to non-empty
25613
25614  if test "x$BOOT_JDK" != x; then
25615    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25616
25617  # Input might be given as Windows format, start by converting to
25618  # unix format.
25619  path="$BOOT_JDK"
25620  new_path=`$CYGPATH -u "$path"`
25621
25622  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25623  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25624  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25625  # "foo.exe" is OK but "foo" is an error.
25626  #
25627  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25628  # It is also a way to make sure we got the proper file name for the real test later on.
25629  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25630  if test "x$test_shortpath" = x; then
25631    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25632$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25633    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25634  fi
25635
25636  # Call helper function which possibly converts this using DOS-style short mode.
25637  # If so, the updated path is stored in $new_path.
25638
25639  input_path="$new_path"
25640  # Check if we need to convert this using DOS-style short mode. If the path
25641  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25642  # take no chances and rewrite it.
25643  # Note: m4 eats our [], so we need to use [ and ] instead.
25644  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25645  if test "x$has_forbidden_chars" != x; then
25646    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25647    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25648    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25649    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25650      # Going to short mode and back again did indeed matter. Since short mode is
25651      # case insensitive, let's make it lowercase to improve readability.
25652      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25653      # Now convert it back to Unix-style (cygpath)
25654      input_path=`$CYGPATH -u "$shortmode_path"`
25655      new_path="$input_path"
25656    fi
25657  fi
25658
25659  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25660  if test "x$test_cygdrive_prefix" = x; then
25661    # As a simple fix, exclude /usr/bin since it's not a real path.
25662    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25663      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25664      # a path prefixed by /cygdrive for fixpath to work.
25665      new_path="$CYGWIN_ROOT_PATH$input_path"
25666    fi
25667  fi
25668
25669
25670  if test "x$path" != "x$new_path"; then
25671    BOOT_JDK="$new_path"
25672    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25673$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25674  fi
25675
25676    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25677
25678  path="$BOOT_JDK"
25679  has_colon=`$ECHO $path | $GREP ^.:`
25680  new_path="$path"
25681  if test "x$has_colon" = x; then
25682    # Not in mixed or Windows style, start by that.
25683    new_path=`cmd //c echo $path`
25684  fi
25685
25686
25687  input_path="$new_path"
25688  # Check if we need to convert this using DOS-style short mode. If the path
25689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25690  # take no chances and rewrite it.
25691  # Note: m4 eats our [], so we need to use [ and ] instead.
25692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25693  if test "x$has_forbidden_chars" != x; then
25694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25695    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25696  fi
25697
25698
25699  windows_path="$new_path"
25700  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25701    unix_path=`$CYGPATH -u "$windows_path"`
25702    new_path="$unix_path"
25703  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25704    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25705    new_path="$unix_path"
25706  fi
25707
25708  if test "x$path" != "x$new_path"; then
25709    BOOT_JDK="$new_path"
25710    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25711$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25712  fi
25713
25714  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25715  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25716
25717    else
25718      # We're on a unix platform. Hooray! :)
25719      path="$BOOT_JDK"
25720      has_space=`$ECHO "$path" | $GREP " "`
25721      if test "x$has_space" != x; then
25722        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25723$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25724        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25725      fi
25726
25727      # Use eval to expand a potential ~
25728      eval path="$path"
25729      if test ! -f "$path" && test ! -d "$path"; then
25730        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25731      fi
25732
25733      if test -d "$path"; then
25734        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25735      else
25736        dir="`$DIRNAME "$path"`"
25737        base="`$BASENAME "$path"`"
25738        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25739      fi
25740    fi
25741  fi
25742
25743            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25744$as_echo_n "checking for Boot JDK... " >&6; }
25745            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25746$as_echo "$BOOT_JDK" >&6; }
25747            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25748$as_echo_n "checking Boot JDK version... " >&6; }
25749            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25751$as_echo "$BOOT_JDK_VERSION" >&6; }
25752          fi # end check jdk version
25753        fi # end check javac
25754      fi # end check java
25755    fi # end check boot jdk found
25756  fi
25757
25758  fi
25759
25760
25761    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25762    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25763      # Do we have a bin/java?
25764      if test ! -x "$BOOT_JDK/bin/java"; then
25765        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25766$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25767        BOOT_JDK_FOUND=no
25768      else
25769        # Do we have a bin/javac?
25770        if test ! -x "$BOOT_JDK/bin/javac"; then
25771          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25772$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25773          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25774$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25775          BOOT_JDK_FOUND=no
25776        else
25777          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25778          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
25779
25780          # Extra M4 quote needed to protect [] in grep expression.
25781          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25782          if test "x$FOUND_CORRECT_VERSION" = x; then
25783            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25784$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25785            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25786$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25787            BOOT_JDK_FOUND=no
25788          else
25789            # We're done! :-)
25790            BOOT_JDK_FOUND=yes
25791
25792  # Only process if variable expands to non-empty
25793
25794  if test "x$BOOT_JDK" != x; then
25795    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25796
25797  # Input might be given as Windows format, start by converting to
25798  # unix format.
25799  path="$BOOT_JDK"
25800  new_path=`$CYGPATH -u "$path"`
25801
25802  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25803  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25804  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25805  # "foo.exe" is OK but "foo" is an error.
25806  #
25807  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25808  # It is also a way to make sure we got the proper file name for the real test later on.
25809  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25810  if test "x$test_shortpath" = x; then
25811    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25812$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25813    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25814  fi
25815
25816  # Call helper function which possibly converts this using DOS-style short mode.
25817  # If so, the updated path is stored in $new_path.
25818
25819  input_path="$new_path"
25820  # Check if we need to convert this using DOS-style short mode. If the path
25821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25822  # take no chances and rewrite it.
25823  # Note: m4 eats our [], so we need to use [ and ] instead.
25824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25825  if test "x$has_forbidden_chars" != x; then
25826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25827    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25828    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25829    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25830      # Going to short mode and back again did indeed matter. Since short mode is
25831      # case insensitive, let's make it lowercase to improve readability.
25832      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25833      # Now convert it back to Unix-style (cygpath)
25834      input_path=`$CYGPATH -u "$shortmode_path"`
25835      new_path="$input_path"
25836    fi
25837  fi
25838
25839  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25840  if test "x$test_cygdrive_prefix" = x; then
25841    # As a simple fix, exclude /usr/bin since it's not a real path.
25842    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25843      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25844      # a path prefixed by /cygdrive for fixpath to work.
25845      new_path="$CYGWIN_ROOT_PATH$input_path"
25846    fi
25847  fi
25848
25849
25850  if test "x$path" != "x$new_path"; then
25851    BOOT_JDK="$new_path"
25852    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25853$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25854  fi
25855
25856    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25857
25858  path="$BOOT_JDK"
25859  has_colon=`$ECHO $path | $GREP ^.:`
25860  new_path="$path"
25861  if test "x$has_colon" = x; then
25862    # Not in mixed or Windows style, start by that.
25863    new_path=`cmd //c echo $path`
25864  fi
25865
25866
25867  input_path="$new_path"
25868  # Check if we need to convert this using DOS-style short mode. If the path
25869  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25870  # take no chances and rewrite it.
25871  # Note: m4 eats our [], so we need to use [ and ] instead.
25872  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25873  if test "x$has_forbidden_chars" != x; then
25874    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25875    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25876  fi
25877
25878
25879  windows_path="$new_path"
25880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25881    unix_path=`$CYGPATH -u "$windows_path"`
25882    new_path="$unix_path"
25883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25885    new_path="$unix_path"
25886  fi
25887
25888  if test "x$path" != "x$new_path"; then
25889    BOOT_JDK="$new_path"
25890    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25891$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25892  fi
25893
25894  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25895  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25896
25897    else
25898      # We're on a unix platform. Hooray! :)
25899      path="$BOOT_JDK"
25900      has_space=`$ECHO "$path" | $GREP " "`
25901      if test "x$has_space" != x; then
25902        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25904        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25905      fi
25906
25907      # Use eval to expand a potential ~
25908      eval path="$path"
25909      if test ! -f "$path" && test ! -d "$path"; then
25910        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25911      fi
25912
25913      if test -d "$path"; then
25914        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25915      else
25916        dir="`$DIRNAME "$path"`"
25917        base="`$BASENAME "$path"`"
25918        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25919      fi
25920    fi
25921  fi
25922
25923            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25924$as_echo_n "checking for Boot JDK... " >&6; }
25925            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25926$as_echo "$BOOT_JDK" >&6; }
25927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25928$as_echo_n "checking Boot JDK version... " >&6; }
25929            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25930            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25931$as_echo "$BOOT_JDK_VERSION" >&6; }
25932          fi # end check jdk version
25933        fi # end check javac
25934      fi # end check java
25935    fi # end check boot jdk found
25936  fi
25937
25938
25939  # Test: Is $JAVA_HOME set?
25940
25941  if test "x$BOOT_JDK_FOUND" = xno; then
25942    # Now execute the test
25943
25944  if test "x$JAVA_HOME" != x; then
25945    JAVA_HOME_PROCESSED="$JAVA_HOME"
25946
25947  # Only process if variable expands to non-empty
25948
25949  if test "x$JAVA_HOME_PROCESSED" != x; then
25950    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25951
25952  # Input might be given as Windows format, start by converting to
25953  # unix format.
25954  path="$JAVA_HOME_PROCESSED"
25955  new_path=`$CYGPATH -u "$path"`
25956
25957  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25958  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25959  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25960  # "foo.exe" is OK but "foo" is an error.
25961  #
25962  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25963  # It is also a way to make sure we got the proper file name for the real test later on.
25964  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25965  if test "x$test_shortpath" = x; then
25966    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25967$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25968    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25969  fi
25970
25971  # Call helper function which possibly converts this using DOS-style short mode.
25972  # If so, the updated path is stored in $new_path.
25973
25974  input_path="$new_path"
25975  # Check if we need to convert this using DOS-style short mode. If the path
25976  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25977  # take no chances and rewrite it.
25978  # Note: m4 eats our [], so we need to use [ and ] instead.
25979  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25980  if test "x$has_forbidden_chars" != x; then
25981    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25982    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25983    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25984    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25985      # Going to short mode and back again did indeed matter. Since short mode is
25986      # case insensitive, let's make it lowercase to improve readability.
25987      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25988      # Now convert it back to Unix-style (cygpath)
25989      input_path=`$CYGPATH -u "$shortmode_path"`
25990      new_path="$input_path"
25991    fi
25992  fi
25993
25994  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25995  if test "x$test_cygdrive_prefix" = x; then
25996    # As a simple fix, exclude /usr/bin since it's not a real path.
25997    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25998      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25999      # a path prefixed by /cygdrive for fixpath to work.
26000      new_path="$CYGWIN_ROOT_PATH$input_path"
26001    fi
26002  fi
26003
26004
26005  if test "x$path" != "x$new_path"; then
26006    JAVA_HOME_PROCESSED="$new_path"
26007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26008$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26009  fi
26010
26011    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26012
26013  path="$JAVA_HOME_PROCESSED"
26014  has_colon=`$ECHO $path | $GREP ^.:`
26015  new_path="$path"
26016  if test "x$has_colon" = x; then
26017    # Not in mixed or Windows style, start by that.
26018    new_path=`cmd //c echo $path`
26019  fi
26020
26021
26022  input_path="$new_path"
26023  # Check if we need to convert this using DOS-style short mode. If the path
26024  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26025  # take no chances and rewrite it.
26026  # Note: m4 eats our [], so we need to use [ and ] instead.
26027  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26028  if test "x$has_forbidden_chars" != x; then
26029    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26030    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26031  fi
26032
26033
26034  windows_path="$new_path"
26035  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26036    unix_path=`$CYGPATH -u "$windows_path"`
26037    new_path="$unix_path"
26038  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26039    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26040    new_path="$unix_path"
26041  fi
26042
26043  if test "x$path" != "x$new_path"; then
26044    JAVA_HOME_PROCESSED="$new_path"
26045    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
26046$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
26047  fi
26048
26049  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26050  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26051
26052    else
26053      # We're on a unix platform. Hooray! :)
26054      path="$JAVA_HOME_PROCESSED"
26055      has_space=`$ECHO "$path" | $GREP " "`
26056      if test "x$has_space" != x; then
26057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
26058$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
26059        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26060      fi
26061
26062      # Use eval to expand a potential ~
26063      eval path="$path"
26064      if test ! -f "$path" && test ! -d "$path"; then
26065        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
26066      fi
26067
26068      if test -d "$path"; then
26069        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
26070      else
26071        dir="`$DIRNAME "$path"`"
26072        base="`$BASENAME "$path"`"
26073        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
26074      fi
26075    fi
26076  fi
26077
26078    if test ! -d "$JAVA_HOME_PROCESSED"; then
26079      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
26080$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
26081    else
26082      # Aha, the user has set a JAVA_HOME
26083      # let us use that as the Boot JDK.
26084      BOOT_JDK="$JAVA_HOME_PROCESSED"
26085      BOOT_JDK_FOUND=maybe
26086      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
26087$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
26088    fi
26089  fi
26090
26091
26092    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26093    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26094      # Do we have a bin/java?
26095      if test ! -x "$BOOT_JDK/bin/java"; then
26096        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26097$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26098        BOOT_JDK_FOUND=no
26099      else
26100        # Do we have a bin/javac?
26101        if test ! -x "$BOOT_JDK/bin/javac"; then
26102          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26103$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26104          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26105$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26106          BOOT_JDK_FOUND=no
26107        else
26108          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26109          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26110
26111          # Extra M4 quote needed to protect [] in grep expression.
26112          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26113          if test "x$FOUND_CORRECT_VERSION" = x; then
26114            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26115$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26116            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26117$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26118            BOOT_JDK_FOUND=no
26119          else
26120            # We're done! :-)
26121            BOOT_JDK_FOUND=yes
26122
26123  # Only process if variable expands to non-empty
26124
26125  if test "x$BOOT_JDK" != x; then
26126    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26127
26128  # Input might be given as Windows format, start by converting to
26129  # unix format.
26130  path="$BOOT_JDK"
26131  new_path=`$CYGPATH -u "$path"`
26132
26133  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26134  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26135  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26136  # "foo.exe" is OK but "foo" is an error.
26137  #
26138  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26139  # It is also a way to make sure we got the proper file name for the real test later on.
26140  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26141  if test "x$test_shortpath" = x; then
26142    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26143$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26144    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26145  fi
26146
26147  # Call helper function which possibly converts this using DOS-style short mode.
26148  # If so, the updated path is stored in $new_path.
26149
26150  input_path="$new_path"
26151  # Check if we need to convert this using DOS-style short mode. If the path
26152  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26153  # take no chances and rewrite it.
26154  # Note: m4 eats our [], so we need to use [ and ] instead.
26155  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26156  if test "x$has_forbidden_chars" != x; then
26157    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26158    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26159    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26160    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26161      # Going to short mode and back again did indeed matter. Since short mode is
26162      # case insensitive, let's make it lowercase to improve readability.
26163      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26164      # Now convert it back to Unix-style (cygpath)
26165      input_path=`$CYGPATH -u "$shortmode_path"`
26166      new_path="$input_path"
26167    fi
26168  fi
26169
26170  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26171  if test "x$test_cygdrive_prefix" = x; then
26172    # As a simple fix, exclude /usr/bin since it's not a real path.
26173    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26174      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26175      # a path prefixed by /cygdrive for fixpath to work.
26176      new_path="$CYGWIN_ROOT_PATH$input_path"
26177    fi
26178  fi
26179
26180
26181  if test "x$path" != "x$new_path"; then
26182    BOOT_JDK="$new_path"
26183    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26184$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26185  fi
26186
26187    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26188
26189  path="$BOOT_JDK"
26190  has_colon=`$ECHO $path | $GREP ^.:`
26191  new_path="$path"
26192  if test "x$has_colon" = x; then
26193    # Not in mixed or Windows style, start by that.
26194    new_path=`cmd //c echo $path`
26195  fi
26196
26197
26198  input_path="$new_path"
26199  # Check if we need to convert this using DOS-style short mode. If the path
26200  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26201  # take no chances and rewrite it.
26202  # Note: m4 eats our [], so we need to use [ and ] instead.
26203  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26204  if test "x$has_forbidden_chars" != x; then
26205    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26206    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26207  fi
26208
26209
26210  windows_path="$new_path"
26211  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26212    unix_path=`$CYGPATH -u "$windows_path"`
26213    new_path="$unix_path"
26214  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26215    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26216    new_path="$unix_path"
26217  fi
26218
26219  if test "x$path" != "x$new_path"; then
26220    BOOT_JDK="$new_path"
26221    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26222$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26223  fi
26224
26225  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26226  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26227
26228    else
26229      # We're on a unix platform. Hooray! :)
26230      path="$BOOT_JDK"
26231      has_space=`$ECHO "$path" | $GREP " "`
26232      if test "x$has_space" != x; then
26233        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26234$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26235        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26236      fi
26237
26238      # Use eval to expand a potential ~
26239      eval path="$path"
26240      if test ! -f "$path" && test ! -d "$path"; then
26241        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26242      fi
26243
26244      if test -d "$path"; then
26245        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26246      else
26247        dir="`$DIRNAME "$path"`"
26248        base="`$BASENAME "$path"`"
26249        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26250      fi
26251    fi
26252  fi
26253
26254            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26255$as_echo_n "checking for Boot JDK... " >&6; }
26256            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26257$as_echo "$BOOT_JDK" >&6; }
26258            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26259$as_echo_n "checking Boot JDK version... " >&6; }
26260            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26261            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26262$as_echo "$BOOT_JDK_VERSION" >&6; }
26263          fi # end check jdk version
26264        fi # end check javac
26265      fi # end check java
26266    fi # end check boot jdk found
26267  fi
26268
26269
26270  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
26271
26272  if test "x$BOOT_JDK_FOUND" = xno; then
26273    # Now execute the test
26274
26275  # Extract the first word of "javac", so it can be a program name with args.
26276set dummy javac; ac_word=$2
26277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26278$as_echo_n "checking for $ac_word... " >&6; }
26279if ${ac_cv_path_JAVAC_CHECK+:} false; then :
26280  $as_echo_n "(cached) " >&6
26281else
26282  case $JAVAC_CHECK in
26283  [\\/]* | ?:[\\/]*)
26284  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
26285  ;;
26286  *)
26287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26288for as_dir in $PATH
26289do
26290  IFS=$as_save_IFS
26291  test -z "$as_dir" && as_dir=.
26292    for ac_exec_ext in '' $ac_executable_extensions; do
26293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26294    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
26295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26296    break 2
26297  fi
26298done
26299  done
26300IFS=$as_save_IFS
26301
26302  ;;
26303esac
26304fi
26305JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
26306if test -n "$JAVAC_CHECK"; then
26307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
26308$as_echo "$JAVAC_CHECK" >&6; }
26309else
26310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26311$as_echo "no" >&6; }
26312fi
26313
26314
26315  # Extract the first word of "java", so it can be a program name with args.
26316set dummy java; ac_word=$2
26317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
26318$as_echo_n "checking for $ac_word... " >&6; }
26319if ${ac_cv_path_JAVA_CHECK+:} false; then :
26320  $as_echo_n "(cached) " >&6
26321else
26322  case $JAVA_CHECK in
26323  [\\/]* | ?:[\\/]*)
26324  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
26325  ;;
26326  *)
26327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
26328for as_dir in $PATH
26329do
26330  IFS=$as_save_IFS
26331  test -z "$as_dir" && as_dir=.
26332    for ac_exec_ext in '' $ac_executable_extensions; do
26333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
26334    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
26335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
26336    break 2
26337  fi
26338done
26339  done
26340IFS=$as_save_IFS
26341
26342  ;;
26343esac
26344fi
26345JAVA_CHECK=$ac_cv_path_JAVA_CHECK
26346if test -n "$JAVA_CHECK"; then
26347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
26348$as_echo "$JAVA_CHECK" >&6; }
26349else
26350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
26351$as_echo "no" >&6; }
26352fi
26353
26354
26355  BINARY="$JAVAC_CHECK"
26356  if test "x$JAVAC_CHECK" = x; then
26357    BINARY="$JAVA_CHECK"
26358  fi
26359  if test "x$BINARY" != x; then
26360    # So there is a java(c) binary, it might be part of a JDK.
26361    # Lets find the JDK/JRE directory by following symbolic links.
26362    # Linux/GNU systems often have links from /usr/bin/java to
26363    # /etc/alternatives/java to the real JDK binary.
26364
26365  if test "x$OPENJDK_BUILD_OS" != xwindows; then
26366    # Follow a chain of symbolic links. Use readlink
26367    # where it exists, else fall back to horribly
26368    # complicated shell code.
26369    if test "x$READLINK_TESTED" != yes; then
26370      # On MacOSX there is a readlink tool with a different
26371      # purpose than the GNU readlink tool. Check the found readlink.
26372      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
26373      if test "x$ISGNU" = x; then
26374        # A readlink that we do not know how to use.
26375        # Are there other non-GNU readlinks out there?
26376        READLINK_TESTED=yes
26377        READLINK=
26378      fi
26379    fi
26380
26381    if test "x$READLINK" != x; then
26382      BINARY=`$READLINK -f $BINARY`
26383    else
26384      # Save the current directory for restoring afterwards
26385      STARTDIR=$PWD
26386      COUNTER=0
26387      sym_link_dir=`$DIRNAME $BINARY`
26388      sym_link_file=`$BASENAME $BINARY`
26389      cd $sym_link_dir
26390      # Use -P flag to resolve symlinks in directories.
26391      cd `$THEPWDCMD -P`
26392      sym_link_dir=`$THEPWDCMD -P`
26393      # Resolve file symlinks
26394      while test $COUNTER -lt 20; do
26395        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
26396        if test "x$ISLINK" == x; then
26397          # This is not a symbolic link! We are done!
26398          break
26399        fi
26400        # Again resolve directory symlinks since the target of the just found
26401        # link could be in a different directory
26402        cd `$DIRNAME $ISLINK`
26403        sym_link_dir=`$THEPWDCMD -P`
26404        sym_link_file=`$BASENAME $ISLINK`
26405        let COUNTER=COUNTER+1
26406      done
26407      cd $STARTDIR
26408      BINARY=$sym_link_dir/$sym_link_file
26409    fi
26410  fi
26411
26412    BOOT_JDK=`dirname "$BINARY"`
26413    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
26414    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
26415      # Looks like we found ourselves an JDK
26416      BOOT_JDK_FOUND=maybe
26417      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
26418$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
26419    fi
26420  fi
26421
26422
26423    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26424    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26425      # Do we have a bin/java?
26426      if test ! -x "$BOOT_JDK/bin/java"; then
26427        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26428$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26429        BOOT_JDK_FOUND=no
26430      else
26431        # Do we have a bin/javac?
26432        if test ! -x "$BOOT_JDK/bin/javac"; then
26433          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26435          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26436$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26437          BOOT_JDK_FOUND=no
26438        else
26439          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26440          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26441
26442          # Extra M4 quote needed to protect [] in grep expression.
26443          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26444          if test "x$FOUND_CORRECT_VERSION" = x; then
26445            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26446$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26447            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26448$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26449            BOOT_JDK_FOUND=no
26450          else
26451            # We're done! :-)
26452            BOOT_JDK_FOUND=yes
26453
26454  # Only process if variable expands to non-empty
26455
26456  if test "x$BOOT_JDK" != x; then
26457    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26458
26459  # Input might be given as Windows format, start by converting to
26460  # unix format.
26461  path="$BOOT_JDK"
26462  new_path=`$CYGPATH -u "$path"`
26463
26464  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26465  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26466  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26467  # "foo.exe" is OK but "foo" is an error.
26468  #
26469  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26470  # It is also a way to make sure we got the proper file name for the real test later on.
26471  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26472  if test "x$test_shortpath" = x; then
26473    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26475    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26476  fi
26477
26478  # Call helper function which possibly converts this using DOS-style short mode.
26479  # If so, the updated path is stored in $new_path.
26480
26481  input_path="$new_path"
26482  # Check if we need to convert this using DOS-style short mode. If the path
26483  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26484  # take no chances and rewrite it.
26485  # Note: m4 eats our [], so we need to use [ and ] instead.
26486  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26487  if test "x$has_forbidden_chars" != x; then
26488    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26489    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26490    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26491    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26492      # Going to short mode and back again did indeed matter. Since short mode is
26493      # case insensitive, let's make it lowercase to improve readability.
26494      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26495      # Now convert it back to Unix-style (cygpath)
26496      input_path=`$CYGPATH -u "$shortmode_path"`
26497      new_path="$input_path"
26498    fi
26499  fi
26500
26501  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26502  if test "x$test_cygdrive_prefix" = x; then
26503    # As a simple fix, exclude /usr/bin since it's not a real path.
26504    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26505      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26506      # a path prefixed by /cygdrive for fixpath to work.
26507      new_path="$CYGWIN_ROOT_PATH$input_path"
26508    fi
26509  fi
26510
26511
26512  if test "x$path" != "x$new_path"; then
26513    BOOT_JDK="$new_path"
26514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26516  fi
26517
26518    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26519
26520  path="$BOOT_JDK"
26521  has_colon=`$ECHO $path | $GREP ^.:`
26522  new_path="$path"
26523  if test "x$has_colon" = x; then
26524    # Not in mixed or Windows style, start by that.
26525    new_path=`cmd //c echo $path`
26526  fi
26527
26528
26529  input_path="$new_path"
26530  # Check if we need to convert this using DOS-style short mode. If the path
26531  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26532  # take no chances and rewrite it.
26533  # Note: m4 eats our [], so we need to use [ and ] instead.
26534  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26535  if test "x$has_forbidden_chars" != x; then
26536    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26537    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26538  fi
26539
26540
26541  windows_path="$new_path"
26542  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26543    unix_path=`$CYGPATH -u "$windows_path"`
26544    new_path="$unix_path"
26545  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26546    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26547    new_path="$unix_path"
26548  fi
26549
26550  if test "x$path" != "x$new_path"; then
26551    BOOT_JDK="$new_path"
26552    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26553$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26554  fi
26555
26556  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26557  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26558
26559    else
26560      # We're on a unix platform. Hooray! :)
26561      path="$BOOT_JDK"
26562      has_space=`$ECHO "$path" | $GREP " "`
26563      if test "x$has_space" != x; then
26564        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26565$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26566        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26567      fi
26568
26569      # Use eval to expand a potential ~
26570      eval path="$path"
26571      if test ! -f "$path" && test ! -d "$path"; then
26572        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26573      fi
26574
26575      if test -d "$path"; then
26576        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26577      else
26578        dir="`$DIRNAME "$path"`"
26579        base="`$BASENAME "$path"`"
26580        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26581      fi
26582    fi
26583  fi
26584
26585            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26586$as_echo_n "checking for Boot JDK... " >&6; }
26587            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26588$as_echo "$BOOT_JDK" >&6; }
26589            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26590$as_echo_n "checking Boot JDK version... " >&6; }
26591            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26592            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26593$as_echo "$BOOT_JDK_VERSION" >&6; }
26594          fi # end check jdk version
26595        fi # end check javac
26596      fi # end check java
26597    fi # end check boot jdk found
26598  fi
26599
26600
26601  # Test: Is there a JDK installed in default, well-known locations?
26602
26603  if test "x$BOOT_JDK_FOUND" = xno; then
26604    # Now execute the test
26605
26606  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26607
26608  if test "x$BOOT_JDK_FOUND" = xno; then
26609    # Now execute the test
26610
26611  if test "x$ProgramW6432" != x; then
26612    VIRTUAL_DIR="$ProgramW6432/Java"
26613
26614  windows_path="$VIRTUAL_DIR"
26615  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26616    unix_path=`$CYGPATH -u "$windows_path"`
26617    VIRTUAL_DIR="$unix_path"
26618  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26619    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26620    VIRTUAL_DIR="$unix_path"
26621  fi
26622
26623
26624  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26625  BOOT_JDK_SUFFIX=""
26626  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26627  if test "x$ALL_JDKS_FOUND" != x; then
26628    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26629
26630  if test "x$BOOT_JDK_FOUND" = xno; then
26631    # Now execute the test
26632
26633        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26634        if test -d "$BOOT_JDK"; then
26635          BOOT_JDK_FOUND=maybe
26636          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26637$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26638        fi
26639
26640
26641    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26642    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26643      # Do we have a bin/java?
26644      if test ! -x "$BOOT_JDK/bin/java"; then
26645        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26646$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26647        BOOT_JDK_FOUND=no
26648      else
26649        # Do we have a bin/javac?
26650        if test ! -x "$BOOT_JDK/bin/javac"; then
26651          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26652$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26653          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26654$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26655          BOOT_JDK_FOUND=no
26656        else
26657          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26658          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26659
26660          # Extra M4 quote needed to protect [] in grep expression.
26661          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26662          if test "x$FOUND_CORRECT_VERSION" = x; then
26663            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26665            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26666$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26667            BOOT_JDK_FOUND=no
26668          else
26669            # We're done! :-)
26670            BOOT_JDK_FOUND=yes
26671
26672  # Only process if variable expands to non-empty
26673
26674  if test "x$BOOT_JDK" != x; then
26675    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26676
26677  # Input might be given as Windows format, start by converting to
26678  # unix format.
26679  path="$BOOT_JDK"
26680  new_path=`$CYGPATH -u "$path"`
26681
26682  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26683  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26684  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26685  # "foo.exe" is OK but "foo" is an error.
26686  #
26687  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26688  # It is also a way to make sure we got the proper file name for the real test later on.
26689  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26690  if test "x$test_shortpath" = x; then
26691    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26692$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26693    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26694  fi
26695
26696  # Call helper function which possibly converts this using DOS-style short mode.
26697  # If so, the updated path is stored in $new_path.
26698
26699  input_path="$new_path"
26700  # Check if we need to convert this using DOS-style short mode. If the path
26701  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26702  # take no chances and rewrite it.
26703  # Note: m4 eats our [], so we need to use [ and ] instead.
26704  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26705  if test "x$has_forbidden_chars" != x; then
26706    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26707    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26708    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26709    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26710      # Going to short mode and back again did indeed matter. Since short mode is
26711      # case insensitive, let's make it lowercase to improve readability.
26712      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26713      # Now convert it back to Unix-style (cygpath)
26714      input_path=`$CYGPATH -u "$shortmode_path"`
26715      new_path="$input_path"
26716    fi
26717  fi
26718
26719  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26720  if test "x$test_cygdrive_prefix" = x; then
26721    # As a simple fix, exclude /usr/bin since it's not a real path.
26722    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26723      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26724      # a path prefixed by /cygdrive for fixpath to work.
26725      new_path="$CYGWIN_ROOT_PATH$input_path"
26726    fi
26727  fi
26728
26729
26730  if test "x$path" != "x$new_path"; then
26731    BOOT_JDK="$new_path"
26732    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26733$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26734  fi
26735
26736    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26737
26738  path="$BOOT_JDK"
26739  has_colon=`$ECHO $path | $GREP ^.:`
26740  new_path="$path"
26741  if test "x$has_colon" = x; then
26742    # Not in mixed or Windows style, start by that.
26743    new_path=`cmd //c echo $path`
26744  fi
26745
26746
26747  input_path="$new_path"
26748  # Check if we need to convert this using DOS-style short mode. If the path
26749  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26750  # take no chances and rewrite it.
26751  # Note: m4 eats our [], so we need to use [ and ] instead.
26752  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26753  if test "x$has_forbidden_chars" != x; then
26754    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26755    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26756  fi
26757
26758
26759  windows_path="$new_path"
26760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26761    unix_path=`$CYGPATH -u "$windows_path"`
26762    new_path="$unix_path"
26763  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26764    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26765    new_path="$unix_path"
26766  fi
26767
26768  if test "x$path" != "x$new_path"; then
26769    BOOT_JDK="$new_path"
26770    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26771$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26772  fi
26773
26774  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26775  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26776
26777    else
26778      # We're on a unix platform. Hooray! :)
26779      path="$BOOT_JDK"
26780      has_space=`$ECHO "$path" | $GREP " "`
26781      if test "x$has_space" != x; then
26782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26783$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26784        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26785      fi
26786
26787      # Use eval to expand a potential ~
26788      eval path="$path"
26789      if test ! -f "$path" && test ! -d "$path"; then
26790        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26791      fi
26792
26793      if test -d "$path"; then
26794        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26795      else
26796        dir="`$DIRNAME "$path"`"
26797        base="`$BASENAME "$path"`"
26798        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26799      fi
26800    fi
26801  fi
26802
26803            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26804$as_echo_n "checking for Boot JDK... " >&6; }
26805            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26806$as_echo "$BOOT_JDK" >&6; }
26807            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26808$as_echo_n "checking Boot JDK version... " >&6; }
26809            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26811$as_echo "$BOOT_JDK_VERSION" >&6; }
26812          fi # end check jdk version
26813        fi # end check javac
26814      fi # end check java
26815    fi # end check boot jdk found
26816  fi
26817
26818    done
26819  fi
26820
26821  fi
26822
26823
26824    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26825    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26826      # Do we have a bin/java?
26827      if test ! -x "$BOOT_JDK/bin/java"; then
26828        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26829$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26830        BOOT_JDK_FOUND=no
26831      else
26832        # Do we have a bin/javac?
26833        if test ! -x "$BOOT_JDK/bin/javac"; then
26834          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26835$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26836          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26837$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26838          BOOT_JDK_FOUND=no
26839        else
26840          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26841          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
26842
26843          # Extra M4 quote needed to protect [] in grep expression.
26844          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26845          if test "x$FOUND_CORRECT_VERSION" = x; then
26846            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26847$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26848            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26849$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26850            BOOT_JDK_FOUND=no
26851          else
26852            # We're done! :-)
26853            BOOT_JDK_FOUND=yes
26854
26855  # Only process if variable expands to non-empty
26856
26857  if test "x$BOOT_JDK" != x; then
26858    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26859
26860  # Input might be given as Windows format, start by converting to
26861  # unix format.
26862  path="$BOOT_JDK"
26863  new_path=`$CYGPATH -u "$path"`
26864
26865  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26866  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26867  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26868  # "foo.exe" is OK but "foo" is an error.
26869  #
26870  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26871  # It is also a way to make sure we got the proper file name for the real test later on.
26872  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26873  if test "x$test_shortpath" = x; then
26874    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26875$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26876    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26877  fi
26878
26879  # Call helper function which possibly converts this using DOS-style short mode.
26880  # If so, the updated path is stored in $new_path.
26881
26882  input_path="$new_path"
26883  # Check if we need to convert this using DOS-style short mode. If the path
26884  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26885  # take no chances and rewrite it.
26886  # Note: m4 eats our [], so we need to use [ and ] instead.
26887  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26888  if test "x$has_forbidden_chars" != x; then
26889    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26890    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26891    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26892    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26893      # Going to short mode and back again did indeed matter. Since short mode is
26894      # case insensitive, let's make it lowercase to improve readability.
26895      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26896      # Now convert it back to Unix-style (cygpath)
26897      input_path=`$CYGPATH -u "$shortmode_path"`
26898      new_path="$input_path"
26899    fi
26900  fi
26901
26902  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26903  if test "x$test_cygdrive_prefix" = x; then
26904    # As a simple fix, exclude /usr/bin since it's not a real path.
26905    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26906      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26907      # a path prefixed by /cygdrive for fixpath to work.
26908      new_path="$CYGWIN_ROOT_PATH$input_path"
26909    fi
26910  fi
26911
26912
26913  if test "x$path" != "x$new_path"; then
26914    BOOT_JDK="$new_path"
26915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26916$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26917  fi
26918
26919    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26920
26921  path="$BOOT_JDK"
26922  has_colon=`$ECHO $path | $GREP ^.:`
26923  new_path="$path"
26924  if test "x$has_colon" = x; then
26925    # Not in mixed or Windows style, start by that.
26926    new_path=`cmd //c echo $path`
26927  fi
26928
26929
26930  input_path="$new_path"
26931  # Check if we need to convert this using DOS-style short mode. If the path
26932  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26933  # take no chances and rewrite it.
26934  # Note: m4 eats our [], so we need to use [ and ] instead.
26935  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26936  if test "x$has_forbidden_chars" != x; then
26937    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26938    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26939  fi
26940
26941
26942  windows_path="$new_path"
26943  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26944    unix_path=`$CYGPATH -u "$windows_path"`
26945    new_path="$unix_path"
26946  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26947    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26948    new_path="$unix_path"
26949  fi
26950
26951  if test "x$path" != "x$new_path"; then
26952    BOOT_JDK="$new_path"
26953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26954$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26955  fi
26956
26957  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26958  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26959
26960    else
26961      # We're on a unix platform. Hooray! :)
26962      path="$BOOT_JDK"
26963      has_space=`$ECHO "$path" | $GREP " "`
26964      if test "x$has_space" != x; then
26965        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26966$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26967        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26968      fi
26969
26970      # Use eval to expand a potential ~
26971      eval path="$path"
26972      if test ! -f "$path" && test ! -d "$path"; then
26973        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26974      fi
26975
26976      if test -d "$path"; then
26977        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26978      else
26979        dir="`$DIRNAME "$path"`"
26980        base="`$BASENAME "$path"`"
26981        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26982      fi
26983    fi
26984  fi
26985
26986            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26987$as_echo_n "checking for Boot JDK... " >&6; }
26988            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26989$as_echo "$BOOT_JDK" >&6; }
26990            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26991$as_echo_n "checking Boot JDK version... " >&6; }
26992            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26993            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26994$as_echo "$BOOT_JDK_VERSION" >&6; }
26995          fi # end check jdk version
26996        fi # end check javac
26997      fi # end check java
26998    fi # end check boot jdk found
26999  fi
27000
27001
27002  if test "x$BOOT_JDK_FOUND" = xno; then
27003    # Now execute the test
27004
27005  if test "x$PROGRAMW6432" != x; then
27006    VIRTUAL_DIR="$PROGRAMW6432/Java"
27007
27008  windows_path="$VIRTUAL_DIR"
27009  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27010    unix_path=`$CYGPATH -u "$windows_path"`
27011    VIRTUAL_DIR="$unix_path"
27012  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27013    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27014    VIRTUAL_DIR="$unix_path"
27015  fi
27016
27017
27018  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27019  BOOT_JDK_SUFFIX=""
27020  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27021  if test "x$ALL_JDKS_FOUND" != x; then
27022    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27023
27024  if test "x$BOOT_JDK_FOUND" = xno; then
27025    # Now execute the test
27026
27027        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27028        if test -d "$BOOT_JDK"; then
27029          BOOT_JDK_FOUND=maybe
27030          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27031$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27032        fi
27033
27034
27035    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27036    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27037      # Do we have a bin/java?
27038      if test ! -x "$BOOT_JDK/bin/java"; then
27039        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27040$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27041        BOOT_JDK_FOUND=no
27042      else
27043        # Do we have a bin/javac?
27044        if test ! -x "$BOOT_JDK/bin/javac"; then
27045          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27046$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27047          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27048$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27049          BOOT_JDK_FOUND=no
27050        else
27051          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27052          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27053
27054          # Extra M4 quote needed to protect [] in grep expression.
27055          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27056          if test "x$FOUND_CORRECT_VERSION" = x; then
27057            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27058$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27059            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27060$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27061            BOOT_JDK_FOUND=no
27062          else
27063            # We're done! :-)
27064            BOOT_JDK_FOUND=yes
27065
27066  # Only process if variable expands to non-empty
27067
27068  if test "x$BOOT_JDK" != x; then
27069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27070
27071  # Input might be given as Windows format, start by converting to
27072  # unix format.
27073  path="$BOOT_JDK"
27074  new_path=`$CYGPATH -u "$path"`
27075
27076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27079  # "foo.exe" is OK but "foo" is an error.
27080  #
27081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27082  # It is also a way to make sure we got the proper file name for the real test later on.
27083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27084  if test "x$test_shortpath" = x; then
27085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27086$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27087    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27088  fi
27089
27090  # Call helper function which possibly converts this using DOS-style short mode.
27091  # If so, the updated path is stored in $new_path.
27092
27093  input_path="$new_path"
27094  # Check if we need to convert this using DOS-style short mode. If the path
27095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27096  # take no chances and rewrite it.
27097  # Note: m4 eats our [], so we need to use [ and ] instead.
27098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27099  if test "x$has_forbidden_chars" != x; then
27100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27104      # Going to short mode and back again did indeed matter. Since short mode is
27105      # case insensitive, let's make it lowercase to improve readability.
27106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27107      # Now convert it back to Unix-style (cygpath)
27108      input_path=`$CYGPATH -u "$shortmode_path"`
27109      new_path="$input_path"
27110    fi
27111  fi
27112
27113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27114  if test "x$test_cygdrive_prefix" = x; then
27115    # As a simple fix, exclude /usr/bin since it's not a real path.
27116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27118      # a path prefixed by /cygdrive for fixpath to work.
27119      new_path="$CYGWIN_ROOT_PATH$input_path"
27120    fi
27121  fi
27122
27123
27124  if test "x$path" != "x$new_path"; then
27125    BOOT_JDK="$new_path"
27126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27127$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27128  fi
27129
27130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27131
27132  path="$BOOT_JDK"
27133  has_colon=`$ECHO $path | $GREP ^.:`
27134  new_path="$path"
27135  if test "x$has_colon" = x; then
27136    # Not in mixed or Windows style, start by that.
27137    new_path=`cmd //c echo $path`
27138  fi
27139
27140
27141  input_path="$new_path"
27142  # Check if we need to convert this using DOS-style short mode. If the path
27143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27144  # take no chances and rewrite it.
27145  # Note: m4 eats our [], so we need to use [ and ] instead.
27146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27147  if test "x$has_forbidden_chars" != x; then
27148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27150  fi
27151
27152
27153  windows_path="$new_path"
27154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27155    unix_path=`$CYGPATH -u "$windows_path"`
27156    new_path="$unix_path"
27157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27159    new_path="$unix_path"
27160  fi
27161
27162  if test "x$path" != "x$new_path"; then
27163    BOOT_JDK="$new_path"
27164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27165$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27166  fi
27167
27168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27170
27171    else
27172      # We're on a unix platform. Hooray! :)
27173      path="$BOOT_JDK"
27174      has_space=`$ECHO "$path" | $GREP " "`
27175      if test "x$has_space" != x; then
27176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27177$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27179      fi
27180
27181      # Use eval to expand a potential ~
27182      eval path="$path"
27183      if test ! -f "$path" && test ! -d "$path"; then
27184        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27185      fi
27186
27187      if test -d "$path"; then
27188        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27189      else
27190        dir="`$DIRNAME "$path"`"
27191        base="`$BASENAME "$path"`"
27192        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27193      fi
27194    fi
27195  fi
27196
27197            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27198$as_echo_n "checking for Boot JDK... " >&6; }
27199            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27200$as_echo "$BOOT_JDK" >&6; }
27201            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27202$as_echo_n "checking Boot JDK version... " >&6; }
27203            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27204            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27205$as_echo "$BOOT_JDK_VERSION" >&6; }
27206          fi # end check jdk version
27207        fi # end check javac
27208      fi # end check java
27209    fi # end check boot jdk found
27210  fi
27211
27212    done
27213  fi
27214
27215  fi
27216
27217
27218    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27219    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27220      # Do we have a bin/java?
27221      if test ! -x "$BOOT_JDK/bin/java"; then
27222        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27223$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27224        BOOT_JDK_FOUND=no
27225      else
27226        # Do we have a bin/javac?
27227        if test ! -x "$BOOT_JDK/bin/javac"; then
27228          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27229$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27230          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27231$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27232          BOOT_JDK_FOUND=no
27233        else
27234          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27235          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27236
27237          # Extra M4 quote needed to protect [] in grep expression.
27238          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27239          if test "x$FOUND_CORRECT_VERSION" = x; then
27240            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27241$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27242            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27243$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27244            BOOT_JDK_FOUND=no
27245          else
27246            # We're done! :-)
27247            BOOT_JDK_FOUND=yes
27248
27249  # Only process if variable expands to non-empty
27250
27251  if test "x$BOOT_JDK" != x; then
27252    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27253
27254  # Input might be given as Windows format, start by converting to
27255  # unix format.
27256  path="$BOOT_JDK"
27257  new_path=`$CYGPATH -u "$path"`
27258
27259  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27260  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27261  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27262  # "foo.exe" is OK but "foo" is an error.
27263  #
27264  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27265  # It is also a way to make sure we got the proper file name for the real test later on.
27266  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27267  if test "x$test_shortpath" = x; then
27268    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27269$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27270    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27271  fi
27272
27273  # Call helper function which possibly converts this using DOS-style short mode.
27274  # If so, the updated path is stored in $new_path.
27275
27276  input_path="$new_path"
27277  # Check if we need to convert this using DOS-style short mode. If the path
27278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27279  # take no chances and rewrite it.
27280  # Note: m4 eats our [], so we need to use [ and ] instead.
27281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27282  if test "x$has_forbidden_chars" != x; then
27283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27284    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27285    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27286    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27287      # Going to short mode and back again did indeed matter. Since short mode is
27288      # case insensitive, let's make it lowercase to improve readability.
27289      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27290      # Now convert it back to Unix-style (cygpath)
27291      input_path=`$CYGPATH -u "$shortmode_path"`
27292      new_path="$input_path"
27293    fi
27294  fi
27295
27296  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27297  if test "x$test_cygdrive_prefix" = x; then
27298    # As a simple fix, exclude /usr/bin since it's not a real path.
27299    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27300      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27301      # a path prefixed by /cygdrive for fixpath to work.
27302      new_path="$CYGWIN_ROOT_PATH$input_path"
27303    fi
27304  fi
27305
27306
27307  if test "x$path" != "x$new_path"; then
27308    BOOT_JDK="$new_path"
27309    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27310$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27311  fi
27312
27313    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27314
27315  path="$BOOT_JDK"
27316  has_colon=`$ECHO $path | $GREP ^.:`
27317  new_path="$path"
27318  if test "x$has_colon" = x; then
27319    # Not in mixed or Windows style, start by that.
27320    new_path=`cmd //c echo $path`
27321  fi
27322
27323
27324  input_path="$new_path"
27325  # Check if we need to convert this using DOS-style short mode. If the path
27326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27327  # take no chances and rewrite it.
27328  # Note: m4 eats our [], so we need to use [ and ] instead.
27329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27330  if test "x$has_forbidden_chars" != x; then
27331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27332    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27333  fi
27334
27335
27336  windows_path="$new_path"
27337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27338    unix_path=`$CYGPATH -u "$windows_path"`
27339    new_path="$unix_path"
27340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27342    new_path="$unix_path"
27343  fi
27344
27345  if test "x$path" != "x$new_path"; then
27346    BOOT_JDK="$new_path"
27347    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27348$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27349  fi
27350
27351  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27352  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27353
27354    else
27355      # We're on a unix platform. Hooray! :)
27356      path="$BOOT_JDK"
27357      has_space=`$ECHO "$path" | $GREP " "`
27358      if test "x$has_space" != x; then
27359        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27360$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27361        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27362      fi
27363
27364      # Use eval to expand a potential ~
27365      eval path="$path"
27366      if test ! -f "$path" && test ! -d "$path"; then
27367        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27368      fi
27369
27370      if test -d "$path"; then
27371        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27372      else
27373        dir="`$DIRNAME "$path"`"
27374        base="`$BASENAME "$path"`"
27375        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27376      fi
27377    fi
27378  fi
27379
27380            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27381$as_echo_n "checking for Boot JDK... " >&6; }
27382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27383$as_echo "$BOOT_JDK" >&6; }
27384            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27385$as_echo_n "checking Boot JDK version... " >&6; }
27386            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27387            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27388$as_echo "$BOOT_JDK_VERSION" >&6; }
27389          fi # end check jdk version
27390        fi # end check javac
27391      fi # end check java
27392    fi # end check boot jdk found
27393  fi
27394
27395
27396  if test "x$BOOT_JDK_FOUND" = xno; then
27397    # Now execute the test
27398
27399  if test "x$PROGRAMFILES" != x; then
27400    VIRTUAL_DIR="$PROGRAMFILES/Java"
27401
27402  windows_path="$VIRTUAL_DIR"
27403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27404    unix_path=`$CYGPATH -u "$windows_path"`
27405    VIRTUAL_DIR="$unix_path"
27406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27408    VIRTUAL_DIR="$unix_path"
27409  fi
27410
27411
27412  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27413  BOOT_JDK_SUFFIX=""
27414  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27415  if test "x$ALL_JDKS_FOUND" != x; then
27416    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27417
27418  if test "x$BOOT_JDK_FOUND" = xno; then
27419    # Now execute the test
27420
27421        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27422        if test -d "$BOOT_JDK"; then
27423          BOOT_JDK_FOUND=maybe
27424          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27425$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27426        fi
27427
27428
27429    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27430    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27431      # Do we have a bin/java?
27432      if test ! -x "$BOOT_JDK/bin/java"; then
27433        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27434$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27435        BOOT_JDK_FOUND=no
27436      else
27437        # Do we have a bin/javac?
27438        if test ! -x "$BOOT_JDK/bin/javac"; then
27439          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27440$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27441          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27442$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27443          BOOT_JDK_FOUND=no
27444        else
27445          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27446          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27447
27448          # Extra M4 quote needed to protect [] in grep expression.
27449          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27450          if test "x$FOUND_CORRECT_VERSION" = x; then
27451            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27452$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27453            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27454$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27455            BOOT_JDK_FOUND=no
27456          else
27457            # We're done! :-)
27458            BOOT_JDK_FOUND=yes
27459
27460  # Only process if variable expands to non-empty
27461
27462  if test "x$BOOT_JDK" != x; then
27463    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27464
27465  # Input might be given as Windows format, start by converting to
27466  # unix format.
27467  path="$BOOT_JDK"
27468  new_path=`$CYGPATH -u "$path"`
27469
27470  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27471  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27472  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27473  # "foo.exe" is OK but "foo" is an error.
27474  #
27475  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27476  # It is also a way to make sure we got the proper file name for the real test later on.
27477  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27478  if test "x$test_shortpath" = x; then
27479    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27480$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27481    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27482  fi
27483
27484  # Call helper function which possibly converts this using DOS-style short mode.
27485  # If so, the updated path is stored in $new_path.
27486
27487  input_path="$new_path"
27488  # Check if we need to convert this using DOS-style short mode. If the path
27489  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27490  # take no chances and rewrite it.
27491  # Note: m4 eats our [], so we need to use [ and ] instead.
27492  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27493  if test "x$has_forbidden_chars" != x; then
27494    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27495    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27496    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27497    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27498      # Going to short mode and back again did indeed matter. Since short mode is
27499      # case insensitive, let's make it lowercase to improve readability.
27500      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27501      # Now convert it back to Unix-style (cygpath)
27502      input_path=`$CYGPATH -u "$shortmode_path"`
27503      new_path="$input_path"
27504    fi
27505  fi
27506
27507  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27508  if test "x$test_cygdrive_prefix" = x; then
27509    # As a simple fix, exclude /usr/bin since it's not a real path.
27510    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27511      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27512      # a path prefixed by /cygdrive for fixpath to work.
27513      new_path="$CYGWIN_ROOT_PATH$input_path"
27514    fi
27515  fi
27516
27517
27518  if test "x$path" != "x$new_path"; then
27519    BOOT_JDK="$new_path"
27520    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27521$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27522  fi
27523
27524    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27525
27526  path="$BOOT_JDK"
27527  has_colon=`$ECHO $path | $GREP ^.:`
27528  new_path="$path"
27529  if test "x$has_colon" = x; then
27530    # Not in mixed or Windows style, start by that.
27531    new_path=`cmd //c echo $path`
27532  fi
27533
27534
27535  input_path="$new_path"
27536  # Check if we need to convert this using DOS-style short mode. If the path
27537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27538  # take no chances and rewrite it.
27539  # Note: m4 eats our [], so we need to use [ and ] instead.
27540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27541  if test "x$has_forbidden_chars" != x; then
27542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27544  fi
27545
27546
27547  windows_path="$new_path"
27548  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27549    unix_path=`$CYGPATH -u "$windows_path"`
27550    new_path="$unix_path"
27551  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27552    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27553    new_path="$unix_path"
27554  fi
27555
27556  if test "x$path" != "x$new_path"; then
27557    BOOT_JDK="$new_path"
27558    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27559$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27560  fi
27561
27562  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27563  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27564
27565    else
27566      # We're on a unix platform. Hooray! :)
27567      path="$BOOT_JDK"
27568      has_space=`$ECHO "$path" | $GREP " "`
27569      if test "x$has_space" != x; then
27570        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27571$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27572        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27573      fi
27574
27575      # Use eval to expand a potential ~
27576      eval path="$path"
27577      if test ! -f "$path" && test ! -d "$path"; then
27578        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27579      fi
27580
27581      if test -d "$path"; then
27582        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27583      else
27584        dir="`$DIRNAME "$path"`"
27585        base="`$BASENAME "$path"`"
27586        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27587      fi
27588    fi
27589  fi
27590
27591            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27592$as_echo_n "checking for Boot JDK... " >&6; }
27593            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27594$as_echo "$BOOT_JDK" >&6; }
27595            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27596$as_echo_n "checking Boot JDK version... " >&6; }
27597            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27598            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27599$as_echo "$BOOT_JDK_VERSION" >&6; }
27600          fi # end check jdk version
27601        fi # end check javac
27602      fi # end check java
27603    fi # end check boot jdk found
27604  fi
27605
27606    done
27607  fi
27608
27609  fi
27610
27611
27612    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27613    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27614      # Do we have a bin/java?
27615      if test ! -x "$BOOT_JDK/bin/java"; then
27616        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27617$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27618        BOOT_JDK_FOUND=no
27619      else
27620        # Do we have a bin/javac?
27621        if test ! -x "$BOOT_JDK/bin/javac"; then
27622          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27623$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27624          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27625$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27626          BOOT_JDK_FOUND=no
27627        else
27628          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27629          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27630
27631          # Extra M4 quote needed to protect [] in grep expression.
27632          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27633          if test "x$FOUND_CORRECT_VERSION" = x; then
27634            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27635$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27636            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27637$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27638            BOOT_JDK_FOUND=no
27639          else
27640            # We're done! :-)
27641            BOOT_JDK_FOUND=yes
27642
27643  # Only process if variable expands to non-empty
27644
27645  if test "x$BOOT_JDK" != x; then
27646    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27647
27648  # Input might be given as Windows format, start by converting to
27649  # unix format.
27650  path="$BOOT_JDK"
27651  new_path=`$CYGPATH -u "$path"`
27652
27653  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27654  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27655  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27656  # "foo.exe" is OK but "foo" is an error.
27657  #
27658  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27659  # It is also a way to make sure we got the proper file name for the real test later on.
27660  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27661  if test "x$test_shortpath" = x; then
27662    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27663$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27664    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27665  fi
27666
27667  # Call helper function which possibly converts this using DOS-style short mode.
27668  # If so, the updated path is stored in $new_path.
27669
27670  input_path="$new_path"
27671  # Check if we need to convert this using DOS-style short mode. If the path
27672  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27673  # take no chances and rewrite it.
27674  # Note: m4 eats our [], so we need to use [ and ] instead.
27675  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27676  if test "x$has_forbidden_chars" != x; then
27677    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27678    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27679    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27680    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27681      # Going to short mode and back again did indeed matter. Since short mode is
27682      # case insensitive, let's make it lowercase to improve readability.
27683      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27684      # Now convert it back to Unix-style (cygpath)
27685      input_path=`$CYGPATH -u "$shortmode_path"`
27686      new_path="$input_path"
27687    fi
27688  fi
27689
27690  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27691  if test "x$test_cygdrive_prefix" = x; then
27692    # As a simple fix, exclude /usr/bin since it's not a real path.
27693    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27694      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27695      # a path prefixed by /cygdrive for fixpath to work.
27696      new_path="$CYGWIN_ROOT_PATH$input_path"
27697    fi
27698  fi
27699
27700
27701  if test "x$path" != "x$new_path"; then
27702    BOOT_JDK="$new_path"
27703    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27704$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27705  fi
27706
27707    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27708
27709  path="$BOOT_JDK"
27710  has_colon=`$ECHO $path | $GREP ^.:`
27711  new_path="$path"
27712  if test "x$has_colon" = x; then
27713    # Not in mixed or Windows style, start by that.
27714    new_path=`cmd //c echo $path`
27715  fi
27716
27717
27718  input_path="$new_path"
27719  # Check if we need to convert this using DOS-style short mode. If the path
27720  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27721  # take no chances and rewrite it.
27722  # Note: m4 eats our [], so we need to use [ and ] instead.
27723  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27724  if test "x$has_forbidden_chars" != x; then
27725    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27726    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27727  fi
27728
27729
27730  windows_path="$new_path"
27731  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27732    unix_path=`$CYGPATH -u "$windows_path"`
27733    new_path="$unix_path"
27734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27735    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27736    new_path="$unix_path"
27737  fi
27738
27739  if test "x$path" != "x$new_path"; then
27740    BOOT_JDK="$new_path"
27741    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27742$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27743  fi
27744
27745  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27746  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27747
27748    else
27749      # We're on a unix platform. Hooray! :)
27750      path="$BOOT_JDK"
27751      has_space=`$ECHO "$path" | $GREP " "`
27752      if test "x$has_space" != x; then
27753        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27754$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27755        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27756      fi
27757
27758      # Use eval to expand a potential ~
27759      eval path="$path"
27760      if test ! -f "$path" && test ! -d "$path"; then
27761        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27762      fi
27763
27764      if test -d "$path"; then
27765        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27766      else
27767        dir="`$DIRNAME "$path"`"
27768        base="`$BASENAME "$path"`"
27769        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27770      fi
27771    fi
27772  fi
27773
27774            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27775$as_echo_n "checking for Boot JDK... " >&6; }
27776            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27777$as_echo "$BOOT_JDK" >&6; }
27778            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27779$as_echo_n "checking Boot JDK version... " >&6; }
27780            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27781            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27782$as_echo "$BOOT_JDK_VERSION" >&6; }
27783          fi # end check jdk version
27784        fi # end check javac
27785      fi # end check java
27786    fi # end check boot jdk found
27787  fi
27788
27789
27790  if test "x$BOOT_JDK_FOUND" = xno; then
27791    # Now execute the test
27792
27793  if test "x$ProgramFiles" != x; then
27794    VIRTUAL_DIR="$ProgramFiles/Java"
27795
27796  windows_path="$VIRTUAL_DIR"
27797  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27798    unix_path=`$CYGPATH -u "$windows_path"`
27799    VIRTUAL_DIR="$unix_path"
27800  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27801    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27802    VIRTUAL_DIR="$unix_path"
27803  fi
27804
27805
27806  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27807  BOOT_JDK_SUFFIX=""
27808  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27809  if test "x$ALL_JDKS_FOUND" != x; then
27810    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27811
27812  if test "x$BOOT_JDK_FOUND" = xno; then
27813    # Now execute the test
27814
27815        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27816        if test -d "$BOOT_JDK"; then
27817          BOOT_JDK_FOUND=maybe
27818          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27819$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27820        fi
27821
27822
27823    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27824    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27825      # Do we have a bin/java?
27826      if test ! -x "$BOOT_JDK/bin/java"; then
27827        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27828$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27829        BOOT_JDK_FOUND=no
27830      else
27831        # Do we have a bin/javac?
27832        if test ! -x "$BOOT_JDK/bin/javac"; then
27833          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27834$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27835          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27836$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27837          BOOT_JDK_FOUND=no
27838        else
27839          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27840          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
27841
27842          # Extra M4 quote needed to protect [] in grep expression.
27843          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27844          if test "x$FOUND_CORRECT_VERSION" = x; then
27845            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27846$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27847            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27848$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27849            BOOT_JDK_FOUND=no
27850          else
27851            # We're done! :-)
27852            BOOT_JDK_FOUND=yes
27853
27854  # Only process if variable expands to non-empty
27855
27856  if test "x$BOOT_JDK" != x; then
27857    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27858
27859  # Input might be given as Windows format, start by converting to
27860  # unix format.
27861  path="$BOOT_JDK"
27862  new_path=`$CYGPATH -u "$path"`
27863
27864  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27865  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27866  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27867  # "foo.exe" is OK but "foo" is an error.
27868  #
27869  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27870  # It is also a way to make sure we got the proper file name for the real test later on.
27871  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27872  if test "x$test_shortpath" = x; then
27873    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27874$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27875    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27876  fi
27877
27878  # Call helper function which possibly converts this using DOS-style short mode.
27879  # If so, the updated path is stored in $new_path.
27880
27881  input_path="$new_path"
27882  # Check if we need to convert this using DOS-style short mode. If the path
27883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27884  # take no chances and rewrite it.
27885  # Note: m4 eats our [], so we need to use [ and ] instead.
27886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27887  if test "x$has_forbidden_chars" != x; then
27888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27892      # Going to short mode and back again did indeed matter. Since short mode is
27893      # case insensitive, let's make it lowercase to improve readability.
27894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27895      # Now convert it back to Unix-style (cygpath)
27896      input_path=`$CYGPATH -u "$shortmode_path"`
27897      new_path="$input_path"
27898    fi
27899  fi
27900
27901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27902  if test "x$test_cygdrive_prefix" = x; then
27903    # As a simple fix, exclude /usr/bin since it's not a real path.
27904    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27906      # a path prefixed by /cygdrive for fixpath to work.
27907      new_path="$CYGWIN_ROOT_PATH$input_path"
27908    fi
27909  fi
27910
27911
27912  if test "x$path" != "x$new_path"; then
27913    BOOT_JDK="$new_path"
27914    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27915$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27916  fi
27917
27918    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27919
27920  path="$BOOT_JDK"
27921  has_colon=`$ECHO $path | $GREP ^.:`
27922  new_path="$path"
27923  if test "x$has_colon" = x; then
27924    # Not in mixed or Windows style, start by that.
27925    new_path=`cmd //c echo $path`
27926  fi
27927
27928
27929  input_path="$new_path"
27930  # Check if we need to convert this using DOS-style short mode. If the path
27931  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27932  # take no chances and rewrite it.
27933  # Note: m4 eats our [], so we need to use [ and ] instead.
27934  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27935  if test "x$has_forbidden_chars" != x; then
27936    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27937    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27938  fi
27939
27940
27941  windows_path="$new_path"
27942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27943    unix_path=`$CYGPATH -u "$windows_path"`
27944    new_path="$unix_path"
27945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27947    new_path="$unix_path"
27948  fi
27949
27950  if test "x$path" != "x$new_path"; then
27951    BOOT_JDK="$new_path"
27952    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27953$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27954  fi
27955
27956  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27957  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27958
27959    else
27960      # We're on a unix platform. Hooray! :)
27961      path="$BOOT_JDK"
27962      has_space=`$ECHO "$path" | $GREP " "`
27963      if test "x$has_space" != x; then
27964        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27965$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27966        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27967      fi
27968
27969      # Use eval to expand a potential ~
27970      eval path="$path"
27971      if test ! -f "$path" && test ! -d "$path"; then
27972        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27973      fi
27974
27975      if test -d "$path"; then
27976        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27977      else
27978        dir="`$DIRNAME "$path"`"
27979        base="`$BASENAME "$path"`"
27980        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27981      fi
27982    fi
27983  fi
27984
27985            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27986$as_echo_n "checking for Boot JDK... " >&6; }
27987            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27988$as_echo "$BOOT_JDK" >&6; }
27989            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27990$as_echo_n "checking Boot JDK version... " >&6; }
27991            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27992            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27993$as_echo "$BOOT_JDK_VERSION" >&6; }
27994          fi # end check jdk version
27995        fi # end check javac
27996      fi # end check java
27997    fi # end check boot jdk found
27998  fi
27999
28000    done
28001  fi
28002
28003  fi
28004
28005
28006    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28007    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28008      # Do we have a bin/java?
28009      if test ! -x "$BOOT_JDK/bin/java"; then
28010        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28011$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28012        BOOT_JDK_FOUND=no
28013      else
28014        # Do we have a bin/javac?
28015        if test ! -x "$BOOT_JDK/bin/javac"; then
28016          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28017$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28018          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28019$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28020          BOOT_JDK_FOUND=no
28021        else
28022          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28023          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28024
28025          # Extra M4 quote needed to protect [] in grep expression.
28026          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28027          if test "x$FOUND_CORRECT_VERSION" = x; then
28028            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28029$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28030            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28031$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28032            BOOT_JDK_FOUND=no
28033          else
28034            # We're done! :-)
28035            BOOT_JDK_FOUND=yes
28036
28037  # Only process if variable expands to non-empty
28038
28039  if test "x$BOOT_JDK" != x; then
28040    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28041
28042  # Input might be given as Windows format, start by converting to
28043  # unix format.
28044  path="$BOOT_JDK"
28045  new_path=`$CYGPATH -u "$path"`
28046
28047  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28048  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28049  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28050  # "foo.exe" is OK but "foo" is an error.
28051  #
28052  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28053  # It is also a way to make sure we got the proper file name for the real test later on.
28054  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28055  if test "x$test_shortpath" = x; then
28056    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28057$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28058    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28059  fi
28060
28061  # Call helper function which possibly converts this using DOS-style short mode.
28062  # If so, the updated path is stored in $new_path.
28063
28064  input_path="$new_path"
28065  # Check if we need to convert this using DOS-style short mode. If the path
28066  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28067  # take no chances and rewrite it.
28068  # Note: m4 eats our [], so we need to use [ and ] instead.
28069  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28070  if test "x$has_forbidden_chars" != x; then
28071    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28072    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28073    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28074    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28075      # Going to short mode and back again did indeed matter. Since short mode is
28076      # case insensitive, let's make it lowercase to improve readability.
28077      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28078      # Now convert it back to Unix-style (cygpath)
28079      input_path=`$CYGPATH -u "$shortmode_path"`
28080      new_path="$input_path"
28081    fi
28082  fi
28083
28084  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28085  if test "x$test_cygdrive_prefix" = x; then
28086    # As a simple fix, exclude /usr/bin since it's not a real path.
28087    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28088      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28089      # a path prefixed by /cygdrive for fixpath to work.
28090      new_path="$CYGWIN_ROOT_PATH$input_path"
28091    fi
28092  fi
28093
28094
28095  if test "x$path" != "x$new_path"; then
28096    BOOT_JDK="$new_path"
28097    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28098$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28099  fi
28100
28101    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28102
28103  path="$BOOT_JDK"
28104  has_colon=`$ECHO $path | $GREP ^.:`
28105  new_path="$path"
28106  if test "x$has_colon" = x; then
28107    # Not in mixed or Windows style, start by that.
28108    new_path=`cmd //c echo $path`
28109  fi
28110
28111
28112  input_path="$new_path"
28113  # Check if we need to convert this using DOS-style short mode. If the path
28114  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28115  # take no chances and rewrite it.
28116  # Note: m4 eats our [], so we need to use [ and ] instead.
28117  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28118  if test "x$has_forbidden_chars" != x; then
28119    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28120    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28121  fi
28122
28123
28124  windows_path="$new_path"
28125  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28126    unix_path=`$CYGPATH -u "$windows_path"`
28127    new_path="$unix_path"
28128  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28129    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28130    new_path="$unix_path"
28131  fi
28132
28133  if test "x$path" != "x$new_path"; then
28134    BOOT_JDK="$new_path"
28135    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28136$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28137  fi
28138
28139  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28140  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28141
28142    else
28143      # We're on a unix platform. Hooray! :)
28144      path="$BOOT_JDK"
28145      has_space=`$ECHO "$path" | $GREP " "`
28146      if test "x$has_space" != x; then
28147        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28148$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28149        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28150      fi
28151
28152      # Use eval to expand a potential ~
28153      eval path="$path"
28154      if test ! -f "$path" && test ! -d "$path"; then
28155        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28156      fi
28157
28158      if test -d "$path"; then
28159        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28160      else
28161        dir="`$DIRNAME "$path"`"
28162        base="`$BASENAME "$path"`"
28163        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28164      fi
28165    fi
28166  fi
28167
28168            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28169$as_echo_n "checking for Boot JDK... " >&6; }
28170            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28171$as_echo "$BOOT_JDK" >&6; }
28172            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28173$as_echo_n "checking Boot JDK version... " >&6; }
28174            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28175            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28176$as_echo "$BOOT_JDK_VERSION" >&6; }
28177          fi # end check jdk version
28178        fi # end check javac
28179      fi # end check java
28180    fi # end check boot jdk found
28181  fi
28182
28183
28184  if test "x$BOOT_JDK_FOUND" = xno; then
28185    # Now execute the test
28186
28187  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
28188  BOOT_JDK_SUFFIX=""
28189  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28190  if test "x$ALL_JDKS_FOUND" != x; then
28191    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28192
28193  if test "x$BOOT_JDK_FOUND" = xno; then
28194    # Now execute the test
28195
28196        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28197        if test -d "$BOOT_JDK"; then
28198          BOOT_JDK_FOUND=maybe
28199          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28200$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28201        fi
28202
28203
28204    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28205    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28206      # Do we have a bin/java?
28207      if test ! -x "$BOOT_JDK/bin/java"; then
28208        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28209$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28210        BOOT_JDK_FOUND=no
28211      else
28212        # Do we have a bin/javac?
28213        if test ! -x "$BOOT_JDK/bin/javac"; then
28214          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28215$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28216          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28217$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28218          BOOT_JDK_FOUND=no
28219        else
28220          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28221          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28222
28223          # Extra M4 quote needed to protect [] in grep expression.
28224          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28225          if test "x$FOUND_CORRECT_VERSION" = x; then
28226            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28227$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28228            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28229$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28230            BOOT_JDK_FOUND=no
28231          else
28232            # We're done! :-)
28233            BOOT_JDK_FOUND=yes
28234
28235  # Only process if variable expands to non-empty
28236
28237  if test "x$BOOT_JDK" != x; then
28238    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28239
28240  # Input might be given as Windows format, start by converting to
28241  # unix format.
28242  path="$BOOT_JDK"
28243  new_path=`$CYGPATH -u "$path"`
28244
28245  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28246  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28247  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28248  # "foo.exe" is OK but "foo" is an error.
28249  #
28250  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28251  # It is also a way to make sure we got the proper file name for the real test later on.
28252  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28253  if test "x$test_shortpath" = x; then
28254    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28255$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28256    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28257  fi
28258
28259  # Call helper function which possibly converts this using DOS-style short mode.
28260  # If so, the updated path is stored in $new_path.
28261
28262  input_path="$new_path"
28263  # Check if we need to convert this using DOS-style short mode. If the path
28264  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28265  # take no chances and rewrite it.
28266  # Note: m4 eats our [], so we need to use [ and ] instead.
28267  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28268  if test "x$has_forbidden_chars" != x; then
28269    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28270    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28271    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28272    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28273      # Going to short mode and back again did indeed matter. Since short mode is
28274      # case insensitive, let's make it lowercase to improve readability.
28275      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28276      # Now convert it back to Unix-style (cygpath)
28277      input_path=`$CYGPATH -u "$shortmode_path"`
28278      new_path="$input_path"
28279    fi
28280  fi
28281
28282  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28283  if test "x$test_cygdrive_prefix" = x; then
28284    # As a simple fix, exclude /usr/bin since it's not a real path.
28285    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28286      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28287      # a path prefixed by /cygdrive for fixpath to work.
28288      new_path="$CYGWIN_ROOT_PATH$input_path"
28289    fi
28290  fi
28291
28292
28293  if test "x$path" != "x$new_path"; then
28294    BOOT_JDK="$new_path"
28295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28296$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28297  fi
28298
28299    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28300
28301  path="$BOOT_JDK"
28302  has_colon=`$ECHO $path | $GREP ^.:`
28303  new_path="$path"
28304  if test "x$has_colon" = x; then
28305    # Not in mixed or Windows style, start by that.
28306    new_path=`cmd //c echo $path`
28307  fi
28308
28309
28310  input_path="$new_path"
28311  # Check if we need to convert this using DOS-style short mode. If the path
28312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28313  # take no chances and rewrite it.
28314  # Note: m4 eats our [], so we need to use [ and ] instead.
28315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28316  if test "x$has_forbidden_chars" != x; then
28317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28318    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28319  fi
28320
28321
28322  windows_path="$new_path"
28323  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28324    unix_path=`$CYGPATH -u "$windows_path"`
28325    new_path="$unix_path"
28326  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28327    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28328    new_path="$unix_path"
28329  fi
28330
28331  if test "x$path" != "x$new_path"; then
28332    BOOT_JDK="$new_path"
28333    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28334$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28335  fi
28336
28337  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28338  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28339
28340    else
28341      # We're on a unix platform. Hooray! :)
28342      path="$BOOT_JDK"
28343      has_space=`$ECHO "$path" | $GREP " "`
28344      if test "x$has_space" != x; then
28345        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28346$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28347        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28348      fi
28349
28350      # Use eval to expand a potential ~
28351      eval path="$path"
28352      if test ! -f "$path" && test ! -d "$path"; then
28353        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28354      fi
28355
28356      if test -d "$path"; then
28357        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28358      else
28359        dir="`$DIRNAME "$path"`"
28360        base="`$BASENAME "$path"`"
28361        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28362      fi
28363    fi
28364  fi
28365
28366            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28367$as_echo_n "checking for Boot JDK... " >&6; }
28368            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28369$as_echo "$BOOT_JDK" >&6; }
28370            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28371$as_echo_n "checking Boot JDK version... " >&6; }
28372            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28374$as_echo "$BOOT_JDK_VERSION" >&6; }
28375          fi # end check jdk version
28376        fi # end check javac
28377      fi # end check java
28378    fi # end check boot jdk found
28379  fi
28380
28381    done
28382  fi
28383
28384
28385    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28386    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28387      # Do we have a bin/java?
28388      if test ! -x "$BOOT_JDK/bin/java"; then
28389        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28390$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28391        BOOT_JDK_FOUND=no
28392      else
28393        # Do we have a bin/javac?
28394        if test ! -x "$BOOT_JDK/bin/javac"; then
28395          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28396$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28397          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28398$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28399          BOOT_JDK_FOUND=no
28400        else
28401          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28402          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28403
28404          # Extra M4 quote needed to protect [] in grep expression.
28405          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28406          if test "x$FOUND_CORRECT_VERSION" = x; then
28407            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28408$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28409            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28410$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28411            BOOT_JDK_FOUND=no
28412          else
28413            # We're done! :-)
28414            BOOT_JDK_FOUND=yes
28415
28416  # Only process if variable expands to non-empty
28417
28418  if test "x$BOOT_JDK" != x; then
28419    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28420
28421  # Input might be given as Windows format, start by converting to
28422  # unix format.
28423  path="$BOOT_JDK"
28424  new_path=`$CYGPATH -u "$path"`
28425
28426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28429  # "foo.exe" is OK but "foo" is an error.
28430  #
28431  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28432  # It is also a way to make sure we got the proper file name for the real test later on.
28433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28434  if test "x$test_shortpath" = x; then
28435    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28436$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28437    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28438  fi
28439
28440  # Call helper function which possibly converts this using DOS-style short mode.
28441  # If so, the updated path is stored in $new_path.
28442
28443  input_path="$new_path"
28444  # Check if we need to convert this using DOS-style short mode. If the path
28445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28446  # take no chances and rewrite it.
28447  # Note: m4 eats our [], so we need to use [ and ] instead.
28448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28449  if test "x$has_forbidden_chars" != x; then
28450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28451    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28452    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28453    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28454      # Going to short mode and back again did indeed matter. Since short mode is
28455      # case insensitive, let's make it lowercase to improve readability.
28456      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28457      # Now convert it back to Unix-style (cygpath)
28458      input_path=`$CYGPATH -u "$shortmode_path"`
28459      new_path="$input_path"
28460    fi
28461  fi
28462
28463  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28464  if test "x$test_cygdrive_prefix" = x; then
28465    # As a simple fix, exclude /usr/bin since it's not a real path.
28466    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28467      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28468      # a path prefixed by /cygdrive for fixpath to work.
28469      new_path="$CYGWIN_ROOT_PATH$input_path"
28470    fi
28471  fi
28472
28473
28474  if test "x$path" != "x$new_path"; then
28475    BOOT_JDK="$new_path"
28476    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28477$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28478  fi
28479
28480    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28481
28482  path="$BOOT_JDK"
28483  has_colon=`$ECHO $path | $GREP ^.:`
28484  new_path="$path"
28485  if test "x$has_colon" = x; then
28486    # Not in mixed or Windows style, start by that.
28487    new_path=`cmd //c echo $path`
28488  fi
28489
28490
28491  input_path="$new_path"
28492  # Check if we need to convert this using DOS-style short mode. If the path
28493  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28494  # take no chances and rewrite it.
28495  # Note: m4 eats our [], so we need to use [ and ] instead.
28496  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28497  if test "x$has_forbidden_chars" != x; then
28498    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28499    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28500  fi
28501
28502
28503  windows_path="$new_path"
28504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28505    unix_path=`$CYGPATH -u "$windows_path"`
28506    new_path="$unix_path"
28507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28509    new_path="$unix_path"
28510  fi
28511
28512  if test "x$path" != "x$new_path"; then
28513    BOOT_JDK="$new_path"
28514    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28515$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28516  fi
28517
28518  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28519  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28520
28521    else
28522      # We're on a unix platform. Hooray! :)
28523      path="$BOOT_JDK"
28524      has_space=`$ECHO "$path" | $GREP " "`
28525      if test "x$has_space" != x; then
28526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28527$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28528        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28529      fi
28530
28531      # Use eval to expand a potential ~
28532      eval path="$path"
28533      if test ! -f "$path" && test ! -d "$path"; then
28534        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28535      fi
28536
28537      if test -d "$path"; then
28538        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28539      else
28540        dir="`$DIRNAME "$path"`"
28541        base="`$BASENAME "$path"`"
28542        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28543      fi
28544    fi
28545  fi
28546
28547            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28548$as_echo_n "checking for Boot JDK... " >&6; }
28549            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28550$as_echo "$BOOT_JDK" >&6; }
28551            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28552$as_echo_n "checking Boot JDK version... " >&6; }
28553            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28554            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28555$as_echo "$BOOT_JDK_VERSION" >&6; }
28556          fi # end check jdk version
28557        fi # end check javac
28558      fi # end check java
28559    fi # end check boot jdk found
28560  fi
28561
28562  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28563
28564  if test "x$BOOT_JDK_FOUND" = xno; then
28565    # Now execute the test
28566
28567  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28568  BOOT_JDK_SUFFIX="/Contents/Home"
28569  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28570  if test "x$ALL_JDKS_FOUND" != x; then
28571    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28572
28573  if test "x$BOOT_JDK_FOUND" = xno; then
28574    # Now execute the test
28575
28576        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28577        if test -d "$BOOT_JDK"; then
28578          BOOT_JDK_FOUND=maybe
28579          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28580$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28581        fi
28582
28583
28584    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28585    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28586      # Do we have a bin/java?
28587      if test ! -x "$BOOT_JDK/bin/java"; then
28588        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28589$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28590        BOOT_JDK_FOUND=no
28591      else
28592        # Do we have a bin/javac?
28593        if test ! -x "$BOOT_JDK/bin/javac"; then
28594          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28595$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28596          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28597$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28598          BOOT_JDK_FOUND=no
28599        else
28600          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28601          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28602
28603          # Extra M4 quote needed to protect [] in grep expression.
28604          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28605          if test "x$FOUND_CORRECT_VERSION" = x; then
28606            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28607$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28608            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28609$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28610            BOOT_JDK_FOUND=no
28611          else
28612            # We're done! :-)
28613            BOOT_JDK_FOUND=yes
28614
28615  # Only process if variable expands to non-empty
28616
28617  if test "x$BOOT_JDK" != x; then
28618    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28619
28620  # Input might be given as Windows format, start by converting to
28621  # unix format.
28622  path="$BOOT_JDK"
28623  new_path=`$CYGPATH -u "$path"`
28624
28625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28628  # "foo.exe" is OK but "foo" is an error.
28629  #
28630  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28631  # It is also a way to make sure we got the proper file name for the real test later on.
28632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28633  if test "x$test_shortpath" = x; then
28634    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28635$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28636    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28637  fi
28638
28639  # Call helper function which possibly converts this using DOS-style short mode.
28640  # If so, the updated path is stored in $new_path.
28641
28642  input_path="$new_path"
28643  # Check if we need to convert this using DOS-style short mode. If the path
28644  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28645  # take no chances and rewrite it.
28646  # Note: m4 eats our [], so we need to use [ and ] instead.
28647  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28648  if test "x$has_forbidden_chars" != x; then
28649    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28650    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28651    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28652    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28653      # Going to short mode and back again did indeed matter. Since short mode is
28654      # case insensitive, let's make it lowercase to improve readability.
28655      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28656      # Now convert it back to Unix-style (cygpath)
28657      input_path=`$CYGPATH -u "$shortmode_path"`
28658      new_path="$input_path"
28659    fi
28660  fi
28661
28662  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28663  if test "x$test_cygdrive_prefix" = x; then
28664    # As a simple fix, exclude /usr/bin since it's not a real path.
28665    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28666      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28667      # a path prefixed by /cygdrive for fixpath to work.
28668      new_path="$CYGWIN_ROOT_PATH$input_path"
28669    fi
28670  fi
28671
28672
28673  if test "x$path" != "x$new_path"; then
28674    BOOT_JDK="$new_path"
28675    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28676$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28677  fi
28678
28679    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28680
28681  path="$BOOT_JDK"
28682  has_colon=`$ECHO $path | $GREP ^.:`
28683  new_path="$path"
28684  if test "x$has_colon" = x; then
28685    # Not in mixed or Windows style, start by that.
28686    new_path=`cmd //c echo $path`
28687  fi
28688
28689
28690  input_path="$new_path"
28691  # Check if we need to convert this using DOS-style short mode. If the path
28692  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28693  # take no chances and rewrite it.
28694  # Note: m4 eats our [], so we need to use [ and ] instead.
28695  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28696  if test "x$has_forbidden_chars" != x; then
28697    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28698    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28699  fi
28700
28701
28702  windows_path="$new_path"
28703  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28704    unix_path=`$CYGPATH -u "$windows_path"`
28705    new_path="$unix_path"
28706  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28707    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28708    new_path="$unix_path"
28709  fi
28710
28711  if test "x$path" != "x$new_path"; then
28712    BOOT_JDK="$new_path"
28713    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28714$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28715  fi
28716
28717  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28718  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28719
28720    else
28721      # We're on a unix platform. Hooray! :)
28722      path="$BOOT_JDK"
28723      has_space=`$ECHO "$path" | $GREP " "`
28724      if test "x$has_space" != x; then
28725        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28726$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28727        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28728      fi
28729
28730      # Use eval to expand a potential ~
28731      eval path="$path"
28732      if test ! -f "$path" && test ! -d "$path"; then
28733        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28734      fi
28735
28736      if test -d "$path"; then
28737        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28738      else
28739        dir="`$DIRNAME "$path"`"
28740        base="`$BASENAME "$path"`"
28741        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28742      fi
28743    fi
28744  fi
28745
28746            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28747$as_echo_n "checking for Boot JDK... " >&6; }
28748            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28749$as_echo "$BOOT_JDK" >&6; }
28750            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28751$as_echo_n "checking Boot JDK version... " >&6; }
28752            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28753            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28754$as_echo "$BOOT_JDK_VERSION" >&6; }
28755          fi # end check jdk version
28756        fi # end check javac
28757      fi # end check java
28758    fi # end check boot jdk found
28759  fi
28760
28761    done
28762  fi
28763
28764
28765    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28766    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28767      # Do we have a bin/java?
28768      if test ! -x "$BOOT_JDK/bin/java"; then
28769        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28770$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28771        BOOT_JDK_FOUND=no
28772      else
28773        # Do we have a bin/javac?
28774        if test ! -x "$BOOT_JDK/bin/javac"; then
28775          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28776$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28777          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28778$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28779          BOOT_JDK_FOUND=no
28780        else
28781          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28782          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28783
28784          # Extra M4 quote needed to protect [] in grep expression.
28785          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28786          if test "x$FOUND_CORRECT_VERSION" = x; then
28787            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28788$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28789            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28790$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28791            BOOT_JDK_FOUND=no
28792          else
28793            # We're done! :-)
28794            BOOT_JDK_FOUND=yes
28795
28796  # Only process if variable expands to non-empty
28797
28798  if test "x$BOOT_JDK" != x; then
28799    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28800
28801  # Input might be given as Windows format, start by converting to
28802  # unix format.
28803  path="$BOOT_JDK"
28804  new_path=`$CYGPATH -u "$path"`
28805
28806  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28807  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28808  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28809  # "foo.exe" is OK but "foo" is an error.
28810  #
28811  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28812  # It is also a way to make sure we got the proper file name for the real test later on.
28813  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28814  if test "x$test_shortpath" = x; then
28815    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28816$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28817    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28818  fi
28819
28820  # Call helper function which possibly converts this using DOS-style short mode.
28821  # If so, the updated path is stored in $new_path.
28822
28823  input_path="$new_path"
28824  # Check if we need to convert this using DOS-style short mode. If the path
28825  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28826  # take no chances and rewrite it.
28827  # Note: m4 eats our [], so we need to use [ and ] instead.
28828  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28829  if test "x$has_forbidden_chars" != x; then
28830    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28831    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28832    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28833    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28834      # Going to short mode and back again did indeed matter. Since short mode is
28835      # case insensitive, let's make it lowercase to improve readability.
28836      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28837      # Now convert it back to Unix-style (cygpath)
28838      input_path=`$CYGPATH -u "$shortmode_path"`
28839      new_path="$input_path"
28840    fi
28841  fi
28842
28843  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28844  if test "x$test_cygdrive_prefix" = x; then
28845    # As a simple fix, exclude /usr/bin since it's not a real path.
28846    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28847      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28848      # a path prefixed by /cygdrive for fixpath to work.
28849      new_path="$CYGWIN_ROOT_PATH$input_path"
28850    fi
28851  fi
28852
28853
28854  if test "x$path" != "x$new_path"; then
28855    BOOT_JDK="$new_path"
28856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28858  fi
28859
28860    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28861
28862  path="$BOOT_JDK"
28863  has_colon=`$ECHO $path | $GREP ^.:`
28864  new_path="$path"
28865  if test "x$has_colon" = x; then
28866    # Not in mixed or Windows style, start by that.
28867    new_path=`cmd //c echo $path`
28868  fi
28869
28870
28871  input_path="$new_path"
28872  # Check if we need to convert this using DOS-style short mode. If the path
28873  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28874  # take no chances and rewrite it.
28875  # Note: m4 eats our [], so we need to use [ and ] instead.
28876  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28877  if test "x$has_forbidden_chars" != x; then
28878    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28879    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28880  fi
28881
28882
28883  windows_path="$new_path"
28884  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28885    unix_path=`$CYGPATH -u "$windows_path"`
28886    new_path="$unix_path"
28887  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28888    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28889    new_path="$unix_path"
28890  fi
28891
28892  if test "x$path" != "x$new_path"; then
28893    BOOT_JDK="$new_path"
28894    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28895$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28896  fi
28897
28898  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28899  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28900
28901    else
28902      # We're on a unix platform. Hooray! :)
28903      path="$BOOT_JDK"
28904      has_space=`$ECHO "$path" | $GREP " "`
28905      if test "x$has_space" != x; then
28906        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28907$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28908        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28909      fi
28910
28911      # Use eval to expand a potential ~
28912      eval path="$path"
28913      if test ! -f "$path" && test ! -d "$path"; then
28914        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28915      fi
28916
28917      if test -d "$path"; then
28918        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28919      else
28920        dir="`$DIRNAME "$path"`"
28921        base="`$BASENAME "$path"`"
28922        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28923      fi
28924    fi
28925  fi
28926
28927            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28928$as_echo_n "checking for Boot JDK... " >&6; }
28929            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28930$as_echo "$BOOT_JDK" >&6; }
28931            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28932$as_echo_n "checking Boot JDK version... " >&6; }
28933            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28935$as_echo "$BOOT_JDK_VERSION" >&6; }
28936          fi # end check jdk version
28937        fi # end check javac
28938      fi # end check java
28939    fi # end check boot jdk found
28940  fi
28941
28942
28943  if test "x$BOOT_JDK_FOUND" = xno; then
28944    # Now execute the test
28945
28946  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28947  BOOT_JDK_SUFFIX="/Contents/Home"
28948  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28949  if test "x$ALL_JDKS_FOUND" != x; then
28950    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28951
28952  if test "x$BOOT_JDK_FOUND" = xno; then
28953    # Now execute the test
28954
28955        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28956        if test -d "$BOOT_JDK"; then
28957          BOOT_JDK_FOUND=maybe
28958          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28959$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28960        fi
28961
28962
28963    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28964    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28965      # Do we have a bin/java?
28966      if test ! -x "$BOOT_JDK/bin/java"; then
28967        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28968$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28969        BOOT_JDK_FOUND=no
28970      else
28971        # Do we have a bin/javac?
28972        if test ! -x "$BOOT_JDK/bin/javac"; then
28973          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28974$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28975          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28976$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28977          BOOT_JDK_FOUND=no
28978        else
28979          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28980          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
28981
28982          # Extra M4 quote needed to protect [] in grep expression.
28983          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28984          if test "x$FOUND_CORRECT_VERSION" = x; then
28985            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28986$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28987            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28988$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28989            BOOT_JDK_FOUND=no
28990          else
28991            # We're done! :-)
28992            BOOT_JDK_FOUND=yes
28993
28994  # Only process if variable expands to non-empty
28995
28996  if test "x$BOOT_JDK" != x; then
28997    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28998
28999  # Input might be given as Windows format, start by converting to
29000  # unix format.
29001  path="$BOOT_JDK"
29002  new_path=`$CYGPATH -u "$path"`
29003
29004  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29005  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29006  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29007  # "foo.exe" is OK but "foo" is an error.
29008  #
29009  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29010  # It is also a way to make sure we got the proper file name for the real test later on.
29011  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29012  if test "x$test_shortpath" = x; then
29013    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29014$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29015    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29016  fi
29017
29018  # Call helper function which possibly converts this using DOS-style short mode.
29019  # If so, the updated path is stored in $new_path.
29020
29021  input_path="$new_path"
29022  # Check if we need to convert this using DOS-style short mode. If the path
29023  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29024  # take no chances and rewrite it.
29025  # Note: m4 eats our [], so we need to use [ and ] instead.
29026  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29027  if test "x$has_forbidden_chars" != x; then
29028    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29029    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29030    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29031    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29032      # Going to short mode and back again did indeed matter. Since short mode is
29033      # case insensitive, let's make it lowercase to improve readability.
29034      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29035      # Now convert it back to Unix-style (cygpath)
29036      input_path=`$CYGPATH -u "$shortmode_path"`
29037      new_path="$input_path"
29038    fi
29039  fi
29040
29041  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29042  if test "x$test_cygdrive_prefix" = x; then
29043    # As a simple fix, exclude /usr/bin since it's not a real path.
29044    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29045      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29046      # a path prefixed by /cygdrive for fixpath to work.
29047      new_path="$CYGWIN_ROOT_PATH$input_path"
29048    fi
29049  fi
29050
29051
29052  if test "x$path" != "x$new_path"; then
29053    BOOT_JDK="$new_path"
29054    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29055$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29056  fi
29057
29058    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29059
29060  path="$BOOT_JDK"
29061  has_colon=`$ECHO $path | $GREP ^.:`
29062  new_path="$path"
29063  if test "x$has_colon" = x; then
29064    # Not in mixed or Windows style, start by that.
29065    new_path=`cmd //c echo $path`
29066  fi
29067
29068
29069  input_path="$new_path"
29070  # Check if we need to convert this using DOS-style short mode. If the path
29071  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29072  # take no chances and rewrite it.
29073  # Note: m4 eats our [], so we need to use [ and ] instead.
29074  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29075  if test "x$has_forbidden_chars" != x; then
29076    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29077    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29078  fi
29079
29080
29081  windows_path="$new_path"
29082  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29083    unix_path=`$CYGPATH -u "$windows_path"`
29084    new_path="$unix_path"
29085  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29086    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29087    new_path="$unix_path"
29088  fi
29089
29090  if test "x$path" != "x$new_path"; then
29091    BOOT_JDK="$new_path"
29092    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29093$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29094  fi
29095
29096  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29097  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29098
29099    else
29100      # We're on a unix platform. Hooray! :)
29101      path="$BOOT_JDK"
29102      has_space=`$ECHO "$path" | $GREP " "`
29103      if test "x$has_space" != x; then
29104        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29105$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29106        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29107      fi
29108
29109      # Use eval to expand a potential ~
29110      eval path="$path"
29111      if test ! -f "$path" && test ! -d "$path"; then
29112        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29113      fi
29114
29115      if test -d "$path"; then
29116        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29117      else
29118        dir="`$DIRNAME "$path"`"
29119        base="`$BASENAME "$path"`"
29120        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29121      fi
29122    fi
29123  fi
29124
29125            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29126$as_echo_n "checking for Boot JDK... " >&6; }
29127            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29128$as_echo "$BOOT_JDK" >&6; }
29129            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29130$as_echo_n "checking Boot JDK version... " >&6; }
29131            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29132            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29133$as_echo "$BOOT_JDK_VERSION" >&6; }
29134          fi # end check jdk version
29135        fi # end check javac
29136      fi # end check java
29137    fi # end check boot jdk found
29138  fi
29139
29140    done
29141  fi
29142
29143
29144    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29145    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29146      # Do we have a bin/java?
29147      if test ! -x "$BOOT_JDK/bin/java"; then
29148        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29149$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29150        BOOT_JDK_FOUND=no
29151      else
29152        # Do we have a bin/javac?
29153        if test ! -x "$BOOT_JDK/bin/javac"; then
29154          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29156          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29157$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29158          BOOT_JDK_FOUND=no
29159        else
29160          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29161          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29162
29163          # Extra M4 quote needed to protect [] in grep expression.
29164          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29165          if test "x$FOUND_CORRECT_VERSION" = x; then
29166            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29167$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29168            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29169$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29170            BOOT_JDK_FOUND=no
29171          else
29172            # We're done! :-)
29173            BOOT_JDK_FOUND=yes
29174
29175  # Only process if variable expands to non-empty
29176
29177  if test "x$BOOT_JDK" != x; then
29178    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29179
29180  # Input might be given as Windows format, start by converting to
29181  # unix format.
29182  path="$BOOT_JDK"
29183  new_path=`$CYGPATH -u "$path"`
29184
29185  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29186  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29187  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29188  # "foo.exe" is OK but "foo" is an error.
29189  #
29190  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29191  # It is also a way to make sure we got the proper file name for the real test later on.
29192  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29193  if test "x$test_shortpath" = x; then
29194    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29195$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29196    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29197  fi
29198
29199  # Call helper function which possibly converts this using DOS-style short mode.
29200  # If so, the updated path is stored in $new_path.
29201
29202  input_path="$new_path"
29203  # Check if we need to convert this using DOS-style short mode. If the path
29204  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29205  # take no chances and rewrite it.
29206  # Note: m4 eats our [], so we need to use [ and ] instead.
29207  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29208  if test "x$has_forbidden_chars" != x; then
29209    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29210    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29211    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29212    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29213      # Going to short mode and back again did indeed matter. Since short mode is
29214      # case insensitive, let's make it lowercase to improve readability.
29215      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29216      # Now convert it back to Unix-style (cygpath)
29217      input_path=`$CYGPATH -u "$shortmode_path"`
29218      new_path="$input_path"
29219    fi
29220  fi
29221
29222  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29223  if test "x$test_cygdrive_prefix" = x; then
29224    # As a simple fix, exclude /usr/bin since it's not a real path.
29225    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29226      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29227      # a path prefixed by /cygdrive for fixpath to work.
29228      new_path="$CYGWIN_ROOT_PATH$input_path"
29229    fi
29230  fi
29231
29232
29233  if test "x$path" != "x$new_path"; then
29234    BOOT_JDK="$new_path"
29235    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29236$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29237  fi
29238
29239    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29240
29241  path="$BOOT_JDK"
29242  has_colon=`$ECHO $path | $GREP ^.:`
29243  new_path="$path"
29244  if test "x$has_colon" = x; then
29245    # Not in mixed or Windows style, start by that.
29246    new_path=`cmd //c echo $path`
29247  fi
29248
29249
29250  input_path="$new_path"
29251  # Check if we need to convert this using DOS-style short mode. If the path
29252  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29253  # take no chances and rewrite it.
29254  # Note: m4 eats our [], so we need to use [ and ] instead.
29255  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29256  if test "x$has_forbidden_chars" != x; then
29257    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29258    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29259  fi
29260
29261
29262  windows_path="$new_path"
29263  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29264    unix_path=`$CYGPATH -u "$windows_path"`
29265    new_path="$unix_path"
29266  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29267    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29268    new_path="$unix_path"
29269  fi
29270
29271  if test "x$path" != "x$new_path"; then
29272    BOOT_JDK="$new_path"
29273    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29274$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29275  fi
29276
29277  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29278  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29279
29280    else
29281      # We're on a unix platform. Hooray! :)
29282      path="$BOOT_JDK"
29283      has_space=`$ECHO "$path" | $GREP " "`
29284      if test "x$has_space" != x; then
29285        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29286$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29287        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29288      fi
29289
29290      # Use eval to expand a potential ~
29291      eval path="$path"
29292      if test ! -f "$path" && test ! -d "$path"; then
29293        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29294      fi
29295
29296      if test -d "$path"; then
29297        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29298      else
29299        dir="`$DIRNAME "$path"`"
29300        base="`$BASENAME "$path"`"
29301        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29302      fi
29303    fi
29304  fi
29305
29306            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29307$as_echo_n "checking for Boot JDK... " >&6; }
29308            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29309$as_echo "$BOOT_JDK" >&6; }
29310            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29311$as_echo_n "checking Boot JDK version... " >&6; }
29312            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29313            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29314$as_echo "$BOOT_JDK_VERSION" >&6; }
29315          fi # end check jdk version
29316        fi # end check javac
29317      fi # end check java
29318    fi # end check boot jdk found
29319  fi
29320
29321  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
29322
29323  if test "x$BOOT_JDK_FOUND" = xno; then
29324    # Now execute the test
29325
29326  BOOT_JDK_PREFIX="/usr/lib/jvm"
29327  BOOT_JDK_SUFFIX=""
29328  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
29329  if test "x$ALL_JDKS_FOUND" != x; then
29330    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
29331
29332  if test "x$BOOT_JDK_FOUND" = xno; then
29333    # Now execute the test
29334
29335        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
29336        if test -d "$BOOT_JDK"; then
29337          BOOT_JDK_FOUND=maybe
29338          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
29339$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
29340        fi
29341
29342
29343    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29344    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29345      # Do we have a bin/java?
29346      if test ! -x "$BOOT_JDK/bin/java"; then
29347        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29348$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29349        BOOT_JDK_FOUND=no
29350      else
29351        # Do we have a bin/javac?
29352        if test ! -x "$BOOT_JDK/bin/javac"; then
29353          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29354$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29355          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29356$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29357          BOOT_JDK_FOUND=no
29358        else
29359          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29360          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29361
29362          # Extra M4 quote needed to protect [] in grep expression.
29363          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29364          if test "x$FOUND_CORRECT_VERSION" = x; then
29365            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29366$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29367            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29368$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29369            BOOT_JDK_FOUND=no
29370          else
29371            # We're done! :-)
29372            BOOT_JDK_FOUND=yes
29373
29374  # Only process if variable expands to non-empty
29375
29376  if test "x$BOOT_JDK" != x; then
29377    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29378
29379  # Input might be given as Windows format, start by converting to
29380  # unix format.
29381  path="$BOOT_JDK"
29382  new_path=`$CYGPATH -u "$path"`
29383
29384  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29385  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29386  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29387  # "foo.exe" is OK but "foo" is an error.
29388  #
29389  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29390  # It is also a way to make sure we got the proper file name for the real test later on.
29391  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29392  if test "x$test_shortpath" = x; then
29393    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29394$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29395    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29396  fi
29397
29398  # Call helper function which possibly converts this using DOS-style short mode.
29399  # If so, the updated path is stored in $new_path.
29400
29401  input_path="$new_path"
29402  # Check if we need to convert this using DOS-style short mode. If the path
29403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29404  # take no chances and rewrite it.
29405  # Note: m4 eats our [], so we need to use [ and ] instead.
29406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29407  if test "x$has_forbidden_chars" != x; then
29408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29409    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29410    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29411    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29412      # Going to short mode and back again did indeed matter. Since short mode is
29413      # case insensitive, let's make it lowercase to improve readability.
29414      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29415      # Now convert it back to Unix-style (cygpath)
29416      input_path=`$CYGPATH -u "$shortmode_path"`
29417      new_path="$input_path"
29418    fi
29419  fi
29420
29421  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29422  if test "x$test_cygdrive_prefix" = x; then
29423    # As a simple fix, exclude /usr/bin since it's not a real path.
29424    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29425      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29426      # a path prefixed by /cygdrive for fixpath to work.
29427      new_path="$CYGWIN_ROOT_PATH$input_path"
29428    fi
29429  fi
29430
29431
29432  if test "x$path" != "x$new_path"; then
29433    BOOT_JDK="$new_path"
29434    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29435$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29436  fi
29437
29438    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29439
29440  path="$BOOT_JDK"
29441  has_colon=`$ECHO $path | $GREP ^.:`
29442  new_path="$path"
29443  if test "x$has_colon" = x; then
29444    # Not in mixed or Windows style, start by that.
29445    new_path=`cmd //c echo $path`
29446  fi
29447
29448
29449  input_path="$new_path"
29450  # Check if we need to convert this using DOS-style short mode. If the path
29451  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29452  # take no chances and rewrite it.
29453  # Note: m4 eats our [], so we need to use [ and ] instead.
29454  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29455  if test "x$has_forbidden_chars" != x; then
29456    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29457    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29458  fi
29459
29460
29461  windows_path="$new_path"
29462  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29463    unix_path=`$CYGPATH -u "$windows_path"`
29464    new_path="$unix_path"
29465  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29466    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29467    new_path="$unix_path"
29468  fi
29469
29470  if test "x$path" != "x$new_path"; then
29471    BOOT_JDK="$new_path"
29472    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29473$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29474  fi
29475
29476  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29477  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29478
29479    else
29480      # We're on a unix platform. Hooray! :)
29481      path="$BOOT_JDK"
29482      has_space=`$ECHO "$path" | $GREP " "`
29483      if test "x$has_space" != x; then
29484        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29485$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29486        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29487      fi
29488
29489      # Use eval to expand a potential ~
29490      eval path="$path"
29491      if test ! -f "$path" && test ! -d "$path"; then
29492        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29493      fi
29494
29495      if test -d "$path"; then
29496        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29497      else
29498        dir="`$DIRNAME "$path"`"
29499        base="`$BASENAME "$path"`"
29500        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29501      fi
29502    fi
29503  fi
29504
29505            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29506$as_echo_n "checking for Boot JDK... " >&6; }
29507            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29508$as_echo "$BOOT_JDK" >&6; }
29509            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29510$as_echo_n "checking Boot JDK version... " >&6; }
29511            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29512            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29513$as_echo "$BOOT_JDK_VERSION" >&6; }
29514          fi # end check jdk version
29515        fi # end check javac
29516      fi # end check java
29517    fi # end check boot jdk found
29518  fi
29519
29520    done
29521  fi
29522
29523
29524    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29525    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29526      # Do we have a bin/java?
29527      if test ! -x "$BOOT_JDK/bin/java"; then
29528        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29529$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29530        BOOT_JDK_FOUND=no
29531      else
29532        # Do we have a bin/javac?
29533        if test ! -x "$BOOT_JDK/bin/javac"; then
29534          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29535$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29536          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29537$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29538          BOOT_JDK_FOUND=no
29539        else
29540          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29541          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29542
29543          # Extra M4 quote needed to protect [] in grep expression.
29544          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29545          if test "x$FOUND_CORRECT_VERSION" = x; then
29546            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29547$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29548            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29549$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29550            BOOT_JDK_FOUND=no
29551          else
29552            # We're done! :-)
29553            BOOT_JDK_FOUND=yes
29554
29555  # Only process if variable expands to non-empty
29556
29557  if test "x$BOOT_JDK" != x; then
29558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29559
29560  # Input might be given as Windows format, start by converting to
29561  # unix format.
29562  path="$BOOT_JDK"
29563  new_path=`$CYGPATH -u "$path"`
29564
29565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29568  # "foo.exe" is OK but "foo" is an error.
29569  #
29570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29571  # It is also a way to make sure we got the proper file name for the real test later on.
29572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29573  if test "x$test_shortpath" = x; then
29574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29575$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29576    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29577  fi
29578
29579  # Call helper function which possibly converts this using DOS-style short mode.
29580  # If so, the updated path is stored in $new_path.
29581
29582  input_path="$new_path"
29583  # Check if we need to convert this using DOS-style short mode. If the path
29584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29585  # take no chances and rewrite it.
29586  # Note: m4 eats our [], so we need to use [ and ] instead.
29587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29588  if test "x$has_forbidden_chars" != x; then
29589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29593      # Going to short mode and back again did indeed matter. Since short mode is
29594      # case insensitive, let's make it lowercase to improve readability.
29595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29596      # Now convert it back to Unix-style (cygpath)
29597      input_path=`$CYGPATH -u "$shortmode_path"`
29598      new_path="$input_path"
29599    fi
29600  fi
29601
29602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29603  if test "x$test_cygdrive_prefix" = x; then
29604    # As a simple fix, exclude /usr/bin since it's not a real path.
29605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29607      # a path prefixed by /cygdrive for fixpath to work.
29608      new_path="$CYGWIN_ROOT_PATH$input_path"
29609    fi
29610  fi
29611
29612
29613  if test "x$path" != "x$new_path"; then
29614    BOOT_JDK="$new_path"
29615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29616$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29617  fi
29618
29619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29620
29621  path="$BOOT_JDK"
29622  has_colon=`$ECHO $path | $GREP ^.:`
29623  new_path="$path"
29624  if test "x$has_colon" = x; then
29625    # Not in mixed or Windows style, start by that.
29626    new_path=`cmd //c echo $path`
29627  fi
29628
29629
29630  input_path="$new_path"
29631  # Check if we need to convert this using DOS-style short mode. If the path
29632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29633  # take no chances and rewrite it.
29634  # Note: m4 eats our [], so we need to use [ and ] instead.
29635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29636  if test "x$has_forbidden_chars" != x; then
29637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29639  fi
29640
29641
29642  windows_path="$new_path"
29643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29644    unix_path=`$CYGPATH -u "$windows_path"`
29645    new_path="$unix_path"
29646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29648    new_path="$unix_path"
29649  fi
29650
29651  if test "x$path" != "x$new_path"; then
29652    BOOT_JDK="$new_path"
29653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29654$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29655  fi
29656
29657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29659
29660    else
29661      # We're on a unix platform. Hooray! :)
29662      path="$BOOT_JDK"
29663      has_space=`$ECHO "$path" | $GREP " "`
29664      if test "x$has_space" != x; then
29665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29666$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29668      fi
29669
29670      # Use eval to expand a potential ~
29671      eval path="$path"
29672      if test ! -f "$path" && test ! -d "$path"; then
29673        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29674      fi
29675
29676      if test -d "$path"; then
29677        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29678      else
29679        dir="`$DIRNAME "$path"`"
29680        base="`$BASENAME "$path"`"
29681        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29682      fi
29683    fi
29684  fi
29685
29686            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29687$as_echo_n "checking for Boot JDK... " >&6; }
29688            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29689$as_echo "$BOOT_JDK" >&6; }
29690            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29691$as_echo_n "checking Boot JDK version... " >&6; }
29692            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29693            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29694$as_echo "$BOOT_JDK_VERSION" >&6; }
29695          fi # end check jdk version
29696        fi # end check javac
29697      fi # end check java
29698    fi # end check boot jdk found
29699  fi
29700
29701  fi
29702
29703
29704    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29705    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29706      # Do we have a bin/java?
29707      if test ! -x "$BOOT_JDK/bin/java"; then
29708        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29709$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29710        BOOT_JDK_FOUND=no
29711      else
29712        # Do we have a bin/javac?
29713        if test ! -x "$BOOT_JDK/bin/javac"; then
29714          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29715$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29716          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29717$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29718          BOOT_JDK_FOUND=no
29719        else
29720          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29721          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
29722
29723          # Extra M4 quote needed to protect [] in grep expression.
29724          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29725          if test "x$FOUND_CORRECT_VERSION" = x; then
29726            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29727$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29728            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29729$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29730            BOOT_JDK_FOUND=no
29731          else
29732            # We're done! :-)
29733            BOOT_JDK_FOUND=yes
29734
29735  # Only process if variable expands to non-empty
29736
29737  if test "x$BOOT_JDK" != x; then
29738    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29739
29740  # Input might be given as Windows format, start by converting to
29741  # unix format.
29742  path="$BOOT_JDK"
29743  new_path=`$CYGPATH -u "$path"`
29744
29745  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29746  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29747  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29748  # "foo.exe" is OK but "foo" is an error.
29749  #
29750  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29751  # It is also a way to make sure we got the proper file name for the real test later on.
29752  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29753  if test "x$test_shortpath" = x; then
29754    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29755$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29756    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29757  fi
29758
29759  # Call helper function which possibly converts this using DOS-style short mode.
29760  # If so, the updated path is stored in $new_path.
29761
29762  input_path="$new_path"
29763  # Check if we need to convert this using DOS-style short mode. If the path
29764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29765  # take no chances and rewrite it.
29766  # Note: m4 eats our [], so we need to use [ and ] instead.
29767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29768  if test "x$has_forbidden_chars" != x; then
29769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29770    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29771    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29772    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29773      # Going to short mode and back again did indeed matter. Since short mode is
29774      # case insensitive, let's make it lowercase to improve readability.
29775      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29776      # Now convert it back to Unix-style (cygpath)
29777      input_path=`$CYGPATH -u "$shortmode_path"`
29778      new_path="$input_path"
29779    fi
29780  fi
29781
29782  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29783  if test "x$test_cygdrive_prefix" = x; then
29784    # As a simple fix, exclude /usr/bin since it's not a real path.
29785    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29786      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29787      # a path prefixed by /cygdrive for fixpath to work.
29788      new_path="$CYGWIN_ROOT_PATH$input_path"
29789    fi
29790  fi
29791
29792
29793  if test "x$path" != "x$new_path"; then
29794    BOOT_JDK="$new_path"
29795    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29796$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29797  fi
29798
29799    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29800
29801  path="$BOOT_JDK"
29802  has_colon=`$ECHO $path | $GREP ^.:`
29803  new_path="$path"
29804  if test "x$has_colon" = x; then
29805    # Not in mixed or Windows style, start by that.
29806    new_path=`cmd //c echo $path`
29807  fi
29808
29809
29810  input_path="$new_path"
29811  # Check if we need to convert this using DOS-style short mode. If the path
29812  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29813  # take no chances and rewrite it.
29814  # Note: m4 eats our [], so we need to use [ and ] instead.
29815  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29816  if test "x$has_forbidden_chars" != x; then
29817    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29818    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29819  fi
29820
29821
29822  windows_path="$new_path"
29823  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29824    unix_path=`$CYGPATH -u "$windows_path"`
29825    new_path="$unix_path"
29826  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29827    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29828    new_path="$unix_path"
29829  fi
29830
29831  if test "x$path" != "x$new_path"; then
29832    BOOT_JDK="$new_path"
29833    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29834$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29835  fi
29836
29837  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29838  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29839
29840    else
29841      # We're on a unix platform. Hooray! :)
29842      path="$BOOT_JDK"
29843      has_space=`$ECHO "$path" | $GREP " "`
29844      if test "x$has_space" != x; then
29845        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29846$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29847        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29848      fi
29849
29850      # Use eval to expand a potential ~
29851      eval path="$path"
29852      if test ! -f "$path" && test ! -d "$path"; then
29853        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29854      fi
29855
29856      if test -d "$path"; then
29857        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29858      else
29859        dir="`$DIRNAME "$path"`"
29860        base="`$BASENAME "$path"`"
29861        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29862      fi
29863    fi
29864  fi
29865
29866            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29867$as_echo_n "checking for Boot JDK... " >&6; }
29868            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29869$as_echo "$BOOT_JDK" >&6; }
29870            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29871$as_echo_n "checking Boot JDK version... " >&6; }
29872            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29873            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29874$as_echo "$BOOT_JDK_VERSION" >&6; }
29875          fi # end check jdk version
29876        fi # end check javac
29877      fi # end check java
29878    fi # end check boot jdk found
29879  fi
29880
29881
29882  # If we haven't found anything yet, we've truly lost. Give up.
29883  if test "x$BOOT_JDK_FOUND" = xno; then
29884
29885  # Print a helpful message on how to acquire the necessary build dependency.
29886  # openjdk is the help tag: freetype, cups, alsa etc
29887  MISSING_DEPENDENCY=openjdk
29888
29889  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29890    cygwin_help $MISSING_DEPENDENCY
29891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29892    msys_help $MISSING_DEPENDENCY
29893  else
29894    PKGHANDLER_COMMAND=
29895
29896    case $PKGHANDLER in
29897      apt-get)
29898        apt_help     $MISSING_DEPENDENCY ;;
29899      yum)
29900        yum_help     $MISSING_DEPENDENCY ;;
29901      port)
29902        port_help    $MISSING_DEPENDENCY ;;
29903      pkgutil)
29904        pkgutil_help $MISSING_DEPENDENCY ;;
29905      pkgadd)
29906        pkgadd_help  $MISSING_DEPENDENCY ;;
29907    esac
29908
29909    if test "x$PKGHANDLER_COMMAND" != x; then
29910      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29911    fi
29912  fi
29913
29914    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29915$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29916    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29917$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29918    as_fn_error $? "Cannot continue" "$LINENO" 5
29919  fi
29920
29921
29922
29923  # Setup tools from the Boot JDK.
29924
29925  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29926
29927  # Publish this variable in the help.
29928
29929
29930  if [ -z "${JAVA+x}" ]; then
29931    # The variable is not set by user, try to locate tool using the code snippet
29932
29933      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29934$as_echo_n "checking for java in Boot JDK... " >&6; }
29935      JAVA=$BOOT_JDK/bin/java
29936      if test ! -x $JAVA; then
29937        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29938$as_echo "not found" >&6; }
29939        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29940$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29941        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29942      fi
29943      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29944$as_echo "ok" >&6; }
29945
29946
29947  else
29948    # The variable is set, but is it from the command line or the environment?
29949
29950    # Try to remove the string !JAVA! from our list.
29951    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29952    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29953      # If it failed, the variable was not from the command line. Ignore it,
29954      # but warn the user (except for BASH, which is always set by the calling BASH).
29955      if test "xJAVA" != xBASH; then
29956        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29957$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29958      fi
29959      # Try to locate tool using the code snippet
29960
29961      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29962$as_echo_n "checking for java in Boot JDK... " >&6; }
29963      JAVA=$BOOT_JDK/bin/java
29964      if test ! -x $JAVA; then
29965        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29966$as_echo "not found" >&6; }
29967        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29968$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29969        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29970      fi
29971      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29972$as_echo "ok" >&6; }
29973
29974
29975    else
29976      # If it succeeded, then it was overridden by the user. We will use it
29977      # for the tool.
29978
29979      # First remove it from the list of overridden variables, so we can test
29980      # for unknown variables in the end.
29981      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29982
29983      # Check if we try to supply an empty value
29984      if test "x$JAVA" = x; then
29985        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29986$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29987        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29988$as_echo_n "checking for JAVA... " >&6; }
29989        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29990$as_echo "disabled" >&6; }
29991      else
29992        # Check if the provided tool contains a complete path.
29993        tool_specified="$JAVA"
29994        tool_basename="${tool_specified##*/}"
29995        if test "x$tool_basename" = "x$tool_specified"; then
29996          # A command without a complete path is provided, search $PATH.
29997          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29998$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29999          # Extract the first word of "$tool_basename", so it can be a program name with args.
30000set dummy $tool_basename; ac_word=$2
30001{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30002$as_echo_n "checking for $ac_word... " >&6; }
30003if ${ac_cv_path_JAVA+:} false; then :
30004  $as_echo_n "(cached) " >&6
30005else
30006  case $JAVA in
30007  [\\/]* | ?:[\\/]*)
30008  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
30009  ;;
30010  *)
30011  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30012for as_dir in $PATH
30013do
30014  IFS=$as_save_IFS
30015  test -z "$as_dir" && as_dir=.
30016    for ac_exec_ext in '' $ac_executable_extensions; do
30017  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30018    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
30019    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30020    break 2
30021  fi
30022done
30023  done
30024IFS=$as_save_IFS
30025
30026  ;;
30027esac
30028fi
30029JAVA=$ac_cv_path_JAVA
30030if test -n "$JAVA"; then
30031  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
30032$as_echo "$JAVA" >&6; }
30033else
30034  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30035$as_echo "no" >&6; }
30036fi
30037
30038
30039          if test "x$JAVA" = x; then
30040            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30041          fi
30042        else
30043          # Otherwise we believe it is a complete path. Use it as it is.
30044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
30045$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
30046          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
30047$as_echo_n "checking for JAVA... " >&6; }
30048          if test ! -x "$tool_specified"; then
30049            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30050$as_echo "not found" >&6; }
30051            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
30052          fi
30053          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30054$as_echo "$tool_specified" >&6; }
30055        fi
30056      fi
30057    fi
30058
30059  fi
30060
30061
30062
30063  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30064
30065  # Publish this variable in the help.
30066
30067
30068  if [ -z "${JAVAC+x}" ]; then
30069    # The variable is not set by user, try to locate tool using the code snippet
30070
30071      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30072$as_echo_n "checking for javac in Boot JDK... " >&6; }
30073      JAVAC=$BOOT_JDK/bin/javac
30074      if test ! -x $JAVAC; then
30075        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30076$as_echo "not found" >&6; }
30077        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30078$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30079        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30080      fi
30081      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30082$as_echo "ok" >&6; }
30083
30084
30085  else
30086    # The variable is set, but is it from the command line or the environment?
30087
30088    # Try to remove the string !JAVAC! from our list.
30089    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
30090    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30091      # If it failed, the variable was not from the command line. Ignore it,
30092      # but warn the user (except for BASH, which is always set by the calling BASH).
30093      if test "xJAVAC" != xBASH; then
30094        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
30095$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
30096      fi
30097      # Try to locate tool using the code snippet
30098
30099      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
30100$as_echo_n "checking for javac in Boot JDK... " >&6; }
30101      JAVAC=$BOOT_JDK/bin/javac
30102      if test ! -x $JAVAC; then
30103        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30104$as_echo "not found" >&6; }
30105        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30106$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30107        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
30108      fi
30109      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30110$as_echo "ok" >&6; }
30111
30112
30113    else
30114      # If it succeeded, then it was overridden by the user. We will use it
30115      # for the tool.
30116
30117      # First remove it from the list of overridden variables, so we can test
30118      # for unknown variables in the end.
30119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30120
30121      # Check if we try to supply an empty value
30122      if test "x$JAVAC" = x; then
30123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
30124$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
30125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30126$as_echo_n "checking for JAVAC... " >&6; }
30127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30128$as_echo "disabled" >&6; }
30129      else
30130        # Check if the provided tool contains a complete path.
30131        tool_specified="$JAVAC"
30132        tool_basename="${tool_specified##*/}"
30133        if test "x$tool_basename" = "x$tool_specified"; then
30134          # A command without a complete path is provided, search $PATH.
30135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
30136$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
30137          # Extract the first word of "$tool_basename", so it can be a program name with args.
30138set dummy $tool_basename; ac_word=$2
30139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30140$as_echo_n "checking for $ac_word... " >&6; }
30141if ${ac_cv_path_JAVAC+:} false; then :
30142  $as_echo_n "(cached) " >&6
30143else
30144  case $JAVAC in
30145  [\\/]* | ?:[\\/]*)
30146  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
30147  ;;
30148  *)
30149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30150for as_dir in $PATH
30151do
30152  IFS=$as_save_IFS
30153  test -z "$as_dir" && as_dir=.
30154    for ac_exec_ext in '' $ac_executable_extensions; do
30155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30156    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
30157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30158    break 2
30159  fi
30160done
30161  done
30162IFS=$as_save_IFS
30163
30164  ;;
30165esac
30166fi
30167JAVAC=$ac_cv_path_JAVAC
30168if test -n "$JAVAC"; then
30169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
30170$as_echo "$JAVAC" >&6; }
30171else
30172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30173$as_echo "no" >&6; }
30174fi
30175
30176
30177          if test "x$JAVAC" = x; then
30178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30179          fi
30180        else
30181          # Otherwise we believe it is a complete path. Use it as it is.
30182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
30183$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
30184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
30185$as_echo_n "checking for JAVAC... " >&6; }
30186          if test ! -x "$tool_specified"; then
30187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30188$as_echo "not found" >&6; }
30189            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
30190          fi
30191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30192$as_echo "$tool_specified" >&6; }
30193        fi
30194      fi
30195    fi
30196
30197  fi
30198
30199
30200
30201  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30202
30203  # Publish this variable in the help.
30204
30205
30206  if [ -z "${JAVAH+x}" ]; then
30207    # The variable is not set by user, try to locate tool using the code snippet
30208
30209      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30210$as_echo_n "checking for javah in Boot JDK... " >&6; }
30211      JAVAH=$BOOT_JDK/bin/javah
30212      if test ! -x $JAVAH; then
30213        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30214$as_echo "not found" >&6; }
30215        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30216$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30217        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30218      fi
30219      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30220$as_echo "ok" >&6; }
30221
30222
30223  else
30224    # The variable is set, but is it from the command line or the environment?
30225
30226    # Try to remove the string !JAVAH! from our list.
30227    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
30228    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30229      # If it failed, the variable was not from the command line. Ignore it,
30230      # but warn the user (except for BASH, which is always set by the calling BASH).
30231      if test "xJAVAH" != xBASH; then
30232        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
30233$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
30234      fi
30235      # Try to locate tool using the code snippet
30236
30237      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
30238$as_echo_n "checking for javah in Boot JDK... " >&6; }
30239      JAVAH=$BOOT_JDK/bin/javah
30240      if test ! -x $JAVAH; then
30241        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30242$as_echo "not found" >&6; }
30243        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30244$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30245        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
30246      fi
30247      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30248$as_echo "ok" >&6; }
30249
30250
30251    else
30252      # If it succeeded, then it was overridden by the user. We will use it
30253      # for the tool.
30254
30255      # First remove it from the list of overridden variables, so we can test
30256      # for unknown variables in the end.
30257      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30258
30259      # Check if we try to supply an empty value
30260      if test "x$JAVAH" = x; then
30261        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
30262$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
30263        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30264$as_echo_n "checking for JAVAH... " >&6; }
30265        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30266$as_echo "disabled" >&6; }
30267      else
30268        # Check if the provided tool contains a complete path.
30269        tool_specified="$JAVAH"
30270        tool_basename="${tool_specified##*/}"
30271        if test "x$tool_basename" = "x$tool_specified"; then
30272          # A command without a complete path is provided, search $PATH.
30273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
30274$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
30275          # Extract the first word of "$tool_basename", so it can be a program name with args.
30276set dummy $tool_basename; ac_word=$2
30277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30278$as_echo_n "checking for $ac_word... " >&6; }
30279if ${ac_cv_path_JAVAH+:} false; then :
30280  $as_echo_n "(cached) " >&6
30281else
30282  case $JAVAH in
30283  [\\/]* | ?:[\\/]*)
30284  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
30285  ;;
30286  *)
30287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30288for as_dir in $PATH
30289do
30290  IFS=$as_save_IFS
30291  test -z "$as_dir" && as_dir=.
30292    for ac_exec_ext in '' $ac_executable_extensions; do
30293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30294    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
30295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30296    break 2
30297  fi
30298done
30299  done
30300IFS=$as_save_IFS
30301
30302  ;;
30303esac
30304fi
30305JAVAH=$ac_cv_path_JAVAH
30306if test -n "$JAVAH"; then
30307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
30308$as_echo "$JAVAH" >&6; }
30309else
30310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30311$as_echo "no" >&6; }
30312fi
30313
30314
30315          if test "x$JAVAH" = x; then
30316            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30317          fi
30318        else
30319          # Otherwise we believe it is a complete path. Use it as it is.
30320          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
30321$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
30322          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
30323$as_echo_n "checking for JAVAH... " >&6; }
30324          if test ! -x "$tool_specified"; then
30325            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30326$as_echo "not found" >&6; }
30327            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
30328          fi
30329          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30330$as_echo "$tool_specified" >&6; }
30331        fi
30332      fi
30333    fi
30334
30335  fi
30336
30337
30338
30339  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30340
30341  # Publish this variable in the help.
30342
30343
30344  if [ -z "${JAR+x}" ]; then
30345    # The variable is not set by user, try to locate tool using the code snippet
30346
30347      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30348$as_echo_n "checking for jar in Boot JDK... " >&6; }
30349      JAR=$BOOT_JDK/bin/jar
30350      if test ! -x $JAR; then
30351        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30352$as_echo "not found" >&6; }
30353        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30354$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30355        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30356      fi
30357      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30358$as_echo "ok" >&6; }
30359
30360
30361  else
30362    # The variable is set, but is it from the command line or the environment?
30363
30364    # Try to remove the string !JAR! from our list.
30365    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
30366    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30367      # If it failed, the variable was not from the command line. Ignore it,
30368      # but warn the user (except for BASH, which is always set by the calling BASH).
30369      if test "xJAR" != xBASH; then
30370        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
30371$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
30372      fi
30373      # Try to locate tool using the code snippet
30374
30375      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
30376$as_echo_n "checking for jar in Boot JDK... " >&6; }
30377      JAR=$BOOT_JDK/bin/jar
30378      if test ! -x $JAR; then
30379        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30380$as_echo "not found" >&6; }
30381        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30382$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30383        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
30384      fi
30385      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30386$as_echo "ok" >&6; }
30387
30388
30389    else
30390      # If it succeeded, then it was overridden by the user. We will use it
30391      # for the tool.
30392
30393      # First remove it from the list of overridden variables, so we can test
30394      # for unknown variables in the end.
30395      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30396
30397      # Check if we try to supply an empty value
30398      if test "x$JAR" = x; then
30399        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
30400$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
30401        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30402$as_echo_n "checking for JAR... " >&6; }
30403        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30404$as_echo "disabled" >&6; }
30405      else
30406        # Check if the provided tool contains a complete path.
30407        tool_specified="$JAR"
30408        tool_basename="${tool_specified##*/}"
30409        if test "x$tool_basename" = "x$tool_specified"; then
30410          # A command without a complete path is provided, search $PATH.
30411          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
30412$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
30413          # Extract the first word of "$tool_basename", so it can be a program name with args.
30414set dummy $tool_basename; ac_word=$2
30415{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30416$as_echo_n "checking for $ac_word... " >&6; }
30417if ${ac_cv_path_JAR+:} false; then :
30418  $as_echo_n "(cached) " >&6
30419else
30420  case $JAR in
30421  [\\/]* | ?:[\\/]*)
30422  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
30423  ;;
30424  *)
30425  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30426for as_dir in $PATH
30427do
30428  IFS=$as_save_IFS
30429  test -z "$as_dir" && as_dir=.
30430    for ac_exec_ext in '' $ac_executable_extensions; do
30431  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30432    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
30433    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30434    break 2
30435  fi
30436done
30437  done
30438IFS=$as_save_IFS
30439
30440  ;;
30441esac
30442fi
30443JAR=$ac_cv_path_JAR
30444if test -n "$JAR"; then
30445  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
30446$as_echo "$JAR" >&6; }
30447else
30448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30449$as_echo "no" >&6; }
30450fi
30451
30452
30453          if test "x$JAR" = x; then
30454            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30455          fi
30456        else
30457          # Otherwise we believe it is a complete path. Use it as it is.
30458          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
30459$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
30460          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
30461$as_echo_n "checking for JAR... " >&6; }
30462          if test ! -x "$tool_specified"; then
30463            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30464$as_echo "not found" >&6; }
30465            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
30466          fi
30467          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30468$as_echo "$tool_specified" >&6; }
30469        fi
30470      fi
30471    fi
30472
30473  fi
30474
30475
30476
30477  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
30478
30479  # Publish this variable in the help.
30480
30481
30482  if [ -z "${JARSIGNER+x}" ]; then
30483    # The variable is not set by user, try to locate tool using the code snippet
30484
30485      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30486$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30487      JARSIGNER=$BOOT_JDK/bin/jarsigner
30488      if test ! -x $JARSIGNER; then
30489        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30490$as_echo "not found" >&6; }
30491        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30492$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30493        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30494      fi
30495      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30496$as_echo "ok" >&6; }
30497
30498
30499  else
30500    # The variable is set, but is it from the command line or the environment?
30501
30502    # Try to remove the string !JARSIGNER! from our list.
30503    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30504    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30505      # If it failed, the variable was not from the command line. Ignore it,
30506      # but warn the user (except for BASH, which is always set by the calling BASH).
30507      if test "xJARSIGNER" != xBASH; then
30508        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30509$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30510      fi
30511      # Try to locate tool using the code snippet
30512
30513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30514$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30515      JARSIGNER=$BOOT_JDK/bin/jarsigner
30516      if test ! -x $JARSIGNER; then
30517        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30518$as_echo "not found" >&6; }
30519        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30520$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30521        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30522      fi
30523      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30524$as_echo "ok" >&6; }
30525
30526
30527    else
30528      # If it succeeded, then it was overridden by the user. We will use it
30529      # for the tool.
30530
30531      # First remove it from the list of overridden variables, so we can test
30532      # for unknown variables in the end.
30533      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30534
30535      # Check if we try to supply an empty value
30536      if test "x$JARSIGNER" = x; then
30537        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30538$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30539        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30540$as_echo_n "checking for JARSIGNER... " >&6; }
30541        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30542$as_echo "disabled" >&6; }
30543      else
30544        # Check if the provided tool contains a complete path.
30545        tool_specified="$JARSIGNER"
30546        tool_basename="${tool_specified##*/}"
30547        if test "x$tool_basename" = "x$tool_specified"; then
30548          # A command without a complete path is provided, search $PATH.
30549          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30550$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30551          # Extract the first word of "$tool_basename", so it can be a program name with args.
30552set dummy $tool_basename; ac_word=$2
30553{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30554$as_echo_n "checking for $ac_word... " >&6; }
30555if ${ac_cv_path_JARSIGNER+:} false; then :
30556  $as_echo_n "(cached) " >&6
30557else
30558  case $JARSIGNER in
30559  [\\/]* | ?:[\\/]*)
30560  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30561  ;;
30562  *)
30563  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30564for as_dir in $PATH
30565do
30566  IFS=$as_save_IFS
30567  test -z "$as_dir" && as_dir=.
30568    for ac_exec_ext in '' $ac_executable_extensions; do
30569  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30570    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30572    break 2
30573  fi
30574done
30575  done
30576IFS=$as_save_IFS
30577
30578  ;;
30579esac
30580fi
30581JARSIGNER=$ac_cv_path_JARSIGNER
30582if test -n "$JARSIGNER"; then
30583  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30584$as_echo "$JARSIGNER" >&6; }
30585else
30586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30587$as_echo "no" >&6; }
30588fi
30589
30590
30591          if test "x$JARSIGNER" = x; then
30592            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30593          fi
30594        else
30595          # Otherwise we believe it is a complete path. Use it as it is.
30596          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30597$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30598          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30599$as_echo_n "checking for JARSIGNER... " >&6; }
30600          if test ! -x "$tool_specified"; then
30601            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30602$as_echo "not found" >&6; }
30603            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30604          fi
30605          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30606$as_echo "$tool_specified" >&6; }
30607        fi
30608      fi
30609    fi
30610
30611  fi
30612
30613
30614
30615  # Finally, set some other options...
30616
30617  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30618  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30619
30620
30621
30622  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30623  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30624  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30625  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
30626  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
30627  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30628    dummy="$dummy -Xpatch:foo=bar"
30629    JVM_ARG_OK=true
30630  else
30631    $ECHO "Arg failed:" >&5
30632    $ECHO "$OUTPUT" >&5
30633    JVM_ARG_OK=false
30634  fi
30635
30636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30637$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30638  if test "x$JVM_ARG_OK" = "xtrue"; then
30639    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30640$as_echo "yes" >&6; }
30641    BOOT_JDK_MODULAR="true"
30642  else
30643    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30644$as_echo "no" >&6; }
30645    BOOT_JDK_MODULAR="false"
30646  fi
30647
30648
30649
30650
30651  # Check if the boot jdk is 32 or 64 bit
30652  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30653    BOOT_JDK_BITS="64"
30654  else
30655    BOOT_JDK_BITS="32"
30656  fi
30657  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30658$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30659  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30660$as_echo "$BOOT_JDK_BITS" >&6; }
30661
30662
30663
30664
30665# Check whether --with-build-jdk was given.
30666if test "${with_build_jdk+set}" = set; then :
30667  withval=$with_build_jdk;
30668fi
30669
30670
30671  CREATE_BUILDJDK=false
30672  EXTERNAL_BUILDJDK=false
30673  BUILD_JDK_FOUND="no"
30674  if test "x$with_build_jdk" != "x"; then
30675
30676  if test "x$BUILD_JDK_FOUND" = xno; then
30677    # Execute the test
30678
30679       if test "x$with_build_jdk" != x; then
30680         BUILD_JDK=$with_build_jdk
30681         BUILD_JDK_FOUND=maybe
30682         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30683$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30684       fi
30685
30686    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30687    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30688      # Do we have a bin/java?
30689      if test ! -x "$BUILD_JDK/bin/java"; then
30690        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30691$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30692        BUILD_JDK_FOUND=no
30693      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30694        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30695$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30696        BUILD_JDK_FOUND=no
30697      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30698        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30699$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30700        BUILD_JDK_FOUND=no
30701      elif test ! -x "$BUILD_JDK/bin/javac"; then
30702        # Do we have a bin/javac?
30703        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30704$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30705        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30706$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30707        BUILD_JDK_FOUND=no
30708      else
30709        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30710        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $HEAD -n 1`
30711
30712        # Extra M4 quote needed to protect [] in grep expression.
30713        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30714        if test "x$FOUND_CORRECT_VERSION" = x; then
30715          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30716$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30717          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30718$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30719          BUILD_JDK_FOUND=no
30720        else
30721          # We're done!
30722          BUILD_JDK_FOUND=yes
30723
30724  # Only process if variable expands to non-empty
30725
30726  if test "x$BUILD_JDK" != x; then
30727    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30728
30729  # Input might be given as Windows format, start by converting to
30730  # unix format.
30731  path="$BUILD_JDK"
30732  new_path=`$CYGPATH -u "$path"`
30733
30734  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30735  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30736  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30737  # "foo.exe" is OK but "foo" is an error.
30738  #
30739  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30740  # It is also a way to make sure we got the proper file name for the real test later on.
30741  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30742  if test "x$test_shortpath" = x; then
30743    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30744$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30745    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30746  fi
30747
30748  # Call helper function which possibly converts this using DOS-style short mode.
30749  # If so, the updated path is stored in $new_path.
30750
30751  input_path="$new_path"
30752  # Check if we need to convert this using DOS-style short mode. If the path
30753  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30754  # take no chances and rewrite it.
30755  # Note: m4 eats our [], so we need to use [ and ] instead.
30756  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30757  if test "x$has_forbidden_chars" != x; then
30758    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30759    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30760    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30761    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30762      # Going to short mode and back again did indeed matter. Since short mode is
30763      # case insensitive, let's make it lowercase to improve readability.
30764      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30765      # Now convert it back to Unix-style (cygpath)
30766      input_path=`$CYGPATH -u "$shortmode_path"`
30767      new_path="$input_path"
30768    fi
30769  fi
30770
30771  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30772  if test "x$test_cygdrive_prefix" = x; then
30773    # As a simple fix, exclude /usr/bin since it's not a real path.
30774    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30775      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30776      # a path prefixed by /cygdrive for fixpath to work.
30777      new_path="$CYGWIN_ROOT_PATH$input_path"
30778    fi
30779  fi
30780
30781
30782  if test "x$path" != "x$new_path"; then
30783    BUILD_JDK="$new_path"
30784    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30785$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30786  fi
30787
30788    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30789
30790  path="$BUILD_JDK"
30791  has_colon=`$ECHO $path | $GREP ^.:`
30792  new_path="$path"
30793  if test "x$has_colon" = x; then
30794    # Not in mixed or Windows style, start by that.
30795    new_path=`cmd //c echo $path`
30796  fi
30797
30798
30799  input_path="$new_path"
30800  # Check if we need to convert this using DOS-style short mode. If the path
30801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30802  # take no chances and rewrite it.
30803  # Note: m4 eats our [], so we need to use [ and ] instead.
30804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30805  if test "x$has_forbidden_chars" != x; then
30806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30807    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30808  fi
30809
30810
30811  windows_path="$new_path"
30812  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30813    unix_path=`$CYGPATH -u "$windows_path"`
30814    new_path="$unix_path"
30815  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30816    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30817    new_path="$unix_path"
30818  fi
30819
30820  if test "x$path" != "x$new_path"; then
30821    BUILD_JDK="$new_path"
30822    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30823$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30824  fi
30825
30826  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30827  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30828
30829    else
30830      # We're on a unix platform. Hooray! :)
30831      path="$BUILD_JDK"
30832      has_space=`$ECHO "$path" | $GREP " "`
30833      if test "x$has_space" != x; then
30834        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30835$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30836        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30837      fi
30838
30839      # Use eval to expand a potential ~
30840      eval path="$path"
30841      if test ! -f "$path" && test ! -d "$path"; then
30842        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30843      fi
30844
30845      if test -d "$path"; then
30846        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30847      else
30848        dir="`$DIRNAME "$path"`"
30849        base="`$BASENAME "$path"`"
30850        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30851      fi
30852    fi
30853  fi
30854
30855          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30856$as_echo_n "checking for Build JDK... " >&6; }
30857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30858$as_echo "$BUILD_JDK" >&6; }
30859          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30860$as_echo_n "checking Build JDK version... " >&6; }
30861          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30862          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30863$as_echo "$BUILD_JDK_VERSION" >&6; }
30864        fi # end check jdk version
30865      fi # end check java
30866    fi # end check build jdk found
30867  fi
30868
30869    EXTERNAL_BUILDJDK=true
30870  else
30871    if test "x$COMPILE_TYPE" = "xcross"; then
30872      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30873      BUILD_JDK_FOUND=yes
30874      CREATE_BUILDJDK=true
30875      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30876$as_echo_n "checking for Build JDK... " >&6; }
30877      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30878$as_echo "yes, will build it for the host platform" >&6; }
30879    else
30880      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30881      BUILD_JDK_FOUND=yes
30882      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30883$as_echo_n "checking for Build JDK... " >&6; }
30884      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30885$as_echo "yes, will use output dir" >&6; }
30886    fi
30887  fi
30888
30889  JMOD="$BUILD_JDK/bin/jmod"
30890  JLINK="$BUILD_JDK/bin/jlink"
30891
30892
30893
30894  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30895    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30896$as_echo_n "checking for Build JDK... " >&6; }
30897    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30898$as_echo "no" >&6; }
30899    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30900  fi
30901
30902
30903
30904
30905
30906
30907###############################################################################
30908#
30909# Configure the sources to use. We can add or override individual directories.
30910#
30911###############################################################################
30912
30913
30914  # Where are the sources.
30915  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30916  CORBA_TOPDIR="$SRC_ROOT/corba"
30917  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30918  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30919  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30920  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30921  JDK_TOPDIR="$SRC_ROOT/jdk"
30922
30923
30924
30925
30926
30927
30928
30929
30930
30931  # This feature is no longer supported.
30932
30933
30934
30935# Check whether --with-add-source-root was given.
30936if test "${with_add_source_root+set}" = set; then :
30937  withval=$with_add_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&5
30938$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30939fi
30940
30941
30942
30943
30944# Check whether --with-override-source-root was given.
30945if test "${with_override_source_root+set}" = set; then :
30946  withval=$with_override_source_root; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&5
30947$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30948fi
30949
30950
30951
30952
30953# Check whether --with-adds-and-overrides was given.
30954if test "${with_adds_and_overrides+set}" = set; then :
30955  withval=$with_adds_and_overrides; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&5
30956$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30957fi
30958
30959
30960
30961
30962# Check whether --with-override-langtools was given.
30963if test "${with_override_langtools+set}" = set; then :
30964  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30965$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30966fi
30967
30968
30969
30970
30971# Check whether --with-override-corba was given.
30972if test "${with_override_corba+set}" = set; then :
30973  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30974$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30975fi
30976
30977
30978
30979
30980# Check whether --with-override-jaxp was given.
30981if test "${with_override_jaxp+set}" = set; then :
30982  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30983$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30984fi
30985
30986
30987
30988
30989# Check whether --with-override-jaxws was given.
30990if test "${with_override_jaxws+set}" = set; then :
30991  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30992$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30993fi
30994
30995
30996
30997
30998# Check whether --with-override-hotspot was given.
30999if test "${with_override_hotspot+set}" = set; then :
31000  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
31001$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
31002fi
31003
31004
31005
31006
31007# Check whether --with-override-nashorn was given.
31008if test "${with_override_nashorn+set}" = set; then :
31009  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
31010$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
31011fi
31012
31013
31014
31015
31016# Check whether --with-override-jdk was given.
31017if test "${with_override_jdk+set}" = set; then :
31018  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
31019$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
31020fi
31021
31022
31023
31024
31025  BUILD_OUTPUT="$OUTPUT_ROOT"
31026
31027
31028  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
31029  BUILD_HOTSPOT=true
31030
31031
31032
31033# Check whether --with-import-hotspot was given.
31034if test "${with_import_hotspot+set}" = set; then :
31035  withval=$with_import_hotspot;
31036fi
31037
31038  if test "x$with_import_hotspot" != x; then
31039    CURDIR="$PWD"
31040    cd "$with_import_hotspot"
31041    HOTSPOT_DIST="`pwd`"
31042    cd "$CURDIR"
31043    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
31044      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
31045    fi
31046    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
31047$as_echo_n "checking if hotspot should be imported... " >&6; }
31048    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
31049$as_echo "yes from $HOTSPOT_DIST" >&6; }
31050    BUILD_HOTSPOT=false
31051  fi
31052
31053  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
31054
31055
31056
31057
31058# Check whether --with-import-modules was given.
31059if test "${with_import_modules+set}" = set; then :
31060  withval=$with_import_modules;
31061fi
31062
31063
31064  if test "x$with_import_modules" != x \
31065      && test "x$with_import_modules" != "xno"; then
31066    if test -d "$with_import_modules"; then
31067      IMPORT_MODULES_TOPDIR="$with_import_modules"
31068
31069  # Only process if variable expands to non-empty
31070
31071  if test "x$IMPORT_MODULES_TOPDIR" != x; then
31072    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31073
31074  # Input might be given as Windows format, start by converting to
31075  # unix format.
31076  path="$IMPORT_MODULES_TOPDIR"
31077  new_path=`$CYGPATH -u "$path"`
31078
31079  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31080  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31081  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31082  # "foo.exe" is OK but "foo" is an error.
31083  #
31084  # This test is therefore slightly more accurate than "test -f" to check for file precense.
31085  # It is also a way to make sure we got the proper file name for the real test later on.
31086  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31087  if test "x$test_shortpath" = x; then
31088    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31089$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31090    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
31091  fi
31092
31093  # Call helper function which possibly converts this using DOS-style short mode.
31094  # If so, the updated path is stored in $new_path.
31095
31096  input_path="$new_path"
31097  # Check if we need to convert this using DOS-style short mode. If the path
31098  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31099  # take no chances and rewrite it.
31100  # Note: m4 eats our [], so we need to use [ and ] instead.
31101  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31102  if test "x$has_forbidden_chars" != x; then
31103    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31104    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31105    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31106    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31107      # Going to short mode and back again did indeed matter. Since short mode is
31108      # case insensitive, let's make it lowercase to improve readability.
31109      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31110      # Now convert it back to Unix-style (cygpath)
31111      input_path=`$CYGPATH -u "$shortmode_path"`
31112      new_path="$input_path"
31113    fi
31114  fi
31115
31116  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31117  if test "x$test_cygdrive_prefix" = x; then
31118    # As a simple fix, exclude /usr/bin since it's not a real path.
31119    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
31120      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31121      # a path prefixed by /cygdrive for fixpath to work.
31122      new_path="$CYGWIN_ROOT_PATH$input_path"
31123    fi
31124  fi
31125
31126
31127  if test "x$path" != "x$new_path"; then
31128    IMPORT_MODULES_TOPDIR="$new_path"
31129    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31130$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31131  fi
31132
31133    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31134
31135  path="$IMPORT_MODULES_TOPDIR"
31136  has_colon=`$ECHO $path | $GREP ^.:`
31137  new_path="$path"
31138  if test "x$has_colon" = x; then
31139    # Not in mixed or Windows style, start by that.
31140    new_path=`cmd //c echo $path`
31141  fi
31142
31143
31144  input_path="$new_path"
31145  # Check if we need to convert this using DOS-style short mode. If the path
31146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31147  # take no chances and rewrite it.
31148  # Note: m4 eats our [], so we need to use [ and ] instead.
31149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31150  if test "x$has_forbidden_chars" != x; then
31151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31152    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31153  fi
31154
31155
31156  windows_path="$new_path"
31157  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31158    unix_path=`$CYGPATH -u "$windows_path"`
31159    new_path="$unix_path"
31160  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31161    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31162    new_path="$unix_path"
31163  fi
31164
31165  if test "x$path" != "x$new_path"; then
31166    IMPORT_MODULES_TOPDIR="$new_path"
31167    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
31168$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
31169  fi
31170
31171  # Save the first 10 bytes of this path to the storage, so fixpath can work.
31172  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31173
31174    else
31175      # We're on a unix platform. Hooray! :)
31176      path="$IMPORT_MODULES_TOPDIR"
31177      has_space=`$ECHO "$path" | $GREP " "`
31178      if test "x$has_space" != x; then
31179        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
31180$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
31181        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
31182      fi
31183
31184      # Use eval to expand a potential ~
31185      eval path="$path"
31186      if test ! -f "$path" && test ! -d "$path"; then
31187        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
31188      fi
31189
31190      if test -d "$path"; then
31191        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
31192      else
31193        dir="`$DIRNAME "$path"`"
31194        base="`$BASENAME "$path"`"
31195        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
31196      fi
31197    fi
31198  fi
31199
31200    elif test -e "$with_import_modules"; then
31201      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
31202      $RM -rf "$IMPORT_MODULES_TOPDIR"
31203      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
31204      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
31205        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31206      fi
31207    else
31208      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
31209    fi
31210  fi
31211
31212  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
31213    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
31214  fi
31215  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
31216    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
31217  fi
31218  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
31219    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
31220  fi
31221  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
31222    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
31223  fi
31224  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
31225    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
31226  fi
31227  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
31228    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
31229  fi
31230
31231
31232
31233
31234
31235
31236
31237
31238
31239###############################################################################
31240#
31241# Setup the toolchain (compilers etc), i.e. tools used to compile and process
31242# native code.
31243#
31244###############################################################################
31245
31246# See if we are doing a complete static build or not
31247
31248  # Check whether --enable-static-build was given.
31249if test "${enable_static_build+set}" = set; then :
31250  enableval=$enable_static_build;
31251fi
31252
31253  STATIC_BUILD=false
31254  if test "x$enable_static_build" = "xyes"; then
31255    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31256$as_echo_n "checking if static build is enabled... " >&6; }
31257    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31258$as_echo "yes" >&6; }
31259    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
31260      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
31261    fi
31262    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
31263    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
31264    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
31265    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31266    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
31267    STATIC_BUILD=true
31268  elif test "x$enable_static_build" = "xno"; then
31269    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
31270$as_echo_n "checking if static build is enabled... " >&6; }
31271    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31272$as_echo "no" >&6; }
31273  elif test "x$enable_static_build" != "x"; then
31274    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
31275  fi
31276
31277
31278
31279
31280# First determine the toolchain type (compiler family)
31281
31282
31283# Check whether --with-toolchain-type was given.
31284if test "${with_toolchain_type+set}" = set; then :
31285  withval=$with_toolchain_type;
31286fi
31287
31288
31289  # Use indirect variable referencing
31290  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
31291  VALID_TOOLCHAINS=${!toolchain_var_name}
31292
31293  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31294    if test -n "$XCODEBUILD"; then
31295      # On Mac OS X, default toolchain to clang after Xcode 5
31296      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
31297      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
31298      if test $? -ne 0; then
31299        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
31300      fi
31301      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
31302          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
31303          $CUT -f 1 -d .`
31304      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
31305$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
31306      if test $XCODE_MAJOR_VERSION -ge 5; then
31307          DEFAULT_TOOLCHAIN="clang"
31308      else
31309          DEFAULT_TOOLCHAIN="gcc"
31310      fi
31311    else
31312      # If Xcode is not installed, but the command line tools are
31313      # then we can't run xcodebuild. On these systems we should
31314      # default to clang
31315      DEFAULT_TOOLCHAIN="clang"
31316    fi
31317  else
31318    # First toolchain type in the list is the default
31319    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
31320  fi
31321
31322  if test "x$with_toolchain_type" = xlist; then
31323    # List all toolchains
31324    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
31325$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
31326    for toolchain in $VALID_TOOLCHAINS; do
31327      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
31328      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31329      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
31330    done
31331
31332    exit 0
31333  elif test "x$with_toolchain_type" != x; then
31334    # User override; check that it is valid
31335    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
31336      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
31337$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
31338      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
31339$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
31340      as_fn_error $? "Cannot continue." "$LINENO" 5
31341    fi
31342    TOOLCHAIN_TYPE=$with_toolchain_type
31343  else
31344    # No flag given, use default
31345    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
31346  fi
31347
31348
31349  TOOLCHAIN_CC_BINARY_clang="clang"
31350  TOOLCHAIN_CC_BINARY_gcc="gcc"
31351  TOOLCHAIN_CC_BINARY_microsoft="cl"
31352  TOOLCHAIN_CC_BINARY_solstudio="cc"
31353  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
31354
31355  TOOLCHAIN_CXX_BINARY_clang="clang++"
31356  TOOLCHAIN_CXX_BINARY_gcc="g++"
31357  TOOLCHAIN_CXX_BINARY_microsoft="cl"
31358  TOOLCHAIN_CXX_BINARY_solstudio="CC"
31359  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
31360
31361  # Use indirect variable referencing
31362  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
31363  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
31364  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
31365  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
31366  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
31367  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
31368  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
31369  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
31370
31371
31372  # Define filename patterns
31373  if test "x$OPENJDK_TARGET_OS" = xwindows; then
31374    LIBRARY_PREFIX=
31375    SHARED_LIBRARY_SUFFIX='.dll'
31376    STATIC_LIBRARY_SUFFIX='.lib'
31377    SHARED_LIBRARY='$1.dll'
31378    STATIC_LIBRARY='$1.lib'
31379    OBJ_SUFFIX='.obj'
31380    EXE_SUFFIX='.exe'
31381  else
31382    LIBRARY_PREFIX=lib
31383    SHARED_LIBRARY_SUFFIX='.so'
31384    STATIC_LIBRARY_SUFFIX='.a'
31385    SHARED_LIBRARY='lib$1.so'
31386    STATIC_LIBRARY='lib$1.a'
31387    OBJ_SUFFIX='.o'
31388    EXE_SUFFIX=''
31389    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31390      # For full static builds, we're overloading the SHARED_LIBRARY
31391      # variables in order to limit the amount of changes required.
31392      # It would be better to remove SHARED and just use LIBRARY and
31393      # LIBRARY_SUFFIX for libraries that can be built either
31394      # shared or static and use STATIC_* for libraries that are
31395      # always built statically.
31396      if test "x$STATIC_BUILD" = xtrue; then
31397        SHARED_LIBRARY='lib$1.a'
31398        SHARED_LIBRARY_SUFFIX='.a'
31399      else
31400        SHARED_LIBRARY='lib$1.dylib'
31401        SHARED_LIBRARY_SUFFIX='.dylib'
31402      fi
31403    fi
31404  fi
31405
31406
31407
31408
31409
31410
31411
31412
31413
31414
31415  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
31416    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
31417$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
31418  else
31419    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
31420$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
31421  fi
31422
31423
31424# User supplied flags should be used when configure detects compilers
31425
31426  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
31427    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
31428$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
31429  fi
31430
31431  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
31432    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
31433$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
31434  fi
31435
31436  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
31437    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
31438$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
31439  fi
31440
31441
31442# Check whether --with-extra-cflags was given.
31443if test "${with_extra_cflags+set}" = set; then :
31444  withval=$with_extra_cflags;
31445fi
31446
31447
31448
31449# Check whether --with-extra-cxxflags was given.
31450if test "${with_extra_cxxflags+set}" = set; then :
31451  withval=$with_extra_cxxflags;
31452fi
31453
31454
31455
31456# Check whether --with-extra-ldflags was given.
31457if test "${with_extra_ldflags+set}" = set; then :
31458  withval=$with_extra_ldflags;
31459fi
31460
31461
31462  EXTRA_CFLAGS="$with_extra_cflags"
31463  EXTRA_CXXFLAGS="$with_extra_cxxflags"
31464  EXTRA_LDFLAGS="$with_extra_ldflags"
31465
31466  # Hotspot needs these set in their legacy form
31467  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
31468  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
31469  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
31470
31471
31472
31473
31474
31475
31476
31477
31478
31479  # The global CFLAGS and LDLAGS variables are used by configure tests and
31480  # should include the extra parameters
31481  CFLAGS="$EXTRA_CFLAGS"
31482  CXXFLAGS="$EXTRA_CXXFLAGS"
31483  LDFLAGS="$EXTRA_LDFLAGS"
31484  CPPFLAGS=""
31485
31486# The sysroot cflags are needed for configure to be able to run the compilers
31487
31488  if test "x$SYSROOT" != "x"; then
31489    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
31490      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31491        # Solaris Studio does not have a concept of sysroot. Instead we must
31492        # make sure the default include and lib dirs are appended to each
31493        # compile and link command line. Must also add -I-xbuiltin to enable
31494        # inlining of system functions and intrinsics.
31495        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31496        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31497            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31498            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31499      fi
31500    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31501      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31502      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31503    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31504      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31505      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31506    fi
31507    # Propagate the sysroot args to hotspot
31508    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31509    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31510    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31511    # The global CFLAGS and LDFLAGS variables need these for configure to function
31512    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31513    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31514    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31515    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31516  fi
31517
31518  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31519    # We also need -iframework<path>/System/Library/Frameworks
31520    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31521    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31522    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31523    # set this here so it doesn't have to be peppered throughout the forest
31524    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31525    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31526  fi
31527
31528
31529
31530
31531
31532# Then detect the actual binaries needed
31533
31534  # FIXME: Is this needed?
31535  ac_ext=cpp
31536ac_cpp='$CXXCPP $CPPFLAGS'
31537ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31538ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31539ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31540
31541
31542  # Store the CFLAGS etc passed to the configure script.
31543  ORG_CFLAGS="$CFLAGS"
31544  ORG_CXXFLAGS="$CXXFLAGS"
31545
31546  # autoconf magic only relies on PATH, so update it if tools dir is specified
31547  OLD_PATH="$PATH"
31548
31549  # On Windows, we need to detect the visual studio installation first.
31550  # This will change the PATH, but we need to keep that new PATH even
31551  # after toolchain detection is done, since the compiler (on x86) uses
31552  # it for DLL resolution in runtime.
31553  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31554      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31555
31556  # Store path to cygwin link.exe to help excluding it when searching for
31557  # VS linker. This must be done before changing the PATH when looking for VS.
31558  # Extract the first word of "link", so it can be a program name with args.
31559set dummy link; ac_word=$2
31560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31561$as_echo_n "checking for $ac_word... " >&6; }
31562if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31563  $as_echo_n "(cached) " >&6
31564else
31565  case $CYGWIN_LINK in
31566  [\\/]* | ?:[\\/]*)
31567  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31568  ;;
31569  *)
31570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31571for as_dir in $PATH
31572do
31573  IFS=$as_save_IFS
31574  test -z "$as_dir" && as_dir=.
31575    for ac_exec_ext in '' $ac_executable_extensions; do
31576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31577    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31579    break 2
31580  fi
31581done
31582  done
31583IFS=$as_save_IFS
31584
31585  ;;
31586esac
31587fi
31588CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31589if test -n "$CYGWIN_LINK"; then
31590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31591$as_echo "$CYGWIN_LINK" >&6; }
31592else
31593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31594$as_echo "no" >&6; }
31595fi
31596
31597
31598  if test "x$CYGWIN_LINK" != x; then
31599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31600$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31601    "$CYGWIN_LINK" --version > /dev/null
31602    if test $? -eq 0 ; then
31603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31604$as_echo "yes" >&6; }
31605    else
31606      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31607$as_echo "no" >&6; }
31608      # This might be the VS linker. Don't exclude it later on.
31609      CYGWIN_LINK=""
31610    fi
31611  fi
31612
31613  # First-hand choice is to locate and run the vsvars bat file.
31614
31615
31616# Check whether --with-toolchain-version was given.
31617if test "${with_toolchain_version+set}" = set; then :
31618  withval=$with_toolchain_version;
31619fi
31620
31621
31622  if test "x$with_toolchain_version" = xlist; then
31623    # List all toolchains
31624    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31625$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31626    for version in $VALID_VS_VERSIONS; do
31627      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31628      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31629    done
31630
31631    exit 0
31632  elif test "x$DEVKIT_VS_VERSION" != x; then
31633    VS_VERSION=$DEVKIT_VS_VERSION
31634    TOOLCHAIN_VERSION=$VS_VERSION
31635    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31636    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31637    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31638    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31639    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31640    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31641
31642    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31643    # can still be exported as INCLUDE for compiler invocations without
31644    # SYSROOT_CFLAGS
31645    OLDIFS="$IFS"
31646    IFS=";"
31647    for i in $DEVKIT_VS_INCLUDE; do
31648      ipath=$i
31649
31650  unix_path="$ipath"
31651  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31652    windows_path=`$CYGPATH -m "$unix_path"`
31653    ipath="$windows_path"
31654  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31655    windows_path=`cmd //c echo $unix_path`
31656    ipath="$windows_path"
31657  fi
31658
31659      VS_INCLUDE="$VS_INCLUDE;$ipath"
31660    done
31661    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31662    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31663    for i in $DEVKIT_VS_LIB; do
31664      libpath=$i
31665
31666  unix_path="$libpath"
31667  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31668    windows_path=`$CYGPATH -m "$unix_path"`
31669    libpath="$windows_path"
31670  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31671    windows_path=`cmd //c echo $unix_path`
31672    libpath="$windows_path"
31673  fi
31674
31675      VS_LIB="$VS_LIB;$libpath"
31676    done
31677    IFS="$OLDIFS"
31678
31679    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31680$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31681
31682  elif test "x$with_toolchain_version" != x; then
31683    # User override; check that it is valid
31684    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31685      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31686$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31687      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31688$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31689      as_fn_error $? "Cannot continue." "$LINENO" 5
31690    fi
31691    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31692  else
31693    # No flag given, use default
31694    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31695  fi
31696
31697  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31698
31699  VS_VERSION="$VS_VERSION"
31700  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31701  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31702  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31703  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31704
31705  # When using --with-tools-dir, assume it points to the correct and default
31706  # version of Visual Studio or that --with-toolchain-version was also set.
31707  if test "x$with_tools_dir" != x; then
31708
31709  if test "x$VS_ENV_CMD" = x; then
31710    VS_VERSION="${VS_VERSION}"
31711    VS_BASE="$with_tools_dir/../.."
31712    METHOD="--with-tools-dir"
31713
31714    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31715      VCVARSFILE="vc/bin/vcvars32.bat"
31716    else
31717      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31718    fi
31719
31720
31721  windows_path="$VS_BASE"
31722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31723    unix_path=`$CYGPATH -u "$windows_path"`
31724    VS_BASE="$unix_path"
31725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31727    VS_BASE="$unix_path"
31728  fi
31729
31730    if test -d "$VS_BASE"; then
31731      if test -f "$VS_BASE/$VCVARSFILE"; then
31732        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31733$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31734        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31735        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31736        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31737        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31738      else
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31740$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31742$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31743      fi
31744    fi
31745  fi
31746
31747
31748  if test "x$VS_ENV_CMD" = x; then
31749    VS_VERSION="${VS_VERSION}"
31750    VS_BASE="$with_tools_dir/../../.."
31751    METHOD="--with-tools-dir"
31752
31753    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31754      VCVARSFILE="vc/bin/vcvars32.bat"
31755    else
31756      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31757    fi
31758
31759
31760  windows_path="$VS_BASE"
31761  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31762    unix_path=`$CYGPATH -u "$windows_path"`
31763    VS_BASE="$unix_path"
31764  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31765    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31766    VS_BASE="$unix_path"
31767  fi
31768
31769    if test -d "$VS_BASE"; then
31770      if test -f "$VS_BASE/$VCVARSFILE"; then
31771        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31772$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31773        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31774        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31775        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31776        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31777      else
31778        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31779$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31780        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31781$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31782      fi
31783    fi
31784  fi
31785
31786    if test "x$VS_ENV_CMD" = x; then
31787      # Having specified an argument which is incorrect will produce an instant failure;
31788      # we should not go on looking
31789      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31790$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31791      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31792$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31793      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31794$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31795      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31796    fi
31797  fi
31798
31799  VS_ENV_CMD=""
31800  VS_ENV_ARGS=""
31801
31802  if test "x$VS_COMNTOOLS" != x; then
31803
31804  if test "x$VS_ENV_CMD" = x; then
31805    VS_VERSION="${VS_VERSION}"
31806    VS_BASE="$VS_COMNTOOLS/../.."
31807    METHOD="$VS_COMNTOOLS_VAR variable"
31808
31809    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31810      VCVARSFILE="vc/bin/vcvars32.bat"
31811    else
31812      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31813    fi
31814
31815
31816  windows_path="$VS_BASE"
31817  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31818    unix_path=`$CYGPATH -u "$windows_path"`
31819    VS_BASE="$unix_path"
31820  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31821    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31822    VS_BASE="$unix_path"
31823  fi
31824
31825    if test -d "$VS_BASE"; then
31826      if test -f "$VS_BASE/$VCVARSFILE"; then
31827        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31828$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31829        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31830        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31831        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31832        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31833      else
31834        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31835$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31836        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31837$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31838      fi
31839    fi
31840  fi
31841
31842  fi
31843  if test "x$PROGRAMFILES" != x; then
31844
31845  if test "x$VS_ENV_CMD" = x; then
31846    VS_VERSION="${VS_VERSION}"
31847    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31848    METHOD="well-known name"
31849
31850    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31851      VCVARSFILE="vc/bin/vcvars32.bat"
31852    else
31853      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31854    fi
31855
31856
31857  windows_path="$VS_BASE"
31858  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31859    unix_path=`$CYGPATH -u "$windows_path"`
31860    VS_BASE="$unix_path"
31861  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31862    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31863    VS_BASE="$unix_path"
31864  fi
31865
31866    if test -d "$VS_BASE"; then
31867      if test -f "$VS_BASE/$VCVARSFILE"; then
31868        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31869$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31870        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31871        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31872        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31873        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31874      else
31875        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31876$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31877        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31878$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31879      fi
31880    fi
31881  fi
31882
31883  fi
31884  # Work around the insanely named ProgramFiles(x86) env variable
31885  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31886  if test "x$PROGRAMFILES_X86" != x; then
31887
31888  if test "x$VS_ENV_CMD" = x; then
31889    VS_VERSION="${VS_VERSION}"
31890    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31891    METHOD="well-known name"
31892
31893    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31894      VCVARSFILE="vc/bin/vcvars32.bat"
31895    else
31896      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31897    fi
31898
31899
31900  windows_path="$VS_BASE"
31901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31902    unix_path=`$CYGPATH -u "$windows_path"`
31903    VS_BASE="$unix_path"
31904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31906    VS_BASE="$unix_path"
31907  fi
31908
31909    if test -d "$VS_BASE"; then
31910      if test -f "$VS_BASE/$VCVARSFILE"; then
31911        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31912$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31913        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31914        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31915        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31916        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31917      else
31918        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31919$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31920        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31921$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31922      fi
31923    fi
31924  fi
31925
31926  fi
31927
31928  if test "x$VS_ENV_CMD" = x; then
31929    VS_VERSION="${VS_VERSION}"
31930    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31931    METHOD="well-known name"
31932
31933    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31934      VCVARSFILE="vc/bin/vcvars32.bat"
31935    else
31936      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31937    fi
31938
31939
31940  windows_path="$VS_BASE"
31941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31942    unix_path=`$CYGPATH -u "$windows_path"`
31943    VS_BASE="$unix_path"
31944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31946    VS_BASE="$unix_path"
31947  fi
31948
31949    if test -d "$VS_BASE"; then
31950      if test -f "$VS_BASE/$VCVARSFILE"; then
31951        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31952$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31953        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31954        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31955        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31956        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31957      else
31958        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31959$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31960        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31961$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31962      fi
31963    fi
31964  fi
31965
31966
31967  if test "x$VS_ENV_CMD" = x; then
31968    VS_VERSION="${VS_VERSION}"
31969    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31970    METHOD="well-known name"
31971
31972    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31973      VCVARSFILE="vc/bin/vcvars32.bat"
31974    else
31975      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31976    fi
31977
31978
31979  windows_path="$VS_BASE"
31980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31981    unix_path=`$CYGPATH -u "$windows_path"`
31982    VS_BASE="$unix_path"
31983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31985    VS_BASE="$unix_path"
31986  fi
31987
31988    if test -d "$VS_BASE"; then
31989      if test -f "$VS_BASE/$VCVARSFILE"; then
31990        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31991$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31992        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31993        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31994        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31995        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31996      else
31997        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31998$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31999        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
32000$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
32001      fi
32002    fi
32003  fi
32004
32005
32006  if test "x$SDK_INSTALL_DIR" != x; then
32007    if test "x$ProgramW6432" != x; then
32008
32009  if test "x$VS_ENV_CMD" = x; then
32010    VS_VERSION="${VS_VERSION}"
32011    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
32012    METHOD="well-known name"
32013
32014  windows_path="$WIN_SDK_BASE"
32015  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32016    unix_path=`$CYGPATH -u "$windows_path"`
32017    WIN_SDK_BASE="$unix_path"
32018  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32019    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32020    WIN_SDK_BASE="$unix_path"
32021  fi
32022
32023    if test -d "$WIN_SDK_BASE"; then
32024      # There have been cases of partial or broken SDK installations. A missing
32025      # lib dir is not going to work.
32026      if test ! -d "$WIN_SDK_BASE/lib"; then
32027        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32028$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32029        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32030$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32031      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32032        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32033$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32034        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32035        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32036          VS_ENV_ARGS="/x86"
32037        else
32038          VS_ENV_ARGS="/x64"
32039        fi
32040        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32041        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32042        # TODO: improve detection for other versions of SDK
32043        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32044      else
32045        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32046$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32047        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32048$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32049      fi
32050    fi
32051  fi
32052
32053    fi
32054    if test "x$PROGRAMW6432" != x; then
32055
32056  if test "x$VS_ENV_CMD" = x; then
32057    VS_VERSION="${VS_VERSION}"
32058    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
32059    METHOD="well-known name"
32060
32061  windows_path="$WIN_SDK_BASE"
32062  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32063    unix_path=`$CYGPATH -u "$windows_path"`
32064    WIN_SDK_BASE="$unix_path"
32065  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32066    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32067    WIN_SDK_BASE="$unix_path"
32068  fi
32069
32070    if test -d "$WIN_SDK_BASE"; then
32071      # There have been cases of partial or broken SDK installations. A missing
32072      # lib dir is not going to work.
32073      if test ! -d "$WIN_SDK_BASE/lib"; then
32074        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32075$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32076        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32077$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32078      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32079        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32080$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32081        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32082        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32083          VS_ENV_ARGS="/x86"
32084        else
32085          VS_ENV_ARGS="/x64"
32086        fi
32087        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32088        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32089        # TODO: improve detection for other versions of SDK
32090        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32091      else
32092        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32093$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32094        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32095$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32096      fi
32097    fi
32098  fi
32099
32100    fi
32101    if test "x$PROGRAMFILES" != x; then
32102
32103  if test "x$VS_ENV_CMD" = x; then
32104    VS_VERSION="${VS_VERSION}"
32105    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
32106    METHOD="well-known name"
32107
32108  windows_path="$WIN_SDK_BASE"
32109  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32110    unix_path=`$CYGPATH -u "$windows_path"`
32111    WIN_SDK_BASE="$unix_path"
32112  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32113    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32114    WIN_SDK_BASE="$unix_path"
32115  fi
32116
32117    if test -d "$WIN_SDK_BASE"; then
32118      # There have been cases of partial or broken SDK installations. A missing
32119      # lib dir is not going to work.
32120      if test ! -d "$WIN_SDK_BASE/lib"; then
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32122$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32124$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32125      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32126        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32127$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32128        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32129        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32130          VS_ENV_ARGS="/x86"
32131        else
32132          VS_ENV_ARGS="/x64"
32133        fi
32134        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32135        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32136        # TODO: improve detection for other versions of SDK
32137        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32138      else
32139        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32140$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32141        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32142$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32143      fi
32144    fi
32145  fi
32146
32147    fi
32148
32149  if test "x$VS_ENV_CMD" = x; then
32150    VS_VERSION="${VS_VERSION}"
32151    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
32152    METHOD="well-known name"
32153
32154  windows_path="$WIN_SDK_BASE"
32155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32156    unix_path=`$CYGPATH -u "$windows_path"`
32157    WIN_SDK_BASE="$unix_path"
32158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32160    WIN_SDK_BASE="$unix_path"
32161  fi
32162
32163    if test -d "$WIN_SDK_BASE"; then
32164      # There have been cases of partial or broken SDK installations. A missing
32165      # lib dir is not going to work.
32166      if test ! -d "$WIN_SDK_BASE/lib"; then
32167        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32168$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32169        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32170$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32171      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32172        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32173$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32174        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32175        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32176          VS_ENV_ARGS="/x86"
32177        else
32178          VS_ENV_ARGS="/x64"
32179        fi
32180        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32181        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32182        # TODO: improve detection for other versions of SDK
32183        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32184      else
32185        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32186$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32187        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32188$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32189      fi
32190    fi
32191  fi
32192
32193
32194  if test "x$VS_ENV_CMD" = x; then
32195    VS_VERSION="${VS_VERSION}"
32196    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
32197    METHOD="well-known name"
32198
32199  windows_path="$WIN_SDK_BASE"
32200  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32201    unix_path=`$CYGPATH -u "$windows_path"`
32202    WIN_SDK_BASE="$unix_path"
32203  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32204    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32205    WIN_SDK_BASE="$unix_path"
32206  fi
32207
32208    if test -d "$WIN_SDK_BASE"; then
32209      # There have been cases of partial or broken SDK installations. A missing
32210      # lib dir is not going to work.
32211      if test ! -d "$WIN_SDK_BASE/lib"; then
32212        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32213$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32214        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
32215$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
32216      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
32217        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32218$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32219        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
32220        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
32221          VS_ENV_ARGS="/x86"
32222        else
32223          VS_ENV_ARGS="/x64"
32224        fi
32225        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
32226        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
32227        # TODO: improve detection for other versions of SDK
32228        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
32229      else
32230        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
32231$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
32232        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
32233$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
32234      fi
32235    fi
32236  fi
32237
32238  fi
32239
32240    if test "x$VS_ENV_CMD" != x; then
32241      TOOLCHAIN_VERSION=$VS_VERSION
32242      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
32243      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
32244      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
32245      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
32246      # The rest of the variables are already evaled while probing
32247      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
32248$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
32249      break
32250    fi
32251  done
32252
32253
32254  # If we have a devkit, skip all of the below.
32255  if test "x$DEVKIT_VS_VERSION" = x; then
32256    if test "x$VS_ENV_CMD" != x; then
32257      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
32258
32259  # Only process if variable expands to non-empty
32260
32261  if test "x$VS_ENV_CMD" != x; then
32262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32263
32264  # First separate the path from the arguments. This will split at the first
32265  # space.
32266  complete="$VS_ENV_CMD"
32267  path="${complete%% *}"
32268  tmp="$complete EOL"
32269  arguments="${tmp#* }"
32270
32271  # Input might be given as Windows format, start by converting to
32272  # unix format.
32273  new_path=`$CYGPATH -u "$path"`
32274
32275  # Now try to locate executable using which
32276  new_path=`$WHICH "$new_path" 2> /dev/null`
32277  # bat and cmd files are not always considered executable in cygwin causing which
32278  # to not find them
32279  if test "x$new_path" = x \
32280      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32281      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32282    new_path=`$CYGPATH -u "$path"`
32283  fi
32284  if test "x$new_path" = x; then
32285    # Oops. Which didn't find the executable.
32286    # The splitting of arguments from the executable at a space might have been incorrect,
32287    # since paths with space are more likely in Windows. Give it another try with the whole
32288    # argument.
32289    path="$complete"
32290    arguments="EOL"
32291    new_path=`$CYGPATH -u "$path"`
32292    new_path=`$WHICH "$new_path" 2> /dev/null`
32293    # bat and cmd files are not always considered executable in cygwin causing which
32294    # to not find them
32295    if test "x$new_path" = x \
32296        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32297        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32298      new_path=`$CYGPATH -u "$path"`
32299    fi
32300    if test "x$new_path" = x; then
32301      # It's still not found. Now this is an unrecoverable error.
32302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32303$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32304      has_space=`$ECHO "$complete" | $GREP " "`
32305      if test "x$has_space" != x; then
32306        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32307$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32308      fi
32309      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32310    fi
32311  fi
32312
32313  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32314  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32315  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32316  # "foo.exe" is OK but "foo" is an error.
32317  #
32318  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32319  # It is also a way to make sure we got the proper file name for the real test later on.
32320  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32321  if test "x$test_shortpath" = x; then
32322    # Short path failed, file does not exist as specified.
32323    # Try adding .exe or .cmd
32324    if test -f "${new_path}.exe"; then
32325      input_to_shortpath="${new_path}.exe"
32326    elif test -f "${new_path}.cmd"; then
32327      input_to_shortpath="${new_path}.cmd"
32328    else
32329      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
32330$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
32331      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32332$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32333      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32334    fi
32335  else
32336    input_to_shortpath="$new_path"
32337  fi
32338
32339  # Call helper function which possibly converts this using DOS-style short mode.
32340  # If so, the updated path is stored in $new_path.
32341  new_path="$input_to_shortpath"
32342
32343  input_path="$input_to_shortpath"
32344  # Check if we need to convert this using DOS-style short mode. If the path
32345  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32346  # take no chances and rewrite it.
32347  # Note: m4 eats our [], so we need to use [ and ] instead.
32348  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32349  if test "x$has_forbidden_chars" != x; then
32350    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32351    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32352    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32353    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32354      # Going to short mode and back again did indeed matter. Since short mode is
32355      # case insensitive, let's make it lowercase to improve readability.
32356      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32357      # Now convert it back to Unix-style (cygpath)
32358      input_path=`$CYGPATH -u "$shortmode_path"`
32359      new_path="$input_path"
32360    fi
32361  fi
32362
32363  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32364  if test "x$test_cygdrive_prefix" = x; then
32365    # As a simple fix, exclude /usr/bin since it's not a real path.
32366    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32367      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32368      # a path prefixed by /cygdrive for fixpath to work.
32369      new_path="$CYGWIN_ROOT_PATH$input_path"
32370    fi
32371  fi
32372
32373  # remove trailing .exe if any
32374  new_path="${new_path/%.exe/}"
32375
32376    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32377
32378  # First separate the path from the arguments. This will split at the first
32379  # space.
32380  complete="$VS_ENV_CMD"
32381  path="${complete%% *}"
32382  tmp="$complete EOL"
32383  arguments="${tmp#* }"
32384
32385  # Input might be given as Windows format, start by converting to
32386  # unix format.
32387  new_path="$path"
32388
32389  windows_path="$new_path"
32390  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32391    unix_path=`$CYGPATH -u "$windows_path"`
32392    new_path="$unix_path"
32393  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32394    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32395    new_path="$unix_path"
32396  fi
32397
32398
32399  # Now try to locate executable using which
32400  new_path=`$WHICH "$new_path" 2> /dev/null`
32401
32402  if test "x$new_path" = x; then
32403    # Oops. Which didn't find the executable.
32404    # The splitting of arguments from the executable at a space might have been incorrect,
32405    # since paths with space are more likely in Windows. Give it another try with the whole
32406    # argument.
32407    path="$complete"
32408    arguments="EOL"
32409    new_path="$path"
32410
32411  windows_path="$new_path"
32412  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32413    unix_path=`$CYGPATH -u "$windows_path"`
32414    new_path="$unix_path"
32415  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32416    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32417    new_path="$unix_path"
32418  fi
32419
32420
32421    new_path=`$WHICH "$new_path" 2> /dev/null`
32422    # bat and cmd files are not always considered executable in MSYS causing which
32423    # to not find them
32424    if test "x$new_path" = x \
32425        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32426        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32427      new_path="$path"
32428
32429  windows_path="$new_path"
32430  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32431    unix_path=`$CYGPATH -u "$windows_path"`
32432    new_path="$unix_path"
32433  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32434    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32435    new_path="$unix_path"
32436  fi
32437
32438    fi
32439
32440    if test "x$new_path" = x; then
32441      # It's still not found. Now this is an unrecoverable error.
32442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32443$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32444      has_space=`$ECHO "$complete" | $GREP " "`
32445      if test "x$has_space" != x; then
32446        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32447$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32448      fi
32449      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32450    fi
32451  fi
32452
32453  # Now new_path has a complete unix path to the binary
32454  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32455    # Keep paths in /bin as-is, but remove trailing .exe if any
32456    new_path="${new_path/%.exe/}"
32457    # Do not save /bin paths to all_fixpath_prefixes!
32458  else
32459    # Not in mixed or Windows style, start by that.
32460    new_path=`cmd //c echo $new_path`
32461
32462  input_path="$new_path"
32463  # Check if we need to convert this using DOS-style short mode. If the path
32464  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32465  # take no chances and rewrite it.
32466  # Note: m4 eats our [], so we need to use [ and ] instead.
32467  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32468  if test "x$has_forbidden_chars" != x; then
32469    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32470    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32471  fi
32472
32473    # Output is in $new_path
32474
32475  windows_path="$new_path"
32476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32477    unix_path=`$CYGPATH -u "$windows_path"`
32478    new_path="$unix_path"
32479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32481    new_path="$unix_path"
32482  fi
32483
32484    # remove trailing .exe if any
32485    new_path="${new_path/%.exe/}"
32486
32487    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32488    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32489  fi
32490
32491    else
32492      # We're on a unix platform. Hooray! :)
32493      # First separate the path from the arguments. This will split at the first
32494      # space.
32495      complete="$VS_ENV_CMD"
32496      path="${complete%% *}"
32497      tmp="$complete EOL"
32498      arguments="${tmp#* }"
32499
32500      # Cannot rely on the command "which" here since it doesn't always work.
32501      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32502      if test -z "$is_absolute_path"; then
32503        # Path to executable is not absolute. Find it.
32504        IFS_save="$IFS"
32505        IFS=:
32506        for p in $PATH; do
32507          if test -f "$p/$path" && test -x "$p/$path"; then
32508            new_path="$p/$path"
32509            break
32510          fi
32511        done
32512        IFS="$IFS_save"
32513      else
32514        # This is an absolute path, we can use it without further modifications.
32515        new_path="$path"
32516      fi
32517
32518      if test "x$new_path" = x; then
32519        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32520$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32521        has_space=`$ECHO "$complete" | $GREP " "`
32522        if test "x$has_space" != x; then
32523          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32524$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32525        fi
32526        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32527      fi
32528    fi
32529
32530    # Now join together the path and the arguments once again
32531    if test "x$arguments" != xEOL; then
32532      new_complete="$new_path ${arguments% *}"
32533    else
32534      new_complete="$new_path"
32535    fi
32536
32537    if test "x$complete" != "x$new_complete"; then
32538      VS_ENV_CMD="$new_complete"
32539      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32540$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32541    fi
32542  fi
32543
32544
32545      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32546      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32547$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32548
32549      # We need to create a couple of temporary files.
32550      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32551      $MKDIR -p $VS_ENV_TMP_DIR
32552
32553      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32554      # Instead create a shell script which will set the relevant variables when run.
32555      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32556
32557  unix_path="$WINPATH_VS_ENV_CMD"
32558  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32559    windows_path=`$CYGPATH -m "$unix_path"`
32560    WINPATH_VS_ENV_CMD="$windows_path"
32561  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32562    windows_path=`cmd //c echo $unix_path`
32563    WINPATH_VS_ENV_CMD="$windows_path"
32564  fi
32565
32566      WINPATH_BASH="$BASH"
32567
32568  unix_path="$WINPATH_BASH"
32569  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32570    windows_path=`$CYGPATH -m "$unix_path"`
32571    WINPATH_BASH="$windows_path"
32572  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32573    windows_path=`cmd //c echo $unix_path`
32574    WINPATH_BASH="$windows_path"
32575  fi
32576
32577
32578      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32579      # script (executable by bash) that will setup the important variables.
32580      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32581      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32582      # This will end up something like:
32583      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32584      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32585      # These will end up something like:
32586      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32587      # The trailing space for everyone except PATH is no typo, but is needed due
32588      # to trailing \ in the Windows paths. These will be stripped later.
32589      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32590          >> $EXTRACT_VC_ENV_BAT_FILE
32591      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32592          >> $EXTRACT_VC_ENV_BAT_FILE
32593      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32594          >> $EXTRACT_VC_ENV_BAT_FILE
32595      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32596          >> $EXTRACT_VC_ENV_BAT_FILE
32597      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32598          >> $EXTRACT_VC_ENV_BAT_FILE
32599      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32600          >> $EXTRACT_VC_ENV_BAT_FILE
32601
32602      # Now execute the newly created bat file.
32603      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32604      # Change directory so we don't need to mess with Windows paths in redirects.
32605      cd $VS_ENV_TMP_DIR
32606      cmd /c extract-vs-env.bat | $CAT
32607      cd $CURDIR
32608
32609      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32610        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32611$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32612        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32613$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32614        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32615$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32616        as_fn_error $? "Cannot continue" "$LINENO" 5
32617      fi
32618
32619      # Now set all paths and other env variables. This will allow the rest of
32620      # the configure script to find and run the compiler in the proper way.
32621      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32622$as_echo "$as_me: Setting extracted environment variables" >&6;}
32623      . $VS_ENV_TMP_DIR/set-vs-env.sh
32624      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32625      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32626    else
32627      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32628      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32629$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32630    fi
32631  fi
32632
32633  # At this point, we should have correct variables in the environment, or we can't continue.
32634  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32635$as_echo_n "checking for Visual Studio variables... " >&6; }
32636
32637  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32638      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32639    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32640      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32641$as_echo "present but broken" >&6; }
32642      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32643    else
32644      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32645$as_echo "ok" >&6; }
32646      # Remove any trailing "\" ";" and " " from the variables.
32647      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32648      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32649      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32650      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32651      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32652      # Remove any paths containing # (typically F#) as that messes up make. This
32653      # is needed if visual studio was installed with F# support.
32654      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32655
32656
32657
32658
32659
32660      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32661      OLDIFS="$IFS"
32662      IFS=";"
32663      for i in $VS_INCLUDE; do
32664        ipath=$i
32665        # Only process non-empty elements
32666        if test "x$ipath" != x; then
32667          IFS="$OLDIFS"
32668          # Check that directory exists before calling fixup_path
32669          testpath=$ipath
32670
32671  windows_path="$testpath"
32672  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32673    unix_path=`$CYGPATH -u "$windows_path"`
32674    testpath="$unix_path"
32675  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32676    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32677    testpath="$unix_path"
32678  fi
32679
32680          if test -d "$testpath"; then
32681
32682  # Only process if variable expands to non-empty
32683
32684  if test "x$ipath" != x; then
32685    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32686
32687  # Input might be given as Windows format, start by converting to
32688  # unix format.
32689  path="$ipath"
32690  new_path=`$CYGPATH -u "$path"`
32691
32692  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32693  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32694  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32695  # "foo.exe" is OK but "foo" is an error.
32696  #
32697  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32698  # It is also a way to make sure we got the proper file name for the real test later on.
32699  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32700  if test "x$test_shortpath" = x; then
32701    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32702$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32703    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32704  fi
32705
32706  # Call helper function which possibly converts this using DOS-style short mode.
32707  # If so, the updated path is stored in $new_path.
32708
32709  input_path="$new_path"
32710  # Check if we need to convert this using DOS-style short mode. If the path
32711  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32712  # take no chances and rewrite it.
32713  # Note: m4 eats our [], so we need to use [ and ] instead.
32714  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32715  if test "x$has_forbidden_chars" != x; then
32716    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32717    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32718    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32719    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32720      # Going to short mode and back again did indeed matter. Since short mode is
32721      # case insensitive, let's make it lowercase to improve readability.
32722      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32723      # Now convert it back to Unix-style (cygpath)
32724      input_path=`$CYGPATH -u "$shortmode_path"`
32725      new_path="$input_path"
32726    fi
32727  fi
32728
32729  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32730  if test "x$test_cygdrive_prefix" = x; then
32731    # As a simple fix, exclude /usr/bin since it's not a real path.
32732    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32733      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32734      # a path prefixed by /cygdrive for fixpath to work.
32735      new_path="$CYGWIN_ROOT_PATH$input_path"
32736    fi
32737  fi
32738
32739
32740  if test "x$path" != "x$new_path"; then
32741    ipath="$new_path"
32742    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32743$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32744  fi
32745
32746    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32747
32748  path="$ipath"
32749  has_colon=`$ECHO $path | $GREP ^.:`
32750  new_path="$path"
32751  if test "x$has_colon" = x; then
32752    # Not in mixed or Windows style, start by that.
32753    new_path=`cmd //c echo $path`
32754  fi
32755
32756
32757  input_path="$new_path"
32758  # Check if we need to convert this using DOS-style short mode. If the path
32759  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32760  # take no chances and rewrite it.
32761  # Note: m4 eats our [], so we need to use [ and ] instead.
32762  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32763  if test "x$has_forbidden_chars" != x; then
32764    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32765    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32766  fi
32767
32768
32769  windows_path="$new_path"
32770  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32771    unix_path=`$CYGPATH -u "$windows_path"`
32772    new_path="$unix_path"
32773  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32774    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32775    new_path="$unix_path"
32776  fi
32777
32778  if test "x$path" != "x$new_path"; then
32779    ipath="$new_path"
32780    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32781$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32782  fi
32783
32784  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32785  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32786
32787    else
32788      # We're on a unix platform. Hooray! :)
32789      path="$ipath"
32790      has_space=`$ECHO "$path" | $GREP " "`
32791      if test "x$has_space" != x; then
32792        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32793$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32794        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32795      fi
32796
32797      # Use eval to expand a potential ~
32798      eval path="$path"
32799      if test ! -f "$path" && test ! -d "$path"; then
32800        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32801      fi
32802
32803      if test -d "$path"; then
32804        ipath="`cd "$path"; $THEPWDCMD -L`"
32805      else
32806        dir="`$DIRNAME "$path"`"
32807        base="`$BASENAME "$path"`"
32808        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32809      fi
32810    fi
32811  fi
32812
32813            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32814          fi
32815          IFS=";"
32816        fi
32817      done
32818      # Convert VS_LIB into SYSROOT_LDFLAGS
32819      for i in $VS_LIB; do
32820        libpath=$i
32821        # Only process non-empty elements
32822        if test "x$libpath" != x; then
32823          IFS="$OLDIFS"
32824          # Check that directory exists before calling fixup_path
32825          testpath=$libpath
32826
32827  windows_path="$testpath"
32828  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32829    unix_path=`$CYGPATH -u "$windows_path"`
32830    testpath="$unix_path"
32831  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32832    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32833    testpath="$unix_path"
32834  fi
32835
32836          if test -d "$testpath"; then
32837
32838  # Only process if variable expands to non-empty
32839
32840  if test "x$libpath" != x; then
32841    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32842
32843  # Input might be given as Windows format, start by converting to
32844  # unix format.
32845  path="$libpath"
32846  new_path=`$CYGPATH -u "$path"`
32847
32848  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32849  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32850  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32851  # "foo.exe" is OK but "foo" is an error.
32852  #
32853  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32854  # It is also a way to make sure we got the proper file name for the real test later on.
32855  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32856  if test "x$test_shortpath" = x; then
32857    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32858$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32859    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32860  fi
32861
32862  # Call helper function which possibly converts this using DOS-style short mode.
32863  # If so, the updated path is stored in $new_path.
32864
32865  input_path="$new_path"
32866  # Check if we need to convert this using DOS-style short mode. If the path
32867  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32868  # take no chances and rewrite it.
32869  # Note: m4 eats our [], so we need to use [ and ] instead.
32870  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32871  if test "x$has_forbidden_chars" != x; then
32872    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32873    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32874    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32875    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32876      # Going to short mode and back again did indeed matter. Since short mode is
32877      # case insensitive, let's make it lowercase to improve readability.
32878      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32879      # Now convert it back to Unix-style (cygpath)
32880      input_path=`$CYGPATH -u "$shortmode_path"`
32881      new_path="$input_path"
32882    fi
32883  fi
32884
32885  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32886  if test "x$test_cygdrive_prefix" = x; then
32887    # As a simple fix, exclude /usr/bin since it's not a real path.
32888    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32889      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32890      # a path prefixed by /cygdrive for fixpath to work.
32891      new_path="$CYGWIN_ROOT_PATH$input_path"
32892    fi
32893  fi
32894
32895
32896  if test "x$path" != "x$new_path"; then
32897    libpath="$new_path"
32898    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32899$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32900  fi
32901
32902    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32903
32904  path="$libpath"
32905  has_colon=`$ECHO $path | $GREP ^.:`
32906  new_path="$path"
32907  if test "x$has_colon" = x; then
32908    # Not in mixed or Windows style, start by that.
32909    new_path=`cmd //c echo $path`
32910  fi
32911
32912
32913  input_path="$new_path"
32914  # Check if we need to convert this using DOS-style short mode. If the path
32915  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32916  # take no chances and rewrite it.
32917  # Note: m4 eats our [], so we need to use [ and ] instead.
32918  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32919  if test "x$has_forbidden_chars" != x; then
32920    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32921    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32922  fi
32923
32924
32925  windows_path="$new_path"
32926  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32927    unix_path=`$CYGPATH -u "$windows_path"`
32928    new_path="$unix_path"
32929  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32930    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32931    new_path="$unix_path"
32932  fi
32933
32934  if test "x$path" != "x$new_path"; then
32935    libpath="$new_path"
32936    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32937$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32938  fi
32939
32940  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32941  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32942
32943    else
32944      # We're on a unix platform. Hooray! :)
32945      path="$libpath"
32946      has_space=`$ECHO "$path" | $GREP " "`
32947      if test "x$has_space" != x; then
32948        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32949$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32950        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32951      fi
32952
32953      # Use eval to expand a potential ~
32954      eval path="$path"
32955      if test ! -f "$path" && test ! -d "$path"; then
32956        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32957      fi
32958
32959      if test -d "$path"; then
32960        libpath="`cd "$path"; $THEPWDCMD -L`"
32961      else
32962        dir="`$DIRNAME "$path"`"
32963        base="`$BASENAME "$path"`"
32964        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32965      fi
32966    fi
32967  fi
32968
32969            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32970          fi
32971          IFS=";"
32972        fi
32973      done
32974      IFS="$OLDIFS"
32975    fi
32976  else
32977    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32978$as_echo "not found" >&6; }
32979
32980    if test "x$VS_ENV_CMD" = x; then
32981      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32982$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32983      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32984$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32985    else
32986      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32987$as_echo "$as_me: Running the extraction script failed." >&6;}
32988    fi
32989    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32990$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32991    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32992$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32993    as_fn_error $? "Cannot continue" "$LINENO" 5
32994  fi
32995
32996    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32997    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32998    PATH="$VS_PATH"
32999    # The microsoft toolchain also requires INCLUDE and LIB to be set.
33000    export INCLUDE="$VS_INCLUDE"
33001    export LIB="$VS_LIB"
33002  else
33003    if test "x$XCODE_VERSION_OUTPUT" != x; then
33004      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
33005      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
33006      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
33007    else
33008      # Currently we do not define this for other toolchains. This might change as the need arise.
33009      TOOLCHAIN_VERSION=
33010    fi
33011  fi
33012
33013
33014  # For solaris we really need solaris tools, and not the GNU equivalent.
33015  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
33016  # so add that to path before starting to probe.
33017  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
33018  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
33019    PATH="/usr/ccs/bin:$PATH"
33020  fi
33021
33022  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
33023  # override all other locations.
33024  if test "x$TOOLCHAIN_PATH" != x; then
33025    PATH=$TOOLCHAIN_PATH:$PATH
33026  fi
33027
33028
33029  #
33030  # Setup the compilers (CC and CXX)
33031  #
33032
33033  COMPILER_NAME=C
33034  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
33035
33036  if test "x$CC" != x; then
33037    # User has supplied compiler name already, always let that override.
33038    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
33039$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
33040    if test "x`basename $CC`" = "x$CC"; then
33041      # A command without a complete path is provided, search $PATH.
33042
33043      for ac_prog in $CC
33044do
33045  # Extract the first word of "$ac_prog", so it can be a program name with args.
33046set dummy $ac_prog; ac_word=$2
33047{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33048$as_echo_n "checking for $ac_word... " >&6; }
33049if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33050  $as_echo_n "(cached) " >&6
33051else
33052  case $POTENTIAL_CC in
33053  [\\/]* | ?:[\\/]*)
33054  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33055  ;;
33056  *)
33057  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33058for as_dir in $PATH
33059do
33060  IFS=$as_save_IFS
33061  test -z "$as_dir" && as_dir=.
33062    for ac_exec_ext in '' $ac_executable_extensions; do
33063  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33064    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33065    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33066    break 2
33067  fi
33068done
33069  done
33070IFS=$as_save_IFS
33071
33072  ;;
33073esac
33074fi
33075POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33076if test -n "$POTENTIAL_CC"; then
33077  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33078$as_echo "$POTENTIAL_CC" >&6; }
33079else
33080  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33081$as_echo "no" >&6; }
33082fi
33083
33084
33085  test -n "$POTENTIAL_CC" && break
33086done
33087
33088      if test "x$POTENTIAL_CC" != x; then
33089        CC=$POTENTIAL_CC
33090      else
33091        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
33092      fi
33093    else
33094      # Otherwise it might already be a complete path
33095      if test ! -x "$CC"; then
33096        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
33097      fi
33098    fi
33099  else
33100    # No user supplied value. Locate compiler ourselves.
33101
33102    # If we are cross compiling, assume cross compilation tools follows the
33103    # cross compilation standard where they are prefixed with the autoconf
33104    # standard name for the target. For example the binary
33105    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33106    # If we are not cross compiling, then the default compiler name will be
33107    # used.
33108
33109    CC=
33110    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33111    # before checking the rest of the PATH.
33112    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33113    # step, this should not be necessary.
33114    if test -n "$TOOLCHAIN_PATH"; then
33115      PATH_save="$PATH"
33116      PATH="$TOOLCHAIN_PATH"
33117      for ac_prog in $SEARCH_LIST
33118do
33119  # Extract the first word of "$ac_prog", so it can be a program name with args.
33120set dummy $ac_prog; ac_word=$2
33121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33122$as_echo_n "checking for $ac_word... " >&6; }
33123if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
33124  $as_echo_n "(cached) " >&6
33125else
33126  case $TOOLCHAIN_PATH_CC in
33127  [\\/]* | ?:[\\/]*)
33128  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
33129  ;;
33130  *)
33131  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33132for as_dir in $PATH
33133do
33134  IFS=$as_save_IFS
33135  test -z "$as_dir" && as_dir=.
33136    for ac_exec_ext in '' $ac_executable_extensions; do
33137  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33138    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
33139    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33140    break 2
33141  fi
33142done
33143  done
33144IFS=$as_save_IFS
33145
33146  ;;
33147esac
33148fi
33149TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
33150if test -n "$TOOLCHAIN_PATH_CC"; then
33151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
33152$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
33153else
33154  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33155$as_echo "no" >&6; }
33156fi
33157
33158
33159  test -n "$TOOLCHAIN_PATH_CC" && break
33160done
33161
33162      CC=$TOOLCHAIN_PATH_CC
33163      PATH="$PATH_save"
33164    fi
33165
33166    # AC_PATH_PROGS can't be run multiple times with the same variable,
33167    # so create a new name for this run.
33168    if test "x$CC" = x; then
33169      for ac_prog in $SEARCH_LIST
33170do
33171  # Extract the first word of "$ac_prog", so it can be a program name with args.
33172set dummy $ac_prog; ac_word=$2
33173{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33174$as_echo_n "checking for $ac_word... " >&6; }
33175if ${ac_cv_path_POTENTIAL_CC+:} false; then :
33176  $as_echo_n "(cached) " >&6
33177else
33178  case $POTENTIAL_CC in
33179  [\\/]* | ?:[\\/]*)
33180  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
33181  ;;
33182  *)
33183  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33184for as_dir in $PATH
33185do
33186  IFS=$as_save_IFS
33187  test -z "$as_dir" && as_dir=.
33188    for ac_exec_ext in '' $ac_executable_extensions; do
33189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33190    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
33191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33192    break 2
33193  fi
33194done
33195  done
33196IFS=$as_save_IFS
33197
33198  ;;
33199esac
33200fi
33201POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
33202if test -n "$POTENTIAL_CC"; then
33203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
33204$as_echo "$POTENTIAL_CC" >&6; }
33205else
33206  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33207$as_echo "no" >&6; }
33208fi
33209
33210
33211  test -n "$POTENTIAL_CC" && break
33212done
33213
33214      CC=$POTENTIAL_CC
33215    fi
33216
33217    if test "x$CC" = x; then
33218
33219  # Print a helpful message on how to acquire the necessary build dependency.
33220  # devkit is the help tag: freetype, cups, alsa etc
33221  MISSING_DEPENDENCY=devkit
33222
33223  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33224    cygwin_help $MISSING_DEPENDENCY
33225  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33226    msys_help $MISSING_DEPENDENCY
33227  else
33228    PKGHANDLER_COMMAND=
33229
33230    case $PKGHANDLER in
33231      apt-get)
33232        apt_help     $MISSING_DEPENDENCY ;;
33233      yum)
33234        yum_help     $MISSING_DEPENDENCY ;;
33235      port)
33236        port_help    $MISSING_DEPENDENCY ;;
33237      pkgutil)
33238        pkgutil_help $MISSING_DEPENDENCY ;;
33239      pkgadd)
33240        pkgadd_help  $MISSING_DEPENDENCY ;;
33241    esac
33242
33243    if test "x$PKGHANDLER_COMMAND" != x; then
33244      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
33245    fi
33246  fi
33247
33248      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
33249    fi
33250  fi
33251
33252  # Now we have a compiler binary in CC. Make sure it's okay.
33253
33254  # Only process if variable expands to non-empty
33255
33256  if test "x$CC" != x; then
33257    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33258
33259  # First separate the path from the arguments. This will split at the first
33260  # space.
33261  complete="$CC"
33262  path="${complete%% *}"
33263  tmp="$complete EOL"
33264  arguments="${tmp#* }"
33265
33266  # Input might be given as Windows format, start by converting to
33267  # unix format.
33268  new_path=`$CYGPATH -u "$path"`
33269
33270  # Now try to locate executable using which
33271  new_path=`$WHICH "$new_path" 2> /dev/null`
33272  # bat and cmd files are not always considered executable in cygwin causing which
33273  # to not find them
33274  if test "x$new_path" = x \
33275      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33276      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33277    new_path=`$CYGPATH -u "$path"`
33278  fi
33279  if test "x$new_path" = x; then
33280    # Oops. Which didn't find the executable.
33281    # The splitting of arguments from the executable at a space might have been incorrect,
33282    # since paths with space are more likely in Windows. Give it another try with the whole
33283    # argument.
33284    path="$complete"
33285    arguments="EOL"
33286    new_path=`$CYGPATH -u "$path"`
33287    new_path=`$WHICH "$new_path" 2> /dev/null`
33288    # bat and cmd files are not always considered executable in cygwin causing which
33289    # to not find them
33290    if test "x$new_path" = x \
33291        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33292        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33293      new_path=`$CYGPATH -u "$path"`
33294    fi
33295    if test "x$new_path" = x; then
33296      # It's still not found. Now this is an unrecoverable error.
33297      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33298$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33299      has_space=`$ECHO "$complete" | $GREP " "`
33300      if test "x$has_space" != x; then
33301        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33302$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33303      fi
33304      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33305    fi
33306  fi
33307
33308  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
33309  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
33310  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
33311  # "foo.exe" is OK but "foo" is an error.
33312  #
33313  # This test is therefore slightly more accurate than "test -f" to check for file presence.
33314  # It is also a way to make sure we got the proper file name for the real test later on.
33315  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
33316  if test "x$test_shortpath" = x; then
33317    # Short path failed, file does not exist as specified.
33318    # Try adding .exe or .cmd
33319    if test -f "${new_path}.exe"; then
33320      input_to_shortpath="${new_path}.exe"
33321    elif test -f "${new_path}.cmd"; then
33322      input_to_shortpath="${new_path}.cmd"
33323    else
33324      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
33325$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
33326      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
33327$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
33328      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33329    fi
33330  else
33331    input_to_shortpath="$new_path"
33332  fi
33333
33334  # Call helper function which possibly converts this using DOS-style short mode.
33335  # If so, the updated path is stored in $new_path.
33336  new_path="$input_to_shortpath"
33337
33338  input_path="$input_to_shortpath"
33339  # Check if we need to convert this using DOS-style short mode. If the path
33340  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33341  # take no chances and rewrite it.
33342  # Note: m4 eats our [], so we need to use [ and ] instead.
33343  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
33344  if test "x$has_forbidden_chars" != x; then
33345    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33346    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
33347    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
33348    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
33349      # Going to short mode and back again did indeed matter. Since short mode is
33350      # case insensitive, let's make it lowercase to improve readability.
33351      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33352      # Now convert it back to Unix-style (cygpath)
33353      input_path=`$CYGPATH -u "$shortmode_path"`
33354      new_path="$input_path"
33355    fi
33356  fi
33357
33358  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
33359  if test "x$test_cygdrive_prefix" = x; then
33360    # As a simple fix, exclude /usr/bin since it's not a real path.
33361    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
33362      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
33363      # a path prefixed by /cygdrive for fixpath to work.
33364      new_path="$CYGWIN_ROOT_PATH$input_path"
33365    fi
33366  fi
33367
33368  # remove trailing .exe if any
33369  new_path="${new_path/%.exe/}"
33370
33371    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33372
33373  # First separate the path from the arguments. This will split at the first
33374  # space.
33375  complete="$CC"
33376  path="${complete%% *}"
33377  tmp="$complete EOL"
33378  arguments="${tmp#* }"
33379
33380  # Input might be given as Windows format, start by converting to
33381  # unix format.
33382  new_path="$path"
33383
33384  windows_path="$new_path"
33385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33386    unix_path=`$CYGPATH -u "$windows_path"`
33387    new_path="$unix_path"
33388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33390    new_path="$unix_path"
33391  fi
33392
33393
33394  # Now try to locate executable using which
33395  new_path=`$WHICH "$new_path" 2> /dev/null`
33396
33397  if test "x$new_path" = x; then
33398    # Oops. Which didn't find the executable.
33399    # The splitting of arguments from the executable at a space might have been incorrect,
33400    # since paths with space are more likely in Windows. Give it another try with the whole
33401    # argument.
33402    path="$complete"
33403    arguments="EOL"
33404    new_path="$path"
33405
33406  windows_path="$new_path"
33407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33408    unix_path=`$CYGPATH -u "$windows_path"`
33409    new_path="$unix_path"
33410  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33411    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33412    new_path="$unix_path"
33413  fi
33414
33415
33416    new_path=`$WHICH "$new_path" 2> /dev/null`
33417    # bat and cmd files are not always considered executable in MSYS causing which
33418    # to not find them
33419    if test "x$new_path" = x \
33420        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
33421        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
33422      new_path="$path"
33423
33424  windows_path="$new_path"
33425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33426    unix_path=`$CYGPATH -u "$windows_path"`
33427    new_path="$unix_path"
33428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33430    new_path="$unix_path"
33431  fi
33432
33433    fi
33434
33435    if test "x$new_path" = x; then
33436      # It's still not found. Now this is an unrecoverable error.
33437      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33438$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33439      has_space=`$ECHO "$complete" | $GREP " "`
33440      if test "x$has_space" != x; then
33441        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
33442$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
33443      fi
33444      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33445    fi
33446  fi
33447
33448  # Now new_path has a complete unix path to the binary
33449  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
33450    # Keep paths in /bin as-is, but remove trailing .exe if any
33451    new_path="${new_path/%.exe/}"
33452    # Do not save /bin paths to all_fixpath_prefixes!
33453  else
33454    # Not in mixed or Windows style, start by that.
33455    new_path=`cmd //c echo $new_path`
33456
33457  input_path="$new_path"
33458  # Check if we need to convert this using DOS-style short mode. If the path
33459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
33460  # take no chances and rewrite it.
33461  # Note: m4 eats our [], so we need to use [ and ] instead.
33462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
33463  if test "x$has_forbidden_chars" != x; then
33464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
33465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
33466  fi
33467
33468    # Output is in $new_path
33469
33470  windows_path="$new_path"
33471  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
33472    unix_path=`$CYGPATH -u "$windows_path"`
33473    new_path="$unix_path"
33474  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
33475    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
33476    new_path="$unix_path"
33477  fi
33478
33479    # remove trailing .exe if any
33480    new_path="${new_path/%.exe/}"
33481
33482    # Save the first 10 bytes of this path to the storage, so fixpath can work.
33483    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
33484  fi
33485
33486    else
33487      # We're on a unix platform. Hooray! :)
33488      # First separate the path from the arguments. This will split at the first
33489      # space.
33490      complete="$CC"
33491      path="${complete%% *}"
33492      tmp="$complete EOL"
33493      arguments="${tmp#* }"
33494
33495      # Cannot rely on the command "which" here since it doesn't always work.
33496      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33497      if test -z "$is_absolute_path"; then
33498        # Path to executable is not absolute. Find it.
33499        IFS_save="$IFS"
33500        IFS=:
33501        for p in $PATH; do
33502          if test -f "$p/$path" && test -x "$p/$path"; then
33503            new_path="$p/$path"
33504            break
33505          fi
33506        done
33507        IFS="$IFS_save"
33508      else
33509        # This is an absolute path, we can use it without further modifications.
33510        new_path="$path"
33511      fi
33512
33513      if test "x$new_path" = x; then
33514        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33515$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33516        has_space=`$ECHO "$complete" | $GREP " "`
33517        if test "x$has_space" != x; then
33518          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33519$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33520        fi
33521        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33522      fi
33523    fi
33524
33525    # Now join together the path and the arguments once again
33526    if test "x$arguments" != xEOL; then
33527      new_complete="$new_path ${arguments% *}"
33528    else
33529      new_complete="$new_path"
33530    fi
33531
33532    if test "x$complete" != "x$new_complete"; then
33533      CC="$new_complete"
33534      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33535$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33536    fi
33537  fi
33538
33539  TEST_COMPILER="$CC"
33540
33541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33542$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33543  SYMLINK_ORIGINAL="$TEST_COMPILER"
33544
33545  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33546    # Follow a chain of symbolic links. Use readlink
33547    # where it exists, else fall back to horribly
33548    # complicated shell code.
33549    if test "x$READLINK_TESTED" != yes; then
33550      # On MacOSX there is a readlink tool with a different
33551      # purpose than the GNU readlink tool. Check the found readlink.
33552      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33553      if test "x$ISGNU" = x; then
33554        # A readlink that we do not know how to use.
33555        # Are there other non-GNU readlinks out there?
33556        READLINK_TESTED=yes
33557        READLINK=
33558      fi
33559    fi
33560
33561    if test "x$READLINK" != x; then
33562      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33563    else
33564      # Save the current directory for restoring afterwards
33565      STARTDIR=$PWD
33566      COUNTER=0
33567      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33568      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33569      cd $sym_link_dir
33570      # Use -P flag to resolve symlinks in directories.
33571      cd `$THEPWDCMD -P`
33572      sym_link_dir=`$THEPWDCMD -P`
33573      # Resolve file symlinks
33574      while test $COUNTER -lt 20; do
33575        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33576        if test "x$ISLINK" == x; then
33577          # This is not a symbolic link! We are done!
33578          break
33579        fi
33580        # Again resolve directory symlinks since the target of the just found
33581        # link could be in a different directory
33582        cd `$DIRNAME $ISLINK`
33583        sym_link_dir=`$THEPWDCMD -P`
33584        sym_link_file=`$BASENAME $ISLINK`
33585        let COUNTER=COUNTER+1
33586      done
33587      cd $STARTDIR
33588      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33589    fi
33590  fi
33591
33592  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33593    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33594$as_echo "no symlink" >&6; }
33595  else
33596    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33597$as_echo "$SYMLINK_ORIGINAL" >&6; }
33598
33599    # We can't handle ccache by gcc wrappers, since we need to know if we're
33600    # using ccache. Instead ccache usage must be controlled by a configure option.
33601    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33602    if test "x$COMPILER_BASENAME" = "xccache"; then
33603      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33604$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33605      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33606    fi
33607  fi
33608
33609
33610  COMPILER=$CC
33611  COMPILER_NAME=$COMPILER_NAME
33612
33613  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33614    # cc -V output typically looks like
33615    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33616    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33617    # Check that this is likely to be the Solaris Studio cc.
33618    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33619    if test $? -ne 0; then
33620      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33621      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33622$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33623      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33624$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33626$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33627      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33628    fi
33629    # Remove usage instructions (if present), and
33630    # collapse compiler output into a single line
33631    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33632        $SED -e 's/ *[Uu]sage:.*//'`
33633    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33634        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33635  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33636    # xlc -qversion output typically looks like
33637    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33638    #     Version: 11.01.0000.0015
33639    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33640    # Check that this is likely to be the IBM XL C compiler.
33641    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33642    if test $? -ne 0; then
33643      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33644      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33645$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33646      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33647$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33649$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33650      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33651    fi
33652    # Collapse compiler output into a single line
33653    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33654    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33655        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33656  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33657    # There is no specific version flag, but all output starts with a version string.
33658    # First line typically looks something like:
33659    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33660    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33661    # Check that this is likely to be Microsoft CL.EXE.
33662    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33663    if test $? -ne 0; then
33664      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33665$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33666      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33667$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33668      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33669    fi
33670    # Collapse compiler output into a single line
33671    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33672    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33673        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33674  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33675    # gcc --version output typically looks like
33676    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33677    #     Copyright (C) 2013 Free Software Foundation, Inc.
33678    #     This is free software; see the source for copying conditions.  There is NO
33679    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33680    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33681    # Check that this is likely to be GCC.
33682    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33683    if test $? -ne 0; then
33684      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33685$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33686      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33687$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33688      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33689    fi
33690    # Remove Copyright and legalese from version string, and
33691    # collapse into a single line
33692    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33693        $SED -e 's/ *Copyright .*//'`
33694    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33695        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33696  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33697    # clang --version output typically looks like
33698    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33699    #    clang version 3.3 (tags/RELEASE_33/final)
33700    # or
33701    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33702    #    Target: x86_64-pc-linux-gnu
33703    #    Thread model: posix
33704    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33705    # Check that this is likely to be clang
33706    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33707    if test $? -ne 0; then
33708      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
33709$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33710      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33711$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33712      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33713    fi
33714    # Collapse compiler output into a single line
33715    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33716    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33717        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33718  else
33719      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33720  fi
33721  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33722  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33723  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33724  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33725
33726  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33727$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33728
33729
33730  # Now that we have resolved CC ourself, let autoconf have its go at it
33731  ac_ext=c
33732ac_cpp='$CPP $CPPFLAGS'
33733ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33734ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33735ac_compiler_gnu=$ac_cv_c_compiler_gnu
33736if test -n "$ac_tool_prefix"; then
33737  for ac_prog in $CC
33738  do
33739    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33740set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33742$as_echo_n "checking for $ac_word... " >&6; }
33743if ${ac_cv_prog_CC+:} false; then :
33744  $as_echo_n "(cached) " >&6
33745else
33746  if test -n "$CC"; then
33747  ac_cv_prog_CC="$CC" # Let the user override the test.
33748else
33749as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33750for as_dir in $PATH
33751do
33752  IFS=$as_save_IFS
33753  test -z "$as_dir" && as_dir=.
33754    for ac_exec_ext in '' $ac_executable_extensions; do
33755  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33756    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33757    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33758    break 2
33759  fi
33760done
33761  done
33762IFS=$as_save_IFS
33763
33764fi
33765fi
33766CC=$ac_cv_prog_CC
33767if test -n "$CC"; then
33768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33769$as_echo "$CC" >&6; }
33770else
33771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33772$as_echo "no" >&6; }
33773fi
33774
33775
33776    test -n "$CC" && break
33777  done
33778fi
33779if test -z "$CC"; then
33780  ac_ct_CC=$CC
33781  for ac_prog in $CC
33782do
33783  # Extract the first word of "$ac_prog", so it can be a program name with args.
33784set dummy $ac_prog; ac_word=$2
33785{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33786$as_echo_n "checking for $ac_word... " >&6; }
33787if ${ac_cv_prog_ac_ct_CC+:} false; then :
33788  $as_echo_n "(cached) " >&6
33789else
33790  if test -n "$ac_ct_CC"; then
33791  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33792else
33793as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33794for as_dir in $PATH
33795do
33796  IFS=$as_save_IFS
33797  test -z "$as_dir" && as_dir=.
33798    for ac_exec_ext in '' $ac_executable_extensions; do
33799  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33800    ac_cv_prog_ac_ct_CC="$ac_prog"
33801    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33802    break 2
33803  fi
33804done
33805  done
33806IFS=$as_save_IFS
33807
33808fi
33809fi
33810ac_ct_CC=$ac_cv_prog_ac_ct_CC
33811if test -n "$ac_ct_CC"; then
33812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33813$as_echo "$ac_ct_CC" >&6; }
33814else
33815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33816$as_echo "no" >&6; }
33817fi
33818
33819
33820  test -n "$ac_ct_CC" && break
33821done
33822
33823  if test "x$ac_ct_CC" = x; then
33824    CC=""
33825  else
33826    case $cross_compiling:$ac_tool_warned in
33827yes:)
33828{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33829$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33830ac_tool_warned=yes ;;
33831esac
33832    CC=$ac_ct_CC
33833  fi
33834fi
33835
33836
33837test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33838$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33839as_fn_error $? "no acceptable C compiler found in \$PATH
33840See \`config.log' for more details" "$LINENO" 5; }
33841
33842# Provide some information about the compiler.
33843$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33844set X $ac_compile
33845ac_compiler=$2
33846for ac_option in --version -v -V -qversion; do
33847  { { ac_try="$ac_compiler $ac_option >&5"
33848case "(($ac_try" in
33849  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33850  *) ac_try_echo=$ac_try;;
33851esac
33852eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33853$as_echo "$ac_try_echo"; } >&5
33854  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33855  ac_status=$?
33856  if test -s conftest.err; then
33857    sed '10a\
33858... rest of stderr output deleted ...
33859         10q' conftest.err >conftest.er1
33860    cat conftest.er1 >&5
33861  fi
33862  rm -f conftest.er1 conftest.err
33863  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33864  test $ac_status = 0; }
33865done
33866
33867cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33868/* end confdefs.h.  */
33869
33870int
33871main ()
33872{
33873
33874  ;
33875  return 0;
33876}
33877_ACEOF
33878ac_clean_files_save=$ac_clean_files
33879ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33880# Try to create an executable without -o first, disregard a.out.
33881# It will help us diagnose broken compilers, and finding out an intuition
33882# of exeext.
33883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33884$as_echo_n "checking whether the C compiler works... " >&6; }
33885ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33886
33887# The possible output files:
33888ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33889
33890ac_rmfiles=
33891for ac_file in $ac_files
33892do
33893  case $ac_file in
33894    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33895    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33896  esac
33897done
33898rm -f $ac_rmfiles
33899
33900if { { ac_try="$ac_link_default"
33901case "(($ac_try" in
33902  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33903  *) ac_try_echo=$ac_try;;
33904esac
33905eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33906$as_echo "$ac_try_echo"; } >&5
33907  (eval "$ac_link_default") 2>&5
33908  ac_status=$?
33909  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33910  test $ac_status = 0; }; then :
33911  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33912# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33913# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33914# so that the user can short-circuit this test for compilers unknown to
33915# Autoconf.
33916for ac_file in $ac_files ''
33917do
33918  test -f "$ac_file" || continue
33919  case $ac_file in
33920    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33921	;;
33922    [ab].out )
33923	# We found the default executable, but exeext='' is most
33924	# certainly right.
33925	break;;
33926    *.* )
33927	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33928	then :; else
33929	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33930	fi
33931	# We set ac_cv_exeext here because the later test for it is not
33932	# safe: cross compilers may not add the suffix if given an `-o'
33933	# argument, so we may need to know it at that point already.
33934	# Even if this section looks crufty: it has the advantage of
33935	# actually working.
33936	break;;
33937    * )
33938	break;;
33939  esac
33940done
33941test "$ac_cv_exeext" = no && ac_cv_exeext=
33942
33943else
33944  ac_file=''
33945fi
33946if test -z "$ac_file"; then :
33947  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33948$as_echo "no" >&6; }
33949$as_echo "$as_me: failed program was:" >&5
33950sed 's/^/| /' conftest.$ac_ext >&5
33951
33952{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33954as_fn_error 77 "C compiler cannot create executables
33955See \`config.log' for more details" "$LINENO" 5; }
33956else
33957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33958$as_echo "yes" >&6; }
33959fi
33960{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33961$as_echo_n "checking for C compiler default output file name... " >&6; }
33962{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33963$as_echo "$ac_file" >&6; }
33964ac_exeext=$ac_cv_exeext
33965
33966rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33967ac_clean_files=$ac_clean_files_save
33968{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33969$as_echo_n "checking for suffix of executables... " >&6; }
33970if { { ac_try="$ac_link"
33971case "(($ac_try" in
33972  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33973  *) ac_try_echo=$ac_try;;
33974esac
33975eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33976$as_echo "$ac_try_echo"; } >&5
33977  (eval "$ac_link") 2>&5
33978  ac_status=$?
33979  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33980  test $ac_status = 0; }; then :
33981  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33982# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33983# work properly (i.e., refer to `conftest.exe'), while it won't with
33984# `rm'.
33985for ac_file in conftest.exe conftest conftest.*; do
33986  test -f "$ac_file" || continue
33987  case $ac_file in
33988    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33989    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33990	  break;;
33991    * ) break;;
33992  esac
33993done
33994else
33995  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33996$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33997as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33998See \`config.log' for more details" "$LINENO" 5; }
33999fi
34000rm -f conftest conftest$ac_cv_exeext
34001{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
34002$as_echo "$ac_cv_exeext" >&6; }
34003
34004rm -f conftest.$ac_ext
34005EXEEXT=$ac_cv_exeext
34006ac_exeext=$EXEEXT
34007cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34008/* end confdefs.h.  */
34009#include <stdio.h>
34010int
34011main ()
34012{
34013FILE *f = fopen ("conftest.out", "w");
34014 return ferror (f) || fclose (f) != 0;
34015
34016  ;
34017  return 0;
34018}
34019_ACEOF
34020ac_clean_files="$ac_clean_files conftest.out"
34021# Check that the compiler produces executables we can run.  If not, either
34022# the compiler is broken, or we cross compile.
34023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
34024$as_echo_n "checking whether we are cross compiling... " >&6; }
34025if test "$cross_compiling" != yes; then
34026  { { ac_try="$ac_link"
34027case "(($ac_try" in
34028  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34029  *) ac_try_echo=$ac_try;;
34030esac
34031eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34032$as_echo "$ac_try_echo"; } >&5
34033  (eval "$ac_link") 2>&5
34034  ac_status=$?
34035  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34036  test $ac_status = 0; }
34037  if { ac_try='./conftest$ac_cv_exeext'
34038  { { case "(($ac_try" in
34039  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34040  *) ac_try_echo=$ac_try;;
34041esac
34042eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34043$as_echo "$ac_try_echo"; } >&5
34044  (eval "$ac_try") 2>&5
34045  ac_status=$?
34046  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34047  test $ac_status = 0; }; }; then
34048    cross_compiling=no
34049  else
34050    if test "$cross_compiling" = maybe; then
34051	cross_compiling=yes
34052    else
34053	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34054$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34055as_fn_error $? "cannot run C compiled programs.
34056If you meant to cross compile, use \`--host'.
34057See \`config.log' for more details" "$LINENO" 5; }
34058    fi
34059  fi
34060fi
34061{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
34062$as_echo "$cross_compiling" >&6; }
34063
34064rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
34065ac_clean_files=$ac_clean_files_save
34066{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
34067$as_echo_n "checking for suffix of object files... " >&6; }
34068if ${ac_cv_objext+:} false; then :
34069  $as_echo_n "(cached) " >&6
34070else
34071  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34072/* end confdefs.h.  */
34073
34074int
34075main ()
34076{
34077
34078  ;
34079  return 0;
34080}
34081_ACEOF
34082rm -f conftest.o conftest.obj
34083if { { ac_try="$ac_compile"
34084case "(($ac_try" in
34085  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34086  *) ac_try_echo=$ac_try;;
34087esac
34088eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34089$as_echo "$ac_try_echo"; } >&5
34090  (eval "$ac_compile") 2>&5
34091  ac_status=$?
34092  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34093  test $ac_status = 0; }; then :
34094  for ac_file in conftest.o conftest.obj conftest.*; do
34095  test -f "$ac_file" || continue;
34096  case $ac_file in
34097    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
34098    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
34099       break;;
34100  esac
34101done
34102else
34103  $as_echo "$as_me: failed program was:" >&5
34104sed 's/^/| /' conftest.$ac_ext >&5
34105
34106{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
34107$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
34108as_fn_error $? "cannot compute suffix of object files: cannot compile
34109See \`config.log' for more details" "$LINENO" 5; }
34110fi
34111rm -f conftest.$ac_cv_objext conftest.$ac_ext
34112fi
34113{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
34114$as_echo "$ac_cv_objext" >&6; }
34115OBJEXT=$ac_cv_objext
34116ac_objext=$OBJEXT
34117{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
34118$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
34119if ${ac_cv_c_compiler_gnu+:} false; then :
34120  $as_echo_n "(cached) " >&6
34121else
34122  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34123/* end confdefs.h.  */
34124
34125int
34126main ()
34127{
34128#ifndef __GNUC__
34129       choke me
34130#endif
34131
34132  ;
34133  return 0;
34134}
34135_ACEOF
34136if ac_fn_c_try_compile "$LINENO"; then :
34137  ac_compiler_gnu=yes
34138else
34139  ac_compiler_gnu=no
34140fi
34141rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34142ac_cv_c_compiler_gnu=$ac_compiler_gnu
34143
34144fi
34145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
34146$as_echo "$ac_cv_c_compiler_gnu" >&6; }
34147if test $ac_compiler_gnu = yes; then
34148  GCC=yes
34149else
34150  GCC=
34151fi
34152ac_test_CFLAGS=${CFLAGS+set}
34153ac_save_CFLAGS=$CFLAGS
34154{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
34155$as_echo_n "checking whether $CC accepts -g... " >&6; }
34156if ${ac_cv_prog_cc_g+:} false; then :
34157  $as_echo_n "(cached) " >&6
34158else
34159  ac_save_c_werror_flag=$ac_c_werror_flag
34160   ac_c_werror_flag=yes
34161   ac_cv_prog_cc_g=no
34162   CFLAGS="-g"
34163   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34164/* end confdefs.h.  */
34165
34166int
34167main ()
34168{
34169
34170  ;
34171  return 0;
34172}
34173_ACEOF
34174if ac_fn_c_try_compile "$LINENO"; then :
34175  ac_cv_prog_cc_g=yes
34176else
34177  CFLAGS=""
34178      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34179/* end confdefs.h.  */
34180
34181int
34182main ()
34183{
34184
34185  ;
34186  return 0;
34187}
34188_ACEOF
34189if ac_fn_c_try_compile "$LINENO"; then :
34190
34191else
34192  ac_c_werror_flag=$ac_save_c_werror_flag
34193	 CFLAGS="-g"
34194	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34195/* end confdefs.h.  */
34196
34197int
34198main ()
34199{
34200
34201  ;
34202  return 0;
34203}
34204_ACEOF
34205if ac_fn_c_try_compile "$LINENO"; then :
34206  ac_cv_prog_cc_g=yes
34207fi
34208rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34209fi
34210rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34211fi
34212rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34213   ac_c_werror_flag=$ac_save_c_werror_flag
34214fi
34215{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
34216$as_echo "$ac_cv_prog_cc_g" >&6; }
34217if test "$ac_test_CFLAGS" = set; then
34218  CFLAGS=$ac_save_CFLAGS
34219elif test $ac_cv_prog_cc_g = yes; then
34220  if test "$GCC" = yes; then
34221    CFLAGS="-g -O2"
34222  else
34223    CFLAGS="-g"
34224  fi
34225else
34226  if test "$GCC" = yes; then
34227    CFLAGS="-O2"
34228  else
34229    CFLAGS=
34230  fi
34231fi
34232{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
34233$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
34234if ${ac_cv_prog_cc_c89+:} false; then :
34235  $as_echo_n "(cached) " >&6
34236else
34237  ac_cv_prog_cc_c89=no
34238ac_save_CC=$CC
34239cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34240/* end confdefs.h.  */
34241#include <stdarg.h>
34242#include <stdio.h>
34243struct stat;
34244/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
34245struct buf { int x; };
34246FILE * (*rcsopen) (struct buf *, struct stat *, int);
34247static char *e (p, i)
34248     char **p;
34249     int i;
34250{
34251  return p[i];
34252}
34253static char *f (char * (*g) (char **, int), char **p, ...)
34254{
34255  char *s;
34256  va_list v;
34257  va_start (v,p);
34258  s = g (p, va_arg (v,int));
34259  va_end (v);
34260  return s;
34261}
34262
34263/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
34264   function prototypes and stuff, but not '\xHH' hex character constants.
34265   These don't provoke an error unfortunately, instead are silently treated
34266   as 'x'.  The following induces an error, until -std is added to get
34267   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
34268   array size at least.  It's necessary to write '\x00'==0 to get something
34269   that's true only with -std.  */
34270int osf4_cc_array ['\x00' == 0 ? 1 : -1];
34271
34272/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
34273   inside strings and character constants.  */
34274#define FOO(x) 'x'
34275int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
34276
34277int test (int i, double x);
34278struct s1 {int (*f) (int a);};
34279struct s2 {int (*f) (double a);};
34280int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
34281int argc;
34282char **argv;
34283int
34284main ()
34285{
34286return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
34287  ;
34288  return 0;
34289}
34290_ACEOF
34291for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
34292	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
34293do
34294  CC="$ac_save_CC $ac_arg"
34295  if ac_fn_c_try_compile "$LINENO"; then :
34296  ac_cv_prog_cc_c89=$ac_arg
34297fi
34298rm -f core conftest.err conftest.$ac_objext
34299  test "x$ac_cv_prog_cc_c89" != "xno" && break
34300done
34301rm -f conftest.$ac_ext
34302CC=$ac_save_CC
34303
34304fi
34305# AC_CACHE_VAL
34306case "x$ac_cv_prog_cc_c89" in
34307  x)
34308    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
34309$as_echo "none needed" >&6; } ;;
34310  xno)
34311    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
34312$as_echo "unsupported" >&6; } ;;
34313  *)
34314    CC="$CC $ac_cv_prog_cc_c89"
34315    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
34316$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
34317esac
34318if test "x$ac_cv_prog_cc_c89" != xno; then :
34319
34320fi
34321
34322ac_ext=cpp
34323ac_cpp='$CXXCPP $CPPFLAGS'
34324ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34325ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34326ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34327
34328
34329
34330  COMPILER_NAME=C++
34331  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
34332
34333  if test "x$CXX" != x; then
34334    # User has supplied compiler name already, always let that override.
34335    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
34336$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
34337    if test "x`basename $CXX`" = "x$CXX"; then
34338      # A command without a complete path is provided, search $PATH.
34339
34340      for ac_prog in $CXX
34341do
34342  # Extract the first word of "$ac_prog", so it can be a program name with args.
34343set dummy $ac_prog; ac_word=$2
34344{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34345$as_echo_n "checking for $ac_word... " >&6; }
34346if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34347  $as_echo_n "(cached) " >&6
34348else
34349  case $POTENTIAL_CXX in
34350  [\\/]* | ?:[\\/]*)
34351  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34352  ;;
34353  *)
34354  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34355for as_dir in $PATH
34356do
34357  IFS=$as_save_IFS
34358  test -z "$as_dir" && as_dir=.
34359    for ac_exec_ext in '' $ac_executable_extensions; do
34360  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34361    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34362    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34363    break 2
34364  fi
34365done
34366  done
34367IFS=$as_save_IFS
34368
34369  ;;
34370esac
34371fi
34372POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34373if test -n "$POTENTIAL_CXX"; then
34374  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34375$as_echo "$POTENTIAL_CXX" >&6; }
34376else
34377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34378$as_echo "no" >&6; }
34379fi
34380
34381
34382  test -n "$POTENTIAL_CXX" && break
34383done
34384
34385      if test "x$POTENTIAL_CXX" != x; then
34386        CXX=$POTENTIAL_CXX
34387      else
34388        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
34389      fi
34390    else
34391      # Otherwise it might already be a complete path
34392      if test ! -x "$CXX"; then
34393        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
34394      fi
34395    fi
34396  else
34397    # No user supplied value. Locate compiler ourselves.
34398
34399    # If we are cross compiling, assume cross compilation tools follows the
34400    # cross compilation standard where they are prefixed with the autoconf
34401    # standard name for the target. For example the binary
34402    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
34403    # If we are not cross compiling, then the default compiler name will be
34404    # used.
34405
34406    CXX=
34407    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
34408    # before checking the rest of the PATH.
34409    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
34410    # step, this should not be necessary.
34411    if test -n "$TOOLCHAIN_PATH"; then
34412      PATH_save="$PATH"
34413      PATH="$TOOLCHAIN_PATH"
34414      for ac_prog in $SEARCH_LIST
34415do
34416  # Extract the first word of "$ac_prog", so it can be a program name with args.
34417set dummy $ac_prog; ac_word=$2
34418{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34419$as_echo_n "checking for $ac_word... " >&6; }
34420if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
34421  $as_echo_n "(cached) " >&6
34422else
34423  case $TOOLCHAIN_PATH_CXX in
34424  [\\/]* | ?:[\\/]*)
34425  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
34426  ;;
34427  *)
34428  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34429for as_dir in $PATH
34430do
34431  IFS=$as_save_IFS
34432  test -z "$as_dir" && as_dir=.
34433    for ac_exec_ext in '' $ac_executable_extensions; do
34434  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34435    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
34436    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34437    break 2
34438  fi
34439done
34440  done
34441IFS=$as_save_IFS
34442
34443  ;;
34444esac
34445fi
34446TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
34447if test -n "$TOOLCHAIN_PATH_CXX"; then
34448  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
34449$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
34450else
34451  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34452$as_echo "no" >&6; }
34453fi
34454
34455
34456  test -n "$TOOLCHAIN_PATH_CXX" && break
34457done
34458
34459      CXX=$TOOLCHAIN_PATH_CXX
34460      PATH="$PATH_save"
34461    fi
34462
34463    # AC_PATH_PROGS can't be run multiple times with the same variable,
34464    # so create a new name for this run.
34465    if test "x$CXX" = x; then
34466      for ac_prog in $SEARCH_LIST
34467do
34468  # Extract the first word of "$ac_prog", so it can be a program name with args.
34469set dummy $ac_prog; ac_word=$2
34470{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34471$as_echo_n "checking for $ac_word... " >&6; }
34472if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
34473  $as_echo_n "(cached) " >&6
34474else
34475  case $POTENTIAL_CXX in
34476  [\\/]* | ?:[\\/]*)
34477  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
34478  ;;
34479  *)
34480  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34481for as_dir in $PATH
34482do
34483  IFS=$as_save_IFS
34484  test -z "$as_dir" && as_dir=.
34485    for ac_exec_ext in '' $ac_executable_extensions; do
34486  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34487    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
34488    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34489    break 2
34490  fi
34491done
34492  done
34493IFS=$as_save_IFS
34494
34495  ;;
34496esac
34497fi
34498POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34499if test -n "$POTENTIAL_CXX"; then
34500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34501$as_echo "$POTENTIAL_CXX" >&6; }
34502else
34503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34504$as_echo "no" >&6; }
34505fi
34506
34507
34508  test -n "$POTENTIAL_CXX" && break
34509done
34510
34511      CXX=$POTENTIAL_CXX
34512    fi
34513
34514    if test "x$CXX" = x; then
34515
34516  # Print a helpful message on how to acquire the necessary build dependency.
34517  # devkit is the help tag: freetype, cups, alsa etc
34518  MISSING_DEPENDENCY=devkit
34519
34520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34521    cygwin_help $MISSING_DEPENDENCY
34522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34523    msys_help $MISSING_DEPENDENCY
34524  else
34525    PKGHANDLER_COMMAND=
34526
34527    case $PKGHANDLER in
34528      apt-get)
34529        apt_help     $MISSING_DEPENDENCY ;;
34530      yum)
34531        yum_help     $MISSING_DEPENDENCY ;;
34532      port)
34533        port_help    $MISSING_DEPENDENCY ;;
34534      pkgutil)
34535        pkgutil_help $MISSING_DEPENDENCY ;;
34536      pkgadd)
34537        pkgadd_help  $MISSING_DEPENDENCY ;;
34538    esac
34539
34540    if test "x$PKGHANDLER_COMMAND" != x; then
34541      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34542    fi
34543  fi
34544
34545      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34546    fi
34547  fi
34548
34549  # Now we have a compiler binary in CXX. Make sure it's okay.
34550
34551  # Only process if variable expands to non-empty
34552
34553  if test "x$CXX" != x; then
34554    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34555
34556  # First separate the path from the arguments. This will split at the first
34557  # space.
34558  complete="$CXX"
34559  path="${complete%% *}"
34560  tmp="$complete EOL"
34561  arguments="${tmp#* }"
34562
34563  # Input might be given as Windows format, start by converting to
34564  # unix format.
34565  new_path=`$CYGPATH -u "$path"`
34566
34567  # Now try to locate executable using which
34568  new_path=`$WHICH "$new_path" 2> /dev/null`
34569  # bat and cmd files are not always considered executable in cygwin causing which
34570  # to not find them
34571  if test "x$new_path" = x \
34572      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34573      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34574    new_path=`$CYGPATH -u "$path"`
34575  fi
34576  if test "x$new_path" = x; then
34577    # Oops. Which didn't find the executable.
34578    # The splitting of arguments from the executable at a space might have been incorrect,
34579    # since paths with space are more likely in Windows. Give it another try with the whole
34580    # argument.
34581    path="$complete"
34582    arguments="EOL"
34583    new_path=`$CYGPATH -u "$path"`
34584    new_path=`$WHICH "$new_path" 2> /dev/null`
34585    # bat and cmd files are not always considered executable in cygwin causing which
34586    # to not find them
34587    if test "x$new_path" = x \
34588        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34589        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34590      new_path=`$CYGPATH -u "$path"`
34591    fi
34592    if test "x$new_path" = x; then
34593      # It's still not found. Now this is an unrecoverable error.
34594      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34595$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34596      has_space=`$ECHO "$complete" | $GREP " "`
34597      if test "x$has_space" != x; then
34598        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34599$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34600      fi
34601      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34602    fi
34603  fi
34604
34605  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34606  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34607  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34608  # "foo.exe" is OK but "foo" is an error.
34609  #
34610  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34611  # It is also a way to make sure we got the proper file name for the real test later on.
34612  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34613  if test "x$test_shortpath" = x; then
34614    # Short path failed, file does not exist as specified.
34615    # Try adding .exe or .cmd
34616    if test -f "${new_path}.exe"; then
34617      input_to_shortpath="${new_path}.exe"
34618    elif test -f "${new_path}.cmd"; then
34619      input_to_shortpath="${new_path}.cmd"
34620    else
34621      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34622$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34623      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34624$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34625      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34626    fi
34627  else
34628    input_to_shortpath="$new_path"
34629  fi
34630
34631  # Call helper function which possibly converts this using DOS-style short mode.
34632  # If so, the updated path is stored in $new_path.
34633  new_path="$input_to_shortpath"
34634
34635  input_path="$input_to_shortpath"
34636  # Check if we need to convert this using DOS-style short mode. If the path
34637  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34638  # take no chances and rewrite it.
34639  # Note: m4 eats our [], so we need to use [ and ] instead.
34640  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34641  if test "x$has_forbidden_chars" != x; then
34642    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34643    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34644    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34645    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34646      # Going to short mode and back again did indeed matter. Since short mode is
34647      # case insensitive, let's make it lowercase to improve readability.
34648      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34649      # Now convert it back to Unix-style (cygpath)
34650      input_path=`$CYGPATH -u "$shortmode_path"`
34651      new_path="$input_path"
34652    fi
34653  fi
34654
34655  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34656  if test "x$test_cygdrive_prefix" = x; then
34657    # As a simple fix, exclude /usr/bin since it's not a real path.
34658    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34659      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34660      # a path prefixed by /cygdrive for fixpath to work.
34661      new_path="$CYGWIN_ROOT_PATH$input_path"
34662    fi
34663  fi
34664
34665  # remove trailing .exe if any
34666  new_path="${new_path/%.exe/}"
34667
34668    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34669
34670  # First separate the path from the arguments. This will split at the first
34671  # space.
34672  complete="$CXX"
34673  path="${complete%% *}"
34674  tmp="$complete EOL"
34675  arguments="${tmp#* }"
34676
34677  # Input might be given as Windows format, start by converting to
34678  # unix format.
34679  new_path="$path"
34680
34681  windows_path="$new_path"
34682  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34683    unix_path=`$CYGPATH -u "$windows_path"`
34684    new_path="$unix_path"
34685  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34686    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34687    new_path="$unix_path"
34688  fi
34689
34690
34691  # Now try to locate executable using which
34692  new_path=`$WHICH "$new_path" 2> /dev/null`
34693
34694  if test "x$new_path" = x; then
34695    # Oops. Which didn't find the executable.
34696    # The splitting of arguments from the executable at a space might have been incorrect,
34697    # since paths with space are more likely in Windows. Give it another try with the whole
34698    # argument.
34699    path="$complete"
34700    arguments="EOL"
34701    new_path="$path"
34702
34703  windows_path="$new_path"
34704  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34705    unix_path=`$CYGPATH -u "$windows_path"`
34706    new_path="$unix_path"
34707  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34708    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34709    new_path="$unix_path"
34710  fi
34711
34712
34713    new_path=`$WHICH "$new_path" 2> /dev/null`
34714    # bat and cmd files are not always considered executable in MSYS causing which
34715    # to not find them
34716    if test "x$new_path" = x \
34717        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34718        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34719      new_path="$path"
34720
34721  windows_path="$new_path"
34722  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34723    unix_path=`$CYGPATH -u "$windows_path"`
34724    new_path="$unix_path"
34725  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34726    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34727    new_path="$unix_path"
34728  fi
34729
34730    fi
34731
34732    if test "x$new_path" = x; then
34733      # It's still not found. Now this is an unrecoverable error.
34734      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34735$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34736      has_space=`$ECHO "$complete" | $GREP " "`
34737      if test "x$has_space" != x; then
34738        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34739$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34740      fi
34741      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34742    fi
34743  fi
34744
34745  # Now new_path has a complete unix path to the binary
34746  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34747    # Keep paths in /bin as-is, but remove trailing .exe if any
34748    new_path="${new_path/%.exe/}"
34749    # Do not save /bin paths to all_fixpath_prefixes!
34750  else
34751    # Not in mixed or Windows style, start by that.
34752    new_path=`cmd //c echo $new_path`
34753
34754  input_path="$new_path"
34755  # Check if we need to convert this using DOS-style short mode. If the path
34756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34757  # take no chances and rewrite it.
34758  # Note: m4 eats our [], so we need to use [ and ] instead.
34759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34760  if test "x$has_forbidden_chars" != x; then
34761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34762    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34763  fi
34764
34765    # Output is in $new_path
34766
34767  windows_path="$new_path"
34768  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34769    unix_path=`$CYGPATH -u "$windows_path"`
34770    new_path="$unix_path"
34771  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34772    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34773    new_path="$unix_path"
34774  fi
34775
34776    # remove trailing .exe if any
34777    new_path="${new_path/%.exe/}"
34778
34779    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34780    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34781  fi
34782
34783    else
34784      # We're on a unix platform. Hooray! :)
34785      # First separate the path from the arguments. This will split at the first
34786      # space.
34787      complete="$CXX"
34788      path="${complete%% *}"
34789      tmp="$complete EOL"
34790      arguments="${tmp#* }"
34791
34792      # Cannot rely on the command "which" here since it doesn't always work.
34793      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34794      if test -z "$is_absolute_path"; then
34795        # Path to executable is not absolute. Find it.
34796        IFS_save="$IFS"
34797        IFS=:
34798        for p in $PATH; do
34799          if test -f "$p/$path" && test -x "$p/$path"; then
34800            new_path="$p/$path"
34801            break
34802          fi
34803        done
34804        IFS="$IFS_save"
34805      else
34806        # This is an absolute path, we can use it without further modifications.
34807        new_path="$path"
34808      fi
34809
34810      if test "x$new_path" = x; then
34811        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34812$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34813        has_space=`$ECHO "$complete" | $GREP " "`
34814        if test "x$has_space" != x; then
34815          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34816$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34817        fi
34818        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34819      fi
34820    fi
34821
34822    # Now join together the path and the arguments once again
34823    if test "x$arguments" != xEOL; then
34824      new_complete="$new_path ${arguments% *}"
34825    else
34826      new_complete="$new_path"
34827    fi
34828
34829    if test "x$complete" != "x$new_complete"; then
34830      CXX="$new_complete"
34831      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34832$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34833    fi
34834  fi
34835
34836  TEST_COMPILER="$CXX"
34837
34838  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34839$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34840  SYMLINK_ORIGINAL="$TEST_COMPILER"
34841
34842  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34843    # Follow a chain of symbolic links. Use readlink
34844    # where it exists, else fall back to horribly
34845    # complicated shell code.
34846    if test "x$READLINK_TESTED" != yes; then
34847      # On MacOSX there is a readlink tool with a different
34848      # purpose than the GNU readlink tool. Check the found readlink.
34849      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34850      if test "x$ISGNU" = x; then
34851        # A readlink that we do not know how to use.
34852        # Are there other non-GNU readlinks out there?
34853        READLINK_TESTED=yes
34854        READLINK=
34855      fi
34856    fi
34857
34858    if test "x$READLINK" != x; then
34859      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34860    else
34861      # Save the current directory for restoring afterwards
34862      STARTDIR=$PWD
34863      COUNTER=0
34864      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34865      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34866      cd $sym_link_dir
34867      # Use -P flag to resolve symlinks in directories.
34868      cd `$THEPWDCMD -P`
34869      sym_link_dir=`$THEPWDCMD -P`
34870      # Resolve file symlinks
34871      while test $COUNTER -lt 20; do
34872        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34873        if test "x$ISLINK" == x; then
34874          # This is not a symbolic link! We are done!
34875          break
34876        fi
34877        # Again resolve directory symlinks since the target of the just found
34878        # link could be in a different directory
34879        cd `$DIRNAME $ISLINK`
34880        sym_link_dir=`$THEPWDCMD -P`
34881        sym_link_file=`$BASENAME $ISLINK`
34882        let COUNTER=COUNTER+1
34883      done
34884      cd $STARTDIR
34885      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34886    fi
34887  fi
34888
34889  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34890    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34891$as_echo "no symlink" >&6; }
34892  else
34893    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34894$as_echo "$SYMLINK_ORIGINAL" >&6; }
34895
34896    # We can't handle ccache by gcc wrappers, since we need to know if we're
34897    # using ccache. Instead ccache usage must be controlled by a configure option.
34898    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34899    if test "x$COMPILER_BASENAME" = "xccache"; then
34900      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34901$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34902      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34903    fi
34904  fi
34905
34906
34907  COMPILER=$CXX
34908  COMPILER_NAME=$COMPILER_NAME
34909
34910  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34911    # cc -V output typically looks like
34912    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34913    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34914    # Check that this is likely to be the Solaris Studio cc.
34915    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34916    if test $? -ne 0; then
34917      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34918      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34919$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34920      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34921$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34922      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34923$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34924      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34925    fi
34926    # Remove usage instructions (if present), and
34927    # collapse compiler output into a single line
34928    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34929        $SED -e 's/ *[Uu]sage:.*//'`
34930    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34931        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34932  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34933    # xlc -qversion output typically looks like
34934    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34935    #     Version: 11.01.0000.0015
34936    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34937    # Check that this is likely to be the IBM XL C compiler.
34938    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34939    if test $? -ne 0; then
34940      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34941      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34942$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34943      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34944$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34945      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34946$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34947      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34948    fi
34949    # Collapse compiler output into a single line
34950    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34951    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34952        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34953  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34954    # There is no specific version flag, but all output starts with a version string.
34955    # First line typically looks something like:
34956    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34957    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34958    # Check that this is likely to be Microsoft CL.EXE.
34959    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34960    if test $? -ne 0; then
34961      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34962$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34963      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34964$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34965      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34966    fi
34967    # Collapse compiler output into a single line
34968    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34969    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34970        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34971  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34972    # gcc --version output typically looks like
34973    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34974    #     Copyright (C) 2013 Free Software Foundation, Inc.
34975    #     This is free software; see the source for copying conditions.  There is NO
34976    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34977    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34978    # Check that this is likely to be GCC.
34979    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34980    if test $? -ne 0; then
34981      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
34982$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34983      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34984$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34985      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34986    fi
34987    # Remove Copyright and legalese from version string, and
34988    # collapse into a single line
34989    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34990        $SED -e 's/ *Copyright .*//'`
34991    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34992        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34993  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34994    # clang --version output typically looks like
34995    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34996    #    clang version 3.3 (tags/RELEASE_33/final)
34997    # or
34998    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34999    #    Target: x86_64-pc-linux-gnu
35000    #    Thread model: posix
35001    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
35002    # Check that this is likely to be clang
35003    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
35004    if test $? -ne 0; then
35005      { $as_echo "$as_me:${as_lineno-$LINENO}: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&5
35006$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
35007      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
35008$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
35009      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
35010    fi
35011    # Collapse compiler output into a single line
35012    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
35013    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
35014        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
35015  else
35016      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
35017  fi
35018  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
35019  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
35020  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
35021  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
35022
35023  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
35024$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
35025
35026
35027  # Now that we have resolved CXX ourself, let autoconf have its go at it
35028  ac_ext=cpp
35029ac_cpp='$CXXCPP $CPPFLAGS'
35030ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35031ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35032ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35033if test -z "$CXX"; then
35034  if test -n "$CCC"; then
35035    CXX=$CCC
35036  else
35037    if test -n "$ac_tool_prefix"; then
35038  for ac_prog in $CXX
35039  do
35040    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
35041set dummy $ac_tool_prefix$ac_prog; ac_word=$2
35042{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35043$as_echo_n "checking for $ac_word... " >&6; }
35044if ${ac_cv_prog_CXX+:} false; then :
35045  $as_echo_n "(cached) " >&6
35046else
35047  if test -n "$CXX"; then
35048  ac_cv_prog_CXX="$CXX" # Let the user override the test.
35049else
35050as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35051for as_dir in $PATH
35052do
35053  IFS=$as_save_IFS
35054  test -z "$as_dir" && as_dir=.
35055    for ac_exec_ext in '' $ac_executable_extensions; do
35056  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35057    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
35058    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35059    break 2
35060  fi
35061done
35062  done
35063IFS=$as_save_IFS
35064
35065fi
35066fi
35067CXX=$ac_cv_prog_CXX
35068if test -n "$CXX"; then
35069  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
35070$as_echo "$CXX" >&6; }
35071else
35072  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35073$as_echo "no" >&6; }
35074fi
35075
35076
35077    test -n "$CXX" && break
35078  done
35079fi
35080if test -z "$CXX"; then
35081  ac_ct_CXX=$CXX
35082  for ac_prog in $CXX
35083do
35084  # Extract the first word of "$ac_prog", so it can be a program name with args.
35085set dummy $ac_prog; ac_word=$2
35086{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35087$as_echo_n "checking for $ac_word... " >&6; }
35088if ${ac_cv_prog_ac_ct_CXX+:} false; then :
35089  $as_echo_n "(cached) " >&6
35090else
35091  if test -n "$ac_ct_CXX"; then
35092  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
35093else
35094as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35095for as_dir in $PATH
35096do
35097  IFS=$as_save_IFS
35098  test -z "$as_dir" && as_dir=.
35099    for ac_exec_ext in '' $ac_executable_extensions; do
35100  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35101    ac_cv_prog_ac_ct_CXX="$ac_prog"
35102    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35103    break 2
35104  fi
35105done
35106  done
35107IFS=$as_save_IFS
35108
35109fi
35110fi
35111ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
35112if test -n "$ac_ct_CXX"; then
35113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
35114$as_echo "$ac_ct_CXX" >&6; }
35115else
35116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35117$as_echo "no" >&6; }
35118fi
35119
35120
35121  test -n "$ac_ct_CXX" && break
35122done
35123
35124  if test "x$ac_ct_CXX" = x; then
35125    CXX="g++"
35126  else
35127    case $cross_compiling:$ac_tool_warned in
35128yes:)
35129{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
35130$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
35131ac_tool_warned=yes ;;
35132esac
35133    CXX=$ac_ct_CXX
35134  fi
35135fi
35136
35137  fi
35138fi
35139# Provide some information about the compiler.
35140$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
35141set X $ac_compile
35142ac_compiler=$2
35143for ac_option in --version -v -V -qversion; do
35144  { { ac_try="$ac_compiler $ac_option >&5"
35145case "(($ac_try" in
35146  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
35147  *) ac_try_echo=$ac_try;;
35148esac
35149eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
35150$as_echo "$ac_try_echo"; } >&5
35151  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
35152  ac_status=$?
35153  if test -s conftest.err; then
35154    sed '10a\
35155... rest of stderr output deleted ...
35156         10q' conftest.err >conftest.er1
35157    cat conftest.er1 >&5
35158  fi
35159  rm -f conftest.er1 conftest.err
35160  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
35161  test $ac_status = 0; }
35162done
35163
35164{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
35165$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
35166if ${ac_cv_cxx_compiler_gnu+:} false; then :
35167  $as_echo_n "(cached) " >&6
35168else
35169  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35170/* end confdefs.h.  */
35171
35172int
35173main ()
35174{
35175#ifndef __GNUC__
35176       choke me
35177#endif
35178
35179  ;
35180  return 0;
35181}
35182_ACEOF
35183if ac_fn_cxx_try_compile "$LINENO"; then :
35184  ac_compiler_gnu=yes
35185else
35186  ac_compiler_gnu=no
35187fi
35188rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35189ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
35190
35191fi
35192{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
35193$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
35194if test $ac_compiler_gnu = yes; then
35195  GXX=yes
35196else
35197  GXX=
35198fi
35199ac_test_CXXFLAGS=${CXXFLAGS+set}
35200ac_save_CXXFLAGS=$CXXFLAGS
35201{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
35202$as_echo_n "checking whether $CXX accepts -g... " >&6; }
35203if ${ac_cv_prog_cxx_g+:} false; then :
35204  $as_echo_n "(cached) " >&6
35205else
35206  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
35207   ac_cxx_werror_flag=yes
35208   ac_cv_prog_cxx_g=no
35209   CXXFLAGS="-g"
35210   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35211/* end confdefs.h.  */
35212
35213int
35214main ()
35215{
35216
35217  ;
35218  return 0;
35219}
35220_ACEOF
35221if ac_fn_cxx_try_compile "$LINENO"; then :
35222  ac_cv_prog_cxx_g=yes
35223else
35224  CXXFLAGS=""
35225      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35226/* end confdefs.h.  */
35227
35228int
35229main ()
35230{
35231
35232  ;
35233  return 0;
35234}
35235_ACEOF
35236if ac_fn_cxx_try_compile "$LINENO"; then :
35237
35238else
35239  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35240	 CXXFLAGS="-g"
35241	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35242/* end confdefs.h.  */
35243
35244int
35245main ()
35246{
35247
35248  ;
35249  return 0;
35250}
35251_ACEOF
35252if ac_fn_cxx_try_compile "$LINENO"; then :
35253  ac_cv_prog_cxx_g=yes
35254fi
35255rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35256fi
35257rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35258fi
35259rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
35260   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
35261fi
35262{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
35263$as_echo "$ac_cv_prog_cxx_g" >&6; }
35264if test "$ac_test_CXXFLAGS" = set; then
35265  CXXFLAGS=$ac_save_CXXFLAGS
35266elif test $ac_cv_prog_cxx_g = yes; then
35267  if test "$GXX" = yes; then
35268    CXXFLAGS="-g -O2"
35269  else
35270    CXXFLAGS="-g"
35271  fi
35272else
35273  if test "$GXX" = yes; then
35274    CXXFLAGS="-O2"
35275  else
35276    CXXFLAGS=
35277  fi
35278fi
35279ac_ext=cpp
35280ac_cpp='$CXXCPP $CPPFLAGS'
35281ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35282ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35283ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35284
35285
35286  # This is the compiler version number on the form X.Y[.Z]
35287
35288
35289
35290
35291  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
35292    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
35293$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
35294    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
35295$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
35296  fi
35297
35298  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
35299  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
35300    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35301$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35302  fi
35303
35304  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
35305    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&5
35306$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
35307  fi
35308
35309  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
35310
35311
35312  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
35313
35314
35315
35316
35317
35318
35319
35320
35321
35322
35323
35324
35325
35326
35327
35328
35329
35330
35331
35332
35333
35334
35335
35336
35337
35338
35339
35340
35341
35342
35343
35344
35345
35346
35347
35348
35349
35350
35351
35352
35353
35354
35355
35356
35357
35358
35359
35360
35361
35362    # Execute function body
35363
35364  # Need to assign to a variable since m4 is blocked from modifying parts in [].
35365  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
35366
35367  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
35368    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
35369  fi
35370
35371  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
35372    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
35373  fi
35374
35375  # Version comparison method inspired by http://stackoverflow.com/a/24067243
35376  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
35377
35378  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
35379    :
35380
35381  else
35382    :
35383
35384          { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&5
35385$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
35386
35387
35388  fi
35389
35390
35391
35392
35393
35394
35395
35396
35397
35398
35399
35400
35401
35402
35403  fi
35404
35405  #
35406  # Setup the preprocessor (CPP and CXXCPP)
35407  #
35408  ac_ext=c
35409ac_cpp='$CPP $CPPFLAGS'
35410ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35411ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35412ac_compiler_gnu=$ac_cv_c_compiler_gnu
35413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
35414$as_echo_n "checking how to run the C preprocessor... " >&6; }
35415# On Suns, sometimes $CPP names a directory.
35416if test -n "$CPP" && test -d "$CPP"; then
35417  CPP=
35418fi
35419if test -z "$CPP"; then
35420  if ${ac_cv_prog_CPP+:} false; then :
35421  $as_echo_n "(cached) " >&6
35422else
35423      # Double quotes because CPP needs to be expanded
35424    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
35425    do
35426      ac_preproc_ok=false
35427for ac_c_preproc_warn_flag in '' yes
35428do
35429  # Use a header file that comes with gcc, so configuring glibc
35430  # with a fresh cross-compiler works.
35431  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35432  # <limits.h> exists even on freestanding compilers.
35433  # On the NeXT, cc -E runs the code through the compiler's parser,
35434  # not just through cpp. "Syntax error" is here to catch this case.
35435  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35436/* end confdefs.h.  */
35437#ifdef __STDC__
35438# include <limits.h>
35439#else
35440# include <assert.h>
35441#endif
35442		     Syntax error
35443_ACEOF
35444if ac_fn_c_try_cpp "$LINENO"; then :
35445
35446else
35447  # Broken: fails on valid input.
35448continue
35449fi
35450rm -f conftest.err conftest.i conftest.$ac_ext
35451
35452  # OK, works on sane cases.  Now check whether nonexistent headers
35453  # can be detected and how.
35454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35455/* end confdefs.h.  */
35456#include <ac_nonexistent.h>
35457_ACEOF
35458if ac_fn_c_try_cpp "$LINENO"; then :
35459  # Broken: success on invalid input.
35460continue
35461else
35462  # Passes both tests.
35463ac_preproc_ok=:
35464break
35465fi
35466rm -f conftest.err conftest.i conftest.$ac_ext
35467
35468done
35469# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35470rm -f conftest.i conftest.err conftest.$ac_ext
35471if $ac_preproc_ok; then :
35472  break
35473fi
35474
35475    done
35476    ac_cv_prog_CPP=$CPP
35477
35478fi
35479  CPP=$ac_cv_prog_CPP
35480else
35481  ac_cv_prog_CPP=$CPP
35482fi
35483{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
35484$as_echo "$CPP" >&6; }
35485ac_preproc_ok=false
35486for ac_c_preproc_warn_flag in '' yes
35487do
35488  # Use a header file that comes with gcc, so configuring glibc
35489  # with a fresh cross-compiler works.
35490  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35491  # <limits.h> exists even on freestanding compilers.
35492  # On the NeXT, cc -E runs the code through the compiler's parser,
35493  # not just through cpp. "Syntax error" is here to catch this case.
35494  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35495/* end confdefs.h.  */
35496#ifdef __STDC__
35497# include <limits.h>
35498#else
35499# include <assert.h>
35500#endif
35501		     Syntax error
35502_ACEOF
35503if ac_fn_c_try_cpp "$LINENO"; then :
35504
35505else
35506  # Broken: fails on valid input.
35507continue
35508fi
35509rm -f conftest.err conftest.i conftest.$ac_ext
35510
35511  # OK, works on sane cases.  Now check whether nonexistent headers
35512  # can be detected and how.
35513  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35514/* end confdefs.h.  */
35515#include <ac_nonexistent.h>
35516_ACEOF
35517if ac_fn_c_try_cpp "$LINENO"; then :
35518  # Broken: success on invalid input.
35519continue
35520else
35521  # Passes both tests.
35522ac_preproc_ok=:
35523break
35524fi
35525rm -f conftest.err conftest.i conftest.$ac_ext
35526
35527done
35528# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35529rm -f conftest.i conftest.err conftest.$ac_ext
35530if $ac_preproc_ok; then :
35531
35532else
35533  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35534$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35535as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35536See \`config.log' for more details" "$LINENO" 5; }
35537fi
35538
35539ac_ext=cpp
35540ac_cpp='$CXXCPP $CPPFLAGS'
35541ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35542ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35543ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35544
35545
35546  # Only process if variable expands to non-empty
35547
35548  if test "x$CPP" != x; then
35549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35550
35551  # First separate the path from the arguments. This will split at the first
35552  # space.
35553  complete="$CPP"
35554  path="${complete%% *}"
35555  tmp="$complete EOL"
35556  arguments="${tmp#* }"
35557
35558  # Input might be given as Windows format, start by converting to
35559  # unix format.
35560  new_path=`$CYGPATH -u "$path"`
35561
35562  # Now try to locate executable using which
35563  new_path=`$WHICH "$new_path" 2> /dev/null`
35564  # bat and cmd files are not always considered executable in cygwin causing which
35565  # to not find them
35566  if test "x$new_path" = x \
35567      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35568      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35569    new_path=`$CYGPATH -u "$path"`
35570  fi
35571  if test "x$new_path" = x; then
35572    # Oops. Which didn't find the executable.
35573    # The splitting of arguments from the executable at a space might have been incorrect,
35574    # since paths with space are more likely in Windows. Give it another try with the whole
35575    # argument.
35576    path="$complete"
35577    arguments="EOL"
35578    new_path=`$CYGPATH -u "$path"`
35579    new_path=`$WHICH "$new_path" 2> /dev/null`
35580    # bat and cmd files are not always considered executable in cygwin causing which
35581    # to not find them
35582    if test "x$new_path" = x \
35583        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35584        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35585      new_path=`$CYGPATH -u "$path"`
35586    fi
35587    if test "x$new_path" = x; then
35588      # It's still not found. Now this is an unrecoverable error.
35589      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35590$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35591      has_space=`$ECHO "$complete" | $GREP " "`
35592      if test "x$has_space" != x; then
35593        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35594$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35595      fi
35596      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35597    fi
35598  fi
35599
35600  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35601  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35602  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35603  # "foo.exe" is OK but "foo" is an error.
35604  #
35605  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35606  # It is also a way to make sure we got the proper file name for the real test later on.
35607  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35608  if test "x$test_shortpath" = x; then
35609    # Short path failed, file does not exist as specified.
35610    # Try adding .exe or .cmd
35611    if test -f "${new_path}.exe"; then
35612      input_to_shortpath="${new_path}.exe"
35613    elif test -f "${new_path}.cmd"; then
35614      input_to_shortpath="${new_path}.cmd"
35615    else
35616      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35617$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35618      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35619$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35620      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35621    fi
35622  else
35623    input_to_shortpath="$new_path"
35624  fi
35625
35626  # Call helper function which possibly converts this using DOS-style short mode.
35627  # If so, the updated path is stored in $new_path.
35628  new_path="$input_to_shortpath"
35629
35630  input_path="$input_to_shortpath"
35631  # Check if we need to convert this using DOS-style short mode. If the path
35632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35633  # take no chances and rewrite it.
35634  # Note: m4 eats our [], so we need to use [ and ] instead.
35635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35636  if test "x$has_forbidden_chars" != x; then
35637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35638    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35639    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35640    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35641      # Going to short mode and back again did indeed matter. Since short mode is
35642      # case insensitive, let's make it lowercase to improve readability.
35643      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35644      # Now convert it back to Unix-style (cygpath)
35645      input_path=`$CYGPATH -u "$shortmode_path"`
35646      new_path="$input_path"
35647    fi
35648  fi
35649
35650  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35651  if test "x$test_cygdrive_prefix" = x; then
35652    # As a simple fix, exclude /usr/bin since it's not a real path.
35653    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35654      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35655      # a path prefixed by /cygdrive for fixpath to work.
35656      new_path="$CYGWIN_ROOT_PATH$input_path"
35657    fi
35658  fi
35659
35660  # remove trailing .exe if any
35661  new_path="${new_path/%.exe/}"
35662
35663    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35664
35665  # First separate the path from the arguments. This will split at the first
35666  # space.
35667  complete="$CPP"
35668  path="${complete%% *}"
35669  tmp="$complete EOL"
35670  arguments="${tmp#* }"
35671
35672  # Input might be given as Windows format, start by converting to
35673  # unix format.
35674  new_path="$path"
35675
35676  windows_path="$new_path"
35677  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35678    unix_path=`$CYGPATH -u "$windows_path"`
35679    new_path="$unix_path"
35680  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35681    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35682    new_path="$unix_path"
35683  fi
35684
35685
35686  # Now try to locate executable using which
35687  new_path=`$WHICH "$new_path" 2> /dev/null`
35688
35689  if test "x$new_path" = x; then
35690    # Oops. Which didn't find the executable.
35691    # The splitting of arguments from the executable at a space might have been incorrect,
35692    # since paths with space are more likely in Windows. Give it another try with the whole
35693    # argument.
35694    path="$complete"
35695    arguments="EOL"
35696    new_path="$path"
35697
35698  windows_path="$new_path"
35699  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35700    unix_path=`$CYGPATH -u "$windows_path"`
35701    new_path="$unix_path"
35702  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35703    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35704    new_path="$unix_path"
35705  fi
35706
35707
35708    new_path=`$WHICH "$new_path" 2> /dev/null`
35709    # bat and cmd files are not always considered executable in MSYS causing which
35710    # to not find them
35711    if test "x$new_path" = x \
35712        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35713        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35714      new_path="$path"
35715
35716  windows_path="$new_path"
35717  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35718    unix_path=`$CYGPATH -u "$windows_path"`
35719    new_path="$unix_path"
35720  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35721    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35722    new_path="$unix_path"
35723  fi
35724
35725    fi
35726
35727    if test "x$new_path" = x; then
35728      # It's still not found. Now this is an unrecoverable error.
35729      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35730$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35731      has_space=`$ECHO "$complete" | $GREP " "`
35732      if test "x$has_space" != x; then
35733        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35734$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35735      fi
35736      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35737    fi
35738  fi
35739
35740  # Now new_path has a complete unix path to the binary
35741  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35742    # Keep paths in /bin as-is, but remove trailing .exe if any
35743    new_path="${new_path/%.exe/}"
35744    # Do not save /bin paths to all_fixpath_prefixes!
35745  else
35746    # Not in mixed or Windows style, start by that.
35747    new_path=`cmd //c echo $new_path`
35748
35749  input_path="$new_path"
35750  # Check if we need to convert this using DOS-style short mode. If the path
35751  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35752  # take no chances and rewrite it.
35753  # Note: m4 eats our [], so we need to use [ and ] instead.
35754  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35755  if test "x$has_forbidden_chars" != x; then
35756    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35757    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35758  fi
35759
35760    # Output is in $new_path
35761
35762  windows_path="$new_path"
35763  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35764    unix_path=`$CYGPATH -u "$windows_path"`
35765    new_path="$unix_path"
35766  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35767    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35768    new_path="$unix_path"
35769  fi
35770
35771    # remove trailing .exe if any
35772    new_path="${new_path/%.exe/}"
35773
35774    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35775    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35776  fi
35777
35778    else
35779      # We're on a unix platform. Hooray! :)
35780      # First separate the path from the arguments. This will split at the first
35781      # space.
35782      complete="$CPP"
35783      path="${complete%% *}"
35784      tmp="$complete EOL"
35785      arguments="${tmp#* }"
35786
35787      # Cannot rely on the command "which" here since it doesn't always work.
35788      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35789      if test -z "$is_absolute_path"; then
35790        # Path to executable is not absolute. Find it.
35791        IFS_save="$IFS"
35792        IFS=:
35793        for p in $PATH; do
35794          if test -f "$p/$path" && test -x "$p/$path"; then
35795            new_path="$p/$path"
35796            break
35797          fi
35798        done
35799        IFS="$IFS_save"
35800      else
35801        # This is an absolute path, we can use it without further modifications.
35802        new_path="$path"
35803      fi
35804
35805      if test "x$new_path" = x; then
35806        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35807$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35808        has_space=`$ECHO "$complete" | $GREP " "`
35809        if test "x$has_space" != x; then
35810          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35811$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35812        fi
35813        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35814      fi
35815    fi
35816
35817    # Now join together the path and the arguments once again
35818    if test "x$arguments" != xEOL; then
35819      new_complete="$new_path ${arguments% *}"
35820    else
35821      new_complete="$new_path"
35822    fi
35823
35824    if test "x$complete" != "x$new_complete"; then
35825      CPP="$new_complete"
35826      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35827$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35828    fi
35829  fi
35830
35831  ac_ext=cpp
35832ac_cpp='$CXXCPP $CPPFLAGS'
35833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35836{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35837$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35838if test -z "$CXXCPP"; then
35839  if ${ac_cv_prog_CXXCPP+:} false; then :
35840  $as_echo_n "(cached) " >&6
35841else
35842      # Double quotes because CXXCPP needs to be expanded
35843    for CXXCPP in "$CXX -E" "/lib/cpp"
35844    do
35845      ac_preproc_ok=false
35846for ac_cxx_preproc_warn_flag in '' yes
35847do
35848  # Use a header file that comes with gcc, so configuring glibc
35849  # with a fresh cross-compiler works.
35850  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35851  # <limits.h> exists even on freestanding compilers.
35852  # On the NeXT, cc -E runs the code through the compiler's parser,
35853  # not just through cpp. "Syntax error" is here to catch this case.
35854  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35855/* end confdefs.h.  */
35856#ifdef __STDC__
35857# include <limits.h>
35858#else
35859# include <assert.h>
35860#endif
35861		     Syntax error
35862_ACEOF
35863if ac_fn_cxx_try_cpp "$LINENO"; then :
35864
35865else
35866  # Broken: fails on valid input.
35867continue
35868fi
35869rm -f conftest.err conftest.i conftest.$ac_ext
35870
35871  # OK, works on sane cases.  Now check whether nonexistent headers
35872  # can be detected and how.
35873  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35874/* end confdefs.h.  */
35875#include <ac_nonexistent.h>
35876_ACEOF
35877if ac_fn_cxx_try_cpp "$LINENO"; then :
35878  # Broken: success on invalid input.
35879continue
35880else
35881  # Passes both tests.
35882ac_preproc_ok=:
35883break
35884fi
35885rm -f conftest.err conftest.i conftest.$ac_ext
35886
35887done
35888# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35889rm -f conftest.i conftest.err conftest.$ac_ext
35890if $ac_preproc_ok; then :
35891  break
35892fi
35893
35894    done
35895    ac_cv_prog_CXXCPP=$CXXCPP
35896
35897fi
35898  CXXCPP=$ac_cv_prog_CXXCPP
35899else
35900  ac_cv_prog_CXXCPP=$CXXCPP
35901fi
35902{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35903$as_echo "$CXXCPP" >&6; }
35904ac_preproc_ok=false
35905for ac_cxx_preproc_warn_flag in '' yes
35906do
35907  # Use a header file that comes with gcc, so configuring glibc
35908  # with a fresh cross-compiler works.
35909  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35910  # <limits.h> exists even on freestanding compilers.
35911  # On the NeXT, cc -E runs the code through the compiler's parser,
35912  # not just through cpp. "Syntax error" is here to catch this case.
35913  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35914/* end confdefs.h.  */
35915#ifdef __STDC__
35916# include <limits.h>
35917#else
35918# include <assert.h>
35919#endif
35920		     Syntax error
35921_ACEOF
35922if ac_fn_cxx_try_cpp "$LINENO"; then :
35923
35924else
35925  # Broken: fails on valid input.
35926continue
35927fi
35928rm -f conftest.err conftest.i conftest.$ac_ext
35929
35930  # OK, works on sane cases.  Now check whether nonexistent headers
35931  # can be detected and how.
35932  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35933/* end confdefs.h.  */
35934#include <ac_nonexistent.h>
35935_ACEOF
35936if ac_fn_cxx_try_cpp "$LINENO"; then :
35937  # Broken: success on invalid input.
35938continue
35939else
35940  # Passes both tests.
35941ac_preproc_ok=:
35942break
35943fi
35944rm -f conftest.err conftest.i conftest.$ac_ext
35945
35946done
35947# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35948rm -f conftest.i conftest.err conftest.$ac_ext
35949if $ac_preproc_ok; then :
35950
35951else
35952  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35953$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35954as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35955See \`config.log' for more details" "$LINENO" 5; }
35956fi
35957
35958ac_ext=cpp
35959ac_cpp='$CXXCPP $CPPFLAGS'
35960ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35961ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35962ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35963
35964
35965  # Only process if variable expands to non-empty
35966
35967  if test "x$CXXCPP" != x; then
35968    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35969
35970  # First separate the path from the arguments. This will split at the first
35971  # space.
35972  complete="$CXXCPP"
35973  path="${complete%% *}"
35974  tmp="$complete EOL"
35975  arguments="${tmp#* }"
35976
35977  # Input might be given as Windows format, start by converting to
35978  # unix format.
35979  new_path=`$CYGPATH -u "$path"`
35980
35981  # Now try to locate executable using which
35982  new_path=`$WHICH "$new_path" 2> /dev/null`
35983  # bat and cmd files are not always considered executable in cygwin causing which
35984  # to not find them
35985  if test "x$new_path" = x \
35986      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35987      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35988    new_path=`$CYGPATH -u "$path"`
35989  fi
35990  if test "x$new_path" = x; then
35991    # Oops. Which didn't find the executable.
35992    # The splitting of arguments from the executable at a space might have been incorrect,
35993    # since paths with space are more likely in Windows. Give it another try with the whole
35994    # argument.
35995    path="$complete"
35996    arguments="EOL"
35997    new_path=`$CYGPATH -u "$path"`
35998    new_path=`$WHICH "$new_path" 2> /dev/null`
35999    # bat and cmd files are not always considered executable in cygwin causing which
36000    # to not find them
36001    if test "x$new_path" = x \
36002        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36003        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36004      new_path=`$CYGPATH -u "$path"`
36005    fi
36006    if test "x$new_path" = x; then
36007      # It's still not found. Now this is an unrecoverable error.
36008      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36009$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36010      has_space=`$ECHO "$complete" | $GREP " "`
36011      if test "x$has_space" != x; then
36012        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36013$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36014      fi
36015      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36016    fi
36017  fi
36018
36019  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36020  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36021  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36022  # "foo.exe" is OK but "foo" is an error.
36023  #
36024  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36025  # It is also a way to make sure we got the proper file name for the real test later on.
36026  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36027  if test "x$test_shortpath" = x; then
36028    # Short path failed, file does not exist as specified.
36029    # Try adding .exe or .cmd
36030    if test -f "${new_path}.exe"; then
36031      input_to_shortpath="${new_path}.exe"
36032    elif test -f "${new_path}.cmd"; then
36033      input_to_shortpath="${new_path}.cmd"
36034    else
36035      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
36036$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
36037      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36038$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36039      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36040    fi
36041  else
36042    input_to_shortpath="$new_path"
36043  fi
36044
36045  # Call helper function which possibly converts this using DOS-style short mode.
36046  # If so, the updated path is stored in $new_path.
36047  new_path="$input_to_shortpath"
36048
36049  input_path="$input_to_shortpath"
36050  # Check if we need to convert this using DOS-style short mode. If the path
36051  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36052  # take no chances and rewrite it.
36053  # Note: m4 eats our [], so we need to use [ and ] instead.
36054  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36055  if test "x$has_forbidden_chars" != x; then
36056    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36057    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36058    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36059    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36060      # Going to short mode and back again did indeed matter. Since short mode is
36061      # case insensitive, let's make it lowercase to improve readability.
36062      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36063      # Now convert it back to Unix-style (cygpath)
36064      input_path=`$CYGPATH -u "$shortmode_path"`
36065      new_path="$input_path"
36066    fi
36067  fi
36068
36069  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36070  if test "x$test_cygdrive_prefix" = x; then
36071    # As a simple fix, exclude /usr/bin since it's not a real path.
36072    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36073      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36074      # a path prefixed by /cygdrive for fixpath to work.
36075      new_path="$CYGWIN_ROOT_PATH$input_path"
36076    fi
36077  fi
36078
36079  # remove trailing .exe if any
36080  new_path="${new_path/%.exe/}"
36081
36082    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36083
36084  # First separate the path from the arguments. This will split at the first
36085  # space.
36086  complete="$CXXCPP"
36087  path="${complete%% *}"
36088  tmp="$complete EOL"
36089  arguments="${tmp#* }"
36090
36091  # Input might be given as Windows format, start by converting to
36092  # unix format.
36093  new_path="$path"
36094
36095  windows_path="$new_path"
36096  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36097    unix_path=`$CYGPATH -u "$windows_path"`
36098    new_path="$unix_path"
36099  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36100    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36101    new_path="$unix_path"
36102  fi
36103
36104
36105  # Now try to locate executable using which
36106  new_path=`$WHICH "$new_path" 2> /dev/null`
36107
36108  if test "x$new_path" = x; then
36109    # Oops. Which didn't find the executable.
36110    # The splitting of arguments from the executable at a space might have been incorrect,
36111    # since paths with space are more likely in Windows. Give it another try with the whole
36112    # argument.
36113    path="$complete"
36114    arguments="EOL"
36115    new_path="$path"
36116
36117  windows_path="$new_path"
36118  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36119    unix_path=`$CYGPATH -u "$windows_path"`
36120    new_path="$unix_path"
36121  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36122    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36123    new_path="$unix_path"
36124  fi
36125
36126
36127    new_path=`$WHICH "$new_path" 2> /dev/null`
36128    # bat and cmd files are not always considered executable in MSYS causing which
36129    # to not find them
36130    if test "x$new_path" = x \
36131        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36132        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36133      new_path="$path"
36134
36135  windows_path="$new_path"
36136  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36137    unix_path=`$CYGPATH -u "$windows_path"`
36138    new_path="$unix_path"
36139  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36140    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36141    new_path="$unix_path"
36142  fi
36143
36144    fi
36145
36146    if test "x$new_path" = x; then
36147      # It's still not found. Now this is an unrecoverable error.
36148      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36149$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36150      has_space=`$ECHO "$complete" | $GREP " "`
36151      if test "x$has_space" != x; then
36152        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36153$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36154      fi
36155      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36156    fi
36157  fi
36158
36159  # Now new_path has a complete unix path to the binary
36160  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36161    # Keep paths in /bin as-is, but remove trailing .exe if any
36162    new_path="${new_path/%.exe/}"
36163    # Do not save /bin paths to all_fixpath_prefixes!
36164  else
36165    # Not in mixed or Windows style, start by that.
36166    new_path=`cmd //c echo $new_path`
36167
36168  input_path="$new_path"
36169  # Check if we need to convert this using DOS-style short mode. If the path
36170  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36171  # take no chances and rewrite it.
36172  # Note: m4 eats our [], so we need to use [ and ] instead.
36173  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36174  if test "x$has_forbidden_chars" != x; then
36175    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36176    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36177  fi
36178
36179    # Output is in $new_path
36180
36181  windows_path="$new_path"
36182  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36183    unix_path=`$CYGPATH -u "$windows_path"`
36184    new_path="$unix_path"
36185  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36186    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36187    new_path="$unix_path"
36188  fi
36189
36190    # remove trailing .exe if any
36191    new_path="${new_path/%.exe/}"
36192
36193    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36194    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36195  fi
36196
36197    else
36198      # We're on a unix platform. Hooray! :)
36199      # First separate the path from the arguments. This will split at the first
36200      # space.
36201      complete="$CXXCPP"
36202      path="${complete%% *}"
36203      tmp="$complete EOL"
36204      arguments="${tmp#* }"
36205
36206      # Cannot rely on the command "which" here since it doesn't always work.
36207      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36208      if test -z "$is_absolute_path"; then
36209        # Path to executable is not absolute. Find it.
36210        IFS_save="$IFS"
36211        IFS=:
36212        for p in $PATH; do
36213          if test -f "$p/$path" && test -x "$p/$path"; then
36214            new_path="$p/$path"
36215            break
36216          fi
36217        done
36218        IFS="$IFS_save"
36219      else
36220        # This is an absolute path, we can use it without further modifications.
36221        new_path="$path"
36222      fi
36223
36224      if test "x$new_path" = x; then
36225        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
36226$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
36227        has_space=`$ECHO "$complete" | $GREP " "`
36228        if test "x$has_space" != x; then
36229          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36230$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36231        fi
36232        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
36233      fi
36234    fi
36235
36236    # Now join together the path and the arguments once again
36237    if test "x$arguments" != xEOL; then
36238      new_complete="$new_path ${arguments% *}"
36239    else
36240      new_complete="$new_path"
36241    fi
36242
36243    if test "x$complete" != "x$new_complete"; then
36244      CXXCPP="$new_complete"
36245      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
36246$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
36247    fi
36248  fi
36249
36250
36251  #
36252  # Setup the linker (LD)
36253  #
36254  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36255    # In the Microsoft toolchain we have a separate LD command "link".
36256    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
36257    # a cygwin program for something completely different.
36258    # Extract the first word of "link", so it can be a program name with args.
36259set dummy link; ac_word=$2
36260{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36261$as_echo_n "checking for $ac_word... " >&6; }
36262if ${ac_cv_prog_LD+:} false; then :
36263  $as_echo_n "(cached) " >&6
36264else
36265  if test -n "$LD"; then
36266  ac_cv_prog_LD="$LD" # Let the user override the test.
36267else
36268  ac_prog_rejected=no
36269as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36270for as_dir in $PATH
36271do
36272  IFS=$as_save_IFS
36273  test -z "$as_dir" && as_dir=.
36274    for ac_exec_ext in '' $ac_executable_extensions; do
36275  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36276    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
36277       ac_prog_rejected=yes
36278       continue
36279     fi
36280    ac_cv_prog_LD="link"
36281    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36282    break 2
36283  fi
36284done
36285  done
36286IFS=$as_save_IFS
36287
36288if test $ac_prog_rejected = yes; then
36289  # We found a bogon in the path, so make sure we never use it.
36290  set dummy $ac_cv_prog_LD
36291  shift
36292  if test $# != 0; then
36293    # We chose a different compiler from the bogus one.
36294    # However, it has the same basename, so the bogon will be chosen
36295    # first if we set LD to just the basename; use the full file name.
36296    shift
36297    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
36298  fi
36299fi
36300fi
36301fi
36302LD=$ac_cv_prog_LD
36303if test -n "$LD"; then
36304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
36305$as_echo "$LD" >&6; }
36306else
36307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36308$as_echo "no" >&6; }
36309fi
36310
36311
36312
36313  # Only process if variable expands to non-empty
36314
36315  if test "x$LD" != x; then
36316    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36317
36318  # First separate the path from the arguments. This will split at the first
36319  # space.
36320  complete="$LD"
36321  path="${complete%% *}"
36322  tmp="$complete EOL"
36323  arguments="${tmp#* }"
36324
36325  # Input might be given as Windows format, start by converting to
36326  # unix format.
36327  new_path=`$CYGPATH -u "$path"`
36328
36329  # Now try to locate executable using which
36330  new_path=`$WHICH "$new_path" 2> /dev/null`
36331  # bat and cmd files are not always considered executable in cygwin causing which
36332  # to not find them
36333  if test "x$new_path" = x \
36334      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36335      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36336    new_path=`$CYGPATH -u "$path"`
36337  fi
36338  if test "x$new_path" = x; then
36339    # Oops. Which didn't find the executable.
36340    # The splitting of arguments from the executable at a space might have been incorrect,
36341    # since paths with space are more likely in Windows. Give it another try with the whole
36342    # argument.
36343    path="$complete"
36344    arguments="EOL"
36345    new_path=`$CYGPATH -u "$path"`
36346    new_path=`$WHICH "$new_path" 2> /dev/null`
36347    # bat and cmd files are not always considered executable in cygwin causing which
36348    # to not find them
36349    if test "x$new_path" = x \
36350        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36351        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36352      new_path=`$CYGPATH -u "$path"`
36353    fi
36354    if test "x$new_path" = x; then
36355      # It's still not found. Now this is an unrecoverable error.
36356      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36357$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36358      has_space=`$ECHO "$complete" | $GREP " "`
36359      if test "x$has_space" != x; then
36360        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36361$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36362      fi
36363      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36364    fi
36365  fi
36366
36367  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36368  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36369  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36370  # "foo.exe" is OK but "foo" is an error.
36371  #
36372  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36373  # It is also a way to make sure we got the proper file name for the real test later on.
36374  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36375  if test "x$test_shortpath" = x; then
36376    # Short path failed, file does not exist as specified.
36377    # Try adding .exe or .cmd
36378    if test -f "${new_path}.exe"; then
36379      input_to_shortpath="${new_path}.exe"
36380    elif test -f "${new_path}.cmd"; then
36381      input_to_shortpath="${new_path}.cmd"
36382    else
36383      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
36384$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
36385      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36386$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36387      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36388    fi
36389  else
36390    input_to_shortpath="$new_path"
36391  fi
36392
36393  # Call helper function which possibly converts this using DOS-style short mode.
36394  # If so, the updated path is stored in $new_path.
36395  new_path="$input_to_shortpath"
36396
36397  input_path="$input_to_shortpath"
36398  # Check if we need to convert this using DOS-style short mode. If the path
36399  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36400  # take no chances and rewrite it.
36401  # Note: m4 eats our [], so we need to use [ and ] instead.
36402  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36403  if test "x$has_forbidden_chars" != x; then
36404    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36405    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36406    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36407    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36408      # Going to short mode and back again did indeed matter. Since short mode is
36409      # case insensitive, let's make it lowercase to improve readability.
36410      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36411      # Now convert it back to Unix-style (cygpath)
36412      input_path=`$CYGPATH -u "$shortmode_path"`
36413      new_path="$input_path"
36414    fi
36415  fi
36416
36417  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36418  if test "x$test_cygdrive_prefix" = x; then
36419    # As a simple fix, exclude /usr/bin since it's not a real path.
36420    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36421      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36422      # a path prefixed by /cygdrive for fixpath to work.
36423      new_path="$CYGWIN_ROOT_PATH$input_path"
36424    fi
36425  fi
36426
36427  # remove trailing .exe if any
36428  new_path="${new_path/%.exe/}"
36429
36430    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36431
36432  # First separate the path from the arguments. This will split at the first
36433  # space.
36434  complete="$LD"
36435  path="${complete%% *}"
36436  tmp="$complete EOL"
36437  arguments="${tmp#* }"
36438
36439  # Input might be given as Windows format, start by converting to
36440  # unix format.
36441  new_path="$path"
36442
36443  windows_path="$new_path"
36444  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36445    unix_path=`$CYGPATH -u "$windows_path"`
36446    new_path="$unix_path"
36447  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36448    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36449    new_path="$unix_path"
36450  fi
36451
36452
36453  # Now try to locate executable using which
36454  new_path=`$WHICH "$new_path" 2> /dev/null`
36455
36456  if test "x$new_path" = x; then
36457    # Oops. Which didn't find the executable.
36458    # The splitting of arguments from the executable at a space might have been incorrect,
36459    # since paths with space are more likely in Windows. Give it another try with the whole
36460    # argument.
36461    path="$complete"
36462    arguments="EOL"
36463    new_path="$path"
36464
36465  windows_path="$new_path"
36466  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36467    unix_path=`$CYGPATH -u "$windows_path"`
36468    new_path="$unix_path"
36469  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36470    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36471    new_path="$unix_path"
36472  fi
36473
36474
36475    new_path=`$WHICH "$new_path" 2> /dev/null`
36476    # bat and cmd files are not always considered executable in MSYS causing which
36477    # to not find them
36478    if test "x$new_path" = x \
36479        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36480        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36481      new_path="$path"
36482
36483  windows_path="$new_path"
36484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36485    unix_path=`$CYGPATH -u "$windows_path"`
36486    new_path="$unix_path"
36487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36489    new_path="$unix_path"
36490  fi
36491
36492    fi
36493
36494    if test "x$new_path" = x; then
36495      # It's still not found. Now this is an unrecoverable error.
36496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36497$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36498      has_space=`$ECHO "$complete" | $GREP " "`
36499      if test "x$has_space" != x; then
36500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36502      fi
36503      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36504    fi
36505  fi
36506
36507  # Now new_path has a complete unix path to the binary
36508  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36509    # Keep paths in /bin as-is, but remove trailing .exe if any
36510    new_path="${new_path/%.exe/}"
36511    # Do not save /bin paths to all_fixpath_prefixes!
36512  else
36513    # Not in mixed or Windows style, start by that.
36514    new_path=`cmd //c echo $new_path`
36515
36516  input_path="$new_path"
36517  # Check if we need to convert this using DOS-style short mode. If the path
36518  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36519  # take no chances and rewrite it.
36520  # Note: m4 eats our [], so we need to use [ and ] instead.
36521  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36522  if test "x$has_forbidden_chars" != x; then
36523    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36524    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36525  fi
36526
36527    # Output is in $new_path
36528
36529  windows_path="$new_path"
36530  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36531    unix_path=`$CYGPATH -u "$windows_path"`
36532    new_path="$unix_path"
36533  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36534    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36535    new_path="$unix_path"
36536  fi
36537
36538    # remove trailing .exe if any
36539    new_path="${new_path/%.exe/}"
36540
36541    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36542    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36543  fi
36544
36545    else
36546      # We're on a unix platform. Hooray! :)
36547      # First separate the path from the arguments. This will split at the first
36548      # space.
36549      complete="$LD"
36550      path="${complete%% *}"
36551      tmp="$complete EOL"
36552      arguments="${tmp#* }"
36553
36554      # Cannot rely on the command "which" here since it doesn't always work.
36555      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36556      if test -z "$is_absolute_path"; then
36557        # Path to executable is not absolute. Find it.
36558        IFS_save="$IFS"
36559        IFS=:
36560        for p in $PATH; do
36561          if test -f "$p/$path" && test -x "$p/$path"; then
36562            new_path="$p/$path"
36563            break
36564          fi
36565        done
36566        IFS="$IFS_save"
36567      else
36568        # This is an absolute path, we can use it without further modifications.
36569        new_path="$path"
36570      fi
36571
36572      if test "x$new_path" = x; then
36573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36574$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36575        has_space=`$ECHO "$complete" | $GREP " "`
36576        if test "x$has_space" != x; then
36577          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36578$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36579        fi
36580        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36581      fi
36582    fi
36583
36584    # Now join together the path and the arguments once again
36585    if test "x$arguments" != xEOL; then
36586      new_complete="$new_path ${arguments% *}"
36587    else
36588      new_complete="$new_path"
36589    fi
36590
36591    if test "x$complete" != "x$new_complete"; then
36592      LD="$new_complete"
36593      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36594$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36595    fi
36596  fi
36597
36598    # Verify that we indeed succeeded with this trick.
36599    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36600$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36601    "$LD" --version > /dev/null
36602    if test $? -eq 0 ; then
36603      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36604$as_echo "no" >&6; }
36605      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36606    else
36607      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36608$as_echo "yes" >&6; }
36609    fi
36610    LDCXX="$LD"
36611  else
36612    # All other toolchains use the compiler to link.
36613    LD="$CC"
36614    LDCXX="$CXX"
36615  fi
36616
36617  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36618
36619
36620  #
36621  # Setup the assembler (AS)
36622  #
36623  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36624    # FIXME: should this really be solaris, or solstudio?
36625
36626
36627  # Publish this variable in the help.
36628
36629
36630  if [ -z "${AS+x}" ]; then
36631    # The variable is not set by user, try to locate tool using the code snippet
36632    for ac_prog in as
36633do
36634  # Extract the first word of "$ac_prog", so it can be a program name with args.
36635set dummy $ac_prog; ac_word=$2
36636{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36637$as_echo_n "checking for $ac_word... " >&6; }
36638if ${ac_cv_path_AS+:} false; then :
36639  $as_echo_n "(cached) " >&6
36640else
36641  case $AS in
36642  [\\/]* | ?:[\\/]*)
36643  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36644  ;;
36645  *)
36646  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36647for as_dir in $PATH
36648do
36649  IFS=$as_save_IFS
36650  test -z "$as_dir" && as_dir=.
36651    for ac_exec_ext in '' $ac_executable_extensions; do
36652  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36653    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36654    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36655    break 2
36656  fi
36657done
36658  done
36659IFS=$as_save_IFS
36660
36661  ;;
36662esac
36663fi
36664AS=$ac_cv_path_AS
36665if test -n "$AS"; then
36666  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36667$as_echo "$AS" >&6; }
36668else
36669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36670$as_echo "no" >&6; }
36671fi
36672
36673
36674  test -n "$AS" && break
36675done
36676
36677  else
36678    # The variable is set, but is it from the command line or the environment?
36679
36680    # Try to remove the string !AS! from our list.
36681    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36682    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36683      # If it failed, the variable was not from the command line. Ignore it,
36684      # but warn the user (except for BASH, which is always set by the calling BASH).
36685      if test "xAS" != xBASH; then
36686        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36687$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36688      fi
36689      # Try to locate tool using the code snippet
36690      for ac_prog in as
36691do
36692  # Extract the first word of "$ac_prog", so it can be a program name with args.
36693set dummy $ac_prog; ac_word=$2
36694{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36695$as_echo_n "checking for $ac_word... " >&6; }
36696if ${ac_cv_path_AS+:} false; then :
36697  $as_echo_n "(cached) " >&6
36698else
36699  case $AS in
36700  [\\/]* | ?:[\\/]*)
36701  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36702  ;;
36703  *)
36704  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36705for as_dir in $PATH
36706do
36707  IFS=$as_save_IFS
36708  test -z "$as_dir" && as_dir=.
36709    for ac_exec_ext in '' $ac_executable_extensions; do
36710  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36711    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36712    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36713    break 2
36714  fi
36715done
36716  done
36717IFS=$as_save_IFS
36718
36719  ;;
36720esac
36721fi
36722AS=$ac_cv_path_AS
36723if test -n "$AS"; then
36724  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36725$as_echo "$AS" >&6; }
36726else
36727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36728$as_echo "no" >&6; }
36729fi
36730
36731
36732  test -n "$AS" && break
36733done
36734
36735    else
36736      # If it succeeded, then it was overridden by the user. We will use it
36737      # for the tool.
36738
36739      # First remove it from the list of overridden variables, so we can test
36740      # for unknown variables in the end.
36741      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36742
36743      # Check if we try to supply an empty value
36744      if test "x$AS" = x; then
36745        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36746$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36747        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36748$as_echo_n "checking for AS... " >&6; }
36749        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36750$as_echo "disabled" >&6; }
36751      else
36752        # Check if the provided tool contains a complete path.
36753        tool_specified="$AS"
36754        tool_basename="${tool_specified##*/}"
36755        if test "x$tool_basename" = "x$tool_specified"; then
36756          # A command without a complete path is provided, search $PATH.
36757          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36758$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36759          # Extract the first word of "$tool_basename", so it can be a program name with args.
36760set dummy $tool_basename; ac_word=$2
36761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36762$as_echo_n "checking for $ac_word... " >&6; }
36763if ${ac_cv_path_AS+:} false; then :
36764  $as_echo_n "(cached) " >&6
36765else
36766  case $AS in
36767  [\\/]* | ?:[\\/]*)
36768  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36769  ;;
36770  *)
36771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36772for as_dir in $PATH
36773do
36774  IFS=$as_save_IFS
36775  test -z "$as_dir" && as_dir=.
36776    for ac_exec_ext in '' $ac_executable_extensions; do
36777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36778    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36780    break 2
36781  fi
36782done
36783  done
36784IFS=$as_save_IFS
36785
36786  ;;
36787esac
36788fi
36789AS=$ac_cv_path_AS
36790if test -n "$AS"; then
36791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36792$as_echo "$AS" >&6; }
36793else
36794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36795$as_echo "no" >&6; }
36796fi
36797
36798
36799          if test "x$AS" = x; then
36800            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36801          fi
36802        else
36803          # Otherwise we believe it is a complete path. Use it as it is.
36804          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36805$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36806          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36807$as_echo_n "checking for AS... " >&6; }
36808          if test ! -x "$tool_specified"; then
36809            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36810$as_echo "not found" >&6; }
36811            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36812          fi
36813          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36814$as_echo "$tool_specified" >&6; }
36815        fi
36816      fi
36817    fi
36818
36819  fi
36820
36821
36822
36823  # Only process if variable expands to non-empty
36824
36825  if test "x$AS" != x; then
36826    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36827
36828  # First separate the path from the arguments. This will split at the first
36829  # space.
36830  complete="$AS"
36831  path="${complete%% *}"
36832  tmp="$complete EOL"
36833  arguments="${tmp#* }"
36834
36835  # Input might be given as Windows format, start by converting to
36836  # unix format.
36837  new_path=`$CYGPATH -u "$path"`
36838
36839  # Now try to locate executable using which
36840  new_path=`$WHICH "$new_path" 2> /dev/null`
36841  # bat and cmd files are not always considered executable in cygwin causing which
36842  # to not find them
36843  if test "x$new_path" = x \
36844      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36845      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36846    new_path=`$CYGPATH -u "$path"`
36847  fi
36848  if test "x$new_path" = x; then
36849    # Oops. Which didn't find the executable.
36850    # The splitting of arguments from the executable at a space might have been incorrect,
36851    # since paths with space are more likely in Windows. Give it another try with the whole
36852    # argument.
36853    path="$complete"
36854    arguments="EOL"
36855    new_path=`$CYGPATH -u "$path"`
36856    new_path=`$WHICH "$new_path" 2> /dev/null`
36857    # bat and cmd files are not always considered executable in cygwin causing which
36858    # to not find them
36859    if test "x$new_path" = x \
36860        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36861        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36862      new_path=`$CYGPATH -u "$path"`
36863    fi
36864    if test "x$new_path" = x; then
36865      # It's still not found. Now this is an unrecoverable error.
36866      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36867$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36868      has_space=`$ECHO "$complete" | $GREP " "`
36869      if test "x$has_space" != x; then
36870        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36871$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36872      fi
36873      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36874    fi
36875  fi
36876
36877  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36878  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36879  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36880  # "foo.exe" is OK but "foo" is an error.
36881  #
36882  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36883  # It is also a way to make sure we got the proper file name for the real test later on.
36884  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36885  if test "x$test_shortpath" = x; then
36886    # Short path failed, file does not exist as specified.
36887    # Try adding .exe or .cmd
36888    if test -f "${new_path}.exe"; then
36889      input_to_shortpath="${new_path}.exe"
36890    elif test -f "${new_path}.cmd"; then
36891      input_to_shortpath="${new_path}.cmd"
36892    else
36893      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36894$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36895      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36896$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36897      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36898    fi
36899  else
36900    input_to_shortpath="$new_path"
36901  fi
36902
36903  # Call helper function which possibly converts this using DOS-style short mode.
36904  # If so, the updated path is stored in $new_path.
36905  new_path="$input_to_shortpath"
36906
36907  input_path="$input_to_shortpath"
36908  # Check if we need to convert this using DOS-style short mode. If the path
36909  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36910  # take no chances and rewrite it.
36911  # Note: m4 eats our [], so we need to use [ and ] instead.
36912  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36913  if test "x$has_forbidden_chars" != x; then
36914    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36915    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36916    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36917    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36918      # Going to short mode and back again did indeed matter. Since short mode is
36919      # case insensitive, let's make it lowercase to improve readability.
36920      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36921      # Now convert it back to Unix-style (cygpath)
36922      input_path=`$CYGPATH -u "$shortmode_path"`
36923      new_path="$input_path"
36924    fi
36925  fi
36926
36927  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36928  if test "x$test_cygdrive_prefix" = x; then
36929    # As a simple fix, exclude /usr/bin since it's not a real path.
36930    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36931      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36932      # a path prefixed by /cygdrive for fixpath to work.
36933      new_path="$CYGWIN_ROOT_PATH$input_path"
36934    fi
36935  fi
36936
36937  # remove trailing .exe if any
36938  new_path="${new_path/%.exe/}"
36939
36940    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36941
36942  # First separate the path from the arguments. This will split at the first
36943  # space.
36944  complete="$AS"
36945  path="${complete%% *}"
36946  tmp="$complete EOL"
36947  arguments="${tmp#* }"
36948
36949  # Input might be given as Windows format, start by converting to
36950  # unix format.
36951  new_path="$path"
36952
36953  windows_path="$new_path"
36954  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36955    unix_path=`$CYGPATH -u "$windows_path"`
36956    new_path="$unix_path"
36957  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36958    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36959    new_path="$unix_path"
36960  fi
36961
36962
36963  # Now try to locate executable using which
36964  new_path=`$WHICH "$new_path" 2> /dev/null`
36965
36966  if test "x$new_path" = x; then
36967    # Oops. Which didn't find the executable.
36968    # The splitting of arguments from the executable at a space might have been incorrect,
36969    # since paths with space are more likely in Windows. Give it another try with the whole
36970    # argument.
36971    path="$complete"
36972    arguments="EOL"
36973    new_path="$path"
36974
36975  windows_path="$new_path"
36976  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36977    unix_path=`$CYGPATH -u "$windows_path"`
36978    new_path="$unix_path"
36979  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36980    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36981    new_path="$unix_path"
36982  fi
36983
36984
36985    new_path=`$WHICH "$new_path" 2> /dev/null`
36986    # bat and cmd files are not always considered executable in MSYS causing which
36987    # to not find them
36988    if test "x$new_path" = x \
36989        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36990        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36991      new_path="$path"
36992
36993  windows_path="$new_path"
36994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36995    unix_path=`$CYGPATH -u "$windows_path"`
36996    new_path="$unix_path"
36997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36999    new_path="$unix_path"
37000  fi
37001
37002    fi
37003
37004    if test "x$new_path" = x; then
37005      # It's still not found. Now this is an unrecoverable error.
37006      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37007$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37008      has_space=`$ECHO "$complete" | $GREP " "`
37009      if test "x$has_space" != x; then
37010        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37011$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37012      fi
37013      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37014    fi
37015  fi
37016
37017  # Now new_path has a complete unix path to the binary
37018  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37019    # Keep paths in /bin as-is, but remove trailing .exe if any
37020    new_path="${new_path/%.exe/}"
37021    # Do not save /bin paths to all_fixpath_prefixes!
37022  else
37023    # Not in mixed or Windows style, start by that.
37024    new_path=`cmd //c echo $new_path`
37025
37026  input_path="$new_path"
37027  # Check if we need to convert this using DOS-style short mode. If the path
37028  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37029  # take no chances and rewrite it.
37030  # Note: m4 eats our [], so we need to use [ and ] instead.
37031  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37032  if test "x$has_forbidden_chars" != x; then
37033    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37034    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37035  fi
37036
37037    # Output is in $new_path
37038
37039  windows_path="$new_path"
37040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37041    unix_path=`$CYGPATH -u "$windows_path"`
37042    new_path="$unix_path"
37043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37044    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37045    new_path="$unix_path"
37046  fi
37047
37048    # remove trailing .exe if any
37049    new_path="${new_path/%.exe/}"
37050
37051    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37052    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37053  fi
37054
37055    else
37056      # We're on a unix platform. Hooray! :)
37057      # First separate the path from the arguments. This will split at the first
37058      # space.
37059      complete="$AS"
37060      path="${complete%% *}"
37061      tmp="$complete EOL"
37062      arguments="${tmp#* }"
37063
37064      # Cannot rely on the command "which" here since it doesn't always work.
37065      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37066      if test -z "$is_absolute_path"; then
37067        # Path to executable is not absolute. Find it.
37068        IFS_save="$IFS"
37069        IFS=:
37070        for p in $PATH; do
37071          if test -f "$p/$path" && test -x "$p/$path"; then
37072            new_path="$p/$path"
37073            break
37074          fi
37075        done
37076        IFS="$IFS_save"
37077      else
37078        # This is an absolute path, we can use it without further modifications.
37079        new_path="$path"
37080      fi
37081
37082      if test "x$new_path" = x; then
37083        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
37084$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
37085        has_space=`$ECHO "$complete" | $GREP " "`
37086        if test "x$has_space" != x; then
37087          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37088$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37089        fi
37090        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
37091      fi
37092    fi
37093
37094    # Now join together the path and the arguments once again
37095    if test "x$arguments" != xEOL; then
37096      new_complete="$new_path ${arguments% *}"
37097    else
37098      new_complete="$new_path"
37099    fi
37100
37101    if test "x$complete" != "x$new_complete"; then
37102      AS="$new_complete"
37103      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
37104$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
37105    fi
37106  fi
37107
37108  else
37109    # FIXME: is this correct for microsoft?
37110    AS="$CC -c"
37111  fi
37112
37113
37114  #
37115  # Setup the archiver (AR)
37116  #
37117  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
37118    # The corresponding ar tool is lib.exe (used to create static libraries)
37119    # Extract the first word of "lib", so it can be a program name with args.
37120set dummy lib; ac_word=$2
37121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37122$as_echo_n "checking for $ac_word... " >&6; }
37123if ${ac_cv_prog_AR+:} false; then :
37124  $as_echo_n "(cached) " >&6
37125else
37126  if test -n "$AR"; then
37127  ac_cv_prog_AR="$AR" # Let the user override the test.
37128else
37129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37130for as_dir in $PATH
37131do
37132  IFS=$as_save_IFS
37133  test -z "$as_dir" && as_dir=.
37134    for ac_exec_ext in '' $ac_executable_extensions; do
37135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37136    ac_cv_prog_AR="lib"
37137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37138    break 2
37139  fi
37140done
37141  done
37142IFS=$as_save_IFS
37143
37144fi
37145fi
37146AR=$ac_cv_prog_AR
37147if test -n "$AR"; then
37148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37149$as_echo "$AR" >&6; }
37150else
37151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37152$as_echo "no" >&6; }
37153fi
37154
37155
37156  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
37157
37158
37159  # Publish this variable in the help.
37160
37161
37162  if [ -z "${AR+x}" ]; then
37163    # The variable is not set by user, try to locate tool using the code snippet
37164    if test -n "$ac_tool_prefix"; then
37165  for ac_prog in ar gcc-ar
37166  do
37167    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37168set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37170$as_echo_n "checking for $ac_word... " >&6; }
37171if ${ac_cv_prog_AR+:} false; then :
37172  $as_echo_n "(cached) " >&6
37173else
37174  if test -n "$AR"; then
37175  ac_cv_prog_AR="$AR" # Let the user override the test.
37176else
37177as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37178for as_dir in $PATH
37179do
37180  IFS=$as_save_IFS
37181  test -z "$as_dir" && as_dir=.
37182    for ac_exec_ext in '' $ac_executable_extensions; do
37183  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37184    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37185    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37186    break 2
37187  fi
37188done
37189  done
37190IFS=$as_save_IFS
37191
37192fi
37193fi
37194AR=$ac_cv_prog_AR
37195if test -n "$AR"; then
37196  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37197$as_echo "$AR" >&6; }
37198else
37199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37200$as_echo "no" >&6; }
37201fi
37202
37203
37204    test -n "$AR" && break
37205  done
37206fi
37207if test -z "$AR"; then
37208  ac_ct_AR=$AR
37209  for ac_prog in ar gcc-ar
37210do
37211  # Extract the first word of "$ac_prog", so it can be a program name with args.
37212set dummy $ac_prog; ac_word=$2
37213{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37214$as_echo_n "checking for $ac_word... " >&6; }
37215if ${ac_cv_prog_ac_ct_AR+:} false; then :
37216  $as_echo_n "(cached) " >&6
37217else
37218  if test -n "$ac_ct_AR"; then
37219  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37220else
37221as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37222for as_dir in $PATH
37223do
37224  IFS=$as_save_IFS
37225  test -z "$as_dir" && as_dir=.
37226    for ac_exec_ext in '' $ac_executable_extensions; do
37227  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37228    ac_cv_prog_ac_ct_AR="$ac_prog"
37229    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37230    break 2
37231  fi
37232done
37233  done
37234IFS=$as_save_IFS
37235
37236fi
37237fi
37238ac_ct_AR=$ac_cv_prog_ac_ct_AR
37239if test -n "$ac_ct_AR"; then
37240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37241$as_echo "$ac_ct_AR" >&6; }
37242else
37243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37244$as_echo "no" >&6; }
37245fi
37246
37247
37248  test -n "$ac_ct_AR" && break
37249done
37250
37251  if test "x$ac_ct_AR" = x; then
37252    AR=""
37253  else
37254    case $cross_compiling:$ac_tool_warned in
37255yes:)
37256{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37257$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37258ac_tool_warned=yes ;;
37259esac
37260    AR=$ac_ct_AR
37261  fi
37262fi
37263
37264  else
37265    # The variable is set, but is it from the command line or the environment?
37266
37267    # Try to remove the string !AR! from our list.
37268    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37269    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37270      # If it failed, the variable was not from the command line. Ignore it,
37271      # but warn the user (except for BASH, which is always set by the calling BASH).
37272      if test "xAR" != xBASH; then
37273        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37274$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37275      fi
37276      # Try to locate tool using the code snippet
37277      if test -n "$ac_tool_prefix"; then
37278  for ac_prog in ar gcc-ar
37279  do
37280    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37281set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37282{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37283$as_echo_n "checking for $ac_word... " >&6; }
37284if ${ac_cv_prog_AR+:} false; then :
37285  $as_echo_n "(cached) " >&6
37286else
37287  if test -n "$AR"; then
37288  ac_cv_prog_AR="$AR" # Let the user override the test.
37289else
37290as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37291for as_dir in $PATH
37292do
37293  IFS=$as_save_IFS
37294  test -z "$as_dir" && as_dir=.
37295    for ac_exec_ext in '' $ac_executable_extensions; do
37296  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37297    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37298    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37299    break 2
37300  fi
37301done
37302  done
37303IFS=$as_save_IFS
37304
37305fi
37306fi
37307AR=$ac_cv_prog_AR
37308if test -n "$AR"; then
37309  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37310$as_echo "$AR" >&6; }
37311else
37312  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37313$as_echo "no" >&6; }
37314fi
37315
37316
37317    test -n "$AR" && break
37318  done
37319fi
37320if test -z "$AR"; then
37321  ac_ct_AR=$AR
37322  for ac_prog in ar gcc-ar
37323do
37324  # Extract the first word of "$ac_prog", so it can be a program name with args.
37325set dummy $ac_prog; ac_word=$2
37326{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37327$as_echo_n "checking for $ac_word... " >&6; }
37328if ${ac_cv_prog_ac_ct_AR+:} false; then :
37329  $as_echo_n "(cached) " >&6
37330else
37331  if test -n "$ac_ct_AR"; then
37332  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37333else
37334as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37335for as_dir in $PATH
37336do
37337  IFS=$as_save_IFS
37338  test -z "$as_dir" && as_dir=.
37339    for ac_exec_ext in '' $ac_executable_extensions; do
37340  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37341    ac_cv_prog_ac_ct_AR="$ac_prog"
37342    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37343    break 2
37344  fi
37345done
37346  done
37347IFS=$as_save_IFS
37348
37349fi
37350fi
37351ac_ct_AR=$ac_cv_prog_ac_ct_AR
37352if test -n "$ac_ct_AR"; then
37353  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37354$as_echo "$ac_ct_AR" >&6; }
37355else
37356  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37357$as_echo "no" >&6; }
37358fi
37359
37360
37361  test -n "$ac_ct_AR" && break
37362done
37363
37364  if test "x$ac_ct_AR" = x; then
37365    AR=""
37366  else
37367    case $cross_compiling:$ac_tool_warned in
37368yes:)
37369{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37370$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37371ac_tool_warned=yes ;;
37372esac
37373    AR=$ac_ct_AR
37374  fi
37375fi
37376
37377    else
37378      # If it succeeded, then it was overridden by the user. We will use it
37379      # for the tool.
37380
37381      # First remove it from the list of overridden variables, so we can test
37382      # for unknown variables in the end.
37383      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37384
37385      # Check if we try to supply an empty value
37386      if test "x$AR" = x; then
37387        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37388$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37389        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37390$as_echo_n "checking for AR... " >&6; }
37391        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37392$as_echo "disabled" >&6; }
37393      else
37394        # Check if the provided tool contains a complete path.
37395        tool_specified="$AR"
37396        tool_basename="${tool_specified##*/}"
37397        if test "x$tool_basename" = "x$tool_specified"; then
37398          # A command without a complete path is provided, search $PATH.
37399          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37400$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37401          # Extract the first word of "$tool_basename", so it can be a program name with args.
37402set dummy $tool_basename; ac_word=$2
37403{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37404$as_echo_n "checking for $ac_word... " >&6; }
37405if ${ac_cv_path_AR+:} false; then :
37406  $as_echo_n "(cached) " >&6
37407else
37408  case $AR in
37409  [\\/]* | ?:[\\/]*)
37410  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37411  ;;
37412  *)
37413  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37414for as_dir in $PATH
37415do
37416  IFS=$as_save_IFS
37417  test -z "$as_dir" && as_dir=.
37418    for ac_exec_ext in '' $ac_executable_extensions; do
37419  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37420    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37422    break 2
37423  fi
37424done
37425  done
37426IFS=$as_save_IFS
37427
37428  ;;
37429esac
37430fi
37431AR=$ac_cv_path_AR
37432if test -n "$AR"; then
37433  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37434$as_echo "$AR" >&6; }
37435else
37436  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37437$as_echo "no" >&6; }
37438fi
37439
37440
37441          if test "x$AR" = x; then
37442            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37443          fi
37444        else
37445          # Otherwise we believe it is a complete path. Use it as it is.
37446          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37447$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37448          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37449$as_echo_n "checking for AR... " >&6; }
37450          if test ! -x "$tool_specified"; then
37451            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37452$as_echo "not found" >&6; }
37453            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37454          fi
37455          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37456$as_echo "$tool_specified" >&6; }
37457        fi
37458      fi
37459    fi
37460
37461  fi
37462
37463
37464  else
37465
37466
37467  # Publish this variable in the help.
37468
37469
37470  if [ -z "${AR+x}" ]; then
37471    # The variable is not set by user, try to locate tool using the code snippet
37472    if test -n "$ac_tool_prefix"; then
37473  for ac_prog in ar
37474  do
37475    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37476set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37478$as_echo_n "checking for $ac_word... " >&6; }
37479if ${ac_cv_prog_AR+:} false; then :
37480  $as_echo_n "(cached) " >&6
37481else
37482  if test -n "$AR"; then
37483  ac_cv_prog_AR="$AR" # Let the user override the test.
37484else
37485as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37486for as_dir in $PATH
37487do
37488  IFS=$as_save_IFS
37489  test -z "$as_dir" && as_dir=.
37490    for ac_exec_ext in '' $ac_executable_extensions; do
37491  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37492    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37493    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37494    break 2
37495  fi
37496done
37497  done
37498IFS=$as_save_IFS
37499
37500fi
37501fi
37502AR=$ac_cv_prog_AR
37503if test -n "$AR"; then
37504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37505$as_echo "$AR" >&6; }
37506else
37507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37508$as_echo "no" >&6; }
37509fi
37510
37511
37512    test -n "$AR" && break
37513  done
37514fi
37515if test -z "$AR"; then
37516  ac_ct_AR=$AR
37517  for ac_prog in ar
37518do
37519  # Extract the first word of "$ac_prog", so it can be a program name with args.
37520set dummy $ac_prog; ac_word=$2
37521{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37522$as_echo_n "checking for $ac_word... " >&6; }
37523if ${ac_cv_prog_ac_ct_AR+:} false; then :
37524  $as_echo_n "(cached) " >&6
37525else
37526  if test -n "$ac_ct_AR"; then
37527  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37528else
37529as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37530for as_dir in $PATH
37531do
37532  IFS=$as_save_IFS
37533  test -z "$as_dir" && as_dir=.
37534    for ac_exec_ext in '' $ac_executable_extensions; do
37535  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37536    ac_cv_prog_ac_ct_AR="$ac_prog"
37537    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37538    break 2
37539  fi
37540done
37541  done
37542IFS=$as_save_IFS
37543
37544fi
37545fi
37546ac_ct_AR=$ac_cv_prog_ac_ct_AR
37547if test -n "$ac_ct_AR"; then
37548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37549$as_echo "$ac_ct_AR" >&6; }
37550else
37551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37552$as_echo "no" >&6; }
37553fi
37554
37555
37556  test -n "$ac_ct_AR" && break
37557done
37558
37559  if test "x$ac_ct_AR" = x; then
37560    AR=""
37561  else
37562    case $cross_compiling:$ac_tool_warned in
37563yes:)
37564{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37565$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37566ac_tool_warned=yes ;;
37567esac
37568    AR=$ac_ct_AR
37569  fi
37570fi
37571
37572  else
37573    # The variable is set, but is it from the command line or the environment?
37574
37575    # Try to remove the string !AR! from our list.
37576    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37577    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37578      # If it failed, the variable was not from the command line. Ignore it,
37579      # but warn the user (except for BASH, which is always set by the calling BASH).
37580      if test "xAR" != xBASH; then
37581        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37582$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37583      fi
37584      # Try to locate tool using the code snippet
37585      if test -n "$ac_tool_prefix"; then
37586  for ac_prog in ar
37587  do
37588    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37589set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37590{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37591$as_echo_n "checking for $ac_word... " >&6; }
37592if ${ac_cv_prog_AR+:} false; then :
37593  $as_echo_n "(cached) " >&6
37594else
37595  if test -n "$AR"; then
37596  ac_cv_prog_AR="$AR" # Let the user override the test.
37597else
37598as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37599for as_dir in $PATH
37600do
37601  IFS=$as_save_IFS
37602  test -z "$as_dir" && as_dir=.
37603    for ac_exec_ext in '' $ac_executable_extensions; do
37604  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37605    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37606    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37607    break 2
37608  fi
37609done
37610  done
37611IFS=$as_save_IFS
37612
37613fi
37614fi
37615AR=$ac_cv_prog_AR
37616if test -n "$AR"; then
37617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37618$as_echo "$AR" >&6; }
37619else
37620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37621$as_echo "no" >&6; }
37622fi
37623
37624
37625    test -n "$AR" && break
37626  done
37627fi
37628if test -z "$AR"; then
37629  ac_ct_AR=$AR
37630  for ac_prog in ar
37631do
37632  # Extract the first word of "$ac_prog", so it can be a program name with args.
37633set dummy $ac_prog; ac_word=$2
37634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37635$as_echo_n "checking for $ac_word... " >&6; }
37636if ${ac_cv_prog_ac_ct_AR+:} false; then :
37637  $as_echo_n "(cached) " >&6
37638else
37639  if test -n "$ac_ct_AR"; then
37640  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37641else
37642as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37643for as_dir in $PATH
37644do
37645  IFS=$as_save_IFS
37646  test -z "$as_dir" && as_dir=.
37647    for ac_exec_ext in '' $ac_executable_extensions; do
37648  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37649    ac_cv_prog_ac_ct_AR="$ac_prog"
37650    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37651    break 2
37652  fi
37653done
37654  done
37655IFS=$as_save_IFS
37656
37657fi
37658fi
37659ac_ct_AR=$ac_cv_prog_ac_ct_AR
37660if test -n "$ac_ct_AR"; then
37661  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37662$as_echo "$ac_ct_AR" >&6; }
37663else
37664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37665$as_echo "no" >&6; }
37666fi
37667
37668
37669  test -n "$ac_ct_AR" && break
37670done
37671
37672  if test "x$ac_ct_AR" = x; then
37673    AR=""
37674  else
37675    case $cross_compiling:$ac_tool_warned in
37676yes:)
37677{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37678$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37679ac_tool_warned=yes ;;
37680esac
37681    AR=$ac_ct_AR
37682  fi
37683fi
37684
37685    else
37686      # If it succeeded, then it was overridden by the user. We will use it
37687      # for the tool.
37688
37689      # First remove it from the list of overridden variables, so we can test
37690      # for unknown variables in the end.
37691      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37692
37693      # Check if we try to supply an empty value
37694      if test "x$AR" = x; then
37695        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37696$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37697        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37698$as_echo_n "checking for AR... " >&6; }
37699        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37700$as_echo "disabled" >&6; }
37701      else
37702        # Check if the provided tool contains a complete path.
37703        tool_specified="$AR"
37704        tool_basename="${tool_specified##*/}"
37705        if test "x$tool_basename" = "x$tool_specified"; then
37706          # A command without a complete path is provided, search $PATH.
37707          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37708$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37709          # Extract the first word of "$tool_basename", so it can be a program name with args.
37710set dummy $tool_basename; ac_word=$2
37711{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37712$as_echo_n "checking for $ac_word... " >&6; }
37713if ${ac_cv_path_AR+:} false; then :
37714  $as_echo_n "(cached) " >&6
37715else
37716  case $AR in
37717  [\\/]* | ?:[\\/]*)
37718  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37719  ;;
37720  *)
37721  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37722for as_dir in $PATH
37723do
37724  IFS=$as_save_IFS
37725  test -z "$as_dir" && as_dir=.
37726    for ac_exec_ext in '' $ac_executable_extensions; do
37727  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37728    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37729    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37730    break 2
37731  fi
37732done
37733  done
37734IFS=$as_save_IFS
37735
37736  ;;
37737esac
37738fi
37739AR=$ac_cv_path_AR
37740if test -n "$AR"; then
37741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37742$as_echo "$AR" >&6; }
37743else
37744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37745$as_echo "no" >&6; }
37746fi
37747
37748
37749          if test "x$AR" = x; then
37750            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37751          fi
37752        else
37753          # Otherwise we believe it is a complete path. Use it as it is.
37754          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37755$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37756          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37757$as_echo_n "checking for AR... " >&6; }
37758          if test ! -x "$tool_specified"; then
37759            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37760$as_echo "not found" >&6; }
37761            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37762          fi
37763          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37764$as_echo "$tool_specified" >&6; }
37765        fi
37766      fi
37767    fi
37768
37769  fi
37770
37771
37772  fi
37773
37774  # Only process if variable expands to non-empty
37775
37776  if test "x$AR" != x; then
37777    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37778
37779  # First separate the path from the arguments. This will split at the first
37780  # space.
37781  complete="$AR"
37782  path="${complete%% *}"
37783  tmp="$complete EOL"
37784  arguments="${tmp#* }"
37785
37786  # Input might be given as Windows format, start by converting to
37787  # unix format.
37788  new_path=`$CYGPATH -u "$path"`
37789
37790  # Now try to locate executable using which
37791  new_path=`$WHICH "$new_path" 2> /dev/null`
37792  # bat and cmd files are not always considered executable in cygwin causing which
37793  # to not find them
37794  if test "x$new_path" = x \
37795      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37796      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37797    new_path=`$CYGPATH -u "$path"`
37798  fi
37799  if test "x$new_path" = x; then
37800    # Oops. Which didn't find the executable.
37801    # The splitting of arguments from the executable at a space might have been incorrect,
37802    # since paths with space are more likely in Windows. Give it another try with the whole
37803    # argument.
37804    path="$complete"
37805    arguments="EOL"
37806    new_path=`$CYGPATH -u "$path"`
37807    new_path=`$WHICH "$new_path" 2> /dev/null`
37808    # bat and cmd files are not always considered executable in cygwin causing which
37809    # to not find them
37810    if test "x$new_path" = x \
37811        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37812        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37813      new_path=`$CYGPATH -u "$path"`
37814    fi
37815    if test "x$new_path" = x; then
37816      # It's still not found. Now this is an unrecoverable error.
37817      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37818$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37819      has_space=`$ECHO "$complete" | $GREP " "`
37820      if test "x$has_space" != x; then
37821        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37822$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37823      fi
37824      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37825    fi
37826  fi
37827
37828  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37829  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37830  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37831  # "foo.exe" is OK but "foo" is an error.
37832  #
37833  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37834  # It is also a way to make sure we got the proper file name for the real test later on.
37835  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37836  if test "x$test_shortpath" = x; then
37837    # Short path failed, file does not exist as specified.
37838    # Try adding .exe or .cmd
37839    if test -f "${new_path}.exe"; then
37840      input_to_shortpath="${new_path}.exe"
37841    elif test -f "${new_path}.cmd"; then
37842      input_to_shortpath="${new_path}.cmd"
37843    else
37844      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37845$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37846      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37847$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37848      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37849    fi
37850  else
37851    input_to_shortpath="$new_path"
37852  fi
37853
37854  # Call helper function which possibly converts this using DOS-style short mode.
37855  # If so, the updated path is stored in $new_path.
37856  new_path="$input_to_shortpath"
37857
37858  input_path="$input_to_shortpath"
37859  # Check if we need to convert this using DOS-style short mode. If the path
37860  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37861  # take no chances and rewrite it.
37862  # Note: m4 eats our [], so we need to use [ and ] instead.
37863  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37864  if test "x$has_forbidden_chars" != x; then
37865    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37866    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37867    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37868    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37869      # Going to short mode and back again did indeed matter. Since short mode is
37870      # case insensitive, let's make it lowercase to improve readability.
37871      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37872      # Now convert it back to Unix-style (cygpath)
37873      input_path=`$CYGPATH -u "$shortmode_path"`
37874      new_path="$input_path"
37875    fi
37876  fi
37877
37878  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37879  if test "x$test_cygdrive_prefix" = x; then
37880    # As a simple fix, exclude /usr/bin since it's not a real path.
37881    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37882      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37883      # a path prefixed by /cygdrive for fixpath to work.
37884      new_path="$CYGWIN_ROOT_PATH$input_path"
37885    fi
37886  fi
37887
37888  # remove trailing .exe if any
37889  new_path="${new_path/%.exe/}"
37890
37891    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37892
37893  # First separate the path from the arguments. This will split at the first
37894  # space.
37895  complete="$AR"
37896  path="${complete%% *}"
37897  tmp="$complete EOL"
37898  arguments="${tmp#* }"
37899
37900  # Input might be given as Windows format, start by converting to
37901  # unix format.
37902  new_path="$path"
37903
37904  windows_path="$new_path"
37905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37906    unix_path=`$CYGPATH -u "$windows_path"`
37907    new_path="$unix_path"
37908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37910    new_path="$unix_path"
37911  fi
37912
37913
37914  # Now try to locate executable using which
37915  new_path=`$WHICH "$new_path" 2> /dev/null`
37916
37917  if test "x$new_path" = x; then
37918    # Oops. Which didn't find the executable.
37919    # The splitting of arguments from the executable at a space might have been incorrect,
37920    # since paths with space are more likely in Windows. Give it another try with the whole
37921    # argument.
37922    path="$complete"
37923    arguments="EOL"
37924    new_path="$path"
37925
37926  windows_path="$new_path"
37927  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37928    unix_path=`$CYGPATH -u "$windows_path"`
37929    new_path="$unix_path"
37930  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37931    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37932    new_path="$unix_path"
37933  fi
37934
37935
37936    new_path=`$WHICH "$new_path" 2> /dev/null`
37937    # bat and cmd files are not always considered executable in MSYS causing which
37938    # to not find them
37939    if test "x$new_path" = x \
37940        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37941        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37942      new_path="$path"
37943
37944  windows_path="$new_path"
37945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37946    unix_path=`$CYGPATH -u "$windows_path"`
37947    new_path="$unix_path"
37948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37950    new_path="$unix_path"
37951  fi
37952
37953    fi
37954
37955    if test "x$new_path" = x; then
37956      # It's still not found. Now this is an unrecoverable error.
37957      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37958$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37959      has_space=`$ECHO "$complete" | $GREP " "`
37960      if test "x$has_space" != x; then
37961        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37962$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37963      fi
37964      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37965    fi
37966  fi
37967
37968  # Now new_path has a complete unix path to the binary
37969  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37970    # Keep paths in /bin as-is, but remove trailing .exe if any
37971    new_path="${new_path/%.exe/}"
37972    # Do not save /bin paths to all_fixpath_prefixes!
37973  else
37974    # Not in mixed or Windows style, start by that.
37975    new_path=`cmd //c echo $new_path`
37976
37977  input_path="$new_path"
37978  # Check if we need to convert this using DOS-style short mode. If the path
37979  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37980  # take no chances and rewrite it.
37981  # Note: m4 eats our [], so we need to use [ and ] instead.
37982  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37983  if test "x$has_forbidden_chars" != x; then
37984    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37985    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37986  fi
37987
37988    # Output is in $new_path
37989
37990  windows_path="$new_path"
37991  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37992    unix_path=`$CYGPATH -u "$windows_path"`
37993    new_path="$unix_path"
37994  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37995    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37996    new_path="$unix_path"
37997  fi
37998
37999    # remove trailing .exe if any
38000    new_path="${new_path/%.exe/}"
38001
38002    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38003    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38004  fi
38005
38006    else
38007      # We're on a unix platform. Hooray! :)
38008      # First separate the path from the arguments. This will split at the first
38009      # space.
38010      complete="$AR"
38011      path="${complete%% *}"
38012      tmp="$complete EOL"
38013      arguments="${tmp#* }"
38014
38015      # Cannot rely on the command "which" here since it doesn't always work.
38016      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38017      if test -z "$is_absolute_path"; then
38018        # Path to executable is not absolute. Find it.
38019        IFS_save="$IFS"
38020        IFS=:
38021        for p in $PATH; do
38022          if test -f "$p/$path" && test -x "$p/$path"; then
38023            new_path="$p/$path"
38024            break
38025          fi
38026        done
38027        IFS="$IFS_save"
38028      else
38029        # This is an absolute path, we can use it without further modifications.
38030        new_path="$path"
38031      fi
38032
38033      if test "x$new_path" = x; then
38034        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
38035$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
38036        has_space=`$ECHO "$complete" | $GREP " "`
38037        if test "x$has_space" != x; then
38038          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38039$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38040        fi
38041        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
38042      fi
38043    fi
38044
38045    # Now join together the path and the arguments once again
38046    if test "x$arguments" != xEOL; then
38047      new_complete="$new_path ${arguments% *}"
38048    else
38049      new_complete="$new_path"
38050    fi
38051
38052    if test "x$complete" != "x$new_complete"; then
38053      AR="$new_complete"
38054      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
38055$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
38056    fi
38057  fi
38058
38059
38060
38061  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
38062
38063
38064  # Publish this variable in the help.
38065
38066
38067  if [ -z "${LIPO+x}" ]; then
38068    # The variable is not set by user, try to locate tool using the code snippet
38069    for ac_prog in lipo
38070do
38071  # Extract the first word of "$ac_prog", so it can be a program name with args.
38072set dummy $ac_prog; ac_word=$2
38073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38074$as_echo_n "checking for $ac_word... " >&6; }
38075if ${ac_cv_path_LIPO+:} false; then :
38076  $as_echo_n "(cached) " >&6
38077else
38078  case $LIPO in
38079  [\\/]* | ?:[\\/]*)
38080  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38081  ;;
38082  *)
38083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38084for as_dir in $PATH
38085do
38086  IFS=$as_save_IFS
38087  test -z "$as_dir" && as_dir=.
38088    for ac_exec_ext in '' $ac_executable_extensions; do
38089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38090    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38092    break 2
38093  fi
38094done
38095  done
38096IFS=$as_save_IFS
38097
38098  ;;
38099esac
38100fi
38101LIPO=$ac_cv_path_LIPO
38102if test -n "$LIPO"; then
38103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38104$as_echo "$LIPO" >&6; }
38105else
38106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38107$as_echo "no" >&6; }
38108fi
38109
38110
38111  test -n "$LIPO" && break
38112done
38113
38114  else
38115    # The variable is set, but is it from the command line or the environment?
38116
38117    # Try to remove the string !LIPO! from our list.
38118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
38119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
38120      # If it failed, the variable was not from the command line. Ignore it,
38121      # but warn the user (except for BASH, which is always set by the calling BASH).
38122      if test "xLIPO" != xBASH; then
38123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
38124$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
38125      fi
38126      # Try to locate tool using the code snippet
38127      for ac_prog in lipo
38128do
38129  # Extract the first word of "$ac_prog", so it can be a program name with args.
38130set dummy $ac_prog; ac_word=$2
38131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38132$as_echo_n "checking for $ac_word... " >&6; }
38133if ${ac_cv_path_LIPO+:} false; then :
38134  $as_echo_n "(cached) " >&6
38135else
38136  case $LIPO in
38137  [\\/]* | ?:[\\/]*)
38138  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38139  ;;
38140  *)
38141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38142for as_dir in $PATH
38143do
38144  IFS=$as_save_IFS
38145  test -z "$as_dir" && as_dir=.
38146    for ac_exec_ext in '' $ac_executable_extensions; do
38147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38148    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38150    break 2
38151  fi
38152done
38153  done
38154IFS=$as_save_IFS
38155
38156  ;;
38157esac
38158fi
38159LIPO=$ac_cv_path_LIPO
38160if test -n "$LIPO"; then
38161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38162$as_echo "$LIPO" >&6; }
38163else
38164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38165$as_echo "no" >&6; }
38166fi
38167
38168
38169  test -n "$LIPO" && break
38170done
38171
38172    else
38173      # If it succeeded, then it was overridden by the user. We will use it
38174      # for the tool.
38175
38176      # First remove it from the list of overridden variables, so we can test
38177      # for unknown variables in the end.
38178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
38179
38180      # Check if we try to supply an empty value
38181      if test "x$LIPO" = x; then
38182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
38183$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
38184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38185$as_echo_n "checking for LIPO... " >&6; }
38186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
38187$as_echo "disabled" >&6; }
38188      else
38189        # Check if the provided tool contains a complete path.
38190        tool_specified="$LIPO"
38191        tool_basename="${tool_specified##*/}"
38192        if test "x$tool_basename" = "x$tool_specified"; then
38193          # A command without a complete path is provided, search $PATH.
38194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
38195$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
38196          # Extract the first word of "$tool_basename", so it can be a program name with args.
38197set dummy $tool_basename; ac_word=$2
38198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38199$as_echo_n "checking for $ac_word... " >&6; }
38200if ${ac_cv_path_LIPO+:} false; then :
38201  $as_echo_n "(cached) " >&6
38202else
38203  case $LIPO in
38204  [\\/]* | ?:[\\/]*)
38205  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
38206  ;;
38207  *)
38208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38209for as_dir in $PATH
38210do
38211  IFS=$as_save_IFS
38212  test -z "$as_dir" && as_dir=.
38213    for ac_exec_ext in '' $ac_executable_extensions; do
38214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38215    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
38216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38217    break 2
38218  fi
38219done
38220  done
38221IFS=$as_save_IFS
38222
38223  ;;
38224esac
38225fi
38226LIPO=$ac_cv_path_LIPO
38227if test -n "$LIPO"; then
38228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
38229$as_echo "$LIPO" >&6; }
38230else
38231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38232$as_echo "no" >&6; }
38233fi
38234
38235
38236          if test "x$LIPO" = x; then
38237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
38238          fi
38239        else
38240          # Otherwise we believe it is a complete path. Use it as it is.
38241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
38242$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
38243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
38244$as_echo_n "checking for LIPO... " >&6; }
38245          if test ! -x "$tool_specified"; then
38246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
38247$as_echo "not found" >&6; }
38248            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
38249          fi
38250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
38251$as_echo "$tool_specified" >&6; }
38252        fi
38253      fi
38254    fi
38255
38256  fi
38257
38258
38259
38260  # Only process if variable expands to non-empty
38261
38262  if test "x$LIPO" != x; then
38263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38264
38265  # First separate the path from the arguments. This will split at the first
38266  # space.
38267  complete="$LIPO"
38268  path="${complete%% *}"
38269  tmp="$complete EOL"
38270  arguments="${tmp#* }"
38271
38272  # Input might be given as Windows format, start by converting to
38273  # unix format.
38274  new_path=`$CYGPATH -u "$path"`
38275
38276  # Now try to locate executable using which
38277  new_path=`$WHICH "$new_path" 2> /dev/null`
38278  # bat and cmd files are not always considered executable in cygwin causing which
38279  # to not find them
38280  if test "x$new_path" = x \
38281      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38282      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38283    new_path=`$CYGPATH -u "$path"`
38284  fi
38285  if test "x$new_path" = x; then
38286    # Oops. Which didn't find the executable.
38287    # The splitting of arguments from the executable at a space might have been incorrect,
38288    # since paths with space are more likely in Windows. Give it another try with the whole
38289    # argument.
38290    path="$complete"
38291    arguments="EOL"
38292    new_path=`$CYGPATH -u "$path"`
38293    new_path=`$WHICH "$new_path" 2> /dev/null`
38294    # bat and cmd files are not always considered executable in cygwin causing which
38295    # to not find them
38296    if test "x$new_path" = x \
38297        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38298        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38299      new_path=`$CYGPATH -u "$path"`
38300    fi
38301    if test "x$new_path" = x; then
38302      # It's still not found. Now this is an unrecoverable error.
38303      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38304$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38305      has_space=`$ECHO "$complete" | $GREP " "`
38306      if test "x$has_space" != x; then
38307        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38308$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38309      fi
38310      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38311    fi
38312  fi
38313
38314  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38315  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38316  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38317  # "foo.exe" is OK but "foo" is an error.
38318  #
38319  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38320  # It is also a way to make sure we got the proper file name for the real test later on.
38321  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38322  if test "x$test_shortpath" = x; then
38323    # Short path failed, file does not exist as specified.
38324    # Try adding .exe or .cmd
38325    if test -f "${new_path}.exe"; then
38326      input_to_shortpath="${new_path}.exe"
38327    elif test -f "${new_path}.cmd"; then
38328      input_to_shortpath="${new_path}.cmd"
38329    else
38330      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
38331$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
38332      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38333$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38334      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38335    fi
38336  else
38337    input_to_shortpath="$new_path"
38338  fi
38339
38340  # Call helper function which possibly converts this using DOS-style short mode.
38341  # If so, the updated path is stored in $new_path.
38342  new_path="$input_to_shortpath"
38343
38344  input_path="$input_to_shortpath"
38345  # Check if we need to convert this using DOS-style short mode. If the path
38346  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38347  # take no chances and rewrite it.
38348  # Note: m4 eats our [], so we need to use [ and ] instead.
38349  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38350  if test "x$has_forbidden_chars" != x; then
38351    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38352    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38353    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38354    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38355      # Going to short mode and back again did indeed matter. Since short mode is
38356      # case insensitive, let's make it lowercase to improve readability.
38357      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38358      # Now convert it back to Unix-style (cygpath)
38359      input_path=`$CYGPATH -u "$shortmode_path"`
38360      new_path="$input_path"
38361    fi
38362  fi
38363
38364  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38365  if test "x$test_cygdrive_prefix" = x; then
38366    # As a simple fix, exclude /usr/bin since it's not a real path.
38367    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38368      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38369      # a path prefixed by /cygdrive for fixpath to work.
38370      new_path="$CYGWIN_ROOT_PATH$input_path"
38371    fi
38372  fi
38373
38374  # remove trailing .exe if any
38375  new_path="${new_path/%.exe/}"
38376
38377    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38378
38379  # First separate the path from the arguments. This will split at the first
38380  # space.
38381  complete="$LIPO"
38382  path="${complete%% *}"
38383  tmp="$complete EOL"
38384  arguments="${tmp#* }"
38385
38386  # Input might be given as Windows format, start by converting to
38387  # unix format.
38388  new_path="$path"
38389
38390  windows_path="$new_path"
38391  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38392    unix_path=`$CYGPATH -u "$windows_path"`
38393    new_path="$unix_path"
38394  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38395    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38396    new_path="$unix_path"
38397  fi
38398
38399
38400  # Now try to locate executable using which
38401  new_path=`$WHICH "$new_path" 2> /dev/null`
38402
38403  if test "x$new_path" = x; then
38404    # Oops. Which didn't find the executable.
38405    # The splitting of arguments from the executable at a space might have been incorrect,
38406    # since paths with space are more likely in Windows. Give it another try with the whole
38407    # argument.
38408    path="$complete"
38409    arguments="EOL"
38410    new_path="$path"
38411
38412  windows_path="$new_path"
38413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38414    unix_path=`$CYGPATH -u "$windows_path"`
38415    new_path="$unix_path"
38416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38418    new_path="$unix_path"
38419  fi
38420
38421
38422    new_path=`$WHICH "$new_path" 2> /dev/null`
38423    # bat and cmd files are not always considered executable in MSYS causing which
38424    # to not find them
38425    if test "x$new_path" = x \
38426        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38427        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38428      new_path="$path"
38429
38430  windows_path="$new_path"
38431  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38432    unix_path=`$CYGPATH -u "$windows_path"`
38433    new_path="$unix_path"
38434  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38435    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38436    new_path="$unix_path"
38437  fi
38438
38439    fi
38440
38441    if test "x$new_path" = x; then
38442      # It's still not found. Now this is an unrecoverable error.
38443      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38444$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38445      has_space=`$ECHO "$complete" | $GREP " "`
38446      if test "x$has_space" != x; then
38447        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38448$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38449      fi
38450      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38451    fi
38452  fi
38453
38454  # Now new_path has a complete unix path to the binary
38455  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38456    # Keep paths in /bin as-is, but remove trailing .exe if any
38457    new_path="${new_path/%.exe/}"
38458    # Do not save /bin paths to all_fixpath_prefixes!
38459  else
38460    # Not in mixed or Windows style, start by that.
38461    new_path=`cmd //c echo $new_path`
38462
38463  input_path="$new_path"
38464  # Check if we need to convert this using DOS-style short mode. If the path
38465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38466  # take no chances and rewrite it.
38467  # Note: m4 eats our [], so we need to use [ and ] instead.
38468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38469  if test "x$has_forbidden_chars" != x; then
38470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38472  fi
38473
38474    # Output is in $new_path
38475
38476  windows_path="$new_path"
38477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38478    unix_path=`$CYGPATH -u "$windows_path"`
38479    new_path="$unix_path"
38480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38482    new_path="$unix_path"
38483  fi
38484
38485    # remove trailing .exe if any
38486    new_path="${new_path/%.exe/}"
38487
38488    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38489    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38490  fi
38491
38492    else
38493      # We're on a unix platform. Hooray! :)
38494      # First separate the path from the arguments. This will split at the first
38495      # space.
38496      complete="$LIPO"
38497      path="${complete%% *}"
38498      tmp="$complete EOL"
38499      arguments="${tmp#* }"
38500
38501      # Cannot rely on the command "which" here since it doesn't always work.
38502      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38503      if test -z "$is_absolute_path"; then
38504        # Path to executable is not absolute. Find it.
38505        IFS_save="$IFS"
38506        IFS=:
38507        for p in $PATH; do
38508          if test -f "$p/$path" && test -x "$p/$path"; then
38509            new_path="$p/$path"
38510            break
38511          fi
38512        done
38513        IFS="$IFS_save"
38514      else
38515        # This is an absolute path, we can use it without further modifications.
38516        new_path="$path"
38517      fi
38518
38519      if test "x$new_path" = x; then
38520        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38521$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38522        has_space=`$ECHO "$complete" | $GREP " "`
38523        if test "x$has_space" != x; then
38524          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38525$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38526        fi
38527        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38528      fi
38529    fi
38530
38531    # Now join together the path and the arguments once again
38532    if test "x$arguments" != xEOL; then
38533      new_complete="$new_path ${arguments% *}"
38534    else
38535      new_complete="$new_path"
38536    fi
38537
38538    if test "x$complete" != "x$new_complete"; then
38539      LIPO="$new_complete"
38540      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38541$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38542    fi
38543  fi
38544
38545  fi
38546
38547  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38548    # Extract the first word of "mt", so it can be a program name with args.
38549set dummy mt; ac_word=$2
38550{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38551$as_echo_n "checking for $ac_word... " >&6; }
38552if ${ac_cv_prog_MT+:} false; then :
38553  $as_echo_n "(cached) " >&6
38554else
38555  if test -n "$MT"; then
38556  ac_cv_prog_MT="$MT" # Let the user override the test.
38557else
38558  ac_prog_rejected=no
38559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38560for as_dir in $PATH
38561do
38562  IFS=$as_save_IFS
38563  test -z "$as_dir" && as_dir=.
38564    for ac_exec_ext in '' $ac_executable_extensions; do
38565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38566    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38567       ac_prog_rejected=yes
38568       continue
38569     fi
38570    ac_cv_prog_MT="mt"
38571    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38572    break 2
38573  fi
38574done
38575  done
38576IFS=$as_save_IFS
38577
38578if test $ac_prog_rejected = yes; then
38579  # We found a bogon in the path, so make sure we never use it.
38580  set dummy $ac_cv_prog_MT
38581  shift
38582  if test $# != 0; then
38583    # We chose a different compiler from the bogus one.
38584    # However, it has the same basename, so the bogon will be chosen
38585    # first if we set MT to just the basename; use the full file name.
38586    shift
38587    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38588  fi
38589fi
38590fi
38591fi
38592MT=$ac_cv_prog_MT
38593if test -n "$MT"; then
38594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38595$as_echo "$MT" >&6; }
38596else
38597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38598$as_echo "no" >&6; }
38599fi
38600
38601
38602
38603  # Only process if variable expands to non-empty
38604
38605  if test "x$MT" != x; then
38606    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38607
38608  # First separate the path from the arguments. This will split at the first
38609  # space.
38610  complete="$MT"
38611  path="${complete%% *}"
38612  tmp="$complete EOL"
38613  arguments="${tmp#* }"
38614
38615  # Input might be given as Windows format, start by converting to
38616  # unix format.
38617  new_path=`$CYGPATH -u "$path"`
38618
38619  # Now try to locate executable using which
38620  new_path=`$WHICH "$new_path" 2> /dev/null`
38621  # bat and cmd files are not always considered executable in cygwin causing which
38622  # to not find them
38623  if test "x$new_path" = x \
38624      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38625      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38626    new_path=`$CYGPATH -u "$path"`
38627  fi
38628  if test "x$new_path" = x; then
38629    # Oops. Which didn't find the executable.
38630    # The splitting of arguments from the executable at a space might have been incorrect,
38631    # since paths with space are more likely in Windows. Give it another try with the whole
38632    # argument.
38633    path="$complete"
38634    arguments="EOL"
38635    new_path=`$CYGPATH -u "$path"`
38636    new_path=`$WHICH "$new_path" 2> /dev/null`
38637    # bat and cmd files are not always considered executable in cygwin causing which
38638    # to not find them
38639    if test "x$new_path" = x \
38640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38642      new_path=`$CYGPATH -u "$path"`
38643    fi
38644    if test "x$new_path" = x; then
38645      # It's still not found. Now this is an unrecoverable error.
38646      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38647$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38648      has_space=`$ECHO "$complete" | $GREP " "`
38649      if test "x$has_space" != x; then
38650        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38651$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38652      fi
38653      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38654    fi
38655  fi
38656
38657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38660  # "foo.exe" is OK but "foo" is an error.
38661  #
38662  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38663  # It is also a way to make sure we got the proper file name for the real test later on.
38664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38665  if test "x$test_shortpath" = x; then
38666    # Short path failed, file does not exist as specified.
38667    # Try adding .exe or .cmd
38668    if test -f "${new_path}.exe"; then
38669      input_to_shortpath="${new_path}.exe"
38670    elif test -f "${new_path}.cmd"; then
38671      input_to_shortpath="${new_path}.cmd"
38672    else
38673      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38674$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38675      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38676$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38677      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38678    fi
38679  else
38680    input_to_shortpath="$new_path"
38681  fi
38682
38683  # Call helper function which possibly converts this using DOS-style short mode.
38684  # If so, the updated path is stored in $new_path.
38685  new_path="$input_to_shortpath"
38686
38687  input_path="$input_to_shortpath"
38688  # Check if we need to convert this using DOS-style short mode. If the path
38689  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38690  # take no chances and rewrite it.
38691  # Note: m4 eats our [], so we need to use [ and ] instead.
38692  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38693  if test "x$has_forbidden_chars" != x; then
38694    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38695    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38696    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38697    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38698      # Going to short mode and back again did indeed matter. Since short mode is
38699      # case insensitive, let's make it lowercase to improve readability.
38700      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38701      # Now convert it back to Unix-style (cygpath)
38702      input_path=`$CYGPATH -u "$shortmode_path"`
38703      new_path="$input_path"
38704    fi
38705  fi
38706
38707  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38708  if test "x$test_cygdrive_prefix" = x; then
38709    # As a simple fix, exclude /usr/bin since it's not a real path.
38710    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38711      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38712      # a path prefixed by /cygdrive for fixpath to work.
38713      new_path="$CYGWIN_ROOT_PATH$input_path"
38714    fi
38715  fi
38716
38717  # remove trailing .exe if any
38718  new_path="${new_path/%.exe/}"
38719
38720    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38721
38722  # First separate the path from the arguments. This will split at the first
38723  # space.
38724  complete="$MT"
38725  path="${complete%% *}"
38726  tmp="$complete EOL"
38727  arguments="${tmp#* }"
38728
38729  # Input might be given as Windows format, start by converting to
38730  # unix format.
38731  new_path="$path"
38732
38733  windows_path="$new_path"
38734  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38735    unix_path=`$CYGPATH -u "$windows_path"`
38736    new_path="$unix_path"
38737  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38738    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38739    new_path="$unix_path"
38740  fi
38741
38742
38743  # Now try to locate executable using which
38744  new_path=`$WHICH "$new_path" 2> /dev/null`
38745
38746  if test "x$new_path" = x; then
38747    # Oops. Which didn't find the executable.
38748    # The splitting of arguments from the executable at a space might have been incorrect,
38749    # since paths with space are more likely in Windows. Give it another try with the whole
38750    # argument.
38751    path="$complete"
38752    arguments="EOL"
38753    new_path="$path"
38754
38755  windows_path="$new_path"
38756  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38757    unix_path=`$CYGPATH -u "$windows_path"`
38758    new_path="$unix_path"
38759  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38760    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38761    new_path="$unix_path"
38762  fi
38763
38764
38765    new_path=`$WHICH "$new_path" 2> /dev/null`
38766    # bat and cmd files are not always considered executable in MSYS causing which
38767    # to not find them
38768    if test "x$new_path" = x \
38769        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38770        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38771      new_path="$path"
38772
38773  windows_path="$new_path"
38774  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38775    unix_path=`$CYGPATH -u "$windows_path"`
38776    new_path="$unix_path"
38777  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38778    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38779    new_path="$unix_path"
38780  fi
38781
38782    fi
38783
38784    if test "x$new_path" = x; then
38785      # It's still not found. Now this is an unrecoverable error.
38786      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38787$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38788      has_space=`$ECHO "$complete" | $GREP " "`
38789      if test "x$has_space" != x; then
38790        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38791$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38792      fi
38793      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38794    fi
38795  fi
38796
38797  # Now new_path has a complete unix path to the binary
38798  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38799    # Keep paths in /bin as-is, but remove trailing .exe if any
38800    new_path="${new_path/%.exe/}"
38801    # Do not save /bin paths to all_fixpath_prefixes!
38802  else
38803    # Not in mixed or Windows style, start by that.
38804    new_path=`cmd //c echo $new_path`
38805
38806  input_path="$new_path"
38807  # Check if we need to convert this using DOS-style short mode. If the path
38808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38809  # take no chances and rewrite it.
38810  # Note: m4 eats our [], so we need to use [ and ] instead.
38811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38812  if test "x$has_forbidden_chars" != x; then
38813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38815  fi
38816
38817    # Output is in $new_path
38818
38819  windows_path="$new_path"
38820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38821    unix_path=`$CYGPATH -u "$windows_path"`
38822    new_path="$unix_path"
38823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38825    new_path="$unix_path"
38826  fi
38827
38828    # remove trailing .exe if any
38829    new_path="${new_path/%.exe/}"
38830
38831    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38832    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38833  fi
38834
38835    else
38836      # We're on a unix platform. Hooray! :)
38837      # First separate the path from the arguments. This will split at the first
38838      # space.
38839      complete="$MT"
38840      path="${complete%% *}"
38841      tmp="$complete EOL"
38842      arguments="${tmp#* }"
38843
38844      # Cannot rely on the command "which" here since it doesn't always work.
38845      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38846      if test -z "$is_absolute_path"; then
38847        # Path to executable is not absolute. Find it.
38848        IFS_save="$IFS"
38849        IFS=:
38850        for p in $PATH; do
38851          if test -f "$p/$path" && test -x "$p/$path"; then
38852            new_path="$p/$path"
38853            break
38854          fi
38855        done
38856        IFS="$IFS_save"
38857      else
38858        # This is an absolute path, we can use it without further modifications.
38859        new_path="$path"
38860      fi
38861
38862      if test "x$new_path" = x; then
38863        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38864$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38865        has_space=`$ECHO "$complete" | $GREP " "`
38866        if test "x$has_space" != x; then
38867          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38868$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38869        fi
38870        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38871      fi
38872    fi
38873
38874    # Now join together the path and the arguments once again
38875    if test "x$arguments" != xEOL; then
38876      new_complete="$new_path ${arguments% *}"
38877    else
38878      new_complete="$new_path"
38879    fi
38880
38881    if test "x$complete" != "x$new_complete"; then
38882      MT="$new_complete"
38883      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38884$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38885    fi
38886  fi
38887
38888    # Setup the resource compiler (RC)
38889    # Extract the first word of "rc", so it can be a program name with args.
38890set dummy rc; ac_word=$2
38891{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38892$as_echo_n "checking for $ac_word... " >&6; }
38893if ${ac_cv_prog_RC+:} false; then :
38894  $as_echo_n "(cached) " >&6
38895else
38896  if test -n "$RC"; then
38897  ac_cv_prog_RC="$RC" # Let the user override the test.
38898else
38899  ac_prog_rejected=no
38900as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38901for as_dir in $PATH
38902do
38903  IFS=$as_save_IFS
38904  test -z "$as_dir" && as_dir=.
38905    for ac_exec_ext in '' $ac_executable_extensions; do
38906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38907    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38908       ac_prog_rejected=yes
38909       continue
38910     fi
38911    ac_cv_prog_RC="rc"
38912    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38913    break 2
38914  fi
38915done
38916  done
38917IFS=$as_save_IFS
38918
38919if test $ac_prog_rejected = yes; then
38920  # We found a bogon in the path, so make sure we never use it.
38921  set dummy $ac_cv_prog_RC
38922  shift
38923  if test $# != 0; then
38924    # We chose a different compiler from the bogus one.
38925    # However, it has the same basename, so the bogon will be chosen
38926    # first if we set RC to just the basename; use the full file name.
38927    shift
38928    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38929  fi
38930fi
38931fi
38932fi
38933RC=$ac_cv_prog_RC
38934if test -n "$RC"; then
38935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38936$as_echo "$RC" >&6; }
38937else
38938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38939$as_echo "no" >&6; }
38940fi
38941
38942
38943
38944  # Only process if variable expands to non-empty
38945
38946  if test "x$RC" != x; then
38947    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38948
38949  # First separate the path from the arguments. This will split at the first
38950  # space.
38951  complete="$RC"
38952  path="${complete%% *}"
38953  tmp="$complete EOL"
38954  arguments="${tmp#* }"
38955
38956  # Input might be given as Windows format, start by converting to
38957  # unix format.
38958  new_path=`$CYGPATH -u "$path"`
38959
38960  # Now try to locate executable using which
38961  new_path=`$WHICH "$new_path" 2> /dev/null`
38962  # bat and cmd files are not always considered executable in cygwin causing which
38963  # to not find them
38964  if test "x$new_path" = x \
38965      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38966      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38967    new_path=`$CYGPATH -u "$path"`
38968  fi
38969  if test "x$new_path" = x; then
38970    # Oops. Which didn't find the executable.
38971    # The splitting of arguments from the executable at a space might have been incorrect,
38972    # since paths with space are more likely in Windows. Give it another try with the whole
38973    # argument.
38974    path="$complete"
38975    arguments="EOL"
38976    new_path=`$CYGPATH -u "$path"`
38977    new_path=`$WHICH "$new_path" 2> /dev/null`
38978    # bat and cmd files are not always considered executable in cygwin causing which
38979    # to not find them
38980    if test "x$new_path" = x \
38981        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38982        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38983      new_path=`$CYGPATH -u "$path"`
38984    fi
38985    if test "x$new_path" = x; then
38986      # It's still not found. Now this is an unrecoverable error.
38987      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38988$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38989      has_space=`$ECHO "$complete" | $GREP " "`
38990      if test "x$has_space" != x; then
38991        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38992$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38993      fi
38994      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38995    fi
38996  fi
38997
38998  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38999  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39000  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39001  # "foo.exe" is OK but "foo" is an error.
39002  #
39003  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39004  # It is also a way to make sure we got the proper file name for the real test later on.
39005  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39006  if test "x$test_shortpath" = x; then
39007    # Short path failed, file does not exist as specified.
39008    # Try adding .exe or .cmd
39009    if test -f "${new_path}.exe"; then
39010      input_to_shortpath="${new_path}.exe"
39011    elif test -f "${new_path}.cmd"; then
39012      input_to_shortpath="${new_path}.cmd"
39013    else
39014      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
39015$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
39016      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39017$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39018      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39019    fi
39020  else
39021    input_to_shortpath="$new_path"
39022  fi
39023
39024  # Call helper function which possibly converts this using DOS-style short mode.
39025  # If so, the updated path is stored in $new_path.
39026  new_path="$input_to_shortpath"
39027
39028  input_path="$input_to_shortpath"
39029  # Check if we need to convert this using DOS-style short mode. If the path
39030  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39031  # take no chances and rewrite it.
39032  # Note: m4 eats our [], so we need to use [ and ] instead.
39033  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39034  if test "x$has_forbidden_chars" != x; then
39035    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39036    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39037    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39038    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39039      # Going to short mode and back again did indeed matter. Since short mode is
39040      # case insensitive, let's make it lowercase to improve readability.
39041      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39042      # Now convert it back to Unix-style (cygpath)
39043      input_path=`$CYGPATH -u "$shortmode_path"`
39044      new_path="$input_path"
39045    fi
39046  fi
39047
39048  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39049  if test "x$test_cygdrive_prefix" = x; then
39050    # As a simple fix, exclude /usr/bin since it's not a real path.
39051    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39052      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39053      # a path prefixed by /cygdrive for fixpath to work.
39054      new_path="$CYGWIN_ROOT_PATH$input_path"
39055    fi
39056  fi
39057
39058  # remove trailing .exe if any
39059  new_path="${new_path/%.exe/}"
39060
39061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39062
39063  # First separate the path from the arguments. This will split at the first
39064  # space.
39065  complete="$RC"
39066  path="${complete%% *}"
39067  tmp="$complete EOL"
39068  arguments="${tmp#* }"
39069
39070  # Input might be given as Windows format, start by converting to
39071  # unix format.
39072  new_path="$path"
39073
39074  windows_path="$new_path"
39075  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39076    unix_path=`$CYGPATH -u "$windows_path"`
39077    new_path="$unix_path"
39078  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39079    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39080    new_path="$unix_path"
39081  fi
39082
39083
39084  # Now try to locate executable using which
39085  new_path=`$WHICH "$new_path" 2> /dev/null`
39086
39087  if test "x$new_path" = x; then
39088    # Oops. Which didn't find the executable.
39089    # The splitting of arguments from the executable at a space might have been incorrect,
39090    # since paths with space are more likely in Windows. Give it another try with the whole
39091    # argument.
39092    path="$complete"
39093    arguments="EOL"
39094    new_path="$path"
39095
39096  windows_path="$new_path"
39097  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39098    unix_path=`$CYGPATH -u "$windows_path"`
39099    new_path="$unix_path"
39100  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39101    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39102    new_path="$unix_path"
39103  fi
39104
39105
39106    new_path=`$WHICH "$new_path" 2> /dev/null`
39107    # bat and cmd files are not always considered executable in MSYS causing which
39108    # to not find them
39109    if test "x$new_path" = x \
39110        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39111        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39112      new_path="$path"
39113
39114  windows_path="$new_path"
39115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39116    unix_path=`$CYGPATH -u "$windows_path"`
39117    new_path="$unix_path"
39118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39120    new_path="$unix_path"
39121  fi
39122
39123    fi
39124
39125    if test "x$new_path" = x; then
39126      # It's still not found. Now this is an unrecoverable error.
39127      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39128$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39129      has_space=`$ECHO "$complete" | $GREP " "`
39130      if test "x$has_space" != x; then
39131        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39132$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39133      fi
39134      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39135    fi
39136  fi
39137
39138  # Now new_path has a complete unix path to the binary
39139  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39140    # Keep paths in /bin as-is, but remove trailing .exe if any
39141    new_path="${new_path/%.exe/}"
39142    # Do not save /bin paths to all_fixpath_prefixes!
39143  else
39144    # Not in mixed or Windows style, start by that.
39145    new_path=`cmd //c echo $new_path`
39146
39147  input_path="$new_path"
39148  # Check if we need to convert this using DOS-style short mode. If the path
39149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39150  # take no chances and rewrite it.
39151  # Note: m4 eats our [], so we need to use [ and ] instead.
39152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39153  if test "x$has_forbidden_chars" != x; then
39154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39155    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39156  fi
39157
39158    # Output is in $new_path
39159
39160  windows_path="$new_path"
39161  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39162    unix_path=`$CYGPATH -u "$windows_path"`
39163    new_path="$unix_path"
39164  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39165    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39166    new_path="$unix_path"
39167  fi
39168
39169    # remove trailing .exe if any
39170    new_path="${new_path/%.exe/}"
39171
39172    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39173    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39174  fi
39175
39176    else
39177      # We're on a unix platform. Hooray! :)
39178      # First separate the path from the arguments. This will split at the first
39179      # space.
39180      complete="$RC"
39181      path="${complete%% *}"
39182      tmp="$complete EOL"
39183      arguments="${tmp#* }"
39184
39185      # Cannot rely on the command "which" here since it doesn't always work.
39186      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39187      if test -z "$is_absolute_path"; then
39188        # Path to executable is not absolute. Find it.
39189        IFS_save="$IFS"
39190        IFS=:
39191        for p in $PATH; do
39192          if test -f "$p/$path" && test -x "$p/$path"; then
39193            new_path="$p/$path"
39194            break
39195          fi
39196        done
39197        IFS="$IFS_save"
39198      else
39199        # This is an absolute path, we can use it without further modifications.
39200        new_path="$path"
39201      fi
39202
39203      if test "x$new_path" = x; then
39204        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
39205$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
39206        has_space=`$ECHO "$complete" | $GREP " "`
39207        if test "x$has_space" != x; then
39208          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39209$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39210        fi
39211        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
39212      fi
39213    fi
39214
39215    # Now join together the path and the arguments once again
39216    if test "x$arguments" != xEOL; then
39217      new_complete="$new_path ${arguments% *}"
39218    else
39219      new_complete="$new_path"
39220    fi
39221
39222    if test "x$complete" != "x$new_complete"; then
39223      RC="$new_complete"
39224      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
39225$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
39226    fi
39227  fi
39228
39229    # Extract the first word of "dumpbin", so it can be a program name with args.
39230set dummy dumpbin; ac_word=$2
39231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39232$as_echo_n "checking for $ac_word... " >&6; }
39233if ${ac_cv_prog_DUMPBIN+:} false; then :
39234  $as_echo_n "(cached) " >&6
39235else
39236  if test -n "$DUMPBIN"; then
39237  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
39238else
39239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39240for as_dir in $PATH
39241do
39242  IFS=$as_save_IFS
39243  test -z "$as_dir" && as_dir=.
39244    for ac_exec_ext in '' $ac_executable_extensions; do
39245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39246    ac_cv_prog_DUMPBIN="dumpbin"
39247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39248    break 2
39249  fi
39250done
39251  done
39252IFS=$as_save_IFS
39253
39254fi
39255fi
39256DUMPBIN=$ac_cv_prog_DUMPBIN
39257if test -n "$DUMPBIN"; then
39258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
39259$as_echo "$DUMPBIN" >&6; }
39260else
39261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39262$as_echo "no" >&6; }
39263fi
39264
39265
39266
39267  # Only process if variable expands to non-empty
39268
39269  if test "x$DUMPBIN" != x; then
39270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39271
39272  # First separate the path from the arguments. This will split at the first
39273  # space.
39274  complete="$DUMPBIN"
39275  path="${complete%% *}"
39276  tmp="$complete EOL"
39277  arguments="${tmp#* }"
39278
39279  # Input might be given as Windows format, start by converting to
39280  # unix format.
39281  new_path=`$CYGPATH -u "$path"`
39282
39283  # Now try to locate executable using which
39284  new_path=`$WHICH "$new_path" 2> /dev/null`
39285  # bat and cmd files are not always considered executable in cygwin causing which
39286  # to not find them
39287  if test "x$new_path" = x \
39288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39290    new_path=`$CYGPATH -u "$path"`
39291  fi
39292  if test "x$new_path" = x; then
39293    # Oops. Which didn't find the executable.
39294    # The splitting of arguments from the executable at a space might have been incorrect,
39295    # since paths with space are more likely in Windows. Give it another try with the whole
39296    # argument.
39297    path="$complete"
39298    arguments="EOL"
39299    new_path=`$CYGPATH -u "$path"`
39300    new_path=`$WHICH "$new_path" 2> /dev/null`
39301    # bat and cmd files are not always considered executable in cygwin causing which
39302    # to not find them
39303    if test "x$new_path" = x \
39304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39306      new_path=`$CYGPATH -u "$path"`
39307    fi
39308    if test "x$new_path" = x; then
39309      # It's still not found. Now this is an unrecoverable error.
39310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39311$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39312      has_space=`$ECHO "$complete" | $GREP " "`
39313      if test "x$has_space" != x; then
39314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39316      fi
39317      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39318    fi
39319  fi
39320
39321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39324  # "foo.exe" is OK but "foo" is an error.
39325  #
39326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39327  # It is also a way to make sure we got the proper file name for the real test later on.
39328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39329  if test "x$test_shortpath" = x; then
39330    # Short path failed, file does not exist as specified.
39331    # Try adding .exe or .cmd
39332    if test -f "${new_path}.exe"; then
39333      input_to_shortpath="${new_path}.exe"
39334    elif test -f "${new_path}.cmd"; then
39335      input_to_shortpath="${new_path}.cmd"
39336    else
39337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
39338$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
39339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39341      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39342    fi
39343  else
39344    input_to_shortpath="$new_path"
39345  fi
39346
39347  # Call helper function which possibly converts this using DOS-style short mode.
39348  # If so, the updated path is stored in $new_path.
39349  new_path="$input_to_shortpath"
39350
39351  input_path="$input_to_shortpath"
39352  # Check if we need to convert this using DOS-style short mode. If the path
39353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39354  # take no chances and rewrite it.
39355  # Note: m4 eats our [], so we need to use [ and ] instead.
39356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39357  if test "x$has_forbidden_chars" != x; then
39358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39362      # Going to short mode and back again did indeed matter. Since short mode is
39363      # case insensitive, let's make it lowercase to improve readability.
39364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39365      # Now convert it back to Unix-style (cygpath)
39366      input_path=`$CYGPATH -u "$shortmode_path"`
39367      new_path="$input_path"
39368    fi
39369  fi
39370
39371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39372  if test "x$test_cygdrive_prefix" = x; then
39373    # As a simple fix, exclude /usr/bin since it's not a real path.
39374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39376      # a path prefixed by /cygdrive for fixpath to work.
39377      new_path="$CYGWIN_ROOT_PATH$input_path"
39378    fi
39379  fi
39380
39381  # remove trailing .exe if any
39382  new_path="${new_path/%.exe/}"
39383
39384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39385
39386  # First separate the path from the arguments. This will split at the first
39387  # space.
39388  complete="$DUMPBIN"
39389  path="${complete%% *}"
39390  tmp="$complete EOL"
39391  arguments="${tmp#* }"
39392
39393  # Input might be given as Windows format, start by converting to
39394  # unix format.
39395  new_path="$path"
39396
39397  windows_path="$new_path"
39398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39399    unix_path=`$CYGPATH -u "$windows_path"`
39400    new_path="$unix_path"
39401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39403    new_path="$unix_path"
39404  fi
39405
39406
39407  # Now try to locate executable using which
39408  new_path=`$WHICH "$new_path" 2> /dev/null`
39409
39410  if test "x$new_path" = x; then
39411    # Oops. Which didn't find the executable.
39412    # The splitting of arguments from the executable at a space might have been incorrect,
39413    # since paths with space are more likely in Windows. Give it another try with the whole
39414    # argument.
39415    path="$complete"
39416    arguments="EOL"
39417    new_path="$path"
39418
39419  windows_path="$new_path"
39420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39421    unix_path=`$CYGPATH -u "$windows_path"`
39422    new_path="$unix_path"
39423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39425    new_path="$unix_path"
39426  fi
39427
39428
39429    new_path=`$WHICH "$new_path" 2> /dev/null`
39430    # bat and cmd files are not always considered executable in MSYS causing which
39431    # to not find them
39432    if test "x$new_path" = x \
39433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39435      new_path="$path"
39436
39437  windows_path="$new_path"
39438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39439    unix_path=`$CYGPATH -u "$windows_path"`
39440    new_path="$unix_path"
39441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39443    new_path="$unix_path"
39444  fi
39445
39446    fi
39447
39448    if test "x$new_path" = x; then
39449      # It's still not found. Now this is an unrecoverable error.
39450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39451$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39452      has_space=`$ECHO "$complete" | $GREP " "`
39453      if test "x$has_space" != x; then
39454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39456      fi
39457      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39458    fi
39459  fi
39460
39461  # Now new_path has a complete unix path to the binary
39462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39463    # Keep paths in /bin as-is, but remove trailing .exe if any
39464    new_path="${new_path/%.exe/}"
39465    # Do not save /bin paths to all_fixpath_prefixes!
39466  else
39467    # Not in mixed or Windows style, start by that.
39468    new_path=`cmd //c echo $new_path`
39469
39470  input_path="$new_path"
39471  # Check if we need to convert this using DOS-style short mode. If the path
39472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39473  # take no chances and rewrite it.
39474  # Note: m4 eats our [], so we need to use [ and ] instead.
39475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39476  if test "x$has_forbidden_chars" != x; then
39477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39479  fi
39480
39481    # Output is in $new_path
39482
39483  windows_path="$new_path"
39484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39485    unix_path=`$CYGPATH -u "$windows_path"`
39486    new_path="$unix_path"
39487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39489    new_path="$unix_path"
39490  fi
39491
39492    # remove trailing .exe if any
39493    new_path="${new_path/%.exe/}"
39494
39495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39497  fi
39498
39499    else
39500      # We're on a unix platform. Hooray! :)
39501      # First separate the path from the arguments. This will split at the first
39502      # space.
39503      complete="$DUMPBIN"
39504      path="${complete%% *}"
39505      tmp="$complete EOL"
39506      arguments="${tmp#* }"
39507
39508      # Cannot rely on the command "which" here since it doesn't always work.
39509      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39510      if test -z "$is_absolute_path"; then
39511        # Path to executable is not absolute. Find it.
39512        IFS_save="$IFS"
39513        IFS=:
39514        for p in $PATH; do
39515          if test -f "$p/$path" && test -x "$p/$path"; then
39516            new_path="$p/$path"
39517            break
39518          fi
39519        done
39520        IFS="$IFS_save"
39521      else
39522        # This is an absolute path, we can use it without further modifications.
39523        new_path="$path"
39524      fi
39525
39526      if test "x$new_path" = x; then
39527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39528$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39529        has_space=`$ECHO "$complete" | $GREP " "`
39530        if test "x$has_space" != x; then
39531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39533        fi
39534        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39535      fi
39536    fi
39537
39538    # Now join together the path and the arguments once again
39539    if test "x$arguments" != xEOL; then
39540      new_complete="$new_path ${arguments% *}"
39541    else
39542      new_complete="$new_path"
39543    fi
39544
39545    if test "x$complete" != "x$new_complete"; then
39546      DUMPBIN="$new_complete"
39547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39548$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39549    fi
39550  fi
39551
39552    # We need to check for 'msbuild.exe' because at the place where we expect to
39553    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39554    # won't find the 'msbuild.exe' executable in that case (and the
39555    # 'ac_executable_extensions' is unusable due to performance reasons).
39556    # Notice that we intentionally don't fix up the path to MSBUILD because we
39557    # will call it in a DOS shell during freetype detection on Windows (see
39558    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39559    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39560set dummy msbuild.exe; ac_word=$2
39561{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39562$as_echo_n "checking for $ac_word... " >&6; }
39563if ${ac_cv_prog_MSBUILD+:} false; then :
39564  $as_echo_n "(cached) " >&6
39565else
39566  if test -n "$MSBUILD"; then
39567  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39568else
39569as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39570for as_dir in $PATH
39571do
39572  IFS=$as_save_IFS
39573  test -z "$as_dir" && as_dir=.
39574    for ac_exec_ext in '' $ac_executable_extensions; do
39575  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39576    ac_cv_prog_MSBUILD="msbuild.exe"
39577    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39578    break 2
39579  fi
39580done
39581  done
39582IFS=$as_save_IFS
39583
39584fi
39585fi
39586MSBUILD=$ac_cv_prog_MSBUILD
39587if test -n "$MSBUILD"; then
39588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39589$as_echo "$MSBUILD" >&6; }
39590else
39591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39592$as_echo "no" >&6; }
39593fi
39594
39595
39596  fi
39597
39598  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39599
39600
39601  # Publish this variable in the help.
39602
39603
39604  if [ -z "${STRIP+x}" ]; then
39605    # The variable is not set by user, try to locate tool using the code snippet
39606    for ac_prog in strip
39607do
39608  # Extract the first word of "$ac_prog", so it can be a program name with args.
39609set dummy $ac_prog; ac_word=$2
39610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39611$as_echo_n "checking for $ac_word... " >&6; }
39612if ${ac_cv_path_STRIP+:} false; then :
39613  $as_echo_n "(cached) " >&6
39614else
39615  case $STRIP in
39616  [\\/]* | ?:[\\/]*)
39617  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39618  ;;
39619  *)
39620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39621for as_dir in $PATH
39622do
39623  IFS=$as_save_IFS
39624  test -z "$as_dir" && as_dir=.
39625    for ac_exec_ext in '' $ac_executable_extensions; do
39626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39627    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39629    break 2
39630  fi
39631done
39632  done
39633IFS=$as_save_IFS
39634
39635  ;;
39636esac
39637fi
39638STRIP=$ac_cv_path_STRIP
39639if test -n "$STRIP"; then
39640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39641$as_echo "$STRIP" >&6; }
39642else
39643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39644$as_echo "no" >&6; }
39645fi
39646
39647
39648  test -n "$STRIP" && break
39649done
39650
39651  else
39652    # The variable is set, but is it from the command line or the environment?
39653
39654    # Try to remove the string !STRIP! from our list.
39655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39657      # If it failed, the variable was not from the command line. Ignore it,
39658      # but warn the user (except for BASH, which is always set by the calling BASH).
39659      if test "xSTRIP" != xBASH; then
39660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39661$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39662      fi
39663      # Try to locate tool using the code snippet
39664      for ac_prog in strip
39665do
39666  # Extract the first word of "$ac_prog", so it can be a program name with args.
39667set dummy $ac_prog; ac_word=$2
39668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39669$as_echo_n "checking for $ac_word... " >&6; }
39670if ${ac_cv_path_STRIP+:} false; then :
39671  $as_echo_n "(cached) " >&6
39672else
39673  case $STRIP in
39674  [\\/]* | ?:[\\/]*)
39675  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39676  ;;
39677  *)
39678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39679for as_dir in $PATH
39680do
39681  IFS=$as_save_IFS
39682  test -z "$as_dir" && as_dir=.
39683    for ac_exec_ext in '' $ac_executable_extensions; do
39684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39685    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39687    break 2
39688  fi
39689done
39690  done
39691IFS=$as_save_IFS
39692
39693  ;;
39694esac
39695fi
39696STRIP=$ac_cv_path_STRIP
39697if test -n "$STRIP"; then
39698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39699$as_echo "$STRIP" >&6; }
39700else
39701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39702$as_echo "no" >&6; }
39703fi
39704
39705
39706  test -n "$STRIP" && break
39707done
39708
39709    else
39710      # If it succeeded, then it was overridden by the user. We will use it
39711      # for the tool.
39712
39713      # First remove it from the list of overridden variables, so we can test
39714      # for unknown variables in the end.
39715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39716
39717      # Check if we try to supply an empty value
39718      if test "x$STRIP" = x; then
39719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39720$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39722$as_echo_n "checking for STRIP... " >&6; }
39723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39724$as_echo "disabled" >&6; }
39725      else
39726        # Check if the provided tool contains a complete path.
39727        tool_specified="$STRIP"
39728        tool_basename="${tool_specified##*/}"
39729        if test "x$tool_basename" = "x$tool_specified"; then
39730          # A command without a complete path is provided, search $PATH.
39731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39732$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39733          # Extract the first word of "$tool_basename", so it can be a program name with args.
39734set dummy $tool_basename; ac_word=$2
39735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39736$as_echo_n "checking for $ac_word... " >&6; }
39737if ${ac_cv_path_STRIP+:} false; then :
39738  $as_echo_n "(cached) " >&6
39739else
39740  case $STRIP in
39741  [\\/]* | ?:[\\/]*)
39742  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39743  ;;
39744  *)
39745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39746for as_dir in $PATH
39747do
39748  IFS=$as_save_IFS
39749  test -z "$as_dir" && as_dir=.
39750    for ac_exec_ext in '' $ac_executable_extensions; do
39751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39752    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39754    break 2
39755  fi
39756done
39757  done
39758IFS=$as_save_IFS
39759
39760  ;;
39761esac
39762fi
39763STRIP=$ac_cv_path_STRIP
39764if test -n "$STRIP"; then
39765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39766$as_echo "$STRIP" >&6; }
39767else
39768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39769$as_echo "no" >&6; }
39770fi
39771
39772
39773          if test "x$STRIP" = x; then
39774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39775          fi
39776        else
39777          # Otherwise we believe it is a complete path. Use it as it is.
39778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39779$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39781$as_echo_n "checking for STRIP... " >&6; }
39782          if test ! -x "$tool_specified"; then
39783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39784$as_echo "not found" >&6; }
39785            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39786          fi
39787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39788$as_echo "$tool_specified" >&6; }
39789        fi
39790      fi
39791    fi
39792
39793  fi
39794
39795
39796
39797  # Only process if variable expands to non-empty
39798
39799  if test "x$STRIP" != x; then
39800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39801
39802  # First separate the path from the arguments. This will split at the first
39803  # space.
39804  complete="$STRIP"
39805  path="${complete%% *}"
39806  tmp="$complete EOL"
39807  arguments="${tmp#* }"
39808
39809  # Input might be given as Windows format, start by converting to
39810  # unix format.
39811  new_path=`$CYGPATH -u "$path"`
39812
39813  # Now try to locate executable using which
39814  new_path=`$WHICH "$new_path" 2> /dev/null`
39815  # bat and cmd files are not always considered executable in cygwin causing which
39816  # to not find them
39817  if test "x$new_path" = x \
39818      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39819      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39820    new_path=`$CYGPATH -u "$path"`
39821  fi
39822  if test "x$new_path" = x; then
39823    # Oops. Which didn't find the executable.
39824    # The splitting of arguments from the executable at a space might have been incorrect,
39825    # since paths with space are more likely in Windows. Give it another try with the whole
39826    # argument.
39827    path="$complete"
39828    arguments="EOL"
39829    new_path=`$CYGPATH -u "$path"`
39830    new_path=`$WHICH "$new_path" 2> /dev/null`
39831    # bat and cmd files are not always considered executable in cygwin causing which
39832    # to not find them
39833    if test "x$new_path" = x \
39834        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39835        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39836      new_path=`$CYGPATH -u "$path"`
39837    fi
39838    if test "x$new_path" = x; then
39839      # It's still not found. Now this is an unrecoverable error.
39840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39841$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39842      has_space=`$ECHO "$complete" | $GREP " "`
39843      if test "x$has_space" != x; then
39844        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39845$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39846      fi
39847      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39848    fi
39849  fi
39850
39851  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39852  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39853  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39854  # "foo.exe" is OK but "foo" is an error.
39855  #
39856  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39857  # It is also a way to make sure we got the proper file name for the real test later on.
39858  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39859  if test "x$test_shortpath" = x; then
39860    # Short path failed, file does not exist as specified.
39861    # Try adding .exe or .cmd
39862    if test -f "${new_path}.exe"; then
39863      input_to_shortpath="${new_path}.exe"
39864    elif test -f "${new_path}.cmd"; then
39865      input_to_shortpath="${new_path}.cmd"
39866    else
39867      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39868$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39869      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39870$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39871      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39872    fi
39873  else
39874    input_to_shortpath="$new_path"
39875  fi
39876
39877  # Call helper function which possibly converts this using DOS-style short mode.
39878  # If so, the updated path is stored in $new_path.
39879  new_path="$input_to_shortpath"
39880
39881  input_path="$input_to_shortpath"
39882  # Check if we need to convert this using DOS-style short mode. If the path
39883  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39884  # take no chances and rewrite it.
39885  # Note: m4 eats our [], so we need to use [ and ] instead.
39886  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39887  if test "x$has_forbidden_chars" != x; then
39888    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39889    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39890    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39891    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39892      # Going to short mode and back again did indeed matter. Since short mode is
39893      # case insensitive, let's make it lowercase to improve readability.
39894      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39895      # Now convert it back to Unix-style (cygpath)
39896      input_path=`$CYGPATH -u "$shortmode_path"`
39897      new_path="$input_path"
39898    fi
39899  fi
39900
39901  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39902  if test "x$test_cygdrive_prefix" = x; then
39903    # As a simple fix, exclude /usr/bin since it's not a real path.
39904    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39905      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39906      # a path prefixed by /cygdrive for fixpath to work.
39907      new_path="$CYGWIN_ROOT_PATH$input_path"
39908    fi
39909  fi
39910
39911  # remove trailing .exe if any
39912  new_path="${new_path/%.exe/}"
39913
39914    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39915
39916  # First separate the path from the arguments. This will split at the first
39917  # space.
39918  complete="$STRIP"
39919  path="${complete%% *}"
39920  tmp="$complete EOL"
39921  arguments="${tmp#* }"
39922
39923  # Input might be given as Windows format, start by converting to
39924  # unix format.
39925  new_path="$path"
39926
39927  windows_path="$new_path"
39928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39929    unix_path=`$CYGPATH -u "$windows_path"`
39930    new_path="$unix_path"
39931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39933    new_path="$unix_path"
39934  fi
39935
39936
39937  # Now try to locate executable using which
39938  new_path=`$WHICH "$new_path" 2> /dev/null`
39939
39940  if test "x$new_path" = x; then
39941    # Oops. Which didn't find the executable.
39942    # The splitting of arguments from the executable at a space might have been incorrect,
39943    # since paths with space are more likely in Windows. Give it another try with the whole
39944    # argument.
39945    path="$complete"
39946    arguments="EOL"
39947    new_path="$path"
39948
39949  windows_path="$new_path"
39950  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39951    unix_path=`$CYGPATH -u "$windows_path"`
39952    new_path="$unix_path"
39953  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39954    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39955    new_path="$unix_path"
39956  fi
39957
39958
39959    new_path=`$WHICH "$new_path" 2> /dev/null`
39960    # bat and cmd files are not always considered executable in MSYS causing which
39961    # to not find them
39962    if test "x$new_path" = x \
39963        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39964        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39965      new_path="$path"
39966
39967  windows_path="$new_path"
39968  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39969    unix_path=`$CYGPATH -u "$windows_path"`
39970    new_path="$unix_path"
39971  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39972    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39973    new_path="$unix_path"
39974  fi
39975
39976    fi
39977
39978    if test "x$new_path" = x; then
39979      # It's still not found. Now this is an unrecoverable error.
39980      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39981$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39982      has_space=`$ECHO "$complete" | $GREP " "`
39983      if test "x$has_space" != x; then
39984        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39985$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39986      fi
39987      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39988    fi
39989  fi
39990
39991  # Now new_path has a complete unix path to the binary
39992  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39993    # Keep paths in /bin as-is, but remove trailing .exe if any
39994    new_path="${new_path/%.exe/}"
39995    # Do not save /bin paths to all_fixpath_prefixes!
39996  else
39997    # Not in mixed or Windows style, start by that.
39998    new_path=`cmd //c echo $new_path`
39999
40000  input_path="$new_path"
40001  # Check if we need to convert this using DOS-style short mode. If the path
40002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40003  # take no chances and rewrite it.
40004  # Note: m4 eats our [], so we need to use [ and ] instead.
40005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40006  if test "x$has_forbidden_chars" != x; then
40007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40009  fi
40010
40011    # Output is in $new_path
40012
40013  windows_path="$new_path"
40014  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40015    unix_path=`$CYGPATH -u "$windows_path"`
40016    new_path="$unix_path"
40017  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40018    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40019    new_path="$unix_path"
40020  fi
40021
40022    # remove trailing .exe if any
40023    new_path="${new_path/%.exe/}"
40024
40025    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40026    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40027  fi
40028
40029    else
40030      # We're on a unix platform. Hooray! :)
40031      # First separate the path from the arguments. This will split at the first
40032      # space.
40033      complete="$STRIP"
40034      path="${complete%% *}"
40035      tmp="$complete EOL"
40036      arguments="${tmp#* }"
40037
40038      # Cannot rely on the command "which" here since it doesn't always work.
40039      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40040      if test -z "$is_absolute_path"; then
40041        # Path to executable is not absolute. Find it.
40042        IFS_save="$IFS"
40043        IFS=:
40044        for p in $PATH; do
40045          if test -f "$p/$path" && test -x "$p/$path"; then
40046            new_path="$p/$path"
40047            break
40048          fi
40049        done
40050        IFS="$IFS_save"
40051      else
40052        # This is an absolute path, we can use it without further modifications.
40053        new_path="$path"
40054      fi
40055
40056      if test "x$new_path" = x; then
40057        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40058$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40059        has_space=`$ECHO "$complete" | $GREP " "`
40060        if test "x$has_space" != x; then
40061          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40062$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40063        fi
40064        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40065      fi
40066    fi
40067
40068    # Now join together the path and the arguments once again
40069    if test "x$arguments" != xEOL; then
40070      new_complete="$new_path ${arguments% *}"
40071    else
40072      new_complete="$new_path"
40073    fi
40074
40075    if test "x$complete" != "x$new_complete"; then
40076      STRIP="$new_complete"
40077      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
40078$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
40079    fi
40080  fi
40081
40082
40083
40084  # Publish this variable in the help.
40085
40086
40087  if [ -z "${NM+x}" ]; then
40088    # The variable is not set by user, try to locate tool using the code snippet
40089    for ac_prog in nm
40090do
40091  # Extract the first word of "$ac_prog", so it can be a program name with args.
40092set dummy $ac_prog; ac_word=$2
40093{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40094$as_echo_n "checking for $ac_word... " >&6; }
40095if ${ac_cv_path_NM+:} false; then :
40096  $as_echo_n "(cached) " >&6
40097else
40098  case $NM in
40099  [\\/]* | ?:[\\/]*)
40100  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40101  ;;
40102  *)
40103  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40104for as_dir in $PATH
40105do
40106  IFS=$as_save_IFS
40107  test -z "$as_dir" && as_dir=.
40108    for ac_exec_ext in '' $ac_executable_extensions; do
40109  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40110    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40111    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40112    break 2
40113  fi
40114done
40115  done
40116IFS=$as_save_IFS
40117
40118  ;;
40119esac
40120fi
40121NM=$ac_cv_path_NM
40122if test -n "$NM"; then
40123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40124$as_echo "$NM" >&6; }
40125else
40126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40127$as_echo "no" >&6; }
40128fi
40129
40130
40131  test -n "$NM" && break
40132done
40133
40134  else
40135    # The variable is set, but is it from the command line or the environment?
40136
40137    # Try to remove the string !NM! from our list.
40138    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
40139    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40140      # If it failed, the variable was not from the command line. Ignore it,
40141      # but warn the user (except for BASH, which is always set by the calling BASH).
40142      if test "xNM" != xBASH; then
40143        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
40144$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
40145      fi
40146      # Try to locate tool using the code snippet
40147      for ac_prog in nm
40148do
40149  # Extract the first word of "$ac_prog", so it can be a program name with args.
40150set dummy $ac_prog; ac_word=$2
40151{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40152$as_echo_n "checking for $ac_word... " >&6; }
40153if ${ac_cv_path_NM+:} false; then :
40154  $as_echo_n "(cached) " >&6
40155else
40156  case $NM in
40157  [\\/]* | ?:[\\/]*)
40158  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40159  ;;
40160  *)
40161  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40162for as_dir in $PATH
40163do
40164  IFS=$as_save_IFS
40165  test -z "$as_dir" && as_dir=.
40166    for ac_exec_ext in '' $ac_executable_extensions; do
40167  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40168    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40169    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40170    break 2
40171  fi
40172done
40173  done
40174IFS=$as_save_IFS
40175
40176  ;;
40177esac
40178fi
40179NM=$ac_cv_path_NM
40180if test -n "$NM"; then
40181  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40182$as_echo "$NM" >&6; }
40183else
40184  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40185$as_echo "no" >&6; }
40186fi
40187
40188
40189  test -n "$NM" && break
40190done
40191
40192    else
40193      # If it succeeded, then it was overridden by the user. We will use it
40194      # for the tool.
40195
40196      # First remove it from the list of overridden variables, so we can test
40197      # for unknown variables in the end.
40198      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40199
40200      # Check if we try to supply an empty value
40201      if test "x$NM" = x; then
40202        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
40203$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
40204        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40205$as_echo_n "checking for NM... " >&6; }
40206        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40207$as_echo "disabled" >&6; }
40208      else
40209        # Check if the provided tool contains a complete path.
40210        tool_specified="$NM"
40211        tool_basename="${tool_specified##*/}"
40212        if test "x$tool_basename" = "x$tool_specified"; then
40213          # A command without a complete path is provided, search $PATH.
40214          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
40215$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
40216          # Extract the first word of "$tool_basename", so it can be a program name with args.
40217set dummy $tool_basename; ac_word=$2
40218{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40219$as_echo_n "checking for $ac_word... " >&6; }
40220if ${ac_cv_path_NM+:} false; then :
40221  $as_echo_n "(cached) " >&6
40222else
40223  case $NM in
40224  [\\/]* | ?:[\\/]*)
40225  ac_cv_path_NM="$NM" # Let the user override the test with a path.
40226  ;;
40227  *)
40228  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40229for as_dir in $PATH
40230do
40231  IFS=$as_save_IFS
40232  test -z "$as_dir" && as_dir=.
40233    for ac_exec_ext in '' $ac_executable_extensions; do
40234  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40235    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
40236    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40237    break 2
40238  fi
40239done
40240  done
40241IFS=$as_save_IFS
40242
40243  ;;
40244esac
40245fi
40246NM=$ac_cv_path_NM
40247if test -n "$NM"; then
40248  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
40249$as_echo "$NM" >&6; }
40250else
40251  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40252$as_echo "no" >&6; }
40253fi
40254
40255
40256          if test "x$NM" = x; then
40257            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40258          fi
40259        else
40260          # Otherwise we believe it is a complete path. Use it as it is.
40261          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
40262$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
40263          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
40264$as_echo_n "checking for NM... " >&6; }
40265          if test ! -x "$tool_specified"; then
40266            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40267$as_echo "not found" >&6; }
40268            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
40269          fi
40270          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40271$as_echo "$tool_specified" >&6; }
40272        fi
40273      fi
40274    fi
40275
40276  fi
40277
40278
40279
40280  # Only process if variable expands to non-empty
40281
40282  if test "x$NM" != x; then
40283    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40284
40285  # First separate the path from the arguments. This will split at the first
40286  # space.
40287  complete="$NM"
40288  path="${complete%% *}"
40289  tmp="$complete EOL"
40290  arguments="${tmp#* }"
40291
40292  # Input might be given as Windows format, start by converting to
40293  # unix format.
40294  new_path=`$CYGPATH -u "$path"`
40295
40296  # Now try to locate executable using which
40297  new_path=`$WHICH "$new_path" 2> /dev/null`
40298  # bat and cmd files are not always considered executable in cygwin causing which
40299  # to not find them
40300  if test "x$new_path" = x \
40301      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40302      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40303    new_path=`$CYGPATH -u "$path"`
40304  fi
40305  if test "x$new_path" = x; then
40306    # Oops. Which didn't find the executable.
40307    # The splitting of arguments from the executable at a space might have been incorrect,
40308    # since paths with space are more likely in Windows. Give it another try with the whole
40309    # argument.
40310    path="$complete"
40311    arguments="EOL"
40312    new_path=`$CYGPATH -u "$path"`
40313    new_path=`$WHICH "$new_path" 2> /dev/null`
40314    # bat and cmd files are not always considered executable in cygwin causing which
40315    # to not find them
40316    if test "x$new_path" = x \
40317        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40318        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40319      new_path=`$CYGPATH -u "$path"`
40320    fi
40321    if test "x$new_path" = x; then
40322      # It's still not found. Now this is an unrecoverable error.
40323      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40324$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40325      has_space=`$ECHO "$complete" | $GREP " "`
40326      if test "x$has_space" != x; then
40327        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40328$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40329      fi
40330      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40331    fi
40332  fi
40333
40334  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40335  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40336  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40337  # "foo.exe" is OK but "foo" is an error.
40338  #
40339  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40340  # It is also a way to make sure we got the proper file name for the real test later on.
40341  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40342  if test "x$test_shortpath" = x; then
40343    # Short path failed, file does not exist as specified.
40344    # Try adding .exe or .cmd
40345    if test -f "${new_path}.exe"; then
40346      input_to_shortpath="${new_path}.exe"
40347    elif test -f "${new_path}.cmd"; then
40348      input_to_shortpath="${new_path}.cmd"
40349    else
40350      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
40351$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
40352      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40353$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40354      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40355    fi
40356  else
40357    input_to_shortpath="$new_path"
40358  fi
40359
40360  # Call helper function which possibly converts this using DOS-style short mode.
40361  # If so, the updated path is stored in $new_path.
40362  new_path="$input_to_shortpath"
40363
40364  input_path="$input_to_shortpath"
40365  # Check if we need to convert this using DOS-style short mode. If the path
40366  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40367  # take no chances and rewrite it.
40368  # Note: m4 eats our [], so we need to use [ and ] instead.
40369  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40370  if test "x$has_forbidden_chars" != x; then
40371    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40372    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40373    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40374    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40375      # Going to short mode and back again did indeed matter. Since short mode is
40376      # case insensitive, let's make it lowercase to improve readability.
40377      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40378      # Now convert it back to Unix-style (cygpath)
40379      input_path=`$CYGPATH -u "$shortmode_path"`
40380      new_path="$input_path"
40381    fi
40382  fi
40383
40384  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40385  if test "x$test_cygdrive_prefix" = x; then
40386    # As a simple fix, exclude /usr/bin since it's not a real path.
40387    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40388      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40389      # a path prefixed by /cygdrive for fixpath to work.
40390      new_path="$CYGWIN_ROOT_PATH$input_path"
40391    fi
40392  fi
40393
40394  # remove trailing .exe if any
40395  new_path="${new_path/%.exe/}"
40396
40397    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40398
40399  # First separate the path from the arguments. This will split at the first
40400  # space.
40401  complete="$NM"
40402  path="${complete%% *}"
40403  tmp="$complete EOL"
40404  arguments="${tmp#* }"
40405
40406  # Input might be given as Windows format, start by converting to
40407  # unix format.
40408  new_path="$path"
40409
40410  windows_path="$new_path"
40411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40412    unix_path=`$CYGPATH -u "$windows_path"`
40413    new_path="$unix_path"
40414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40416    new_path="$unix_path"
40417  fi
40418
40419
40420  # Now try to locate executable using which
40421  new_path=`$WHICH "$new_path" 2> /dev/null`
40422
40423  if test "x$new_path" = x; then
40424    # Oops. Which didn't find the executable.
40425    # The splitting of arguments from the executable at a space might have been incorrect,
40426    # since paths with space are more likely in Windows. Give it another try with the whole
40427    # argument.
40428    path="$complete"
40429    arguments="EOL"
40430    new_path="$path"
40431
40432  windows_path="$new_path"
40433  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40434    unix_path=`$CYGPATH -u "$windows_path"`
40435    new_path="$unix_path"
40436  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40437    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40438    new_path="$unix_path"
40439  fi
40440
40441
40442    new_path=`$WHICH "$new_path" 2> /dev/null`
40443    # bat and cmd files are not always considered executable in MSYS causing which
40444    # to not find them
40445    if test "x$new_path" = x \
40446        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40447        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40448      new_path="$path"
40449
40450  windows_path="$new_path"
40451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40452    unix_path=`$CYGPATH -u "$windows_path"`
40453    new_path="$unix_path"
40454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40456    new_path="$unix_path"
40457  fi
40458
40459    fi
40460
40461    if test "x$new_path" = x; then
40462      # It's still not found. Now this is an unrecoverable error.
40463      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40464$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40465      has_space=`$ECHO "$complete" | $GREP " "`
40466      if test "x$has_space" != x; then
40467        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40468$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40469      fi
40470      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40471    fi
40472  fi
40473
40474  # Now new_path has a complete unix path to the binary
40475  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40476    # Keep paths in /bin as-is, but remove trailing .exe if any
40477    new_path="${new_path/%.exe/}"
40478    # Do not save /bin paths to all_fixpath_prefixes!
40479  else
40480    # Not in mixed or Windows style, start by that.
40481    new_path=`cmd //c echo $new_path`
40482
40483  input_path="$new_path"
40484  # Check if we need to convert this using DOS-style short mode. If the path
40485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40486  # take no chances and rewrite it.
40487  # Note: m4 eats our [], so we need to use [ and ] instead.
40488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40489  if test "x$has_forbidden_chars" != x; then
40490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40492  fi
40493
40494    # Output is in $new_path
40495
40496  windows_path="$new_path"
40497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40498    unix_path=`$CYGPATH -u "$windows_path"`
40499    new_path="$unix_path"
40500  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40501    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40502    new_path="$unix_path"
40503  fi
40504
40505    # remove trailing .exe if any
40506    new_path="${new_path/%.exe/}"
40507
40508    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40509    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40510  fi
40511
40512    else
40513      # We're on a unix platform. Hooray! :)
40514      # First separate the path from the arguments. This will split at the first
40515      # space.
40516      complete="$NM"
40517      path="${complete%% *}"
40518      tmp="$complete EOL"
40519      arguments="${tmp#* }"
40520
40521      # Cannot rely on the command "which" here since it doesn't always work.
40522      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40523      if test -z "$is_absolute_path"; then
40524        # Path to executable is not absolute. Find it.
40525        IFS_save="$IFS"
40526        IFS=:
40527        for p in $PATH; do
40528          if test -f "$p/$path" && test -x "$p/$path"; then
40529            new_path="$p/$path"
40530            break
40531          fi
40532        done
40533        IFS="$IFS_save"
40534      else
40535        # This is an absolute path, we can use it without further modifications.
40536        new_path="$path"
40537      fi
40538
40539      if test "x$new_path" = x; then
40540        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40541$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40542        has_space=`$ECHO "$complete" | $GREP " "`
40543        if test "x$has_space" != x; then
40544          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40545$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40546        fi
40547        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40548      fi
40549    fi
40550
40551    # Now join together the path and the arguments once again
40552    if test "x$arguments" != xEOL; then
40553      new_complete="$new_path ${arguments% *}"
40554    else
40555      new_complete="$new_path"
40556    fi
40557
40558    if test "x$complete" != "x$new_complete"; then
40559      NM="$new_complete"
40560      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40561$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40562    fi
40563  fi
40564
40565
40566
40567  # Publish this variable in the help.
40568
40569
40570  if [ -z "${GNM+x}" ]; then
40571    # The variable is not set by user, try to locate tool using the code snippet
40572    for ac_prog in gnm
40573do
40574  # Extract the first word of "$ac_prog", so it can be a program name with args.
40575set dummy $ac_prog; ac_word=$2
40576{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40577$as_echo_n "checking for $ac_word... " >&6; }
40578if ${ac_cv_path_GNM+:} false; then :
40579  $as_echo_n "(cached) " >&6
40580else
40581  case $GNM in
40582  [\\/]* | ?:[\\/]*)
40583  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40584  ;;
40585  *)
40586  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40587for as_dir in $PATH
40588do
40589  IFS=$as_save_IFS
40590  test -z "$as_dir" && as_dir=.
40591    for ac_exec_ext in '' $ac_executable_extensions; do
40592  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40593    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40594    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40595    break 2
40596  fi
40597done
40598  done
40599IFS=$as_save_IFS
40600
40601  ;;
40602esac
40603fi
40604GNM=$ac_cv_path_GNM
40605if test -n "$GNM"; then
40606  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40607$as_echo "$GNM" >&6; }
40608else
40609  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40610$as_echo "no" >&6; }
40611fi
40612
40613
40614  test -n "$GNM" && break
40615done
40616
40617  else
40618    # The variable is set, but is it from the command line or the environment?
40619
40620    # Try to remove the string !GNM! from our list.
40621    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40622    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40623      # If it failed, the variable was not from the command line. Ignore it,
40624      # but warn the user (except for BASH, which is always set by the calling BASH).
40625      if test "xGNM" != xBASH; then
40626        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40627$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40628      fi
40629      # Try to locate tool using the code snippet
40630      for ac_prog in gnm
40631do
40632  # Extract the first word of "$ac_prog", so it can be a program name with args.
40633set dummy $ac_prog; ac_word=$2
40634{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40635$as_echo_n "checking for $ac_word... " >&6; }
40636if ${ac_cv_path_GNM+:} false; then :
40637  $as_echo_n "(cached) " >&6
40638else
40639  case $GNM in
40640  [\\/]* | ?:[\\/]*)
40641  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40642  ;;
40643  *)
40644  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40645for as_dir in $PATH
40646do
40647  IFS=$as_save_IFS
40648  test -z "$as_dir" && as_dir=.
40649    for ac_exec_ext in '' $ac_executable_extensions; do
40650  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40651    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40652    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40653    break 2
40654  fi
40655done
40656  done
40657IFS=$as_save_IFS
40658
40659  ;;
40660esac
40661fi
40662GNM=$ac_cv_path_GNM
40663if test -n "$GNM"; then
40664  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40665$as_echo "$GNM" >&6; }
40666else
40667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40668$as_echo "no" >&6; }
40669fi
40670
40671
40672  test -n "$GNM" && break
40673done
40674
40675    else
40676      # If it succeeded, then it was overridden by the user. We will use it
40677      # for the tool.
40678
40679      # First remove it from the list of overridden variables, so we can test
40680      # for unknown variables in the end.
40681      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40682
40683      # Check if we try to supply an empty value
40684      if test "x$GNM" = x; then
40685        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40686$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40687        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40688$as_echo_n "checking for GNM... " >&6; }
40689        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40690$as_echo "disabled" >&6; }
40691      else
40692        # Check if the provided tool contains a complete path.
40693        tool_specified="$GNM"
40694        tool_basename="${tool_specified##*/}"
40695        if test "x$tool_basename" = "x$tool_specified"; then
40696          # A command without a complete path is provided, search $PATH.
40697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40698$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40699          # Extract the first word of "$tool_basename", so it can be a program name with args.
40700set dummy $tool_basename; ac_word=$2
40701{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40702$as_echo_n "checking for $ac_word... " >&6; }
40703if ${ac_cv_path_GNM+:} false; then :
40704  $as_echo_n "(cached) " >&6
40705else
40706  case $GNM in
40707  [\\/]* | ?:[\\/]*)
40708  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40709  ;;
40710  *)
40711  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40712for as_dir in $PATH
40713do
40714  IFS=$as_save_IFS
40715  test -z "$as_dir" && as_dir=.
40716    for ac_exec_ext in '' $ac_executable_extensions; do
40717  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40718    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40719    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40720    break 2
40721  fi
40722done
40723  done
40724IFS=$as_save_IFS
40725
40726  ;;
40727esac
40728fi
40729GNM=$ac_cv_path_GNM
40730if test -n "$GNM"; then
40731  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40732$as_echo "$GNM" >&6; }
40733else
40734  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40735$as_echo "no" >&6; }
40736fi
40737
40738
40739          if test "x$GNM" = x; then
40740            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40741          fi
40742        else
40743          # Otherwise we believe it is a complete path. Use it as it is.
40744          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40745$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40746          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40747$as_echo_n "checking for GNM... " >&6; }
40748          if test ! -x "$tool_specified"; then
40749            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40750$as_echo "not found" >&6; }
40751            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40752          fi
40753          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40754$as_echo "$tool_specified" >&6; }
40755        fi
40756      fi
40757    fi
40758
40759  fi
40760
40761
40762
40763  # Only process if variable expands to non-empty
40764
40765  if test "x$GNM" != x; then
40766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40767
40768  # First separate the path from the arguments. This will split at the first
40769  # space.
40770  complete="$GNM"
40771  path="${complete%% *}"
40772  tmp="$complete EOL"
40773  arguments="${tmp#* }"
40774
40775  # Input might be given as Windows format, start by converting to
40776  # unix format.
40777  new_path=`$CYGPATH -u "$path"`
40778
40779  # Now try to locate executable using which
40780  new_path=`$WHICH "$new_path" 2> /dev/null`
40781  # bat and cmd files are not always considered executable in cygwin causing which
40782  # to not find them
40783  if test "x$new_path" = x \
40784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40786    new_path=`$CYGPATH -u "$path"`
40787  fi
40788  if test "x$new_path" = x; then
40789    # Oops. Which didn't find the executable.
40790    # The splitting of arguments from the executable at a space might have been incorrect,
40791    # since paths with space are more likely in Windows. Give it another try with the whole
40792    # argument.
40793    path="$complete"
40794    arguments="EOL"
40795    new_path=`$CYGPATH -u "$path"`
40796    new_path=`$WHICH "$new_path" 2> /dev/null`
40797    # bat and cmd files are not always considered executable in cygwin causing which
40798    # to not find them
40799    if test "x$new_path" = x \
40800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40802      new_path=`$CYGPATH -u "$path"`
40803    fi
40804    if test "x$new_path" = x; then
40805      # It's still not found. Now this is an unrecoverable error.
40806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40807$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40808      has_space=`$ECHO "$complete" | $GREP " "`
40809      if test "x$has_space" != x; then
40810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40812      fi
40813      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40814    fi
40815  fi
40816
40817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40820  # "foo.exe" is OK but "foo" is an error.
40821  #
40822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40823  # It is also a way to make sure we got the proper file name for the real test later on.
40824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40825  if test "x$test_shortpath" = x; then
40826    # Short path failed, file does not exist as specified.
40827    # Try adding .exe or .cmd
40828    if test -f "${new_path}.exe"; then
40829      input_to_shortpath="${new_path}.exe"
40830    elif test -f "${new_path}.cmd"; then
40831      input_to_shortpath="${new_path}.cmd"
40832    else
40833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40834$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40837      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40838    fi
40839  else
40840    input_to_shortpath="$new_path"
40841  fi
40842
40843  # Call helper function which possibly converts this using DOS-style short mode.
40844  # If so, the updated path is stored in $new_path.
40845  new_path="$input_to_shortpath"
40846
40847  input_path="$input_to_shortpath"
40848  # Check if we need to convert this using DOS-style short mode. If the path
40849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40850  # take no chances and rewrite it.
40851  # Note: m4 eats our [], so we need to use [ and ] instead.
40852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40853  if test "x$has_forbidden_chars" != x; then
40854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40858      # Going to short mode and back again did indeed matter. Since short mode is
40859      # case insensitive, let's make it lowercase to improve readability.
40860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40861      # Now convert it back to Unix-style (cygpath)
40862      input_path=`$CYGPATH -u "$shortmode_path"`
40863      new_path="$input_path"
40864    fi
40865  fi
40866
40867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40868  if test "x$test_cygdrive_prefix" = x; then
40869    # As a simple fix, exclude /usr/bin since it's not a real path.
40870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40872      # a path prefixed by /cygdrive for fixpath to work.
40873      new_path="$CYGWIN_ROOT_PATH$input_path"
40874    fi
40875  fi
40876
40877  # remove trailing .exe if any
40878  new_path="${new_path/%.exe/}"
40879
40880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40881
40882  # First separate the path from the arguments. This will split at the first
40883  # space.
40884  complete="$GNM"
40885  path="${complete%% *}"
40886  tmp="$complete EOL"
40887  arguments="${tmp#* }"
40888
40889  # Input might be given as Windows format, start by converting to
40890  # unix format.
40891  new_path="$path"
40892
40893  windows_path="$new_path"
40894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40895    unix_path=`$CYGPATH -u "$windows_path"`
40896    new_path="$unix_path"
40897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40899    new_path="$unix_path"
40900  fi
40901
40902
40903  # Now try to locate executable using which
40904  new_path=`$WHICH "$new_path" 2> /dev/null`
40905
40906  if test "x$new_path" = x; then
40907    # Oops. Which didn't find the executable.
40908    # The splitting of arguments from the executable at a space might have been incorrect,
40909    # since paths with space are more likely in Windows. Give it another try with the whole
40910    # argument.
40911    path="$complete"
40912    arguments="EOL"
40913    new_path="$path"
40914
40915  windows_path="$new_path"
40916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40917    unix_path=`$CYGPATH -u "$windows_path"`
40918    new_path="$unix_path"
40919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40921    new_path="$unix_path"
40922  fi
40923
40924
40925    new_path=`$WHICH "$new_path" 2> /dev/null`
40926    # bat and cmd files are not always considered executable in MSYS causing which
40927    # to not find them
40928    if test "x$new_path" = x \
40929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40931      new_path="$path"
40932
40933  windows_path="$new_path"
40934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40935    unix_path=`$CYGPATH -u "$windows_path"`
40936    new_path="$unix_path"
40937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40939    new_path="$unix_path"
40940  fi
40941
40942    fi
40943
40944    if test "x$new_path" = x; then
40945      # It's still not found. Now this is an unrecoverable error.
40946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40947$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40948      has_space=`$ECHO "$complete" | $GREP " "`
40949      if test "x$has_space" != x; then
40950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40952      fi
40953      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40954    fi
40955  fi
40956
40957  # Now new_path has a complete unix path to the binary
40958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40959    # Keep paths in /bin as-is, but remove trailing .exe if any
40960    new_path="${new_path/%.exe/}"
40961    # Do not save /bin paths to all_fixpath_prefixes!
40962  else
40963    # Not in mixed or Windows style, start by that.
40964    new_path=`cmd //c echo $new_path`
40965
40966  input_path="$new_path"
40967  # Check if we need to convert this using DOS-style short mode. If the path
40968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40969  # take no chances and rewrite it.
40970  # Note: m4 eats our [], so we need to use [ and ] instead.
40971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40972  if test "x$has_forbidden_chars" != x; then
40973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40975  fi
40976
40977    # Output is in $new_path
40978
40979  windows_path="$new_path"
40980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40981    unix_path=`$CYGPATH -u "$windows_path"`
40982    new_path="$unix_path"
40983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40985    new_path="$unix_path"
40986  fi
40987
40988    # remove trailing .exe if any
40989    new_path="${new_path/%.exe/}"
40990
40991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40993  fi
40994
40995    else
40996      # We're on a unix platform. Hooray! :)
40997      # First separate the path from the arguments. This will split at the first
40998      # space.
40999      complete="$GNM"
41000      path="${complete%% *}"
41001      tmp="$complete EOL"
41002      arguments="${tmp#* }"
41003
41004      # Cannot rely on the command "which" here since it doesn't always work.
41005      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41006      if test -z "$is_absolute_path"; then
41007        # Path to executable is not absolute. Find it.
41008        IFS_save="$IFS"
41009        IFS=:
41010        for p in $PATH; do
41011          if test -f "$p/$path" && test -x "$p/$path"; then
41012            new_path="$p/$path"
41013            break
41014          fi
41015        done
41016        IFS="$IFS_save"
41017      else
41018        # This is an absolute path, we can use it without further modifications.
41019        new_path="$path"
41020      fi
41021
41022      if test "x$new_path" = x; then
41023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
41024$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
41025        has_space=`$ECHO "$complete" | $GREP " "`
41026        if test "x$has_space" != x; then
41027          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41029        fi
41030        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
41031      fi
41032    fi
41033
41034    # Now join together the path and the arguments once again
41035    if test "x$arguments" != xEOL; then
41036      new_complete="$new_path ${arguments% *}"
41037    else
41038      new_complete="$new_path"
41039    fi
41040
41041    if test "x$complete" != "x$new_complete"; then
41042      GNM="$new_complete"
41043      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
41044$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
41045    fi
41046  fi
41047
41048  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
41049    # FIXME: we should unify this with the solaris case above.
41050
41051
41052  # Publish this variable in the help.
41053
41054
41055  if [ -z "${STRIP+x}" ]; then
41056    # The variable is not set by user, try to locate tool using the code snippet
41057    if test -n "$ac_tool_prefix"; then
41058  for ac_prog in strip
41059  do
41060    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41061set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41063$as_echo_n "checking for $ac_word... " >&6; }
41064if ${ac_cv_prog_STRIP+:} false; then :
41065  $as_echo_n "(cached) " >&6
41066else
41067  if test -n "$STRIP"; then
41068  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41069else
41070as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41071for as_dir in $PATH
41072do
41073  IFS=$as_save_IFS
41074  test -z "$as_dir" && as_dir=.
41075    for ac_exec_ext in '' $ac_executable_extensions; do
41076  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41077    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41078    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41079    break 2
41080  fi
41081done
41082  done
41083IFS=$as_save_IFS
41084
41085fi
41086fi
41087STRIP=$ac_cv_prog_STRIP
41088if test -n "$STRIP"; then
41089  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41090$as_echo "$STRIP" >&6; }
41091else
41092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41093$as_echo "no" >&6; }
41094fi
41095
41096
41097    test -n "$STRIP" && break
41098  done
41099fi
41100if test -z "$STRIP"; then
41101  ac_ct_STRIP=$STRIP
41102  for ac_prog in strip
41103do
41104  # Extract the first word of "$ac_prog", so it can be a program name with args.
41105set dummy $ac_prog; ac_word=$2
41106{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41107$as_echo_n "checking for $ac_word... " >&6; }
41108if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41109  $as_echo_n "(cached) " >&6
41110else
41111  if test -n "$ac_ct_STRIP"; then
41112  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41113else
41114as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41115for as_dir in $PATH
41116do
41117  IFS=$as_save_IFS
41118  test -z "$as_dir" && as_dir=.
41119    for ac_exec_ext in '' $ac_executable_extensions; do
41120  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41121    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41122    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41123    break 2
41124  fi
41125done
41126  done
41127IFS=$as_save_IFS
41128
41129fi
41130fi
41131ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41132if test -n "$ac_ct_STRIP"; then
41133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41134$as_echo "$ac_ct_STRIP" >&6; }
41135else
41136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41137$as_echo "no" >&6; }
41138fi
41139
41140
41141  test -n "$ac_ct_STRIP" && break
41142done
41143
41144  if test "x$ac_ct_STRIP" = x; then
41145    STRIP=""
41146  else
41147    case $cross_compiling:$ac_tool_warned in
41148yes:)
41149{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41150$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41151ac_tool_warned=yes ;;
41152esac
41153    STRIP=$ac_ct_STRIP
41154  fi
41155fi
41156
41157  else
41158    # The variable is set, but is it from the command line or the environment?
41159
41160    # Try to remove the string !STRIP! from our list.
41161    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
41162    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41163      # If it failed, the variable was not from the command line. Ignore it,
41164      # but warn the user (except for BASH, which is always set by the calling BASH).
41165      if test "xSTRIP" != xBASH; then
41166        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
41167$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
41168      fi
41169      # Try to locate tool using the code snippet
41170      if test -n "$ac_tool_prefix"; then
41171  for ac_prog in strip
41172  do
41173    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41174set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41175{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41176$as_echo_n "checking for $ac_word... " >&6; }
41177if ${ac_cv_prog_STRIP+:} false; then :
41178  $as_echo_n "(cached) " >&6
41179else
41180  if test -n "$STRIP"; then
41181  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
41182else
41183as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41184for as_dir in $PATH
41185do
41186  IFS=$as_save_IFS
41187  test -z "$as_dir" && as_dir=.
41188    for ac_exec_ext in '' $ac_executable_extensions; do
41189  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41190    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
41191    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41192    break 2
41193  fi
41194done
41195  done
41196IFS=$as_save_IFS
41197
41198fi
41199fi
41200STRIP=$ac_cv_prog_STRIP
41201if test -n "$STRIP"; then
41202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41203$as_echo "$STRIP" >&6; }
41204else
41205  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41206$as_echo "no" >&6; }
41207fi
41208
41209
41210    test -n "$STRIP" && break
41211  done
41212fi
41213if test -z "$STRIP"; then
41214  ac_ct_STRIP=$STRIP
41215  for ac_prog in strip
41216do
41217  # Extract the first word of "$ac_prog", so it can be a program name with args.
41218set dummy $ac_prog; ac_word=$2
41219{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41220$as_echo_n "checking for $ac_word... " >&6; }
41221if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
41222  $as_echo_n "(cached) " >&6
41223else
41224  if test -n "$ac_ct_STRIP"; then
41225  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
41226else
41227as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41228for as_dir in $PATH
41229do
41230  IFS=$as_save_IFS
41231  test -z "$as_dir" && as_dir=.
41232    for ac_exec_ext in '' $ac_executable_extensions; do
41233  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41234    ac_cv_prog_ac_ct_STRIP="$ac_prog"
41235    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41236    break 2
41237  fi
41238done
41239  done
41240IFS=$as_save_IFS
41241
41242fi
41243fi
41244ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
41245if test -n "$ac_ct_STRIP"; then
41246  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
41247$as_echo "$ac_ct_STRIP" >&6; }
41248else
41249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41250$as_echo "no" >&6; }
41251fi
41252
41253
41254  test -n "$ac_ct_STRIP" && break
41255done
41256
41257  if test "x$ac_ct_STRIP" = x; then
41258    STRIP=""
41259  else
41260    case $cross_compiling:$ac_tool_warned in
41261yes:)
41262{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41263$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41264ac_tool_warned=yes ;;
41265esac
41266    STRIP=$ac_ct_STRIP
41267  fi
41268fi
41269
41270    else
41271      # If it succeeded, then it was overridden by the user. We will use it
41272      # for the tool.
41273
41274      # First remove it from the list of overridden variables, so we can test
41275      # for unknown variables in the end.
41276      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41277
41278      # Check if we try to supply an empty value
41279      if test "x$STRIP" = x; then
41280        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
41281$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
41282        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41283$as_echo_n "checking for STRIP... " >&6; }
41284        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41285$as_echo "disabled" >&6; }
41286      else
41287        # Check if the provided tool contains a complete path.
41288        tool_specified="$STRIP"
41289        tool_basename="${tool_specified##*/}"
41290        if test "x$tool_basename" = "x$tool_specified"; then
41291          # A command without a complete path is provided, search $PATH.
41292          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
41293$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
41294          # Extract the first word of "$tool_basename", so it can be a program name with args.
41295set dummy $tool_basename; ac_word=$2
41296{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41297$as_echo_n "checking for $ac_word... " >&6; }
41298if ${ac_cv_path_STRIP+:} false; then :
41299  $as_echo_n "(cached) " >&6
41300else
41301  case $STRIP in
41302  [\\/]* | ?:[\\/]*)
41303  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
41304  ;;
41305  *)
41306  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41307for as_dir in $PATH
41308do
41309  IFS=$as_save_IFS
41310  test -z "$as_dir" && as_dir=.
41311    for ac_exec_ext in '' $ac_executable_extensions; do
41312  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41313    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
41314    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41315    break 2
41316  fi
41317done
41318  done
41319IFS=$as_save_IFS
41320
41321  ;;
41322esac
41323fi
41324STRIP=$ac_cv_path_STRIP
41325if test -n "$STRIP"; then
41326  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
41327$as_echo "$STRIP" >&6; }
41328else
41329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41330$as_echo "no" >&6; }
41331fi
41332
41333
41334          if test "x$STRIP" = x; then
41335            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41336          fi
41337        else
41338          # Otherwise we believe it is a complete path. Use it as it is.
41339          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
41340$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
41341          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
41342$as_echo_n "checking for STRIP... " >&6; }
41343          if test ! -x "$tool_specified"; then
41344            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41345$as_echo "not found" >&6; }
41346            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
41347          fi
41348          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41349$as_echo "$tool_specified" >&6; }
41350        fi
41351      fi
41352    fi
41353
41354  fi
41355
41356
41357
41358  # Only process if variable expands to non-empty
41359
41360  if test "x$STRIP" != x; then
41361    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41362
41363  # First separate the path from the arguments. This will split at the first
41364  # space.
41365  complete="$STRIP"
41366  path="${complete%% *}"
41367  tmp="$complete EOL"
41368  arguments="${tmp#* }"
41369
41370  # Input might be given as Windows format, start by converting to
41371  # unix format.
41372  new_path=`$CYGPATH -u "$path"`
41373
41374  # Now try to locate executable using which
41375  new_path=`$WHICH "$new_path" 2> /dev/null`
41376  # bat and cmd files are not always considered executable in cygwin causing which
41377  # to not find them
41378  if test "x$new_path" = x \
41379      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41380      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41381    new_path=`$CYGPATH -u "$path"`
41382  fi
41383  if test "x$new_path" = x; then
41384    # Oops. Which didn't find the executable.
41385    # The splitting of arguments from the executable at a space might have been incorrect,
41386    # since paths with space are more likely in Windows. Give it another try with the whole
41387    # argument.
41388    path="$complete"
41389    arguments="EOL"
41390    new_path=`$CYGPATH -u "$path"`
41391    new_path=`$WHICH "$new_path" 2> /dev/null`
41392    # bat and cmd files are not always considered executable in cygwin causing which
41393    # to not find them
41394    if test "x$new_path" = x \
41395        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41396        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41397      new_path=`$CYGPATH -u "$path"`
41398    fi
41399    if test "x$new_path" = x; then
41400      # It's still not found. Now this is an unrecoverable error.
41401      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41402$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41403      has_space=`$ECHO "$complete" | $GREP " "`
41404      if test "x$has_space" != x; then
41405        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41406$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41407      fi
41408      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41409    fi
41410  fi
41411
41412  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41413  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41414  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41415  # "foo.exe" is OK but "foo" is an error.
41416  #
41417  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41418  # It is also a way to make sure we got the proper file name for the real test later on.
41419  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41420  if test "x$test_shortpath" = x; then
41421    # Short path failed, file does not exist as specified.
41422    # Try adding .exe or .cmd
41423    if test -f "${new_path}.exe"; then
41424      input_to_shortpath="${new_path}.exe"
41425    elif test -f "${new_path}.cmd"; then
41426      input_to_shortpath="${new_path}.cmd"
41427    else
41428      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
41429$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
41430      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41431$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41432      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41433    fi
41434  else
41435    input_to_shortpath="$new_path"
41436  fi
41437
41438  # Call helper function which possibly converts this using DOS-style short mode.
41439  # If so, the updated path is stored in $new_path.
41440  new_path="$input_to_shortpath"
41441
41442  input_path="$input_to_shortpath"
41443  # Check if we need to convert this using DOS-style short mode. If the path
41444  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41445  # take no chances and rewrite it.
41446  # Note: m4 eats our [], so we need to use [ and ] instead.
41447  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41448  if test "x$has_forbidden_chars" != x; then
41449    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41450    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41451    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41452    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41453      # Going to short mode and back again did indeed matter. Since short mode is
41454      # case insensitive, let's make it lowercase to improve readability.
41455      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41456      # Now convert it back to Unix-style (cygpath)
41457      input_path=`$CYGPATH -u "$shortmode_path"`
41458      new_path="$input_path"
41459    fi
41460  fi
41461
41462  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41463  if test "x$test_cygdrive_prefix" = x; then
41464    # As a simple fix, exclude /usr/bin since it's not a real path.
41465    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41466      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41467      # a path prefixed by /cygdrive for fixpath to work.
41468      new_path="$CYGWIN_ROOT_PATH$input_path"
41469    fi
41470  fi
41471
41472  # remove trailing .exe if any
41473  new_path="${new_path/%.exe/}"
41474
41475    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41476
41477  # First separate the path from the arguments. This will split at the first
41478  # space.
41479  complete="$STRIP"
41480  path="${complete%% *}"
41481  tmp="$complete EOL"
41482  arguments="${tmp#* }"
41483
41484  # Input might be given as Windows format, start by converting to
41485  # unix format.
41486  new_path="$path"
41487
41488  windows_path="$new_path"
41489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41490    unix_path=`$CYGPATH -u "$windows_path"`
41491    new_path="$unix_path"
41492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41494    new_path="$unix_path"
41495  fi
41496
41497
41498  # Now try to locate executable using which
41499  new_path=`$WHICH "$new_path" 2> /dev/null`
41500
41501  if test "x$new_path" = x; then
41502    # Oops. Which didn't find the executable.
41503    # The splitting of arguments from the executable at a space might have been incorrect,
41504    # since paths with space are more likely in Windows. Give it another try with the whole
41505    # argument.
41506    path="$complete"
41507    arguments="EOL"
41508    new_path="$path"
41509
41510  windows_path="$new_path"
41511  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41512    unix_path=`$CYGPATH -u "$windows_path"`
41513    new_path="$unix_path"
41514  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41515    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41516    new_path="$unix_path"
41517  fi
41518
41519
41520    new_path=`$WHICH "$new_path" 2> /dev/null`
41521    # bat and cmd files are not always considered executable in MSYS causing which
41522    # to not find them
41523    if test "x$new_path" = x \
41524        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41525        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41526      new_path="$path"
41527
41528  windows_path="$new_path"
41529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41530    unix_path=`$CYGPATH -u "$windows_path"`
41531    new_path="$unix_path"
41532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41533    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41534    new_path="$unix_path"
41535  fi
41536
41537    fi
41538
41539    if test "x$new_path" = x; then
41540      # It's still not found. Now this is an unrecoverable error.
41541      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41542$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41543      has_space=`$ECHO "$complete" | $GREP " "`
41544      if test "x$has_space" != x; then
41545        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41546$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41547      fi
41548      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41549    fi
41550  fi
41551
41552  # Now new_path has a complete unix path to the binary
41553  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41554    # Keep paths in /bin as-is, but remove trailing .exe if any
41555    new_path="${new_path/%.exe/}"
41556    # Do not save /bin paths to all_fixpath_prefixes!
41557  else
41558    # Not in mixed or Windows style, start by that.
41559    new_path=`cmd //c echo $new_path`
41560
41561  input_path="$new_path"
41562  # Check if we need to convert this using DOS-style short mode. If the path
41563  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41564  # take no chances and rewrite it.
41565  # Note: m4 eats our [], so we need to use [ and ] instead.
41566  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41567  if test "x$has_forbidden_chars" != x; then
41568    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41569    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41570  fi
41571
41572    # Output is in $new_path
41573
41574  windows_path="$new_path"
41575  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41576    unix_path=`$CYGPATH -u "$windows_path"`
41577    new_path="$unix_path"
41578  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41579    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41580    new_path="$unix_path"
41581  fi
41582
41583    # remove trailing .exe if any
41584    new_path="${new_path/%.exe/}"
41585
41586    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41587    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41588  fi
41589
41590    else
41591      # We're on a unix platform. Hooray! :)
41592      # First separate the path from the arguments. This will split at the first
41593      # space.
41594      complete="$STRIP"
41595      path="${complete%% *}"
41596      tmp="$complete EOL"
41597      arguments="${tmp#* }"
41598
41599      # Cannot rely on the command "which" here since it doesn't always work.
41600      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41601      if test -z "$is_absolute_path"; then
41602        # Path to executable is not absolute. Find it.
41603        IFS_save="$IFS"
41604        IFS=:
41605        for p in $PATH; do
41606          if test -f "$p/$path" && test -x "$p/$path"; then
41607            new_path="$p/$path"
41608            break
41609          fi
41610        done
41611        IFS="$IFS_save"
41612      else
41613        # This is an absolute path, we can use it without further modifications.
41614        new_path="$path"
41615      fi
41616
41617      if test "x$new_path" = x; then
41618        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41619$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41620        has_space=`$ECHO "$complete" | $GREP " "`
41621        if test "x$has_space" != x; then
41622          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41623$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41624        fi
41625        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41626      fi
41627    fi
41628
41629    # Now join together the path and the arguments once again
41630    if test "x$arguments" != xEOL; then
41631      new_complete="$new_path ${arguments% *}"
41632    else
41633      new_complete="$new_path"
41634    fi
41635
41636    if test "x$complete" != "x$new_complete"; then
41637      STRIP="$new_complete"
41638      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41639$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41640    fi
41641  fi
41642
41643    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41644
41645
41646  # Publish this variable in the help.
41647
41648
41649  if [ -z "${NM+x}" ]; then
41650    # The variable is not set by user, try to locate tool using the code snippet
41651    if test -n "$ac_tool_prefix"; then
41652  for ac_prog in nm gcc-nm
41653  do
41654    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41655set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41656{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41657$as_echo_n "checking for $ac_word... " >&6; }
41658if ${ac_cv_prog_NM+:} false; then :
41659  $as_echo_n "(cached) " >&6
41660else
41661  if test -n "$NM"; then
41662  ac_cv_prog_NM="$NM" # Let the user override the test.
41663else
41664as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41665for as_dir in $PATH
41666do
41667  IFS=$as_save_IFS
41668  test -z "$as_dir" && as_dir=.
41669    for ac_exec_ext in '' $ac_executable_extensions; do
41670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41671    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41673    break 2
41674  fi
41675done
41676  done
41677IFS=$as_save_IFS
41678
41679fi
41680fi
41681NM=$ac_cv_prog_NM
41682if test -n "$NM"; then
41683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41684$as_echo "$NM" >&6; }
41685else
41686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41687$as_echo "no" >&6; }
41688fi
41689
41690
41691    test -n "$NM" && break
41692  done
41693fi
41694if test -z "$NM"; then
41695  ac_ct_NM=$NM
41696  for ac_prog in nm gcc-nm
41697do
41698  # Extract the first word of "$ac_prog", so it can be a program name with args.
41699set dummy $ac_prog; ac_word=$2
41700{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41701$as_echo_n "checking for $ac_word... " >&6; }
41702if ${ac_cv_prog_ac_ct_NM+:} false; then :
41703  $as_echo_n "(cached) " >&6
41704else
41705  if test -n "$ac_ct_NM"; then
41706  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41707else
41708as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41709for as_dir in $PATH
41710do
41711  IFS=$as_save_IFS
41712  test -z "$as_dir" && as_dir=.
41713    for ac_exec_ext in '' $ac_executable_extensions; do
41714  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41715    ac_cv_prog_ac_ct_NM="$ac_prog"
41716    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41717    break 2
41718  fi
41719done
41720  done
41721IFS=$as_save_IFS
41722
41723fi
41724fi
41725ac_ct_NM=$ac_cv_prog_ac_ct_NM
41726if test -n "$ac_ct_NM"; then
41727  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41728$as_echo "$ac_ct_NM" >&6; }
41729else
41730  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41731$as_echo "no" >&6; }
41732fi
41733
41734
41735  test -n "$ac_ct_NM" && break
41736done
41737
41738  if test "x$ac_ct_NM" = x; then
41739    NM=""
41740  else
41741    case $cross_compiling:$ac_tool_warned in
41742yes:)
41743{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41744$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41745ac_tool_warned=yes ;;
41746esac
41747    NM=$ac_ct_NM
41748  fi
41749fi
41750
41751  else
41752    # The variable is set, but is it from the command line or the environment?
41753
41754    # Try to remove the string !NM! from our list.
41755    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41756    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41757      # If it failed, the variable was not from the command line. Ignore it,
41758      # but warn the user (except for BASH, which is always set by the calling BASH).
41759      if test "xNM" != xBASH; then
41760        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41761$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41762      fi
41763      # Try to locate tool using the code snippet
41764      if test -n "$ac_tool_prefix"; then
41765  for ac_prog in nm gcc-nm
41766  do
41767    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41768set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41770$as_echo_n "checking for $ac_word... " >&6; }
41771if ${ac_cv_prog_NM+:} false; then :
41772  $as_echo_n "(cached) " >&6
41773else
41774  if test -n "$NM"; then
41775  ac_cv_prog_NM="$NM" # Let the user override the test.
41776else
41777as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41778for as_dir in $PATH
41779do
41780  IFS=$as_save_IFS
41781  test -z "$as_dir" && as_dir=.
41782    for ac_exec_ext in '' $ac_executable_extensions; do
41783  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41784    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41785    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41786    break 2
41787  fi
41788done
41789  done
41790IFS=$as_save_IFS
41791
41792fi
41793fi
41794NM=$ac_cv_prog_NM
41795if test -n "$NM"; then
41796  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41797$as_echo "$NM" >&6; }
41798else
41799  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41800$as_echo "no" >&6; }
41801fi
41802
41803
41804    test -n "$NM" && break
41805  done
41806fi
41807if test -z "$NM"; then
41808  ac_ct_NM=$NM
41809  for ac_prog in nm gcc-nm
41810do
41811  # Extract the first word of "$ac_prog", so it can be a program name with args.
41812set dummy $ac_prog; ac_word=$2
41813{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41814$as_echo_n "checking for $ac_word... " >&6; }
41815if ${ac_cv_prog_ac_ct_NM+:} false; then :
41816  $as_echo_n "(cached) " >&6
41817else
41818  if test -n "$ac_ct_NM"; then
41819  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41820else
41821as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41822for as_dir in $PATH
41823do
41824  IFS=$as_save_IFS
41825  test -z "$as_dir" && as_dir=.
41826    for ac_exec_ext in '' $ac_executable_extensions; do
41827  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41828    ac_cv_prog_ac_ct_NM="$ac_prog"
41829    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41830    break 2
41831  fi
41832done
41833  done
41834IFS=$as_save_IFS
41835
41836fi
41837fi
41838ac_ct_NM=$ac_cv_prog_ac_ct_NM
41839if test -n "$ac_ct_NM"; then
41840  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41841$as_echo "$ac_ct_NM" >&6; }
41842else
41843  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41844$as_echo "no" >&6; }
41845fi
41846
41847
41848  test -n "$ac_ct_NM" && break
41849done
41850
41851  if test "x$ac_ct_NM" = x; then
41852    NM=""
41853  else
41854    case $cross_compiling:$ac_tool_warned in
41855yes:)
41856{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41857$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41858ac_tool_warned=yes ;;
41859esac
41860    NM=$ac_ct_NM
41861  fi
41862fi
41863
41864    else
41865      # If it succeeded, then it was overridden by the user. We will use it
41866      # for the tool.
41867
41868      # First remove it from the list of overridden variables, so we can test
41869      # for unknown variables in the end.
41870      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41871
41872      # Check if we try to supply an empty value
41873      if test "x$NM" = x; then
41874        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41875$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41876        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41877$as_echo_n "checking for NM... " >&6; }
41878        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41879$as_echo "disabled" >&6; }
41880      else
41881        # Check if the provided tool contains a complete path.
41882        tool_specified="$NM"
41883        tool_basename="${tool_specified##*/}"
41884        if test "x$tool_basename" = "x$tool_specified"; then
41885          # A command without a complete path is provided, search $PATH.
41886          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41887$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41888          # Extract the first word of "$tool_basename", so it can be a program name with args.
41889set dummy $tool_basename; ac_word=$2
41890{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41891$as_echo_n "checking for $ac_word... " >&6; }
41892if ${ac_cv_path_NM+:} false; then :
41893  $as_echo_n "(cached) " >&6
41894else
41895  case $NM in
41896  [\\/]* | ?:[\\/]*)
41897  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41898  ;;
41899  *)
41900  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41901for as_dir in $PATH
41902do
41903  IFS=$as_save_IFS
41904  test -z "$as_dir" && as_dir=.
41905    for ac_exec_ext in '' $ac_executable_extensions; do
41906  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41907    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41908    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41909    break 2
41910  fi
41911done
41912  done
41913IFS=$as_save_IFS
41914
41915  ;;
41916esac
41917fi
41918NM=$ac_cv_path_NM
41919if test -n "$NM"; then
41920  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41921$as_echo "$NM" >&6; }
41922else
41923  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41924$as_echo "no" >&6; }
41925fi
41926
41927
41928          if test "x$NM" = x; then
41929            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41930          fi
41931        else
41932          # Otherwise we believe it is a complete path. Use it as it is.
41933          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41934$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41935          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41936$as_echo_n "checking for NM... " >&6; }
41937          if test ! -x "$tool_specified"; then
41938            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41939$as_echo "not found" >&6; }
41940            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41941          fi
41942          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41943$as_echo "$tool_specified" >&6; }
41944        fi
41945      fi
41946    fi
41947
41948  fi
41949
41950
41951    else
41952
41953
41954  # Publish this variable in the help.
41955
41956
41957  if [ -z "${NM+x}" ]; then
41958    # The variable is not set by user, try to locate tool using the code snippet
41959    if test -n "$ac_tool_prefix"; then
41960  for ac_prog in nm
41961  do
41962    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41963set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41964{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41965$as_echo_n "checking for $ac_word... " >&6; }
41966if ${ac_cv_prog_NM+:} false; then :
41967  $as_echo_n "(cached) " >&6
41968else
41969  if test -n "$NM"; then
41970  ac_cv_prog_NM="$NM" # Let the user override the test.
41971else
41972as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41973for as_dir in $PATH
41974do
41975  IFS=$as_save_IFS
41976  test -z "$as_dir" && as_dir=.
41977    for ac_exec_ext in '' $ac_executable_extensions; do
41978  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41979    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41980    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41981    break 2
41982  fi
41983done
41984  done
41985IFS=$as_save_IFS
41986
41987fi
41988fi
41989NM=$ac_cv_prog_NM
41990if test -n "$NM"; then
41991  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41992$as_echo "$NM" >&6; }
41993else
41994  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41995$as_echo "no" >&6; }
41996fi
41997
41998
41999    test -n "$NM" && break
42000  done
42001fi
42002if test -z "$NM"; then
42003  ac_ct_NM=$NM
42004  for ac_prog in nm
42005do
42006  # Extract the first word of "$ac_prog", so it can be a program name with args.
42007set dummy $ac_prog; ac_word=$2
42008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42009$as_echo_n "checking for $ac_word... " >&6; }
42010if ${ac_cv_prog_ac_ct_NM+:} false; then :
42011  $as_echo_n "(cached) " >&6
42012else
42013  if test -n "$ac_ct_NM"; then
42014  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42015else
42016as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42017for as_dir in $PATH
42018do
42019  IFS=$as_save_IFS
42020  test -z "$as_dir" && as_dir=.
42021    for ac_exec_ext in '' $ac_executable_extensions; do
42022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42023    ac_cv_prog_ac_ct_NM="$ac_prog"
42024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42025    break 2
42026  fi
42027done
42028  done
42029IFS=$as_save_IFS
42030
42031fi
42032fi
42033ac_ct_NM=$ac_cv_prog_ac_ct_NM
42034if test -n "$ac_ct_NM"; then
42035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42036$as_echo "$ac_ct_NM" >&6; }
42037else
42038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42039$as_echo "no" >&6; }
42040fi
42041
42042
42043  test -n "$ac_ct_NM" && break
42044done
42045
42046  if test "x$ac_ct_NM" = x; then
42047    NM=""
42048  else
42049    case $cross_compiling:$ac_tool_warned in
42050yes:)
42051{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42052$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42053ac_tool_warned=yes ;;
42054esac
42055    NM=$ac_ct_NM
42056  fi
42057fi
42058
42059  else
42060    # The variable is set, but is it from the command line or the environment?
42061
42062    # Try to remove the string !NM! from our list.
42063    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
42064    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42065      # If it failed, the variable was not from the command line. Ignore it,
42066      # but warn the user (except for BASH, which is always set by the calling BASH).
42067      if test "xNM" != xBASH; then
42068        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
42069$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
42070      fi
42071      # Try to locate tool using the code snippet
42072      if test -n "$ac_tool_prefix"; then
42073  for ac_prog in nm
42074  do
42075    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42076set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42078$as_echo_n "checking for $ac_word... " >&6; }
42079if ${ac_cv_prog_NM+:} false; then :
42080  $as_echo_n "(cached) " >&6
42081else
42082  if test -n "$NM"; then
42083  ac_cv_prog_NM="$NM" # Let the user override the test.
42084else
42085as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42086for as_dir in $PATH
42087do
42088  IFS=$as_save_IFS
42089  test -z "$as_dir" && as_dir=.
42090    for ac_exec_ext in '' $ac_executable_extensions; do
42091  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42092    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
42093    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42094    break 2
42095  fi
42096done
42097  done
42098IFS=$as_save_IFS
42099
42100fi
42101fi
42102NM=$ac_cv_prog_NM
42103if test -n "$NM"; then
42104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42105$as_echo "$NM" >&6; }
42106else
42107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42108$as_echo "no" >&6; }
42109fi
42110
42111
42112    test -n "$NM" && break
42113  done
42114fi
42115if test -z "$NM"; then
42116  ac_ct_NM=$NM
42117  for ac_prog in nm
42118do
42119  # Extract the first word of "$ac_prog", so it can be a program name with args.
42120set dummy $ac_prog; ac_word=$2
42121{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42122$as_echo_n "checking for $ac_word... " >&6; }
42123if ${ac_cv_prog_ac_ct_NM+:} false; then :
42124  $as_echo_n "(cached) " >&6
42125else
42126  if test -n "$ac_ct_NM"; then
42127  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
42128else
42129as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42130for as_dir in $PATH
42131do
42132  IFS=$as_save_IFS
42133  test -z "$as_dir" && as_dir=.
42134    for ac_exec_ext in '' $ac_executable_extensions; do
42135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42136    ac_cv_prog_ac_ct_NM="$ac_prog"
42137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42138    break 2
42139  fi
42140done
42141  done
42142IFS=$as_save_IFS
42143
42144fi
42145fi
42146ac_ct_NM=$ac_cv_prog_ac_ct_NM
42147if test -n "$ac_ct_NM"; then
42148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
42149$as_echo "$ac_ct_NM" >&6; }
42150else
42151  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42152$as_echo "no" >&6; }
42153fi
42154
42155
42156  test -n "$ac_ct_NM" && break
42157done
42158
42159  if test "x$ac_ct_NM" = x; then
42160    NM=""
42161  else
42162    case $cross_compiling:$ac_tool_warned in
42163yes:)
42164{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42165$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42166ac_tool_warned=yes ;;
42167esac
42168    NM=$ac_ct_NM
42169  fi
42170fi
42171
42172    else
42173      # If it succeeded, then it was overridden by the user. We will use it
42174      # for the tool.
42175
42176      # First remove it from the list of overridden variables, so we can test
42177      # for unknown variables in the end.
42178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42179
42180      # Check if we try to supply an empty value
42181      if test "x$NM" = x; then
42182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
42183$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
42184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42185$as_echo_n "checking for NM... " >&6; }
42186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42187$as_echo "disabled" >&6; }
42188      else
42189        # Check if the provided tool contains a complete path.
42190        tool_specified="$NM"
42191        tool_basename="${tool_specified##*/}"
42192        if test "x$tool_basename" = "x$tool_specified"; then
42193          # A command without a complete path is provided, search $PATH.
42194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
42195$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
42196          # Extract the first word of "$tool_basename", so it can be a program name with args.
42197set dummy $tool_basename; ac_word=$2
42198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42199$as_echo_n "checking for $ac_word... " >&6; }
42200if ${ac_cv_path_NM+:} false; then :
42201  $as_echo_n "(cached) " >&6
42202else
42203  case $NM in
42204  [\\/]* | ?:[\\/]*)
42205  ac_cv_path_NM="$NM" # Let the user override the test with a path.
42206  ;;
42207  *)
42208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42209for as_dir in $PATH
42210do
42211  IFS=$as_save_IFS
42212  test -z "$as_dir" && as_dir=.
42213    for ac_exec_ext in '' $ac_executable_extensions; do
42214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42215    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
42216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42217    break 2
42218  fi
42219done
42220  done
42221IFS=$as_save_IFS
42222
42223  ;;
42224esac
42225fi
42226NM=$ac_cv_path_NM
42227if test -n "$NM"; then
42228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
42229$as_echo "$NM" >&6; }
42230else
42231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42232$as_echo "no" >&6; }
42233fi
42234
42235
42236          if test "x$NM" = x; then
42237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42238          fi
42239        else
42240          # Otherwise we believe it is a complete path. Use it as it is.
42241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
42242$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
42243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
42244$as_echo_n "checking for NM... " >&6; }
42245          if test ! -x "$tool_specified"; then
42246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42247$as_echo "not found" >&6; }
42248            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
42249          fi
42250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42251$as_echo "$tool_specified" >&6; }
42252        fi
42253      fi
42254    fi
42255
42256  fi
42257
42258
42259    fi
42260
42261  # Only process if variable expands to non-empty
42262
42263  if test "x$NM" != x; then
42264    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42265
42266  # First separate the path from the arguments. This will split at the first
42267  # space.
42268  complete="$NM"
42269  path="${complete%% *}"
42270  tmp="$complete EOL"
42271  arguments="${tmp#* }"
42272
42273  # Input might be given as Windows format, start by converting to
42274  # unix format.
42275  new_path=`$CYGPATH -u "$path"`
42276
42277  # Now try to locate executable using which
42278  new_path=`$WHICH "$new_path" 2> /dev/null`
42279  # bat and cmd files are not always considered executable in cygwin causing which
42280  # to not find them
42281  if test "x$new_path" = x \
42282      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42283      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42284    new_path=`$CYGPATH -u "$path"`
42285  fi
42286  if test "x$new_path" = x; then
42287    # Oops. Which didn't find the executable.
42288    # The splitting of arguments from the executable at a space might have been incorrect,
42289    # since paths with space are more likely in Windows. Give it another try with the whole
42290    # argument.
42291    path="$complete"
42292    arguments="EOL"
42293    new_path=`$CYGPATH -u "$path"`
42294    new_path=`$WHICH "$new_path" 2> /dev/null`
42295    # bat and cmd files are not always considered executable in cygwin causing which
42296    # to not find them
42297    if test "x$new_path" = x \
42298        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42299        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42300      new_path=`$CYGPATH -u "$path"`
42301    fi
42302    if test "x$new_path" = x; then
42303      # It's still not found. Now this is an unrecoverable error.
42304      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42305$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42306      has_space=`$ECHO "$complete" | $GREP " "`
42307      if test "x$has_space" != x; then
42308        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42309$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42310      fi
42311      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42312    fi
42313  fi
42314
42315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42318  # "foo.exe" is OK but "foo" is an error.
42319  #
42320  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42321  # It is also a way to make sure we got the proper file name for the real test later on.
42322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42323  if test "x$test_shortpath" = x; then
42324    # Short path failed, file does not exist as specified.
42325    # Try adding .exe or .cmd
42326    if test -f "${new_path}.exe"; then
42327      input_to_shortpath="${new_path}.exe"
42328    elif test -f "${new_path}.cmd"; then
42329      input_to_shortpath="${new_path}.cmd"
42330    else
42331      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
42332$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
42333      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42334$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42335      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42336    fi
42337  else
42338    input_to_shortpath="$new_path"
42339  fi
42340
42341  # Call helper function which possibly converts this using DOS-style short mode.
42342  # If so, the updated path is stored in $new_path.
42343  new_path="$input_to_shortpath"
42344
42345  input_path="$input_to_shortpath"
42346  # Check if we need to convert this using DOS-style short mode. If the path
42347  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42348  # take no chances and rewrite it.
42349  # Note: m4 eats our [], so we need to use [ and ] instead.
42350  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42351  if test "x$has_forbidden_chars" != x; then
42352    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42353    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42354    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42355    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42356      # Going to short mode and back again did indeed matter. Since short mode is
42357      # case insensitive, let's make it lowercase to improve readability.
42358      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42359      # Now convert it back to Unix-style (cygpath)
42360      input_path=`$CYGPATH -u "$shortmode_path"`
42361      new_path="$input_path"
42362    fi
42363  fi
42364
42365  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42366  if test "x$test_cygdrive_prefix" = x; then
42367    # As a simple fix, exclude /usr/bin since it's not a real path.
42368    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42369      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42370      # a path prefixed by /cygdrive for fixpath to work.
42371      new_path="$CYGWIN_ROOT_PATH$input_path"
42372    fi
42373  fi
42374
42375  # remove trailing .exe if any
42376  new_path="${new_path/%.exe/}"
42377
42378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42379
42380  # First separate the path from the arguments. This will split at the first
42381  # space.
42382  complete="$NM"
42383  path="${complete%% *}"
42384  tmp="$complete EOL"
42385  arguments="${tmp#* }"
42386
42387  # Input might be given as Windows format, start by converting to
42388  # unix format.
42389  new_path="$path"
42390
42391  windows_path="$new_path"
42392  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42393    unix_path=`$CYGPATH -u "$windows_path"`
42394    new_path="$unix_path"
42395  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42396    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42397    new_path="$unix_path"
42398  fi
42399
42400
42401  # Now try to locate executable using which
42402  new_path=`$WHICH "$new_path" 2> /dev/null`
42403
42404  if test "x$new_path" = x; then
42405    # Oops. Which didn't find the executable.
42406    # The splitting of arguments from the executable at a space might have been incorrect,
42407    # since paths with space are more likely in Windows. Give it another try with the whole
42408    # argument.
42409    path="$complete"
42410    arguments="EOL"
42411    new_path="$path"
42412
42413  windows_path="$new_path"
42414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42415    unix_path=`$CYGPATH -u "$windows_path"`
42416    new_path="$unix_path"
42417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42419    new_path="$unix_path"
42420  fi
42421
42422
42423    new_path=`$WHICH "$new_path" 2> /dev/null`
42424    # bat and cmd files are not always considered executable in MSYS causing which
42425    # to not find them
42426    if test "x$new_path" = x \
42427        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42428        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42429      new_path="$path"
42430
42431  windows_path="$new_path"
42432  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42433    unix_path=`$CYGPATH -u "$windows_path"`
42434    new_path="$unix_path"
42435  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42436    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42437    new_path="$unix_path"
42438  fi
42439
42440    fi
42441
42442    if test "x$new_path" = x; then
42443      # It's still not found. Now this is an unrecoverable error.
42444      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42445$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42446      has_space=`$ECHO "$complete" | $GREP " "`
42447      if test "x$has_space" != x; then
42448        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42449$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42450      fi
42451      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42452    fi
42453  fi
42454
42455  # Now new_path has a complete unix path to the binary
42456  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42457    # Keep paths in /bin as-is, but remove trailing .exe if any
42458    new_path="${new_path/%.exe/}"
42459    # Do not save /bin paths to all_fixpath_prefixes!
42460  else
42461    # Not in mixed or Windows style, start by that.
42462    new_path=`cmd //c echo $new_path`
42463
42464  input_path="$new_path"
42465  # Check if we need to convert this using DOS-style short mode. If the path
42466  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42467  # take no chances and rewrite it.
42468  # Note: m4 eats our [], so we need to use [ and ] instead.
42469  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42470  if test "x$has_forbidden_chars" != x; then
42471    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42472    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42473  fi
42474
42475    # Output is in $new_path
42476
42477  windows_path="$new_path"
42478  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42479    unix_path=`$CYGPATH -u "$windows_path"`
42480    new_path="$unix_path"
42481  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42482    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42483    new_path="$unix_path"
42484  fi
42485
42486    # remove trailing .exe if any
42487    new_path="${new_path/%.exe/}"
42488
42489    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42490    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42491  fi
42492
42493    else
42494      # We're on a unix platform. Hooray! :)
42495      # First separate the path from the arguments. This will split at the first
42496      # space.
42497      complete="$NM"
42498      path="${complete%% *}"
42499      tmp="$complete EOL"
42500      arguments="${tmp#* }"
42501
42502      # Cannot rely on the command "which" here since it doesn't always work.
42503      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42504      if test -z "$is_absolute_path"; then
42505        # Path to executable is not absolute. Find it.
42506        IFS_save="$IFS"
42507        IFS=:
42508        for p in $PATH; do
42509          if test -f "$p/$path" && test -x "$p/$path"; then
42510            new_path="$p/$path"
42511            break
42512          fi
42513        done
42514        IFS="$IFS_save"
42515      else
42516        # This is an absolute path, we can use it without further modifications.
42517        new_path="$path"
42518      fi
42519
42520      if test "x$new_path" = x; then
42521        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42522$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42523        has_space=`$ECHO "$complete" | $GREP " "`
42524        if test "x$has_space" != x; then
42525          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42526$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42527        fi
42528        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42529      fi
42530    fi
42531
42532    # Now join together the path and the arguments once again
42533    if test "x$arguments" != xEOL; then
42534      new_complete="$new_path ${arguments% *}"
42535    else
42536      new_complete="$new_path"
42537    fi
42538
42539    if test "x$complete" != "x$new_complete"; then
42540      NM="$new_complete"
42541      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42542$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42543    fi
42544  fi
42545
42546    GNM="$NM"
42547
42548  fi
42549
42550  # objcopy is used for moving debug symbols to separate files when
42551  # full debug symbols are enabled.
42552  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42553
42554
42555  # Publish this variable in the help.
42556
42557
42558  if [ -z "${OBJCOPY+x}" ]; then
42559    # The variable is not set by user, try to locate tool using the code snippet
42560    if test -n "$ac_tool_prefix"; then
42561  for ac_prog in gobjcopy objcopy
42562  do
42563    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42564set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42565{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42566$as_echo_n "checking for $ac_word... " >&6; }
42567if ${ac_cv_prog_OBJCOPY+:} false; then :
42568  $as_echo_n "(cached) " >&6
42569else
42570  if test -n "$OBJCOPY"; then
42571  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42572else
42573as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42574for as_dir in $PATH
42575do
42576  IFS=$as_save_IFS
42577  test -z "$as_dir" && as_dir=.
42578    for ac_exec_ext in '' $ac_executable_extensions; do
42579  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42580    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42581    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42582    break 2
42583  fi
42584done
42585  done
42586IFS=$as_save_IFS
42587
42588fi
42589fi
42590OBJCOPY=$ac_cv_prog_OBJCOPY
42591if test -n "$OBJCOPY"; then
42592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42593$as_echo "$OBJCOPY" >&6; }
42594else
42595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42596$as_echo "no" >&6; }
42597fi
42598
42599
42600    test -n "$OBJCOPY" && break
42601  done
42602fi
42603if test -z "$OBJCOPY"; then
42604  ac_ct_OBJCOPY=$OBJCOPY
42605  for ac_prog in gobjcopy objcopy
42606do
42607  # Extract the first word of "$ac_prog", so it can be a program name with args.
42608set dummy $ac_prog; ac_word=$2
42609{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42610$as_echo_n "checking for $ac_word... " >&6; }
42611if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42612  $as_echo_n "(cached) " >&6
42613else
42614  if test -n "$ac_ct_OBJCOPY"; then
42615  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42616else
42617as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42618for as_dir in $PATH
42619do
42620  IFS=$as_save_IFS
42621  test -z "$as_dir" && as_dir=.
42622    for ac_exec_ext in '' $ac_executable_extensions; do
42623  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42624    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42625    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42626    break 2
42627  fi
42628done
42629  done
42630IFS=$as_save_IFS
42631
42632fi
42633fi
42634ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42635if test -n "$ac_ct_OBJCOPY"; then
42636  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42637$as_echo "$ac_ct_OBJCOPY" >&6; }
42638else
42639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42640$as_echo "no" >&6; }
42641fi
42642
42643
42644  test -n "$ac_ct_OBJCOPY" && break
42645done
42646
42647  if test "x$ac_ct_OBJCOPY" = x; then
42648    OBJCOPY=""
42649  else
42650    case $cross_compiling:$ac_tool_warned in
42651yes:)
42652{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42653$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42654ac_tool_warned=yes ;;
42655esac
42656    OBJCOPY=$ac_ct_OBJCOPY
42657  fi
42658fi
42659
42660  else
42661    # The variable is set, but is it from the command line or the environment?
42662
42663    # Try to remove the string !OBJCOPY! from our list.
42664    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42665    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42666      # If it failed, the variable was not from the command line. Ignore it,
42667      # but warn the user (except for BASH, which is always set by the calling BASH).
42668      if test "xOBJCOPY" != xBASH; then
42669        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42670$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42671      fi
42672      # Try to locate tool using the code snippet
42673      if test -n "$ac_tool_prefix"; then
42674  for ac_prog in gobjcopy objcopy
42675  do
42676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42679$as_echo_n "checking for $ac_word... " >&6; }
42680if ${ac_cv_prog_OBJCOPY+:} false; then :
42681  $as_echo_n "(cached) " >&6
42682else
42683  if test -n "$OBJCOPY"; then
42684  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42685else
42686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42687for as_dir in $PATH
42688do
42689  IFS=$as_save_IFS
42690  test -z "$as_dir" && as_dir=.
42691    for ac_exec_ext in '' $ac_executable_extensions; do
42692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42693    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42695    break 2
42696  fi
42697done
42698  done
42699IFS=$as_save_IFS
42700
42701fi
42702fi
42703OBJCOPY=$ac_cv_prog_OBJCOPY
42704if test -n "$OBJCOPY"; then
42705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42706$as_echo "$OBJCOPY" >&6; }
42707else
42708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42709$as_echo "no" >&6; }
42710fi
42711
42712
42713    test -n "$OBJCOPY" && break
42714  done
42715fi
42716if test -z "$OBJCOPY"; then
42717  ac_ct_OBJCOPY=$OBJCOPY
42718  for ac_prog in gobjcopy objcopy
42719do
42720  # Extract the first word of "$ac_prog", so it can be a program name with args.
42721set dummy $ac_prog; ac_word=$2
42722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42723$as_echo_n "checking for $ac_word... " >&6; }
42724if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42725  $as_echo_n "(cached) " >&6
42726else
42727  if test -n "$ac_ct_OBJCOPY"; then
42728  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42729else
42730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42731for as_dir in $PATH
42732do
42733  IFS=$as_save_IFS
42734  test -z "$as_dir" && as_dir=.
42735    for ac_exec_ext in '' $ac_executable_extensions; do
42736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42737    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42739    break 2
42740  fi
42741done
42742  done
42743IFS=$as_save_IFS
42744
42745fi
42746fi
42747ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42748if test -n "$ac_ct_OBJCOPY"; then
42749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42750$as_echo "$ac_ct_OBJCOPY" >&6; }
42751else
42752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42753$as_echo "no" >&6; }
42754fi
42755
42756
42757  test -n "$ac_ct_OBJCOPY" && break
42758done
42759
42760  if test "x$ac_ct_OBJCOPY" = x; then
42761    OBJCOPY=""
42762  else
42763    case $cross_compiling:$ac_tool_warned in
42764yes:)
42765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42767ac_tool_warned=yes ;;
42768esac
42769    OBJCOPY=$ac_ct_OBJCOPY
42770  fi
42771fi
42772
42773    else
42774      # If it succeeded, then it was overridden by the user. We will use it
42775      # for the tool.
42776
42777      # First remove it from the list of overridden variables, so we can test
42778      # for unknown variables in the end.
42779      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42780
42781      # Check if we try to supply an empty value
42782      if test "x$OBJCOPY" = x; then
42783        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42784$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42785        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42786$as_echo_n "checking for OBJCOPY... " >&6; }
42787        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42788$as_echo "disabled" >&6; }
42789      else
42790        # Check if the provided tool contains a complete path.
42791        tool_specified="$OBJCOPY"
42792        tool_basename="${tool_specified##*/}"
42793        if test "x$tool_basename" = "x$tool_specified"; then
42794          # A command without a complete path is provided, search $PATH.
42795          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42796$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42797          # Extract the first word of "$tool_basename", so it can be a program name with args.
42798set dummy $tool_basename; ac_word=$2
42799{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42800$as_echo_n "checking for $ac_word... " >&6; }
42801if ${ac_cv_path_OBJCOPY+:} false; then :
42802  $as_echo_n "(cached) " >&6
42803else
42804  case $OBJCOPY in
42805  [\\/]* | ?:[\\/]*)
42806  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42807  ;;
42808  *)
42809  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42810for as_dir in $PATH
42811do
42812  IFS=$as_save_IFS
42813  test -z "$as_dir" && as_dir=.
42814    for ac_exec_ext in '' $ac_executable_extensions; do
42815  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42816    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42817    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42818    break 2
42819  fi
42820done
42821  done
42822IFS=$as_save_IFS
42823
42824  ;;
42825esac
42826fi
42827OBJCOPY=$ac_cv_path_OBJCOPY
42828if test -n "$OBJCOPY"; then
42829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42830$as_echo "$OBJCOPY" >&6; }
42831else
42832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42833$as_echo "no" >&6; }
42834fi
42835
42836
42837          if test "x$OBJCOPY" = x; then
42838            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42839          fi
42840        else
42841          # Otherwise we believe it is a complete path. Use it as it is.
42842          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42843$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42844          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42845$as_echo_n "checking for OBJCOPY... " >&6; }
42846          if test ! -x "$tool_specified"; then
42847            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42848$as_echo "not found" >&6; }
42849            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42850          fi
42851          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42852$as_echo "$tool_specified" >&6; }
42853        fi
42854      fi
42855    fi
42856
42857  fi
42858
42859
42860    # Only call fixup if objcopy was found.
42861    if test -n "$OBJCOPY"; then
42862
42863  # Only process if variable expands to non-empty
42864
42865  if test "x$OBJCOPY" != x; then
42866    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42867
42868  # First separate the path from the arguments. This will split at the first
42869  # space.
42870  complete="$OBJCOPY"
42871  path="${complete%% *}"
42872  tmp="$complete EOL"
42873  arguments="${tmp#* }"
42874
42875  # Input might be given as Windows format, start by converting to
42876  # unix format.
42877  new_path=`$CYGPATH -u "$path"`
42878
42879  # Now try to locate executable using which
42880  new_path=`$WHICH "$new_path" 2> /dev/null`
42881  # bat and cmd files are not always considered executable in cygwin causing which
42882  # to not find them
42883  if test "x$new_path" = x \
42884      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42885      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42886    new_path=`$CYGPATH -u "$path"`
42887  fi
42888  if test "x$new_path" = x; then
42889    # Oops. Which didn't find the executable.
42890    # The splitting of arguments from the executable at a space might have been incorrect,
42891    # since paths with space are more likely in Windows. Give it another try with the whole
42892    # argument.
42893    path="$complete"
42894    arguments="EOL"
42895    new_path=`$CYGPATH -u "$path"`
42896    new_path=`$WHICH "$new_path" 2> /dev/null`
42897    # bat and cmd files are not always considered executable in cygwin causing which
42898    # to not find them
42899    if test "x$new_path" = x \
42900        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42901        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42902      new_path=`$CYGPATH -u "$path"`
42903    fi
42904    if test "x$new_path" = x; then
42905      # It's still not found. Now this is an unrecoverable error.
42906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42907$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42908      has_space=`$ECHO "$complete" | $GREP " "`
42909      if test "x$has_space" != x; then
42910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42912      fi
42913      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42914    fi
42915  fi
42916
42917  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42918  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42919  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42920  # "foo.exe" is OK but "foo" is an error.
42921  #
42922  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42923  # It is also a way to make sure we got the proper file name for the real test later on.
42924  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42925  if test "x$test_shortpath" = x; then
42926    # Short path failed, file does not exist as specified.
42927    # Try adding .exe or .cmd
42928    if test -f "${new_path}.exe"; then
42929      input_to_shortpath="${new_path}.exe"
42930    elif test -f "${new_path}.cmd"; then
42931      input_to_shortpath="${new_path}.cmd"
42932    else
42933      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42934$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42935      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42936$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42937      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42938    fi
42939  else
42940    input_to_shortpath="$new_path"
42941  fi
42942
42943  # Call helper function which possibly converts this using DOS-style short mode.
42944  # If so, the updated path is stored in $new_path.
42945  new_path="$input_to_shortpath"
42946
42947  input_path="$input_to_shortpath"
42948  # Check if we need to convert this using DOS-style short mode. If the path
42949  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42950  # take no chances and rewrite it.
42951  # Note: m4 eats our [], so we need to use [ and ] instead.
42952  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42953  if test "x$has_forbidden_chars" != x; then
42954    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42955    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42956    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42957    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42958      # Going to short mode and back again did indeed matter. Since short mode is
42959      # case insensitive, let's make it lowercase to improve readability.
42960      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42961      # Now convert it back to Unix-style (cygpath)
42962      input_path=`$CYGPATH -u "$shortmode_path"`
42963      new_path="$input_path"
42964    fi
42965  fi
42966
42967  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42968  if test "x$test_cygdrive_prefix" = x; then
42969    # As a simple fix, exclude /usr/bin since it's not a real path.
42970    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42971      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42972      # a path prefixed by /cygdrive for fixpath to work.
42973      new_path="$CYGWIN_ROOT_PATH$input_path"
42974    fi
42975  fi
42976
42977  # remove trailing .exe if any
42978  new_path="${new_path/%.exe/}"
42979
42980    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42981
42982  # First separate the path from the arguments. This will split at the first
42983  # space.
42984  complete="$OBJCOPY"
42985  path="${complete%% *}"
42986  tmp="$complete EOL"
42987  arguments="${tmp#* }"
42988
42989  # Input might be given as Windows format, start by converting to
42990  # unix format.
42991  new_path="$path"
42992
42993  windows_path="$new_path"
42994  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42995    unix_path=`$CYGPATH -u "$windows_path"`
42996    new_path="$unix_path"
42997  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42998    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42999    new_path="$unix_path"
43000  fi
43001
43002
43003  # Now try to locate executable using which
43004  new_path=`$WHICH "$new_path" 2> /dev/null`
43005
43006  if test "x$new_path" = x; then
43007    # Oops. Which didn't find the executable.
43008    # The splitting of arguments from the executable at a space might have been incorrect,
43009    # since paths with space are more likely in Windows. Give it another try with the whole
43010    # argument.
43011    path="$complete"
43012    arguments="EOL"
43013    new_path="$path"
43014
43015  windows_path="$new_path"
43016  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43017    unix_path=`$CYGPATH -u "$windows_path"`
43018    new_path="$unix_path"
43019  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43020    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43021    new_path="$unix_path"
43022  fi
43023
43024
43025    new_path=`$WHICH "$new_path" 2> /dev/null`
43026    # bat and cmd files are not always considered executable in MSYS causing which
43027    # to not find them
43028    if test "x$new_path" = x \
43029        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43030        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43031      new_path="$path"
43032
43033  windows_path="$new_path"
43034  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43035    unix_path=`$CYGPATH -u "$windows_path"`
43036    new_path="$unix_path"
43037  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43038    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43039    new_path="$unix_path"
43040  fi
43041
43042    fi
43043
43044    if test "x$new_path" = x; then
43045      # It's still not found. Now this is an unrecoverable error.
43046      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43047$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43048      has_space=`$ECHO "$complete" | $GREP " "`
43049      if test "x$has_space" != x; then
43050        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43051$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43052      fi
43053      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43054    fi
43055  fi
43056
43057  # Now new_path has a complete unix path to the binary
43058  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43059    # Keep paths in /bin as-is, but remove trailing .exe if any
43060    new_path="${new_path/%.exe/}"
43061    # Do not save /bin paths to all_fixpath_prefixes!
43062  else
43063    # Not in mixed or Windows style, start by that.
43064    new_path=`cmd //c echo $new_path`
43065
43066  input_path="$new_path"
43067  # Check if we need to convert this using DOS-style short mode. If the path
43068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43069  # take no chances and rewrite it.
43070  # Note: m4 eats our [], so we need to use [ and ] instead.
43071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43072  if test "x$has_forbidden_chars" != x; then
43073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43074    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43075  fi
43076
43077    # Output is in $new_path
43078
43079  windows_path="$new_path"
43080  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43081    unix_path=`$CYGPATH -u "$windows_path"`
43082    new_path="$unix_path"
43083  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43084    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43085    new_path="$unix_path"
43086  fi
43087
43088    # remove trailing .exe if any
43089    new_path="${new_path/%.exe/}"
43090
43091    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43092    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43093  fi
43094
43095    else
43096      # We're on a unix platform. Hooray! :)
43097      # First separate the path from the arguments. This will split at the first
43098      # space.
43099      complete="$OBJCOPY"
43100      path="${complete%% *}"
43101      tmp="$complete EOL"
43102      arguments="${tmp#* }"
43103
43104      # Cannot rely on the command "which" here since it doesn't always work.
43105      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43106      if test -z "$is_absolute_path"; then
43107        # Path to executable is not absolute. Find it.
43108        IFS_save="$IFS"
43109        IFS=:
43110        for p in $PATH; do
43111          if test -f "$p/$path" && test -x "$p/$path"; then
43112            new_path="$p/$path"
43113            break
43114          fi
43115        done
43116        IFS="$IFS_save"
43117      else
43118        # This is an absolute path, we can use it without further modifications.
43119        new_path="$path"
43120      fi
43121
43122      if test "x$new_path" = x; then
43123        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
43124$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
43125        has_space=`$ECHO "$complete" | $GREP " "`
43126        if test "x$has_space" != x; then
43127          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43128$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43129        fi
43130        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
43131      fi
43132    fi
43133
43134    # Now join together the path and the arguments once again
43135    if test "x$arguments" != xEOL; then
43136      new_complete="$new_path ${arguments% *}"
43137    else
43138      new_complete="$new_path"
43139    fi
43140
43141    if test "x$complete" != "x$new_complete"; then
43142      OBJCOPY="$new_complete"
43143      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
43144$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
43145    fi
43146  fi
43147
43148      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
43149        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
43150        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
43151        # - version number is last blank separate word on first line
43152        # - version number formats that have been seen:
43153        #   - <major>.<minor>
43154        #   - <major>.<minor>.<micro>
43155        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
43156        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
43157         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
43158              -e 's/.* //' \
43159              -e '/^[01]\./b bad' \
43160              -e '/^2\./{' \
43161              -e '  s/^2\.//' \
43162              -e '  /^[0-9]$/b bad' \
43163              -e '  /^[0-9]\./b bad' \
43164              -e '  /^1[0-9]$/b bad' \
43165              -e '  /^1[0-9]\./b bad' \
43166              -e '  /^20\./b bad' \
43167              -e '  /^21\.0$/b bad' \
43168              -e '  /^21\.0\./b bad' \
43169              -e '}' \
43170              -e ':good' \
43171              -e 's/.*/VALID_VERSION/p' \
43172              -e 'q' \
43173              -e ':bad' \
43174              -e 's/.*/BAD_VERSION/p' \
43175              -e 'q'`
43176        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
43177          OBJCOPY=
43178          { $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
43179$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
43180          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
43181$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
43182          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
43183$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
43184          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
43185$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
43186          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
43187$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
43188        fi
43189      fi
43190    fi
43191  fi
43192
43193
43194
43195  # Publish this variable in the help.
43196
43197
43198  if [ -z "${OBJDUMP+x}" ]; then
43199    # The variable is not set by user, try to locate tool using the code snippet
43200    if test -n "$ac_tool_prefix"; then
43201  for ac_prog in gobjdump objdump
43202  do
43203    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43204set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43206$as_echo_n "checking for $ac_word... " >&6; }
43207if ${ac_cv_prog_OBJDUMP+:} false; then :
43208  $as_echo_n "(cached) " >&6
43209else
43210  if test -n "$OBJDUMP"; then
43211  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43212else
43213as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43214for as_dir in $PATH
43215do
43216  IFS=$as_save_IFS
43217  test -z "$as_dir" && as_dir=.
43218    for ac_exec_ext in '' $ac_executable_extensions; do
43219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43220    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43222    break 2
43223  fi
43224done
43225  done
43226IFS=$as_save_IFS
43227
43228fi
43229fi
43230OBJDUMP=$ac_cv_prog_OBJDUMP
43231if test -n "$OBJDUMP"; then
43232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43233$as_echo "$OBJDUMP" >&6; }
43234else
43235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43236$as_echo "no" >&6; }
43237fi
43238
43239
43240    test -n "$OBJDUMP" && break
43241  done
43242fi
43243if test -z "$OBJDUMP"; then
43244  ac_ct_OBJDUMP=$OBJDUMP
43245  for ac_prog in gobjdump objdump
43246do
43247  # Extract the first word of "$ac_prog", so it can be a program name with args.
43248set dummy $ac_prog; ac_word=$2
43249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43250$as_echo_n "checking for $ac_word... " >&6; }
43251if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43252  $as_echo_n "(cached) " >&6
43253else
43254  if test -n "$ac_ct_OBJDUMP"; then
43255  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43256else
43257as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43258for as_dir in $PATH
43259do
43260  IFS=$as_save_IFS
43261  test -z "$as_dir" && as_dir=.
43262    for ac_exec_ext in '' $ac_executable_extensions; do
43263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43264    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43266    break 2
43267  fi
43268done
43269  done
43270IFS=$as_save_IFS
43271
43272fi
43273fi
43274ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43275if test -n "$ac_ct_OBJDUMP"; then
43276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43277$as_echo "$ac_ct_OBJDUMP" >&6; }
43278else
43279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43280$as_echo "no" >&6; }
43281fi
43282
43283
43284  test -n "$ac_ct_OBJDUMP" && break
43285done
43286
43287  if test "x$ac_ct_OBJDUMP" = x; then
43288    OBJDUMP=""
43289  else
43290    case $cross_compiling:$ac_tool_warned in
43291yes:)
43292{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43293$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43294ac_tool_warned=yes ;;
43295esac
43296    OBJDUMP=$ac_ct_OBJDUMP
43297  fi
43298fi
43299
43300  else
43301    # The variable is set, but is it from the command line or the environment?
43302
43303    # Try to remove the string !OBJDUMP! from our list.
43304    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
43305    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43306      # If it failed, the variable was not from the command line. Ignore it,
43307      # but warn the user (except for BASH, which is always set by the calling BASH).
43308      if test "xOBJDUMP" != xBASH; then
43309        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
43310$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
43311      fi
43312      # Try to locate tool using the code snippet
43313      if test -n "$ac_tool_prefix"; then
43314  for ac_prog in gobjdump objdump
43315  do
43316    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
43317set dummy $ac_tool_prefix$ac_prog; ac_word=$2
43318{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43319$as_echo_n "checking for $ac_word... " >&6; }
43320if ${ac_cv_prog_OBJDUMP+:} false; then :
43321  $as_echo_n "(cached) " >&6
43322else
43323  if test -n "$OBJDUMP"; then
43324  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
43325else
43326as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43327for as_dir in $PATH
43328do
43329  IFS=$as_save_IFS
43330  test -z "$as_dir" && as_dir=.
43331    for ac_exec_ext in '' $ac_executable_extensions; do
43332  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43333    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
43334    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43335    break 2
43336  fi
43337done
43338  done
43339IFS=$as_save_IFS
43340
43341fi
43342fi
43343OBJDUMP=$ac_cv_prog_OBJDUMP
43344if test -n "$OBJDUMP"; then
43345  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43346$as_echo "$OBJDUMP" >&6; }
43347else
43348  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43349$as_echo "no" >&6; }
43350fi
43351
43352
43353    test -n "$OBJDUMP" && break
43354  done
43355fi
43356if test -z "$OBJDUMP"; then
43357  ac_ct_OBJDUMP=$OBJDUMP
43358  for ac_prog in gobjdump objdump
43359do
43360  # Extract the first word of "$ac_prog", so it can be a program name with args.
43361set dummy $ac_prog; ac_word=$2
43362{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43363$as_echo_n "checking for $ac_word... " >&6; }
43364if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
43365  $as_echo_n "(cached) " >&6
43366else
43367  if test -n "$ac_ct_OBJDUMP"; then
43368  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
43369else
43370as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43371for as_dir in $PATH
43372do
43373  IFS=$as_save_IFS
43374  test -z "$as_dir" && as_dir=.
43375    for ac_exec_ext in '' $ac_executable_extensions; do
43376  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43377    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
43378    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43379    break 2
43380  fi
43381done
43382  done
43383IFS=$as_save_IFS
43384
43385fi
43386fi
43387ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
43388if test -n "$ac_ct_OBJDUMP"; then
43389  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
43390$as_echo "$ac_ct_OBJDUMP" >&6; }
43391else
43392  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43393$as_echo "no" >&6; }
43394fi
43395
43396
43397  test -n "$ac_ct_OBJDUMP" && break
43398done
43399
43400  if test "x$ac_ct_OBJDUMP" = x; then
43401    OBJDUMP=""
43402  else
43403    case $cross_compiling:$ac_tool_warned in
43404yes:)
43405{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
43406$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
43407ac_tool_warned=yes ;;
43408esac
43409    OBJDUMP=$ac_ct_OBJDUMP
43410  fi
43411fi
43412
43413    else
43414      # If it succeeded, then it was overridden by the user. We will use it
43415      # for the tool.
43416
43417      # First remove it from the list of overridden variables, so we can test
43418      # for unknown variables in the end.
43419      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43420
43421      # Check if we try to supply an empty value
43422      if test "x$OBJDUMP" = x; then
43423        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
43424$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
43425        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43426$as_echo_n "checking for OBJDUMP... " >&6; }
43427        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43428$as_echo "disabled" >&6; }
43429      else
43430        # Check if the provided tool contains a complete path.
43431        tool_specified="$OBJDUMP"
43432        tool_basename="${tool_specified##*/}"
43433        if test "x$tool_basename" = "x$tool_specified"; then
43434          # A command without a complete path is provided, search $PATH.
43435          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
43436$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
43437          # Extract the first word of "$tool_basename", so it can be a program name with args.
43438set dummy $tool_basename; ac_word=$2
43439{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43440$as_echo_n "checking for $ac_word... " >&6; }
43441if ${ac_cv_path_OBJDUMP+:} false; then :
43442  $as_echo_n "(cached) " >&6
43443else
43444  case $OBJDUMP in
43445  [\\/]* | ?:[\\/]*)
43446  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
43447  ;;
43448  *)
43449  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43450for as_dir in $PATH
43451do
43452  IFS=$as_save_IFS
43453  test -z "$as_dir" && as_dir=.
43454    for ac_exec_ext in '' $ac_executable_extensions; do
43455  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43456    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
43457    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43458    break 2
43459  fi
43460done
43461  done
43462IFS=$as_save_IFS
43463
43464  ;;
43465esac
43466fi
43467OBJDUMP=$ac_cv_path_OBJDUMP
43468if test -n "$OBJDUMP"; then
43469  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
43470$as_echo "$OBJDUMP" >&6; }
43471else
43472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43473$as_echo "no" >&6; }
43474fi
43475
43476
43477          if test "x$OBJDUMP" = x; then
43478            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43479          fi
43480        else
43481          # Otherwise we believe it is a complete path. Use it as it is.
43482          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
43483$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
43484          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
43485$as_echo_n "checking for OBJDUMP... " >&6; }
43486          if test ! -x "$tool_specified"; then
43487            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43488$as_echo "not found" >&6; }
43489            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
43490          fi
43491          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43492$as_echo "$tool_specified" >&6; }
43493        fi
43494      fi
43495    fi
43496
43497  fi
43498
43499
43500  if test "x$OBJDUMP" != x; then
43501    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43502    # bails if argument is missing.
43503
43504  # Only process if variable expands to non-empty
43505
43506  if test "x$OBJDUMP" != x; then
43507    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43508
43509  # First separate the path from the arguments. This will split at the first
43510  # space.
43511  complete="$OBJDUMP"
43512  path="${complete%% *}"
43513  tmp="$complete EOL"
43514  arguments="${tmp#* }"
43515
43516  # Input might be given as Windows format, start by converting to
43517  # unix format.
43518  new_path=`$CYGPATH -u "$path"`
43519
43520  # Now try to locate executable using which
43521  new_path=`$WHICH "$new_path" 2> /dev/null`
43522  # bat and cmd files are not always considered executable in cygwin causing which
43523  # to not find them
43524  if test "x$new_path" = x \
43525      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43526      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43527    new_path=`$CYGPATH -u "$path"`
43528  fi
43529  if test "x$new_path" = x; then
43530    # Oops. Which didn't find the executable.
43531    # The splitting of arguments from the executable at a space might have been incorrect,
43532    # since paths with space are more likely in Windows. Give it another try with the whole
43533    # argument.
43534    path="$complete"
43535    arguments="EOL"
43536    new_path=`$CYGPATH -u "$path"`
43537    new_path=`$WHICH "$new_path" 2> /dev/null`
43538    # bat and cmd files are not always considered executable in cygwin causing which
43539    # to not find them
43540    if test "x$new_path" = x \
43541        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43542        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43543      new_path=`$CYGPATH -u "$path"`
43544    fi
43545    if test "x$new_path" = x; then
43546      # It's still not found. Now this is an unrecoverable error.
43547      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43548$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43549      has_space=`$ECHO "$complete" | $GREP " "`
43550      if test "x$has_space" != x; then
43551        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43552$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43553      fi
43554      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43555    fi
43556  fi
43557
43558  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43559  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43560  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43561  # "foo.exe" is OK but "foo" is an error.
43562  #
43563  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43564  # It is also a way to make sure we got the proper file name for the real test later on.
43565  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43566  if test "x$test_shortpath" = x; then
43567    # Short path failed, file does not exist as specified.
43568    # Try adding .exe or .cmd
43569    if test -f "${new_path}.exe"; then
43570      input_to_shortpath="${new_path}.exe"
43571    elif test -f "${new_path}.cmd"; then
43572      input_to_shortpath="${new_path}.cmd"
43573    else
43574      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43575$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43576      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43577$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43578      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43579    fi
43580  else
43581    input_to_shortpath="$new_path"
43582  fi
43583
43584  # Call helper function which possibly converts this using DOS-style short mode.
43585  # If so, the updated path is stored in $new_path.
43586  new_path="$input_to_shortpath"
43587
43588  input_path="$input_to_shortpath"
43589  # Check if we need to convert this using DOS-style short mode. If the path
43590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43591  # take no chances and rewrite it.
43592  # Note: m4 eats our [], so we need to use [ and ] instead.
43593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43594  if test "x$has_forbidden_chars" != x; then
43595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43599      # Going to short mode and back again did indeed matter. Since short mode is
43600      # case insensitive, let's make it lowercase to improve readability.
43601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43602      # Now convert it back to Unix-style (cygpath)
43603      input_path=`$CYGPATH -u "$shortmode_path"`
43604      new_path="$input_path"
43605    fi
43606  fi
43607
43608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43609  if test "x$test_cygdrive_prefix" = x; then
43610    # As a simple fix, exclude /usr/bin since it's not a real path.
43611    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43613      # a path prefixed by /cygdrive for fixpath to work.
43614      new_path="$CYGWIN_ROOT_PATH$input_path"
43615    fi
43616  fi
43617
43618  # remove trailing .exe if any
43619  new_path="${new_path/%.exe/}"
43620
43621    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43622
43623  # First separate the path from the arguments. This will split at the first
43624  # space.
43625  complete="$OBJDUMP"
43626  path="${complete%% *}"
43627  tmp="$complete EOL"
43628  arguments="${tmp#* }"
43629
43630  # Input might be given as Windows format, start by converting to
43631  # unix format.
43632  new_path="$path"
43633
43634  windows_path="$new_path"
43635  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43636    unix_path=`$CYGPATH -u "$windows_path"`
43637    new_path="$unix_path"
43638  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43639    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43640    new_path="$unix_path"
43641  fi
43642
43643
43644  # Now try to locate executable using which
43645  new_path=`$WHICH "$new_path" 2> /dev/null`
43646
43647  if test "x$new_path" = x; then
43648    # Oops. Which didn't find the executable.
43649    # The splitting of arguments from the executable at a space might have been incorrect,
43650    # since paths with space are more likely in Windows. Give it another try with the whole
43651    # argument.
43652    path="$complete"
43653    arguments="EOL"
43654    new_path="$path"
43655
43656  windows_path="$new_path"
43657  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43658    unix_path=`$CYGPATH -u "$windows_path"`
43659    new_path="$unix_path"
43660  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43661    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43662    new_path="$unix_path"
43663  fi
43664
43665
43666    new_path=`$WHICH "$new_path" 2> /dev/null`
43667    # bat and cmd files are not always considered executable in MSYS causing which
43668    # to not find them
43669    if test "x$new_path" = x \
43670        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43671        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43672      new_path="$path"
43673
43674  windows_path="$new_path"
43675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43676    unix_path=`$CYGPATH -u "$windows_path"`
43677    new_path="$unix_path"
43678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43680    new_path="$unix_path"
43681  fi
43682
43683    fi
43684
43685    if test "x$new_path" = x; then
43686      # It's still not found. Now this is an unrecoverable error.
43687      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43688$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43689      has_space=`$ECHO "$complete" | $GREP " "`
43690      if test "x$has_space" != x; then
43691        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43692$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43693      fi
43694      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43695    fi
43696  fi
43697
43698  # Now new_path has a complete unix path to the binary
43699  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43700    # Keep paths in /bin as-is, but remove trailing .exe if any
43701    new_path="${new_path/%.exe/}"
43702    # Do not save /bin paths to all_fixpath_prefixes!
43703  else
43704    # Not in mixed or Windows style, start by that.
43705    new_path=`cmd //c echo $new_path`
43706
43707  input_path="$new_path"
43708  # Check if we need to convert this using DOS-style short mode. If the path
43709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43710  # take no chances and rewrite it.
43711  # Note: m4 eats our [], so we need to use [ and ] instead.
43712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43713  if test "x$has_forbidden_chars" != x; then
43714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43716  fi
43717
43718    # Output is in $new_path
43719
43720  windows_path="$new_path"
43721  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43722    unix_path=`$CYGPATH -u "$windows_path"`
43723    new_path="$unix_path"
43724  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43725    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43726    new_path="$unix_path"
43727  fi
43728
43729    # remove trailing .exe if any
43730    new_path="${new_path/%.exe/}"
43731
43732    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43733    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43734  fi
43735
43736    else
43737      # We're on a unix platform. Hooray! :)
43738      # First separate the path from the arguments. This will split at the first
43739      # space.
43740      complete="$OBJDUMP"
43741      path="${complete%% *}"
43742      tmp="$complete EOL"
43743      arguments="${tmp#* }"
43744
43745      # Cannot rely on the command "which" here since it doesn't always work.
43746      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43747      if test -z "$is_absolute_path"; then
43748        # Path to executable is not absolute. Find it.
43749        IFS_save="$IFS"
43750        IFS=:
43751        for p in $PATH; do
43752          if test -f "$p/$path" && test -x "$p/$path"; then
43753            new_path="$p/$path"
43754            break
43755          fi
43756        done
43757        IFS="$IFS_save"
43758      else
43759        # This is an absolute path, we can use it without further modifications.
43760        new_path="$path"
43761      fi
43762
43763      if test "x$new_path" = x; then
43764        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43765$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43766        has_space=`$ECHO "$complete" | $GREP " "`
43767        if test "x$has_space" != x; then
43768          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43769$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43770        fi
43771        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43772      fi
43773    fi
43774
43775    # Now join together the path and the arguments once again
43776    if test "x$arguments" != xEOL; then
43777      new_complete="$new_path ${arguments% *}"
43778    else
43779      new_complete="$new_path"
43780    fi
43781
43782    if test "x$complete" != "x$new_complete"; then
43783      OBJDUMP="$new_complete"
43784      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43785$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43786    fi
43787  fi
43788
43789  fi
43790
43791
43792  # Restore old path.
43793  PATH="$OLD_PATH"
43794
43795  # Restore the flags to the user specified values.
43796  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43797  CFLAGS="$ORG_CFLAGS"
43798  CXXFLAGS="$ORG_CXXFLAGS"
43799
43800
43801# Finally do some processing after the detection phase
43802
43803  if test "x$COMPILE_TYPE" = "xcross"; then
43804    # Now we need to find a C/C++ compiler that can build executables for the
43805    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43806    # used once. Also, we need to do this without adding a tools dir to the
43807    # path, otherwise we might pick up cross-compilers which don't use standard
43808    # naming.
43809
43810    OLDPATH="$PATH"
43811
43812
43813# Check whether --with-build-devkit was given.
43814if test "${with_build_devkit+set}" = set; then :
43815  withval=$with_build_devkit;
43816fi
43817
43818    if test "x$with_build_devkit" = "xyes"; then
43819      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43820    elif test -n "$with_build_devkit"; then
43821      if test ! -d "$with_build_devkit"; then
43822        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43823      else
43824
43825  # Only process if variable expands to non-empty
43826
43827  if test "x$with_build_devkit" != x; then
43828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43829
43830  # Input might be given as Windows format, start by converting to
43831  # unix format.
43832  path="$with_build_devkit"
43833  new_path=`$CYGPATH -u "$path"`
43834
43835  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43836  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43837  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43838  # "foo.exe" is OK but "foo" is an error.
43839  #
43840  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43841  # It is also a way to make sure we got the proper file name for the real test later on.
43842  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43843  if test "x$test_shortpath" = x; then
43844    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43845$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43846    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43847  fi
43848
43849  # Call helper function which possibly converts this using DOS-style short mode.
43850  # If so, the updated path is stored in $new_path.
43851
43852  input_path="$new_path"
43853  # Check if we need to convert this using DOS-style short mode. If the path
43854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43855  # take no chances and rewrite it.
43856  # Note: m4 eats our [], so we need to use [ and ] instead.
43857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43858  if test "x$has_forbidden_chars" != x; then
43859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43863      # Going to short mode and back again did indeed matter. Since short mode is
43864      # case insensitive, let's make it lowercase to improve readability.
43865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43866      # Now convert it back to Unix-style (cygpath)
43867      input_path=`$CYGPATH -u "$shortmode_path"`
43868      new_path="$input_path"
43869    fi
43870  fi
43871
43872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43873  if test "x$test_cygdrive_prefix" = x; then
43874    # As a simple fix, exclude /usr/bin since it's not a real path.
43875    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43877      # a path prefixed by /cygdrive for fixpath to work.
43878      new_path="$CYGWIN_ROOT_PATH$input_path"
43879    fi
43880  fi
43881
43882
43883  if test "x$path" != "x$new_path"; then
43884    with_build_devkit="$new_path"
43885    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43886$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43887  fi
43888
43889    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43890
43891  path="$with_build_devkit"
43892  has_colon=`$ECHO $path | $GREP ^.:`
43893  new_path="$path"
43894  if test "x$has_colon" = x; then
43895    # Not in mixed or Windows style, start by that.
43896    new_path=`cmd //c echo $path`
43897  fi
43898
43899
43900  input_path="$new_path"
43901  # Check if we need to convert this using DOS-style short mode. If the path
43902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43903  # take no chances and rewrite it.
43904  # Note: m4 eats our [], so we need to use [ and ] instead.
43905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43906  if test "x$has_forbidden_chars" != x; then
43907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43908    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43909  fi
43910
43911
43912  windows_path="$new_path"
43913  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43914    unix_path=`$CYGPATH -u "$windows_path"`
43915    new_path="$unix_path"
43916  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43917    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43918    new_path="$unix_path"
43919  fi
43920
43921  if test "x$path" != "x$new_path"; then
43922    with_build_devkit="$new_path"
43923    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43924$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43925  fi
43926
43927  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43928  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43929
43930    else
43931      # We're on a unix platform. Hooray! :)
43932      path="$with_build_devkit"
43933      has_space=`$ECHO "$path" | $GREP " "`
43934      if test "x$has_space" != x; then
43935        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43936$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43937        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43938      fi
43939
43940      # Use eval to expand a potential ~
43941      eval path="$path"
43942      if test ! -f "$path" && test ! -d "$path"; then
43943        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43944      fi
43945
43946      if test -d "$path"; then
43947        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43948      else
43949        dir="`$DIRNAME "$path"`"
43950        base="`$BASENAME "$path"`"
43951        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43952      fi
43953    fi
43954  fi
43955
43956        BUILD_DEVKIT_ROOT="$with_build_devkit"
43957        # Check for a meta data info file in the root of the devkit
43958        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43959          # Process devkit.info so that existing devkit variables are not
43960          # modified by this
43961          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43962              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43963              -e "s/\$host/\$build/g" \
43964              $BUILD_DEVKIT_ROOT/devkit.info \
43965              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43966          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43967          # This potentially sets the following:
43968          # A descriptive name of the devkit
43969
43970  if test "x$BUILD_DEVKIT_NAME" = x; then
43971    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43972  fi
43973
43974          # Corresponds to --with-extra-path
43975
43976  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43977    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43978  fi
43979
43980          # Corresponds to --with-toolchain-path
43981
43982  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43983    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43984  fi
43985
43986          # Corresponds to --with-sysroot
43987
43988  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43989    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43990  fi
43991
43992          # Skip the Window specific parts
43993        fi
43994
43995        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43996$as_echo_n "checking for build platform devkit... " >&6; }
43997        if test "x$BUILD_DEVKIT_NAME" != x; then
43998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43999$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
44000        else
44001          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
44002$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
44003        fi
44004
44005        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
44006
44007  if test "x$BUILD_SYSROOT" != "x"; then
44008    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
44009      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
44010        # Solaris Studio does not have a concept of sysroot. Instead we must
44011        # make sure the default include and lib dirs are appended to each
44012        # compile and link command line. Must also add -I-xbuiltin to enable
44013        # inlining of system functions and intrinsics.
44014        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
44015        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
44016            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
44017            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
44018      fi
44019    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
44020      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
44021      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
44022    elif test "x$TOOLCHAIN_TYPE" = xclang; then
44023      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
44024      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
44025    fi
44026    # Propagate the sysroot args to hotspot
44027    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
44028    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44029    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44030    # The global CFLAGS and LDFLAGS variables need these for configure to function
44031    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
44032    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
44033    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
44034    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
44035  fi
44036
44037  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
44038    # We also need -iframework<path>/System/Library/Frameworks
44039    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44040    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
44041    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
44042    # set this here so it doesn't have to be peppered throughout the forest
44043    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44044    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
44045  fi
44046
44047
44048
44049
44050
44051         # Fallback default of just /bin if DEVKIT_PATH is not defined
44052        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
44053          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
44054        fi
44055        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
44056      fi
44057    fi
44058
44059    # FIXME: we should list the discovered compilers as an exclude pattern!
44060    # If we do that, we can do this detection before POST_DETECTION, and still
44061    # find the build compilers in the tools dir, if needed.
44062
44063
44064
44065  # Publish this variable in the help.
44066
44067
44068  if [ -z "${BUILD_CC+x}" ]; then
44069    # The variable is not set by user, try to locate tool using the code snippet
44070    for ac_prog in cl cc gcc
44071do
44072  # Extract the first word of "$ac_prog", so it can be a program name with args.
44073set dummy $ac_prog; ac_word=$2
44074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44075$as_echo_n "checking for $ac_word... " >&6; }
44076if ${ac_cv_path_BUILD_CC+:} false; then :
44077  $as_echo_n "(cached) " >&6
44078else
44079  case $BUILD_CC in
44080  [\\/]* | ?:[\\/]*)
44081  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44082  ;;
44083  *)
44084  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44085for as_dir in $PATH
44086do
44087  IFS=$as_save_IFS
44088  test -z "$as_dir" && as_dir=.
44089    for ac_exec_ext in '' $ac_executable_extensions; do
44090  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44091    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44092    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44093    break 2
44094  fi
44095done
44096  done
44097IFS=$as_save_IFS
44098
44099  ;;
44100esac
44101fi
44102BUILD_CC=$ac_cv_path_BUILD_CC
44103if test -n "$BUILD_CC"; then
44104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44105$as_echo "$BUILD_CC" >&6; }
44106else
44107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44108$as_echo "no" >&6; }
44109fi
44110
44111
44112  test -n "$BUILD_CC" && break
44113done
44114
44115  else
44116    # The variable is set, but is it from the command line or the environment?
44117
44118    # Try to remove the string !BUILD_CC! from our list.
44119    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
44120    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44121      # If it failed, the variable was not from the command line. Ignore it,
44122      # but warn the user (except for BASH, which is always set by the calling BASH).
44123      if test "xBUILD_CC" != xBASH; then
44124        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
44125$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
44126      fi
44127      # Try to locate tool using the code snippet
44128      for ac_prog in cl cc gcc
44129do
44130  # Extract the first word of "$ac_prog", so it can be a program name with args.
44131set dummy $ac_prog; ac_word=$2
44132{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44133$as_echo_n "checking for $ac_word... " >&6; }
44134if ${ac_cv_path_BUILD_CC+:} false; then :
44135  $as_echo_n "(cached) " >&6
44136else
44137  case $BUILD_CC in
44138  [\\/]* | ?:[\\/]*)
44139  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44140  ;;
44141  *)
44142  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44143for as_dir in $PATH
44144do
44145  IFS=$as_save_IFS
44146  test -z "$as_dir" && as_dir=.
44147    for ac_exec_ext in '' $ac_executable_extensions; do
44148  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44149    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44150    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44151    break 2
44152  fi
44153done
44154  done
44155IFS=$as_save_IFS
44156
44157  ;;
44158esac
44159fi
44160BUILD_CC=$ac_cv_path_BUILD_CC
44161if test -n "$BUILD_CC"; then
44162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44163$as_echo "$BUILD_CC" >&6; }
44164else
44165  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44166$as_echo "no" >&6; }
44167fi
44168
44169
44170  test -n "$BUILD_CC" && break
44171done
44172
44173    else
44174      # If it succeeded, then it was overridden by the user. We will use it
44175      # for the tool.
44176
44177      # First remove it from the list of overridden variables, so we can test
44178      # for unknown variables in the end.
44179      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44180
44181      # Check if we try to supply an empty value
44182      if test "x$BUILD_CC" = x; then
44183        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
44184$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
44185        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44186$as_echo_n "checking for BUILD_CC... " >&6; }
44187        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44188$as_echo "disabled" >&6; }
44189      else
44190        # Check if the provided tool contains a complete path.
44191        tool_specified="$BUILD_CC"
44192        tool_basename="${tool_specified##*/}"
44193        if test "x$tool_basename" = "x$tool_specified"; then
44194          # A command without a complete path is provided, search $PATH.
44195          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
44196$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
44197          # Extract the first word of "$tool_basename", so it can be a program name with args.
44198set dummy $tool_basename; ac_word=$2
44199{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44200$as_echo_n "checking for $ac_word... " >&6; }
44201if ${ac_cv_path_BUILD_CC+:} false; then :
44202  $as_echo_n "(cached) " >&6
44203else
44204  case $BUILD_CC in
44205  [\\/]* | ?:[\\/]*)
44206  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
44207  ;;
44208  *)
44209  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44210for as_dir in $PATH
44211do
44212  IFS=$as_save_IFS
44213  test -z "$as_dir" && as_dir=.
44214    for ac_exec_ext in '' $ac_executable_extensions; do
44215  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44216    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
44217    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44218    break 2
44219  fi
44220done
44221  done
44222IFS=$as_save_IFS
44223
44224  ;;
44225esac
44226fi
44227BUILD_CC=$ac_cv_path_BUILD_CC
44228if test -n "$BUILD_CC"; then
44229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
44230$as_echo "$BUILD_CC" >&6; }
44231else
44232  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44233$as_echo "no" >&6; }
44234fi
44235
44236
44237          if test "x$BUILD_CC" = x; then
44238            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44239          fi
44240        else
44241          # Otherwise we believe it is a complete path. Use it as it is.
44242          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
44243$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
44244          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
44245$as_echo_n "checking for BUILD_CC... " >&6; }
44246          if test ! -x "$tool_specified"; then
44247            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44248$as_echo "not found" >&6; }
44249            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
44250          fi
44251          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44252$as_echo "$tool_specified" >&6; }
44253        fi
44254      fi
44255    fi
44256
44257  fi
44258
44259
44260
44261  if test "x$BUILD_CC" = x; then
44262    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
44263  fi
44264
44265
44266
44267  # Only process if variable expands to non-empty
44268
44269  if test "x$BUILD_CC" != x; then
44270    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44271
44272  # First separate the path from the arguments. This will split at the first
44273  # space.
44274  complete="$BUILD_CC"
44275  path="${complete%% *}"
44276  tmp="$complete EOL"
44277  arguments="${tmp#* }"
44278
44279  # Input might be given as Windows format, start by converting to
44280  # unix format.
44281  new_path=`$CYGPATH -u "$path"`
44282
44283  # Now try to locate executable using which
44284  new_path=`$WHICH "$new_path" 2> /dev/null`
44285  # bat and cmd files are not always considered executable in cygwin causing which
44286  # to not find them
44287  if test "x$new_path" = x \
44288      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44289      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44290    new_path=`$CYGPATH -u "$path"`
44291  fi
44292  if test "x$new_path" = x; then
44293    # Oops. Which didn't find the executable.
44294    # The splitting of arguments from the executable at a space might have been incorrect,
44295    # since paths with space are more likely in Windows. Give it another try with the whole
44296    # argument.
44297    path="$complete"
44298    arguments="EOL"
44299    new_path=`$CYGPATH -u "$path"`
44300    new_path=`$WHICH "$new_path" 2> /dev/null`
44301    # bat and cmd files are not always considered executable in cygwin causing which
44302    # to not find them
44303    if test "x$new_path" = x \
44304        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44305        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44306      new_path=`$CYGPATH -u "$path"`
44307    fi
44308    if test "x$new_path" = x; then
44309      # It's still not found. Now this is an unrecoverable error.
44310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44311$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44312      has_space=`$ECHO "$complete" | $GREP " "`
44313      if test "x$has_space" != x; then
44314        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44315$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44316      fi
44317      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44318    fi
44319  fi
44320
44321  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44322  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44323  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44324  # "foo.exe" is OK but "foo" is an error.
44325  #
44326  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44327  # It is also a way to make sure we got the proper file name for the real test later on.
44328  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44329  if test "x$test_shortpath" = x; then
44330    # Short path failed, file does not exist as specified.
44331    # Try adding .exe or .cmd
44332    if test -f "${new_path}.exe"; then
44333      input_to_shortpath="${new_path}.exe"
44334    elif test -f "${new_path}.cmd"; then
44335      input_to_shortpath="${new_path}.cmd"
44336    else
44337      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
44338$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
44339      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44340$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44341      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44342    fi
44343  else
44344    input_to_shortpath="$new_path"
44345  fi
44346
44347  # Call helper function which possibly converts this using DOS-style short mode.
44348  # If so, the updated path is stored in $new_path.
44349  new_path="$input_to_shortpath"
44350
44351  input_path="$input_to_shortpath"
44352  # Check if we need to convert this using DOS-style short mode. If the path
44353  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44354  # take no chances and rewrite it.
44355  # Note: m4 eats our [], so we need to use [ and ] instead.
44356  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44357  if test "x$has_forbidden_chars" != x; then
44358    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44359    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44360    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44361    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44362      # Going to short mode and back again did indeed matter. Since short mode is
44363      # case insensitive, let's make it lowercase to improve readability.
44364      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44365      # Now convert it back to Unix-style (cygpath)
44366      input_path=`$CYGPATH -u "$shortmode_path"`
44367      new_path="$input_path"
44368    fi
44369  fi
44370
44371  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44372  if test "x$test_cygdrive_prefix" = x; then
44373    # As a simple fix, exclude /usr/bin since it's not a real path.
44374    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44375      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44376      # a path prefixed by /cygdrive for fixpath to work.
44377      new_path="$CYGWIN_ROOT_PATH$input_path"
44378    fi
44379  fi
44380
44381  # remove trailing .exe if any
44382  new_path="${new_path/%.exe/}"
44383
44384    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44385
44386  # First separate the path from the arguments. This will split at the first
44387  # space.
44388  complete="$BUILD_CC"
44389  path="${complete%% *}"
44390  tmp="$complete EOL"
44391  arguments="${tmp#* }"
44392
44393  # Input might be given as Windows format, start by converting to
44394  # unix format.
44395  new_path="$path"
44396
44397  windows_path="$new_path"
44398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44399    unix_path=`$CYGPATH -u "$windows_path"`
44400    new_path="$unix_path"
44401  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44402    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44403    new_path="$unix_path"
44404  fi
44405
44406
44407  # Now try to locate executable using which
44408  new_path=`$WHICH "$new_path" 2> /dev/null`
44409
44410  if test "x$new_path" = x; then
44411    # Oops. Which didn't find the executable.
44412    # The splitting of arguments from the executable at a space might have been incorrect,
44413    # since paths with space are more likely in Windows. Give it another try with the whole
44414    # argument.
44415    path="$complete"
44416    arguments="EOL"
44417    new_path="$path"
44418
44419  windows_path="$new_path"
44420  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44421    unix_path=`$CYGPATH -u "$windows_path"`
44422    new_path="$unix_path"
44423  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44424    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44425    new_path="$unix_path"
44426  fi
44427
44428
44429    new_path=`$WHICH "$new_path" 2> /dev/null`
44430    # bat and cmd files are not always considered executable in MSYS causing which
44431    # to not find them
44432    if test "x$new_path" = x \
44433        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44434        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44435      new_path="$path"
44436
44437  windows_path="$new_path"
44438  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44439    unix_path=`$CYGPATH -u "$windows_path"`
44440    new_path="$unix_path"
44441  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44442    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44443    new_path="$unix_path"
44444  fi
44445
44446    fi
44447
44448    if test "x$new_path" = x; then
44449      # It's still not found. Now this is an unrecoverable error.
44450      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44451$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44452      has_space=`$ECHO "$complete" | $GREP " "`
44453      if test "x$has_space" != x; then
44454        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44455$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44456      fi
44457      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44458    fi
44459  fi
44460
44461  # Now new_path has a complete unix path to the binary
44462  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44463    # Keep paths in /bin as-is, but remove trailing .exe if any
44464    new_path="${new_path/%.exe/}"
44465    # Do not save /bin paths to all_fixpath_prefixes!
44466  else
44467    # Not in mixed or Windows style, start by that.
44468    new_path=`cmd //c echo $new_path`
44469
44470  input_path="$new_path"
44471  # Check if we need to convert this using DOS-style short mode. If the path
44472  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44473  # take no chances and rewrite it.
44474  # Note: m4 eats our [], so we need to use [ and ] instead.
44475  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44476  if test "x$has_forbidden_chars" != x; then
44477    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44478    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44479  fi
44480
44481    # Output is in $new_path
44482
44483  windows_path="$new_path"
44484  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44485    unix_path=`$CYGPATH -u "$windows_path"`
44486    new_path="$unix_path"
44487  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44488    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44489    new_path="$unix_path"
44490  fi
44491
44492    # remove trailing .exe if any
44493    new_path="${new_path/%.exe/}"
44494
44495    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44496    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44497  fi
44498
44499    else
44500      # We're on a unix platform. Hooray! :)
44501      # First separate the path from the arguments. This will split at the first
44502      # space.
44503      complete="$BUILD_CC"
44504      path="${complete%% *}"
44505      tmp="$complete EOL"
44506      arguments="${tmp#* }"
44507
44508      # Cannot rely on the command "which" here since it doesn't always work.
44509      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44510      if test -z "$is_absolute_path"; then
44511        # Path to executable is not absolute. Find it.
44512        IFS_save="$IFS"
44513        IFS=:
44514        for p in $PATH; do
44515          if test -f "$p/$path" && test -x "$p/$path"; then
44516            new_path="$p/$path"
44517            break
44518          fi
44519        done
44520        IFS="$IFS_save"
44521      else
44522        # This is an absolute path, we can use it without further modifications.
44523        new_path="$path"
44524      fi
44525
44526      if test "x$new_path" = x; then
44527        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44528$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44529        has_space=`$ECHO "$complete" | $GREP " "`
44530        if test "x$has_space" != x; then
44531          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44532$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44533        fi
44534        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44535      fi
44536    fi
44537
44538    # Now join together the path and the arguments once again
44539    if test "x$arguments" != xEOL; then
44540      new_complete="$new_path ${arguments% *}"
44541    else
44542      new_complete="$new_path"
44543    fi
44544
44545    if test "x$complete" != "x$new_complete"; then
44546      BUILD_CC="$new_complete"
44547      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44548$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44549    fi
44550  fi
44551
44552
44553
44554
44555  # Publish this variable in the help.
44556
44557
44558  if [ -z "${BUILD_CXX+x}" ]; then
44559    # The variable is not set by user, try to locate tool using the code snippet
44560    for ac_prog in cl CC g++
44561do
44562  # Extract the first word of "$ac_prog", so it can be a program name with args.
44563set dummy $ac_prog; ac_word=$2
44564{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44565$as_echo_n "checking for $ac_word... " >&6; }
44566if ${ac_cv_path_BUILD_CXX+:} false; then :
44567  $as_echo_n "(cached) " >&6
44568else
44569  case $BUILD_CXX in
44570  [\\/]* | ?:[\\/]*)
44571  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44572  ;;
44573  *)
44574  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44575for as_dir in $PATH
44576do
44577  IFS=$as_save_IFS
44578  test -z "$as_dir" && as_dir=.
44579    for ac_exec_ext in '' $ac_executable_extensions; do
44580  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44581    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44582    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44583    break 2
44584  fi
44585done
44586  done
44587IFS=$as_save_IFS
44588
44589  ;;
44590esac
44591fi
44592BUILD_CXX=$ac_cv_path_BUILD_CXX
44593if test -n "$BUILD_CXX"; then
44594  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44595$as_echo "$BUILD_CXX" >&6; }
44596else
44597  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44598$as_echo "no" >&6; }
44599fi
44600
44601
44602  test -n "$BUILD_CXX" && break
44603done
44604
44605  else
44606    # The variable is set, but is it from the command line or the environment?
44607
44608    # Try to remove the string !BUILD_CXX! from our list.
44609    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44610    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44611      # If it failed, the variable was not from the command line. Ignore it,
44612      # but warn the user (except for BASH, which is always set by the calling BASH).
44613      if test "xBUILD_CXX" != xBASH; then
44614        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44615$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44616      fi
44617      # Try to locate tool using the code snippet
44618      for ac_prog in cl CC g++
44619do
44620  # Extract the first word of "$ac_prog", so it can be a program name with args.
44621set dummy $ac_prog; ac_word=$2
44622{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44623$as_echo_n "checking for $ac_word... " >&6; }
44624if ${ac_cv_path_BUILD_CXX+:} false; then :
44625  $as_echo_n "(cached) " >&6
44626else
44627  case $BUILD_CXX in
44628  [\\/]* | ?:[\\/]*)
44629  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44630  ;;
44631  *)
44632  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44633for as_dir in $PATH
44634do
44635  IFS=$as_save_IFS
44636  test -z "$as_dir" && as_dir=.
44637    for ac_exec_ext in '' $ac_executable_extensions; do
44638  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44639    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44640    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44641    break 2
44642  fi
44643done
44644  done
44645IFS=$as_save_IFS
44646
44647  ;;
44648esac
44649fi
44650BUILD_CXX=$ac_cv_path_BUILD_CXX
44651if test -n "$BUILD_CXX"; then
44652  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44653$as_echo "$BUILD_CXX" >&6; }
44654else
44655  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44656$as_echo "no" >&6; }
44657fi
44658
44659
44660  test -n "$BUILD_CXX" && break
44661done
44662
44663    else
44664      # If it succeeded, then it was overridden by the user. We will use it
44665      # for the tool.
44666
44667      # First remove it from the list of overridden variables, so we can test
44668      # for unknown variables in the end.
44669      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44670
44671      # Check if we try to supply an empty value
44672      if test "x$BUILD_CXX" = x; then
44673        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44674$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44675        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44676$as_echo_n "checking for BUILD_CXX... " >&6; }
44677        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44678$as_echo "disabled" >&6; }
44679      else
44680        # Check if the provided tool contains a complete path.
44681        tool_specified="$BUILD_CXX"
44682        tool_basename="${tool_specified##*/}"
44683        if test "x$tool_basename" = "x$tool_specified"; then
44684          # A command without a complete path is provided, search $PATH.
44685          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44686$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44687          # Extract the first word of "$tool_basename", so it can be a program name with args.
44688set dummy $tool_basename; ac_word=$2
44689{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44690$as_echo_n "checking for $ac_word... " >&6; }
44691if ${ac_cv_path_BUILD_CXX+:} false; then :
44692  $as_echo_n "(cached) " >&6
44693else
44694  case $BUILD_CXX in
44695  [\\/]* | ?:[\\/]*)
44696  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44697  ;;
44698  *)
44699  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44700for as_dir in $PATH
44701do
44702  IFS=$as_save_IFS
44703  test -z "$as_dir" && as_dir=.
44704    for ac_exec_ext in '' $ac_executable_extensions; do
44705  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44706    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44707    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44708    break 2
44709  fi
44710done
44711  done
44712IFS=$as_save_IFS
44713
44714  ;;
44715esac
44716fi
44717BUILD_CXX=$ac_cv_path_BUILD_CXX
44718if test -n "$BUILD_CXX"; then
44719  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44720$as_echo "$BUILD_CXX" >&6; }
44721else
44722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44723$as_echo "no" >&6; }
44724fi
44725
44726
44727          if test "x$BUILD_CXX" = x; then
44728            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44729          fi
44730        else
44731          # Otherwise we believe it is a complete path. Use it as it is.
44732          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44733$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44734          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44735$as_echo_n "checking for BUILD_CXX... " >&6; }
44736          if test ! -x "$tool_specified"; then
44737            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44738$as_echo "not found" >&6; }
44739            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44740          fi
44741          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44742$as_echo "$tool_specified" >&6; }
44743        fi
44744      fi
44745    fi
44746
44747  fi
44748
44749
44750
44751  if test "x$BUILD_CXX" = x; then
44752    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44753  fi
44754
44755
44756
44757  # Only process if variable expands to non-empty
44758
44759  if test "x$BUILD_CXX" != x; then
44760    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44761
44762  # First separate the path from the arguments. This will split at the first
44763  # space.
44764  complete="$BUILD_CXX"
44765  path="${complete%% *}"
44766  tmp="$complete EOL"
44767  arguments="${tmp#* }"
44768
44769  # Input might be given as Windows format, start by converting to
44770  # unix format.
44771  new_path=`$CYGPATH -u "$path"`
44772
44773  # Now try to locate executable using which
44774  new_path=`$WHICH "$new_path" 2> /dev/null`
44775  # bat and cmd files are not always considered executable in cygwin causing which
44776  # to not find them
44777  if test "x$new_path" = x \
44778      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44779      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44780    new_path=`$CYGPATH -u "$path"`
44781  fi
44782  if test "x$new_path" = x; then
44783    # Oops. Which didn't find the executable.
44784    # The splitting of arguments from the executable at a space might have been incorrect,
44785    # since paths with space are more likely in Windows. Give it another try with the whole
44786    # argument.
44787    path="$complete"
44788    arguments="EOL"
44789    new_path=`$CYGPATH -u "$path"`
44790    new_path=`$WHICH "$new_path" 2> /dev/null`
44791    # bat and cmd files are not always considered executable in cygwin causing which
44792    # to not find them
44793    if test "x$new_path" = x \
44794        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44795        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44796      new_path=`$CYGPATH -u "$path"`
44797    fi
44798    if test "x$new_path" = x; then
44799      # It's still not found. Now this is an unrecoverable error.
44800      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44801$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44802      has_space=`$ECHO "$complete" | $GREP " "`
44803      if test "x$has_space" != x; then
44804        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44805$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44806      fi
44807      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44808    fi
44809  fi
44810
44811  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44812  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44813  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44814  # "foo.exe" is OK but "foo" is an error.
44815  #
44816  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44817  # It is also a way to make sure we got the proper file name for the real test later on.
44818  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44819  if test "x$test_shortpath" = x; then
44820    # Short path failed, file does not exist as specified.
44821    # Try adding .exe or .cmd
44822    if test -f "${new_path}.exe"; then
44823      input_to_shortpath="${new_path}.exe"
44824    elif test -f "${new_path}.cmd"; then
44825      input_to_shortpath="${new_path}.cmd"
44826    else
44827      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44828$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44829      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44830$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44831      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44832    fi
44833  else
44834    input_to_shortpath="$new_path"
44835  fi
44836
44837  # Call helper function which possibly converts this using DOS-style short mode.
44838  # If so, the updated path is stored in $new_path.
44839  new_path="$input_to_shortpath"
44840
44841  input_path="$input_to_shortpath"
44842  # Check if we need to convert this using DOS-style short mode. If the path
44843  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44844  # take no chances and rewrite it.
44845  # Note: m4 eats our [], so we need to use [ and ] instead.
44846  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44847  if test "x$has_forbidden_chars" != x; then
44848    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44849    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44850    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44851    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44852      # Going to short mode and back again did indeed matter. Since short mode is
44853      # case insensitive, let's make it lowercase to improve readability.
44854      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44855      # Now convert it back to Unix-style (cygpath)
44856      input_path=`$CYGPATH -u "$shortmode_path"`
44857      new_path="$input_path"
44858    fi
44859  fi
44860
44861  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44862  if test "x$test_cygdrive_prefix" = x; then
44863    # As a simple fix, exclude /usr/bin since it's not a real path.
44864    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44865      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44866      # a path prefixed by /cygdrive for fixpath to work.
44867      new_path="$CYGWIN_ROOT_PATH$input_path"
44868    fi
44869  fi
44870
44871  # remove trailing .exe if any
44872  new_path="${new_path/%.exe/}"
44873
44874    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44875
44876  # First separate the path from the arguments. This will split at the first
44877  # space.
44878  complete="$BUILD_CXX"
44879  path="${complete%% *}"
44880  tmp="$complete EOL"
44881  arguments="${tmp#* }"
44882
44883  # Input might be given as Windows format, start by converting to
44884  # unix format.
44885  new_path="$path"
44886
44887  windows_path="$new_path"
44888  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44889    unix_path=`$CYGPATH -u "$windows_path"`
44890    new_path="$unix_path"
44891  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44892    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44893    new_path="$unix_path"
44894  fi
44895
44896
44897  # Now try to locate executable using which
44898  new_path=`$WHICH "$new_path" 2> /dev/null`
44899
44900  if test "x$new_path" = x; then
44901    # Oops. Which didn't find the executable.
44902    # The splitting of arguments from the executable at a space might have been incorrect,
44903    # since paths with space are more likely in Windows. Give it another try with the whole
44904    # argument.
44905    path="$complete"
44906    arguments="EOL"
44907    new_path="$path"
44908
44909  windows_path="$new_path"
44910  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44911    unix_path=`$CYGPATH -u "$windows_path"`
44912    new_path="$unix_path"
44913  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44914    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44915    new_path="$unix_path"
44916  fi
44917
44918
44919    new_path=`$WHICH "$new_path" 2> /dev/null`
44920    # bat and cmd files are not always considered executable in MSYS causing which
44921    # to not find them
44922    if test "x$new_path" = x \
44923        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44924        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44925      new_path="$path"
44926
44927  windows_path="$new_path"
44928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44929    unix_path=`$CYGPATH -u "$windows_path"`
44930    new_path="$unix_path"
44931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44932    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44933    new_path="$unix_path"
44934  fi
44935
44936    fi
44937
44938    if test "x$new_path" = x; then
44939      # It's still not found. Now this is an unrecoverable error.
44940      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44941$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44942      has_space=`$ECHO "$complete" | $GREP " "`
44943      if test "x$has_space" != x; then
44944        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44945$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44946      fi
44947      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44948    fi
44949  fi
44950
44951  # Now new_path has a complete unix path to the binary
44952  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44953    # Keep paths in /bin as-is, but remove trailing .exe if any
44954    new_path="${new_path/%.exe/}"
44955    # Do not save /bin paths to all_fixpath_prefixes!
44956  else
44957    # Not in mixed or Windows style, start by that.
44958    new_path=`cmd //c echo $new_path`
44959
44960  input_path="$new_path"
44961  # Check if we need to convert this using DOS-style short mode. If the path
44962  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44963  # take no chances and rewrite it.
44964  # Note: m4 eats our [], so we need to use [ and ] instead.
44965  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44966  if test "x$has_forbidden_chars" != x; then
44967    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44968    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44969  fi
44970
44971    # Output is in $new_path
44972
44973  windows_path="$new_path"
44974  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44975    unix_path=`$CYGPATH -u "$windows_path"`
44976    new_path="$unix_path"
44977  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44978    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44979    new_path="$unix_path"
44980  fi
44981
44982    # remove trailing .exe if any
44983    new_path="${new_path/%.exe/}"
44984
44985    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44986    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44987  fi
44988
44989    else
44990      # We're on a unix platform. Hooray! :)
44991      # First separate the path from the arguments. This will split at the first
44992      # space.
44993      complete="$BUILD_CXX"
44994      path="${complete%% *}"
44995      tmp="$complete EOL"
44996      arguments="${tmp#* }"
44997
44998      # Cannot rely on the command "which" here since it doesn't always work.
44999      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45000      if test -z "$is_absolute_path"; then
45001        # Path to executable is not absolute. Find it.
45002        IFS_save="$IFS"
45003        IFS=:
45004        for p in $PATH; do
45005          if test -f "$p/$path" && test -x "$p/$path"; then
45006            new_path="$p/$path"
45007            break
45008          fi
45009        done
45010        IFS="$IFS_save"
45011      else
45012        # This is an absolute path, we can use it without further modifications.
45013        new_path="$path"
45014      fi
45015
45016      if test "x$new_path" = x; then
45017        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
45018$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
45019        has_space=`$ECHO "$complete" | $GREP " "`
45020        if test "x$has_space" != x; then
45021          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45022$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45023        fi
45024        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
45025      fi
45026    fi
45027
45028    # Now join together the path and the arguments once again
45029    if test "x$arguments" != xEOL; then
45030      new_complete="$new_path ${arguments% *}"
45031    else
45032      new_complete="$new_path"
45033    fi
45034
45035    if test "x$complete" != "x$new_complete"; then
45036      BUILD_CXX="$new_complete"
45037      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
45038$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
45039    fi
45040  fi
45041
45042
45043
45044  # Publish this variable in the help.
45045
45046
45047  if [ -z "${BUILD_NM+x}" ]; then
45048    # The variable is not set by user, try to locate tool using the code snippet
45049    for ac_prog in nm gcc-nm
45050do
45051  # Extract the first word of "$ac_prog", so it can be a program name with args.
45052set dummy $ac_prog; ac_word=$2
45053{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45054$as_echo_n "checking for $ac_word... " >&6; }
45055if ${ac_cv_path_BUILD_NM+:} false; then :
45056  $as_echo_n "(cached) " >&6
45057else
45058  case $BUILD_NM in
45059  [\\/]* | ?:[\\/]*)
45060  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45061  ;;
45062  *)
45063  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45064for as_dir in $PATH
45065do
45066  IFS=$as_save_IFS
45067  test -z "$as_dir" && as_dir=.
45068    for ac_exec_ext in '' $ac_executable_extensions; do
45069  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45070    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45071    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45072    break 2
45073  fi
45074done
45075  done
45076IFS=$as_save_IFS
45077
45078  ;;
45079esac
45080fi
45081BUILD_NM=$ac_cv_path_BUILD_NM
45082if test -n "$BUILD_NM"; then
45083  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45084$as_echo "$BUILD_NM" >&6; }
45085else
45086  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45087$as_echo "no" >&6; }
45088fi
45089
45090
45091  test -n "$BUILD_NM" && break
45092done
45093
45094  else
45095    # The variable is set, but is it from the command line or the environment?
45096
45097    # Try to remove the string !BUILD_NM! from our list.
45098    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
45099    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45100      # If it failed, the variable was not from the command line. Ignore it,
45101      # but warn the user (except for BASH, which is always set by the calling BASH).
45102      if test "xBUILD_NM" != xBASH; then
45103        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
45104$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
45105      fi
45106      # Try to locate tool using the code snippet
45107      for ac_prog in nm gcc-nm
45108do
45109  # Extract the first word of "$ac_prog", so it can be a program name with args.
45110set dummy $ac_prog; ac_word=$2
45111{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45112$as_echo_n "checking for $ac_word... " >&6; }
45113if ${ac_cv_path_BUILD_NM+:} false; then :
45114  $as_echo_n "(cached) " >&6
45115else
45116  case $BUILD_NM in
45117  [\\/]* | ?:[\\/]*)
45118  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45119  ;;
45120  *)
45121  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45122for as_dir in $PATH
45123do
45124  IFS=$as_save_IFS
45125  test -z "$as_dir" && as_dir=.
45126    for ac_exec_ext in '' $ac_executable_extensions; do
45127  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45128    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45129    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45130    break 2
45131  fi
45132done
45133  done
45134IFS=$as_save_IFS
45135
45136  ;;
45137esac
45138fi
45139BUILD_NM=$ac_cv_path_BUILD_NM
45140if test -n "$BUILD_NM"; then
45141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45142$as_echo "$BUILD_NM" >&6; }
45143else
45144  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45145$as_echo "no" >&6; }
45146fi
45147
45148
45149  test -n "$BUILD_NM" && break
45150done
45151
45152    else
45153      # If it succeeded, then it was overridden by the user. We will use it
45154      # for the tool.
45155
45156      # First remove it from the list of overridden variables, so we can test
45157      # for unknown variables in the end.
45158      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45159
45160      # Check if we try to supply an empty value
45161      if test "x$BUILD_NM" = x; then
45162        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
45163$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
45164        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45165$as_echo_n "checking for BUILD_NM... " >&6; }
45166        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45167$as_echo "disabled" >&6; }
45168      else
45169        # Check if the provided tool contains a complete path.
45170        tool_specified="$BUILD_NM"
45171        tool_basename="${tool_specified##*/}"
45172        if test "x$tool_basename" = "x$tool_specified"; then
45173          # A command without a complete path is provided, search $PATH.
45174          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
45175$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
45176          # Extract the first word of "$tool_basename", so it can be a program name with args.
45177set dummy $tool_basename; ac_word=$2
45178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45179$as_echo_n "checking for $ac_word... " >&6; }
45180if ${ac_cv_path_BUILD_NM+:} false; then :
45181  $as_echo_n "(cached) " >&6
45182else
45183  case $BUILD_NM in
45184  [\\/]* | ?:[\\/]*)
45185  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
45186  ;;
45187  *)
45188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45189for as_dir in $PATH
45190do
45191  IFS=$as_save_IFS
45192  test -z "$as_dir" && as_dir=.
45193    for ac_exec_ext in '' $ac_executable_extensions; do
45194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45195    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
45196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45197    break 2
45198  fi
45199done
45200  done
45201IFS=$as_save_IFS
45202
45203  ;;
45204esac
45205fi
45206BUILD_NM=$ac_cv_path_BUILD_NM
45207if test -n "$BUILD_NM"; then
45208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
45209$as_echo "$BUILD_NM" >&6; }
45210else
45211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45212$as_echo "no" >&6; }
45213fi
45214
45215
45216          if test "x$BUILD_NM" = x; then
45217            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45218          fi
45219        else
45220          # Otherwise we believe it is a complete path. Use it as it is.
45221          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
45222$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
45223          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
45224$as_echo_n "checking for BUILD_NM... " >&6; }
45225          if test ! -x "$tool_specified"; then
45226            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45227$as_echo "not found" >&6; }
45228            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
45229          fi
45230          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45231$as_echo "$tool_specified" >&6; }
45232        fi
45233      fi
45234    fi
45235
45236  fi
45237
45238
45239
45240  # Only process if variable expands to non-empty
45241
45242  if test "x$BUILD_NM" != x; then
45243    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45244
45245  # First separate the path from the arguments. This will split at the first
45246  # space.
45247  complete="$BUILD_NM"
45248  path="${complete%% *}"
45249  tmp="$complete EOL"
45250  arguments="${tmp#* }"
45251
45252  # Input might be given as Windows format, start by converting to
45253  # unix format.
45254  new_path=`$CYGPATH -u "$path"`
45255
45256  # Now try to locate executable using which
45257  new_path=`$WHICH "$new_path" 2> /dev/null`
45258  # bat and cmd files are not always considered executable in cygwin causing which
45259  # to not find them
45260  if test "x$new_path" = x \
45261      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45262      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45263    new_path=`$CYGPATH -u "$path"`
45264  fi
45265  if test "x$new_path" = x; then
45266    # Oops. Which didn't find the executable.
45267    # The splitting of arguments from the executable at a space might have been incorrect,
45268    # since paths with space are more likely in Windows. Give it another try with the whole
45269    # argument.
45270    path="$complete"
45271    arguments="EOL"
45272    new_path=`$CYGPATH -u "$path"`
45273    new_path=`$WHICH "$new_path" 2> /dev/null`
45274    # bat and cmd files are not always considered executable in cygwin causing which
45275    # to not find them
45276    if test "x$new_path" = x \
45277        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45278        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45279      new_path=`$CYGPATH -u "$path"`
45280    fi
45281    if test "x$new_path" = x; then
45282      # It's still not found. Now this is an unrecoverable error.
45283      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45284$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45285      has_space=`$ECHO "$complete" | $GREP " "`
45286      if test "x$has_space" != x; then
45287        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45288$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45289      fi
45290      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45291    fi
45292  fi
45293
45294  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45295  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45296  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45297  # "foo.exe" is OK but "foo" is an error.
45298  #
45299  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45300  # It is also a way to make sure we got the proper file name for the real test later on.
45301  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45302  if test "x$test_shortpath" = x; then
45303    # Short path failed, file does not exist as specified.
45304    # Try adding .exe or .cmd
45305    if test -f "${new_path}.exe"; then
45306      input_to_shortpath="${new_path}.exe"
45307    elif test -f "${new_path}.cmd"; then
45308      input_to_shortpath="${new_path}.cmd"
45309    else
45310      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
45311$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
45312      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45313$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45314      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45315    fi
45316  else
45317    input_to_shortpath="$new_path"
45318  fi
45319
45320  # Call helper function which possibly converts this using DOS-style short mode.
45321  # If so, the updated path is stored in $new_path.
45322  new_path="$input_to_shortpath"
45323
45324  input_path="$input_to_shortpath"
45325  # Check if we need to convert this using DOS-style short mode. If the path
45326  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45327  # take no chances and rewrite it.
45328  # Note: m4 eats our [], so we need to use [ and ] instead.
45329  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45330  if test "x$has_forbidden_chars" != x; then
45331    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45332    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45333    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45334    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45335      # Going to short mode and back again did indeed matter. Since short mode is
45336      # case insensitive, let's make it lowercase to improve readability.
45337      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45338      # Now convert it back to Unix-style (cygpath)
45339      input_path=`$CYGPATH -u "$shortmode_path"`
45340      new_path="$input_path"
45341    fi
45342  fi
45343
45344  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45345  if test "x$test_cygdrive_prefix" = x; then
45346    # As a simple fix, exclude /usr/bin since it's not a real path.
45347    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45348      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45349      # a path prefixed by /cygdrive for fixpath to work.
45350      new_path="$CYGWIN_ROOT_PATH$input_path"
45351    fi
45352  fi
45353
45354  # remove trailing .exe if any
45355  new_path="${new_path/%.exe/}"
45356
45357    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45358
45359  # First separate the path from the arguments. This will split at the first
45360  # space.
45361  complete="$BUILD_NM"
45362  path="${complete%% *}"
45363  tmp="$complete EOL"
45364  arguments="${tmp#* }"
45365
45366  # Input might be given as Windows format, start by converting to
45367  # unix format.
45368  new_path="$path"
45369
45370  windows_path="$new_path"
45371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45372    unix_path=`$CYGPATH -u "$windows_path"`
45373    new_path="$unix_path"
45374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45376    new_path="$unix_path"
45377  fi
45378
45379
45380  # Now try to locate executable using which
45381  new_path=`$WHICH "$new_path" 2> /dev/null`
45382
45383  if test "x$new_path" = x; then
45384    # Oops. Which didn't find the executable.
45385    # The splitting of arguments from the executable at a space might have been incorrect,
45386    # since paths with space are more likely in Windows. Give it another try with the whole
45387    # argument.
45388    path="$complete"
45389    arguments="EOL"
45390    new_path="$path"
45391
45392  windows_path="$new_path"
45393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45394    unix_path=`$CYGPATH -u "$windows_path"`
45395    new_path="$unix_path"
45396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45398    new_path="$unix_path"
45399  fi
45400
45401
45402    new_path=`$WHICH "$new_path" 2> /dev/null`
45403    # bat and cmd files are not always considered executable in MSYS causing which
45404    # to not find them
45405    if test "x$new_path" = x \
45406        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45407        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45408      new_path="$path"
45409
45410  windows_path="$new_path"
45411  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45412    unix_path=`$CYGPATH -u "$windows_path"`
45413    new_path="$unix_path"
45414  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45415    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45416    new_path="$unix_path"
45417  fi
45418
45419    fi
45420
45421    if test "x$new_path" = x; then
45422      # It's still not found. Now this is an unrecoverable error.
45423      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45424$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45425      has_space=`$ECHO "$complete" | $GREP " "`
45426      if test "x$has_space" != x; then
45427        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45428$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45429      fi
45430      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45431    fi
45432  fi
45433
45434  # Now new_path has a complete unix path to the binary
45435  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45436    # Keep paths in /bin as-is, but remove trailing .exe if any
45437    new_path="${new_path/%.exe/}"
45438    # Do not save /bin paths to all_fixpath_prefixes!
45439  else
45440    # Not in mixed or Windows style, start by that.
45441    new_path=`cmd //c echo $new_path`
45442
45443  input_path="$new_path"
45444  # Check if we need to convert this using DOS-style short mode. If the path
45445  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45446  # take no chances and rewrite it.
45447  # Note: m4 eats our [], so we need to use [ and ] instead.
45448  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45449  if test "x$has_forbidden_chars" != x; then
45450    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45451    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45452  fi
45453
45454    # Output is in $new_path
45455
45456  windows_path="$new_path"
45457  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45458    unix_path=`$CYGPATH -u "$windows_path"`
45459    new_path="$unix_path"
45460  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45461    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45462    new_path="$unix_path"
45463  fi
45464
45465    # remove trailing .exe if any
45466    new_path="${new_path/%.exe/}"
45467
45468    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45469    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45470  fi
45471
45472    else
45473      # We're on a unix platform. Hooray! :)
45474      # First separate the path from the arguments. This will split at the first
45475      # space.
45476      complete="$BUILD_NM"
45477      path="${complete%% *}"
45478      tmp="$complete EOL"
45479      arguments="${tmp#* }"
45480
45481      # Cannot rely on the command "which" here since it doesn't always work.
45482      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45483      if test -z "$is_absolute_path"; then
45484        # Path to executable is not absolute. Find it.
45485        IFS_save="$IFS"
45486        IFS=:
45487        for p in $PATH; do
45488          if test -f "$p/$path" && test -x "$p/$path"; then
45489            new_path="$p/$path"
45490            break
45491          fi
45492        done
45493        IFS="$IFS_save"
45494      else
45495        # This is an absolute path, we can use it without further modifications.
45496        new_path="$path"
45497      fi
45498
45499      if test "x$new_path" = x; then
45500        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45501$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45502        has_space=`$ECHO "$complete" | $GREP " "`
45503        if test "x$has_space" != x; then
45504          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45505$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45506        fi
45507        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45508      fi
45509    fi
45510
45511    # Now join together the path and the arguments once again
45512    if test "x$arguments" != xEOL; then
45513      new_complete="$new_path ${arguments% *}"
45514    else
45515      new_complete="$new_path"
45516    fi
45517
45518    if test "x$complete" != "x$new_complete"; then
45519      BUILD_NM="$new_complete"
45520      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45521$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45522    fi
45523  fi
45524
45525
45526
45527  # Publish this variable in the help.
45528
45529
45530  if [ -z "${BUILD_AR+x}" ]; then
45531    # The variable is not set by user, try to locate tool using the code snippet
45532    for ac_prog in ar gcc-ar
45533do
45534  # Extract the first word of "$ac_prog", so it can be a program name with args.
45535set dummy $ac_prog; ac_word=$2
45536{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45537$as_echo_n "checking for $ac_word... " >&6; }
45538if ${ac_cv_path_BUILD_AR+:} false; then :
45539  $as_echo_n "(cached) " >&6
45540else
45541  case $BUILD_AR in
45542  [\\/]* | ?:[\\/]*)
45543  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45544  ;;
45545  *)
45546  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45547for as_dir in $PATH
45548do
45549  IFS=$as_save_IFS
45550  test -z "$as_dir" && as_dir=.
45551    for ac_exec_ext in '' $ac_executable_extensions; do
45552  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45553    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45554    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45555    break 2
45556  fi
45557done
45558  done
45559IFS=$as_save_IFS
45560
45561  ;;
45562esac
45563fi
45564BUILD_AR=$ac_cv_path_BUILD_AR
45565if test -n "$BUILD_AR"; then
45566  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45567$as_echo "$BUILD_AR" >&6; }
45568else
45569  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45570$as_echo "no" >&6; }
45571fi
45572
45573
45574  test -n "$BUILD_AR" && break
45575done
45576
45577  else
45578    # The variable is set, but is it from the command line or the environment?
45579
45580    # Try to remove the string !BUILD_AR! from our list.
45581    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45582    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45583      # If it failed, the variable was not from the command line. Ignore it,
45584      # but warn the user (except for BASH, which is always set by the calling BASH).
45585      if test "xBUILD_AR" != xBASH; then
45586        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45587$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45588      fi
45589      # Try to locate tool using the code snippet
45590      for ac_prog in ar gcc-ar
45591do
45592  # Extract the first word of "$ac_prog", so it can be a program name with args.
45593set dummy $ac_prog; ac_word=$2
45594{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45595$as_echo_n "checking for $ac_word... " >&6; }
45596if ${ac_cv_path_BUILD_AR+:} false; then :
45597  $as_echo_n "(cached) " >&6
45598else
45599  case $BUILD_AR in
45600  [\\/]* | ?:[\\/]*)
45601  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45602  ;;
45603  *)
45604  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45605for as_dir in $PATH
45606do
45607  IFS=$as_save_IFS
45608  test -z "$as_dir" && as_dir=.
45609    for ac_exec_ext in '' $ac_executable_extensions; do
45610  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45611    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45612    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45613    break 2
45614  fi
45615done
45616  done
45617IFS=$as_save_IFS
45618
45619  ;;
45620esac
45621fi
45622BUILD_AR=$ac_cv_path_BUILD_AR
45623if test -n "$BUILD_AR"; then
45624  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45625$as_echo "$BUILD_AR" >&6; }
45626else
45627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45628$as_echo "no" >&6; }
45629fi
45630
45631
45632  test -n "$BUILD_AR" && break
45633done
45634
45635    else
45636      # If it succeeded, then it was overridden by the user. We will use it
45637      # for the tool.
45638
45639      # First remove it from the list of overridden variables, so we can test
45640      # for unknown variables in the end.
45641      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45642
45643      # Check if we try to supply an empty value
45644      if test "x$BUILD_AR" = x; then
45645        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45646$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45647        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45648$as_echo_n "checking for BUILD_AR... " >&6; }
45649        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45650$as_echo "disabled" >&6; }
45651      else
45652        # Check if the provided tool contains a complete path.
45653        tool_specified="$BUILD_AR"
45654        tool_basename="${tool_specified##*/}"
45655        if test "x$tool_basename" = "x$tool_specified"; then
45656          # A command without a complete path is provided, search $PATH.
45657          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45658$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45659          # Extract the first word of "$tool_basename", so it can be a program name with args.
45660set dummy $tool_basename; ac_word=$2
45661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45662$as_echo_n "checking for $ac_word... " >&6; }
45663if ${ac_cv_path_BUILD_AR+:} false; then :
45664  $as_echo_n "(cached) " >&6
45665else
45666  case $BUILD_AR in
45667  [\\/]* | ?:[\\/]*)
45668  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45669  ;;
45670  *)
45671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45672for as_dir in $PATH
45673do
45674  IFS=$as_save_IFS
45675  test -z "$as_dir" && as_dir=.
45676    for ac_exec_ext in '' $ac_executable_extensions; do
45677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45678    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45680    break 2
45681  fi
45682done
45683  done
45684IFS=$as_save_IFS
45685
45686  ;;
45687esac
45688fi
45689BUILD_AR=$ac_cv_path_BUILD_AR
45690if test -n "$BUILD_AR"; then
45691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45692$as_echo "$BUILD_AR" >&6; }
45693else
45694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45695$as_echo "no" >&6; }
45696fi
45697
45698
45699          if test "x$BUILD_AR" = x; then
45700            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45701          fi
45702        else
45703          # Otherwise we believe it is a complete path. Use it as it is.
45704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45705$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45706          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45707$as_echo_n "checking for BUILD_AR... " >&6; }
45708          if test ! -x "$tool_specified"; then
45709            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45710$as_echo "not found" >&6; }
45711            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45712          fi
45713          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45714$as_echo "$tool_specified" >&6; }
45715        fi
45716      fi
45717    fi
45718
45719  fi
45720
45721
45722
45723  # Only process if variable expands to non-empty
45724
45725  if test "x$BUILD_AR" != x; then
45726    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45727
45728  # First separate the path from the arguments. This will split at the first
45729  # space.
45730  complete="$BUILD_AR"
45731  path="${complete%% *}"
45732  tmp="$complete EOL"
45733  arguments="${tmp#* }"
45734
45735  # Input might be given as Windows format, start by converting to
45736  # unix format.
45737  new_path=`$CYGPATH -u "$path"`
45738
45739  # Now try to locate executable using which
45740  new_path=`$WHICH "$new_path" 2> /dev/null`
45741  # bat and cmd files are not always considered executable in cygwin causing which
45742  # to not find them
45743  if test "x$new_path" = x \
45744      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45745      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45746    new_path=`$CYGPATH -u "$path"`
45747  fi
45748  if test "x$new_path" = x; then
45749    # Oops. Which didn't find the executable.
45750    # The splitting of arguments from the executable at a space might have been incorrect,
45751    # since paths with space are more likely in Windows. Give it another try with the whole
45752    # argument.
45753    path="$complete"
45754    arguments="EOL"
45755    new_path=`$CYGPATH -u "$path"`
45756    new_path=`$WHICH "$new_path" 2> /dev/null`
45757    # bat and cmd files are not always considered executable in cygwin causing which
45758    # to not find them
45759    if test "x$new_path" = x \
45760        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45761        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45762      new_path=`$CYGPATH -u "$path"`
45763    fi
45764    if test "x$new_path" = x; then
45765      # It's still not found. Now this is an unrecoverable error.
45766      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45767$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45768      has_space=`$ECHO "$complete" | $GREP " "`
45769      if test "x$has_space" != x; then
45770        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45771$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45772      fi
45773      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45774    fi
45775  fi
45776
45777  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45778  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45779  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45780  # "foo.exe" is OK but "foo" is an error.
45781  #
45782  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45783  # It is also a way to make sure we got the proper file name for the real test later on.
45784  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45785  if test "x$test_shortpath" = x; then
45786    # Short path failed, file does not exist as specified.
45787    # Try adding .exe or .cmd
45788    if test -f "${new_path}.exe"; then
45789      input_to_shortpath="${new_path}.exe"
45790    elif test -f "${new_path}.cmd"; then
45791      input_to_shortpath="${new_path}.cmd"
45792    else
45793      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45794$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45795      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45796$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45797      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45798    fi
45799  else
45800    input_to_shortpath="$new_path"
45801  fi
45802
45803  # Call helper function which possibly converts this using DOS-style short mode.
45804  # If so, the updated path is stored in $new_path.
45805  new_path="$input_to_shortpath"
45806
45807  input_path="$input_to_shortpath"
45808  # Check if we need to convert this using DOS-style short mode. If the path
45809  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45810  # take no chances and rewrite it.
45811  # Note: m4 eats our [], so we need to use [ and ] instead.
45812  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45813  if test "x$has_forbidden_chars" != x; then
45814    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45815    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45816    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45817    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45818      # Going to short mode and back again did indeed matter. Since short mode is
45819      # case insensitive, let's make it lowercase to improve readability.
45820      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45821      # Now convert it back to Unix-style (cygpath)
45822      input_path=`$CYGPATH -u "$shortmode_path"`
45823      new_path="$input_path"
45824    fi
45825  fi
45826
45827  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45828  if test "x$test_cygdrive_prefix" = x; then
45829    # As a simple fix, exclude /usr/bin since it's not a real path.
45830    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45831      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45832      # a path prefixed by /cygdrive for fixpath to work.
45833      new_path="$CYGWIN_ROOT_PATH$input_path"
45834    fi
45835  fi
45836
45837  # remove trailing .exe if any
45838  new_path="${new_path/%.exe/}"
45839
45840    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45841
45842  # First separate the path from the arguments. This will split at the first
45843  # space.
45844  complete="$BUILD_AR"
45845  path="${complete%% *}"
45846  tmp="$complete EOL"
45847  arguments="${tmp#* }"
45848
45849  # Input might be given as Windows format, start by converting to
45850  # unix format.
45851  new_path="$path"
45852
45853  windows_path="$new_path"
45854  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45855    unix_path=`$CYGPATH -u "$windows_path"`
45856    new_path="$unix_path"
45857  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45858    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45859    new_path="$unix_path"
45860  fi
45861
45862
45863  # Now try to locate executable using which
45864  new_path=`$WHICH "$new_path" 2> /dev/null`
45865
45866  if test "x$new_path" = x; then
45867    # Oops. Which didn't find the executable.
45868    # The splitting of arguments from the executable at a space might have been incorrect,
45869    # since paths with space are more likely in Windows. Give it another try with the whole
45870    # argument.
45871    path="$complete"
45872    arguments="EOL"
45873    new_path="$path"
45874
45875  windows_path="$new_path"
45876  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45877    unix_path=`$CYGPATH -u "$windows_path"`
45878    new_path="$unix_path"
45879  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45880    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45881    new_path="$unix_path"
45882  fi
45883
45884
45885    new_path=`$WHICH "$new_path" 2> /dev/null`
45886    # bat and cmd files are not always considered executable in MSYS causing which
45887    # to not find them
45888    if test "x$new_path" = x \
45889        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45890        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45891      new_path="$path"
45892
45893  windows_path="$new_path"
45894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45895    unix_path=`$CYGPATH -u "$windows_path"`
45896    new_path="$unix_path"
45897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45899    new_path="$unix_path"
45900  fi
45901
45902    fi
45903
45904    if test "x$new_path" = x; then
45905      # It's still not found. Now this is an unrecoverable error.
45906      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45907$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45908      has_space=`$ECHO "$complete" | $GREP " "`
45909      if test "x$has_space" != x; then
45910        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45911$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45912      fi
45913      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45914    fi
45915  fi
45916
45917  # Now new_path has a complete unix path to the binary
45918  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45919    # Keep paths in /bin as-is, but remove trailing .exe if any
45920    new_path="${new_path/%.exe/}"
45921    # Do not save /bin paths to all_fixpath_prefixes!
45922  else
45923    # Not in mixed or Windows style, start by that.
45924    new_path=`cmd //c echo $new_path`
45925
45926  input_path="$new_path"
45927  # Check if we need to convert this using DOS-style short mode. If the path
45928  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45929  # take no chances and rewrite it.
45930  # Note: m4 eats our [], so we need to use [ and ] instead.
45931  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45932  if test "x$has_forbidden_chars" != x; then
45933    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45934    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45935  fi
45936
45937    # Output is in $new_path
45938
45939  windows_path="$new_path"
45940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45941    unix_path=`$CYGPATH -u "$windows_path"`
45942    new_path="$unix_path"
45943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45945    new_path="$unix_path"
45946  fi
45947
45948    # remove trailing .exe if any
45949    new_path="${new_path/%.exe/}"
45950
45951    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45952    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45953  fi
45954
45955    else
45956      # We're on a unix platform. Hooray! :)
45957      # First separate the path from the arguments. This will split at the first
45958      # space.
45959      complete="$BUILD_AR"
45960      path="${complete%% *}"
45961      tmp="$complete EOL"
45962      arguments="${tmp#* }"
45963
45964      # Cannot rely on the command "which" here since it doesn't always work.
45965      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45966      if test -z "$is_absolute_path"; then
45967        # Path to executable is not absolute. Find it.
45968        IFS_save="$IFS"
45969        IFS=:
45970        for p in $PATH; do
45971          if test -f "$p/$path" && test -x "$p/$path"; then
45972            new_path="$p/$path"
45973            break
45974          fi
45975        done
45976        IFS="$IFS_save"
45977      else
45978        # This is an absolute path, we can use it without further modifications.
45979        new_path="$path"
45980      fi
45981
45982      if test "x$new_path" = x; then
45983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45984$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45985        has_space=`$ECHO "$complete" | $GREP " "`
45986        if test "x$has_space" != x; then
45987          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45988$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45989        fi
45990        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45991      fi
45992    fi
45993
45994    # Now join together the path and the arguments once again
45995    if test "x$arguments" != xEOL; then
45996      new_complete="$new_path ${arguments% *}"
45997    else
45998      new_complete="$new_path"
45999    fi
46000
46001    if test "x$complete" != "x$new_complete"; then
46002      BUILD_AR="$new_complete"
46003      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
46004$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
46005    fi
46006  fi
46007
46008
46009
46010  # Publish this variable in the help.
46011
46012
46013  if [ -z "${BUILD_OBJCOPY+x}" ]; then
46014    # The variable is not set by user, try to locate tool using the code snippet
46015    for ac_prog in objcopy
46016do
46017  # Extract the first word of "$ac_prog", so it can be a program name with args.
46018set dummy $ac_prog; ac_word=$2
46019{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46020$as_echo_n "checking for $ac_word... " >&6; }
46021if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46022  $as_echo_n "(cached) " >&6
46023else
46024  case $BUILD_OBJCOPY in
46025  [\\/]* | ?:[\\/]*)
46026  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46027  ;;
46028  *)
46029  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46030for as_dir in $PATH
46031do
46032  IFS=$as_save_IFS
46033  test -z "$as_dir" && as_dir=.
46034    for ac_exec_ext in '' $ac_executable_extensions; do
46035  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46036    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46037    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46038    break 2
46039  fi
46040done
46041  done
46042IFS=$as_save_IFS
46043
46044  ;;
46045esac
46046fi
46047BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46048if test -n "$BUILD_OBJCOPY"; then
46049  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46050$as_echo "$BUILD_OBJCOPY" >&6; }
46051else
46052  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46053$as_echo "no" >&6; }
46054fi
46055
46056
46057  test -n "$BUILD_OBJCOPY" && break
46058done
46059
46060  else
46061    # The variable is set, but is it from the command line or the environment?
46062
46063    # Try to remove the string !BUILD_OBJCOPY! from our list.
46064    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
46065    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46066      # If it failed, the variable was not from the command line. Ignore it,
46067      # but warn the user (except for BASH, which is always set by the calling BASH).
46068      if test "xBUILD_OBJCOPY" != xBASH; then
46069        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
46070$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
46071      fi
46072      # Try to locate tool using the code snippet
46073      for ac_prog in objcopy
46074do
46075  # Extract the first word of "$ac_prog", so it can be a program name with args.
46076set dummy $ac_prog; ac_word=$2
46077{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46078$as_echo_n "checking for $ac_word... " >&6; }
46079if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46080  $as_echo_n "(cached) " >&6
46081else
46082  case $BUILD_OBJCOPY in
46083  [\\/]* | ?:[\\/]*)
46084  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46085  ;;
46086  *)
46087  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46088for as_dir in $PATH
46089do
46090  IFS=$as_save_IFS
46091  test -z "$as_dir" && as_dir=.
46092    for ac_exec_ext in '' $ac_executable_extensions; do
46093  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46094    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46095    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46096    break 2
46097  fi
46098done
46099  done
46100IFS=$as_save_IFS
46101
46102  ;;
46103esac
46104fi
46105BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46106if test -n "$BUILD_OBJCOPY"; then
46107  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46108$as_echo "$BUILD_OBJCOPY" >&6; }
46109else
46110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46111$as_echo "no" >&6; }
46112fi
46113
46114
46115  test -n "$BUILD_OBJCOPY" && break
46116done
46117
46118    else
46119      # If it succeeded, then it was overridden by the user. We will use it
46120      # for the tool.
46121
46122      # First remove it from the list of overridden variables, so we can test
46123      # for unknown variables in the end.
46124      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46125
46126      # Check if we try to supply an empty value
46127      if test "x$BUILD_OBJCOPY" = x; then
46128        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
46129$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
46130        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46131$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46132        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46133$as_echo "disabled" >&6; }
46134      else
46135        # Check if the provided tool contains a complete path.
46136        tool_specified="$BUILD_OBJCOPY"
46137        tool_basename="${tool_specified##*/}"
46138        if test "x$tool_basename" = "x$tool_specified"; then
46139          # A command without a complete path is provided, search $PATH.
46140          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
46141$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
46142          # Extract the first word of "$tool_basename", so it can be a program name with args.
46143set dummy $tool_basename; ac_word=$2
46144{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46145$as_echo_n "checking for $ac_word... " >&6; }
46146if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
46147  $as_echo_n "(cached) " >&6
46148else
46149  case $BUILD_OBJCOPY in
46150  [\\/]* | ?:[\\/]*)
46151  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
46152  ;;
46153  *)
46154  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46155for as_dir in $PATH
46156do
46157  IFS=$as_save_IFS
46158  test -z "$as_dir" && as_dir=.
46159    for ac_exec_ext in '' $ac_executable_extensions; do
46160  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46161    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
46162    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46163    break 2
46164  fi
46165done
46166  done
46167IFS=$as_save_IFS
46168
46169  ;;
46170esac
46171fi
46172BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
46173if test -n "$BUILD_OBJCOPY"; then
46174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
46175$as_echo "$BUILD_OBJCOPY" >&6; }
46176else
46177  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46178$as_echo "no" >&6; }
46179fi
46180
46181
46182          if test "x$BUILD_OBJCOPY" = x; then
46183            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46184          fi
46185        else
46186          # Otherwise we believe it is a complete path. Use it as it is.
46187          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
46188$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
46189          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
46190$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
46191          if test ! -x "$tool_specified"; then
46192            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46193$as_echo "not found" >&6; }
46194            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
46195          fi
46196          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46197$as_echo "$tool_specified" >&6; }
46198        fi
46199      fi
46200    fi
46201
46202  fi
46203
46204
46205
46206  # Only process if variable expands to non-empty
46207
46208  if test "x$BUILD_OBJCOPY" != x; then
46209    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46210
46211  # First separate the path from the arguments. This will split at the first
46212  # space.
46213  complete="$BUILD_OBJCOPY"
46214  path="${complete%% *}"
46215  tmp="$complete EOL"
46216  arguments="${tmp#* }"
46217
46218  # Input might be given as Windows format, start by converting to
46219  # unix format.
46220  new_path=`$CYGPATH -u "$path"`
46221
46222  # Now try to locate executable using which
46223  new_path=`$WHICH "$new_path" 2> /dev/null`
46224  # bat and cmd files are not always considered executable in cygwin causing which
46225  # to not find them
46226  if test "x$new_path" = x \
46227      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46228      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46229    new_path=`$CYGPATH -u "$path"`
46230  fi
46231  if test "x$new_path" = x; then
46232    # Oops. Which didn't find the executable.
46233    # The splitting of arguments from the executable at a space might have been incorrect,
46234    # since paths with space are more likely in Windows. Give it another try with the whole
46235    # argument.
46236    path="$complete"
46237    arguments="EOL"
46238    new_path=`$CYGPATH -u "$path"`
46239    new_path=`$WHICH "$new_path" 2> /dev/null`
46240    # bat and cmd files are not always considered executable in cygwin causing which
46241    # to not find them
46242    if test "x$new_path" = x \
46243        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46244        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46245      new_path=`$CYGPATH -u "$path"`
46246    fi
46247    if test "x$new_path" = x; then
46248      # It's still not found. Now this is an unrecoverable error.
46249      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46250$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46251      has_space=`$ECHO "$complete" | $GREP " "`
46252      if test "x$has_space" != x; then
46253        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46254$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46255      fi
46256      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46257    fi
46258  fi
46259
46260  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46261  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46262  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46263  # "foo.exe" is OK but "foo" is an error.
46264  #
46265  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46266  # It is also a way to make sure we got the proper file name for the real test later on.
46267  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46268  if test "x$test_shortpath" = x; then
46269    # Short path failed, file does not exist as specified.
46270    # Try adding .exe or .cmd
46271    if test -f "${new_path}.exe"; then
46272      input_to_shortpath="${new_path}.exe"
46273    elif test -f "${new_path}.cmd"; then
46274      input_to_shortpath="${new_path}.cmd"
46275    else
46276      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
46277$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
46278      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46279$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46280      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46281    fi
46282  else
46283    input_to_shortpath="$new_path"
46284  fi
46285
46286  # Call helper function which possibly converts this using DOS-style short mode.
46287  # If so, the updated path is stored in $new_path.
46288  new_path="$input_to_shortpath"
46289
46290  input_path="$input_to_shortpath"
46291  # Check if we need to convert this using DOS-style short mode. If the path
46292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46293  # take no chances and rewrite it.
46294  # Note: m4 eats our [], so we need to use [ and ] instead.
46295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46296  if test "x$has_forbidden_chars" != x; then
46297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46298    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46299    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46300    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46301      # Going to short mode and back again did indeed matter. Since short mode is
46302      # case insensitive, let's make it lowercase to improve readability.
46303      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46304      # Now convert it back to Unix-style (cygpath)
46305      input_path=`$CYGPATH -u "$shortmode_path"`
46306      new_path="$input_path"
46307    fi
46308  fi
46309
46310  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46311  if test "x$test_cygdrive_prefix" = x; then
46312    # As a simple fix, exclude /usr/bin since it's not a real path.
46313    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46314      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46315      # a path prefixed by /cygdrive for fixpath to work.
46316      new_path="$CYGWIN_ROOT_PATH$input_path"
46317    fi
46318  fi
46319
46320  # remove trailing .exe if any
46321  new_path="${new_path/%.exe/}"
46322
46323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46324
46325  # First separate the path from the arguments. This will split at the first
46326  # space.
46327  complete="$BUILD_OBJCOPY"
46328  path="${complete%% *}"
46329  tmp="$complete EOL"
46330  arguments="${tmp#* }"
46331
46332  # Input might be given as Windows format, start by converting to
46333  # unix format.
46334  new_path="$path"
46335
46336  windows_path="$new_path"
46337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46338    unix_path=`$CYGPATH -u "$windows_path"`
46339    new_path="$unix_path"
46340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46342    new_path="$unix_path"
46343  fi
46344
46345
46346  # Now try to locate executable using which
46347  new_path=`$WHICH "$new_path" 2> /dev/null`
46348
46349  if test "x$new_path" = x; then
46350    # Oops. Which didn't find the executable.
46351    # The splitting of arguments from the executable at a space might have been incorrect,
46352    # since paths with space are more likely in Windows. Give it another try with the whole
46353    # argument.
46354    path="$complete"
46355    arguments="EOL"
46356    new_path="$path"
46357
46358  windows_path="$new_path"
46359  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46360    unix_path=`$CYGPATH -u "$windows_path"`
46361    new_path="$unix_path"
46362  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46363    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46364    new_path="$unix_path"
46365  fi
46366
46367
46368    new_path=`$WHICH "$new_path" 2> /dev/null`
46369    # bat and cmd files are not always considered executable in MSYS causing which
46370    # to not find them
46371    if test "x$new_path" = x \
46372        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46373        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46374      new_path="$path"
46375
46376  windows_path="$new_path"
46377  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46378    unix_path=`$CYGPATH -u "$windows_path"`
46379    new_path="$unix_path"
46380  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46381    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46382    new_path="$unix_path"
46383  fi
46384
46385    fi
46386
46387    if test "x$new_path" = x; then
46388      # It's still not found. Now this is an unrecoverable error.
46389      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46390$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46391      has_space=`$ECHO "$complete" | $GREP " "`
46392      if test "x$has_space" != x; then
46393        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46394$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46395      fi
46396      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46397    fi
46398  fi
46399
46400  # Now new_path has a complete unix path to the binary
46401  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46402    # Keep paths in /bin as-is, but remove trailing .exe if any
46403    new_path="${new_path/%.exe/}"
46404    # Do not save /bin paths to all_fixpath_prefixes!
46405  else
46406    # Not in mixed or Windows style, start by that.
46407    new_path=`cmd //c echo $new_path`
46408
46409  input_path="$new_path"
46410  # Check if we need to convert this using DOS-style short mode. If the path
46411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46412  # take no chances and rewrite it.
46413  # Note: m4 eats our [], so we need to use [ and ] instead.
46414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46415  if test "x$has_forbidden_chars" != x; then
46416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46418  fi
46419
46420    # Output is in $new_path
46421
46422  windows_path="$new_path"
46423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46424    unix_path=`$CYGPATH -u "$windows_path"`
46425    new_path="$unix_path"
46426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46428    new_path="$unix_path"
46429  fi
46430
46431    # remove trailing .exe if any
46432    new_path="${new_path/%.exe/}"
46433
46434    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46435    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46436  fi
46437
46438    else
46439      # We're on a unix platform. Hooray! :)
46440      # First separate the path from the arguments. This will split at the first
46441      # space.
46442      complete="$BUILD_OBJCOPY"
46443      path="${complete%% *}"
46444      tmp="$complete EOL"
46445      arguments="${tmp#* }"
46446
46447      # Cannot rely on the command "which" here since it doesn't always work.
46448      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46449      if test -z "$is_absolute_path"; then
46450        # Path to executable is not absolute. Find it.
46451        IFS_save="$IFS"
46452        IFS=:
46453        for p in $PATH; do
46454          if test -f "$p/$path" && test -x "$p/$path"; then
46455            new_path="$p/$path"
46456            break
46457          fi
46458        done
46459        IFS="$IFS_save"
46460      else
46461        # This is an absolute path, we can use it without further modifications.
46462        new_path="$path"
46463      fi
46464
46465      if test "x$new_path" = x; then
46466        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
46467$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
46468        has_space=`$ECHO "$complete" | $GREP " "`
46469        if test "x$has_space" != x; then
46470          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46471$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46472        fi
46473        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
46474      fi
46475    fi
46476
46477    # Now join together the path and the arguments once again
46478    if test "x$arguments" != xEOL; then
46479      new_complete="$new_path ${arguments% *}"
46480    else
46481      new_complete="$new_path"
46482    fi
46483
46484    if test "x$complete" != "x$new_complete"; then
46485      BUILD_OBJCOPY="$new_complete"
46486      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
46487$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
46488    fi
46489  fi
46490
46491
46492
46493  # Publish this variable in the help.
46494
46495
46496  if [ -z "${BUILD_STRIP+x}" ]; then
46497    # The variable is not set by user, try to locate tool using the code snippet
46498    for ac_prog in strip
46499do
46500  # Extract the first word of "$ac_prog", so it can be a program name with args.
46501set dummy $ac_prog; ac_word=$2
46502{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46503$as_echo_n "checking for $ac_word... " >&6; }
46504if ${ac_cv_path_BUILD_STRIP+:} false; then :
46505  $as_echo_n "(cached) " >&6
46506else
46507  case $BUILD_STRIP in
46508  [\\/]* | ?:[\\/]*)
46509  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46510  ;;
46511  *)
46512  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46513for as_dir in $PATH
46514do
46515  IFS=$as_save_IFS
46516  test -z "$as_dir" && as_dir=.
46517    for ac_exec_ext in '' $ac_executable_extensions; do
46518  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46519    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46520    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46521    break 2
46522  fi
46523done
46524  done
46525IFS=$as_save_IFS
46526
46527  ;;
46528esac
46529fi
46530BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46531if test -n "$BUILD_STRIP"; then
46532  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46533$as_echo "$BUILD_STRIP" >&6; }
46534else
46535  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46536$as_echo "no" >&6; }
46537fi
46538
46539
46540  test -n "$BUILD_STRIP" && break
46541done
46542
46543  else
46544    # The variable is set, but is it from the command line or the environment?
46545
46546    # Try to remove the string !BUILD_STRIP! from our list.
46547    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46548    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46549      # If it failed, the variable was not from the command line. Ignore it,
46550      # but warn the user (except for BASH, which is always set by the calling BASH).
46551      if test "xBUILD_STRIP" != xBASH; then
46552        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46553$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46554      fi
46555      # Try to locate tool using the code snippet
46556      for ac_prog in strip
46557do
46558  # Extract the first word of "$ac_prog", so it can be a program name with args.
46559set dummy $ac_prog; ac_word=$2
46560{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46561$as_echo_n "checking for $ac_word... " >&6; }
46562if ${ac_cv_path_BUILD_STRIP+:} false; then :
46563  $as_echo_n "(cached) " >&6
46564else
46565  case $BUILD_STRIP in
46566  [\\/]* | ?:[\\/]*)
46567  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46568  ;;
46569  *)
46570  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46571for as_dir in $PATH
46572do
46573  IFS=$as_save_IFS
46574  test -z "$as_dir" && as_dir=.
46575    for ac_exec_ext in '' $ac_executable_extensions; do
46576  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46577    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46578    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46579    break 2
46580  fi
46581done
46582  done
46583IFS=$as_save_IFS
46584
46585  ;;
46586esac
46587fi
46588BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46589if test -n "$BUILD_STRIP"; then
46590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46591$as_echo "$BUILD_STRIP" >&6; }
46592else
46593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46594$as_echo "no" >&6; }
46595fi
46596
46597
46598  test -n "$BUILD_STRIP" && break
46599done
46600
46601    else
46602      # If it succeeded, then it was overridden by the user. We will use it
46603      # for the tool.
46604
46605      # First remove it from the list of overridden variables, so we can test
46606      # for unknown variables in the end.
46607      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46608
46609      # Check if we try to supply an empty value
46610      if test "x$BUILD_STRIP" = x; then
46611        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46612$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46613        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46614$as_echo_n "checking for BUILD_STRIP... " >&6; }
46615        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46616$as_echo "disabled" >&6; }
46617      else
46618        # Check if the provided tool contains a complete path.
46619        tool_specified="$BUILD_STRIP"
46620        tool_basename="${tool_specified##*/}"
46621        if test "x$tool_basename" = "x$tool_specified"; then
46622          # A command without a complete path is provided, search $PATH.
46623          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46624$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46625          # Extract the first word of "$tool_basename", so it can be a program name with args.
46626set dummy $tool_basename; ac_word=$2
46627{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46628$as_echo_n "checking for $ac_word... " >&6; }
46629if ${ac_cv_path_BUILD_STRIP+:} false; then :
46630  $as_echo_n "(cached) " >&6
46631else
46632  case $BUILD_STRIP in
46633  [\\/]* | ?:[\\/]*)
46634  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46635  ;;
46636  *)
46637  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46638for as_dir in $PATH
46639do
46640  IFS=$as_save_IFS
46641  test -z "$as_dir" && as_dir=.
46642    for ac_exec_ext in '' $ac_executable_extensions; do
46643  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46644    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46645    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46646    break 2
46647  fi
46648done
46649  done
46650IFS=$as_save_IFS
46651
46652  ;;
46653esac
46654fi
46655BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46656if test -n "$BUILD_STRIP"; then
46657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46658$as_echo "$BUILD_STRIP" >&6; }
46659else
46660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46661$as_echo "no" >&6; }
46662fi
46663
46664
46665          if test "x$BUILD_STRIP" = x; then
46666            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46667          fi
46668        else
46669          # Otherwise we believe it is a complete path. Use it as it is.
46670          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46671$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46672          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46673$as_echo_n "checking for BUILD_STRIP... " >&6; }
46674          if test ! -x "$tool_specified"; then
46675            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46676$as_echo "not found" >&6; }
46677            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46678          fi
46679          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46680$as_echo "$tool_specified" >&6; }
46681        fi
46682      fi
46683    fi
46684
46685  fi
46686
46687
46688
46689  # Only process if variable expands to non-empty
46690
46691  if test "x$BUILD_STRIP" != x; then
46692    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46693
46694  # First separate the path from the arguments. This will split at the first
46695  # space.
46696  complete="$BUILD_STRIP"
46697  path="${complete%% *}"
46698  tmp="$complete EOL"
46699  arguments="${tmp#* }"
46700
46701  # Input might be given as Windows format, start by converting to
46702  # unix format.
46703  new_path=`$CYGPATH -u "$path"`
46704
46705  # Now try to locate executable using which
46706  new_path=`$WHICH "$new_path" 2> /dev/null`
46707  # bat and cmd files are not always considered executable in cygwin causing which
46708  # to not find them
46709  if test "x$new_path" = x \
46710      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46711      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46712    new_path=`$CYGPATH -u "$path"`
46713  fi
46714  if test "x$new_path" = x; then
46715    # Oops. Which didn't find the executable.
46716    # The splitting of arguments from the executable at a space might have been incorrect,
46717    # since paths with space are more likely in Windows. Give it another try with the whole
46718    # argument.
46719    path="$complete"
46720    arguments="EOL"
46721    new_path=`$CYGPATH -u "$path"`
46722    new_path=`$WHICH "$new_path" 2> /dev/null`
46723    # bat and cmd files are not always considered executable in cygwin causing which
46724    # to not find them
46725    if test "x$new_path" = x \
46726        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46727        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46728      new_path=`$CYGPATH -u "$path"`
46729    fi
46730    if test "x$new_path" = x; then
46731      # It's still not found. Now this is an unrecoverable error.
46732      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46733$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46734      has_space=`$ECHO "$complete" | $GREP " "`
46735      if test "x$has_space" != x; then
46736        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46737$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46738      fi
46739      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46740    fi
46741  fi
46742
46743  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46744  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46745  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46746  # "foo.exe" is OK but "foo" is an error.
46747  #
46748  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46749  # It is also a way to make sure we got the proper file name for the real test later on.
46750  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46751  if test "x$test_shortpath" = x; then
46752    # Short path failed, file does not exist as specified.
46753    # Try adding .exe or .cmd
46754    if test -f "${new_path}.exe"; then
46755      input_to_shortpath="${new_path}.exe"
46756    elif test -f "${new_path}.cmd"; then
46757      input_to_shortpath="${new_path}.cmd"
46758    else
46759      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46760$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46761      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46762$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46763      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46764    fi
46765  else
46766    input_to_shortpath="$new_path"
46767  fi
46768
46769  # Call helper function which possibly converts this using DOS-style short mode.
46770  # If so, the updated path is stored in $new_path.
46771  new_path="$input_to_shortpath"
46772
46773  input_path="$input_to_shortpath"
46774  # Check if we need to convert this using DOS-style short mode. If the path
46775  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46776  # take no chances and rewrite it.
46777  # Note: m4 eats our [], so we need to use [ and ] instead.
46778  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46779  if test "x$has_forbidden_chars" != x; then
46780    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46781    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46782    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46783    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46784      # Going to short mode and back again did indeed matter. Since short mode is
46785      # case insensitive, let's make it lowercase to improve readability.
46786      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46787      # Now convert it back to Unix-style (cygpath)
46788      input_path=`$CYGPATH -u "$shortmode_path"`
46789      new_path="$input_path"
46790    fi
46791  fi
46792
46793  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46794  if test "x$test_cygdrive_prefix" = x; then
46795    # As a simple fix, exclude /usr/bin since it's not a real path.
46796    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46797      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46798      # a path prefixed by /cygdrive for fixpath to work.
46799      new_path="$CYGWIN_ROOT_PATH$input_path"
46800    fi
46801  fi
46802
46803  # remove trailing .exe if any
46804  new_path="${new_path/%.exe/}"
46805
46806    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46807
46808  # First separate the path from the arguments. This will split at the first
46809  # space.
46810  complete="$BUILD_STRIP"
46811  path="${complete%% *}"
46812  tmp="$complete EOL"
46813  arguments="${tmp#* }"
46814
46815  # Input might be given as Windows format, start by converting to
46816  # unix format.
46817  new_path="$path"
46818
46819  windows_path="$new_path"
46820  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46821    unix_path=`$CYGPATH -u "$windows_path"`
46822    new_path="$unix_path"
46823  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46824    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46825    new_path="$unix_path"
46826  fi
46827
46828
46829  # Now try to locate executable using which
46830  new_path=`$WHICH "$new_path" 2> /dev/null`
46831
46832  if test "x$new_path" = x; then
46833    # Oops. Which didn't find the executable.
46834    # The splitting of arguments from the executable at a space might have been incorrect,
46835    # since paths with space are more likely in Windows. Give it another try with the whole
46836    # argument.
46837    path="$complete"
46838    arguments="EOL"
46839    new_path="$path"
46840
46841  windows_path="$new_path"
46842  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46843    unix_path=`$CYGPATH -u "$windows_path"`
46844    new_path="$unix_path"
46845  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46846    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46847    new_path="$unix_path"
46848  fi
46849
46850
46851    new_path=`$WHICH "$new_path" 2> /dev/null`
46852    # bat and cmd files are not always considered executable in MSYS causing which
46853    # to not find them
46854    if test "x$new_path" = x \
46855        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46856        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46857      new_path="$path"
46858
46859  windows_path="$new_path"
46860  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46861    unix_path=`$CYGPATH -u "$windows_path"`
46862    new_path="$unix_path"
46863  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46864    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46865    new_path="$unix_path"
46866  fi
46867
46868    fi
46869
46870    if test "x$new_path" = x; then
46871      # It's still not found. Now this is an unrecoverable error.
46872      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46873$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46874      has_space=`$ECHO "$complete" | $GREP " "`
46875      if test "x$has_space" != x; then
46876        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46877$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46878      fi
46879      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46880    fi
46881  fi
46882
46883  # Now new_path has a complete unix path to the binary
46884  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46885    # Keep paths in /bin as-is, but remove trailing .exe if any
46886    new_path="${new_path/%.exe/}"
46887    # Do not save /bin paths to all_fixpath_prefixes!
46888  else
46889    # Not in mixed or Windows style, start by that.
46890    new_path=`cmd //c echo $new_path`
46891
46892  input_path="$new_path"
46893  # Check if we need to convert this using DOS-style short mode. If the path
46894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46895  # take no chances and rewrite it.
46896  # Note: m4 eats our [], so we need to use [ and ] instead.
46897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46898  if test "x$has_forbidden_chars" != x; then
46899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46901  fi
46902
46903    # Output is in $new_path
46904
46905  windows_path="$new_path"
46906  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46907    unix_path=`$CYGPATH -u "$windows_path"`
46908    new_path="$unix_path"
46909  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46910    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46911    new_path="$unix_path"
46912  fi
46913
46914    # remove trailing .exe if any
46915    new_path="${new_path/%.exe/}"
46916
46917    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46918    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46919  fi
46920
46921    else
46922      # We're on a unix platform. Hooray! :)
46923      # First separate the path from the arguments. This will split at the first
46924      # space.
46925      complete="$BUILD_STRIP"
46926      path="${complete%% *}"
46927      tmp="$complete EOL"
46928      arguments="${tmp#* }"
46929
46930      # Cannot rely on the command "which" here since it doesn't always work.
46931      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46932      if test -z "$is_absolute_path"; then
46933        # Path to executable is not absolute. Find it.
46934        IFS_save="$IFS"
46935        IFS=:
46936        for p in $PATH; do
46937          if test -f "$p/$path" && test -x "$p/$path"; then
46938            new_path="$p/$path"
46939            break
46940          fi
46941        done
46942        IFS="$IFS_save"
46943      else
46944        # This is an absolute path, we can use it without further modifications.
46945        new_path="$path"
46946      fi
46947
46948      if test "x$new_path" = x; then
46949        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46950$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46951        has_space=`$ECHO "$complete" | $GREP " "`
46952        if test "x$has_space" != x; then
46953          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46954$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46955        fi
46956        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46957      fi
46958    fi
46959
46960    # Now join together the path and the arguments once again
46961    if test "x$arguments" != xEOL; then
46962      new_complete="$new_path ${arguments% *}"
46963    else
46964      new_complete="$new_path"
46965    fi
46966
46967    if test "x$complete" != "x$new_complete"; then
46968      BUILD_STRIP="$new_complete"
46969      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46970$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46971    fi
46972  fi
46973
46974    # Assume the C compiler is the assembler
46975    BUILD_AS="$BUILD_CC -c"
46976    # Just like for the target compiler, use the compiler as linker
46977    BUILD_LD="$BUILD_CC"
46978    BUILD_LDCXX="$BUILD_CXX"
46979
46980    PATH="$OLDPATH"
46981
46982
46983  COMPILER=$BUILD_CC
46984  COMPILER_NAME=BuildC
46985
46986  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46987    # cc -V output typically looks like
46988    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46989    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46990    # Check that this is likely to be the Solaris Studio cc.
46991    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46992    if test $? -ne 0; then
46993      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46994      { $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
46995$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46996      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46997$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46998      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46999$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47000      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47001    fi
47002    # Remove usage instructions (if present), and
47003    # collapse compiler output into a single line
47004    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47005        $SED -e 's/ *[Uu]sage:.*//'`
47006    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47007        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47008  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47009    # xlc -qversion output typically looks like
47010    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47011    #     Version: 11.01.0000.0015
47012    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47013    # Check that this is likely to be the IBM XL C compiler.
47014    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47015    if test $? -ne 0; then
47016      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47017      { $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
47018$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47019      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47020$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47021      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47022$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47023      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47024    fi
47025    # Collapse compiler output into a single line
47026    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47027    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47028        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47029  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47030    # There is no specific version flag, but all output starts with a version string.
47031    # First line typically looks something like:
47032    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47033    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47034    # Check that this is likely to be Microsoft CL.EXE.
47035    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47036    if test $? -ne 0; then
47037      { $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
47038$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47039      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47040$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47041      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47042    fi
47043    # Collapse compiler output into a single line
47044    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47045    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47046        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47047  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47048    # gcc --version output typically looks like
47049    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47050    #     Copyright (C) 2013 Free Software Foundation, Inc.
47051    #     This is free software; see the source for copying conditions.  There is NO
47052    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47053    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47054    # Check that this is likely to be GCC.
47055    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47056    if test $? -ne 0; then
47057      { $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
47058$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47059      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47060$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47061      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47062    fi
47063    # Remove Copyright and legalese from version string, and
47064    # collapse into a single line
47065    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47066        $SED -e 's/ *Copyright .*//'`
47067    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47068        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47069  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47070    # clang --version output typically looks like
47071    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47072    #    clang version 3.3 (tags/RELEASE_33/final)
47073    # or
47074    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47075    #    Target: x86_64-pc-linux-gnu
47076    #    Thread model: posix
47077    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47078    # Check that this is likely to be clang
47079    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47080    if test $? -ne 0; then
47081      { $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
47082$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47083      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47084$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47085      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47086    fi
47087    # Collapse compiler output into a single line
47088    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47089    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47090        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47091  else
47092      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47093  fi
47094  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47095  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47096  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47097  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
47098
47099  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47100$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47101
47102
47103  COMPILER=$BUILD_CXX
47104  COMPILER_NAME=BuildC++
47105
47106  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47107    # cc -V output typically looks like
47108    #     cc: Sun C 5.12 Linux_i386 2011/11/16
47109    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
47110    # Check that this is likely to be the Solaris Studio cc.
47111    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
47112    if test $? -ne 0; then
47113      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47114      { $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
47115$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47116      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47117$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47118      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47119$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47120      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47121    fi
47122    # Remove usage instructions (if present), and
47123    # collapse compiler output into a single line
47124    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47125        $SED -e 's/ *[Uu]sage:.*//'`
47126    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47127        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
47128  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
47129    # xlc -qversion output typically looks like
47130    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
47131    #     Version: 11.01.0000.0015
47132    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
47133    # Check that this is likely to be the IBM XL C compiler.
47134    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
47135    if test $? -ne 0; then
47136      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47137      { $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
47138$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47139      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47140$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47141      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
47142$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
47143      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47144    fi
47145    # Collapse compiler output into a single line
47146    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47147    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47148        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
47149  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47150    # There is no specific version flag, but all output starts with a version string.
47151    # First line typically looks something like:
47152    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
47153    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47154    # Check that this is likely to be Microsoft CL.EXE.
47155    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
47156    if test $? -ne 0; then
47157      { $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
47158$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47159      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47160$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47161      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47162    fi
47163    # Collapse compiler output into a single line
47164    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47165    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47166        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
47167  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
47168    # gcc --version output typically looks like
47169    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
47170    #     Copyright (C) 2013 Free Software Foundation, Inc.
47171    #     This is free software; see the source for copying conditions.  There is NO
47172    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
47173    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47174    # Check that this is likely to be GCC.
47175    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
47176    if test $? -ne 0; then
47177      { $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
47178$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47179      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
47180$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
47181      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47182    fi
47183    # Remove Copyright and legalese from version string, and
47184    # collapse into a single line
47185    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
47186        $SED -e 's/ *Copyright .*//'`
47187    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47188        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
47189  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
47190    # clang --version output typically looks like
47191    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
47192    #    clang version 3.3 (tags/RELEASE_33/final)
47193    # or
47194    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
47195    #    Target: x86_64-pc-linux-gnu
47196    #    Thread model: posix
47197    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
47198    # Check that this is likely to be clang
47199    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
47200    if test $? -ne 0; then
47201      { $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
47202$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
47203      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
47204$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
47205      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
47206    fi
47207    # Collapse compiler output into a single line
47208    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
47209    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
47210        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
47211  else
47212      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
47213  fi
47214  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
47215  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
47216  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
47217  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
47218
47219  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
47220$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
47221
47222
47223  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
47224    { $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
47225$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
47226    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
47227$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
47228  fi
47229
47230  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
47231  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
47232    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&5
47233$as_echo "$as_me: WARNING: C compiler version number has more than three parts (X.Y.Z): $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47234  fi
47235
47236  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
47237    { $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
47238$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
47239  fi
47240
47241  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
47242
47243  else
47244    # If we are not cross compiling, use the normal target compilers for
47245    # building the build platform executables.
47246    BUILD_CC="$CC"
47247    BUILD_CXX="$CXX"
47248    BUILD_LD="$LD"
47249    BUILD_LDCXX="$LDCXX"
47250    BUILD_NM="$NM"
47251    BUILD_AS="$AS"
47252    BUILD_OBJCOPY="$OBJCOPY"
47253    BUILD_STRIP="$STRIP"
47254    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
47255    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
47256    BUILD_AR="$AR"
47257  fi
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47271    # For hotspot, we need these in Windows mixed path,
47272    # so rewrite them all. Need added .exe suffix.
47273    HOTSPOT_CXX="$CXX.exe"
47274    HOTSPOT_LD="$LD.exe"
47275    HOTSPOT_MT="$MT.exe"
47276    HOTSPOT_RC="$RC.exe"
47277
47278  unix_path="$HOTSPOT_CXX"
47279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47280    windows_path=`$CYGPATH -m "$unix_path"`
47281    HOTSPOT_CXX="$windows_path"
47282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47283    windows_path=`cmd //c echo $unix_path`
47284    HOTSPOT_CXX="$windows_path"
47285  fi
47286
47287
47288  unix_path="$HOTSPOT_LD"
47289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47290    windows_path=`$CYGPATH -m "$unix_path"`
47291    HOTSPOT_LD="$windows_path"
47292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47293    windows_path=`cmd //c echo $unix_path`
47294    HOTSPOT_LD="$windows_path"
47295  fi
47296
47297
47298  unix_path="$HOTSPOT_MT"
47299  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47300    windows_path=`$CYGPATH -m "$unix_path"`
47301    HOTSPOT_MT="$windows_path"
47302  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47303    windows_path=`cmd //c echo $unix_path`
47304    HOTSPOT_MT="$windows_path"
47305  fi
47306
47307
47308  unix_path="$HOTSPOT_RC"
47309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47310    windows_path=`$CYGPATH -m "$unix_path"`
47311    HOTSPOT_RC="$windows_path"
47312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47313    windows_path=`cmd //c echo $unix_path`
47314    HOTSPOT_RC="$windows_path"
47315  fi
47316
47317
47318
47319  else
47320    HOTSPOT_CXX="$CXX"
47321    HOTSPOT_LD="$LD"
47322  fi
47323
47324
47325
47326  if test  "x$TOOLCHAIN_TYPE" = xclang; then
47327    USE_CLANG=true
47328  fi
47329
47330
47331
47332
47333
47334  # The package path is used only on macosx?
47335  # FIXME: clean this up, and/or move it elsewhere.
47336  PACKAGE_PATH=/opt/local
47337
47338
47339  # Check for extra potential brokenness.
47340  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47341    # On Windows, double-check that we got the right compiler.
47342    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
47343    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
47344    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
47345      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
47346        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
47347      fi
47348    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
47349      if test "x$COMPILER_CPU_TEST" != "xx64"; then
47350        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
47351      fi
47352    fi
47353  fi
47354
47355  if test "x$TOOLCHAIN_TYPE" = xgcc; then
47356    # If this is a --hash-style=gnu system, use --hash-style=both, why?
47357    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
47358    # This is later checked when setting flags.
47359
47360    # "-Og" suppported for GCC 4.8 and later
47361    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
47362
47363
47364
47365
47366
47367
47368
47369
47370
47371
47372
47373
47374
47375
47376
47377
47378
47379
47380
47381
47382
47383
47384
47385
47386
47387
47388
47389
47390
47391
47392
47393
47394
47395
47396
47397
47398
47399
47400
47401
47402
47403
47404
47405
47406
47407
47408
47409    # Execute function body
47410
47411
47412
47413
47414
47415
47416
47417
47418
47419
47420
47421
47422
47423
47424
47425
47426
47427
47428
47429
47430
47431
47432
47433
47434
47435
47436
47437
47438
47439
47440
47441
47442
47443
47444
47445
47446
47447
47448
47449
47450
47451
47452
47453
47454
47455
47456
47457
47458    # Execute function body
47459
47460  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47461$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47462  supports=yes
47463
47464  saved_cflags="$CFLAGS"
47465  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
47466  ac_ext=c
47467ac_cpp='$CPP $CPPFLAGS'
47468ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47469ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47470ac_compiler_gnu=$ac_cv_c_compiler_gnu
47471
47472  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47473/* end confdefs.h.  */
47474int i;
47475_ACEOF
47476if ac_fn_c_try_compile "$LINENO"; then :
47477
47478else
47479  supports=no
47480fi
47481rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47482  ac_ext=cpp
47483ac_cpp='$CXXCPP $CPPFLAGS'
47484ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47485ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47486ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47487
47488  CFLAGS="$saved_cflags"
47489
47490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47491$as_echo "$supports" >&6; }
47492  if test "x$supports" = "xyes" ; then
47493    :
47494    C_COMP_SUPPORTS="yes"
47495  else
47496    :
47497    C_COMP_SUPPORTS="no"
47498  fi
47499
47500
47501
47502
47503
47504
47505
47506
47507
47508
47509
47510
47511
47512
47513
47514
47515
47516
47517
47518
47519
47520
47521
47522
47523
47524
47525
47526
47527
47528
47529
47530
47531
47532
47533
47534
47535
47536
47537
47538
47539
47540
47541
47542
47543
47544
47545
47546
47547
47548
47549
47550
47551
47552
47553
47554
47555
47556
47557
47558    # Execute function body
47559
47560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47561$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47562  supports=yes
47563
47564  saved_cxxflags="$CXXFLAGS"
47565  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47566  ac_ext=cpp
47567ac_cpp='$CXXCPP $CPPFLAGS'
47568ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47569ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47570ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47571
47572  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47573/* end confdefs.h.  */
47574int i;
47575_ACEOF
47576if ac_fn_cxx_try_compile "$LINENO"; then :
47577
47578else
47579  supports=no
47580fi
47581rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47582  ac_ext=cpp
47583ac_cpp='$CXXCPP $CPPFLAGS'
47584ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47585ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47586ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47587
47588  CXXFLAGS="$saved_cxxflags"
47589
47590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47591$as_echo "$supports" >&6; }
47592  if test "x$supports" = "xyes" ; then
47593    :
47594    CXX_COMP_SUPPORTS="yes"
47595  else
47596    :
47597    CXX_COMP_SUPPORTS="no"
47598  fi
47599
47600
47601
47602
47603
47604
47605
47606
47607
47608
47609
47610
47611
47612  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47613$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47614  supports=no
47615  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47616
47617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47618$as_echo "$supports" >&6; }
47619  if test "x$supports" = "xyes" ; then
47620    :
47621    HAS_CFLAG_OPTIMIZE_DEBUG=true
47622  else
47623    :
47624    HAS_CFLAG_OPTIMIZE_DEBUG=false
47625  fi
47626
47627
47628
47629
47630
47631
47632
47633    # "-z relro" supported in GNU binutils 2.17 and later
47634    LINKER_RELRO_FLAG="-Wl,-z,relro"
47635
47636
47637
47638
47639
47640
47641
47642
47643
47644
47645
47646
47647
47648
47649
47650
47651
47652
47653
47654
47655
47656
47657
47658
47659
47660
47661
47662
47663
47664
47665
47666
47667
47668
47669
47670
47671
47672
47673
47674
47675
47676
47677
47678
47679
47680
47681
47682    # Execute function body
47683
47684  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47685$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47686  supports=yes
47687
47688  saved_ldflags="$LDFLAGS"
47689  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47690  ac_ext=c
47691ac_cpp='$CPP $CPPFLAGS'
47692ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47693ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47694ac_compiler_gnu=$ac_cv_c_compiler_gnu
47695
47696  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47697/* end confdefs.h.  */
47698
47699int
47700main ()
47701{
47702
47703  ;
47704  return 0;
47705}
47706_ACEOF
47707if ac_fn_c_try_link "$LINENO"; then :
47708
47709else
47710  supports=no
47711fi
47712rm -f core conftest.err conftest.$ac_objext \
47713    conftest$ac_exeext conftest.$ac_ext
47714  ac_ext=cpp
47715ac_cpp='$CXXCPP $CPPFLAGS'
47716ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47717ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47718ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47719
47720  LDFLAGS="$saved_ldflags"
47721
47722  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47723$as_echo "$supports" >&6; }
47724  if test "x$supports" = "xyes" ; then
47725    :
47726    HAS_LINKER_RELRO=true
47727  else
47728    :
47729    HAS_LINKER_RELRO=false
47730  fi
47731
47732
47733
47734
47735
47736
47737
47738
47739
47740
47741
47742
47743
47744    # "-z now" supported in GNU binutils 2.11 and later
47745    LINKER_NOW_FLAG="-Wl,-z,now"
47746
47747
47748
47749
47750
47751
47752
47753
47754
47755
47756
47757
47758
47759
47760
47761
47762
47763
47764
47765
47766
47767
47768
47769
47770
47771
47772
47773
47774
47775
47776
47777
47778
47779
47780
47781
47782
47783
47784
47785
47786
47787
47788
47789
47790
47791
47792
47793    # Execute function body
47794
47795  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47796$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47797  supports=yes
47798
47799  saved_ldflags="$LDFLAGS"
47800  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47801  ac_ext=c
47802ac_cpp='$CPP $CPPFLAGS'
47803ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47804ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47805ac_compiler_gnu=$ac_cv_c_compiler_gnu
47806
47807  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47808/* end confdefs.h.  */
47809
47810int
47811main ()
47812{
47813
47814  ;
47815  return 0;
47816}
47817_ACEOF
47818if ac_fn_c_try_link "$LINENO"; then :
47819
47820else
47821  supports=no
47822fi
47823rm -f core conftest.err conftest.$ac_objext \
47824    conftest$ac_exeext conftest.$ac_ext
47825  ac_ext=cpp
47826ac_cpp='$CXXCPP $CPPFLAGS'
47827ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47828ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47829ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47830
47831  LDFLAGS="$saved_ldflags"
47832
47833  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47834$as_echo "$supports" >&6; }
47835  if test "x$supports" = "xyes" ; then
47836    :
47837    HAS_LINKER_NOW=true
47838  else
47839    :
47840    HAS_LINKER_NOW=false
47841  fi
47842
47843
47844
47845
47846
47847
47848
47849
47850
47851
47852
47853
47854  fi
47855
47856  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47857  # in executable.'
47858  USING_BROKEN_SUSE_LD=no
47859  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47860    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47861$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47862    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47863    $ECHO "int main() { }" > main.c
47864    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47865      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47866$as_echo "no" >&6; }
47867      USING_BROKEN_SUSE_LD=no
47868    else
47869      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47870$as_echo "yes" >&6; }
47871      USING_BROKEN_SUSE_LD=yes
47872    fi
47873    $RM version-script.map main.c a.out
47874  fi
47875
47876
47877  # Setup hotspot lecagy names for toolchains
47878  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47879  if test "x$TOOLCHAIN_TYPE" = xclang; then
47880    HOTSPOT_TOOLCHAIN_TYPE=gcc
47881  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47882    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47883  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47884    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47885  fi
47886
47887
47888
47889# Setup the JTReg Regression Test Harness.
47890
47891
47892# Check whether --with-jtreg was given.
47893if test "${with_jtreg+set}" = set; then :
47894  withval=$with_jtreg;
47895else
47896  with_jtreg=no
47897fi
47898
47899
47900  if test "x$with_jtreg" = xno; then
47901    # jtreg disabled
47902    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47903$as_echo_n "checking for jtreg... " >&6; }
47904    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47905$as_echo "no" >&6; }
47906  else
47907    if test "x$with_jtreg" != xyes; then
47908      # with path specified.
47909      JT_HOME="$with_jtreg"
47910    fi
47911
47912    if test "x$JT_HOME" != x; then
47913      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47914$as_echo_n "checking for jtreg... " >&6; }
47915
47916      # use JT_HOME enviroment var.
47917
47918  # Only process if variable expands to non-empty
47919
47920  if test "x$JT_HOME" != x; then
47921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47922
47923  # Input might be given as Windows format, start by converting to
47924  # unix format.
47925  path="$JT_HOME"
47926  new_path=`$CYGPATH -u "$path"`
47927
47928  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47929  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47930  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47931  # "foo.exe" is OK but "foo" is an error.
47932  #
47933  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47934  # It is also a way to make sure we got the proper file name for the real test later on.
47935  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47936  if test "x$test_shortpath" = x; then
47937    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47938$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47939    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47940  fi
47941
47942  # Call helper function which possibly converts this using DOS-style short mode.
47943  # If so, the updated path is stored in $new_path.
47944
47945  input_path="$new_path"
47946  # Check if we need to convert this using DOS-style short mode. If the path
47947  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47948  # take no chances and rewrite it.
47949  # Note: m4 eats our [], so we need to use [ and ] instead.
47950  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47951  if test "x$has_forbidden_chars" != x; then
47952    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47953    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47954    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47955    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47956      # Going to short mode and back again did indeed matter. Since short mode is
47957      # case insensitive, let's make it lowercase to improve readability.
47958      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47959      # Now convert it back to Unix-style (cygpath)
47960      input_path=`$CYGPATH -u "$shortmode_path"`
47961      new_path="$input_path"
47962    fi
47963  fi
47964
47965  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47966  if test "x$test_cygdrive_prefix" = x; then
47967    # As a simple fix, exclude /usr/bin since it's not a real path.
47968    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47969      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47970      # a path prefixed by /cygdrive for fixpath to work.
47971      new_path="$CYGWIN_ROOT_PATH$input_path"
47972    fi
47973  fi
47974
47975
47976  if test "x$path" != "x$new_path"; then
47977    JT_HOME="$new_path"
47978    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47979$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47980  fi
47981
47982    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47983
47984  path="$JT_HOME"
47985  has_colon=`$ECHO $path | $GREP ^.:`
47986  new_path="$path"
47987  if test "x$has_colon" = x; then
47988    # Not in mixed or Windows style, start by that.
47989    new_path=`cmd //c echo $path`
47990  fi
47991
47992
47993  input_path="$new_path"
47994  # Check if we need to convert this using DOS-style short mode. If the path
47995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47996  # take no chances and rewrite it.
47997  # Note: m4 eats our [], so we need to use [ and ] instead.
47998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47999  if test "x$has_forbidden_chars" != x; then
48000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
48001    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
48002  fi
48003
48004
48005  windows_path="$new_path"
48006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48007    unix_path=`$CYGPATH -u "$windows_path"`
48008    new_path="$unix_path"
48009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
48011    new_path="$unix_path"
48012  fi
48013
48014  if test "x$path" != "x$new_path"; then
48015    JT_HOME="$new_path"
48016    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
48017$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
48018  fi
48019
48020  # Save the first 10 bytes of this path to the storage, so fixpath can work.
48021  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
48022
48023    else
48024      # We're on a unix platform. Hooray! :)
48025      path="$JT_HOME"
48026      has_space=`$ECHO "$path" | $GREP " "`
48027      if test "x$has_space" != x; then
48028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
48029$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
48030        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
48031      fi
48032
48033      # Use eval to expand a potential ~
48034      eval path="$path"
48035      if test ! -f "$path" && test ! -d "$path"; then
48036        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
48037      fi
48038
48039      if test -d "$path"; then
48040        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
48041      else
48042        dir="`$DIRNAME "$path"`"
48043        base="`$BASENAME "$path"`"
48044        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
48045      fi
48046    fi
48047  fi
48048
48049
48050      # jtreg win32 script works for everybody
48051      JTREGEXE="$JT_HOME/bin/jtreg"
48052
48053      if test ! -f "$JTREGEXE"; then
48054        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
48055      fi
48056
48057      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48058$as_echo "$JTREGEXE" >&6; }
48059    else
48060      # try to find jtreg on path
48061
48062
48063
48064  # Publish this variable in the help.
48065
48066
48067  if [ -z "${JTREGEXE+x}" ]; then
48068    # The variable is not set by user, try to locate tool using the code snippet
48069    for ac_prog in jtreg
48070do
48071  # Extract the first word of "$ac_prog", so it can be a program name with args.
48072set dummy $ac_prog; ac_word=$2
48073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48074$as_echo_n "checking for $ac_word... " >&6; }
48075if ${ac_cv_path_JTREGEXE+:} false; then :
48076  $as_echo_n "(cached) " >&6
48077else
48078  case $JTREGEXE in
48079  [\\/]* | ?:[\\/]*)
48080  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48081  ;;
48082  *)
48083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48084for as_dir in $PATH
48085do
48086  IFS=$as_save_IFS
48087  test -z "$as_dir" && as_dir=.
48088    for ac_exec_ext in '' $ac_executable_extensions; do
48089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48090    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48092    break 2
48093  fi
48094done
48095  done
48096IFS=$as_save_IFS
48097
48098  ;;
48099esac
48100fi
48101JTREGEXE=$ac_cv_path_JTREGEXE
48102if test -n "$JTREGEXE"; then
48103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48104$as_echo "$JTREGEXE" >&6; }
48105else
48106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48107$as_echo "no" >&6; }
48108fi
48109
48110
48111  test -n "$JTREGEXE" && break
48112done
48113
48114  else
48115    # The variable is set, but is it from the command line or the environment?
48116
48117    # Try to remove the string !JTREGEXE! from our list.
48118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
48119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
48120      # If it failed, the variable was not from the command line. Ignore it,
48121      # but warn the user (except for BASH, which is always set by the calling BASH).
48122      if test "xJTREGEXE" != xBASH; then
48123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
48124$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
48125      fi
48126      # Try to locate tool using the code snippet
48127      for ac_prog in jtreg
48128do
48129  # Extract the first word of "$ac_prog", so it can be a program name with args.
48130set dummy $ac_prog; ac_word=$2
48131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48132$as_echo_n "checking for $ac_word... " >&6; }
48133if ${ac_cv_path_JTREGEXE+:} false; then :
48134  $as_echo_n "(cached) " >&6
48135else
48136  case $JTREGEXE in
48137  [\\/]* | ?:[\\/]*)
48138  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48139  ;;
48140  *)
48141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48142for as_dir in $PATH
48143do
48144  IFS=$as_save_IFS
48145  test -z "$as_dir" && as_dir=.
48146    for ac_exec_ext in '' $ac_executable_extensions; do
48147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48148    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48150    break 2
48151  fi
48152done
48153  done
48154IFS=$as_save_IFS
48155
48156  ;;
48157esac
48158fi
48159JTREGEXE=$ac_cv_path_JTREGEXE
48160if test -n "$JTREGEXE"; then
48161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48162$as_echo "$JTREGEXE" >&6; }
48163else
48164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48165$as_echo "no" >&6; }
48166fi
48167
48168
48169  test -n "$JTREGEXE" && break
48170done
48171
48172    else
48173      # If it succeeded, then it was overridden by the user. We will use it
48174      # for the tool.
48175
48176      # First remove it from the list of overridden variables, so we can test
48177      # for unknown variables in the end.
48178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
48179
48180      # Check if we try to supply an empty value
48181      if test "x$JTREGEXE" = x; then
48182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
48183$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
48184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48185$as_echo_n "checking for JTREGEXE... " >&6; }
48186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
48187$as_echo "disabled" >&6; }
48188      else
48189        # Check if the provided tool contains a complete path.
48190        tool_specified="$JTREGEXE"
48191        tool_basename="${tool_specified##*/}"
48192        if test "x$tool_basename" = "x$tool_specified"; then
48193          # A command without a complete path is provided, search $PATH.
48194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
48195$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
48196          # Extract the first word of "$tool_basename", so it can be a program name with args.
48197set dummy $tool_basename; ac_word=$2
48198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
48199$as_echo_n "checking for $ac_word... " >&6; }
48200if ${ac_cv_path_JTREGEXE+:} false; then :
48201  $as_echo_n "(cached) " >&6
48202else
48203  case $JTREGEXE in
48204  [\\/]* | ?:[\\/]*)
48205  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
48206  ;;
48207  *)
48208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
48209for as_dir in $PATH
48210do
48211  IFS=$as_save_IFS
48212  test -z "$as_dir" && as_dir=.
48213    for ac_exec_ext in '' $ac_executable_extensions; do
48214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
48215    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
48216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
48217    break 2
48218  fi
48219done
48220  done
48221IFS=$as_save_IFS
48222
48223  ;;
48224esac
48225fi
48226JTREGEXE=$ac_cv_path_JTREGEXE
48227if test -n "$JTREGEXE"; then
48228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
48229$as_echo "$JTREGEXE" >&6; }
48230else
48231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48232$as_echo "no" >&6; }
48233fi
48234
48235
48236          if test "x$JTREGEXE" = x; then
48237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
48238          fi
48239        else
48240          # Otherwise we believe it is a complete path. Use it as it is.
48241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
48242$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
48243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
48244$as_echo_n "checking for JTREGEXE... " >&6; }
48245          if test ! -x "$tool_specified"; then
48246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
48247$as_echo "not found" >&6; }
48248            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
48249          fi
48250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
48251$as_echo "$tool_specified" >&6; }
48252        fi
48253      fi
48254    fi
48255
48256  fi
48257
48258
48259
48260  if test "x$JTREGEXE" = x; then
48261    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
48262  fi
48263
48264
48265      JT_HOME="`$DIRNAME $JTREGEXE`"
48266    fi
48267  fi
48268
48269
48270
48271
48272
48273
48274  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
48275  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
48276  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
48277  #                              commands produced by the link step (currently AIX only)
48278  if test "x$TOOLCHAIN_TYPE" = xxlc; then
48279    COMPILER_TARGET_BITS_FLAG="-q"
48280    COMPILER_COMMAND_FILE_FLAG="-f"
48281    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
48282  else
48283    COMPILER_TARGET_BITS_FLAG="-m"
48284    COMPILER_COMMAND_FILE_FLAG="@"
48285    COMPILER_BINDCMD_FILE_FLAG=""
48286
48287    # The solstudio linker does not support @-files.
48288    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48289      COMPILER_COMMAND_FILE_FLAG=
48290    fi
48291
48292    # Check if @file is supported by gcc
48293    if test "x$TOOLCHAIN_TYPE" = xgcc; then
48294      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
48295$as_echo_n "checking if @file is supported by gcc... " >&6; }
48296      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
48297      $ECHO "" "--version" > command.file
48298      if $CXX @command.file 2>&5 >&5; then
48299        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
48300$as_echo "yes" >&6; }
48301        COMPILER_COMMAND_FILE_FLAG="@"
48302      else
48303        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
48304$as_echo "no" >&6; }
48305        COMPILER_COMMAND_FILE_FLAG=
48306      fi
48307      $RM command.file
48308    fi
48309  fi
48310
48311
48312
48313
48314  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
48315  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48316    ARFLAGS="-r"
48317  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48318    ARFLAGS="-X64"
48319  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
48320    # lib.exe is used as AR to create static libraries.
48321    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
48322  else
48323    ARFLAGS=""
48324  fi
48325
48326
48327  ## Setup strip.
48328  # FIXME: should this really be per platform, or should it be per toolchain type?
48329  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
48330  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
48331  if test "x$OPENJDK_TARGET_OS" = xlinux; then
48332    STRIPFLAGS="-g"
48333  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
48334    STRIPFLAGS="-x"
48335  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
48336    STRIPFLAGS="-S"
48337  elif test "x$OPENJDK_TARGET_OS" = xaix; then
48338    STRIPFLAGS="-X32_64"
48339  fi
48340
48341
48342
48343  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48344    CC_OUT_OPTION=-Fo
48345    EXE_OUT_OPTION=-out:
48346    LD_OUT_OPTION=-out:
48347    AR_OUT_OPTION=-out:
48348  else
48349    # The option used to specify the target .o,.a or .so file.
48350    # When compiling, how to specify the to be created object file.
48351    CC_OUT_OPTION='-o$(SPACE)'
48352    # When linking, how to specify the to be created executable.
48353    EXE_OUT_OPTION='-o$(SPACE)'
48354    # When linking, how to specify the to be created dynamically linkable library.
48355    LD_OUT_OPTION='-o$(SPACE)'
48356    # When archiving, how to specify the to be create static archive for object files.
48357    AR_OUT_OPTION='rcs$(SPACE)'
48358  fi
48359
48360
48361
48362
48363
48364  # On Windows, we need to set RC flags.
48365  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48366    RC_FLAGS="-nologo -l0x409"
48367    JVM_RCFLAGS="-nologo"
48368    if test "x$DEBUG_LEVEL" = xrelease; then
48369      RC_FLAGS="$RC_FLAGS -DNDEBUG"
48370      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
48371    fi
48372
48373    # The version variables used to create RC_FLAGS may be overridden
48374    # in a custom configure script, or possibly the command line.
48375    # Let those variables be expanded at make time in spec.gmk.
48376    # The \$ are escaped to the shell, and the $(...) variables
48377    # are evaluated by make.
48378    RC_FLAGS="$RC_FLAGS \
48379        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
48380        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
48381        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
48382        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
48383        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
48384        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
48385        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
48386
48387    JVM_RCFLAGS="$JVM_RCFLAGS \
48388        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
48389        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
48390        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
48391        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
48392        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
48393        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
48394        -D\"HS_FNAME=jvm.dll\" \
48395        -D\"HS_INTERNAL_NAME=jvm\""
48396  fi
48397
48398
48399
48400  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48401    # silence copyright notice and other headers.
48402    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
48403  fi
48404
48405
48406# Now we can test some aspects on the target using configure macros.
48407
48408{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
48409$as_echo_n "checking for ANSI C header files... " >&6; }
48410if ${ac_cv_header_stdc+:} false; then :
48411  $as_echo_n "(cached) " >&6
48412else
48413  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48414/* end confdefs.h.  */
48415#include <stdlib.h>
48416#include <stdarg.h>
48417#include <string.h>
48418#include <float.h>
48419
48420int
48421main ()
48422{
48423
48424  ;
48425  return 0;
48426}
48427_ACEOF
48428if ac_fn_cxx_try_compile "$LINENO"; then :
48429  ac_cv_header_stdc=yes
48430else
48431  ac_cv_header_stdc=no
48432fi
48433rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48434
48435if test $ac_cv_header_stdc = yes; then
48436  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
48437  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48438/* end confdefs.h.  */
48439#include <string.h>
48440
48441_ACEOF
48442if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48443  $EGREP "memchr" >/dev/null 2>&1; then :
48444
48445else
48446  ac_cv_header_stdc=no
48447fi
48448rm -f conftest*
48449
48450fi
48451
48452if test $ac_cv_header_stdc = yes; then
48453  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
48454  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48455/* end confdefs.h.  */
48456#include <stdlib.h>
48457
48458_ACEOF
48459if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
48460  $EGREP "free" >/dev/null 2>&1; then :
48461
48462else
48463  ac_cv_header_stdc=no
48464fi
48465rm -f conftest*
48466
48467fi
48468
48469if test $ac_cv_header_stdc = yes; then
48470  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
48471  if test "$cross_compiling" = yes; then :
48472  :
48473else
48474  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48475/* end confdefs.h.  */
48476#include <ctype.h>
48477#include <stdlib.h>
48478#if ((' ' & 0x0FF) == 0x020)
48479# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
48480# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
48481#else
48482# define ISLOWER(c) \
48483		   (('a' <= (c) && (c) <= 'i') \
48484		     || ('j' <= (c) && (c) <= 'r') \
48485		     || ('s' <= (c) && (c) <= 'z'))
48486# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
48487#endif
48488
48489#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
48490int
48491main ()
48492{
48493  int i;
48494  for (i = 0; i < 256; i++)
48495    if (XOR (islower (i), ISLOWER (i))
48496	|| toupper (i) != TOUPPER (i))
48497      return 2;
48498  return 0;
48499}
48500_ACEOF
48501if ac_fn_cxx_try_run "$LINENO"; then :
48502
48503else
48504  ac_cv_header_stdc=no
48505fi
48506rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48507  conftest.$ac_objext conftest.beam conftest.$ac_ext
48508fi
48509
48510fi
48511fi
48512{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48513$as_echo "$ac_cv_header_stdc" >&6; }
48514if test $ac_cv_header_stdc = yes; then
48515
48516$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48517
48518fi
48519
48520# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48521for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48522		  inttypes.h stdint.h unistd.h
48523do :
48524  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48525ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48526"
48527if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48528  cat >>confdefs.h <<_ACEOF
48529#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48530_ACEOF
48531
48532fi
48533
48534done
48535
48536
48537
48538  ###############################################################################
48539  #
48540  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48541  # (The JVM can use 32 or 64 bit Java pointers but that decision
48542  # is made at runtime.)
48543  #
48544
48545  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48546    # Always specify -m flag on Solaris
48547    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48548
48549  # When we add flags to the "official" CFLAGS etc, we need to
48550  # keep track of these additions in ADDED_CFLAGS etc. These
48551  # will later be checked to make sure only controlled additions
48552  # have been made to CFLAGS etc.
48553  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48554  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48555  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48556
48557  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48558  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48559  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48560
48561  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48562  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48563  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48564
48565  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48566  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48567  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48568
48569  elif test "x$COMPILE_TYPE" = xreduced; then
48570    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48571      # Specify -m if running reduced on unix platforms
48572
48573  # When we add flags to the "official" CFLAGS etc, we need to
48574  # keep track of these additions in ADDED_CFLAGS etc. These
48575  # will later be checked to make sure only controlled additions
48576  # have been made to CFLAGS etc.
48577  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48578  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48579  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48580
48581  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48582  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48583  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48584
48585  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48586  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48587  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48588
48589  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48590  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48591  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48592
48593    fi
48594  fi
48595  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48596    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48597    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48598    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48599  fi
48600
48601  # Make compilation sanity check
48602  for ac_header in stdio.h
48603do :
48604  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48605if test "x$ac_cv_header_stdio_h" = xyes; then :
48606  cat >>confdefs.h <<_ACEOF
48607#define HAVE_STDIO_H 1
48608_ACEOF
48609
48610else
48611
48612    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48613$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48614    if test "x$COMPILE_TYPE" = xreduced; then
48615
48616  # Print a helpful message on how to acquire the necessary build dependency.
48617  # reduced is the help tag: freetype, cups, alsa etc
48618  MISSING_DEPENDENCY=reduced
48619
48620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48621    cygwin_help $MISSING_DEPENDENCY
48622  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48623    msys_help $MISSING_DEPENDENCY
48624  else
48625    PKGHANDLER_COMMAND=
48626
48627    case $PKGHANDLER in
48628      apt-get)
48629        apt_help     $MISSING_DEPENDENCY ;;
48630      yum)
48631        yum_help     $MISSING_DEPENDENCY ;;
48632      port)
48633        port_help    $MISSING_DEPENDENCY ;;
48634      pkgutil)
48635        pkgutil_help $MISSING_DEPENDENCY ;;
48636      pkgadd)
48637        pkgadd_help  $MISSING_DEPENDENCY ;;
48638    esac
48639
48640    if test "x$PKGHANDLER_COMMAND" != x; then
48641      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48642    fi
48643  fi
48644
48645      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48646$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48647    elif test "x$COMPILE_TYPE" = xcross; then
48648      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48649$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48650    fi
48651    as_fn_error $? "Cannot continue." "$LINENO" 5
48652
48653fi
48654
48655done
48656
48657
48658  # The cast to long int works around a bug in the HP C Compiler
48659# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48660# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48661# This bug is HP SR number 8606223364.
48662{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48663$as_echo_n "checking size of int *... " >&6; }
48664if ${ac_cv_sizeof_int_p+:} false; then :
48665  $as_echo_n "(cached) " >&6
48666else
48667  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48668
48669else
48670  if test "$ac_cv_type_int_p" = yes; then
48671     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48672$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48673as_fn_error 77 "cannot compute sizeof (int *)
48674See \`config.log' for more details" "$LINENO" 5; }
48675   else
48676     ac_cv_sizeof_int_p=0
48677   fi
48678fi
48679
48680fi
48681{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48682$as_echo "$ac_cv_sizeof_int_p" >&6; }
48683
48684
48685
48686cat >>confdefs.h <<_ACEOF
48687#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48688_ACEOF
48689
48690
48691
48692  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48693  if test "x$ac_cv_sizeof_int_p" = x; then
48694    # The test failed, lets stick to the assumed value.
48695    { $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
48696$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48697  else
48698    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48699
48700    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48701      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48702      # Let's try to implicitely set the compilers target architecture and retry the test
48703      { $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
48704$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;}
48705      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48706$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48707
48708  # When we add flags to the "official" CFLAGS etc, we need to
48709  # keep track of these additions in ADDED_CFLAGS etc. These
48710  # will later be checked to make sure only controlled additions
48711  # have been made to CFLAGS etc.
48712  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48713  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48714  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48715
48716  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48717  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48718  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48719
48720  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48721  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48722  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48723
48724  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48725  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48726  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48727
48728
48729      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48730      unset ac_cv_sizeof_int_p
48731      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48732      cat >>confdefs.h <<_ACEOF
48733#undef SIZEOF_INT_P
48734_ACEOF
48735
48736      # The cast to long int works around a bug in the HP C Compiler
48737# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48738# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48739# This bug is HP SR number 8606223364.
48740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48741$as_echo_n "checking size of int *... " >&6; }
48742if ${ac_cv_sizeof_int_p+:} false; then :
48743  $as_echo_n "(cached) " >&6
48744else
48745  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48746
48747else
48748  if test "$ac_cv_type_int_p" = yes; then
48749     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48750$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48751as_fn_error 77 "cannot compute sizeof (int *)
48752See \`config.log' for more details" "$LINENO" 5; }
48753   else
48754     ac_cv_sizeof_int_p=0
48755   fi
48756fi
48757
48758fi
48759{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48760$as_echo "$ac_cv_sizeof_int_p" >&6; }
48761
48762
48763
48764cat >>confdefs.h <<_ACEOF
48765#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48766_ACEOF
48767
48768
48769
48770      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48771
48772      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48773        { $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
48774$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;}
48775        if test "x$COMPILE_TYPE" = xreduced; then
48776
48777  # Print a helpful message on how to acquire the necessary build dependency.
48778  # reduced is the help tag: freetype, cups, alsa etc
48779  MISSING_DEPENDENCY=reduced
48780
48781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48782    cygwin_help $MISSING_DEPENDENCY
48783  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48784    msys_help $MISSING_DEPENDENCY
48785  else
48786    PKGHANDLER_COMMAND=
48787
48788    case $PKGHANDLER in
48789      apt-get)
48790        apt_help     $MISSING_DEPENDENCY ;;
48791      yum)
48792        yum_help     $MISSING_DEPENDENCY ;;
48793      port)
48794        port_help    $MISSING_DEPENDENCY ;;
48795      pkgutil)
48796        pkgutil_help $MISSING_DEPENDENCY ;;
48797      pkgadd)
48798        pkgadd_help  $MISSING_DEPENDENCY ;;
48799    esac
48800
48801    if test "x$PKGHANDLER_COMMAND" != x; then
48802      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48803    fi
48804  fi
48805
48806          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48807$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48808        elif test "x$COMPILE_TYPE" = xcross; then
48809          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48810$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48811        fi
48812        as_fn_error $? "Cannot continue." "$LINENO" 5
48813      fi
48814    fi
48815  fi
48816
48817  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48818$as_echo_n "checking for target address size... " >&6; }
48819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48820$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48821
48822
48823  ###############################################################################
48824  #
48825  # Is the target little of big endian?
48826  #
48827   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48828$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48829if ${ac_cv_c_bigendian+:} false; then :
48830  $as_echo_n "(cached) " >&6
48831else
48832  ac_cv_c_bigendian=unknown
48833    # See if we're dealing with a universal compiler.
48834    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48835/* end confdefs.h.  */
48836#ifndef __APPLE_CC__
48837	       not a universal capable compiler
48838	     #endif
48839	     typedef int dummy;
48840
48841_ACEOF
48842if ac_fn_cxx_try_compile "$LINENO"; then :
48843
48844	# Check for potential -arch flags.  It is not universal unless
48845	# there are at least two -arch flags with different values.
48846	ac_arch=
48847	ac_prev=
48848	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48849	 if test -n "$ac_prev"; then
48850	   case $ac_word in
48851	     i?86 | x86_64 | ppc | ppc64)
48852	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48853		 ac_arch=$ac_word
48854	       else
48855		 ac_cv_c_bigendian=universal
48856		 break
48857	       fi
48858	       ;;
48859	   esac
48860	   ac_prev=
48861	 elif test "x$ac_word" = "x-arch"; then
48862	   ac_prev=arch
48863	 fi
48864       done
48865fi
48866rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48867    if test $ac_cv_c_bigendian = unknown; then
48868      # See if sys/param.h defines the BYTE_ORDER macro.
48869      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48870/* end confdefs.h.  */
48871#include <sys/types.h>
48872	     #include <sys/param.h>
48873
48874int
48875main ()
48876{
48877#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48878		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48879		     && LITTLE_ENDIAN)
48880	      bogus endian macros
48881	     #endif
48882
48883  ;
48884  return 0;
48885}
48886_ACEOF
48887if ac_fn_cxx_try_compile "$LINENO"; then :
48888  # It does; now see whether it defined to BIG_ENDIAN or not.
48889	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48890/* end confdefs.h.  */
48891#include <sys/types.h>
48892		#include <sys/param.h>
48893
48894int
48895main ()
48896{
48897#if BYTE_ORDER != BIG_ENDIAN
48898		 not big endian
48899		#endif
48900
48901  ;
48902  return 0;
48903}
48904_ACEOF
48905if ac_fn_cxx_try_compile "$LINENO"; then :
48906  ac_cv_c_bigendian=yes
48907else
48908  ac_cv_c_bigendian=no
48909fi
48910rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48911fi
48912rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48913    fi
48914    if test $ac_cv_c_bigendian = unknown; then
48915      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48916      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48917/* end confdefs.h.  */
48918#include <limits.h>
48919
48920int
48921main ()
48922{
48923#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48924	      bogus endian macros
48925	     #endif
48926
48927  ;
48928  return 0;
48929}
48930_ACEOF
48931if ac_fn_cxx_try_compile "$LINENO"; then :
48932  # It does; now see whether it defined to _BIG_ENDIAN or not.
48933	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48934/* end confdefs.h.  */
48935#include <limits.h>
48936
48937int
48938main ()
48939{
48940#ifndef _BIG_ENDIAN
48941		 not big endian
48942		#endif
48943
48944  ;
48945  return 0;
48946}
48947_ACEOF
48948if ac_fn_cxx_try_compile "$LINENO"; then :
48949  ac_cv_c_bigendian=yes
48950else
48951  ac_cv_c_bigendian=no
48952fi
48953rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48954fi
48955rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48956    fi
48957    if test $ac_cv_c_bigendian = unknown; then
48958      # Compile a test program.
48959      if test "$cross_compiling" = yes; then :
48960  # Try to guess by grepping values from an object file.
48961	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48962/* end confdefs.h.  */
48963short int ascii_mm[] =
48964		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48965		short int ascii_ii[] =
48966		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48967		int use_ascii (int i) {
48968		  return ascii_mm[i] + ascii_ii[i];
48969		}
48970		short int ebcdic_ii[] =
48971		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48972		short int ebcdic_mm[] =
48973		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48974		int use_ebcdic (int i) {
48975		  return ebcdic_mm[i] + ebcdic_ii[i];
48976		}
48977		extern int foo;
48978
48979int
48980main ()
48981{
48982return use_ascii (foo) == use_ebcdic (foo);
48983  ;
48984  return 0;
48985}
48986_ACEOF
48987if ac_fn_cxx_try_compile "$LINENO"; then :
48988  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48989	      ac_cv_c_bigendian=yes
48990	    fi
48991	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48992	      if test "$ac_cv_c_bigendian" = unknown; then
48993		ac_cv_c_bigendian=no
48994	      else
48995		# finding both strings is unlikely to happen, but who knows?
48996		ac_cv_c_bigendian=unknown
48997	      fi
48998	    fi
48999fi
49000rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49001else
49002  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49003/* end confdefs.h.  */
49004$ac_includes_default
49005int
49006main ()
49007{
49008
49009	     /* Are we little or big endian?  From Harbison&Steele.  */
49010	     union
49011	     {
49012	       long int l;
49013	       char c[sizeof (long int)];
49014	     } u;
49015	     u.l = 1;
49016	     return u.c[sizeof (long int) - 1] == 1;
49017
49018  ;
49019  return 0;
49020}
49021_ACEOF
49022if ac_fn_cxx_try_run "$LINENO"; then :
49023  ac_cv_c_bigendian=no
49024else
49025  ac_cv_c_bigendian=yes
49026fi
49027rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
49028  conftest.$ac_objext conftest.beam conftest.$ac_ext
49029fi
49030
49031    fi
49032fi
49033{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
49034$as_echo "$ac_cv_c_bigendian" >&6; }
49035 case $ac_cv_c_bigendian in #(
49036   yes)
49037     ENDIAN="big";; #(
49038   no)
49039     ENDIAN="little" ;; #(
49040   universal)
49041     ENDIAN="universal_endianness"
49042     ;; #(
49043   *)
49044     ENDIAN="unknown" ;;
49045 esac
49046
49047
49048  if test "x$ENDIAN" = xuniversal_endianness; then
49049    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
49050  fi
49051  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
49052    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
49053  fi
49054
49055
49056# Configure flags for the tools
49057
49058  ###############################################################################
49059  #
49060  # How to compile shared libraries.
49061  #
49062
49063  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49064    PICFLAG="-fPIC"
49065    C_FLAG_REORDER=''
49066    CXX_FLAG_REORDER=''
49067
49068    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49069      # Linking is different on MacOSX
49070      if test "x$STATIC_BUILD" = xtrue; then
49071        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
49072      else
49073        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49074        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49075      fi
49076      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49077      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49078      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49079      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49080    else
49081      # Default works for linux, might work on other platforms as well.
49082      SHARED_LIBRARY_FLAGS='-shared'
49083      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49084      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49085      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49086      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49087    fi
49088  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49089    C_FLAG_REORDER=''
49090    CXX_FLAG_REORDER=''
49091
49092    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49093      # Linking is different on MacOSX
49094      PICFLAG=''
49095      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
49096      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
49097      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49098      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
49099      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
49100
49101      if test "x$STATIC_BUILD" = xfalse; then
49102        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
49103      fi
49104    else
49105      # Default works for linux, might work on other platforms as well.
49106      PICFLAG='-fPIC'
49107      SHARED_LIBRARY_FLAGS='-shared'
49108      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
49109      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
49110      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
49111      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
49112    fi
49113  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49114    PICFLAG="-KPIC"
49115    C_FLAG_REORDER='-xF'
49116    CXX_FLAG_REORDER='-xF'
49117    SHARED_LIBRARY_FLAGS="-G"
49118    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
49119    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
49120    SET_SHARED_LIBRARY_NAME='-h $1'
49121    SET_SHARED_LIBRARY_MAPFILE='-M$1'
49122  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49123    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
49124    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
49125    # will have to patch this single instruction with a call to some out-of-order code which
49126    # does the load from the TOC. This is of course slow. But in that case we also would have
49127    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
49128    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
49129    # can be patched directly by the linker and does not require a jump to out-of-order code.
49130    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
49131    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
49132    # loads for accessing a global variable). But there are rumors that this may be seen as a
49133    # 'performance feature' because of improved code locality of the symbols used in a
49134    # compilation unit.
49135    PICFLAG="-qpic"
49136    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
49137    C_FLAG_REORDER=''
49138    CXX_FLAG_REORDER=''
49139    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
49140    SET_EXECUTABLE_ORIGIN=""
49141    SET_SHARED_LIBRARY_ORIGIN=''
49142    SET_SHARED_LIBRARY_NAME=''
49143    SET_SHARED_LIBRARY_MAPFILE=''
49144  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49145    PICFLAG=""
49146    C_FLAG_REORDER=''
49147    CXX_FLAG_REORDER=''
49148    SHARED_LIBRARY_FLAGS="-dll"
49149    SET_EXECUTABLE_ORIGIN=''
49150    SET_SHARED_LIBRARY_ORIGIN=''
49151    SET_SHARED_LIBRARY_NAME=''
49152    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
49153  fi
49154
49155
49156
49157
49158
49159
49160
49161
49162
49163  # The (cross) compiler is now configured, we can now test capabilities
49164  # of the target platform.
49165
49166
49167
49168  ###############################################################################
49169  #
49170  # Setup the opt flags for different compilers
49171  # and different operating systems.
49172  #
49173
49174  # FIXME: this was indirectly the old default, but just inherited.
49175  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49176  #   C_FLAG_DEPS="-MMD -MF"
49177  # fi
49178
49179  # Generate make dependency files
49180  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49181    C_FLAG_DEPS="-MMD -MF"
49182  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49183    C_FLAG_DEPS="-MMD -MF"
49184  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49185    C_FLAG_DEPS="-xMMD -xMF"
49186  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49187    C_FLAG_DEPS="-qmakedep=gcc -MF"
49188  fi
49189  CXX_FLAG_DEPS="$C_FLAG_DEPS"
49190
49191
49192
49193  # Debug symbols
49194  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49195    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
49196      # reduce from default "-g2" option to save space
49197      CFLAGS_DEBUG_SYMBOLS="-g1"
49198      CXXFLAGS_DEBUG_SYMBOLS="-g1"
49199    else
49200      CFLAGS_DEBUG_SYMBOLS="-g"
49201      CXXFLAGS_DEBUG_SYMBOLS="-g"
49202    fi
49203  elif test "x$TOOLCHAIN_TYPE" = xclang; then
49204    CFLAGS_DEBUG_SYMBOLS="-g"
49205    CXXFLAGS_DEBUG_SYMBOLS="-g"
49206  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49207    CFLAGS_DEBUG_SYMBOLS="-g -xs"
49208    # -g0 enables debug symbols without disabling inlining.
49209    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
49210  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49211    CFLAGS_DEBUG_SYMBOLS="-g"
49212    CXXFLAGS_DEBUG_SYMBOLS="-g"
49213  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49214    CFLAGS_DEBUG_SYMBOLS="-Zi"
49215    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
49216  fi
49217
49218
49219
49220  # Debug symbols for JVM_CFLAGS
49221  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49222    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
49223    if test "x$DEBUG_LEVEL" = xslowdebug; then
49224      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49225    else
49226      # -g0 does not disable inlining, which -g does.
49227      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
49228    fi
49229  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49230    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
49231  else
49232    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
49233  fi
49234
49235
49236  # bounds, memory and behavior checking options
49237  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49238    case $DEBUG_LEVEL in
49239    release )
49240      # no adjustment
49241      ;;
49242    fastdebug )
49243      # no adjustment
49244      ;;
49245    slowdebug )
49246      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
49247      # get's added conditionally on whether we produce debug symbols or not.
49248      # This is most likely not really correct.
49249
49250      # Add runtime stack smashing and undefined behavior checks.
49251      # Not all versions of gcc support -fstack-protector
49252      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
49253
49254
49255
49256
49257
49258
49259
49260
49261
49262
49263
49264
49265
49266
49267
49268
49269
49270
49271
49272
49273
49274
49275
49276
49277
49278
49279
49280
49281
49282
49283
49284
49285
49286
49287
49288
49289
49290
49291
49292
49293
49294
49295    # Execute function body
49296
49297
49298
49299
49300
49301
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314
49315
49316
49317
49318
49319
49320
49321
49322
49323
49324
49325
49326
49327
49328
49329
49330
49331
49332
49333
49334
49335
49336
49337
49338
49339
49340
49341
49342
49343
49344    # Execute function body
49345
49346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49347$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49348  supports=yes
49349
49350  saved_cflags="$CFLAGS"
49351  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
49352  ac_ext=c
49353ac_cpp='$CPP $CPPFLAGS'
49354ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49355ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49356ac_compiler_gnu=$ac_cv_c_compiler_gnu
49357
49358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49359/* end confdefs.h.  */
49360int i;
49361_ACEOF
49362if ac_fn_c_try_compile "$LINENO"; then :
49363
49364else
49365  supports=no
49366fi
49367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49368  ac_ext=cpp
49369ac_cpp='$CXXCPP $CPPFLAGS'
49370ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49371ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49372ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49373
49374  CFLAGS="$saved_cflags"
49375
49376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49377$as_echo "$supports" >&6; }
49378  if test "x$supports" = "xyes" ; then
49379    :
49380    C_COMP_SUPPORTS="yes"
49381  else
49382    :
49383    C_COMP_SUPPORTS="no"
49384  fi
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424
49425
49426
49427
49428
49429
49430
49431
49432
49433
49434
49435
49436
49437
49438
49439
49440
49441
49442
49443
49444    # Execute function body
49445
49446  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49447$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49448  supports=yes
49449
49450  saved_cxxflags="$CXXFLAGS"
49451  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
49452  ac_ext=cpp
49453ac_cpp='$CXXCPP $CPPFLAGS'
49454ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49455ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49456ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49457
49458  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49459/* end confdefs.h.  */
49460int i;
49461_ACEOF
49462if ac_fn_cxx_try_compile "$LINENO"; then :
49463
49464else
49465  supports=no
49466fi
49467rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49468  ac_ext=cpp
49469ac_cpp='$CXXCPP $CPPFLAGS'
49470ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49471ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49472ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49473
49474  CXXFLAGS="$saved_cxxflags"
49475
49476  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49477$as_echo "$supports" >&6; }
49478  if test "x$supports" = "xyes" ; then
49479    :
49480    CXX_COMP_SUPPORTS="yes"
49481  else
49482    :
49483    CXX_COMP_SUPPORTS="no"
49484  fi
49485
49486
49487
49488
49489
49490
49491
49492
49493
49494
49495
49496
49497
49498  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49499$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49500  supports=no
49501  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49502
49503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49504$as_echo "$supports" >&6; }
49505  if test "x$supports" = "xyes" ; then
49506    :
49507
49508  else
49509    :
49510    STACK_PROTECTOR_CFLAG=""
49511  fi
49512
49513
49514
49515
49516
49517
49518
49519      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49520      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49521      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49522        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49523      fi
49524      ;;
49525    esac
49526  fi
49527
49528  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49529    if test "x$DEBUG_LEVEL" != xrelease; then
49530      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49531        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49532      fi
49533    fi
49534  fi
49535
49536  # Optimization levels
49537  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49538    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49539
49540    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49541      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49542      C_O_FLAG_HIGHEST_JVM="-xO4"
49543      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49544      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49545      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49546      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49547      C_O_FLAG_DEBUG_JVM=""
49548      C_O_FLAG_NONE="-xregs=no%frameptr"
49549      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49550      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49551      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49552      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49553      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49554      CXX_O_FLAG_DEBUG_JVM=""
49555      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49556      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49557        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49558        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49559      fi
49560    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49561      C_O_FLAG_HIGHEST_JVM="-xO4"
49562      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49563      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49564      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49565      C_O_FLAG_DEBUG=""
49566      C_O_FLAG_DEBUG_JVM=""
49567      C_O_FLAG_NONE=""
49568      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49569      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49570      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49571      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49572      CXX_O_FLAG_DEBUG=""
49573      CXX_O_FLAG_DEBUG_JVM=""
49574      CXX_O_FLAG_NONE=""
49575    fi
49576  else
49577    # The remaining toolchains share opt flags between CC and CXX;
49578    # setup for C and duplicate afterwards.
49579    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49580      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49581        # On MacOSX we optimize for size, something
49582        # we should do for all platforms?
49583        C_O_FLAG_HIGHEST_JVM="-Os"
49584        C_O_FLAG_HIGHEST="-Os"
49585        C_O_FLAG_HI="-Os"
49586        C_O_FLAG_NORM="-Os"
49587        C_O_FLAG_SIZE="-Os"
49588      else
49589        C_O_FLAG_HIGHEST_JVM="-O3"
49590        C_O_FLAG_HIGHEST="-O3"
49591        C_O_FLAG_HI="-O3"
49592        C_O_FLAG_NORM="-O2"
49593        C_O_FLAG_SIZE="-Os"
49594      fi
49595      C_O_FLAG_DEBUG="-O0"
49596      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49597        C_O_FLAG_DEBUG_JVM=""
49598      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49599        C_O_FLAG_DEBUG_JVM="-O0"
49600      fi
49601      C_O_FLAG_NONE="-O0"
49602    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49603      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49604        # On MacOSX we optimize for size, something
49605        # we should do for all platforms?
49606        C_O_FLAG_HIGHEST_JVM="-Os"
49607        C_O_FLAG_HIGHEST="-Os"
49608        C_O_FLAG_HI="-Os"
49609        C_O_FLAG_NORM="-Os"
49610        C_O_FLAG_SIZE="-Os"
49611      else
49612        C_O_FLAG_HIGHEST_JVM="-O3"
49613        C_O_FLAG_HIGHEST="-O3"
49614        C_O_FLAG_HI="-O3"
49615        C_O_FLAG_NORM="-O2"
49616        C_O_FLAG_SIZE="-Os"
49617      fi
49618      C_O_FLAG_DEBUG="-O0"
49619      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49620        C_O_FLAG_DEBUG_JVM=""
49621      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49622        C_O_FLAG_DEBUG_JVM="-O0"
49623      fi
49624      C_O_FLAG_NONE="-O0"
49625    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49626      C_O_FLAG_HIGHEST_JVM="-O3 -qhot=level=1 -qinline -qinlglue"
49627      C_O_FLAG_HIGHEST="-O3 -qhot=level=1 -qinline -qinlglue"
49628      C_O_FLAG_HI="-O3 -qinline -qinlglue"
49629      C_O_FLAG_NORM="-O2"
49630      C_O_FLAG_DEBUG="-qnoopt"
49631      # FIXME: Value below not verified.
49632      C_O_FLAG_DEBUG_JVM=""
49633      C_O_FLAG_NONE="-qnoopt"
49634    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49635      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49636      C_O_FLAG_HIGHEST="-O2"
49637      C_O_FLAG_HI="-O1"
49638      C_O_FLAG_NORM="-O1"
49639      C_O_FLAG_DEBUG="-Od"
49640      C_O_FLAG_DEBUG_JVM=""
49641      C_O_FLAG_NONE="-Od"
49642      C_O_FLAG_SIZE="-Os"
49643    fi
49644    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49645    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49646    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49647    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49648    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49649    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49650    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49651    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49652  fi
49653
49654  # Adjust optimization flags according to debug level.
49655  case $DEBUG_LEVEL in
49656    release )
49657      # no adjustment
49658      ;;
49659    fastdebug )
49660      # Not quite so much optimization
49661      C_O_FLAG_HI="$C_O_FLAG_NORM"
49662      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49663      ;;
49664    slowdebug )
49665      # Disable optimization
49666      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49667      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49668      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49669      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49670      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49671      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49672      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49673      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49674      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49675      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49676      ;;
49677  esac
49678
49679
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693
49694
49695
49696
49697  # Special extras...
49698  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49699    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49700      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49701      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49702    fi
49703    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49704    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49705  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49706    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49707    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49708  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49709    CXXSTD_CXXFLAG="-std=gnu++98"
49710
49711
49712
49713
49714
49715
49716
49717
49718
49719
49720
49721
49722
49723
49724
49725
49726
49727
49728
49729
49730
49731
49732
49733
49734
49735
49736
49737
49738
49739
49740
49741
49742
49743
49744
49745
49746
49747
49748
49749
49750
49751
49752    # Execute function body
49753
49754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49755$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49756  supports=yes
49757
49758  saved_cxxflags="$CXXFLAGS"
49759  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49760  ac_ext=cpp
49761ac_cpp='$CXXCPP $CPPFLAGS'
49762ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49763ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49764ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49765
49766  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49767/* end confdefs.h.  */
49768int i;
49769_ACEOF
49770if ac_fn_cxx_try_compile "$LINENO"; then :
49771
49772else
49773  supports=no
49774fi
49775rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49776  ac_ext=cpp
49777ac_cpp='$CXXCPP $CPPFLAGS'
49778ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49779ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49780ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49781
49782  CXXFLAGS="$saved_cxxflags"
49783
49784  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49785$as_echo "$supports" >&6; }
49786  if test "x$supports" = "xyes" ; then
49787    :
49788
49789  else
49790    :
49791    CXXSTD_CXXFLAG=""
49792  fi
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49806
49807  fi
49808  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49809    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49810    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49811    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49812    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49813    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49814  fi
49815
49816  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49817    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49818    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49819    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49820  fi
49821
49822  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49823  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49824  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49825
49826  ###############################################################################
49827  #
49828  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49829  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49830  #
49831
49832  # Setup compiler/platform specific flags into
49833  #    CFLAGS_JDK    - C Compiler flags
49834  #    CXXFLAGS_JDK  - C++ Compiler flags
49835  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49836  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49837    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49838    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49839    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49840    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49841      # Force compatibility with i586 on 32 bit intel platforms.
49842      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49843      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49844    fi
49845    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49846        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49847    case $OPENJDK_TARGET_CPU_ARCH in
49848      arm )
49849        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49850        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49851        ;;
49852      ppc )
49853        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49854        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49855        ;;
49856      * )
49857        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49858        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49859        ;;
49860    esac
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906
49907
49908
49909
49910
49911
49912
49913
49914
49915    # Execute function body
49916
49917  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49918  REFERENCE_VERSION=6
49919
49920  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49921    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49922  fi
49923
49924  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49925    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49926  fi
49927
49928  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49929  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49930
49931  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49932    :
49933
49934  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49935  # runs afoul of the more aggressive versions of these optimisations.
49936  # Notably, value range propagation now assumes that the this pointer of C++
49937  # member functions is non-null.
49938  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49939
49940
49941
49942
49943
49944
49945
49946
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960
49961
49962
49963
49964
49965
49966
49967
49968
49969
49970
49971
49972
49973
49974
49975
49976
49977
49978
49979
49980
49981    # Execute function body
49982
49983
49984
49985
49986
49987
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002
50003
50004
50005
50006
50007
50008
50009
50010
50011
50012
50013
50014
50015
50016
50017
50018
50019
50020
50021
50022
50023
50024
50025
50026
50027
50028
50029
50030    # Execute function body
50031
50032  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50033$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50034  supports=yes
50035
50036  saved_cflags="$CFLAGS"
50037  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50038  ac_ext=c
50039ac_cpp='$CPP $CPPFLAGS'
50040ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50041ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50042ac_compiler_gnu=$ac_cv_c_compiler_gnu
50043
50044  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50045/* end confdefs.h.  */
50046int i;
50047_ACEOF
50048if ac_fn_c_try_compile "$LINENO"; then :
50049
50050else
50051  supports=no
50052fi
50053rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50054  ac_ext=cpp
50055ac_cpp='$CXXCPP $CPPFLAGS'
50056ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50057ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50058ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50059
50060  CFLAGS="$saved_cflags"
50061
50062  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50063$as_echo "$supports" >&6; }
50064  if test "x$supports" = "xyes" ; then
50065    :
50066    C_COMP_SUPPORTS="yes"
50067  else
50068    :
50069    C_COMP_SUPPORTS="no"
50070  fi
50071
50072
50073
50074
50075
50076
50077
50078
50079
50080
50081
50082
50083
50084
50085
50086
50087
50088
50089
50090
50091
50092
50093
50094
50095
50096
50097
50098
50099
50100
50101
50102
50103
50104
50105
50106
50107
50108
50109
50110
50111
50112
50113
50114
50115
50116
50117
50118
50119
50120
50121
50122
50123
50124
50125
50126
50127
50128
50129
50130    # Execute function body
50131
50132  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50133$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50134  supports=yes
50135
50136  saved_cxxflags="$CXXFLAGS"
50137  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
50138  ac_ext=cpp
50139ac_cpp='$CXXCPP $CPPFLAGS'
50140ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50141ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50142ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50143
50144  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50145/* end confdefs.h.  */
50146int i;
50147_ACEOF
50148if ac_fn_cxx_try_compile "$LINENO"; then :
50149
50150else
50151  supports=no
50152fi
50153rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50154  ac_ext=cpp
50155ac_cpp='$CXXCPP $CPPFLAGS'
50156ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50157ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50158ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50159
50160  CXXFLAGS="$saved_cxxflags"
50161
50162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50163$as_echo "$supports" >&6; }
50164  if test "x$supports" = "xyes" ; then
50165    :
50166    CXX_COMP_SUPPORTS="yes"
50167  else
50168    :
50169    CXX_COMP_SUPPORTS="no"
50170  fi
50171
50172
50173
50174
50175
50176
50177
50178
50179
50180
50181
50182
50183
50184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
50185$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
50186  supports=no
50187  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50188
50189  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50190$as_echo "$supports" >&6; }
50191  if test "x$supports" = "xyes" ; then
50192    :
50193
50194  else
50195    :
50196    NO_NULL_POINTER_CHECK_CFLAG=""
50197  fi
50198
50199
50200
50201
50202
50203
50204
50205  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
50206
50207
50208
50209
50210
50211
50212
50213
50214
50215
50216
50217
50218
50219
50220
50221
50222
50223
50224
50225
50226
50227
50228
50229
50230
50231
50232
50233
50234
50235
50236
50237
50238
50239
50240
50241
50242
50243
50244
50245
50246
50247
50248    # Execute function body
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
50277
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292
50293
50294
50295
50296
50297    # Execute function body
50298
50299  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50300$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50301  supports=yes
50302
50303  saved_cflags="$CFLAGS"
50304  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
50305  ac_ext=c
50306ac_cpp='$CPP $CPPFLAGS'
50307ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50308ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50309ac_compiler_gnu=$ac_cv_c_compiler_gnu
50310
50311  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50312/* end confdefs.h.  */
50313int i;
50314_ACEOF
50315if ac_fn_c_try_compile "$LINENO"; then :
50316
50317else
50318  supports=no
50319fi
50320rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50321  ac_ext=cpp
50322ac_cpp='$CXXCPP $CPPFLAGS'
50323ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50324ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50325ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50326
50327  CFLAGS="$saved_cflags"
50328
50329  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50330$as_echo "$supports" >&6; }
50331  if test "x$supports" = "xyes" ; then
50332    :
50333    C_COMP_SUPPORTS="yes"
50334  else
50335    :
50336    C_COMP_SUPPORTS="no"
50337  fi
50338
50339
50340
50341
50342
50343
50344
50345
50346
50347
50348
50349
50350
50351
50352
50353
50354
50355
50356
50357
50358
50359
50360
50361
50362
50363
50364
50365
50366
50367
50368
50369
50370
50371
50372
50373
50374
50375
50376
50377
50378
50379
50380
50381
50382
50383
50384
50385
50386
50387
50388
50389
50390
50391
50392
50393
50394
50395
50396
50397    # Execute function body
50398
50399  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50400$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50401  supports=yes
50402
50403  saved_cxxflags="$CXXFLAGS"
50404  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
50405  ac_ext=cpp
50406ac_cpp='$CXXCPP $CPPFLAGS'
50407ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50408ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50409ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50410
50411  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50412/* end confdefs.h.  */
50413int i;
50414_ACEOF
50415if ac_fn_cxx_try_compile "$LINENO"; then :
50416
50417else
50418  supports=no
50419fi
50420rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50421  ac_ext=cpp
50422ac_cpp='$CXXCPP $CPPFLAGS'
50423ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50424ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50425ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50426
50427  CXXFLAGS="$saved_cxxflags"
50428
50429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50430$as_echo "$supports" >&6; }
50431  if test "x$supports" = "xyes" ; then
50432    :
50433    CXX_COMP_SUPPORTS="yes"
50434  else
50435    :
50436    CXX_COMP_SUPPORTS="no"
50437  fi
50438
50439
50440
50441
50442
50443
50444
50445
50446
50447
50448
50449
50450
50451  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
50452$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
50453  supports=no
50454  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
50455
50456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50457$as_echo "$supports" >&6; }
50458  if test "x$supports" = "xyes" ; then
50459    :
50460
50461  else
50462    :
50463    NO_LIFETIME_DSE_CFLAG=""
50464  fi
50465
50466
50467
50468
50469
50470
50471  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
50472
50473
50474
50475  else
50476    :
50477
50478  fi
50479
50480
50481
50482
50483
50484
50485
50486
50487
50488
50489
50490
50491
50492
50493  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50494    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50495
50496    # Restrict the debug information created by Clang to avoid
50497    # too big object files and speed the build up a little bit
50498    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50499    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50500    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50501      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50502        # Force compatibility with i586 on 32 bit intel platforms.
50503        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50504        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50505      fi
50506      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50507      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50508          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50509      case $OPENJDK_TARGET_CPU_ARCH in
50510        ppc )
50511          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50512          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50513          ;;
50514        * )
50515          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50516          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50517          ;;
50518      esac
50519    fi
50520  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50521    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50522    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50523    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50524      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50525    fi
50526
50527    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50528    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50529  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50530    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50531    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50532    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50533  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50534    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50535        -MD -Zc:wchar_t- -W3 -wd4800 \
50536        -DWIN32_LEAN_AND_MEAN \
50537        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50538        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50539        -DWIN32 -DIAL"
50540    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50541      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50542    else
50543      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50544    fi
50545    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50546    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50547    # studio.
50548    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50549      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50550      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50551      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50552    fi
50553  fi
50554
50555  ###############################################################################
50556
50557  # Adjust flags according to debug level.
50558  case $DEBUG_LEVEL in
50559    fastdebug | slowdebug )
50560      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50561      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50562      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50563      ;;
50564    release )
50565      ;;
50566    * )
50567      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50568      ;;
50569  esac
50570
50571  # Set some common defines. These works for all compilers, but assume
50572  # -D is universally accepted.
50573
50574  # Setup endianness
50575  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50576    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50577    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50578    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50579    #   Note: -Dmacro         is the same as    #define macro 1
50580    #         -Dmacro=        is the same as    #define macro
50581    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50582      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50583    else
50584      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50585    fi
50586  else
50587    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50588    # are defined in the system?
50589    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50590      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50591    else
50592      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50593    fi
50594  fi
50595
50596  # Setup target OS define. Use OS target name but in upper case.
50597  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50598  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50599
50600  # Setup target CPU
50601  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50602      $OPENJDK_TARGET_ADD_LP64 \
50603      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50604
50605  # Setup debug/release defines
50606  if test "x$DEBUG_LEVEL" = xrelease; then
50607    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50608    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50609      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50610    fi
50611  else
50612    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50613  fi
50614
50615  # Set some additional per-OS defines.
50616  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50617    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50618    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50619        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50620  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50621    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50622    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50623        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50624  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50625    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50626    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50627    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50628    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50629        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50630        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50631        -fno-omit-frame-pointer"
50632  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50633    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50634    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50635    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced \
50636        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50637        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50638  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50639    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50640  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50641    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50642    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50643  fi
50644
50645  # Set some additional per-CPU defines.
50646  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50647    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50648  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50649    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50650  elif test "x$OPENJDK_TARGET_CPU" = xppc64; 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      # fixes `relocation truncated to fit' error for gcc 4.1.
50654      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50655      # Use ppc64 instructions, but schedule for power5
50656      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50657    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50658      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50659    fi
50660  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50661    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50662      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50663      # Little endian machine uses ELFv2 ABI.
50664      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50665      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50666      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50667    fi
50668  fi
50669
50670  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50671    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50672  fi
50673
50674  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50675    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50676      # Solaris does not have _LP64=1 in the old build.
50677      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50678      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50679    fi
50680  fi
50681
50682  # Set JVM_CFLAGS warning handling
50683  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50684    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50685        -Wunused-value -Woverloaded-virtual"
50686
50687    if test "x$TOOLCHAIN_TYPE" = xgcc; then
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
50737
50738
50739
50740
50741
50742    # Execute function body
50743
50744  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50745  REFERENCE_VERSION=4.8
50746
50747  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50748    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50749  fi
50750
50751  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50752    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50753  fi
50754
50755  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50756  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50757
50758  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50759    :
50760
50761            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50762            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50763
50764
50765  else
50766    :
50767
50768  fi
50769
50770
50771
50772
50773
50774
50775
50776
50777
50778
50779
50780
50781
50782
50783    fi
50784    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50785      # Non-zero builds have stricter warnings
50786      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50787    else
50788      if test "x$TOOLCHAIN_TYPE" = xclang; then
50789        # Some versions of llvm do not like -Wundef
50790        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50791      fi
50792    fi
50793  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50794    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50795        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50796  fi
50797
50798  # Additional macosx handling
50799  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50800    # Setting these parameters makes it an error to link to macosx APIs that are
50801    # newer than the given OS version and makes the linked binaries compatible
50802    # even if built on a newer version of the OS.
50803    # The expected format is X.Y.Z
50804    MACOSX_VERSION_MIN=10.7.0
50805
50806
50807    # The macro takes the version with no dots, ex: 1070
50808    # Let the flags variables get resolved in make for easier override on make
50809    # command line.
50810    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50811    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50812  fi
50813
50814  # Setup some hard coded includes
50815  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50816      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50817      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50818      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50819      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50820      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50821
50822  # The shared libraries are compiled using the picflag.
50823  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50824      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50825  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50826      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50827
50828  # Executable flags
50829  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50830  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50831
50832
50833
50834
50835
50836
50837  # Setup LDFLAGS et al.
50838  #
50839
50840  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50841    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50842    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50843    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50844    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50845      LDFLAGS_SAFESH="-safeseh"
50846      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50847      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50848      # NOTE: Old build added -machine. Probably not needed.
50849      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50850    else
50851      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50852    fi
50853  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50854      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50855      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50856        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50857        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50858    fi
50859  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50860    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50861    # We have previously set HAS_GNU_HASH if this is the case
50862    if test -n "$HAS_GNU_HASH"; then
50863      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50864      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50865      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50866    fi
50867      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50868        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50869    fi
50870    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50871      # And since we now know that the linker is gnu, then add -z defs, to forbid
50872      # undefined symbols in object files.
50873      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50874      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50875      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50876      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50877      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50878      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50879        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50880      fi
50881      case $DEBUG_LEVEL in
50882        release )
50883          # tell linker to optimize libraries.
50884          # Should this be supplied to the OSS linker as well?
50885          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50886          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50887          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50888          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50889            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50890          fi
50891          ;;
50892        slowdebug )
50893          # Hotspot always let the linker optimize
50894          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50895          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50896            # do relocations at load
50897            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50898            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50899            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50900          fi
50901          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50902            # mark relocations read only
50903            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50904            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50905            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50906          fi
50907          ;;
50908        fastdebug )
50909          # Hotspot always let the linker optimize
50910          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50911          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50912            # mark relocations read only
50913            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50914            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50915            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50916          fi
50917          ;;
50918        * )
50919          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50920          ;;
50921        esac
50922    fi
50923  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50924    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50925    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50926    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50927    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50928    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50929    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50930      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50931    fi
50932  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50933    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50934    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50935    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50936  fi
50937
50938  # Customize LDFLAGS for executables
50939
50940  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50941
50942  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50943    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50944      LDFLAGS_STACK_SIZE=1048576
50945    else
50946      LDFLAGS_STACK_SIZE=327680
50947    fi
50948    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50949  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50950    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50951  fi
50952
50953  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50954
50955  # Customize LDFLAGS for libs
50956  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50957
50958  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50959  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50960    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50961        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50962    JDKLIB_LIBS=""
50963  else
50964    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50965        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50966
50967    if test "xTARGET" = "xTARGET"; then
50968    # On some platforms (mac) the linker warns about non existing -L dirs.
50969    # Add server first if available. Linking aginst client does not always produce the same results.
50970      # Only add client/minimal dir if client/minimal is being built.
50971    # Default to server for other variants.
50972      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50973        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50974      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50975        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50976      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50977        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50978    else
50979        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50980    fi
50981    elif test "xTARGET" = "xBUILD"; then
50982      # When building a buildjdk, it's always only the server variant
50983      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50984          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50985    fi
50986
50987    JDKLIB_LIBS="-ljava -ljvm"
50988    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50989      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50990    fi
50991
50992  fi
50993
50994  # Set JVM_LIBS (per os)
50995  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50996    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50997  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50998    # FIXME: This hard-coded path is not really proper.
50999    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
51000      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51001    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
51002      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51003    fi
51004    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51005        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51006  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51007    JVM_LIBS="$JVM_LIBS -lm"
51008  elif test "x$OPENJDK_TARGET_OS" = xaix; then
51009    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51010  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
51011    JVM_LIBS="$JVM_LIBS -lm"
51012  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
51013    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51014        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51015        wsock32.lib winmm.lib version.lib psapi.lib"
51016    fi
51017
51018  # Set JVM_ASFLAGS
51019  if test "x$OPENJDK_TARGET_OS" = xlinux; then
51020    if test "x$OPENJDK_TARGET_CPU" = xx86; then
51021      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
51022    fi
51023  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
51024    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51025  fi
51026
51027  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043  # Special extras...
51044  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51045    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51046      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51047      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
51048    fi
51049    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51050    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
51051  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51052    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51053    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51054  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51055    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
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
51095
51096
51097
51098    # Execute function body
51099
51100  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
51101$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
51102  supports=yes
51103
51104  saved_cxxflags="$CXXFLAGS"
51105  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
51106  ac_ext=cpp
51107ac_cpp='$CXXCPP $CPPFLAGS'
51108ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51109ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51110ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51111
51112  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51113/* end confdefs.h.  */
51114int i;
51115_ACEOF
51116if ac_fn_cxx_try_compile "$LINENO"; then :
51117
51118else
51119  supports=no
51120fi
51121rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51122  ac_ext=cpp
51123ac_cpp='$CXXCPP $CPPFLAGS'
51124ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51125ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51126ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51127
51128  CXXFLAGS="$saved_cxxflags"
51129
51130  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51131$as_echo "$supports" >&6; }
51132  if test "x$supports" = "xyes" ; then
51133    :
51134
51135  else
51136    :
51137    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
51138  fi
51139
51140
51141
51142
51143
51144
51145
51146
51147
51148
51149
51150
51151    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
51152
51153  fi
51154  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51155    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51156    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51157    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51158    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51159    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
51160  fi
51161
51162  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
51163    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
51164    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
51165    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
51166  fi
51167
51168  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
51169  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
51170  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
51171
51172  ###############################################################################
51173  #
51174  # Now setup the CFLAGS and LDFLAGS for the JDK build.
51175  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
51176  #
51177
51178  # Setup compiler/platform specific flags into
51179  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
51180  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
51181  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
51182  if test "x$TOOLCHAIN_TYPE" = xgcc; then
51183    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51184    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
51185    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
51186    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51187      # Force compatibility with i586 on 32 bit intel platforms.
51188      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51189      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51190    fi
51191    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51192        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51193    case $OPENJDK_BUILD_CPU_ARCH in
51194      arm )
51195        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51196        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51197        ;;
51198      ppc )
51199        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51200        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51201        ;;
51202      * )
51203        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51204        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51205        ;;
51206    esac
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
51255
51256
51257
51258
51259
51260
51261    # Execute function body
51262
51263  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51264  REFERENCE_VERSION=6
51265
51266  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51267    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
51268  fi
51269
51270  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51271    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
51272  fi
51273
51274  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51275  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51276
51277  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51278    :
51279
51280  else
51281    :
51282
51283  fi
51284
51285
51286
51287
51288
51289
51290
51291
51292
51293
51294
51295
51296
51297
51298  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51299    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
51300
51301    # Restrict the debug information created by Clang to avoid
51302    # too big object files and speed the build up a little bit
51303    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
51304    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
51305    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51306      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51307        # Force compatibility with i586 on 32 bit intel platforms.
51308        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
51309        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
51310      fi
51311      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
51312      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
51313          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
51314      case $OPENJDK_BUILD_CPU_ARCH in
51315        ppc )
51316          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
51317          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51318          ;;
51319        * )
51320          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
51321          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
51322          ;;
51323      esac
51324    fi
51325  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51326    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
51327    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
51328    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
51329      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
51330    fi
51331
51332    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
51333    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
51334  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51335    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
51336    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51337    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
51338  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51339    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51340        -MD -Zc:wchar_t- -W3 -wd4800 \
51341        -DWIN32_LEAN_AND_MEAN \
51342        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
51343        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
51344        -DWIN32 -DIAL"
51345    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51346      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
51347    else
51348      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
51349    fi
51350    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
51351    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
51352    # studio.
51353    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
51354      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
51355      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
51356      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
51357    fi
51358  fi
51359
51360  ###############################################################################
51361
51362  # Adjust flags according to debug level.
51363  case $DEBUG_LEVEL in
51364    fastdebug | slowdebug )
51365      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
51366      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
51367      JAVAC_FLAGS="$JAVAC_FLAGS -g"
51368      ;;
51369    release )
51370      ;;
51371    * )
51372      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51373      ;;
51374  esac
51375
51376  # Set some common defines. These works for all compilers, but assume
51377  # -D is universally accepted.
51378
51379  # Setup endianness
51380  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51381    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
51382    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
51383    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
51384    #   Note: -Dmacro         is the same as    #define macro 1
51385    #         -Dmacro=        is the same as    #define macro
51386    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51387      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
51388    else
51389      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
51390    fi
51391  else
51392    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
51393    # are defined in the system?
51394    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51395      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
51396    else
51397      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
51398    fi
51399  fi
51400
51401  # Setup target OS define. Use OS target name but in upper case.
51402  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
51403  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
51404
51405  # Setup target CPU
51406  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51407      $OPENJDK_BUILD_ADD_LP64 \
51408      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
51409
51410  # Setup debug/release defines
51411  if test "x$DEBUG_LEVEL" = xrelease; then
51412    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
51413    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
51414      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
51415    fi
51416  else
51417    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
51418  fi
51419
51420  # Set some additional per-OS defines.
51421  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51422    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
51423    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
51424        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
51425  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51426    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
51427    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
51428        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
51429  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51430    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
51431    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
51432    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
51433    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
51434        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
51435        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
51436        -fno-omit-frame-pointer"
51437  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51438    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
51439    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
51440    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced \
51441        -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
51442        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
51443  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51444    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
51445  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51446    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
51447    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
51448  fi
51449
51450  # Set some additional per-CPU defines.
51451  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
51452    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
51453  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51454    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
51455  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
51456    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51457      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51458      # fixes `relocation truncated to fit' error for gcc 4.1.
51459      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
51460      # Use ppc64 instructions, but schedule for power5
51461      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
51462    elif test "x$OPENJDK_BUILD_OS" = xaix; then
51463      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
51464    fi
51465  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
51466    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51467      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
51468      # Little endian machine uses ELFv2 ABI.
51469      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
51470      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
51471      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
51472    fi
51473  fi
51474
51475  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
51476    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
51477  fi
51478
51479  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
51480    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
51481      # Solaris does not have _LP64=1 in the old build.
51482      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
51483      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
51484    fi
51485  fi
51486
51487  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
51488  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51489    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
51490        -Wunused-value -Woverloaded-virtual"
51491
51492    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51493
51494
51495
51496
51497
51498
51499
51500
51501
51502
51503
51504
51505
51506
51507
51508
51509
51510
51511
51512
51513
51514
51515
51516
51517
51518
51519
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547    # Execute function body
51548
51549  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51550  REFERENCE_VERSION=4.8
51551
51552  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51553    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51554  fi
51555
51556  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51557    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51558  fi
51559
51560  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51561  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51562
51563  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51564    :
51565
51566            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51567            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51568
51569
51570  else
51571    :
51572
51573  fi
51574
51575
51576
51577
51578
51579
51580
51581
51582
51583
51584
51585
51586
51587
51588    fi
51589    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51590      # Non-zero builds have stricter warnings
51591      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51592    else
51593      if test "x$TOOLCHAIN_TYPE" = xclang; then
51594        # Some versions of llvm do not like -Wundef
51595        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51596      fi
51597    fi
51598  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51599    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51600        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51601  fi
51602
51603  # Additional macosx handling
51604  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51605    # Setting these parameters makes it an error to link to macosx APIs that are
51606    # newer than the given OS version and makes the linked binaries compatible
51607    # even if built on a newer version of the OS.
51608    # The expected format is X.Y.Z
51609    MACOSX_VERSION_MIN=10.7.0
51610
51611
51612    # The macro takes the version with no dots, ex: 1070
51613    # Let the flags variables get resolved in make for easier override on make
51614    # command line.
51615    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)"
51616    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51617  fi
51618
51619  # Setup some hard coded includes
51620  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51621      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51622      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51623      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51624      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51625      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51626
51627  # The shared libraries are compiled using the picflag.
51628  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51629      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51630  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51631      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51632
51633  # Executable flags
51634  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51635  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51636
51637
51638
51639
51640
51641
51642  # Setup LDFLAGS et al.
51643  #
51644
51645  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51646    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51647    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51648    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51649    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51650      LDFLAGS_SAFESH="-safeseh"
51651      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51652      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51653      # NOTE: Old build added -machine. Probably not needed.
51654      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51655    else
51656      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51657    fi
51658  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51659      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51660      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51661        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51662        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51663    fi
51664  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51665    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51666    # We have previously set HAS_GNU_HASH if this is the case
51667    if test -n "$HAS_GNU_HASH"; then
51668      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51669      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51670      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51671    fi
51672      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51673        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51674    fi
51675    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51676      # And since we now know that the linker is gnu, then add -z defs, to forbid
51677      # undefined symbols in object files.
51678      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51679      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51680      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51681      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51682      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51683      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51684        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51685      fi
51686      case $DEBUG_LEVEL in
51687        release )
51688          # tell linker to optimize libraries.
51689          # Should this be supplied to the OSS linker as well?
51690          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51691          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51692          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51693          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51694            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51695          fi
51696          ;;
51697        slowdebug )
51698          # Hotspot always let the linker optimize
51699          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51700          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51701            # do relocations at load
51702            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51703            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51704            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51705          fi
51706          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51707            # mark relocations read only
51708            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51709            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51710            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51711          fi
51712          ;;
51713        fastdebug )
51714          # Hotspot always let the linker optimize
51715          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51716          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51717            # mark relocations read only
51718            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51719            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51720            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51721          fi
51722          ;;
51723        * )
51724          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51725          ;;
51726        esac
51727    fi
51728  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51729    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51730    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51731    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51732    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51733    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51734    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51735      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51736    fi
51737  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51738    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51739    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51740    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51741  fi
51742
51743  # Customize LDFLAGS for executables
51744
51745  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51746
51747  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51748    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51749      LDFLAGS_STACK_SIZE=1048576
51750    else
51751      LDFLAGS_STACK_SIZE=327680
51752    fi
51753    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51754  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51755    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51756  fi
51757
51758  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51759
51760  # Customize LDFLAGS for libs
51761  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51762
51763  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51764  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51765    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51766        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51767    OPENJDK_BUILD_JDKLIB_LIBS=""
51768  else
51769    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51770        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51771
51772    if test "xBUILD" = "xTARGET"; then
51773    # On some platforms (mac) the linker warns about non existing -L dirs.
51774    # Add server first if available. Linking aginst client does not always produce the same results.
51775      # Only add client/minimal dir if client/minimal is being built.
51776    # Default to server for other variants.
51777      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51778        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51779      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51780        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51781      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51782        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51783    else
51784        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51785    fi
51786    elif test "xBUILD" = "xBUILD"; then
51787      # When building a buildjdk, it's always only the server variant
51788      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51789          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51790    fi
51791
51792    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51793    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51794      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51795    fi
51796
51797  fi
51798
51799  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51800  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51801    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51802  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51803    # FIXME: This hard-coded path is not really proper.
51804    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51805      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51806    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51807      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51808    fi
51809    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51810        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51811  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51812    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51813  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51814    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51815  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51816    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51817  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51818    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51819        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51820        wsock32.lib winmm.lib version.lib psapi.lib"
51821    fi
51822
51823  # Set OPENJDK_BUILD_JVM_ASFLAGS
51824  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51825    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51826      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51827    fi
51828  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51829    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51830  fi
51831
51832  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848  # Tests are only ever compiled for TARGET
51849  # Flags for compiling test libraries
51850  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51851  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51852
51853  # Flags for compiling test executables
51854  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51855  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51856
51857
51858
51859
51860
51861
51862  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51863  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51864
51865
51866
51867
51868
51869
51870  # Some Zero and Shark settings.
51871  # ZERO_ARCHFLAG tells the compiler which mode to build for
51872  case "${OPENJDK_TARGET_CPU}" in
51873    s390)
51874      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51875      ;;
51876    *)
51877      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51878  esac
51879
51880
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    # Execute function body
51922
51923
51924
51925
51926
51927
51928
51929
51930
51931
51932
51933
51934
51935
51936
51937
51938
51939
51940
51941
51942
51943
51944
51945
51946
51947
51948
51949
51950
51951
51952
51953
51954
51955
51956
51957
51958
51959
51960
51961
51962
51963
51964
51965
51966
51967
51968
51969
51970    # Execute function body
51971
51972  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51973$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51974  supports=yes
51975
51976  saved_cflags="$CFLAGS"
51977  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51978  ac_ext=c
51979ac_cpp='$CPP $CPPFLAGS'
51980ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51981ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51982ac_compiler_gnu=$ac_cv_c_compiler_gnu
51983
51984  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51985/* end confdefs.h.  */
51986int i;
51987_ACEOF
51988if ac_fn_c_try_compile "$LINENO"; then :
51989
51990else
51991  supports=no
51992fi
51993rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51994  ac_ext=cpp
51995ac_cpp='$CXXCPP $CPPFLAGS'
51996ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51997ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51998ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51999
52000  CFLAGS="$saved_cflags"
52001
52002  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52003$as_echo "$supports" >&6; }
52004  if test "x$supports" = "xyes" ; then
52005    :
52006    C_COMP_SUPPORTS="yes"
52007  else
52008    :
52009    C_COMP_SUPPORTS="no"
52010  fi
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021
52022
52023
52024
52025
52026
52027
52028
52029
52030
52031
52032
52033
52034
52035
52036
52037
52038
52039
52040
52041
52042
52043
52044
52045
52046
52047
52048
52049
52050
52051
52052
52053
52054
52055
52056
52057
52058
52059
52060
52061
52062
52063
52064
52065
52066
52067
52068
52069
52070    # Execute function body
52071
52072  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
52073$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
52074  supports=yes
52075
52076  saved_cxxflags="$CXXFLAGS"
52077  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
52078  ac_ext=cpp
52079ac_cpp='$CXXCPP $CPPFLAGS'
52080ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52081ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52082ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52083
52084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52085/* end confdefs.h.  */
52086int i;
52087_ACEOF
52088if ac_fn_cxx_try_compile "$LINENO"; then :
52089
52090else
52091  supports=no
52092fi
52093rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52094  ac_ext=cpp
52095ac_cpp='$CXXCPP $CPPFLAGS'
52096ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52097ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52098ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52099
52100  CXXFLAGS="$saved_cxxflags"
52101
52102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52103$as_echo "$supports" >&6; }
52104  if test "x$supports" = "xyes" ; then
52105    :
52106    CXX_COMP_SUPPORTS="yes"
52107  else
52108    :
52109    CXX_COMP_SUPPORTS="no"
52110  fi
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
52125$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
52126  supports=no
52127  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52128
52129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52130$as_echo "$supports" >&6; }
52131  if test "x$supports" = "xyes" ; then
52132    :
52133
52134  else
52135    :
52136    ZERO_ARCHFLAG=""
52137  fi
52138
52139
52140
52141
52142
52143
52144
52145
52146  # Check that the compiler supports -mX (or -qX on AIX) flags
52147  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170
52171
52172
52173
52174
52175
52176
52177
52178
52179
52180
52181
52182
52183
52184
52185
52186
52187
52188
52189
52190
52191
52192
52193
52194
52195    # Execute function body
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
52238
52239
52240
52241
52242
52243
52244    # Execute function body
52245
52246  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52247$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52248  supports=yes
52249
52250  saved_cflags="$CFLAGS"
52251  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52252  ac_ext=c
52253ac_cpp='$CPP $CPPFLAGS'
52254ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52255ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52256ac_compiler_gnu=$ac_cv_c_compiler_gnu
52257
52258  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52259/* end confdefs.h.  */
52260int i;
52261_ACEOF
52262if ac_fn_c_try_compile "$LINENO"; then :
52263
52264else
52265  supports=no
52266fi
52267rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52268  ac_ext=cpp
52269ac_cpp='$CXXCPP $CPPFLAGS'
52270ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52271ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52272ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52273
52274  CFLAGS="$saved_cflags"
52275
52276  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52277$as_echo "$supports" >&6; }
52278  if test "x$supports" = "xyes" ; then
52279    :
52280    C_COMP_SUPPORTS="yes"
52281  else
52282    :
52283    C_COMP_SUPPORTS="no"
52284  fi
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307
52308
52309
52310
52311
52312
52313
52314
52315
52316
52317
52318
52319
52320
52321
52322
52323
52324
52325
52326
52327
52328
52329
52330
52331
52332
52333
52334
52335
52336
52337
52338
52339
52340
52341
52342
52343
52344    # Execute function body
52345
52346  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52347$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52348  supports=yes
52349
52350  saved_cxxflags="$CXXFLAGS"
52351  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
52352  ac_ext=cpp
52353ac_cpp='$CXXCPP $CPPFLAGS'
52354ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52355ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52356ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52357
52358  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52359/* end confdefs.h.  */
52360int i;
52361_ACEOF
52362if ac_fn_cxx_try_compile "$LINENO"; then :
52363
52364else
52365  supports=no
52366fi
52367rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52368  ac_ext=cpp
52369ac_cpp='$CXXCPP $CPPFLAGS'
52370ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52371ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52372ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52373
52374  CXXFLAGS="$saved_cxxflags"
52375
52376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52377$as_echo "$supports" >&6; }
52378  if test "x$supports" = "xyes" ; then
52379    :
52380    CXX_COMP_SUPPORTS="yes"
52381  else
52382    :
52383    CXX_COMP_SUPPORTS="no"
52384  fi
52385
52386
52387
52388
52389
52390
52391
52392
52393
52394
52395
52396
52397
52398  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
52399$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
52400  supports=no
52401  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52402
52403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52404$as_echo "$supports" >&6; }
52405  if test "x$supports" = "xyes" ; then
52406    :
52407    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
52408  else
52409    :
52410    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
52411  fi
52412
52413
52414
52415
52416
52417
52418
52419
52420  # Check whether --enable-warnings-as-errors was given.
52421if test "${enable_warnings_as_errors+set}" = set; then :
52422  enableval=$enable_warnings_as_errors;
52423fi
52424
52425
52426  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
52427$as_echo_n "checking if native warnings are errors... " >&6; }
52428  if test "x$enable_warnings_as_errors" = "xyes"; then
52429    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
52430$as_echo "yes (explicitely set)" >&6; }
52431    WARNINGS_AS_ERRORS=true
52432  elif test "x$enable_warnings_as_errors" = "xno"; then
52433    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52434$as_echo "no" >&6; }
52435    WARNINGS_AS_ERRORS=false
52436  elif test "x$enable_warnings_as_errors" = "x"; then
52437    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
52438$as_echo "yes (default)" >&6; }
52439    WARNINGS_AS_ERRORS=true
52440  else
52441    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
52442  fi
52443
52444  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
52445    # Set legacy hotspot variable
52446    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
52447  else
52448    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
52449  fi
52450
52451
52452
52453
52454  case "${TOOLCHAIN_TYPE}" in
52455    microsoft)
52456      DISABLE_WARNING_PREFIX="-wd"
52457      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
52458      ;;
52459    solstudio)
52460      DISABLE_WARNING_PREFIX="-erroff="
52461      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
52462      ;;
52463    gcc)
52464      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
52465
52466
52467
52468
52469
52470
52471
52472
52473
52474
52475
52476
52477
52478
52479
52480
52481
52482
52483
52484
52485
52486
52487
52488
52489
52490
52491
52492
52493
52494
52495
52496
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510
52511
52512    # Execute function body
52513
52514
52515
52516
52517
52518
52519
52520
52521
52522
52523
52524
52525
52526
52527
52528
52529
52530
52531
52532
52533
52534
52535
52536
52537
52538
52539
52540
52541
52542
52543
52544
52545
52546
52547
52548
52549
52550
52551
52552
52553
52554
52555
52556
52557
52558
52559
52560
52561    # Execute function body
52562
52563  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52564$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52565  supports=yes
52566
52567  saved_cflags="$CFLAGS"
52568  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52569  ac_ext=c
52570ac_cpp='$CPP $CPPFLAGS'
52571ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52572ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52573ac_compiler_gnu=$ac_cv_c_compiler_gnu
52574
52575  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52576/* end confdefs.h.  */
52577int i;
52578_ACEOF
52579if ac_fn_c_try_compile "$LINENO"; then :
52580
52581else
52582  supports=no
52583fi
52584rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52585  ac_ext=cpp
52586ac_cpp='$CXXCPP $CPPFLAGS'
52587ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52588ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52589ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52590
52591  CFLAGS="$saved_cflags"
52592
52593  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52594$as_echo "$supports" >&6; }
52595  if test "x$supports" = "xyes" ; then
52596    :
52597    C_COMP_SUPPORTS="yes"
52598  else
52599    :
52600    C_COMP_SUPPORTS="no"
52601  fi
52602
52603
52604
52605
52606
52607
52608
52609
52610
52611
52612
52613
52614
52615
52616
52617
52618
52619
52620
52621
52622
52623
52624
52625
52626
52627
52628
52629
52630
52631
52632
52633
52634
52635
52636
52637
52638
52639
52640
52641
52642
52643
52644
52645
52646
52647
52648
52649
52650
52651
52652
52653
52654
52655
52656
52657
52658
52659
52660
52661    # Execute function body
52662
52663  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52664$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52665  supports=yes
52666
52667  saved_cxxflags="$CXXFLAGS"
52668  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52669  ac_ext=cpp
52670ac_cpp='$CXXCPP $CPPFLAGS'
52671ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52672ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52673ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52674
52675  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52676/* end confdefs.h.  */
52677int i;
52678_ACEOF
52679if ac_fn_cxx_try_compile "$LINENO"; then :
52680
52681else
52682  supports=no
52683fi
52684rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52685  ac_ext=cpp
52686ac_cpp='$CXXCPP $CPPFLAGS'
52687ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52688ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52689ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52690
52691  CXXFLAGS="$saved_cxxflags"
52692
52693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52694$as_echo "$supports" >&6; }
52695  if test "x$supports" = "xyes" ; then
52696    :
52697    CXX_COMP_SUPPORTS="yes"
52698  else
52699    :
52700    CXX_COMP_SUPPORTS="no"
52701  fi
52702
52703
52704
52705
52706
52707
52708
52709
52710
52711
52712
52713
52714
52715  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52716$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52717  supports=no
52718  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52719
52720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52721$as_echo "$supports" >&6; }
52722  if test "x$supports" = "xyes" ; then
52723    :
52724    GCC_CAN_DISABLE_WARNINGS=true
52725  else
52726    :
52727    GCC_CAN_DISABLE_WARNINGS=false
52728
52729  fi
52730
52731
52732
52733
52734
52735
52736      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52737        DISABLE_WARNING_PREFIX="-Wno-"
52738      else
52739        DISABLE_WARNING_PREFIX=
52740      fi
52741      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52742      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52743      # CFLAGS since any target specific flags will likely not work with the
52744      # build compiler
52745      CC_OLD="$CC"
52746      CXX_OLD="$CXX"
52747      CC="$BUILD_CC"
52748      CXX="$BUILD_CXX"
52749      CFLAGS_OLD="$CFLAGS"
52750      CFLAGS=""
52751
52752
52753
52754
52755
52756
52757
52758
52759
52760
52761
52762
52763
52764
52765
52766
52767
52768
52769
52770
52771
52772
52773
52774
52775
52776
52777
52778
52779
52780
52781
52782
52783
52784
52785
52786
52787
52788
52789
52790
52791
52792
52793
52794
52795
52796
52797
52798    # Execute function body
52799
52800
52801
52802
52803
52804
52805
52806
52807
52808
52809
52810
52811
52812
52813
52814
52815
52816
52817
52818
52819
52820
52821
52822
52823
52824
52825
52826
52827
52828
52829
52830
52831
52832
52833
52834
52835
52836
52837
52838
52839
52840
52841
52842
52843
52844
52845
52846
52847    # Execute function body
52848
52849  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52850$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52851  supports=yes
52852
52853  saved_cflags="$CFLAGS"
52854  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52855  ac_ext=c
52856ac_cpp='$CPP $CPPFLAGS'
52857ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52858ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52859ac_compiler_gnu=$ac_cv_c_compiler_gnu
52860
52861  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52862/* end confdefs.h.  */
52863int i;
52864_ACEOF
52865if ac_fn_c_try_compile "$LINENO"; then :
52866
52867else
52868  supports=no
52869fi
52870rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52871  ac_ext=cpp
52872ac_cpp='$CXXCPP $CPPFLAGS'
52873ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52874ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52875ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52876
52877  CFLAGS="$saved_cflags"
52878
52879  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52880$as_echo "$supports" >&6; }
52881  if test "x$supports" = "xyes" ; then
52882    :
52883    C_COMP_SUPPORTS="yes"
52884  else
52885    :
52886    C_COMP_SUPPORTS="no"
52887  fi
52888
52889
52890
52891
52892
52893
52894
52895
52896
52897
52898
52899
52900
52901
52902
52903
52904
52905
52906
52907
52908
52909
52910
52911
52912
52913
52914
52915
52916
52917
52918
52919
52920
52921
52922
52923
52924
52925
52926
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936
52937
52938
52939
52940
52941
52942
52943
52944
52945
52946
52947    # Execute function body
52948
52949  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52950$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52951  supports=yes
52952
52953  saved_cxxflags="$CXXFLAGS"
52954  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52955  ac_ext=cpp
52956ac_cpp='$CXXCPP $CPPFLAGS'
52957ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52958ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52959ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52960
52961  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52962/* end confdefs.h.  */
52963int i;
52964_ACEOF
52965if ac_fn_cxx_try_compile "$LINENO"; then :
52966
52967else
52968  supports=no
52969fi
52970rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52971  ac_ext=cpp
52972ac_cpp='$CXXCPP $CPPFLAGS'
52973ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52974ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52975ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52976
52977  CXXFLAGS="$saved_cxxflags"
52978
52979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52980$as_echo "$supports" >&6; }
52981  if test "x$supports" = "xyes" ; then
52982    :
52983    CXX_COMP_SUPPORTS="yes"
52984  else
52985    :
52986    CXX_COMP_SUPPORTS="no"
52987  fi
52988
52989
52990
52991
52992
52993
52994
52995
52996
52997
52998
52999
53000
53001  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
53002$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
53003  supports=no
53004  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
53005
53006  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
53007$as_echo "$supports" >&6; }
53008  if test "x$supports" = "xyes" ; then
53009    :
53010    BUILD_CC_CAN_DISABLE_WARNINGS=true
53011  else
53012    :
53013    BUILD_CC_CAN_DISABLE_WARNINGS=false
53014
53015  fi
53016
53017
53018
53019
53020
53021
53022      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
53023        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
53024      else
53025        BUILD_CC_DISABLE_WARNING_PREFIX=
53026      fi
53027      CC="$CC_OLD"
53028      CXX="$CXX_OLD"
53029      CFLAGS="$CFLAGS_OLD"
53030      ;;
53031    clang)
53032      DISABLE_WARNING_PREFIX="-Wno-"
53033      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
53034      ;;
53035    xlc)
53036      DISABLE_WARNING_PREFIX="-qsuppress="
53037      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
53038      ;;
53039  esac
53040
53041
53042
53043
53044
53045# Setup debug symbols (need objcopy from the toolchain for that)
53046
53047  #
53048  # NATIVE_DEBUG_SYMBOLS
53049  # This must be done after the toolchain is setup, since we're looking at objcopy.
53050  #
53051  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
53052$as_echo_n "checking what type of native debug symbols to use... " >&6; }
53053
53054# Check whether --with-native-debug-symbols was given.
53055if test "${with_native_debug_symbols+set}" = set; then :
53056  withval=$with_native_debug_symbols;
53057        if test "x$OPENJDK_TARGET_OS" = xaix; then
53058          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
53059            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
53060          fi
53061        fi
53062
53063else
53064
53065        if test "x$OPENJDK_TARGET_OS" = xaix; then
53066          # AIX doesn't support 'zipped' so use 'internal' as default
53067          with_native_debug_symbols="internal"
53068        else
53069          if test "x$STATIC_BUILD" = xtrue; then
53070            with_native_debug_symbols="none"
53071          else
53072            with_native_debug_symbols="zipped"
53073          fi
53074        fi
53075
53076fi
53077
53078  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
53079  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
53080$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
53081
53082  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
53083
53084    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53085      if test "x$OBJCOPY" = x; then
53086        # enabling of enable-debug-symbols and can't find objcopy
53087        # this is an error
53088        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53089      fi
53090    fi
53091
53092    COMPILE_WITH_DEBUG_SYMBOLS=true
53093    COPY_DEBUG_SYMBOLS=true
53094    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
53095
53096    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53097    DEBUG_BINARIES=false
53098    STRIP_POLICY=min_strip
53099
53100  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
53101    COMPILE_WITH_DEBUG_SYMBOLS=false
53102    COPY_DEBUG_SYMBOLS=false
53103    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53104
53105    DEBUG_BINARIES=false
53106    STRIP_POLICY=no_strip
53107  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
53108    COMPILE_WITH_DEBUG_SYMBOLS=true
53109    COPY_DEBUG_SYMBOLS=false
53110    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53111
53112    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
53113    DEBUG_BINARIES=true
53114    STRIP_POLICY=no_strip
53115    STRIP=""
53116
53117  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
53118
53119    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
53120      if test "x$OBJCOPY" = x; then
53121        # enabling of enable-debug-symbols and can't find objcopy
53122        # this is an error
53123        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
53124      fi
53125    fi
53126
53127    COMPILE_WITH_DEBUG_SYMBOLS=true
53128    COPY_DEBUG_SYMBOLS=true
53129    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
53130
53131    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
53132    DEBUG_BINARIES=false
53133    STRIP_POLICY=min_strip
53134  else
53135    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
53136  fi
53137
53138  # --enable-debug-symbols is deprecated.
53139  # Please use --with-native-debug-symbols=[internal,external,zipped] .
53140
53141  # Check whether --enable-debug-symbols was given.
53142if test "${enable_debug_symbols+set}" = set; then :
53143  enableval=$enable_debug_symbols;
53144fi
53145
53146  if test "x$enable_debug_symbols" != x; then
53147    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
53148$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
53149
53150    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
53151      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
53152$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
53153    fi
53154
53155  fi
53156
53157
53158  # --enable-zip-debug-info is deprecated.
53159  # Please use --with-native-debug-symbols=zipped .
53160
53161  # Check whether --enable-zip-debug-info was given.
53162if test "${enable_zip_debug_info+set}" = set; then :
53163  enableval=$enable_zip_debug_info;
53164fi
53165
53166  if test "x$enable_zip_debug_info" != x; then
53167    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
53168$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
53169
53170    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
53171      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
53172$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
53173    fi
53174
53175  fi
53176
53177
53178
53179
53180
53181
53182  # Legacy values
53183
53184
53185
53186
53187  # Check whether --enable-native-coverage was given.
53188if test "${enable_native_coverage+set}" = set; then :
53189  enableval=$enable_native_coverage;
53190fi
53191
53192  GCOV_ENABLED="false"
53193  if test "x$enable_native_coverage" = "xyes"; then
53194    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
53195      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53196$as_echo_n "checking if native coverage is enabled... " >&6; }
53197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53198$as_echo "yes" >&6; }
53199      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
53200      GCOV_LDFLAGS="-fprofile-arcs"
53201      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
53202      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
53203      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
53204      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
53205      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
53206      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
53207      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
53208      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
53209      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
53210      GCOV_ENABLED="true"
53211    else
53212      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
53213    fi
53214  elif test "x$enable_native_coverage" = "xno"; then
53215    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
53216$as_echo_n "checking if native coverage is enabled... " >&6; }
53217    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53218$as_echo "no" >&6; }
53219  elif test "x$enable_native_coverage" != "x"; then
53220    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
53221  fi
53222
53223
53224
53225
53226# Need toolchain to setup dtrace
53227
53228  # Test for dtrace dependencies
53229  # Check whether --enable-dtrace was given.
53230if test "${enable_dtrace+set}" = set; then :
53231  enableval=$enable_dtrace;
53232fi
53233
53234
53235  DTRACE_DEP_MISSING=false
53236
53237  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
53238$as_echo_n "checking for dtrace tool... " >&6; }
53239  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
53240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
53241$as_echo "$DTRACE" >&6; }
53242  else
53243    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
53244$as_echo "not found, cannot build dtrace" >&6; }
53245    DTRACE_DEP_MISSING=true
53246  fi
53247
53248  for ac_header in sys/sdt.h
53249do :
53250  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
53251if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
53252  cat >>confdefs.h <<_ACEOF
53253#define HAVE_SYS_SDT_H 1
53254_ACEOF
53255 DTRACE_HEADERS_OK=yes
53256else
53257  DTRACE_HEADERS_OK=no
53258fi
53259
53260done
53261
53262  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
53263    DTRACE_DEP_MISSING=true
53264  fi
53265
53266  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
53267$as_echo_n "checking if dtrace should be built... " >&6; }
53268  if test "x$enable_dtrace" = "xyes"; then
53269    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53270      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53271$as_echo "no, missing dependencies" >&6; }
53272
53273  # Print a helpful message on how to acquire the necessary build dependency.
53274  # dtrace is the help tag: freetype, cups, alsa etc
53275  MISSING_DEPENDENCY=dtrace
53276
53277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53278    cygwin_help $MISSING_DEPENDENCY
53279  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53280    msys_help $MISSING_DEPENDENCY
53281  else
53282    PKGHANDLER_COMMAND=
53283
53284    case $PKGHANDLER in
53285      apt-get)
53286        apt_help     $MISSING_DEPENDENCY ;;
53287      yum)
53288        yum_help     $MISSING_DEPENDENCY ;;
53289      port)
53290        port_help    $MISSING_DEPENDENCY ;;
53291      pkgutil)
53292        pkgutil_help $MISSING_DEPENDENCY ;;
53293      pkgadd)
53294        pkgadd_help  $MISSING_DEPENDENCY ;;
53295    esac
53296
53297    if test "x$PKGHANDLER_COMMAND" != x; then
53298      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
53299    fi
53300  fi
53301
53302      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
53303    else
53304      INCLUDE_DTRACE=true
53305      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53306$as_echo "yes, forced" >&6; }
53307    fi
53308  elif test "x$enable_dtrace" = "xno"; then
53309    INCLUDE_DTRACE=false
53310    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53311$as_echo "no, forced" >&6; }
53312  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
53313    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
53314      INCLUDE_DTRACE=false
53315      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
53316$as_echo "no, non-open linux build" >&6; }
53317    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
53318      INCLUDE_DTRACE=false
53319      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
53320$as_echo "no, missing dependencies" >&6; }
53321    else
53322      INCLUDE_DTRACE=true
53323      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
53324$as_echo "yes, dependencies present" >&6; }
53325    fi
53326  else
53327    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
53328  fi
53329
53330
53331
53332  # The user can in some cases supply additional jvm features. For the custom
53333  # variant, this defines the entire variant.
53334
53335# Check whether --with-jvm-features was given.
53336if test "${with_jvm_features+set}" = set; then :
53337  withval=$with_jvm_features;
53338fi
53339
53340  if test "x$with_jvm_features" != x; then
53341    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
53342$as_echo_n "checking additional JVM features... " >&6; }
53343    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
53344    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
53345$as_echo "$JVM_FEATURES" >&6; }
53346  fi
53347
53348  # Verify that dependencies are met for explicitly set features.
53349  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
53350    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
53351  fi
53352
53353  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
53354    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
53355  fi
53356
53357  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && ! (  [[ " $JVM_FEATURES " =~ " compiler1 " ]]   ||   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ); then
53358    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2' or 'compiler1'" "$LINENO" 5
53359  fi
53360
53361  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53362    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
53363  fi
53364
53365  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
53366    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
53367  fi
53368
53369  # Turn on additional features based on other parts of configure
53370  if test "x$INCLUDE_DTRACE" = "xtrue"; then
53371    JVM_FEATURES="$JVM_FEATURES dtrace"
53372  else
53373    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
53374      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
53375    fi
53376  fi
53377
53378  if test "x$STATIC_BUILD" = "xtrue"; then
53379    JVM_FEATURES="$JVM_FEATURES static-build"
53380  else
53381    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
53382      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
53383    fi
53384  fi
53385
53386  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53387    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
53388      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
53389    fi
53390  fi
53391
53392  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53393    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
53394      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
53395    fi
53396  fi
53397
53398  # Only enable jvmci on x86_64, sparcv9 and aarch64.
53399  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
53400      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
53401      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
53402    JVM_FEATURES_jvmci="jvmci"
53403  else
53404    JVM_FEATURES_jvmci=""
53405  fi
53406
53407  # All variants but minimal (and custom) get these features
53408  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
53409
53410  # Enable features depending on variant.
53411  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53412  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
53413  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
53414  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
53415  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
53416  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
53417  JVM_FEATURES_custom="$JVM_FEATURES"
53418
53419
53420
53421
53422
53423
53424
53425
53426
53427  # Used for verification of Makefiles by check-jvm-feature
53428
53429
53430  # We don't support --with-jvm-interpreter anymore, use zero instead.
53431
53432
53433# Check whether --with-jvm-interpreter was given.
53434if test "${with_jvm_interpreter+set}" = set; then :
53435  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
53436$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
53437fi
53438
53439
53440
53441
53442  # Check whether --enable-hotspot-gtest was given.
53443if test "${enable_hotspot_gtest+set}" = set; then :
53444  enableval=$enable_hotspot_gtest;
53445fi
53446
53447
53448  if test -e "$HOTSPOT_TOPDIR/test/native"; then
53449    GTEST_DIR_EXISTS="true"
53450  else
53451    GTEST_DIR_EXISTS="false"
53452  fi
53453
53454  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Hotspot gtest unit tests should be built" >&5
53455$as_echo_n "checking if Hotspot gtest unit tests should be built... " >&6; }
53456  if test "x$enable_hotspot_gtest" = "xyes"; then
53457    if test "x$GTEST_DIR_EXISTS" = "xtrue"; then
53458      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
53459$as_echo "yes, forced" >&6; }
53460      BUILD_GTEST="true"
53461    else
53462      as_fn_error $? "Cannot build gtest without the test source" "$LINENO" 5
53463    fi
53464  elif test "x$enable_hotspot_gtest" = "xno"; then
53465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
53466$as_echo "no, forced" >&6; }
53467    BUILD_GTEST="false"
53468  elif test "x$enable_hotspot_gtest" = "x"; then
53469    if test "x$GTEST_DIR_EXISTS" = "xtrue" && test "x$OPENJDK_TARGET_OS" != "xaix"; then
53470      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53471$as_echo "yes" >&6; }
53472      BUILD_GTEST="true"
53473    else
53474      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53475$as_echo "no" >&6; }
53476      BUILD_GTEST="false"
53477    fi
53478  else
53479    as_fn_error $? "--enable-gtest must be either yes or no" "$LINENO" 5
53480  fi
53481
53482
53483
53484
53485###############################################################################
53486#
53487# Check dependencies for external and internal libraries.
53488#
53489###############################################################################
53490
53491# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
53492
53493  # When using cygwin or msys, we need a wrapper binary that renames
53494  # /cygdrive/c/ arguments into c:/ arguments and peeks into
53495  # @files and rewrites these too! This wrapper binary is
53496  # called fixpath.
53497  FIXPATH=
53498  if test "x$OPENJDK_BUILD_OS" = xwindows; then
53499    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
53500$as_echo_n "checking if fixpath can be created... " >&6; }
53501    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
53502    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
53503    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
53504    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
53505      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
53506      FIXPATH="$FIXPATH_BIN -c"
53507    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
53508      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
53509      # @ was chosen as separator to minimize risk of other tools messing around with it
53510      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
53511          | tr ' ' '\n' | $GREP '^/./' | $SORT | $UNIQ`
53512      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
53513      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
53514    fi
53515    FIXPATH_SRC_W="$FIXPATH_SRC"
53516    FIXPATH_BIN_W="$FIXPATH_BIN"
53517
53518  unix_path="$FIXPATH_SRC_W"
53519  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53520    windows_path=`$CYGPATH -m "$unix_path"`
53521    FIXPATH_SRC_W="$windows_path"
53522  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53523    windows_path=`cmd //c echo $unix_path`
53524    FIXPATH_SRC_W="$windows_path"
53525  fi
53526
53527
53528  unix_path="$FIXPATH_BIN_W"
53529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53530    windows_path=`$CYGPATH -m "$unix_path"`
53531    FIXPATH_BIN_W="$windows_path"
53532  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53533    windows_path=`cmd //c echo $unix_path`
53534    FIXPATH_BIN_W="$windows_path"
53535  fi
53536
53537    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53538    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53539    cd $FIXPATH_DIR
53540    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53541    cd $CURDIR
53542
53543    if test ! -x $FIXPATH_BIN; then
53544      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53545$as_echo "no" >&6; }
53546      cat $FIXPATH_DIR/fixpath1.log
53547      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53548    fi
53549    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53550$as_echo "yes" >&6; }
53551    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53552$as_echo_n "checking if fixpath.exe works... " >&6; }
53553    cd $FIXPATH_DIR
53554    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53555        > $FIXPATH_DIR/fixpath2.log 2>&1
53556    cd $CURDIR
53557    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53558      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53559$as_echo "no" >&6; }
53560      cat $FIXPATH_DIR/fixpath2.log
53561      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53562    fi
53563    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53564$as_echo "yes" >&6; }
53565
53566    FIXPATH_DETACH_FLAG="--detach"
53567  fi
53568
53569
53570
53571
53572
53573
53574  # Check if X11 is needed
53575  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53576    # No X11 support on windows or macosx
53577    NEEDS_LIB_X11=false
53578  else
53579    if test "x$SUPPORT_HEADFUL" = xno; then
53580      # No X11 support if building headless-only
53581      NEEDS_LIB_X11=false
53582    else
53583      # All other instances need X11
53584      NEEDS_LIB_X11=true
53585    fi
53586  fi
53587
53588  # Check if cups is needed
53589  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53590    # Windows have a separate print system
53591    NEEDS_LIB_CUPS=false
53592  else
53593    NEEDS_LIB_CUPS=true
53594  fi
53595
53596  # Check if freetype is needed
53597  if test "x$OPENJDK" = "xtrue"; then
53598    NEEDS_LIB_FREETYPE=true
53599  else
53600    NEEDS_LIB_FREETYPE=false
53601  fi
53602
53603  # Check if alsa is needed
53604  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53605    NEEDS_LIB_ALSA=true
53606  else
53607    NEEDS_LIB_ALSA=false
53608  fi
53609
53610  # Check if ffi is needed
53611  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53612    NEEDS_LIB_FFI=true
53613  else
53614    NEEDS_LIB_FFI=false
53615  fi
53616
53617
53618  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53619  # dynamic build is configured on command line.
53620
53621# Check whether --with-stdc++lib was given.
53622if test "${with_stdc__lib+set}" = set; then :
53623  withval=$with_stdc__lib;
53624        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53625                && test "x$with_stdc__lib" != xdefault; then
53626          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53627        fi
53628
53629else
53630  with_stdc__lib=default
53631
53632fi
53633
53634
53635  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53636    # Test if -lstdc++ works.
53637    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53638$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53639    ac_ext=cpp
53640ac_cpp='$CXXCPP $CPPFLAGS'
53641ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53642ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53643ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53644
53645    OLD_CXXFLAGS="$CXXFLAGS"
53646    CXXFLAGS="$CXXFLAGS -lstdc++"
53647    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53648/* end confdefs.h.  */
53649
53650int
53651main ()
53652{
53653return 0;
53654  ;
53655  return 0;
53656}
53657_ACEOF
53658if ac_fn_cxx_try_link "$LINENO"; then :
53659  has_dynamic_libstdcxx=yes
53660else
53661  has_dynamic_libstdcxx=no
53662fi
53663rm -f core conftest.err conftest.$ac_objext \
53664    conftest$ac_exeext conftest.$ac_ext
53665    CXXFLAGS="$OLD_CXXFLAGS"
53666    ac_ext=cpp
53667ac_cpp='$CXXCPP $CPPFLAGS'
53668ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53669ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53670ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53671
53672    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53673$as_echo "$has_dynamic_libstdcxx" >&6; }
53674
53675    # Test if stdc++ can be linked statically.
53676    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53677$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53678    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53679    ac_ext=cpp
53680ac_cpp='$CXXCPP $CPPFLAGS'
53681ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53682ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53683ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53684
53685    OLD_LIBS="$LIBS"
53686    OLD_CXX="$CXX"
53687    LIBS="$STATIC_STDCXX_FLAGS"
53688    CXX="$CC"
53689    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53690/* end confdefs.h.  */
53691
53692int
53693main ()
53694{
53695return 0;
53696  ;
53697  return 0;
53698}
53699_ACEOF
53700if ac_fn_cxx_try_link "$LINENO"; then :
53701  has_static_libstdcxx=yes
53702else
53703  has_static_libstdcxx=no
53704fi
53705rm -f core conftest.err conftest.$ac_objext \
53706    conftest$ac_exeext conftest.$ac_ext
53707    LIBS="$OLD_LIBS"
53708    CXX="$OLD_CXX"
53709    ac_ext=cpp
53710ac_cpp='$CXXCPP $CPPFLAGS'
53711ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53712ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53713ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53714
53715    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53716$as_echo "$has_static_libstdcxx" >&6; }
53717
53718    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53719      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53720    fi
53721
53722    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53723      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53724    fi
53725
53726    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53727      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53728    fi
53729
53730    # If dynamic was requested, it's available since it would fail above otherwise.
53731    # If dynamic wasn't requested, go with static unless it isn't available.
53732    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53733$as_echo_n "checking how to link with libstdc++... " >&6; }
53734    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53735      LIBCXX="$LIBCXX -lstdc++"
53736      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53737      JVM_LIBS="-lstdc++ $JVM_LIBS"
53738      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53739      # just use the same setting as for the TARGET toolchain.
53740      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53741      LDCXX="$CXX"
53742      STATIC_CXX_SETTING="STATIC_CXX=false"
53743      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53744$as_echo "dynamic" >&6; }
53745    else
53746      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53747      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53748      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53749      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53750      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53751      # just use the same setting as for the TARGET toolchain.
53752      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53753      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53754      LDCXX="$CC"
53755      STATIC_CXX_SETTING="STATIC_CXX=true"
53756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53757$as_echo "static" >&6; }
53758    fi
53759  fi
53760
53761
53762  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53763  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53764    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53765  fi
53766
53767  # TODO better (platform agnostic) test
53768  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53769    LIBCXX="-lstdc++"
53770  fi
53771
53772
53773  # Setup Windows runtime dlls
53774  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53775
53776
53777# Check whether --with-msvcr-dll was given.
53778if test "${with_msvcr_dll+set}" = set; then :
53779  withval=$with_msvcr_dll;
53780fi
53781
53782
53783  if test "x$with_msvcr_dll" != x; then
53784    # If given explicitely by user, do not probe. If not present, fail directly.
53785
53786  DLL_NAME="$MSVCR_NAME"
53787  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53788  METHOD="--with-msvcr-dll"
53789  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53790    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53791$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53792
53793    # Need to check if the found msvcr is correct architecture
53794    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53795$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53796    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53797    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53798      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53799      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53800      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53801        CORRECT_MSVCR_ARCH="PE32 executable"
53802      else
53803        CORRECT_MSVCR_ARCH="PE32+ executable"
53804      fi
53805    else
53806      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53807        CORRECT_MSVCR_ARCH=386
53808      else
53809        CORRECT_MSVCR_ARCH=x86-64
53810      fi
53811    fi
53812    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53814$as_echo "ok" >&6; }
53815      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53816
53817  # Only process if variable expands to non-empty
53818
53819  if test "x$MSVC_DLL" != x; then
53820    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53821
53822  # Input might be given as Windows format, start by converting to
53823  # unix format.
53824  path="$MSVC_DLL"
53825  new_path=`$CYGPATH -u "$path"`
53826
53827  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53828  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53829  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53830  # "foo.exe" is OK but "foo" is an error.
53831  #
53832  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53833  # It is also a way to make sure we got the proper file name for the real test later on.
53834  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53835  if test "x$test_shortpath" = x; then
53836    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53837$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53838    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53839  fi
53840
53841  # Call helper function which possibly converts this using DOS-style short mode.
53842  # If so, the updated path is stored in $new_path.
53843
53844  input_path="$new_path"
53845  # Check if we need to convert this using DOS-style short mode. If the path
53846  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53847  # take no chances and rewrite it.
53848  # Note: m4 eats our [], so we need to use [ and ] instead.
53849  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53850  if test "x$has_forbidden_chars" != x; then
53851    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53852    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53853    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53854    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53855      # Going to short mode and back again did indeed matter. Since short mode is
53856      # case insensitive, let's make it lowercase to improve readability.
53857      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53858      # Now convert it back to Unix-style (cygpath)
53859      input_path=`$CYGPATH -u "$shortmode_path"`
53860      new_path="$input_path"
53861    fi
53862  fi
53863
53864  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53865  if test "x$test_cygdrive_prefix" = x; then
53866    # As a simple fix, exclude /usr/bin since it's not a real path.
53867    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53868      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53869      # a path prefixed by /cygdrive for fixpath to work.
53870      new_path="$CYGWIN_ROOT_PATH$input_path"
53871    fi
53872  fi
53873
53874
53875  if test "x$path" != "x$new_path"; then
53876    MSVC_DLL="$new_path"
53877    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53878$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53879  fi
53880
53881    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53882
53883  path="$MSVC_DLL"
53884  has_colon=`$ECHO $path | $GREP ^.:`
53885  new_path="$path"
53886  if test "x$has_colon" = x; then
53887    # Not in mixed or Windows style, start by that.
53888    new_path=`cmd //c echo $path`
53889  fi
53890
53891
53892  input_path="$new_path"
53893  # Check if we need to convert this using DOS-style short mode. If the path
53894  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53895  # take no chances and rewrite it.
53896  # Note: m4 eats our [], so we need to use [ and ] instead.
53897  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53898  if test "x$has_forbidden_chars" != x; then
53899    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53900    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53901  fi
53902
53903
53904  windows_path="$new_path"
53905  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53906    unix_path=`$CYGPATH -u "$windows_path"`
53907    new_path="$unix_path"
53908  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53909    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53910    new_path="$unix_path"
53911  fi
53912
53913  if test "x$path" != "x$new_path"; then
53914    MSVC_DLL="$new_path"
53915    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53916$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53917  fi
53918
53919  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53920  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53921
53922    else
53923      # We're on a unix platform. Hooray! :)
53924      path="$MSVC_DLL"
53925      has_space=`$ECHO "$path" | $GREP " "`
53926      if test "x$has_space" != x; then
53927        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53928$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53929        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53930      fi
53931
53932      # Use eval to expand a potential ~
53933      eval path="$path"
53934      if test ! -f "$path" && test ! -d "$path"; then
53935        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53936      fi
53937
53938      if test -d "$path"; then
53939        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53940      else
53941        dir="`$DIRNAME "$path"`"
53942        base="`$BASENAME "$path"`"
53943        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53944      fi
53945    fi
53946  fi
53947
53948      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53949$as_echo_n "checking for $DLL_NAME... " >&6; }
53950      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53951$as_echo "$MSVC_DLL" >&6; }
53952    else
53953      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53954$as_echo "incorrect, ignoring" >&6; }
53955      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53956$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53957    fi
53958  fi
53959
53960    if test "x$MSVC_DLL" = x; then
53961      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53962    fi
53963    MSVCR_DLL="$MSVC_DLL"
53964  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53965
53966  DLL_NAME="$MSVCR_NAME"
53967  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53968  METHOD="devkit"
53969  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53970    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53971$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53972
53973    # Need to check if the found msvcr is correct architecture
53974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53975$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53976    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53977    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53978      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53979      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53980      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53981        CORRECT_MSVCR_ARCH="PE32 executable"
53982      else
53983        CORRECT_MSVCR_ARCH="PE32+ executable"
53984      fi
53985    else
53986      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53987        CORRECT_MSVCR_ARCH=386
53988      else
53989        CORRECT_MSVCR_ARCH=x86-64
53990      fi
53991    fi
53992    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53993      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53994$as_echo "ok" >&6; }
53995      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53996
53997  # Only process if variable expands to non-empty
53998
53999  if test "x$MSVC_DLL" != x; then
54000    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54001
54002  # Input might be given as Windows format, start by converting to
54003  # unix format.
54004  path="$MSVC_DLL"
54005  new_path=`$CYGPATH -u "$path"`
54006
54007  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54008  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54009  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54010  # "foo.exe" is OK but "foo" is an error.
54011  #
54012  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54013  # It is also a way to make sure we got the proper file name for the real test later on.
54014  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54015  if test "x$test_shortpath" = x; then
54016    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54017$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54018    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54019  fi
54020
54021  # Call helper function which possibly converts this using DOS-style short mode.
54022  # If so, the updated path is stored in $new_path.
54023
54024  input_path="$new_path"
54025  # Check if we need to convert this using DOS-style short mode. If the path
54026  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54027  # take no chances and rewrite it.
54028  # Note: m4 eats our [], so we need to use [ and ] instead.
54029  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54030  if test "x$has_forbidden_chars" != x; then
54031    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54032    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54033    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54034    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54035      # Going to short mode and back again did indeed matter. Since short mode is
54036      # case insensitive, let's make it lowercase to improve readability.
54037      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54038      # Now convert it back to Unix-style (cygpath)
54039      input_path=`$CYGPATH -u "$shortmode_path"`
54040      new_path="$input_path"
54041    fi
54042  fi
54043
54044  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54045  if test "x$test_cygdrive_prefix" = x; then
54046    # As a simple fix, exclude /usr/bin since it's not a real path.
54047    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54048      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54049      # a path prefixed by /cygdrive for fixpath to work.
54050      new_path="$CYGWIN_ROOT_PATH$input_path"
54051    fi
54052  fi
54053
54054
54055  if test "x$path" != "x$new_path"; then
54056    MSVC_DLL="$new_path"
54057    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54058$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54059  fi
54060
54061    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54062
54063  path="$MSVC_DLL"
54064  has_colon=`$ECHO $path | $GREP ^.:`
54065  new_path="$path"
54066  if test "x$has_colon" = x; then
54067    # Not in mixed or Windows style, start by that.
54068    new_path=`cmd //c echo $path`
54069  fi
54070
54071
54072  input_path="$new_path"
54073  # Check if we need to convert this using DOS-style short mode. If the path
54074  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54075  # take no chances and rewrite it.
54076  # Note: m4 eats our [], so we need to use [ and ] instead.
54077  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54078  if test "x$has_forbidden_chars" != x; then
54079    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54080    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54081  fi
54082
54083
54084  windows_path="$new_path"
54085  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54086    unix_path=`$CYGPATH -u "$windows_path"`
54087    new_path="$unix_path"
54088  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54089    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54090    new_path="$unix_path"
54091  fi
54092
54093  if test "x$path" != "x$new_path"; then
54094    MSVC_DLL="$new_path"
54095    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54096$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54097  fi
54098
54099  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54100  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54101
54102    else
54103      # We're on a unix platform. Hooray! :)
54104      path="$MSVC_DLL"
54105      has_space=`$ECHO "$path" | $GREP " "`
54106      if test "x$has_space" != x; then
54107        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54108$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54109        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54110      fi
54111
54112      # Use eval to expand a potential ~
54113      eval path="$path"
54114      if test ! -f "$path" && test ! -d "$path"; then
54115        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54116      fi
54117
54118      if test -d "$path"; then
54119        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54120      else
54121        dir="`$DIRNAME "$path"`"
54122        base="`$BASENAME "$path"`"
54123        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54124      fi
54125    fi
54126  fi
54127
54128      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54129$as_echo_n "checking for $DLL_NAME... " >&6; }
54130      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54131$as_echo "$MSVC_DLL" >&6; }
54132    else
54133      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54134$as_echo "incorrect, ignoring" >&6; }
54135      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54136$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54137    fi
54138  fi
54139
54140    if test "x$MSVC_DLL" = x; then
54141      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
54142    fi
54143    MSVCR_DLL="$MSVC_DLL"
54144  else
54145
54146  DLL_NAME="${MSVCR_NAME}"
54147  MSVC_DLL=
54148
54149  if test "x$MSVC_DLL" = x; then
54150    # Probe: Using well-known location from Visual Studio 10.0
54151    if test "x$VCINSTALLDIR" != x; then
54152      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54153
54154  windows_path="$CYGWIN_VC_INSTALL_DIR"
54155  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54156    unix_path=`$CYGPATH -u "$windows_path"`
54157    CYGWIN_VC_INSTALL_DIR="$unix_path"
54158  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54159    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54160    CYGWIN_VC_INSTALL_DIR="$unix_path"
54161  fi
54162
54163      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54164        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54165      else
54166        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54167      fi
54168      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54169
54170  DLL_NAME="$DLL_NAME"
54171  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54172  METHOD="well-known location in VCINSTALLDIR"
54173  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54174    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54175$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54176
54177    # Need to check if the found msvcr is correct architecture
54178    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54179$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54180    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54181    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54182      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54183      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54184      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54185        CORRECT_MSVCR_ARCH="PE32 executable"
54186      else
54187        CORRECT_MSVCR_ARCH="PE32+ executable"
54188      fi
54189    else
54190      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54191        CORRECT_MSVCR_ARCH=386
54192      else
54193        CORRECT_MSVCR_ARCH=x86-64
54194      fi
54195    fi
54196    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54197      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54198$as_echo "ok" >&6; }
54199      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54200
54201  # Only process if variable expands to non-empty
54202
54203  if test "x$MSVC_DLL" != x; then
54204    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54205
54206  # Input might be given as Windows format, start by converting to
54207  # unix format.
54208  path="$MSVC_DLL"
54209  new_path=`$CYGPATH -u "$path"`
54210
54211  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54212  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54213  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54214  # "foo.exe" is OK but "foo" is an error.
54215  #
54216  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54217  # It is also a way to make sure we got the proper file name for the real test later on.
54218  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54219  if test "x$test_shortpath" = x; then
54220    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54221$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54222    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54223  fi
54224
54225  # Call helper function which possibly converts this using DOS-style short mode.
54226  # If so, the updated path is stored in $new_path.
54227
54228  input_path="$new_path"
54229  # Check if we need to convert this using DOS-style short mode. If the path
54230  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54231  # take no chances and rewrite it.
54232  # Note: m4 eats our [], so we need to use [ and ] instead.
54233  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54234  if test "x$has_forbidden_chars" != x; then
54235    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54236    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54237    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54238    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54239      # Going to short mode and back again did indeed matter. Since short mode is
54240      # case insensitive, let's make it lowercase to improve readability.
54241      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54242      # Now convert it back to Unix-style (cygpath)
54243      input_path=`$CYGPATH -u "$shortmode_path"`
54244      new_path="$input_path"
54245    fi
54246  fi
54247
54248  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54249  if test "x$test_cygdrive_prefix" = x; then
54250    # As a simple fix, exclude /usr/bin since it's not a real path.
54251    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54252      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54253      # a path prefixed by /cygdrive for fixpath to work.
54254      new_path="$CYGWIN_ROOT_PATH$input_path"
54255    fi
54256  fi
54257
54258
54259  if test "x$path" != "x$new_path"; then
54260    MSVC_DLL="$new_path"
54261    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54262$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54263  fi
54264
54265    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54266
54267  path="$MSVC_DLL"
54268  has_colon=`$ECHO $path | $GREP ^.:`
54269  new_path="$path"
54270  if test "x$has_colon" = x; then
54271    # Not in mixed or Windows style, start by that.
54272    new_path=`cmd //c echo $path`
54273  fi
54274
54275
54276  input_path="$new_path"
54277  # Check if we need to convert this using DOS-style short mode. If the path
54278  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54279  # take no chances and rewrite it.
54280  # Note: m4 eats our [], so we need to use [ and ] instead.
54281  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54282  if test "x$has_forbidden_chars" != x; then
54283    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54284    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54285  fi
54286
54287
54288  windows_path="$new_path"
54289  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54290    unix_path=`$CYGPATH -u "$windows_path"`
54291    new_path="$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    new_path="$unix_path"
54295  fi
54296
54297  if test "x$path" != "x$new_path"; then
54298    MSVC_DLL="$new_path"
54299    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54300$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54301  fi
54302
54303  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54304  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54305
54306    else
54307      # We're on a unix platform. Hooray! :)
54308      path="$MSVC_DLL"
54309      has_space=`$ECHO "$path" | $GREP " "`
54310      if test "x$has_space" != x; then
54311        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54312$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54313        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54314      fi
54315
54316      # Use eval to expand a potential ~
54317      eval path="$path"
54318      if test ! -f "$path" && test ! -d "$path"; then
54319        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54320      fi
54321
54322      if test -d "$path"; then
54323        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54324      else
54325        dir="`$DIRNAME "$path"`"
54326        base="`$BASENAME "$path"`"
54327        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54328      fi
54329    fi
54330  fi
54331
54332      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54333$as_echo_n "checking for $DLL_NAME... " >&6; }
54334      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54335$as_echo "$MSVC_DLL" >&6; }
54336    else
54337      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54338$as_echo "incorrect, ignoring" >&6; }
54339      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54340$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54341    fi
54342  fi
54343
54344    fi
54345  fi
54346
54347  if test "x$MSVC_DLL" = x; then
54348    # Probe: Check in the Boot JDK directory.
54349    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
54350
54351  DLL_NAME="$DLL_NAME"
54352  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54353  METHOD="well-known location in Boot JDK"
54354  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54355    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54356$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54357
54358    # Need to check if the found msvcr is correct architecture
54359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54360$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54361    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54362    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54363      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54364      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54365      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54366        CORRECT_MSVCR_ARCH="PE32 executable"
54367      else
54368        CORRECT_MSVCR_ARCH="PE32+ executable"
54369      fi
54370    else
54371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54372        CORRECT_MSVCR_ARCH=386
54373      else
54374        CORRECT_MSVCR_ARCH=x86-64
54375      fi
54376    fi
54377    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54379$as_echo "ok" >&6; }
54380      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54381
54382  # Only process if variable expands to non-empty
54383
54384  if test "x$MSVC_DLL" != x; then
54385    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54386
54387  # Input might be given as Windows format, start by converting to
54388  # unix format.
54389  path="$MSVC_DLL"
54390  new_path=`$CYGPATH -u "$path"`
54391
54392  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54393  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54394  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54395  # "foo.exe" is OK but "foo" is an error.
54396  #
54397  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54398  # It is also a way to make sure we got the proper file name for the real test later on.
54399  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54400  if test "x$test_shortpath" = x; then
54401    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54402$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54403    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54404  fi
54405
54406  # Call helper function which possibly converts this using DOS-style short mode.
54407  # If so, the updated path is stored in $new_path.
54408
54409  input_path="$new_path"
54410  # Check if we need to convert this using DOS-style short mode. If the path
54411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54412  # take no chances and rewrite it.
54413  # Note: m4 eats our [], so we need to use [ and ] instead.
54414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54415  if test "x$has_forbidden_chars" != x; then
54416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54417    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54418    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54419    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54420      # Going to short mode and back again did indeed matter. Since short mode is
54421      # case insensitive, let's make it lowercase to improve readability.
54422      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54423      # Now convert it back to Unix-style (cygpath)
54424      input_path=`$CYGPATH -u "$shortmode_path"`
54425      new_path="$input_path"
54426    fi
54427  fi
54428
54429  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54430  if test "x$test_cygdrive_prefix" = x; then
54431    # As a simple fix, exclude /usr/bin since it's not a real path.
54432    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54433      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54434      # a path prefixed by /cygdrive for fixpath to work.
54435      new_path="$CYGWIN_ROOT_PATH$input_path"
54436    fi
54437  fi
54438
54439
54440  if test "x$path" != "x$new_path"; then
54441    MSVC_DLL="$new_path"
54442    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54443$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54444  fi
54445
54446    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54447
54448  path="$MSVC_DLL"
54449  has_colon=`$ECHO $path | $GREP ^.:`
54450  new_path="$path"
54451  if test "x$has_colon" = x; then
54452    # Not in mixed or Windows style, start by that.
54453    new_path=`cmd //c echo $path`
54454  fi
54455
54456
54457  input_path="$new_path"
54458  # Check if we need to convert this using DOS-style short mode. If the path
54459  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54460  # take no chances and rewrite it.
54461  # Note: m4 eats our [], so we need to use [ and ] instead.
54462  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54463  if test "x$has_forbidden_chars" != x; then
54464    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54465    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54466  fi
54467
54468
54469  windows_path="$new_path"
54470  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54471    unix_path=`$CYGPATH -u "$windows_path"`
54472    new_path="$unix_path"
54473  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54474    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54475    new_path="$unix_path"
54476  fi
54477
54478  if test "x$path" != "x$new_path"; then
54479    MSVC_DLL="$new_path"
54480    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54481$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54482  fi
54483
54484  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54485  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54486
54487    else
54488      # We're on a unix platform. Hooray! :)
54489      path="$MSVC_DLL"
54490      has_space=`$ECHO "$path" | $GREP " "`
54491      if test "x$has_space" != x; then
54492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54493$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54494        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54495      fi
54496
54497      # Use eval to expand a potential ~
54498      eval path="$path"
54499      if test ! -f "$path" && test ! -d "$path"; then
54500        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54501      fi
54502
54503      if test -d "$path"; then
54504        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54505      else
54506        dir="`$DIRNAME "$path"`"
54507        base="`$BASENAME "$path"`"
54508        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54509      fi
54510    fi
54511  fi
54512
54513      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54514$as_echo_n "checking for $DLL_NAME... " >&6; }
54515      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54516$as_echo "$MSVC_DLL" >&6; }
54517    else
54518      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54519$as_echo "incorrect, ignoring" >&6; }
54520      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54521$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54522    fi
54523  fi
54524
54525  fi
54526
54527  if test "x$MSVC_DLL" = x; then
54528    # Probe: Look in the Windows system32 directory
54529    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
54530
54531  windows_path="$CYGWIN_SYSTEMROOT"
54532  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54533    unix_path=`$CYGPATH -u "$windows_path"`
54534    CYGWIN_SYSTEMROOT="$unix_path"
54535  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54536    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54537    CYGWIN_SYSTEMROOT="$unix_path"
54538  fi
54539
54540    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54541
54542  DLL_NAME="$DLL_NAME"
54543  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54544  METHOD="well-known location in SYSTEMROOT"
54545  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54546    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54547$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54548
54549    # Need to check if the found msvcr is correct architecture
54550    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54551$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54552    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54554      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54555      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54556      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54557        CORRECT_MSVCR_ARCH="PE32 executable"
54558      else
54559        CORRECT_MSVCR_ARCH="PE32+ executable"
54560      fi
54561    else
54562      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54563        CORRECT_MSVCR_ARCH=386
54564      else
54565        CORRECT_MSVCR_ARCH=x86-64
54566      fi
54567    fi
54568    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54569      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54570$as_echo "ok" >&6; }
54571      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54572
54573  # Only process if variable expands to non-empty
54574
54575  if test "x$MSVC_DLL" != x; then
54576    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54577
54578  # Input might be given as Windows format, start by converting to
54579  # unix format.
54580  path="$MSVC_DLL"
54581  new_path=`$CYGPATH -u "$path"`
54582
54583  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54584  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54585  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54586  # "foo.exe" is OK but "foo" is an error.
54587  #
54588  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54589  # It is also a way to make sure we got the proper file name for the real test later on.
54590  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54591  if test "x$test_shortpath" = x; then
54592    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54593$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54594    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54595  fi
54596
54597  # Call helper function which possibly converts this using DOS-style short mode.
54598  # If so, the updated path is stored in $new_path.
54599
54600  input_path="$new_path"
54601  # Check if we need to convert this using DOS-style short mode. If the path
54602  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54603  # take no chances and rewrite it.
54604  # Note: m4 eats our [], so we need to use [ and ] instead.
54605  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54606  if test "x$has_forbidden_chars" != x; then
54607    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54608    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54609    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54610    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54611      # Going to short mode and back again did indeed matter. Since short mode is
54612      # case insensitive, let's make it lowercase to improve readability.
54613      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54614      # Now convert it back to Unix-style (cygpath)
54615      input_path=`$CYGPATH -u "$shortmode_path"`
54616      new_path="$input_path"
54617    fi
54618  fi
54619
54620  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54621  if test "x$test_cygdrive_prefix" = x; then
54622    # As a simple fix, exclude /usr/bin since it's not a real path.
54623    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54624      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54625      # a path prefixed by /cygdrive for fixpath to work.
54626      new_path="$CYGWIN_ROOT_PATH$input_path"
54627    fi
54628  fi
54629
54630
54631  if test "x$path" != "x$new_path"; then
54632    MSVC_DLL="$new_path"
54633    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54634$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54635  fi
54636
54637    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54638
54639  path="$MSVC_DLL"
54640  has_colon=`$ECHO $path | $GREP ^.:`
54641  new_path="$path"
54642  if test "x$has_colon" = x; then
54643    # Not in mixed or Windows style, start by that.
54644    new_path=`cmd //c echo $path`
54645  fi
54646
54647
54648  input_path="$new_path"
54649  # Check if we need to convert this using DOS-style short mode. If the path
54650  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54651  # take no chances and rewrite it.
54652  # Note: m4 eats our [], so we need to use [ and ] instead.
54653  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54654  if test "x$has_forbidden_chars" != x; then
54655    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54656    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54657  fi
54658
54659
54660  windows_path="$new_path"
54661  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54662    unix_path=`$CYGPATH -u "$windows_path"`
54663    new_path="$unix_path"
54664  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54665    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54666    new_path="$unix_path"
54667  fi
54668
54669  if test "x$path" != "x$new_path"; then
54670    MSVC_DLL="$new_path"
54671    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54672$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54673  fi
54674
54675  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54676  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54677
54678    else
54679      # We're on a unix platform. Hooray! :)
54680      path="$MSVC_DLL"
54681      has_space=`$ECHO "$path" | $GREP " "`
54682      if test "x$has_space" != x; then
54683        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54684$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54685        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54686      fi
54687
54688      # Use eval to expand a potential ~
54689      eval path="$path"
54690      if test ! -f "$path" && test ! -d "$path"; then
54691        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54692      fi
54693
54694      if test -d "$path"; then
54695        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54696      else
54697        dir="`$DIRNAME "$path"`"
54698        base="`$BASENAME "$path"`"
54699        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54700      fi
54701    fi
54702  fi
54703
54704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54705$as_echo_n "checking for $DLL_NAME... " >&6; }
54706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54707$as_echo "$MSVC_DLL" >&6; }
54708    else
54709      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54710$as_echo "incorrect, ignoring" >&6; }
54711      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54712$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54713    fi
54714  fi
54715
54716  fi
54717
54718  if test "x$MSVC_DLL" = x; then
54719    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54720    if test "x$VS100COMNTOOLS" != x; then
54721      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54722
54723  windows_path="$CYGWIN_VS_TOOLS_DIR"
54724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54725    unix_path=`$CYGPATH -u "$windows_path"`
54726    CYGWIN_VS_TOOLS_DIR="$unix_path"
54727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54729    CYGWIN_VS_TOOLS_DIR="$unix_path"
54730  fi
54731
54732      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54733        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54734	    | $GREP -i /x64/ | $HEAD --lines 1`
54735      else
54736        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54737	    | $GREP -i /x86/ | $HEAD --lines 1`
54738      fi
54739
54740  DLL_NAME="$DLL_NAME"
54741  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54742  METHOD="search of VS100COMNTOOLS"
54743  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54744    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54745$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54746
54747    # Need to check if the found msvcr is correct architecture
54748    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54749$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54750    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54751    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54752      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54753      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54754      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54755        CORRECT_MSVCR_ARCH="PE32 executable"
54756      else
54757        CORRECT_MSVCR_ARCH="PE32+ executable"
54758      fi
54759    else
54760      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54761        CORRECT_MSVCR_ARCH=386
54762      else
54763        CORRECT_MSVCR_ARCH=x86-64
54764      fi
54765    fi
54766    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54767      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54768$as_echo "ok" >&6; }
54769      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54770
54771  # Only process if variable expands to non-empty
54772
54773  if test "x$MSVC_DLL" != x; then
54774    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54775
54776  # Input might be given as Windows format, start by converting to
54777  # unix format.
54778  path="$MSVC_DLL"
54779  new_path=`$CYGPATH -u "$path"`
54780
54781  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54782  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54783  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54784  # "foo.exe" is OK but "foo" is an error.
54785  #
54786  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54787  # It is also a way to make sure we got the proper file name for the real test later on.
54788  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54789  if test "x$test_shortpath" = x; then
54790    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54791$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54792    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54793  fi
54794
54795  # Call helper function which possibly converts this using DOS-style short mode.
54796  # If so, the updated path is stored in $new_path.
54797
54798  input_path="$new_path"
54799  # Check if we need to convert this using DOS-style short mode. If the path
54800  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54801  # take no chances and rewrite it.
54802  # Note: m4 eats our [], so we need to use [ and ] instead.
54803  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54804  if test "x$has_forbidden_chars" != x; then
54805    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54806    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54807    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54808    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54809      # Going to short mode and back again did indeed matter. Since short mode is
54810      # case insensitive, let's make it lowercase to improve readability.
54811      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54812      # Now convert it back to Unix-style (cygpath)
54813      input_path=`$CYGPATH -u "$shortmode_path"`
54814      new_path="$input_path"
54815    fi
54816  fi
54817
54818  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54819  if test "x$test_cygdrive_prefix" = x; then
54820    # As a simple fix, exclude /usr/bin since it's not a real path.
54821    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54822      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54823      # a path prefixed by /cygdrive for fixpath to work.
54824      new_path="$CYGWIN_ROOT_PATH$input_path"
54825    fi
54826  fi
54827
54828
54829  if test "x$path" != "x$new_path"; then
54830    MSVC_DLL="$new_path"
54831    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54832$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54833  fi
54834
54835    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54836
54837  path="$MSVC_DLL"
54838  has_colon=`$ECHO $path | $GREP ^.:`
54839  new_path="$path"
54840  if test "x$has_colon" = x; then
54841    # Not in mixed or Windows style, start by that.
54842    new_path=`cmd //c echo $path`
54843  fi
54844
54845
54846  input_path="$new_path"
54847  # Check if we need to convert this using DOS-style short mode. If the path
54848  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54849  # take no chances and rewrite it.
54850  # Note: m4 eats our [], so we need to use [ and ] instead.
54851  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54852  if test "x$has_forbidden_chars" != x; then
54853    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54854    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54855  fi
54856
54857
54858  windows_path="$new_path"
54859  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54860    unix_path=`$CYGPATH -u "$windows_path"`
54861    new_path="$unix_path"
54862  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54863    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54864    new_path="$unix_path"
54865  fi
54866
54867  if test "x$path" != "x$new_path"; then
54868    MSVC_DLL="$new_path"
54869    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54870$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54871  fi
54872
54873  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54874  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54875
54876    else
54877      # We're on a unix platform. Hooray! :)
54878      path="$MSVC_DLL"
54879      has_space=`$ECHO "$path" | $GREP " "`
54880      if test "x$has_space" != x; then
54881        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54882$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54883        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54884      fi
54885
54886      # Use eval to expand a potential ~
54887      eval path="$path"
54888      if test ! -f "$path" && test ! -d "$path"; then
54889        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54890      fi
54891
54892      if test -d "$path"; then
54893        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54894      else
54895        dir="`$DIRNAME "$path"`"
54896        base="`$BASENAME "$path"`"
54897        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54898      fi
54899    fi
54900  fi
54901
54902      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54903$as_echo_n "checking for $DLL_NAME... " >&6; }
54904      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54905$as_echo "$MSVC_DLL" >&6; }
54906    else
54907      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54908$as_echo "incorrect, ignoring" >&6; }
54909      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54910$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54911    fi
54912  fi
54913
54914    fi
54915  fi
54916
54917  if test "x$MSVC_DLL" = x; then
54918    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54919    # (This was the original behaviour; kept since it might turn something up)
54920    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54921      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54922        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54923	    | $GREP x64 | $HEAD --lines 1`
54924      else
54925        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54926	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54927        if test "x$POSSIBLE_MSVC_DLL" = x; then
54928          # We're grasping at straws now...
54929          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54930	      | $HEAD --lines 1`
54931        fi
54932      fi
54933
54934
54935  DLL_NAME="$DLL_NAME"
54936  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54937  METHOD="search of VCINSTALLDIR"
54938  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54939    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54940$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54941
54942    # Need to check if the found msvcr is correct architecture
54943    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54944$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54945    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54946    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54947      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54948      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54949      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54950        CORRECT_MSVCR_ARCH="PE32 executable"
54951      else
54952        CORRECT_MSVCR_ARCH="PE32+ executable"
54953      fi
54954    else
54955      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54956        CORRECT_MSVCR_ARCH=386
54957      else
54958        CORRECT_MSVCR_ARCH=x86-64
54959      fi
54960    fi
54961    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54962      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54963$as_echo "ok" >&6; }
54964      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54965
54966  # Only process if variable expands to non-empty
54967
54968  if test "x$MSVC_DLL" != x; then
54969    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54970
54971  # Input might be given as Windows format, start by converting to
54972  # unix format.
54973  path="$MSVC_DLL"
54974  new_path=`$CYGPATH -u "$path"`
54975
54976  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54977  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54978  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54979  # "foo.exe" is OK but "foo" is an error.
54980  #
54981  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54982  # It is also a way to make sure we got the proper file name for the real test later on.
54983  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54984  if test "x$test_shortpath" = x; then
54985    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54986$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54987    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54988  fi
54989
54990  # Call helper function which possibly converts this using DOS-style short mode.
54991  # If so, the updated path is stored in $new_path.
54992
54993  input_path="$new_path"
54994  # Check if we need to convert this using DOS-style short mode. If the path
54995  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54996  # take no chances and rewrite it.
54997  # Note: m4 eats our [], so we need to use [ and ] instead.
54998  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54999  if test "x$has_forbidden_chars" != x; then
55000    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55001    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55002    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55003    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55004      # Going to short mode and back again did indeed matter. Since short mode is
55005      # case insensitive, let's make it lowercase to improve readability.
55006      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55007      # Now convert it back to Unix-style (cygpath)
55008      input_path=`$CYGPATH -u "$shortmode_path"`
55009      new_path="$input_path"
55010    fi
55011  fi
55012
55013  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55014  if test "x$test_cygdrive_prefix" = x; then
55015    # As a simple fix, exclude /usr/bin since it's not a real path.
55016    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55017      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55018      # a path prefixed by /cygdrive for fixpath to work.
55019      new_path="$CYGWIN_ROOT_PATH$input_path"
55020    fi
55021  fi
55022
55023
55024  if test "x$path" != "x$new_path"; then
55025    MSVC_DLL="$new_path"
55026    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55027$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55028  fi
55029
55030    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55031
55032  path="$MSVC_DLL"
55033  has_colon=`$ECHO $path | $GREP ^.:`
55034  new_path="$path"
55035  if test "x$has_colon" = x; then
55036    # Not in mixed or Windows style, start by that.
55037    new_path=`cmd //c echo $path`
55038  fi
55039
55040
55041  input_path="$new_path"
55042  # Check if we need to convert this using DOS-style short mode. If the path
55043  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55044  # take no chances and rewrite it.
55045  # Note: m4 eats our [], so we need to use [ and ] instead.
55046  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55047  if test "x$has_forbidden_chars" != x; then
55048    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55049    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55050  fi
55051
55052
55053  windows_path="$new_path"
55054  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55055    unix_path=`$CYGPATH -u "$windows_path"`
55056    new_path="$unix_path"
55057  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55058    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55059    new_path="$unix_path"
55060  fi
55061
55062  if test "x$path" != "x$new_path"; then
55063    MSVC_DLL="$new_path"
55064    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55065$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55066  fi
55067
55068  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55069  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55070
55071    else
55072      # We're on a unix platform. Hooray! :)
55073      path="$MSVC_DLL"
55074      has_space=`$ECHO "$path" | $GREP " "`
55075      if test "x$has_space" != x; then
55076        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55077$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55078        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55079      fi
55080
55081      # Use eval to expand a potential ~
55082      eval path="$path"
55083      if test ! -f "$path" && test ! -d "$path"; then
55084        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55085      fi
55086
55087      if test -d "$path"; then
55088        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55089      else
55090        dir="`$DIRNAME "$path"`"
55091        base="`$BASENAME "$path"`"
55092        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55093      fi
55094    fi
55095  fi
55096
55097      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55098$as_echo_n "checking for $DLL_NAME... " >&6; }
55099      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55100$as_echo "$MSVC_DLL" >&6; }
55101    else
55102      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55103$as_echo "incorrect, ignoring" >&6; }
55104      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55105$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55106    fi
55107  fi
55108
55109    fi
55110  fi
55111
55112  if test "x$MSVC_DLL" = x; then
55113    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55114$as_echo_n "checking for $DLL_NAME... " >&6; }
55115    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55116$as_echo "no" >&6; }
55117    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55118  fi
55119
55120    MSVCR_DLL="$MSVC_DLL"
55121  fi
55122
55123
55124
55125# Check whether --with-msvcp-dll was given.
55126if test "${with_msvcp_dll+set}" = set; then :
55127  withval=$with_msvcp_dll;
55128fi
55129
55130
55131  if test "x$MSVCP_NAME" != "x"; then
55132    if test "x$with_msvcp_dll" != x; then
55133      # If given explicitely by user, do not probe. If not present, fail directly.
55134
55135  DLL_NAME="$MSVCP_NAME"
55136  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
55137  METHOD="--with-msvcp-dll"
55138  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55139    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55140$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55141
55142    # Need to check if the found msvcr is correct architecture
55143    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55144$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55145    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55146    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55147      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55148      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55149      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55150        CORRECT_MSVCR_ARCH="PE32 executable"
55151      else
55152        CORRECT_MSVCR_ARCH="PE32+ executable"
55153      fi
55154    else
55155      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55156        CORRECT_MSVCR_ARCH=386
55157      else
55158        CORRECT_MSVCR_ARCH=x86-64
55159      fi
55160    fi
55161    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55162      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55163$as_echo "ok" >&6; }
55164      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55165
55166  # Only process if variable expands to non-empty
55167
55168  if test "x$MSVC_DLL" != x; then
55169    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55170
55171  # Input might be given as Windows format, start by converting to
55172  # unix format.
55173  path="$MSVC_DLL"
55174  new_path=`$CYGPATH -u "$path"`
55175
55176  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55177  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55178  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55179  # "foo.exe" is OK but "foo" is an error.
55180  #
55181  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55182  # It is also a way to make sure we got the proper file name for the real test later on.
55183  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55184  if test "x$test_shortpath" = x; then
55185    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55186$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55187    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55188  fi
55189
55190  # Call helper function which possibly converts this using DOS-style short mode.
55191  # If so, the updated path is stored in $new_path.
55192
55193  input_path="$new_path"
55194  # Check if we need to convert this using DOS-style short mode. If the path
55195  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55196  # take no chances and rewrite it.
55197  # Note: m4 eats our [], so we need to use [ and ] instead.
55198  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55199  if test "x$has_forbidden_chars" != x; then
55200    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55201    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55202    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55203    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55204      # Going to short mode and back again did indeed matter. Since short mode is
55205      # case insensitive, let's make it lowercase to improve readability.
55206      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55207      # Now convert it back to Unix-style (cygpath)
55208      input_path=`$CYGPATH -u "$shortmode_path"`
55209      new_path="$input_path"
55210    fi
55211  fi
55212
55213  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55214  if test "x$test_cygdrive_prefix" = x; then
55215    # As a simple fix, exclude /usr/bin since it's not a real path.
55216    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55217      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55218      # a path prefixed by /cygdrive for fixpath to work.
55219      new_path="$CYGWIN_ROOT_PATH$input_path"
55220    fi
55221  fi
55222
55223
55224  if test "x$path" != "x$new_path"; then
55225    MSVC_DLL="$new_path"
55226    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55227$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55228  fi
55229
55230    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55231
55232  path="$MSVC_DLL"
55233  has_colon=`$ECHO $path | $GREP ^.:`
55234  new_path="$path"
55235  if test "x$has_colon" = x; then
55236    # Not in mixed or Windows style, start by that.
55237    new_path=`cmd //c echo $path`
55238  fi
55239
55240
55241  input_path="$new_path"
55242  # Check if we need to convert this using DOS-style short mode. If the path
55243  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55244  # take no chances and rewrite it.
55245  # Note: m4 eats our [], so we need to use [ and ] instead.
55246  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55247  if test "x$has_forbidden_chars" != x; then
55248    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55249    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55250  fi
55251
55252
55253  windows_path="$new_path"
55254  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55255    unix_path=`$CYGPATH -u "$windows_path"`
55256    new_path="$unix_path"
55257  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55258    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55259    new_path="$unix_path"
55260  fi
55261
55262  if test "x$path" != "x$new_path"; then
55263    MSVC_DLL="$new_path"
55264    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55265$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55266  fi
55267
55268  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55269  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55270
55271    else
55272      # We're on a unix platform. Hooray! :)
55273      path="$MSVC_DLL"
55274      has_space=`$ECHO "$path" | $GREP " "`
55275      if test "x$has_space" != x; then
55276        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55277$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55278        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55279      fi
55280
55281      # Use eval to expand a potential ~
55282      eval path="$path"
55283      if test ! -f "$path" && test ! -d "$path"; then
55284        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55285      fi
55286
55287      if test -d "$path"; then
55288        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55289      else
55290        dir="`$DIRNAME "$path"`"
55291        base="`$BASENAME "$path"`"
55292        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55293      fi
55294    fi
55295  fi
55296
55297      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55298$as_echo_n "checking for $DLL_NAME... " >&6; }
55299      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55300$as_echo "$MSVC_DLL" >&6; }
55301    else
55302      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55303$as_echo "incorrect, ignoring" >&6; }
55304      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55305$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55306    fi
55307  fi
55308
55309      if test "x$MSVC_DLL" = x; then
55310        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
55311      fi
55312      MSVCP_DLL="$MSVC_DLL"
55313    elif test "x$DEVKIT_MSVCP_DLL" != x; then
55314
55315  DLL_NAME="$MSVCP_NAME"
55316  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
55317  METHOD="devkit"
55318  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55319    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55320$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55321
55322    # Need to check if the found msvcr is correct architecture
55323    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55324$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55325    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55326    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55327      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55328      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55329      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55330        CORRECT_MSVCR_ARCH="PE32 executable"
55331      else
55332        CORRECT_MSVCR_ARCH="PE32+ executable"
55333      fi
55334    else
55335      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55336        CORRECT_MSVCR_ARCH=386
55337      else
55338        CORRECT_MSVCR_ARCH=x86-64
55339      fi
55340    fi
55341    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55342      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55343$as_echo "ok" >&6; }
55344      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55345
55346  # Only process if variable expands to non-empty
55347
55348  if test "x$MSVC_DLL" != x; then
55349    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55350
55351  # Input might be given as Windows format, start by converting to
55352  # unix format.
55353  path="$MSVC_DLL"
55354  new_path=`$CYGPATH -u "$path"`
55355
55356  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55357  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55358  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55359  # "foo.exe" is OK but "foo" is an error.
55360  #
55361  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55362  # It is also a way to make sure we got the proper file name for the real test later on.
55363  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55364  if test "x$test_shortpath" = x; then
55365    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55366$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55367    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55368  fi
55369
55370  # Call helper function which possibly converts this using DOS-style short mode.
55371  # If so, the updated path is stored in $new_path.
55372
55373  input_path="$new_path"
55374  # Check if we need to convert this using DOS-style short mode. If the path
55375  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55376  # take no chances and rewrite it.
55377  # Note: m4 eats our [], so we need to use [ and ] instead.
55378  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55379  if test "x$has_forbidden_chars" != x; then
55380    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55381    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55382    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55383    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55384      # Going to short mode and back again did indeed matter. Since short mode is
55385      # case insensitive, let's make it lowercase to improve readability.
55386      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55387      # Now convert it back to Unix-style (cygpath)
55388      input_path=`$CYGPATH -u "$shortmode_path"`
55389      new_path="$input_path"
55390    fi
55391  fi
55392
55393  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55394  if test "x$test_cygdrive_prefix" = x; then
55395    # As a simple fix, exclude /usr/bin since it's not a real path.
55396    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55397      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55398      # a path prefixed by /cygdrive for fixpath to work.
55399      new_path="$CYGWIN_ROOT_PATH$input_path"
55400    fi
55401  fi
55402
55403
55404  if test "x$path" != "x$new_path"; then
55405    MSVC_DLL="$new_path"
55406    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55407$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55408  fi
55409
55410    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55411
55412  path="$MSVC_DLL"
55413  has_colon=`$ECHO $path | $GREP ^.:`
55414  new_path="$path"
55415  if test "x$has_colon" = x; then
55416    # Not in mixed or Windows style, start by that.
55417    new_path=`cmd //c echo $path`
55418  fi
55419
55420
55421  input_path="$new_path"
55422  # Check if we need to convert this using DOS-style short mode. If the path
55423  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55424  # take no chances and rewrite it.
55425  # Note: m4 eats our [], so we need to use [ and ] instead.
55426  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55427  if test "x$has_forbidden_chars" != x; then
55428    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55429    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55430  fi
55431
55432
55433  windows_path="$new_path"
55434  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55435    unix_path=`$CYGPATH -u "$windows_path"`
55436    new_path="$unix_path"
55437  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55438    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55439    new_path="$unix_path"
55440  fi
55441
55442  if test "x$path" != "x$new_path"; then
55443    MSVC_DLL="$new_path"
55444    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55445$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55446  fi
55447
55448  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55449  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55450
55451    else
55452      # We're on a unix platform. Hooray! :)
55453      path="$MSVC_DLL"
55454      has_space=`$ECHO "$path" | $GREP " "`
55455      if test "x$has_space" != x; then
55456        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55457$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55458        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55459      fi
55460
55461      # Use eval to expand a potential ~
55462      eval path="$path"
55463      if test ! -f "$path" && test ! -d "$path"; then
55464        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55465      fi
55466
55467      if test -d "$path"; then
55468        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55469      else
55470        dir="`$DIRNAME "$path"`"
55471        base="`$BASENAME "$path"`"
55472        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55473      fi
55474    fi
55475  fi
55476
55477      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55478$as_echo_n "checking for $DLL_NAME... " >&6; }
55479      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55480$as_echo "$MSVC_DLL" >&6; }
55481    else
55482      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55483$as_echo "incorrect, ignoring" >&6; }
55484      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55485$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55486    fi
55487  fi
55488
55489      if test "x$MSVC_DLL" = x; then
55490        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
55491      fi
55492      MSVCP_DLL="$MSVC_DLL"
55493    else
55494
55495  DLL_NAME="${MSVCP_NAME}"
55496  MSVC_DLL=
55497
55498  if test "x$MSVC_DLL" = x; then
55499    # Probe: Using well-known location from Visual Studio 10.0
55500    if test "x$VCINSTALLDIR" != x; then
55501      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
55502
55503  windows_path="$CYGWIN_VC_INSTALL_DIR"
55504  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55505    unix_path=`$CYGPATH -u "$windows_path"`
55506    CYGWIN_VC_INSTALL_DIR="$unix_path"
55507  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55508    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55509    CYGWIN_VC_INSTALL_DIR="$unix_path"
55510  fi
55511
55512      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55513        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55514      else
55515        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
55516      fi
55517      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
55518
55519  DLL_NAME="$DLL_NAME"
55520  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55521  METHOD="well-known location in VCINSTALLDIR"
55522  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55523    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55524$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55525
55526    # Need to check if the found msvcr is correct architecture
55527    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55528$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55529    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55530    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55531      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55532      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55533      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55534        CORRECT_MSVCR_ARCH="PE32 executable"
55535      else
55536        CORRECT_MSVCR_ARCH="PE32+ executable"
55537      fi
55538    else
55539      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55540        CORRECT_MSVCR_ARCH=386
55541      else
55542        CORRECT_MSVCR_ARCH=x86-64
55543      fi
55544    fi
55545    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55546      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55547$as_echo "ok" >&6; }
55548      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55549
55550  # Only process if variable expands to non-empty
55551
55552  if test "x$MSVC_DLL" != x; then
55553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55554
55555  # Input might be given as Windows format, start by converting to
55556  # unix format.
55557  path="$MSVC_DLL"
55558  new_path=`$CYGPATH -u "$path"`
55559
55560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55563  # "foo.exe" is OK but "foo" is an error.
55564  #
55565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55566  # It is also a way to make sure we got the proper file name for the real test later on.
55567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55568  if test "x$test_shortpath" = x; then
55569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55570$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55571    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55572  fi
55573
55574  # Call helper function which possibly converts this using DOS-style short mode.
55575  # If so, the updated path is stored in $new_path.
55576
55577  input_path="$new_path"
55578  # Check if we need to convert this using DOS-style short mode. If the path
55579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55580  # take no chances and rewrite it.
55581  # Note: m4 eats our [], so we need to use [ and ] instead.
55582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55583  if test "x$has_forbidden_chars" != x; then
55584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55588      # Going to short mode and back again did indeed matter. Since short mode is
55589      # case insensitive, let's make it lowercase to improve readability.
55590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55591      # Now convert it back to Unix-style (cygpath)
55592      input_path=`$CYGPATH -u "$shortmode_path"`
55593      new_path="$input_path"
55594    fi
55595  fi
55596
55597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55598  if test "x$test_cygdrive_prefix" = x; then
55599    # As a simple fix, exclude /usr/bin since it's not a real path.
55600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55602      # a path prefixed by /cygdrive for fixpath to work.
55603      new_path="$CYGWIN_ROOT_PATH$input_path"
55604    fi
55605  fi
55606
55607
55608  if test "x$path" != "x$new_path"; then
55609    MSVC_DLL="$new_path"
55610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55611$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55612  fi
55613
55614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55615
55616  path="$MSVC_DLL"
55617  has_colon=`$ECHO $path | $GREP ^.:`
55618  new_path="$path"
55619  if test "x$has_colon" = x; then
55620    # Not in mixed or Windows style, start by that.
55621    new_path=`cmd //c echo $path`
55622  fi
55623
55624
55625  input_path="$new_path"
55626  # Check if we need to convert this using DOS-style short mode. If the path
55627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55628  # take no chances and rewrite it.
55629  # Note: m4 eats our [], so we need to use [ and ] instead.
55630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55631  if test "x$has_forbidden_chars" != x; then
55632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55634  fi
55635
55636
55637  windows_path="$new_path"
55638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55639    unix_path=`$CYGPATH -u "$windows_path"`
55640    new_path="$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    new_path="$unix_path"
55644  fi
55645
55646  if test "x$path" != "x$new_path"; then
55647    MSVC_DLL="$new_path"
55648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55649$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55650  fi
55651
55652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55654
55655    else
55656      # We're on a unix platform. Hooray! :)
55657      path="$MSVC_DLL"
55658      has_space=`$ECHO "$path" | $GREP " "`
55659      if test "x$has_space" != x; then
55660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55661$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55663      fi
55664
55665      # Use eval to expand a potential ~
55666      eval path="$path"
55667      if test ! -f "$path" && test ! -d "$path"; then
55668        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55669      fi
55670
55671      if test -d "$path"; then
55672        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55673      else
55674        dir="`$DIRNAME "$path"`"
55675        base="`$BASENAME "$path"`"
55676        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55677      fi
55678    fi
55679  fi
55680
55681      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55682$as_echo_n "checking for $DLL_NAME... " >&6; }
55683      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55684$as_echo "$MSVC_DLL" >&6; }
55685    else
55686      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55687$as_echo "incorrect, ignoring" >&6; }
55688      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55689$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55690    fi
55691  fi
55692
55693    fi
55694  fi
55695
55696  if test "x$MSVC_DLL" = x; then
55697    # Probe: Check in the Boot JDK directory.
55698    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55699
55700  DLL_NAME="$DLL_NAME"
55701  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55702  METHOD="well-known location in Boot JDK"
55703  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55704    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55705$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55706
55707    # Need to check if the found msvcr is correct architecture
55708    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55709$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55710    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55711    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55712      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55713      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55714      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55715        CORRECT_MSVCR_ARCH="PE32 executable"
55716      else
55717        CORRECT_MSVCR_ARCH="PE32+ executable"
55718      fi
55719    else
55720      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55721        CORRECT_MSVCR_ARCH=386
55722      else
55723        CORRECT_MSVCR_ARCH=x86-64
55724      fi
55725    fi
55726    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55727      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55728$as_echo "ok" >&6; }
55729      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55730
55731  # Only process if variable expands to non-empty
55732
55733  if test "x$MSVC_DLL" != x; then
55734    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55735
55736  # Input might be given as Windows format, start by converting to
55737  # unix format.
55738  path="$MSVC_DLL"
55739  new_path=`$CYGPATH -u "$path"`
55740
55741  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55742  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55743  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55744  # "foo.exe" is OK but "foo" is an error.
55745  #
55746  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55747  # It is also a way to make sure we got the proper file name for the real test later on.
55748  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55749  if test "x$test_shortpath" = x; then
55750    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55751$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55752    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55753  fi
55754
55755  # Call helper function which possibly converts this using DOS-style short mode.
55756  # If so, the updated path is stored in $new_path.
55757
55758  input_path="$new_path"
55759  # Check if we need to convert this using DOS-style short mode. If the path
55760  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55761  # take no chances and rewrite it.
55762  # Note: m4 eats our [], so we need to use [ and ] instead.
55763  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55764  if test "x$has_forbidden_chars" != x; then
55765    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55766    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55767    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55768    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55769      # Going to short mode and back again did indeed matter. Since short mode is
55770      # case insensitive, let's make it lowercase to improve readability.
55771      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55772      # Now convert it back to Unix-style (cygpath)
55773      input_path=`$CYGPATH -u "$shortmode_path"`
55774      new_path="$input_path"
55775    fi
55776  fi
55777
55778  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55779  if test "x$test_cygdrive_prefix" = x; then
55780    # As a simple fix, exclude /usr/bin since it's not a real path.
55781    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55782      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55783      # a path prefixed by /cygdrive for fixpath to work.
55784      new_path="$CYGWIN_ROOT_PATH$input_path"
55785    fi
55786  fi
55787
55788
55789  if test "x$path" != "x$new_path"; then
55790    MSVC_DLL="$new_path"
55791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55792$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55793  fi
55794
55795    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55796
55797  path="$MSVC_DLL"
55798  has_colon=`$ECHO $path | $GREP ^.:`
55799  new_path="$path"
55800  if test "x$has_colon" = x; then
55801    # Not in mixed or Windows style, start by that.
55802    new_path=`cmd //c echo $path`
55803  fi
55804
55805
55806  input_path="$new_path"
55807  # Check if we need to convert this using DOS-style short mode. If the path
55808  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55809  # take no chances and rewrite it.
55810  # Note: m4 eats our [], so we need to use [ and ] instead.
55811  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55812  if test "x$has_forbidden_chars" != x; then
55813    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55814    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55815  fi
55816
55817
55818  windows_path="$new_path"
55819  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55820    unix_path=`$CYGPATH -u "$windows_path"`
55821    new_path="$unix_path"
55822  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55823    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55824    new_path="$unix_path"
55825  fi
55826
55827  if test "x$path" != "x$new_path"; then
55828    MSVC_DLL="$new_path"
55829    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55830$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55831  fi
55832
55833  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55834  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55835
55836    else
55837      # We're on a unix platform. Hooray! :)
55838      path="$MSVC_DLL"
55839      has_space=`$ECHO "$path" | $GREP " "`
55840      if test "x$has_space" != x; then
55841        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55842$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55843        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55844      fi
55845
55846      # Use eval to expand a potential ~
55847      eval path="$path"
55848      if test ! -f "$path" && test ! -d "$path"; then
55849        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55850      fi
55851
55852      if test -d "$path"; then
55853        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55854      else
55855        dir="`$DIRNAME "$path"`"
55856        base="`$BASENAME "$path"`"
55857        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55858      fi
55859    fi
55860  fi
55861
55862      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55863$as_echo_n "checking for $DLL_NAME... " >&6; }
55864      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55865$as_echo "$MSVC_DLL" >&6; }
55866    else
55867      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55868$as_echo "incorrect, ignoring" >&6; }
55869      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55870$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55871    fi
55872  fi
55873
55874  fi
55875
55876  if test "x$MSVC_DLL" = x; then
55877    # Probe: Look in the Windows system32 directory
55878    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55879
55880  windows_path="$CYGWIN_SYSTEMROOT"
55881  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55882    unix_path=`$CYGPATH -u "$windows_path"`
55883    CYGWIN_SYSTEMROOT="$unix_path"
55884  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55885    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55886    CYGWIN_SYSTEMROOT="$unix_path"
55887  fi
55888
55889    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55890
55891  DLL_NAME="$DLL_NAME"
55892  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55893  METHOD="well-known location in SYSTEMROOT"
55894  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55895    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55896$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55897
55898    # Need to check if the found msvcr is correct architecture
55899    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55900$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55901    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55902    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55903      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55904      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55905      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55906        CORRECT_MSVCR_ARCH="PE32 executable"
55907      else
55908        CORRECT_MSVCR_ARCH="PE32+ executable"
55909      fi
55910    else
55911      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55912        CORRECT_MSVCR_ARCH=386
55913      else
55914        CORRECT_MSVCR_ARCH=x86-64
55915      fi
55916    fi
55917    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55918      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55919$as_echo "ok" >&6; }
55920      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55921
55922  # Only process if variable expands to non-empty
55923
55924  if test "x$MSVC_DLL" != x; then
55925    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55926
55927  # Input might be given as Windows format, start by converting to
55928  # unix format.
55929  path="$MSVC_DLL"
55930  new_path=`$CYGPATH -u "$path"`
55931
55932  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55933  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55934  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55935  # "foo.exe" is OK but "foo" is an error.
55936  #
55937  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55938  # It is also a way to make sure we got the proper file name for the real test later on.
55939  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55940  if test "x$test_shortpath" = x; then
55941    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55942$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55943    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55944  fi
55945
55946  # Call helper function which possibly converts this using DOS-style short mode.
55947  # If so, the updated path is stored in $new_path.
55948
55949  input_path="$new_path"
55950  # Check if we need to convert this using DOS-style short mode. If the path
55951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55952  # take no chances and rewrite it.
55953  # Note: m4 eats our [], so we need to use [ and ] instead.
55954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55955  if test "x$has_forbidden_chars" != x; then
55956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55957    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55958    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55959    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55960      # Going to short mode and back again did indeed matter. Since short mode is
55961      # case insensitive, let's make it lowercase to improve readability.
55962      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55963      # Now convert it back to Unix-style (cygpath)
55964      input_path=`$CYGPATH -u "$shortmode_path"`
55965      new_path="$input_path"
55966    fi
55967  fi
55968
55969  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55970  if test "x$test_cygdrive_prefix" = x; then
55971    # As a simple fix, exclude /usr/bin since it's not a real path.
55972    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55973      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55974      # a path prefixed by /cygdrive for fixpath to work.
55975      new_path="$CYGWIN_ROOT_PATH$input_path"
55976    fi
55977  fi
55978
55979
55980  if test "x$path" != "x$new_path"; then
55981    MSVC_DLL="$new_path"
55982    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55983$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55984  fi
55985
55986    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55987
55988  path="$MSVC_DLL"
55989  has_colon=`$ECHO $path | $GREP ^.:`
55990  new_path="$path"
55991  if test "x$has_colon" = x; then
55992    # Not in mixed or Windows style, start by that.
55993    new_path=`cmd //c echo $path`
55994  fi
55995
55996
55997  input_path="$new_path"
55998  # Check if we need to convert this using DOS-style short mode. If the path
55999  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56000  # take no chances and rewrite it.
56001  # Note: m4 eats our [], so we need to use [ and ] instead.
56002  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56003  if test "x$has_forbidden_chars" != x; then
56004    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56005    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56006  fi
56007
56008
56009  windows_path="$new_path"
56010  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56011    unix_path=`$CYGPATH -u "$windows_path"`
56012    new_path="$unix_path"
56013  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56014    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56015    new_path="$unix_path"
56016  fi
56017
56018  if test "x$path" != "x$new_path"; then
56019    MSVC_DLL="$new_path"
56020    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56021$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56022  fi
56023
56024  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56025  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56026
56027    else
56028      # We're on a unix platform. Hooray! :)
56029      path="$MSVC_DLL"
56030      has_space=`$ECHO "$path" | $GREP " "`
56031      if test "x$has_space" != x; then
56032        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56033$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56034        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56035      fi
56036
56037      # Use eval to expand a potential ~
56038      eval path="$path"
56039      if test ! -f "$path" && test ! -d "$path"; then
56040        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56041      fi
56042
56043      if test -d "$path"; then
56044        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56045      else
56046        dir="`$DIRNAME "$path"`"
56047        base="`$BASENAME "$path"`"
56048        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56049      fi
56050    fi
56051  fi
56052
56053      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56054$as_echo_n "checking for $DLL_NAME... " >&6; }
56055      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56056$as_echo "$MSVC_DLL" >&6; }
56057    else
56058      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56059$as_echo "incorrect, ignoring" >&6; }
56060      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56061$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56062    fi
56063  fi
56064
56065  fi
56066
56067  if test "x$MSVC_DLL" = x; then
56068    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
56069    if test "x$VS100COMNTOOLS" != x; then
56070      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
56071
56072  windows_path="$CYGWIN_VS_TOOLS_DIR"
56073  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56074    unix_path=`$CYGPATH -u "$windows_path"`
56075    CYGWIN_VS_TOOLS_DIR="$unix_path"
56076  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56077    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56078    CYGWIN_VS_TOOLS_DIR="$unix_path"
56079  fi
56080
56081      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56082        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56083	    | $GREP -i /x64/ | $HEAD --lines 1`
56084      else
56085        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
56086	    | $GREP -i /x86/ | $HEAD --lines 1`
56087      fi
56088
56089  DLL_NAME="$DLL_NAME"
56090  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56091  METHOD="search of VS100COMNTOOLS"
56092  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56093    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56094$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56095
56096    # Need to check if the found msvcr is correct architecture
56097    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56098$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56099    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56100    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56101      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56102      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56103      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56104        CORRECT_MSVCR_ARCH="PE32 executable"
56105      else
56106        CORRECT_MSVCR_ARCH="PE32+ executable"
56107      fi
56108    else
56109      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56110        CORRECT_MSVCR_ARCH=386
56111      else
56112        CORRECT_MSVCR_ARCH=x86-64
56113      fi
56114    fi
56115    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56117$as_echo "ok" >&6; }
56118      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56119
56120  # Only process if variable expands to non-empty
56121
56122  if test "x$MSVC_DLL" != x; then
56123    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56124
56125  # Input might be given as Windows format, start by converting to
56126  # unix format.
56127  path="$MSVC_DLL"
56128  new_path=`$CYGPATH -u "$path"`
56129
56130  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56131  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56132  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56133  # "foo.exe" is OK but "foo" is an error.
56134  #
56135  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56136  # It is also a way to make sure we got the proper file name for the real test later on.
56137  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56138  if test "x$test_shortpath" = x; then
56139    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56140$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56141    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56142  fi
56143
56144  # Call helper function which possibly converts this using DOS-style short mode.
56145  # If so, the updated path is stored in $new_path.
56146
56147  input_path="$new_path"
56148  # Check if we need to convert this using DOS-style short mode. If the path
56149  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56150  # take no chances and rewrite it.
56151  # Note: m4 eats our [], so we need to use [ and ] instead.
56152  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56153  if test "x$has_forbidden_chars" != x; then
56154    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56155    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56156    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56157    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56158      # Going to short mode and back again did indeed matter. Since short mode is
56159      # case insensitive, let's make it lowercase to improve readability.
56160      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56161      # Now convert it back to Unix-style (cygpath)
56162      input_path=`$CYGPATH -u "$shortmode_path"`
56163      new_path="$input_path"
56164    fi
56165  fi
56166
56167  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56168  if test "x$test_cygdrive_prefix" = x; then
56169    # As a simple fix, exclude /usr/bin since it's not a real path.
56170    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56171      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56172      # a path prefixed by /cygdrive for fixpath to work.
56173      new_path="$CYGWIN_ROOT_PATH$input_path"
56174    fi
56175  fi
56176
56177
56178  if test "x$path" != "x$new_path"; then
56179    MSVC_DLL="$new_path"
56180    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56181$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56182  fi
56183
56184    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56185
56186  path="$MSVC_DLL"
56187  has_colon=`$ECHO $path | $GREP ^.:`
56188  new_path="$path"
56189  if test "x$has_colon" = x; then
56190    # Not in mixed or Windows style, start by that.
56191    new_path=`cmd //c echo $path`
56192  fi
56193
56194
56195  input_path="$new_path"
56196  # Check if we need to convert this using DOS-style short mode. If the path
56197  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56198  # take no chances and rewrite it.
56199  # Note: m4 eats our [], so we need to use [ and ] instead.
56200  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56201  if test "x$has_forbidden_chars" != x; then
56202    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56203    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56204  fi
56205
56206
56207  windows_path="$new_path"
56208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56209    unix_path=`$CYGPATH -u "$windows_path"`
56210    new_path="$unix_path"
56211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56213    new_path="$unix_path"
56214  fi
56215
56216  if test "x$path" != "x$new_path"; then
56217    MSVC_DLL="$new_path"
56218    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56219$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56220  fi
56221
56222  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56223  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56224
56225    else
56226      # We're on a unix platform. Hooray! :)
56227      path="$MSVC_DLL"
56228      has_space=`$ECHO "$path" | $GREP " "`
56229      if test "x$has_space" != x; then
56230        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56231$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56232        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56233      fi
56234
56235      # Use eval to expand a potential ~
56236      eval path="$path"
56237      if test ! -f "$path" && test ! -d "$path"; then
56238        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56239      fi
56240
56241      if test -d "$path"; then
56242        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56243      else
56244        dir="`$DIRNAME "$path"`"
56245        base="`$BASENAME "$path"`"
56246        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56247      fi
56248    fi
56249  fi
56250
56251      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56252$as_echo_n "checking for $DLL_NAME... " >&6; }
56253      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56254$as_echo "$MSVC_DLL" >&6; }
56255    else
56256      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56257$as_echo "incorrect, ignoring" >&6; }
56258      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56259$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56260    fi
56261  fi
56262
56263    fi
56264  fi
56265
56266  if test "x$MSVC_DLL" = x; then
56267    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
56268    # (This was the original behaviour; kept since it might turn something up)
56269    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
56270      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56271        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56272	    | $GREP x64 | $HEAD --lines 1`
56273      else
56274        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56275	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
56276        if test "x$POSSIBLE_MSVC_DLL" = x; then
56277          # We're grasping at straws now...
56278          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
56279	      | $HEAD --lines 1`
56280        fi
56281      fi
56282
56283
56284  DLL_NAME="$DLL_NAME"
56285  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
56286  METHOD="search of VCINSTALLDIR"
56287  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
56288    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
56289$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
56290
56291    # Need to check if the found msvcr is correct architecture
56292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
56293$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
56294    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
56295    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56296      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
56297      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
56298      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56299        CORRECT_MSVCR_ARCH="PE32 executable"
56300      else
56301        CORRECT_MSVCR_ARCH="PE32+ executable"
56302      fi
56303    else
56304      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
56305        CORRECT_MSVCR_ARCH=386
56306      else
56307        CORRECT_MSVCR_ARCH=x86-64
56308      fi
56309    fi
56310    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
56311      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
56312$as_echo "ok" >&6; }
56313      MSVC_DLL="$POSSIBLE_MSVC_DLL"
56314
56315  # Only process if variable expands to non-empty
56316
56317  if test "x$MSVC_DLL" != x; then
56318    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56319
56320  # Input might be given as Windows format, start by converting to
56321  # unix format.
56322  path="$MSVC_DLL"
56323  new_path=`$CYGPATH -u "$path"`
56324
56325  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
56326  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
56327  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
56328  # "foo.exe" is OK but "foo" is an error.
56329  #
56330  # This test is therefore slightly more accurate than "test -f" to check for file precense.
56331  # It is also a way to make sure we got the proper file name for the real test later on.
56332  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
56333  if test "x$test_shortpath" = x; then
56334    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56335$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56336    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
56337  fi
56338
56339  # Call helper function which possibly converts this using DOS-style short mode.
56340  # If so, the updated path is stored in $new_path.
56341
56342  input_path="$new_path"
56343  # Check if we need to convert this using DOS-style short mode. If the path
56344  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56345  # take no chances and rewrite it.
56346  # Note: m4 eats our [], so we need to use [ and ] instead.
56347  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
56348  if test "x$has_forbidden_chars" != x; then
56349    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56350    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
56351    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
56352    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
56353      # Going to short mode and back again did indeed matter. Since short mode is
56354      # case insensitive, let's make it lowercase to improve readability.
56355      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56356      # Now convert it back to Unix-style (cygpath)
56357      input_path=`$CYGPATH -u "$shortmode_path"`
56358      new_path="$input_path"
56359    fi
56360  fi
56361
56362  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
56363  if test "x$test_cygdrive_prefix" = x; then
56364    # As a simple fix, exclude /usr/bin since it's not a real path.
56365    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
56366      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
56367      # a path prefixed by /cygdrive for fixpath to work.
56368      new_path="$CYGWIN_ROOT_PATH$input_path"
56369    fi
56370  fi
56371
56372
56373  if test "x$path" != "x$new_path"; then
56374    MSVC_DLL="$new_path"
56375    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56376$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56377  fi
56378
56379    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56380
56381  path="$MSVC_DLL"
56382  has_colon=`$ECHO $path | $GREP ^.:`
56383  new_path="$path"
56384  if test "x$has_colon" = x; then
56385    # Not in mixed or Windows style, start by that.
56386    new_path=`cmd //c echo $path`
56387  fi
56388
56389
56390  input_path="$new_path"
56391  # Check if we need to convert this using DOS-style short mode. If the path
56392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
56393  # take no chances and rewrite it.
56394  # Note: m4 eats our [], so we need to use [ and ] instead.
56395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
56396  if test "x$has_forbidden_chars" != x; then
56397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
56398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
56399  fi
56400
56401
56402  windows_path="$new_path"
56403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56404    unix_path=`$CYGPATH -u "$windows_path"`
56405    new_path="$unix_path"
56406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
56408    new_path="$unix_path"
56409  fi
56410
56411  if test "x$path" != "x$new_path"; then
56412    MSVC_DLL="$new_path"
56413    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
56414$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
56415  fi
56416
56417  # Save the first 10 bytes of this path to the storage, so fixpath can work.
56418  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
56419
56420    else
56421      # We're on a unix platform. Hooray! :)
56422      path="$MSVC_DLL"
56423      has_space=`$ECHO "$path" | $GREP " "`
56424      if test "x$has_space" != x; then
56425        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
56426$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
56427        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
56428      fi
56429
56430      # Use eval to expand a potential ~
56431      eval path="$path"
56432      if test ! -f "$path" && test ! -d "$path"; then
56433        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
56434      fi
56435
56436      if test -d "$path"; then
56437        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
56438      else
56439        dir="`$DIRNAME "$path"`"
56440        base="`$BASENAME "$path"`"
56441        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
56442      fi
56443    fi
56444  fi
56445
56446      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56447$as_echo_n "checking for $DLL_NAME... " >&6; }
56448      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
56449$as_echo "$MSVC_DLL" >&6; }
56450    else
56451      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
56452$as_echo "incorrect, ignoring" >&6; }
56453      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
56454$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
56455    fi
56456  fi
56457
56458    fi
56459  fi
56460
56461  if test "x$MSVC_DLL" = x; then
56462    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
56463$as_echo_n "checking for $DLL_NAME... " >&6; }
56464    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56465$as_echo "no" >&6; }
56466    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
56467  fi
56468
56469      MSVCP_DLL="$MSVC_DLL"
56470    fi
56471
56472  fi
56473
56474  fi
56475
56476
56477  if test "x$NEEDS_LIB_X11" = xfalse; then
56478    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
56479      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
56480$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
56481    fi
56482    X_CFLAGS=
56483    X_LIBS=
56484  else
56485
56486    if test "x${with_x}" = xno; then
56487      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
56488    fi
56489
56490    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
56491      # The user has specified a X11 base directory. Use it for includes and
56492      # libraries, unless explicitely overridden.
56493      if test "x$x_includes" = xNONE; then
56494        x_includes="${with_x}/include"
56495      fi
56496      if test "x$x_libraries" = xNONE; then
56497        x_libraries="${with_x}/lib"
56498      fi
56499    else
56500      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
56501      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
56502      # --x-libraries for the sysroot, if that seems to be correct.
56503      if test "x$SYSROOT" != "x"; then
56504        if test "x$x_includes" = xNONE; then
56505          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
56506            x_includes="$SYSROOT/usr/X11R6/include"
56507          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
56508            x_includes="$SYSROOT/usr/include"
56509          fi
56510        fi
56511        if test "x$x_libraries" = xNONE; then
56512          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
56513            x_libraries="$SYSROOT/usr/X11R6/lib"
56514          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
56515            x_libraries="$SYSROOT/usr/lib64"
56516          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
56517            x_libraries="$SYSROOT/usr/lib"
56518          fi
56519        fi
56520      fi
56521    fi
56522
56523    # Now let autoconf do it's magic
56524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
56525$as_echo_n "checking for X... " >&6; }
56526
56527
56528# Check whether --with-x was given.
56529if test "${with_x+set}" = set; then :
56530  withval=$with_x;
56531fi
56532
56533# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56534if test "x$with_x" = xno; then
56535  # The user explicitly disabled X.
56536  have_x=disabled
56537else
56538  case $x_includes,$x_libraries in #(
56539    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56540    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56541  $as_echo_n "(cached) " >&6
56542else
56543  # One or both of the vars are not set, and there is no cached value.
56544ac_x_includes=no ac_x_libraries=no
56545rm -f -r conftest.dir
56546if mkdir conftest.dir; then
56547  cd conftest.dir
56548  cat >Imakefile <<'_ACEOF'
56549incroot:
56550	@echo incroot='${INCROOT}'
56551usrlibdir:
56552	@echo usrlibdir='${USRLIBDIR}'
56553libdir:
56554	@echo libdir='${LIBDIR}'
56555_ACEOF
56556  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56557    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56558    for ac_var in incroot usrlibdir libdir; do
56559      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56560    done
56561    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56562    for ac_extension in a so sl dylib la dll; do
56563      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56564	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56565	ac_im_usrlibdir=$ac_im_libdir; break
56566      fi
56567    done
56568    # Screen out bogus values from the imake configuration.  They are
56569    # bogus both because they are the default anyway, and because
56570    # using them would break gcc on systems where it needs fixed includes.
56571    case $ac_im_incroot in
56572	/usr/include) ac_x_includes= ;;
56573	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56574    esac
56575    case $ac_im_usrlibdir in
56576	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56577	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56578    esac
56579  fi
56580  cd ..
56581  rm -f -r conftest.dir
56582fi
56583
56584# Standard set of common directories for X headers.
56585# Check X11 before X11Rn because it is often a symlink to the current release.
56586ac_x_header_dirs='
56587/usr/X11/include
56588/usr/X11R7/include
56589/usr/X11R6/include
56590/usr/X11R5/include
56591/usr/X11R4/include
56592
56593/usr/include/X11
56594/usr/include/X11R7
56595/usr/include/X11R6
56596/usr/include/X11R5
56597/usr/include/X11R4
56598
56599/usr/local/X11/include
56600/usr/local/X11R7/include
56601/usr/local/X11R6/include
56602/usr/local/X11R5/include
56603/usr/local/X11R4/include
56604
56605/usr/local/include/X11
56606/usr/local/include/X11R7
56607/usr/local/include/X11R6
56608/usr/local/include/X11R5
56609/usr/local/include/X11R4
56610
56611/usr/X386/include
56612/usr/x386/include
56613/usr/XFree86/include/X11
56614
56615/usr/include
56616/usr/local/include
56617/usr/unsupported/include
56618/usr/athena/include
56619/usr/local/x11r5/include
56620/usr/lpp/Xamples/include
56621
56622/usr/openwin/include
56623/usr/openwin/share/include'
56624
56625if test "$ac_x_includes" = no; then
56626  # Guess where to find include files, by looking for Xlib.h.
56627  # First, try using that file with no special directory specified.
56628  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56629/* end confdefs.h.  */
56630#include <X11/Xlib.h>
56631_ACEOF
56632if ac_fn_cxx_try_cpp "$LINENO"; then :
56633  # We can compile using X headers with no special include directory.
56634ac_x_includes=
56635else
56636  for ac_dir in $ac_x_header_dirs; do
56637  if test -r "$ac_dir/X11/Xlib.h"; then
56638    ac_x_includes=$ac_dir
56639    break
56640  fi
56641done
56642fi
56643rm -f conftest.err conftest.i conftest.$ac_ext
56644fi # $ac_x_includes = no
56645
56646if test "$ac_x_libraries" = no; then
56647  # Check for the libraries.
56648  # See if we find them without any special options.
56649  # Don't add to $LIBS permanently.
56650  ac_save_LIBS=$LIBS
56651  LIBS="-lX11 $LIBS"
56652  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56653/* end confdefs.h.  */
56654#include <X11/Xlib.h>
56655int
56656main ()
56657{
56658XrmInitialize ()
56659  ;
56660  return 0;
56661}
56662_ACEOF
56663if ac_fn_cxx_try_link "$LINENO"; then :
56664  LIBS=$ac_save_LIBS
56665# We can link X programs with no special library path.
56666ac_x_libraries=
56667else
56668  LIBS=$ac_save_LIBS
56669for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56670do
56671  # Don't even attempt the hair of trying to link an X program!
56672  for ac_extension in a so sl dylib la dll; do
56673    if test -r "$ac_dir/libX11.$ac_extension"; then
56674      ac_x_libraries=$ac_dir
56675      break 2
56676    fi
56677  done
56678done
56679fi
56680rm -f core conftest.err conftest.$ac_objext \
56681    conftest$ac_exeext conftest.$ac_ext
56682fi # $ac_x_libraries = no
56683
56684case $ac_x_includes,$ac_x_libraries in #(
56685  no,* | *,no | *\'*)
56686    # Didn't find X, or a directory has "'" in its name.
56687    ac_cv_have_x="have_x=no";; #(
56688  *)
56689    # Record where we found X for the cache.
56690    ac_cv_have_x="have_x=yes\
56691	ac_x_includes='$ac_x_includes'\
56692	ac_x_libraries='$ac_x_libraries'"
56693esac
56694fi
56695;; #(
56696    *) have_x=yes;;
56697  esac
56698  eval "$ac_cv_have_x"
56699fi # $with_x != no
56700
56701if test "$have_x" != yes; then
56702  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56703$as_echo "$have_x" >&6; }
56704  no_x=yes
56705else
56706  # If each of the values was on the command line, it overrides each guess.
56707  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56708  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56709  # Update the cache value to reflect the command line values.
56710  ac_cv_have_x="have_x=yes\
56711	ac_x_includes='$x_includes'\
56712	ac_x_libraries='$x_libraries'"
56713  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56714$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56715fi
56716
56717    if test "$no_x" = yes; then
56718  # Not all programs may use this symbol, but it does not hurt to define it.
56719
56720$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56721
56722  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56723else
56724  if test -n "$x_includes"; then
56725    X_CFLAGS="$X_CFLAGS -I$x_includes"
56726  fi
56727
56728  # It would also be nice to do this for all -L options, not just this one.
56729  if test -n "$x_libraries"; then
56730    X_LIBS="$X_LIBS -L$x_libraries"
56731    # For Solaris; some versions of Sun CC require a space after -R and
56732    # others require no space.  Words are not sufficient . . . .
56733    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56734$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56735    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56736    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56737    ac_cxx_werror_flag=yes
56738    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56739/* end confdefs.h.  */
56740
56741int
56742main ()
56743{
56744
56745  ;
56746  return 0;
56747}
56748_ACEOF
56749if ac_fn_cxx_try_link "$LINENO"; then :
56750  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56751$as_echo "no" >&6; }
56752       X_LIBS="$X_LIBS -R$x_libraries"
56753else
56754  LIBS="$ac_xsave_LIBS -R $x_libraries"
56755       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56756/* end confdefs.h.  */
56757
56758int
56759main ()
56760{
56761
56762  ;
56763  return 0;
56764}
56765_ACEOF
56766if ac_fn_cxx_try_link "$LINENO"; then :
56767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56768$as_echo "yes" >&6; }
56769	  X_LIBS="$X_LIBS -R $x_libraries"
56770else
56771  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56772$as_echo "neither works" >&6; }
56773fi
56774rm -f core conftest.err conftest.$ac_objext \
56775    conftest$ac_exeext conftest.$ac_ext
56776fi
56777rm -f core conftest.err conftest.$ac_objext \
56778    conftest$ac_exeext conftest.$ac_ext
56779    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56780    LIBS=$ac_xsave_LIBS
56781  fi
56782
56783  # Check for system-dependent libraries X programs must link with.
56784  # Do this before checking for the system-independent R6 libraries
56785  # (-lICE), since we may need -lsocket or whatever for X linking.
56786
56787  if test "$ISC" = yes; then
56788    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56789  else
56790    # Martyn Johnson says this is needed for Ultrix, if the X
56791    # libraries were built with DECnet support.  And Karl Berry says
56792    # the Alpha needs dnet_stub (dnet does not exist).
56793    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56794    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56795/* end confdefs.h.  */
56796
56797/* Override any GCC internal prototype to avoid an error.
56798   Use char because int might match the return type of a GCC
56799   builtin and then its argument prototype would still apply.  */
56800#ifdef __cplusplus
56801extern "C"
56802#endif
56803char XOpenDisplay ();
56804int
56805main ()
56806{
56807return XOpenDisplay ();
56808  ;
56809  return 0;
56810}
56811_ACEOF
56812if ac_fn_cxx_try_link "$LINENO"; then :
56813
56814else
56815  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56816$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56817if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56818  $as_echo_n "(cached) " >&6
56819else
56820  ac_check_lib_save_LIBS=$LIBS
56821LIBS="-ldnet  $LIBS"
56822cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56823/* end confdefs.h.  */
56824
56825/* Override any GCC internal prototype to avoid an error.
56826   Use char because int might match the return type of a GCC
56827   builtin and then its argument prototype would still apply.  */
56828#ifdef __cplusplus
56829extern "C"
56830#endif
56831char dnet_ntoa ();
56832int
56833main ()
56834{
56835return dnet_ntoa ();
56836  ;
56837  return 0;
56838}
56839_ACEOF
56840if ac_fn_cxx_try_link "$LINENO"; then :
56841  ac_cv_lib_dnet_dnet_ntoa=yes
56842else
56843  ac_cv_lib_dnet_dnet_ntoa=no
56844fi
56845rm -f core conftest.err conftest.$ac_objext \
56846    conftest$ac_exeext conftest.$ac_ext
56847LIBS=$ac_check_lib_save_LIBS
56848fi
56849{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56850$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56851if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56852  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56853fi
56854
56855    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56857$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56858if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56859  $as_echo_n "(cached) " >&6
56860else
56861  ac_check_lib_save_LIBS=$LIBS
56862LIBS="-ldnet_stub  $LIBS"
56863cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56864/* end confdefs.h.  */
56865
56866/* Override any GCC internal prototype to avoid an error.
56867   Use char because int might match the return type of a GCC
56868   builtin and then its argument prototype would still apply.  */
56869#ifdef __cplusplus
56870extern "C"
56871#endif
56872char dnet_ntoa ();
56873int
56874main ()
56875{
56876return dnet_ntoa ();
56877  ;
56878  return 0;
56879}
56880_ACEOF
56881if ac_fn_cxx_try_link "$LINENO"; then :
56882  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56883else
56884  ac_cv_lib_dnet_stub_dnet_ntoa=no
56885fi
56886rm -f core conftest.err conftest.$ac_objext \
56887    conftest$ac_exeext conftest.$ac_ext
56888LIBS=$ac_check_lib_save_LIBS
56889fi
56890{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56891$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56892if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56893  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56894fi
56895
56896    fi
56897fi
56898rm -f core conftest.err conftest.$ac_objext \
56899    conftest$ac_exeext conftest.$ac_ext
56900    LIBS="$ac_xsave_LIBS"
56901
56902    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56903    # to get the SysV transport functions.
56904    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56905    # needs -lnsl.
56906    # The nsl library prevents programs from opening the X display
56907    # on Irix 5.2, according to T.E. Dickey.
56908    # The functions gethostbyname, getservbyname, and inet_addr are
56909    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56910    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56911if test "x$ac_cv_func_gethostbyname" = xyes; then :
56912
56913fi
56914
56915    if test $ac_cv_func_gethostbyname = no; then
56916      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56917$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56918if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56919  $as_echo_n "(cached) " >&6
56920else
56921  ac_check_lib_save_LIBS=$LIBS
56922LIBS="-lnsl  $LIBS"
56923cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56924/* end confdefs.h.  */
56925
56926/* Override any GCC internal prototype to avoid an error.
56927   Use char because int might match the return type of a GCC
56928   builtin and then its argument prototype would still apply.  */
56929#ifdef __cplusplus
56930extern "C"
56931#endif
56932char gethostbyname ();
56933int
56934main ()
56935{
56936return gethostbyname ();
56937  ;
56938  return 0;
56939}
56940_ACEOF
56941if ac_fn_cxx_try_link "$LINENO"; then :
56942  ac_cv_lib_nsl_gethostbyname=yes
56943else
56944  ac_cv_lib_nsl_gethostbyname=no
56945fi
56946rm -f core conftest.err conftest.$ac_objext \
56947    conftest$ac_exeext conftest.$ac_ext
56948LIBS=$ac_check_lib_save_LIBS
56949fi
56950{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56951$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56952if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56953  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56954fi
56955
56956      if test $ac_cv_lib_nsl_gethostbyname = no; then
56957	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56958$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56959if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56960  $as_echo_n "(cached) " >&6
56961else
56962  ac_check_lib_save_LIBS=$LIBS
56963LIBS="-lbsd  $LIBS"
56964cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56965/* end confdefs.h.  */
56966
56967/* Override any GCC internal prototype to avoid an error.
56968   Use char because int might match the return type of a GCC
56969   builtin and then its argument prototype would still apply.  */
56970#ifdef __cplusplus
56971extern "C"
56972#endif
56973char gethostbyname ();
56974int
56975main ()
56976{
56977return gethostbyname ();
56978  ;
56979  return 0;
56980}
56981_ACEOF
56982if ac_fn_cxx_try_link "$LINENO"; then :
56983  ac_cv_lib_bsd_gethostbyname=yes
56984else
56985  ac_cv_lib_bsd_gethostbyname=no
56986fi
56987rm -f core conftest.err conftest.$ac_objext \
56988    conftest$ac_exeext conftest.$ac_ext
56989LIBS=$ac_check_lib_save_LIBS
56990fi
56991{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56992$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56993if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56994  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56995fi
56996
56997      fi
56998    fi
56999
57000    # lieder@skyler.mavd.honeywell.com says without -lsocket,
57001    # socket/setsockopt and other routines are undefined under SCO ODT
57002    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
57003    # on later versions), says Simon Leinen: it contains gethostby*
57004    # variants that don't use the name server (or something).  -lsocket
57005    # must be given before -lnsl if both are needed.  We assume that
57006    # if connect needs -lnsl, so does gethostbyname.
57007    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
57008if test "x$ac_cv_func_connect" = xyes; then :
57009
57010fi
57011
57012    if test $ac_cv_func_connect = no; then
57013      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
57014$as_echo_n "checking for connect in -lsocket... " >&6; }
57015if ${ac_cv_lib_socket_connect+:} false; then :
57016  $as_echo_n "(cached) " >&6
57017else
57018  ac_check_lib_save_LIBS=$LIBS
57019LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
57020cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57021/* end confdefs.h.  */
57022
57023/* Override any GCC internal prototype to avoid an error.
57024   Use char because int might match the return type of a GCC
57025   builtin and then its argument prototype would still apply.  */
57026#ifdef __cplusplus
57027extern "C"
57028#endif
57029char connect ();
57030int
57031main ()
57032{
57033return connect ();
57034  ;
57035  return 0;
57036}
57037_ACEOF
57038if ac_fn_cxx_try_link "$LINENO"; then :
57039  ac_cv_lib_socket_connect=yes
57040else
57041  ac_cv_lib_socket_connect=no
57042fi
57043rm -f core conftest.err conftest.$ac_objext \
57044    conftest$ac_exeext conftest.$ac_ext
57045LIBS=$ac_check_lib_save_LIBS
57046fi
57047{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
57048$as_echo "$ac_cv_lib_socket_connect" >&6; }
57049if test "x$ac_cv_lib_socket_connect" = xyes; then :
57050  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
57051fi
57052
57053    fi
57054
57055    # Guillermo Gomez says -lposix is necessary on A/UX.
57056    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
57057if test "x$ac_cv_func_remove" = xyes; then :
57058
57059fi
57060
57061    if test $ac_cv_func_remove = no; then
57062      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
57063$as_echo_n "checking for remove in -lposix... " >&6; }
57064if ${ac_cv_lib_posix_remove+:} false; then :
57065  $as_echo_n "(cached) " >&6
57066else
57067  ac_check_lib_save_LIBS=$LIBS
57068LIBS="-lposix  $LIBS"
57069cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57070/* end confdefs.h.  */
57071
57072/* Override any GCC internal prototype to avoid an error.
57073   Use char because int might match the return type of a GCC
57074   builtin and then its argument prototype would still apply.  */
57075#ifdef __cplusplus
57076extern "C"
57077#endif
57078char remove ();
57079int
57080main ()
57081{
57082return remove ();
57083  ;
57084  return 0;
57085}
57086_ACEOF
57087if ac_fn_cxx_try_link "$LINENO"; then :
57088  ac_cv_lib_posix_remove=yes
57089else
57090  ac_cv_lib_posix_remove=no
57091fi
57092rm -f core conftest.err conftest.$ac_objext \
57093    conftest$ac_exeext conftest.$ac_ext
57094LIBS=$ac_check_lib_save_LIBS
57095fi
57096{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
57097$as_echo "$ac_cv_lib_posix_remove" >&6; }
57098if test "x$ac_cv_lib_posix_remove" = xyes; then :
57099  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
57100fi
57101
57102    fi
57103
57104    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
57105    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
57106if test "x$ac_cv_func_shmat" = xyes; then :
57107
57108fi
57109
57110    if test $ac_cv_func_shmat = no; then
57111      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
57112$as_echo_n "checking for shmat in -lipc... " >&6; }
57113if ${ac_cv_lib_ipc_shmat+:} false; then :
57114  $as_echo_n "(cached) " >&6
57115else
57116  ac_check_lib_save_LIBS=$LIBS
57117LIBS="-lipc  $LIBS"
57118cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57119/* end confdefs.h.  */
57120
57121/* Override any GCC internal prototype to avoid an error.
57122   Use char because int might match the return type of a GCC
57123   builtin and then its argument prototype would still apply.  */
57124#ifdef __cplusplus
57125extern "C"
57126#endif
57127char shmat ();
57128int
57129main ()
57130{
57131return shmat ();
57132  ;
57133  return 0;
57134}
57135_ACEOF
57136if ac_fn_cxx_try_link "$LINENO"; then :
57137  ac_cv_lib_ipc_shmat=yes
57138else
57139  ac_cv_lib_ipc_shmat=no
57140fi
57141rm -f core conftest.err conftest.$ac_objext \
57142    conftest$ac_exeext conftest.$ac_ext
57143LIBS=$ac_check_lib_save_LIBS
57144fi
57145{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
57146$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
57147if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
57148  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
57149fi
57150
57151    fi
57152  fi
57153
57154  # Check for libraries that X11R6 Xt/Xaw programs need.
57155  ac_save_LDFLAGS=$LDFLAGS
57156  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
57157  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
57158  # check for ICE first), but we must link in the order -lSM -lICE or
57159  # we get undefined symbols.  So assume we have SM if we have ICE.
57160  # These have to be linked with before -lX11, unlike the other
57161  # libraries we check for below, so use a different variable.
57162  # John Interrante, Karl Berry
57163  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
57164$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
57165if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
57166  $as_echo_n "(cached) " >&6
57167else
57168  ac_check_lib_save_LIBS=$LIBS
57169LIBS="-lICE $X_EXTRA_LIBS $LIBS"
57170cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57171/* end confdefs.h.  */
57172
57173/* Override any GCC internal prototype to avoid an error.
57174   Use char because int might match the return type of a GCC
57175   builtin and then its argument prototype would still apply.  */
57176#ifdef __cplusplus
57177extern "C"
57178#endif
57179char IceConnectionNumber ();
57180int
57181main ()
57182{
57183return IceConnectionNumber ();
57184  ;
57185  return 0;
57186}
57187_ACEOF
57188if ac_fn_cxx_try_link "$LINENO"; then :
57189  ac_cv_lib_ICE_IceConnectionNumber=yes
57190else
57191  ac_cv_lib_ICE_IceConnectionNumber=no
57192fi
57193rm -f core conftest.err conftest.$ac_objext \
57194    conftest$ac_exeext conftest.$ac_ext
57195LIBS=$ac_check_lib_save_LIBS
57196fi
57197{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
57198$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
57199if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
57200  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
57201fi
57202
57203  LDFLAGS=$ac_save_LDFLAGS
57204
57205fi
57206
57207
57208    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
57209    # this doesn't make sense so we remove it.
57210    if test "x$COMPILE_TYPE" = xcross; then
57211      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
57212    fi
57213
57214    if test "x$no_x" = xyes; then
57215
57216  # Print a helpful message on how to acquire the necessary build dependency.
57217  # x11 is the help tag: freetype, cups, alsa etc
57218  MISSING_DEPENDENCY=x11
57219
57220  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57221    cygwin_help $MISSING_DEPENDENCY
57222  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57223    msys_help $MISSING_DEPENDENCY
57224  else
57225    PKGHANDLER_COMMAND=
57226
57227    case $PKGHANDLER in
57228      apt-get)
57229        apt_help     $MISSING_DEPENDENCY ;;
57230      yum)
57231        yum_help     $MISSING_DEPENDENCY ;;
57232      port)
57233        port_help    $MISSING_DEPENDENCY ;;
57234      pkgutil)
57235        pkgutil_help $MISSING_DEPENDENCY ;;
57236      pkgadd)
57237        pkgadd_help  $MISSING_DEPENDENCY ;;
57238    esac
57239
57240    if test "x$PKGHANDLER_COMMAND" != x; then
57241      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57242    fi
57243  fi
57244
57245      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
57246    fi
57247
57248    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
57249      OPENWIN_HOME="/usr/openwin"
57250      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
57251      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57252          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
57253          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
57254          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
57255    fi
57256
57257    ac_ext=c
57258ac_cpp='$CPP $CPPFLAGS'
57259ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57260ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57261ac_compiler_gnu=$ac_cv_c_compiler_gnu
57262
57263    OLD_CFLAGS="$CFLAGS"
57264    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
57265
57266    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
57267    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
57268do :
57269  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57270ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
57271          # include <X11/Xlib.h>
57272          # include <X11/Xutil.h>
57273
57274
57275"
57276if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57277  cat >>confdefs.h <<_ACEOF
57278#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57279_ACEOF
57280 X11_HEADERS_OK=yes
57281else
57282  X11_HEADERS_OK=no; break
57283fi
57284
57285done
57286
57287
57288    if test "x$X11_HEADERS_OK" = xno; then
57289
57290  # Print a helpful message on how to acquire the necessary build dependency.
57291  # x11 is the help tag: freetype, cups, alsa etc
57292  MISSING_DEPENDENCY=x11
57293
57294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57295    cygwin_help $MISSING_DEPENDENCY
57296  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57297    msys_help $MISSING_DEPENDENCY
57298  else
57299    PKGHANDLER_COMMAND=
57300
57301    case $PKGHANDLER in
57302      apt-get)
57303        apt_help     $MISSING_DEPENDENCY ;;
57304      yum)
57305        yum_help     $MISSING_DEPENDENCY ;;
57306      port)
57307        port_help    $MISSING_DEPENDENCY ;;
57308      pkgutil)
57309        pkgutil_help $MISSING_DEPENDENCY ;;
57310      pkgadd)
57311        pkgadd_help  $MISSING_DEPENDENCY ;;
57312    esac
57313
57314    if test "x$PKGHANDLER_COMMAND" != x; then
57315      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57316    fi
57317  fi
57318
57319      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
57320    fi
57321
57322    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
57323    # defined in libawt_xawt.
57324    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
57325$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
57326    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
57327/* end confdefs.h.  */
57328#include <X11/extensions/Xrender.h>
57329int
57330main ()
57331{
57332XLinearGradient x;
57333  ;
57334  return 0;
57335}
57336_ACEOF
57337if ac_fn_c_try_compile "$LINENO"; then :
57338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57339$as_echo "yes" >&6; }
57340else
57341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57342$as_echo "no" >&6; }
57343         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
57344fi
57345rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
57346
57347    CFLAGS="$OLD_CFLAGS"
57348    ac_ext=cpp
57349ac_cpp='$CXXCPP $CPPFLAGS'
57350ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
57351ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
57352ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
57353
57354  fi # NEEDS_LIB_X11
57355
57356
57357
57358
57359
57360
57361# Check whether --with-cups was given.
57362if test "${with_cups+set}" = set; then :
57363  withval=$with_cups;
57364fi
57365
57366
57367# Check whether --with-cups-include was given.
57368if test "${with_cups_include+set}" = set; then :
57369  withval=$with_cups_include;
57370fi
57371
57372
57373  if test "x$NEEDS_LIB_CUPS" = xfalse; then
57374    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
57375        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
57376      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
57377$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
57378    fi
57379    CUPS_CFLAGS=
57380  else
57381    CUPS_FOUND=no
57382
57383    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
57384      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
57385    fi
57386
57387    if test "x${with_cups}" != x; then
57388      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57389$as_echo_n "checking for cups headers... " >&6; }
57390      if test -s "${with_cups}/include/cups/cups.h"; then
57391        CUPS_CFLAGS="-I${with_cups}/include"
57392        CUPS_FOUND=yes
57393        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57394$as_echo "$CUPS_FOUND" >&6; }
57395      else
57396        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
57397      fi
57398    fi
57399    if test "x${with_cups_include}" != x; then
57400      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57401$as_echo_n "checking for cups headers... " >&6; }
57402      if test -s "${with_cups_include}/cups/cups.h"; then
57403        CUPS_CFLAGS="-I${with_cups_include}"
57404        CUPS_FOUND=yes
57405        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57406$as_echo "$CUPS_FOUND" >&6; }
57407      else
57408        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
57409      fi
57410    fi
57411    if test "x$CUPS_FOUND" = xno; then
57412      # Are the cups headers installed in the default /usr/include location?
57413      for ac_header in cups/cups.h cups/ppd.h
57414do :
57415  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
57416ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
57417if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
57418  cat >>confdefs.h <<_ACEOF
57419#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
57420_ACEOF
57421
57422          CUPS_FOUND=yes
57423          CUPS_CFLAGS=
57424          DEFAULT_CUPS=yes
57425
57426fi
57427
57428done
57429
57430    fi
57431    if test "x$CUPS_FOUND" = xno; then
57432      # Getting nervous now? Lets poke around for standard Solaris third-party
57433      # package installation locations.
57434      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
57435$as_echo_n "checking for cups headers... " >&6; }
57436      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
57437        # An SFW package seems to be installed!
57438        CUPS_FOUND=yes
57439        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
57440      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
57441        # A CSW package seems to be installed!
57442        CUPS_FOUND=yes
57443        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
57444      fi
57445      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
57446$as_echo "$CUPS_FOUND" >&6; }
57447    fi
57448    if test "x$CUPS_FOUND" = xno; then
57449
57450  # Print a helpful message on how to acquire the necessary build dependency.
57451  # cups is the help tag: freetype, cups, alsa etc
57452  MISSING_DEPENDENCY=cups
57453
57454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57455    cygwin_help $MISSING_DEPENDENCY
57456  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57457    msys_help $MISSING_DEPENDENCY
57458  else
57459    PKGHANDLER_COMMAND=
57460
57461    case $PKGHANDLER in
57462      apt-get)
57463        apt_help     $MISSING_DEPENDENCY ;;
57464      yum)
57465        yum_help     $MISSING_DEPENDENCY ;;
57466      port)
57467        port_help    $MISSING_DEPENDENCY ;;
57468      pkgutil)
57469        pkgutil_help $MISSING_DEPENDENCY ;;
57470      pkgadd)
57471        pkgadd_help  $MISSING_DEPENDENCY ;;
57472    esac
57473
57474    if test "x$PKGHANDLER_COMMAND" != x; then
57475      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
57476    fi
57477  fi
57478
57479      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
57480    fi
57481  fi
57482
57483
57484
57485
57486
57487# Check whether --with-freetype was given.
57488if test "${with_freetype+set}" = set; then :
57489  withval=$with_freetype;
57490fi
57491
57492
57493# Check whether --with-freetype-include was given.
57494if test "${with_freetype_include+set}" = set; then :
57495  withval=$with_freetype_include;
57496fi
57497
57498
57499# Check whether --with-freetype-lib was given.
57500if test "${with_freetype_lib+set}" = set; then :
57501  withval=$with_freetype_lib;
57502fi
57503
57504
57505# Check whether --with-freetype-src was given.
57506if test "${with_freetype_src+set}" = set; then :
57507  withval=$with_freetype_src;
57508fi
57509
57510  # Check whether --enable-freetype-bundling was given.
57511if test "${enable_freetype_bundling+set}" = set; then :
57512  enableval=$enable_freetype_bundling;
57513fi
57514
57515
57516  # Need to specify explicitly since it needs to be overridden on some versions of macosx
57517  FREETYPE_BASE_NAME=freetype
57518  FREETYPE_CFLAGS=
57519  FREETYPE_LIBS=
57520  FREETYPE_BUNDLE_LIB_PATH=
57521
57522  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
57523    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
57524        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
57525        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
57526        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
57527      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
57528$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
57529    fi
57530    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
57531      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
57532$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
57533    fi
57534  else
57535    # freetype is needed to build; go get it!
57536
57537    BUNDLE_FREETYPE="$enable_freetype_bundling"
57538
57539    if  test "x$with_freetype_src" != x; then
57540      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57541        # Try to build freetype if --with-freetype-src was given on Windows
57542
57543  FREETYPE_SRC_PATH="$with_freetype_src"
57544  BUILD_FREETYPE=yes
57545
57546  # Check if the freetype sources are acessible..
57547  if ! test -d $FREETYPE_SRC_PATH; then
57548    { $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
57549$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57550    BUILD_FREETYPE=no
57551  fi
57552  # ..and contain a vc2010 project file
57553  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57554  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57555    { $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
57556$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57557    BUILD_FREETYPE=no
57558  fi
57559  # Now check if configure found a version of 'msbuild.exe'
57560  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57561    { $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
57562$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;}
57563    BUILD_FREETYPE=no
57564  fi
57565
57566  # Ready to go..
57567  if test "x$BUILD_FREETYPE" = xyes; then
57568    # msbuild requires trailing slashes for output directories
57569    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57570    freetype_lib_path_unix="$freetype_lib_path"
57571    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57572
57573  unix_path="$vcxproj_path"
57574  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57575    windows_path=`$CYGPATH -m "$unix_path"`
57576    vcxproj_path="$windows_path"
57577  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57578    windows_path=`cmd //c echo $unix_path`
57579    vcxproj_path="$windows_path"
57580  fi
57581
57582
57583  unix_path="$freetype_lib_path"
57584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57585    windows_path=`$CYGPATH -m "$unix_path"`
57586    freetype_lib_path="$windows_path"
57587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57588    windows_path=`cmd //c echo $unix_path`
57589    freetype_lib_path="$windows_path"
57590  fi
57591
57592
57593  unix_path="$freetype_obj_path"
57594  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57595    windows_path=`$CYGPATH -m "$unix_path"`
57596    freetype_obj_path="$windows_path"
57597  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57598    windows_path=`cmd //c echo $unix_path`
57599    freetype_obj_path="$windows_path"
57600  fi
57601
57602    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57603      freetype_platform=x64
57604    else
57605      freetype_platform=win32
57606    fi
57607
57608    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57609    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57610    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57611    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57612    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57613$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57614
57615    # First we try to build the freetype.dll
57616    $ECHO -e "@echo off\n"\
57617        "$MSBUILD $vcxproj_path "\
57618        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57619        "/p:Configuration=\"Release Multithreaded\" "\
57620        "/p:Platform=$freetype_platform "\
57621        "/p:ConfigurationType=DynamicLibrary "\
57622        "/p:TargetName=freetype "\
57623        "/p:OutDir=\"$freetype_lib_path\" "\
57624        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57625    cmd /c freetype.bat
57626
57627    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57628      # If that succeeds we also build freetype.lib
57629      $ECHO -e "@echo off\n"\
57630          "$MSBUILD $vcxproj_path "\
57631          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57632          "/p:Configuration=\"Release Multithreaded\" "\
57633          "/p:Platform=$freetype_platform "\
57634          "/p:ConfigurationType=StaticLibrary "\
57635          "/p:TargetName=freetype "\
57636          "/p:OutDir=\"$freetype_lib_path\" "\
57637          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57638      cmd /c freetype.bat
57639
57640      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57641        # Once we build both, lib and dll, set freetype lib and include path appropriately
57642        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57643        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57644        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57645$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57646      else
57647        BUILD_FREETYPE=no
57648      fi
57649    else
57650      BUILD_FREETYPE=no
57651    fi
57652  fi
57653
57654        if test "x$BUILD_FREETYPE" = xyes; then
57655          # Okay, we built it. Check that it works.
57656
57657  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57658  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57659  METHOD="--with-freetype-src"
57660
57661  # Let's start with an optimistic view of the world :-)
57662  FOUND_FREETYPE=yes
57663
57664  # First look for the canonical freetype main include file ft2build.h.
57665  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57666    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57667    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57668    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57669      # Fail.
57670      FOUND_FREETYPE=no
57671    fi
57672  fi
57673
57674  if test "x$FOUND_FREETYPE" = xyes; then
57675    # Include file found, let's continue the sanity check.
57676    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57677$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57678
57679    # Reset to default value
57680    FREETYPE_BASE_NAME=freetype
57681    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57682    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57683      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57684          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57685        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57686        # for the .6 version explicitly.
57687        FREETYPE_BASE_NAME=freetype.6
57688        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57689        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57690$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57691      else
57692        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57693$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57694        FOUND_FREETYPE=no
57695      fi
57696    else
57697      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57698        # On Windows, we will need both .lib and .dll file.
57699        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57700          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57701$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57702          FOUND_FREETYPE=no
57703        fi
57704      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57705          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57706        # Found lib in isa dir, use that instead.
57707        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57708        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57709$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57710      fi
57711    fi
57712  fi
57713
57714  if test "x$FOUND_FREETYPE" = xyes; then
57715
57716  # Only process if variable expands to non-empty
57717
57718  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57719    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57720
57721  # Input might be given as Windows format, start by converting to
57722  # unix format.
57723  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57724  new_path=`$CYGPATH -u "$path"`
57725
57726  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57727  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57728  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57729  # "foo.exe" is OK but "foo" is an error.
57730  #
57731  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57732  # It is also a way to make sure we got the proper file name for the real test later on.
57733  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57734  if test "x$test_shortpath" = x; then
57735    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57736$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57737    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57738  fi
57739
57740  # Call helper function which possibly converts this using DOS-style short mode.
57741  # If so, the updated path is stored in $new_path.
57742
57743  input_path="$new_path"
57744  # Check if we need to convert this using DOS-style short mode. If the path
57745  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57746  # take no chances and rewrite it.
57747  # Note: m4 eats our [], so we need to use [ and ] instead.
57748  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57749  if test "x$has_forbidden_chars" != x; then
57750    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57751    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57752    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57753    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57754      # Going to short mode and back again did indeed matter. Since short mode is
57755      # case insensitive, let's make it lowercase to improve readability.
57756      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57757      # Now convert it back to Unix-style (cygpath)
57758      input_path=`$CYGPATH -u "$shortmode_path"`
57759      new_path="$input_path"
57760    fi
57761  fi
57762
57763  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57764  if test "x$test_cygdrive_prefix" = x; then
57765    # As a simple fix, exclude /usr/bin since it's not a real path.
57766    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57767      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57768      # a path prefixed by /cygdrive for fixpath to work.
57769      new_path="$CYGWIN_ROOT_PATH$input_path"
57770    fi
57771  fi
57772
57773
57774  if test "x$path" != "x$new_path"; then
57775    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57776    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57777$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57778  fi
57779
57780    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57781
57782  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57783  has_colon=`$ECHO $path | $GREP ^.:`
57784  new_path="$path"
57785  if test "x$has_colon" = x; then
57786    # Not in mixed or Windows style, start by that.
57787    new_path=`cmd //c echo $path`
57788  fi
57789
57790
57791  input_path="$new_path"
57792  # Check if we need to convert this using DOS-style short mode. If the path
57793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57794  # take no chances and rewrite it.
57795  # Note: m4 eats our [], so we need to use [ and ] instead.
57796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57797  if test "x$has_forbidden_chars" != x; then
57798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57799    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57800  fi
57801
57802
57803  windows_path="$new_path"
57804  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57805    unix_path=`$CYGPATH -u "$windows_path"`
57806    new_path="$unix_path"
57807  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57808    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57809    new_path="$unix_path"
57810  fi
57811
57812  if test "x$path" != "x$new_path"; then
57813    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57814    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57815$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57816  fi
57817
57818  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57819  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57820
57821    else
57822      # We're on a unix platform. Hooray! :)
57823      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57824      has_space=`$ECHO "$path" | $GREP " "`
57825      if test "x$has_space" != x; then
57826        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57827$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57828        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57829      fi
57830
57831      # Use eval to expand a potential ~
57832      eval path="$path"
57833      if test ! -f "$path" && test ! -d "$path"; then
57834        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57835      fi
57836
57837      if test -d "$path"; then
57838        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57839      else
57840        dir="`$DIRNAME "$path"`"
57841        base="`$BASENAME "$path"`"
57842        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57843      fi
57844    fi
57845  fi
57846
57847
57848  # Only process if variable expands to non-empty
57849
57850  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57852
57853  # Input might be given as Windows format, start by converting to
57854  # unix format.
57855  path="$POTENTIAL_FREETYPE_LIB_PATH"
57856  new_path=`$CYGPATH -u "$path"`
57857
57858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57861  # "foo.exe" is OK but "foo" is an error.
57862  #
57863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57864  # It is also a way to make sure we got the proper file name for the real test later on.
57865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57866  if test "x$test_shortpath" = x; then
57867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57868$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57869    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57870  fi
57871
57872  # Call helper function which possibly converts this using DOS-style short mode.
57873  # If so, the updated path is stored in $new_path.
57874
57875  input_path="$new_path"
57876  # Check if we need to convert this using DOS-style short mode. If the path
57877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57878  # take no chances and rewrite it.
57879  # Note: m4 eats our [], so we need to use [ and ] instead.
57880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57881  if test "x$has_forbidden_chars" != x; then
57882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57886      # Going to short mode and back again did indeed matter. Since short mode is
57887      # case insensitive, let's make it lowercase to improve readability.
57888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57889      # Now convert it back to Unix-style (cygpath)
57890      input_path=`$CYGPATH -u "$shortmode_path"`
57891      new_path="$input_path"
57892    fi
57893  fi
57894
57895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57896  if test "x$test_cygdrive_prefix" = x; then
57897    # As a simple fix, exclude /usr/bin since it's not a real path.
57898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57900      # a path prefixed by /cygdrive for fixpath to work.
57901      new_path="$CYGWIN_ROOT_PATH$input_path"
57902    fi
57903  fi
57904
57905
57906  if test "x$path" != "x$new_path"; then
57907    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57909$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57910  fi
57911
57912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57913
57914  path="$POTENTIAL_FREETYPE_LIB_PATH"
57915  has_colon=`$ECHO $path | $GREP ^.:`
57916  new_path="$path"
57917  if test "x$has_colon" = x; then
57918    # Not in mixed or Windows style, start by that.
57919    new_path=`cmd //c echo $path`
57920  fi
57921
57922
57923  input_path="$new_path"
57924  # Check if we need to convert this using DOS-style short mode. If the path
57925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57926  # take no chances and rewrite it.
57927  # Note: m4 eats our [], so we need to use [ and ] instead.
57928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57929  if test "x$has_forbidden_chars" != x; then
57930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57932  fi
57933
57934
57935  windows_path="$new_path"
57936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57937    unix_path=`$CYGPATH -u "$windows_path"`
57938    new_path="$unix_path"
57939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57941    new_path="$unix_path"
57942  fi
57943
57944  if test "x$path" != "x$new_path"; then
57945    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57947$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57948  fi
57949
57950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57952
57953    else
57954      # We're on a unix platform. Hooray! :)
57955      path="$POTENTIAL_FREETYPE_LIB_PATH"
57956      has_space=`$ECHO "$path" | $GREP " "`
57957      if test "x$has_space" != x; then
57958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57959$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57961      fi
57962
57963      # Use eval to expand a potential ~
57964      eval path="$path"
57965      if test ! -f "$path" && test ! -d "$path"; then
57966        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57967      fi
57968
57969      if test -d "$path"; then
57970        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57971      else
57972        dir="`$DIRNAME "$path"`"
57973        base="`$BASENAME "$path"`"
57974        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57975      fi
57976    fi
57977  fi
57978
57979
57980    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57981    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57982$as_echo_n "checking for freetype includes... " >&6; }
57983    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57984$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57985    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57986    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57987$as_echo_n "checking for freetype libraries... " >&6; }
57988    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57989$as_echo "$FREETYPE_LIB_PATH" >&6; }
57990  fi
57991
57992          if test "x$FOUND_FREETYPE" != xyes; then
57993            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57994          fi
57995        else
57996          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57997$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57998          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57999        fi
58000      else
58001        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
58002$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
58003      fi
58004    fi
58005
58006    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
58007      # User has specified settings
58008
58009      if test "x$BUNDLE_FREETYPE" = x; then
58010        # If not specified, default is to bundle freetype
58011        BUNDLE_FREETYPE=yes
58012      fi
58013
58014      if test "x$with_freetype" != x; then
58015        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
58016        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
58017      fi
58018
58019      # Allow --with-freetype-lib and --with-freetype-include to override
58020      if test "x$with_freetype_include" != x; then
58021        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
58022      fi
58023      if test "x$with_freetype_lib" != x; then
58024        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
58025      fi
58026
58027      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58028        # Okay, we got it. Check that it works.
58029
58030  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58031  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58032  METHOD="--with-freetype"
58033
58034  # Let's start with an optimistic view of the world :-)
58035  FOUND_FREETYPE=yes
58036
58037  # First look for the canonical freetype main include file ft2build.h.
58038  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58039    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58040    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58041    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58042      # Fail.
58043      FOUND_FREETYPE=no
58044    fi
58045  fi
58046
58047  if test "x$FOUND_FREETYPE" = xyes; then
58048    # Include file found, let's continue the sanity check.
58049    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58050$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58051
58052    # Reset to default value
58053    FREETYPE_BASE_NAME=freetype
58054    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58055    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58056      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58057          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58058        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58059        # for the .6 version explicitly.
58060        FREETYPE_BASE_NAME=freetype.6
58061        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58062        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58063$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58064      else
58065        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58066$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58067        FOUND_FREETYPE=no
58068      fi
58069    else
58070      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58071        # On Windows, we will need both .lib and .dll file.
58072        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58073          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58074$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58075          FOUND_FREETYPE=no
58076        fi
58077      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58078          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58079        # Found lib in isa dir, use that instead.
58080        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58081        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58082$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58083      fi
58084    fi
58085  fi
58086
58087  if test "x$FOUND_FREETYPE" = xyes; then
58088
58089  # Only process if variable expands to non-empty
58090
58091  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58092    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58093
58094  # Input might be given as Windows format, start by converting to
58095  # unix format.
58096  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58097  new_path=`$CYGPATH -u "$path"`
58098
58099  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58100  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58101  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58102  # "foo.exe" is OK but "foo" is an error.
58103  #
58104  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58105  # It is also a way to make sure we got the proper file name for the real test later on.
58106  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58107  if test "x$test_shortpath" = x; then
58108    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58109$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58110    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58111  fi
58112
58113  # Call helper function which possibly converts this using DOS-style short mode.
58114  # If so, the updated path is stored in $new_path.
58115
58116  input_path="$new_path"
58117  # Check if we need to convert this using DOS-style short mode. If the path
58118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58119  # take no chances and rewrite it.
58120  # Note: m4 eats our [], so we need to use [ and ] instead.
58121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58122  if test "x$has_forbidden_chars" != x; then
58123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58124    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58125    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58126    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58127      # Going to short mode and back again did indeed matter. Since short mode is
58128      # case insensitive, let's make it lowercase to improve readability.
58129      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58130      # Now convert it back to Unix-style (cygpath)
58131      input_path=`$CYGPATH -u "$shortmode_path"`
58132      new_path="$input_path"
58133    fi
58134  fi
58135
58136  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58137  if test "x$test_cygdrive_prefix" = x; then
58138    # As a simple fix, exclude /usr/bin since it's not a real path.
58139    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58140      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58141      # a path prefixed by /cygdrive for fixpath to work.
58142      new_path="$CYGWIN_ROOT_PATH$input_path"
58143    fi
58144  fi
58145
58146
58147  if test "x$path" != "x$new_path"; then
58148    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58149    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58150$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58151  fi
58152
58153    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58154
58155  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58156  has_colon=`$ECHO $path | $GREP ^.:`
58157  new_path="$path"
58158  if test "x$has_colon" = x; then
58159    # Not in mixed or Windows style, start by that.
58160    new_path=`cmd //c echo $path`
58161  fi
58162
58163
58164  input_path="$new_path"
58165  # Check if we need to convert this using DOS-style short mode. If the path
58166  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58167  # take no chances and rewrite it.
58168  # Note: m4 eats our [], so we need to use [ and ] instead.
58169  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58170  if test "x$has_forbidden_chars" != x; then
58171    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58172    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58173  fi
58174
58175
58176  windows_path="$new_path"
58177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58178    unix_path=`$CYGPATH -u "$windows_path"`
58179    new_path="$unix_path"
58180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58182    new_path="$unix_path"
58183  fi
58184
58185  if test "x$path" != "x$new_path"; then
58186    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58187    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58188$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58189  fi
58190
58191  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58192  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58193
58194    else
58195      # We're on a unix platform. Hooray! :)
58196      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58197      has_space=`$ECHO "$path" | $GREP " "`
58198      if test "x$has_space" != x; then
58199        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58200$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58201        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58202      fi
58203
58204      # Use eval to expand a potential ~
58205      eval path="$path"
58206      if test ! -f "$path" && test ! -d "$path"; then
58207        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58208      fi
58209
58210      if test -d "$path"; then
58211        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58212      else
58213        dir="`$DIRNAME "$path"`"
58214        base="`$BASENAME "$path"`"
58215        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58216      fi
58217    fi
58218  fi
58219
58220
58221  # Only process if variable expands to non-empty
58222
58223  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58224    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58225
58226  # Input might be given as Windows format, start by converting to
58227  # unix format.
58228  path="$POTENTIAL_FREETYPE_LIB_PATH"
58229  new_path=`$CYGPATH -u "$path"`
58230
58231  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58232  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58233  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58234  # "foo.exe" is OK but "foo" is an error.
58235  #
58236  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58237  # It is also a way to make sure we got the proper file name for the real test later on.
58238  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58239  if test "x$test_shortpath" = x; then
58240    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58241$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58242    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58243  fi
58244
58245  # Call helper function which possibly converts this using DOS-style short mode.
58246  # If so, the updated path is stored in $new_path.
58247
58248  input_path="$new_path"
58249  # Check if we need to convert this using DOS-style short mode. If the path
58250  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58251  # take no chances and rewrite it.
58252  # Note: m4 eats our [], so we need to use [ and ] instead.
58253  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58254  if test "x$has_forbidden_chars" != x; then
58255    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58256    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58257    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58258    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58259      # Going to short mode and back again did indeed matter. Since short mode is
58260      # case insensitive, let's make it lowercase to improve readability.
58261      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58262      # Now convert it back to Unix-style (cygpath)
58263      input_path=`$CYGPATH -u "$shortmode_path"`
58264      new_path="$input_path"
58265    fi
58266  fi
58267
58268  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58269  if test "x$test_cygdrive_prefix" = x; then
58270    # As a simple fix, exclude /usr/bin since it's not a real path.
58271    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58272      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58273      # a path prefixed by /cygdrive for fixpath to work.
58274      new_path="$CYGWIN_ROOT_PATH$input_path"
58275    fi
58276  fi
58277
58278
58279  if test "x$path" != "x$new_path"; then
58280    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58281    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58282$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58283  fi
58284
58285    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58286
58287  path="$POTENTIAL_FREETYPE_LIB_PATH"
58288  has_colon=`$ECHO $path | $GREP ^.:`
58289  new_path="$path"
58290  if test "x$has_colon" = x; then
58291    # Not in mixed or Windows style, start by that.
58292    new_path=`cmd //c echo $path`
58293  fi
58294
58295
58296  input_path="$new_path"
58297  # Check if we need to convert this using DOS-style short mode. If the path
58298  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58299  # take no chances and rewrite it.
58300  # Note: m4 eats our [], so we need to use [ and ] instead.
58301  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58302  if test "x$has_forbidden_chars" != x; then
58303    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58304    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58305  fi
58306
58307
58308  windows_path="$new_path"
58309  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58310    unix_path=`$CYGPATH -u "$windows_path"`
58311    new_path="$unix_path"
58312  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58313    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58314    new_path="$unix_path"
58315  fi
58316
58317  if test "x$path" != "x$new_path"; then
58318    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58321  fi
58322
58323  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58324  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58325
58326    else
58327      # We're on a unix platform. Hooray! :)
58328      path="$POTENTIAL_FREETYPE_LIB_PATH"
58329      has_space=`$ECHO "$path" | $GREP " "`
58330      if test "x$has_space" != x; then
58331        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58332$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58333        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58334      fi
58335
58336      # Use eval to expand a potential ~
58337      eval path="$path"
58338      if test ! -f "$path" && test ! -d "$path"; then
58339        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58340      fi
58341
58342      if test -d "$path"; then
58343        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58344      else
58345        dir="`$DIRNAME "$path"`"
58346        base="`$BASENAME "$path"`"
58347        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58348      fi
58349    fi
58350  fi
58351
58352
58353    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58354    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58355$as_echo_n "checking for freetype includes... " >&6; }
58356    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58357$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58358    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58359    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58360$as_echo_n "checking for freetype libraries... " >&6; }
58361    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58362$as_echo "$FREETYPE_LIB_PATH" >&6; }
58363  fi
58364
58365        if test "x$FOUND_FREETYPE" != xyes; then
58366          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
58367        fi
58368      else
58369        # User specified only one of lib or include. This is an error.
58370        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
58371          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
58372$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
58373          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58374        else
58375          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
58376$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
58377          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
58378        fi
58379      fi
58380    else
58381      # User did not specify settings, but we need freetype. Try to locate it.
58382
58383      if test "x$BUNDLE_FREETYPE" = x; then
58384        # If not specified, default is to bundle freetype only on windows
58385        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58386          BUNDLE_FREETYPE=yes
58387        else
58388          BUNDLE_FREETYPE=no
58389        fi
58390      fi
58391
58392      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
58393      if test "x$SYSROOT" = x; then
58394        if test "x$FOUND_FREETYPE" != xyes; then
58395          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
58396          if test "x$PKG_CONFIG" != x; then
58397
58398pkg_failed=no
58399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
58400$as_echo_n "checking for FREETYPE... " >&6; }
58401
58402if test -n "$FREETYPE_CFLAGS"; then
58403    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
58404 elif test -n "$PKG_CONFIG"; then
58405    if test -n "$PKG_CONFIG" && \
58406    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58407  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58408  ac_status=$?
58409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58410  test $ac_status = 0; }; then
58411  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
58412else
58413  pkg_failed=yes
58414fi
58415 else
58416    pkg_failed=untried
58417fi
58418if test -n "$FREETYPE_LIBS"; then
58419    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
58420 elif test -n "$PKG_CONFIG"; then
58421    if test -n "$PKG_CONFIG" && \
58422    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
58423  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
58424  ac_status=$?
58425  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
58426  test $ac_status = 0; }; then
58427  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
58428else
58429  pkg_failed=yes
58430fi
58431 else
58432    pkg_failed=untried
58433fi
58434
58435
58436
58437if test $pkg_failed = yes; then
58438
58439if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
58440        _pkg_short_errors_supported=yes
58441else
58442        _pkg_short_errors_supported=no
58443fi
58444        if test $_pkg_short_errors_supported = yes; then
58445	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
58446        else
58447	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
58448        fi
58449	# Put the nasty error message in config.log where it belongs
58450	echo "$FREETYPE_PKG_ERRORS" >&5
58451
58452	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
58453$as_echo "no" >&6; }
58454                FOUND_FREETYPE=no
58455elif test $pkg_failed = untried; then
58456	FOUND_FREETYPE=no
58457else
58458	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
58459	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
58460        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
58461$as_echo "yes" >&6; }
58462	FOUND_FREETYPE=yes
58463fi
58464            if test "x$FOUND_FREETYPE" = xyes; then
58465              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
58466              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
58467              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
58468              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
58469                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
58470              fi
58471              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
58472              if test "x$BUNDLE_FREETYPE" = xyes; then
58473                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
58474$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
58475                FOUND_FREETYPE=no
58476              else
58477                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
58478$as_echo_n "checking for freetype... " >&6; }
58479                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
58480$as_echo "yes (using pkg-config)" >&6; }
58481              fi
58482            fi
58483          fi
58484        fi
58485      fi
58486
58487      if test "x$FOUND_FREETYPE" != xyes; then
58488        # Check in well-known locations
58489        if test "x$OPENJDK_TARGET_OS" = xwindows; then
58490          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
58491
58492  windows_path="$FREETYPE_BASE_DIR"
58493  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58494    unix_path=`$CYGPATH -u "$windows_path"`
58495    FREETYPE_BASE_DIR="$unix_path"
58496  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58497    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58498    FREETYPE_BASE_DIR="$unix_path"
58499  fi
58500
58501
58502  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58503  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58504  METHOD="well-known location"
58505
58506  # Let's start with an optimistic view of the world :-)
58507  FOUND_FREETYPE=yes
58508
58509  # First look for the canonical freetype main include file ft2build.h.
58510  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58511    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58512    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58513    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58514      # Fail.
58515      FOUND_FREETYPE=no
58516    fi
58517  fi
58518
58519  if test "x$FOUND_FREETYPE" = xyes; then
58520    # Include file found, let's continue the sanity check.
58521    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58522$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58523
58524    # Reset to default value
58525    FREETYPE_BASE_NAME=freetype
58526    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58527    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58528      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58529          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58530        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58531        # for the .6 version explicitly.
58532        FREETYPE_BASE_NAME=freetype.6
58533        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58534        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58535$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58536      else
58537        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58538$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58539        FOUND_FREETYPE=no
58540      fi
58541    else
58542      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58543        # On Windows, we will need both .lib and .dll file.
58544        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58545          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58546$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58547          FOUND_FREETYPE=no
58548        fi
58549      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58550          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58551        # Found lib in isa dir, use that instead.
58552        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58553        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58554$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58555      fi
58556    fi
58557  fi
58558
58559  if test "x$FOUND_FREETYPE" = xyes; then
58560
58561  # Only process if variable expands to non-empty
58562
58563  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58564    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58565
58566  # Input might be given as Windows format, start by converting to
58567  # unix format.
58568  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58569  new_path=`$CYGPATH -u "$path"`
58570
58571  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58572  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58573  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58574  # "foo.exe" is OK but "foo" is an error.
58575  #
58576  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58577  # It is also a way to make sure we got the proper file name for the real test later on.
58578  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58579  if test "x$test_shortpath" = x; then
58580    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58581$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58582    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58583  fi
58584
58585  # Call helper function which possibly converts this using DOS-style short mode.
58586  # If so, the updated path is stored in $new_path.
58587
58588  input_path="$new_path"
58589  # Check if we need to convert this using DOS-style short mode. If the path
58590  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58591  # take no chances and rewrite it.
58592  # Note: m4 eats our [], so we need to use [ and ] instead.
58593  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58594  if test "x$has_forbidden_chars" != x; then
58595    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58596    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58597    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58598    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58599      # Going to short mode and back again did indeed matter. Since short mode is
58600      # case insensitive, let's make it lowercase to improve readability.
58601      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58602      # Now convert it back to Unix-style (cygpath)
58603      input_path=`$CYGPATH -u "$shortmode_path"`
58604      new_path="$input_path"
58605    fi
58606  fi
58607
58608  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58609  if test "x$test_cygdrive_prefix" = x; then
58610    # As a simple fix, exclude /usr/bin since it's not a real path.
58611    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58612      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58613      # a path prefixed by /cygdrive for fixpath to work.
58614      new_path="$CYGWIN_ROOT_PATH$input_path"
58615    fi
58616  fi
58617
58618
58619  if test "x$path" != "x$new_path"; then
58620    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58621    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58622$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58623  fi
58624
58625    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58626
58627  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58628  has_colon=`$ECHO $path | $GREP ^.:`
58629  new_path="$path"
58630  if test "x$has_colon" = x; then
58631    # Not in mixed or Windows style, start by that.
58632    new_path=`cmd //c echo $path`
58633  fi
58634
58635
58636  input_path="$new_path"
58637  # Check if we need to convert this using DOS-style short mode. If the path
58638  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58639  # take no chances and rewrite it.
58640  # Note: m4 eats our [], so we need to use [ and ] instead.
58641  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58642  if test "x$has_forbidden_chars" != x; then
58643    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58644    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58645  fi
58646
58647
58648  windows_path="$new_path"
58649  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58650    unix_path=`$CYGPATH -u "$windows_path"`
58651    new_path="$unix_path"
58652  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58653    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58654    new_path="$unix_path"
58655  fi
58656
58657  if test "x$path" != "x$new_path"; then
58658    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58659    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58660$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58661  fi
58662
58663  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58664  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58665
58666    else
58667      # We're on a unix platform. Hooray! :)
58668      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58669      has_space=`$ECHO "$path" | $GREP " "`
58670      if test "x$has_space" != x; then
58671        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58672$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58673        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58674      fi
58675
58676      # Use eval to expand a potential ~
58677      eval path="$path"
58678      if test ! -f "$path" && test ! -d "$path"; then
58679        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58680      fi
58681
58682      if test -d "$path"; then
58683        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58684      else
58685        dir="`$DIRNAME "$path"`"
58686        base="`$BASENAME "$path"`"
58687        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58688      fi
58689    fi
58690  fi
58691
58692
58693  # Only process if variable expands to non-empty
58694
58695  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58696    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58697
58698  # Input might be given as Windows format, start by converting to
58699  # unix format.
58700  path="$POTENTIAL_FREETYPE_LIB_PATH"
58701  new_path=`$CYGPATH -u "$path"`
58702
58703  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58704  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58705  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58706  # "foo.exe" is OK but "foo" is an error.
58707  #
58708  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58709  # It is also a way to make sure we got the proper file name for the real test later on.
58710  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58711  if test "x$test_shortpath" = x; then
58712    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58713$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58714    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58715  fi
58716
58717  # Call helper function which possibly converts this using DOS-style short mode.
58718  # If so, the updated path is stored in $new_path.
58719
58720  input_path="$new_path"
58721  # Check if we need to convert this using DOS-style short mode. If the path
58722  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58723  # take no chances and rewrite it.
58724  # Note: m4 eats our [], so we need to use [ and ] instead.
58725  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58726  if test "x$has_forbidden_chars" != x; then
58727    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58728    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58729    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58730    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58731      # Going to short mode and back again did indeed matter. Since short mode is
58732      # case insensitive, let's make it lowercase to improve readability.
58733      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58734      # Now convert it back to Unix-style (cygpath)
58735      input_path=`$CYGPATH -u "$shortmode_path"`
58736      new_path="$input_path"
58737    fi
58738  fi
58739
58740  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58741  if test "x$test_cygdrive_prefix" = x; then
58742    # As a simple fix, exclude /usr/bin since it's not a real path.
58743    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58744      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58745      # a path prefixed by /cygdrive for fixpath to work.
58746      new_path="$CYGWIN_ROOT_PATH$input_path"
58747    fi
58748  fi
58749
58750
58751  if test "x$path" != "x$new_path"; then
58752    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58753    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58754$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58755  fi
58756
58757    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58758
58759  path="$POTENTIAL_FREETYPE_LIB_PATH"
58760  has_colon=`$ECHO $path | $GREP ^.:`
58761  new_path="$path"
58762  if test "x$has_colon" = x; then
58763    # Not in mixed or Windows style, start by that.
58764    new_path=`cmd //c echo $path`
58765  fi
58766
58767
58768  input_path="$new_path"
58769  # Check if we need to convert this using DOS-style short mode. If the path
58770  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58771  # take no chances and rewrite it.
58772  # Note: m4 eats our [], so we need to use [ and ] instead.
58773  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58774  if test "x$has_forbidden_chars" != x; then
58775    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58776    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58777  fi
58778
58779
58780  windows_path="$new_path"
58781  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58782    unix_path=`$CYGPATH -u "$windows_path"`
58783    new_path="$unix_path"
58784  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58785    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58786    new_path="$unix_path"
58787  fi
58788
58789  if test "x$path" != "x$new_path"; then
58790    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58791    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58792$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58793  fi
58794
58795  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58796  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58797
58798    else
58799      # We're on a unix platform. Hooray! :)
58800      path="$POTENTIAL_FREETYPE_LIB_PATH"
58801      has_space=`$ECHO "$path" | $GREP " "`
58802      if test "x$has_space" != x; then
58803        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58804$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58805        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58806      fi
58807
58808      # Use eval to expand a potential ~
58809      eval path="$path"
58810      if test ! -f "$path" && test ! -d "$path"; then
58811        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58812      fi
58813
58814      if test -d "$path"; then
58815        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58816      else
58817        dir="`$DIRNAME "$path"`"
58818        base="`$BASENAME "$path"`"
58819        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58820      fi
58821    fi
58822  fi
58823
58824
58825    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58827$as_echo_n "checking for freetype includes... " >&6; }
58828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58829$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58830    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58831    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58832$as_echo_n "checking for freetype libraries... " >&6; }
58833    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58834$as_echo "$FREETYPE_LIB_PATH" >&6; }
58835  fi
58836
58837          if test "x$FOUND_FREETYPE" != xyes; then
58838            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58839
58840  windows_path="$FREETYPE_BASE_DIR"
58841  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58842    unix_path=`$CYGPATH -u "$windows_path"`
58843    FREETYPE_BASE_DIR="$unix_path"
58844  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58845    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58846    FREETYPE_BASE_DIR="$unix_path"
58847  fi
58848
58849
58850  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58851  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58852  METHOD="well-known location"
58853
58854  # Let's start with an optimistic view of the world :-)
58855  FOUND_FREETYPE=yes
58856
58857  # First look for the canonical freetype main include file ft2build.h.
58858  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58859    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58860    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58861    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58862      # Fail.
58863      FOUND_FREETYPE=no
58864    fi
58865  fi
58866
58867  if test "x$FOUND_FREETYPE" = xyes; then
58868    # Include file found, let's continue the sanity check.
58869    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58870$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58871
58872    # Reset to default value
58873    FREETYPE_BASE_NAME=freetype
58874    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58875    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58876      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58877          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58878        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58879        # for the .6 version explicitly.
58880        FREETYPE_BASE_NAME=freetype.6
58881        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58882        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58883$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58884      else
58885        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58886$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58887        FOUND_FREETYPE=no
58888      fi
58889    else
58890      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58891        # On Windows, we will need both .lib and .dll file.
58892        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58893          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58894$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58895          FOUND_FREETYPE=no
58896        fi
58897      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58898          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58899        # Found lib in isa dir, use that instead.
58900        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58901        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58902$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58903      fi
58904    fi
58905  fi
58906
58907  if test "x$FOUND_FREETYPE" = xyes; then
58908
58909  # Only process if variable expands to non-empty
58910
58911  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58912    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58913
58914  # Input might be given as Windows format, start by converting to
58915  # unix format.
58916  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58917  new_path=`$CYGPATH -u "$path"`
58918
58919  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58920  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58921  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58922  # "foo.exe" is OK but "foo" is an error.
58923  #
58924  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58925  # It is also a way to make sure we got the proper file name for the real test later on.
58926  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58927  if test "x$test_shortpath" = x; then
58928    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58929$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58930    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58931  fi
58932
58933  # Call helper function which possibly converts this using DOS-style short mode.
58934  # If so, the updated path is stored in $new_path.
58935
58936  input_path="$new_path"
58937  # Check if we need to convert this using DOS-style short mode. If the path
58938  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58939  # take no chances and rewrite it.
58940  # Note: m4 eats our [], so we need to use [ and ] instead.
58941  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58942  if test "x$has_forbidden_chars" != x; then
58943    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58944    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58945    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58946    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58947      # Going to short mode and back again did indeed matter. Since short mode is
58948      # case insensitive, let's make it lowercase to improve readability.
58949      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58950      # Now convert it back to Unix-style (cygpath)
58951      input_path=`$CYGPATH -u "$shortmode_path"`
58952      new_path="$input_path"
58953    fi
58954  fi
58955
58956  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58957  if test "x$test_cygdrive_prefix" = x; then
58958    # As a simple fix, exclude /usr/bin since it's not a real path.
58959    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58960      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58961      # a path prefixed by /cygdrive for fixpath to work.
58962      new_path="$CYGWIN_ROOT_PATH$input_path"
58963    fi
58964  fi
58965
58966
58967  if test "x$path" != "x$new_path"; then
58968    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58969    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58970$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58971  fi
58972
58973    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58974
58975  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58976  has_colon=`$ECHO $path | $GREP ^.:`
58977  new_path="$path"
58978  if test "x$has_colon" = x; then
58979    # Not in mixed or Windows style, start by that.
58980    new_path=`cmd //c echo $path`
58981  fi
58982
58983
58984  input_path="$new_path"
58985  # Check if we need to convert this using DOS-style short mode. If the path
58986  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58987  # take no chances and rewrite it.
58988  # Note: m4 eats our [], so we need to use [ and ] instead.
58989  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58990  if test "x$has_forbidden_chars" != x; then
58991    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58992    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58993  fi
58994
58995
58996  windows_path="$new_path"
58997  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58998    unix_path=`$CYGPATH -u "$windows_path"`
58999    new_path="$unix_path"
59000  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59001    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59002    new_path="$unix_path"
59003  fi
59004
59005  if test "x$path" != "x$new_path"; then
59006    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59007    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59008$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59009  fi
59010
59011  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59012  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59013
59014    else
59015      # We're on a unix platform. Hooray! :)
59016      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59017      has_space=`$ECHO "$path" | $GREP " "`
59018      if test "x$has_space" != x; then
59019        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59020$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59021        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59022      fi
59023
59024      # Use eval to expand a potential ~
59025      eval path="$path"
59026      if test ! -f "$path" && test ! -d "$path"; then
59027        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59028      fi
59029
59030      if test -d "$path"; then
59031        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59032      else
59033        dir="`$DIRNAME "$path"`"
59034        base="`$BASENAME "$path"`"
59035        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59036      fi
59037    fi
59038  fi
59039
59040
59041  # Only process if variable expands to non-empty
59042
59043  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59044    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59045
59046  # Input might be given as Windows format, start by converting to
59047  # unix format.
59048  path="$POTENTIAL_FREETYPE_LIB_PATH"
59049  new_path=`$CYGPATH -u "$path"`
59050
59051  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59052  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59053  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59054  # "foo.exe" is OK but "foo" is an error.
59055  #
59056  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59057  # It is also a way to make sure we got the proper file name for the real test later on.
59058  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59059  if test "x$test_shortpath" = x; then
59060    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59061$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59062    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59063  fi
59064
59065  # Call helper function which possibly converts this using DOS-style short mode.
59066  # If so, the updated path is stored in $new_path.
59067
59068  input_path="$new_path"
59069  # Check if we need to convert this using DOS-style short mode. If the path
59070  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59071  # take no chances and rewrite it.
59072  # Note: m4 eats our [], so we need to use [ and ] instead.
59073  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59074  if test "x$has_forbidden_chars" != x; then
59075    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59076    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59077    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59078    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59079      # Going to short mode and back again did indeed matter. Since short mode is
59080      # case insensitive, let's make it lowercase to improve readability.
59081      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59082      # Now convert it back to Unix-style (cygpath)
59083      input_path=`$CYGPATH -u "$shortmode_path"`
59084      new_path="$input_path"
59085    fi
59086  fi
59087
59088  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59089  if test "x$test_cygdrive_prefix" = x; then
59090    # As a simple fix, exclude /usr/bin since it's not a real path.
59091    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59092      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59093      # a path prefixed by /cygdrive for fixpath to work.
59094      new_path="$CYGWIN_ROOT_PATH$input_path"
59095    fi
59096  fi
59097
59098
59099  if test "x$path" != "x$new_path"; then
59100    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59101    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59102$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59103  fi
59104
59105    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59106
59107  path="$POTENTIAL_FREETYPE_LIB_PATH"
59108  has_colon=`$ECHO $path | $GREP ^.:`
59109  new_path="$path"
59110  if test "x$has_colon" = x; then
59111    # Not in mixed or Windows style, start by that.
59112    new_path=`cmd //c echo $path`
59113  fi
59114
59115
59116  input_path="$new_path"
59117  # Check if we need to convert this using DOS-style short mode. If the path
59118  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59119  # take no chances and rewrite it.
59120  # Note: m4 eats our [], so we need to use [ and ] instead.
59121  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59122  if test "x$has_forbidden_chars" != x; then
59123    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59124    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59125  fi
59126
59127
59128  windows_path="$new_path"
59129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59130    unix_path=`$CYGPATH -u "$windows_path"`
59131    new_path="$unix_path"
59132  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59133    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59134    new_path="$unix_path"
59135  fi
59136
59137  if test "x$path" != "x$new_path"; then
59138    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59139    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59140$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59141  fi
59142
59143  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59144  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59145
59146    else
59147      # We're on a unix platform. Hooray! :)
59148      path="$POTENTIAL_FREETYPE_LIB_PATH"
59149      has_space=`$ECHO "$path" | $GREP " "`
59150      if test "x$has_space" != x; then
59151        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59152$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59153        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59154      fi
59155
59156      # Use eval to expand a potential ~
59157      eval path="$path"
59158      if test ! -f "$path" && test ! -d "$path"; then
59159        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59160      fi
59161
59162      if test -d "$path"; then
59163        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59164      else
59165        dir="`$DIRNAME "$path"`"
59166        base="`$BASENAME "$path"`"
59167        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59168      fi
59169    fi
59170  fi
59171
59172
59173    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59175$as_echo_n "checking for freetype includes... " >&6; }
59176    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59177$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59178    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59179    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59180$as_echo_n "checking for freetype libraries... " >&6; }
59181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59182$as_echo "$FREETYPE_LIB_PATH" >&6; }
59183  fi
59184
59185          fi
59186          if test "x$FOUND_FREETYPE" != xyes; then
59187            FREETYPE_BASE_DIR="$HOME/freetype"
59188
59189  windows_path="$FREETYPE_BASE_DIR"
59190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59191    unix_path=`$CYGPATH -u "$windows_path"`
59192    FREETYPE_BASE_DIR="$unix_path"
59193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59195    FREETYPE_BASE_DIR="$unix_path"
59196  fi
59197
59198            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59199
59200  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59201  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59202  METHOD="well-known location"
59203
59204  # Let's start with an optimistic view of the world :-)
59205  FOUND_FREETYPE=yes
59206
59207  # First look for the canonical freetype main include file ft2build.h.
59208  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59209    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59210    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59211    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59212      # Fail.
59213      FOUND_FREETYPE=no
59214    fi
59215  fi
59216
59217  if test "x$FOUND_FREETYPE" = xyes; then
59218    # Include file found, let's continue the sanity check.
59219    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59220$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59221
59222    # Reset to default value
59223    FREETYPE_BASE_NAME=freetype
59224    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59225    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59226      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59227          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59228        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59229        # for the .6 version explicitly.
59230        FREETYPE_BASE_NAME=freetype.6
59231        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59232        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59233$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59234      else
59235        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59236$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59237        FOUND_FREETYPE=no
59238      fi
59239    else
59240      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59241        # On Windows, we will need both .lib and .dll file.
59242        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59243          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59244$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59245          FOUND_FREETYPE=no
59246        fi
59247      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59248          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59249        # Found lib in isa dir, use that instead.
59250        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59251        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59252$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59253      fi
59254    fi
59255  fi
59256
59257  if test "x$FOUND_FREETYPE" = xyes; then
59258
59259  # Only process if variable expands to non-empty
59260
59261  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59262    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59263
59264  # Input might be given as Windows format, start by converting to
59265  # unix format.
59266  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59267  new_path=`$CYGPATH -u "$path"`
59268
59269  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59270  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59271  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59272  # "foo.exe" is OK but "foo" is an error.
59273  #
59274  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59275  # It is also a way to make sure we got the proper file name for the real test later on.
59276  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59277  if test "x$test_shortpath" = x; then
59278    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59279$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59280    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59281  fi
59282
59283  # Call helper function which possibly converts this using DOS-style short mode.
59284  # If so, the updated path is stored in $new_path.
59285
59286  input_path="$new_path"
59287  # Check if we need to convert this using DOS-style short mode. If the path
59288  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59289  # take no chances and rewrite it.
59290  # Note: m4 eats our [], so we need to use [ and ] instead.
59291  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59292  if test "x$has_forbidden_chars" != x; then
59293    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59294    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59295    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59296    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59297      # Going to short mode and back again did indeed matter. Since short mode is
59298      # case insensitive, let's make it lowercase to improve readability.
59299      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59300      # Now convert it back to Unix-style (cygpath)
59301      input_path=`$CYGPATH -u "$shortmode_path"`
59302      new_path="$input_path"
59303    fi
59304  fi
59305
59306  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59307  if test "x$test_cygdrive_prefix" = x; then
59308    # As a simple fix, exclude /usr/bin since it's not a real path.
59309    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59310      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59311      # a path prefixed by /cygdrive for fixpath to work.
59312      new_path="$CYGWIN_ROOT_PATH$input_path"
59313    fi
59314  fi
59315
59316
59317  if test "x$path" != "x$new_path"; then
59318    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59319    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59320$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59321  fi
59322
59323    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59324
59325  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59326  has_colon=`$ECHO $path | $GREP ^.:`
59327  new_path="$path"
59328  if test "x$has_colon" = x; then
59329    # Not in mixed or Windows style, start by that.
59330    new_path=`cmd //c echo $path`
59331  fi
59332
59333
59334  input_path="$new_path"
59335  # Check if we need to convert this using DOS-style short mode. If the path
59336  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59337  # take no chances and rewrite it.
59338  # Note: m4 eats our [], so we need to use [ and ] instead.
59339  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59340  if test "x$has_forbidden_chars" != x; then
59341    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59342    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59343  fi
59344
59345
59346  windows_path="$new_path"
59347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59348    unix_path=`$CYGPATH -u "$windows_path"`
59349    new_path="$unix_path"
59350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59352    new_path="$unix_path"
59353  fi
59354
59355  if test "x$path" != "x$new_path"; then
59356    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59357    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59358$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59359  fi
59360
59361  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59362  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59363
59364    else
59365      # We're on a unix platform. Hooray! :)
59366      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59367      has_space=`$ECHO "$path" | $GREP " "`
59368      if test "x$has_space" != x; then
59369        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59370$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59371        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59372      fi
59373
59374      # Use eval to expand a potential ~
59375      eval path="$path"
59376      if test ! -f "$path" && test ! -d "$path"; then
59377        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59378      fi
59379
59380      if test -d "$path"; then
59381        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59382      else
59383        dir="`$DIRNAME "$path"`"
59384        base="`$BASENAME "$path"`"
59385        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59386      fi
59387    fi
59388  fi
59389
59390
59391  # Only process if variable expands to non-empty
59392
59393  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59394    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59395
59396  # Input might be given as Windows format, start by converting to
59397  # unix format.
59398  path="$POTENTIAL_FREETYPE_LIB_PATH"
59399  new_path=`$CYGPATH -u "$path"`
59400
59401  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59402  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59403  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59404  # "foo.exe" is OK but "foo" is an error.
59405  #
59406  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59407  # It is also a way to make sure we got the proper file name for the real test later on.
59408  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59409  if test "x$test_shortpath" = x; then
59410    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59411$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59412    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59413  fi
59414
59415  # Call helper function which possibly converts this using DOS-style short mode.
59416  # If so, the updated path is stored in $new_path.
59417
59418  input_path="$new_path"
59419  # Check if we need to convert this using DOS-style short mode. If the path
59420  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59421  # take no chances and rewrite it.
59422  # Note: m4 eats our [], so we need to use [ and ] instead.
59423  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59424  if test "x$has_forbidden_chars" != x; then
59425    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59426    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59427    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59428    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59429      # Going to short mode and back again did indeed matter. Since short mode is
59430      # case insensitive, let's make it lowercase to improve readability.
59431      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59432      # Now convert it back to Unix-style (cygpath)
59433      input_path=`$CYGPATH -u "$shortmode_path"`
59434      new_path="$input_path"
59435    fi
59436  fi
59437
59438  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59439  if test "x$test_cygdrive_prefix" = x; then
59440    # As a simple fix, exclude /usr/bin since it's not a real path.
59441    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59442      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59443      # a path prefixed by /cygdrive for fixpath to work.
59444      new_path="$CYGWIN_ROOT_PATH$input_path"
59445    fi
59446  fi
59447
59448
59449  if test "x$path" != "x$new_path"; then
59450    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59451    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59452$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59453  fi
59454
59455    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59456
59457  path="$POTENTIAL_FREETYPE_LIB_PATH"
59458  has_colon=`$ECHO $path | $GREP ^.:`
59459  new_path="$path"
59460  if test "x$has_colon" = x; then
59461    # Not in mixed or Windows style, start by that.
59462    new_path=`cmd //c echo $path`
59463  fi
59464
59465
59466  input_path="$new_path"
59467  # Check if we need to convert this using DOS-style short mode. If the path
59468  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59469  # take no chances and rewrite it.
59470  # Note: m4 eats our [], so we need to use [ and ] instead.
59471  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59472  if test "x$has_forbidden_chars" != x; then
59473    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59474    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59475  fi
59476
59477
59478  windows_path="$new_path"
59479  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59480    unix_path=`$CYGPATH -u "$windows_path"`
59481    new_path="$unix_path"
59482  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59483    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59484    new_path="$unix_path"
59485  fi
59486
59487  if test "x$path" != "x$new_path"; then
59488    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59489    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59490$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59491  fi
59492
59493  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59494  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59495
59496    else
59497      # We're on a unix platform. Hooray! :)
59498      path="$POTENTIAL_FREETYPE_LIB_PATH"
59499      has_space=`$ECHO "$path" | $GREP " "`
59500      if test "x$has_space" != x; then
59501        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59502$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59503        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59504      fi
59505
59506      # Use eval to expand a potential ~
59507      eval path="$path"
59508      if test ! -f "$path" && test ! -d "$path"; then
59509        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59510      fi
59511
59512      if test -d "$path"; then
59513        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59514      else
59515        dir="`$DIRNAME "$path"`"
59516        base="`$BASENAME "$path"`"
59517        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59518      fi
59519    fi
59520  fi
59521
59522
59523    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59524    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59525$as_echo_n "checking for freetype includes... " >&6; }
59526    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59527$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59528    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59529    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59530$as_echo_n "checking for freetype libraries... " >&6; }
59531    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59532$as_echo "$FREETYPE_LIB_PATH" >&6; }
59533  fi
59534
59535            else
59536
59537  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59538  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59539  METHOD="well-known location"
59540
59541  # Let's start with an optimistic view of the world :-)
59542  FOUND_FREETYPE=yes
59543
59544  # First look for the canonical freetype main include file ft2build.h.
59545  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59546    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59547    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59548    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59549      # Fail.
59550      FOUND_FREETYPE=no
59551    fi
59552  fi
59553
59554  if test "x$FOUND_FREETYPE" = xyes; then
59555    # Include file found, let's continue the sanity check.
59556    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59557$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59558
59559    # Reset to default value
59560    FREETYPE_BASE_NAME=freetype
59561    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59562    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59563      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59564          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59565        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59566        # for the .6 version explicitly.
59567        FREETYPE_BASE_NAME=freetype.6
59568        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59569        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59570$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59571      else
59572        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59573$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59574        FOUND_FREETYPE=no
59575      fi
59576    else
59577      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59578        # On Windows, we will need both .lib and .dll file.
59579        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59580          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59581$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59582          FOUND_FREETYPE=no
59583        fi
59584      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59585          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59586        # Found lib in isa dir, use that instead.
59587        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59588        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59589$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59590      fi
59591    fi
59592  fi
59593
59594  if test "x$FOUND_FREETYPE" = xyes; then
59595
59596  # Only process if variable expands to non-empty
59597
59598  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59599    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59600
59601  # Input might be given as Windows format, start by converting to
59602  # unix format.
59603  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59604  new_path=`$CYGPATH -u "$path"`
59605
59606  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59607  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59608  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59609  # "foo.exe" is OK but "foo" is an error.
59610  #
59611  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59612  # It is also a way to make sure we got the proper file name for the real test later on.
59613  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59614  if test "x$test_shortpath" = x; then
59615    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59616$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59617    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59618  fi
59619
59620  # Call helper function which possibly converts this using DOS-style short mode.
59621  # If so, the updated path is stored in $new_path.
59622
59623  input_path="$new_path"
59624  # Check if we need to convert this using DOS-style short mode. If the path
59625  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59626  # take no chances and rewrite it.
59627  # Note: m4 eats our [], so we need to use [ and ] instead.
59628  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59629  if test "x$has_forbidden_chars" != x; then
59630    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59631    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59632    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59633    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59634      # Going to short mode and back again did indeed matter. Since short mode is
59635      # case insensitive, let's make it lowercase to improve readability.
59636      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59637      # Now convert it back to Unix-style (cygpath)
59638      input_path=`$CYGPATH -u "$shortmode_path"`
59639      new_path="$input_path"
59640    fi
59641  fi
59642
59643  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59644  if test "x$test_cygdrive_prefix" = x; then
59645    # As a simple fix, exclude /usr/bin since it's not a real path.
59646    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59647      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59648      # a path prefixed by /cygdrive for fixpath to work.
59649      new_path="$CYGWIN_ROOT_PATH$input_path"
59650    fi
59651  fi
59652
59653
59654  if test "x$path" != "x$new_path"; then
59655    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59656    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59657$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59658  fi
59659
59660    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59661
59662  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59663  has_colon=`$ECHO $path | $GREP ^.:`
59664  new_path="$path"
59665  if test "x$has_colon" = x; then
59666    # Not in mixed or Windows style, start by that.
59667    new_path=`cmd //c echo $path`
59668  fi
59669
59670
59671  input_path="$new_path"
59672  # Check if we need to convert this using DOS-style short mode. If the path
59673  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59674  # take no chances and rewrite it.
59675  # Note: m4 eats our [], so we need to use [ and ] instead.
59676  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59677  if test "x$has_forbidden_chars" != x; then
59678    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59679    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59680  fi
59681
59682
59683  windows_path="$new_path"
59684  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59685    unix_path=`$CYGPATH -u "$windows_path"`
59686    new_path="$unix_path"
59687  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59688    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59689    new_path="$unix_path"
59690  fi
59691
59692  if test "x$path" != "x$new_path"; then
59693    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59694    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59695$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59696  fi
59697
59698  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59699  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59700
59701    else
59702      # We're on a unix platform. Hooray! :)
59703      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59704      has_space=`$ECHO "$path" | $GREP " "`
59705      if test "x$has_space" != x; then
59706        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59708        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59709      fi
59710
59711      # Use eval to expand a potential ~
59712      eval path="$path"
59713      if test ! -f "$path" && test ! -d "$path"; then
59714        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59715      fi
59716
59717      if test -d "$path"; then
59718        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59719      else
59720        dir="`$DIRNAME "$path"`"
59721        base="`$BASENAME "$path"`"
59722        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59723      fi
59724    fi
59725  fi
59726
59727
59728  # Only process if variable expands to non-empty
59729
59730  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59731    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59732
59733  # Input might be given as Windows format, start by converting to
59734  # unix format.
59735  path="$POTENTIAL_FREETYPE_LIB_PATH"
59736  new_path=`$CYGPATH -u "$path"`
59737
59738  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59739  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59740  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59741  # "foo.exe" is OK but "foo" is an error.
59742  #
59743  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59744  # It is also a way to make sure we got the proper file name for the real test later on.
59745  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59746  if test "x$test_shortpath" = x; then
59747    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59748$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59749    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59750  fi
59751
59752  # Call helper function which possibly converts this using DOS-style short mode.
59753  # If so, the updated path is stored in $new_path.
59754
59755  input_path="$new_path"
59756  # Check if we need to convert this using DOS-style short mode. If the path
59757  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59758  # take no chances and rewrite it.
59759  # Note: m4 eats our [], so we need to use [ and ] instead.
59760  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59761  if test "x$has_forbidden_chars" != x; then
59762    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59763    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59764    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59765    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59766      # Going to short mode and back again did indeed matter. Since short mode is
59767      # case insensitive, let's make it lowercase to improve readability.
59768      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59769      # Now convert it back to Unix-style (cygpath)
59770      input_path=`$CYGPATH -u "$shortmode_path"`
59771      new_path="$input_path"
59772    fi
59773  fi
59774
59775  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59776  if test "x$test_cygdrive_prefix" = x; then
59777    # As a simple fix, exclude /usr/bin since it's not a real path.
59778    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59779      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59780      # a path prefixed by /cygdrive for fixpath to work.
59781      new_path="$CYGWIN_ROOT_PATH$input_path"
59782    fi
59783  fi
59784
59785
59786  if test "x$path" != "x$new_path"; then
59787    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59789$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59790  fi
59791
59792    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59793
59794  path="$POTENTIAL_FREETYPE_LIB_PATH"
59795  has_colon=`$ECHO $path | $GREP ^.:`
59796  new_path="$path"
59797  if test "x$has_colon" = x; then
59798    # Not in mixed or Windows style, start by that.
59799    new_path=`cmd //c echo $path`
59800  fi
59801
59802
59803  input_path="$new_path"
59804  # Check if we need to convert this using DOS-style short mode. If the path
59805  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59806  # take no chances and rewrite it.
59807  # Note: m4 eats our [], so we need to use [ and ] instead.
59808  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59809  if test "x$has_forbidden_chars" != x; then
59810    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59811    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59812  fi
59813
59814
59815  windows_path="$new_path"
59816  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59817    unix_path=`$CYGPATH -u "$windows_path"`
59818    new_path="$unix_path"
59819  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59820    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59821    new_path="$unix_path"
59822  fi
59823
59824  if test "x$path" != "x$new_path"; then
59825    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59826    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59827$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59828  fi
59829
59830  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59831  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59832
59833    else
59834      # We're on a unix platform. Hooray! :)
59835      path="$POTENTIAL_FREETYPE_LIB_PATH"
59836      has_space=`$ECHO "$path" | $GREP " "`
59837      if test "x$has_space" != x; then
59838        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59839$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59840        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59841      fi
59842
59843      # Use eval to expand a potential ~
59844      eval path="$path"
59845      if test ! -f "$path" && test ! -d "$path"; then
59846        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59847      fi
59848
59849      if test -d "$path"; then
59850        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59851      else
59852        dir="`$DIRNAME "$path"`"
59853        base="`$BASENAME "$path"`"
59854        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59855      fi
59856    fi
59857  fi
59858
59859
59860    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59861    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59862$as_echo_n "checking for freetype includes... " >&6; }
59863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59864$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59865    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59866    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59867$as_echo_n "checking for freetype libraries... " >&6; }
59868    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59869$as_echo "$FREETYPE_LIB_PATH" >&6; }
59870  fi
59871
59872            fi
59873            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59874                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59875              # Source is available, as a last resort try to build freetype in default location
59876
59877  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59878  BUILD_FREETYPE=yes
59879
59880  # Check if the freetype sources are acessible..
59881  if ! test -d $FREETYPE_SRC_PATH; then
59882    { $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
59883$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59884    BUILD_FREETYPE=no
59885  fi
59886  # ..and contain a vc2010 project file
59887  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59888  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59889    { $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
59890$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59891    BUILD_FREETYPE=no
59892  fi
59893  # Now check if configure found a version of 'msbuild.exe'
59894  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59895    { $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
59896$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;}
59897    BUILD_FREETYPE=no
59898  fi
59899
59900  # Ready to go..
59901  if test "x$BUILD_FREETYPE" = xyes; then
59902    # msbuild requires trailing slashes for output directories
59903    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59904    freetype_lib_path_unix="$freetype_lib_path"
59905    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59906
59907  unix_path="$vcxproj_path"
59908  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59909    windows_path=`$CYGPATH -m "$unix_path"`
59910    vcxproj_path="$windows_path"
59911  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59912    windows_path=`cmd //c echo $unix_path`
59913    vcxproj_path="$windows_path"
59914  fi
59915
59916
59917  unix_path="$freetype_lib_path"
59918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59919    windows_path=`$CYGPATH -m "$unix_path"`
59920    freetype_lib_path="$windows_path"
59921  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59922    windows_path=`cmd //c echo $unix_path`
59923    freetype_lib_path="$windows_path"
59924  fi
59925
59926
59927  unix_path="$freetype_obj_path"
59928  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59929    windows_path=`$CYGPATH -m "$unix_path"`
59930    freetype_obj_path="$windows_path"
59931  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59932    windows_path=`cmd //c echo $unix_path`
59933    freetype_obj_path="$windows_path"
59934  fi
59935
59936    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59937      freetype_platform=x64
59938    else
59939      freetype_platform=win32
59940    fi
59941
59942    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59943    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59944    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59945    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59946    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59947$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59948
59949    # First we try to build the freetype.dll
59950    $ECHO -e "@echo off\n"\
59951        "$MSBUILD $vcxproj_path "\
59952        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59953        "/p:Configuration=\"Release Multithreaded\" "\
59954        "/p:Platform=$freetype_platform "\
59955        "/p:ConfigurationType=DynamicLibrary "\
59956        "/p:TargetName=freetype "\
59957        "/p:OutDir=\"$freetype_lib_path\" "\
59958        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59959    cmd /c freetype.bat
59960
59961    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59962      # If that succeeds we also build freetype.lib
59963      $ECHO -e "@echo off\n"\
59964          "$MSBUILD $vcxproj_path "\
59965          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59966          "/p:Configuration=\"Release Multithreaded\" "\
59967          "/p:Platform=$freetype_platform "\
59968          "/p:ConfigurationType=StaticLibrary "\
59969          "/p:TargetName=freetype "\
59970          "/p:OutDir=\"$freetype_lib_path\" "\
59971          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59972      cmd /c freetype.bat
59973
59974      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59975        # Once we build both, lib and dll, set freetype lib and include path appropriately
59976        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59977        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59978        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59979$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59980      else
59981        BUILD_FREETYPE=no
59982      fi
59983    else
59984      BUILD_FREETYPE=no
59985    fi
59986  fi
59987
59988              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59989
59990  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59991  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59992  METHOD="well-known location"
59993
59994  # Let's start with an optimistic view of the world :-)
59995  FOUND_FREETYPE=yes
59996
59997  # First look for the canonical freetype main include file ft2build.h.
59998  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59999    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60000    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60001    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60002      # Fail.
60003      FOUND_FREETYPE=no
60004    fi
60005  fi
60006
60007  if test "x$FOUND_FREETYPE" = xyes; then
60008    # Include file found, let's continue the sanity check.
60009    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60010$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60011
60012    # Reset to default value
60013    FREETYPE_BASE_NAME=freetype
60014    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60015    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60016      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60017          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60018        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60019        # for the .6 version explicitly.
60020        FREETYPE_BASE_NAME=freetype.6
60021        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60022        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60023$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60024      else
60025        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60026$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60027        FOUND_FREETYPE=no
60028      fi
60029    else
60030      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60031        # On Windows, we will need both .lib and .dll file.
60032        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60033          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60034$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60035          FOUND_FREETYPE=no
60036        fi
60037      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60038          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60039        # Found lib in isa dir, use that instead.
60040        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60041        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60042$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60043      fi
60044    fi
60045  fi
60046
60047  if test "x$FOUND_FREETYPE" = xyes; then
60048
60049  # Only process if variable expands to non-empty
60050
60051  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60052    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60053
60054  # Input might be given as Windows format, start by converting to
60055  # unix format.
60056  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60057  new_path=`$CYGPATH -u "$path"`
60058
60059  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60060  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60061  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60062  # "foo.exe" is OK but "foo" is an error.
60063  #
60064  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60065  # It is also a way to make sure we got the proper file name for the real test later on.
60066  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60067  if test "x$test_shortpath" = x; then
60068    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60069$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60070    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60071  fi
60072
60073  # Call helper function which possibly converts this using DOS-style short mode.
60074  # If so, the updated path is stored in $new_path.
60075
60076  input_path="$new_path"
60077  # Check if we need to convert this using DOS-style short mode. If the path
60078  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60079  # take no chances and rewrite it.
60080  # Note: m4 eats our [], so we need to use [ and ] instead.
60081  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60082  if test "x$has_forbidden_chars" != x; then
60083    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60084    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60085    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60086    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60087      # Going to short mode and back again did indeed matter. Since short mode is
60088      # case insensitive, let's make it lowercase to improve readability.
60089      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60090      # Now convert it back to Unix-style (cygpath)
60091      input_path=`$CYGPATH -u "$shortmode_path"`
60092      new_path="$input_path"
60093    fi
60094  fi
60095
60096  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60097  if test "x$test_cygdrive_prefix" = x; then
60098    # As a simple fix, exclude /usr/bin since it's not a real path.
60099    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60100      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60101      # a path prefixed by /cygdrive for fixpath to work.
60102      new_path="$CYGWIN_ROOT_PATH$input_path"
60103    fi
60104  fi
60105
60106
60107  if test "x$path" != "x$new_path"; then
60108    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60109    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60110$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60111  fi
60112
60113    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60114
60115  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60116  has_colon=`$ECHO $path | $GREP ^.:`
60117  new_path="$path"
60118  if test "x$has_colon" = x; then
60119    # Not in mixed or Windows style, start by that.
60120    new_path=`cmd //c echo $path`
60121  fi
60122
60123
60124  input_path="$new_path"
60125  # Check if we need to convert this using DOS-style short mode. If the path
60126  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60127  # take no chances and rewrite it.
60128  # Note: m4 eats our [], so we need to use [ and ] instead.
60129  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60130  if test "x$has_forbidden_chars" != x; then
60131    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60132    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60133  fi
60134
60135
60136  windows_path="$new_path"
60137  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60138    unix_path=`$CYGPATH -u "$windows_path"`
60139    new_path="$unix_path"
60140  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60141    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60142    new_path="$unix_path"
60143  fi
60144
60145  if test "x$path" != "x$new_path"; then
60146    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60147    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60148$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60149  fi
60150
60151  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60152  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60153
60154    else
60155      # We're on a unix platform. Hooray! :)
60156      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60157      has_space=`$ECHO "$path" | $GREP " "`
60158      if test "x$has_space" != x; then
60159        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60160$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60161        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60162      fi
60163
60164      # Use eval to expand a potential ~
60165      eval path="$path"
60166      if test ! -f "$path" && test ! -d "$path"; then
60167        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60168      fi
60169
60170      if test -d "$path"; then
60171        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60172      else
60173        dir="`$DIRNAME "$path"`"
60174        base="`$BASENAME "$path"`"
60175        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60176      fi
60177    fi
60178  fi
60179
60180
60181  # Only process if variable expands to non-empty
60182
60183  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60185
60186  # Input might be given as Windows format, start by converting to
60187  # unix format.
60188  path="$POTENTIAL_FREETYPE_LIB_PATH"
60189  new_path=`$CYGPATH -u "$path"`
60190
60191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60194  # "foo.exe" is OK but "foo" is an error.
60195  #
60196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60197  # It is also a way to make sure we got the proper file name for the real test later on.
60198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60199  if test "x$test_shortpath" = x; then
60200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60202    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60203  fi
60204
60205  # Call helper function which possibly converts this using DOS-style short mode.
60206  # If so, the updated path is stored in $new_path.
60207
60208  input_path="$new_path"
60209  # Check if we need to convert this using DOS-style short mode. If the path
60210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60211  # take no chances and rewrite it.
60212  # Note: m4 eats our [], so we need to use [ and ] instead.
60213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60214  if test "x$has_forbidden_chars" != x; then
60215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60219      # Going to short mode and back again did indeed matter. Since short mode is
60220      # case insensitive, let's make it lowercase to improve readability.
60221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60222      # Now convert it back to Unix-style (cygpath)
60223      input_path=`$CYGPATH -u "$shortmode_path"`
60224      new_path="$input_path"
60225    fi
60226  fi
60227
60228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60229  if test "x$test_cygdrive_prefix" = x; then
60230    # As a simple fix, exclude /usr/bin since it's not a real path.
60231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60233      # a path prefixed by /cygdrive for fixpath to work.
60234      new_path="$CYGWIN_ROOT_PATH$input_path"
60235    fi
60236  fi
60237
60238
60239  if test "x$path" != "x$new_path"; then
60240    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60242$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60243  fi
60244
60245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60246
60247  path="$POTENTIAL_FREETYPE_LIB_PATH"
60248  has_colon=`$ECHO $path | $GREP ^.:`
60249  new_path="$path"
60250  if test "x$has_colon" = x; then
60251    # Not in mixed or Windows style, start by that.
60252    new_path=`cmd //c echo $path`
60253  fi
60254
60255
60256  input_path="$new_path"
60257  # Check if we need to convert this using DOS-style short mode. If the path
60258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60259  # take no chances and rewrite it.
60260  # Note: m4 eats our [], so we need to use [ and ] instead.
60261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60262  if test "x$has_forbidden_chars" != x; then
60263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60265  fi
60266
60267
60268  windows_path="$new_path"
60269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60270    unix_path=`$CYGPATH -u "$windows_path"`
60271    new_path="$unix_path"
60272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60274    new_path="$unix_path"
60275  fi
60276
60277  if test "x$path" != "x$new_path"; then
60278    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60280$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60281  fi
60282
60283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60285
60286    else
60287      # We're on a unix platform. Hooray! :)
60288      path="$POTENTIAL_FREETYPE_LIB_PATH"
60289      has_space=`$ECHO "$path" | $GREP " "`
60290      if test "x$has_space" != x; then
60291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60292$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60294      fi
60295
60296      # Use eval to expand a potential ~
60297      eval path="$path"
60298      if test ! -f "$path" && test ! -d "$path"; then
60299        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60300      fi
60301
60302      if test -d "$path"; then
60303        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60304      else
60305        dir="`$DIRNAME "$path"`"
60306        base="`$BASENAME "$path"`"
60307        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60308      fi
60309    fi
60310  fi
60311
60312
60313    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60314    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60315$as_echo_n "checking for freetype includes... " >&6; }
60316    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60317$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60318    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60319    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60320$as_echo_n "checking for freetype libraries... " >&6; }
60321    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60322$as_echo "$FREETYPE_LIB_PATH" >&6; }
60323  fi
60324
60325              else
60326
60327  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60328  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
60329  METHOD="well-known location"
60330
60331  # Let's start with an optimistic view of the world :-)
60332  FOUND_FREETYPE=yes
60333
60334  # First look for the canonical freetype main include file ft2build.h.
60335  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60336    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60337    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60338    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60339      # Fail.
60340      FOUND_FREETYPE=no
60341    fi
60342  fi
60343
60344  if test "x$FOUND_FREETYPE" = xyes; then
60345    # Include file found, let's continue the sanity check.
60346    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60347$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60348
60349    # Reset to default value
60350    FREETYPE_BASE_NAME=freetype
60351    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60352    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60353      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60354          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60355        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60356        # for the .6 version explicitly.
60357        FREETYPE_BASE_NAME=freetype.6
60358        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60359        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60360$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60361      else
60362        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60363$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60364        FOUND_FREETYPE=no
60365      fi
60366    else
60367      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60368        # On Windows, we will need both .lib and .dll file.
60369        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60370          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60371$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60372          FOUND_FREETYPE=no
60373        fi
60374      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60375          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60376        # Found lib in isa dir, use that instead.
60377        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60378        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60379$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60380      fi
60381    fi
60382  fi
60383
60384  if test "x$FOUND_FREETYPE" = xyes; then
60385
60386  # Only process if variable expands to non-empty
60387
60388  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60389    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60390
60391  # Input might be given as Windows format, start by converting to
60392  # unix format.
60393  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60394  new_path=`$CYGPATH -u "$path"`
60395
60396  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60397  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60398  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60399  # "foo.exe" is OK but "foo" is an error.
60400  #
60401  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60402  # It is also a way to make sure we got the proper file name for the real test later on.
60403  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60404  if test "x$test_shortpath" = x; then
60405    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60406$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60407    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60408  fi
60409
60410  # Call helper function which possibly converts this using DOS-style short mode.
60411  # If so, the updated path is stored in $new_path.
60412
60413  input_path="$new_path"
60414  # Check if we need to convert this using DOS-style short mode. If the path
60415  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60416  # take no chances and rewrite it.
60417  # Note: m4 eats our [], so we need to use [ and ] instead.
60418  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60419  if test "x$has_forbidden_chars" != x; then
60420    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60421    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60422    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60423    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60424      # Going to short mode and back again did indeed matter. Since short mode is
60425      # case insensitive, let's make it lowercase to improve readability.
60426      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60427      # Now convert it back to Unix-style (cygpath)
60428      input_path=`$CYGPATH -u "$shortmode_path"`
60429      new_path="$input_path"
60430    fi
60431  fi
60432
60433  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60434  if test "x$test_cygdrive_prefix" = x; then
60435    # As a simple fix, exclude /usr/bin since it's not a real path.
60436    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60437      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60438      # a path prefixed by /cygdrive for fixpath to work.
60439      new_path="$CYGWIN_ROOT_PATH$input_path"
60440    fi
60441  fi
60442
60443
60444  if test "x$path" != "x$new_path"; then
60445    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60446    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60447$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60448  fi
60449
60450    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60451
60452  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60453  has_colon=`$ECHO $path | $GREP ^.:`
60454  new_path="$path"
60455  if test "x$has_colon" = x; then
60456    # Not in mixed or Windows style, start by that.
60457    new_path=`cmd //c echo $path`
60458  fi
60459
60460
60461  input_path="$new_path"
60462  # Check if we need to convert this using DOS-style short mode. If the path
60463  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60464  # take no chances and rewrite it.
60465  # Note: m4 eats our [], so we need to use [ and ] instead.
60466  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60467  if test "x$has_forbidden_chars" != x; then
60468    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60469    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60470  fi
60471
60472
60473  windows_path="$new_path"
60474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60475    unix_path=`$CYGPATH -u "$windows_path"`
60476    new_path="$unix_path"
60477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60479    new_path="$unix_path"
60480  fi
60481
60482  if test "x$path" != "x$new_path"; then
60483    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60484    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60485$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60486  fi
60487
60488  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60489  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60490
60491    else
60492      # We're on a unix platform. Hooray! :)
60493      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60494      has_space=`$ECHO "$path" | $GREP " "`
60495      if test "x$has_space" != x; then
60496        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60497$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60498        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60499      fi
60500
60501      # Use eval to expand a potential ~
60502      eval path="$path"
60503      if test ! -f "$path" && test ! -d "$path"; then
60504        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60505      fi
60506
60507      if test -d "$path"; then
60508        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60509      else
60510        dir="`$DIRNAME "$path"`"
60511        base="`$BASENAME "$path"`"
60512        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60513      fi
60514    fi
60515  fi
60516
60517
60518  # Only process if variable expands to non-empty
60519
60520  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60522
60523  # Input might be given as Windows format, start by converting to
60524  # unix format.
60525  path="$POTENTIAL_FREETYPE_LIB_PATH"
60526  new_path=`$CYGPATH -u "$path"`
60527
60528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60531  # "foo.exe" is OK but "foo" is an error.
60532  #
60533  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60534  # It is also a way to make sure we got the proper file name for the real test later on.
60535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60536  if test "x$test_shortpath" = x; then
60537    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60539    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60540  fi
60541
60542  # Call helper function which possibly converts this using DOS-style short mode.
60543  # If so, the updated path is stored in $new_path.
60544
60545  input_path="$new_path"
60546  # Check if we need to convert this using DOS-style short mode. If the path
60547  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60548  # take no chances and rewrite it.
60549  # Note: m4 eats our [], so we need to use [ and ] instead.
60550  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60551  if test "x$has_forbidden_chars" != x; then
60552    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60553    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60554    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60555    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60556      # Going to short mode and back again did indeed matter. Since short mode is
60557      # case insensitive, let's make it lowercase to improve readability.
60558      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60559      # Now convert it back to Unix-style (cygpath)
60560      input_path=`$CYGPATH -u "$shortmode_path"`
60561      new_path="$input_path"
60562    fi
60563  fi
60564
60565  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60566  if test "x$test_cygdrive_prefix" = x; then
60567    # As a simple fix, exclude /usr/bin since it's not a real path.
60568    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60569      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60570      # a path prefixed by /cygdrive for fixpath to work.
60571      new_path="$CYGWIN_ROOT_PATH$input_path"
60572    fi
60573  fi
60574
60575
60576  if test "x$path" != "x$new_path"; then
60577    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60578    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60579$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60580  fi
60581
60582    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60583
60584  path="$POTENTIAL_FREETYPE_LIB_PATH"
60585  has_colon=`$ECHO $path | $GREP ^.:`
60586  new_path="$path"
60587  if test "x$has_colon" = x; then
60588    # Not in mixed or Windows style, start by that.
60589    new_path=`cmd //c echo $path`
60590  fi
60591
60592
60593  input_path="$new_path"
60594  # Check if we need to convert this using DOS-style short mode. If the path
60595  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60596  # take no chances and rewrite it.
60597  # Note: m4 eats our [], so we need to use [ and ] instead.
60598  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60599  if test "x$has_forbidden_chars" != x; then
60600    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60601    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60602  fi
60603
60604
60605  windows_path="$new_path"
60606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60607    unix_path=`$CYGPATH -u "$windows_path"`
60608    new_path="$unix_path"
60609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60611    new_path="$unix_path"
60612  fi
60613
60614  if test "x$path" != "x$new_path"; then
60615    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60618  fi
60619
60620  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60621  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60622
60623    else
60624      # We're on a unix platform. Hooray! :)
60625      path="$POTENTIAL_FREETYPE_LIB_PATH"
60626      has_space=`$ECHO "$path" | $GREP " "`
60627      if test "x$has_space" != x; then
60628        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60629$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60630        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60631      fi
60632
60633      # Use eval to expand a potential ~
60634      eval path="$path"
60635      if test ! -f "$path" && test ! -d "$path"; then
60636        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60637      fi
60638
60639      if test -d "$path"; then
60640        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60641      else
60642        dir="`$DIRNAME "$path"`"
60643        base="`$BASENAME "$path"`"
60644        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60645      fi
60646    fi
60647  fi
60648
60649
60650    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60651    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60652$as_echo_n "checking for freetype includes... " >&6; }
60653    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60654$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60655    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60656    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60657$as_echo_n "checking for freetype libraries... " >&6; }
60658    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60659$as_echo "$FREETYPE_LIB_PATH" >&6; }
60660  fi
60661
60662              fi
60663            fi
60664          fi
60665        else
60666          FREETYPE_BASE_DIR="$SYSROOT/usr"
60667
60668  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60669  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60670  METHOD="well-known location"
60671
60672  # Let's start with an optimistic view of the world :-)
60673  FOUND_FREETYPE=yes
60674
60675  # First look for the canonical freetype main include file ft2build.h.
60676  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60677    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60678    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60679    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60680      # Fail.
60681      FOUND_FREETYPE=no
60682    fi
60683  fi
60684
60685  if test "x$FOUND_FREETYPE" = xyes; then
60686    # Include file found, let's continue the sanity check.
60687    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60688$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60689
60690    # Reset to default value
60691    FREETYPE_BASE_NAME=freetype
60692    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60693    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60694      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60695          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60696        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60697        # for the .6 version explicitly.
60698        FREETYPE_BASE_NAME=freetype.6
60699        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60700        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60701$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60702      else
60703        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60704$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60705        FOUND_FREETYPE=no
60706      fi
60707    else
60708      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60709        # On Windows, we will need both .lib and .dll file.
60710        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60711          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60712$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60713          FOUND_FREETYPE=no
60714        fi
60715      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60716          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60717        # Found lib in isa dir, use that instead.
60718        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60719        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60720$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60721      fi
60722    fi
60723  fi
60724
60725  if test "x$FOUND_FREETYPE" = xyes; then
60726
60727  # Only process if variable expands to non-empty
60728
60729  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60730    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60731
60732  # Input might be given as Windows format, start by converting to
60733  # unix format.
60734  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60735  new_path=`$CYGPATH -u "$path"`
60736
60737  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60738  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60739  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60740  # "foo.exe" is OK but "foo" is an error.
60741  #
60742  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60743  # It is also a way to make sure we got the proper file name for the real test later on.
60744  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60745  if test "x$test_shortpath" = x; then
60746    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60747$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60748    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60749  fi
60750
60751  # Call helper function which possibly converts this using DOS-style short mode.
60752  # If so, the updated path is stored in $new_path.
60753
60754  input_path="$new_path"
60755  # Check if we need to convert this using DOS-style short mode. If the path
60756  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60757  # take no chances and rewrite it.
60758  # Note: m4 eats our [], so we need to use [ and ] instead.
60759  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60760  if test "x$has_forbidden_chars" != x; then
60761    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60762    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60763    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60764    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60765      # Going to short mode and back again did indeed matter. Since short mode is
60766      # case insensitive, let's make it lowercase to improve readability.
60767      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60768      # Now convert it back to Unix-style (cygpath)
60769      input_path=`$CYGPATH -u "$shortmode_path"`
60770      new_path="$input_path"
60771    fi
60772  fi
60773
60774  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60775  if test "x$test_cygdrive_prefix" = x; then
60776    # As a simple fix, exclude /usr/bin since it's not a real path.
60777    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60778      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60779      # a path prefixed by /cygdrive for fixpath to work.
60780      new_path="$CYGWIN_ROOT_PATH$input_path"
60781    fi
60782  fi
60783
60784
60785  if test "x$path" != "x$new_path"; then
60786    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60787    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60788$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60789  fi
60790
60791    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60792
60793  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60794  has_colon=`$ECHO $path | $GREP ^.:`
60795  new_path="$path"
60796  if test "x$has_colon" = x; then
60797    # Not in mixed or Windows style, start by that.
60798    new_path=`cmd //c echo $path`
60799  fi
60800
60801
60802  input_path="$new_path"
60803  # Check if we need to convert this using DOS-style short mode. If the path
60804  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60805  # take no chances and rewrite it.
60806  # Note: m4 eats our [], so we need to use [ and ] instead.
60807  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60808  if test "x$has_forbidden_chars" != x; then
60809    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60810    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60811  fi
60812
60813
60814  windows_path="$new_path"
60815  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60816    unix_path=`$CYGPATH -u "$windows_path"`
60817    new_path="$unix_path"
60818  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60819    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60820    new_path="$unix_path"
60821  fi
60822
60823  if test "x$path" != "x$new_path"; then
60824    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60825    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60826$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60827  fi
60828
60829  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60830  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60831
60832    else
60833      # We're on a unix platform. Hooray! :)
60834      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60835      has_space=`$ECHO "$path" | $GREP " "`
60836      if test "x$has_space" != x; then
60837        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60838$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60839        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60840      fi
60841
60842      # Use eval to expand a potential ~
60843      eval path="$path"
60844      if test ! -f "$path" && test ! -d "$path"; then
60845        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60846      fi
60847
60848      if test -d "$path"; then
60849        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60850      else
60851        dir="`$DIRNAME "$path"`"
60852        base="`$BASENAME "$path"`"
60853        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60854      fi
60855    fi
60856  fi
60857
60858
60859  # Only process if variable expands to non-empty
60860
60861  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60862    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60863
60864  # Input might be given as Windows format, start by converting to
60865  # unix format.
60866  path="$POTENTIAL_FREETYPE_LIB_PATH"
60867  new_path=`$CYGPATH -u "$path"`
60868
60869  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60870  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60871  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60872  # "foo.exe" is OK but "foo" is an error.
60873  #
60874  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60875  # It is also a way to make sure we got the proper file name for the real test later on.
60876  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60877  if test "x$test_shortpath" = x; then
60878    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60879$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60880    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60881  fi
60882
60883  # Call helper function which possibly converts this using DOS-style short mode.
60884  # If so, the updated path is stored in $new_path.
60885
60886  input_path="$new_path"
60887  # Check if we need to convert this using DOS-style short mode. If the path
60888  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60889  # take no chances and rewrite it.
60890  # Note: m4 eats our [], so we need to use [ and ] instead.
60891  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60892  if test "x$has_forbidden_chars" != x; then
60893    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60894    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60895    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60896    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60897      # Going to short mode and back again did indeed matter. Since short mode is
60898      # case insensitive, let's make it lowercase to improve readability.
60899      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60900      # Now convert it back to Unix-style (cygpath)
60901      input_path=`$CYGPATH -u "$shortmode_path"`
60902      new_path="$input_path"
60903    fi
60904  fi
60905
60906  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60907  if test "x$test_cygdrive_prefix" = x; then
60908    # As a simple fix, exclude /usr/bin since it's not a real path.
60909    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60910      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60911      # a path prefixed by /cygdrive for fixpath to work.
60912      new_path="$CYGWIN_ROOT_PATH$input_path"
60913    fi
60914  fi
60915
60916
60917  if test "x$path" != "x$new_path"; then
60918    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60919    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60920$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60921  fi
60922
60923    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60924
60925  path="$POTENTIAL_FREETYPE_LIB_PATH"
60926  has_colon=`$ECHO $path | $GREP ^.:`
60927  new_path="$path"
60928  if test "x$has_colon" = x; then
60929    # Not in mixed or Windows style, start by that.
60930    new_path=`cmd //c echo $path`
60931  fi
60932
60933
60934  input_path="$new_path"
60935  # Check if we need to convert this using DOS-style short mode. If the path
60936  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60937  # take no chances and rewrite it.
60938  # Note: m4 eats our [], so we need to use [ and ] instead.
60939  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60940  if test "x$has_forbidden_chars" != x; then
60941    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60942    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60943  fi
60944
60945
60946  windows_path="$new_path"
60947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60948    unix_path=`$CYGPATH -u "$windows_path"`
60949    new_path="$unix_path"
60950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60952    new_path="$unix_path"
60953  fi
60954
60955  if test "x$path" != "x$new_path"; then
60956    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60957    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60958$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60959  fi
60960
60961  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60962  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60963
60964    else
60965      # We're on a unix platform. Hooray! :)
60966      path="$POTENTIAL_FREETYPE_LIB_PATH"
60967      has_space=`$ECHO "$path" | $GREP " "`
60968      if test "x$has_space" != x; then
60969        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60970$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60971        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60972      fi
60973
60974      # Use eval to expand a potential ~
60975      eval path="$path"
60976      if test ! -f "$path" && test ! -d "$path"; then
60977        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60978      fi
60979
60980      if test -d "$path"; then
60981        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60982      else
60983        dir="`$DIRNAME "$path"`"
60984        base="`$BASENAME "$path"`"
60985        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60986      fi
60987    fi
60988  fi
60989
60990
60991    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60992    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60993$as_echo_n "checking for freetype includes... " >&6; }
60994    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60995$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60996    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60997    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60998$as_echo_n "checking for freetype libraries... " >&6; }
60999    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61000$as_echo "$FREETYPE_LIB_PATH" >&6; }
61001  fi
61002
61003
61004          if test "x$FOUND_FREETYPE" != xyes; then
61005            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
61006
61007  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61008  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61009  METHOD="well-known location"
61010
61011  # Let's start with an optimistic view of the world :-)
61012  FOUND_FREETYPE=yes
61013
61014  # First look for the canonical freetype main include file ft2build.h.
61015  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61016    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61017    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61018    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61019      # Fail.
61020      FOUND_FREETYPE=no
61021    fi
61022  fi
61023
61024  if test "x$FOUND_FREETYPE" = xyes; then
61025    # Include file found, let's continue the sanity check.
61026    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61027$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61028
61029    # Reset to default value
61030    FREETYPE_BASE_NAME=freetype
61031    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61032    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61033      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61034          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61035        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61036        # for the .6 version explicitly.
61037        FREETYPE_BASE_NAME=freetype.6
61038        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61039        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61040$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61041      else
61042        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61043$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61044        FOUND_FREETYPE=no
61045      fi
61046    else
61047      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61048        # On Windows, we will need both .lib and .dll file.
61049        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61050          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61051$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61052          FOUND_FREETYPE=no
61053        fi
61054      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61055          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61056        # Found lib in isa dir, use that instead.
61057        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61058        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61059$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61060      fi
61061    fi
61062  fi
61063
61064  if test "x$FOUND_FREETYPE" = xyes; then
61065
61066  # Only process if variable expands to non-empty
61067
61068  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61069    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61070
61071  # Input might be given as Windows format, start by converting to
61072  # unix format.
61073  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61074  new_path=`$CYGPATH -u "$path"`
61075
61076  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61077  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61078  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61079  # "foo.exe" is OK but "foo" is an error.
61080  #
61081  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61082  # It is also a way to make sure we got the proper file name for the real test later on.
61083  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61084  if test "x$test_shortpath" = x; then
61085    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61086$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61087    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61088  fi
61089
61090  # Call helper function which possibly converts this using DOS-style short mode.
61091  # If so, the updated path is stored in $new_path.
61092
61093  input_path="$new_path"
61094  # Check if we need to convert this using DOS-style short mode. If the path
61095  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61096  # take no chances and rewrite it.
61097  # Note: m4 eats our [], so we need to use [ and ] instead.
61098  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61099  if test "x$has_forbidden_chars" != x; then
61100    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61101    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61102    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61103    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61104      # Going to short mode and back again did indeed matter. Since short mode is
61105      # case insensitive, let's make it lowercase to improve readability.
61106      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61107      # Now convert it back to Unix-style (cygpath)
61108      input_path=`$CYGPATH -u "$shortmode_path"`
61109      new_path="$input_path"
61110    fi
61111  fi
61112
61113  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61114  if test "x$test_cygdrive_prefix" = x; then
61115    # As a simple fix, exclude /usr/bin since it's not a real path.
61116    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61117      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61118      # a path prefixed by /cygdrive for fixpath to work.
61119      new_path="$CYGWIN_ROOT_PATH$input_path"
61120    fi
61121  fi
61122
61123
61124  if test "x$path" != "x$new_path"; then
61125    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61126    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61127$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61128  fi
61129
61130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61131
61132  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61133  has_colon=`$ECHO $path | $GREP ^.:`
61134  new_path="$path"
61135  if test "x$has_colon" = x; then
61136    # Not in mixed or Windows style, start by that.
61137    new_path=`cmd //c echo $path`
61138  fi
61139
61140
61141  input_path="$new_path"
61142  # Check if we need to convert this using DOS-style short mode. If the path
61143  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61144  # take no chances and rewrite it.
61145  # Note: m4 eats our [], so we need to use [ and ] instead.
61146  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61147  if test "x$has_forbidden_chars" != x; then
61148    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61149    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61150  fi
61151
61152
61153  windows_path="$new_path"
61154  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61155    unix_path=`$CYGPATH -u "$windows_path"`
61156    new_path="$unix_path"
61157  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61158    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61159    new_path="$unix_path"
61160  fi
61161
61162  if test "x$path" != "x$new_path"; then
61163    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61164    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61165$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61166  fi
61167
61168  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61169  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61170
61171    else
61172      # We're on a unix platform. Hooray! :)
61173      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61174      has_space=`$ECHO "$path" | $GREP " "`
61175      if test "x$has_space" != x; then
61176        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61177$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61178        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61179      fi
61180
61181      # Use eval to expand a potential ~
61182      eval path="$path"
61183      if test ! -f "$path" && test ! -d "$path"; then
61184        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61185      fi
61186
61187      if test -d "$path"; then
61188        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61189      else
61190        dir="`$DIRNAME "$path"`"
61191        base="`$BASENAME "$path"`"
61192        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61193      fi
61194    fi
61195  fi
61196
61197
61198  # Only process if variable expands to non-empty
61199
61200  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61202
61203  # Input might be given as Windows format, start by converting to
61204  # unix format.
61205  path="$POTENTIAL_FREETYPE_LIB_PATH"
61206  new_path=`$CYGPATH -u "$path"`
61207
61208  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61209  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61210  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61211  # "foo.exe" is OK but "foo" is an error.
61212  #
61213  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61214  # It is also a way to make sure we got the proper file name for the real test later on.
61215  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61216  if test "x$test_shortpath" = x; then
61217    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61218$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61219    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61220  fi
61221
61222  # Call helper function which possibly converts this using DOS-style short mode.
61223  # If so, the updated path is stored in $new_path.
61224
61225  input_path="$new_path"
61226  # Check if we need to convert this using DOS-style short mode. If the path
61227  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61228  # take no chances and rewrite it.
61229  # Note: m4 eats our [], so we need to use [ and ] instead.
61230  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61231  if test "x$has_forbidden_chars" != x; then
61232    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61233    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61234    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61235    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61236      # Going to short mode and back again did indeed matter. Since short mode is
61237      # case insensitive, let's make it lowercase to improve readability.
61238      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61239      # Now convert it back to Unix-style (cygpath)
61240      input_path=`$CYGPATH -u "$shortmode_path"`
61241      new_path="$input_path"
61242    fi
61243  fi
61244
61245  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61246  if test "x$test_cygdrive_prefix" = x; then
61247    # As a simple fix, exclude /usr/bin since it's not a real path.
61248    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61249      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61250      # a path prefixed by /cygdrive for fixpath to work.
61251      new_path="$CYGWIN_ROOT_PATH$input_path"
61252    fi
61253  fi
61254
61255
61256  if test "x$path" != "x$new_path"; then
61257    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61258    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61259$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61260  fi
61261
61262    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61263
61264  path="$POTENTIAL_FREETYPE_LIB_PATH"
61265  has_colon=`$ECHO $path | $GREP ^.:`
61266  new_path="$path"
61267  if test "x$has_colon" = x; then
61268    # Not in mixed or Windows style, start by that.
61269    new_path=`cmd //c echo $path`
61270  fi
61271
61272
61273  input_path="$new_path"
61274  # Check if we need to convert this using DOS-style short mode. If the path
61275  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61276  # take no chances and rewrite it.
61277  # Note: m4 eats our [], so we need to use [ and ] instead.
61278  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61279  if test "x$has_forbidden_chars" != x; then
61280    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61281    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61282  fi
61283
61284
61285  windows_path="$new_path"
61286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61287    unix_path=`$CYGPATH -u "$windows_path"`
61288    new_path="$unix_path"
61289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61291    new_path="$unix_path"
61292  fi
61293
61294  if test "x$path" != "x$new_path"; then
61295    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61296    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61297$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61298  fi
61299
61300  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61301  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61302
61303    else
61304      # We're on a unix platform. Hooray! :)
61305      path="$POTENTIAL_FREETYPE_LIB_PATH"
61306      has_space=`$ECHO "$path" | $GREP " "`
61307      if test "x$has_space" != x; then
61308        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61309$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61310        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61311      fi
61312
61313      # Use eval to expand a potential ~
61314      eval path="$path"
61315      if test ! -f "$path" && test ! -d "$path"; then
61316        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61317      fi
61318
61319      if test -d "$path"; then
61320        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61321      else
61322        dir="`$DIRNAME "$path"`"
61323        base="`$BASENAME "$path"`"
61324        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61325      fi
61326    fi
61327  fi
61328
61329
61330    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61331    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61332$as_echo_n "checking for freetype includes... " >&6; }
61333    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61334$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61335    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61336    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61337$as_echo_n "checking for freetype libraries... " >&6; }
61338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61339$as_echo "$FREETYPE_LIB_PATH" >&6; }
61340  fi
61341
61342          fi
61343
61344          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
61345            if test "x$FOUND_FREETYPE" != xyes; then
61346              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
61347              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
61348
61349  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61350  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61351  METHOD="well-known location"
61352
61353  # Let's start with an optimistic view of the world :-)
61354  FOUND_FREETYPE=yes
61355
61356  # First look for the canonical freetype main include file ft2build.h.
61357  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61358    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61359    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61360    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61361      # Fail.
61362      FOUND_FREETYPE=no
61363    fi
61364  fi
61365
61366  if test "x$FOUND_FREETYPE" = xyes; then
61367    # Include file found, let's continue the sanity check.
61368    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61369$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61370
61371    # Reset to default value
61372    FREETYPE_BASE_NAME=freetype
61373    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61374    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61375      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61376          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61377        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61378        # for the .6 version explicitly.
61379        FREETYPE_BASE_NAME=freetype.6
61380        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61381        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61382$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61383      else
61384        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61385$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61386        FOUND_FREETYPE=no
61387      fi
61388    else
61389      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61390        # On Windows, we will need both .lib and .dll file.
61391        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61392          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61393$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61394          FOUND_FREETYPE=no
61395        fi
61396      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61397          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61398        # Found lib in isa dir, use that instead.
61399        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61400        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61401$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61402      fi
61403    fi
61404  fi
61405
61406  if test "x$FOUND_FREETYPE" = xyes; then
61407
61408  # Only process if variable expands to non-empty
61409
61410  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61411    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61412
61413  # Input might be given as Windows format, start by converting to
61414  # unix format.
61415  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61416  new_path=`$CYGPATH -u "$path"`
61417
61418  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61419  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61420  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61421  # "foo.exe" is OK but "foo" is an error.
61422  #
61423  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61424  # It is also a way to make sure we got the proper file name for the real test later on.
61425  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61426  if test "x$test_shortpath" = x; then
61427    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61428$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61429    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61430  fi
61431
61432  # Call helper function which possibly converts this using DOS-style short mode.
61433  # If so, the updated path is stored in $new_path.
61434
61435  input_path="$new_path"
61436  # Check if we need to convert this using DOS-style short mode. If the path
61437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61438  # take no chances and rewrite it.
61439  # Note: m4 eats our [], so we need to use [ and ] instead.
61440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61441  if test "x$has_forbidden_chars" != x; then
61442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61443    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61444    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61445    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61446      # Going to short mode and back again did indeed matter. Since short mode is
61447      # case insensitive, let's make it lowercase to improve readability.
61448      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61449      # Now convert it back to Unix-style (cygpath)
61450      input_path=`$CYGPATH -u "$shortmode_path"`
61451      new_path="$input_path"
61452    fi
61453  fi
61454
61455  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61456  if test "x$test_cygdrive_prefix" = x; then
61457    # As a simple fix, exclude /usr/bin since it's not a real path.
61458    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61459      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61460      # a path prefixed by /cygdrive for fixpath to work.
61461      new_path="$CYGWIN_ROOT_PATH$input_path"
61462    fi
61463  fi
61464
61465
61466  if test "x$path" != "x$new_path"; then
61467    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61468    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61469$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61470  fi
61471
61472    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61473
61474  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61475  has_colon=`$ECHO $path | $GREP ^.:`
61476  new_path="$path"
61477  if test "x$has_colon" = x; then
61478    # Not in mixed or Windows style, start by that.
61479    new_path=`cmd //c echo $path`
61480  fi
61481
61482
61483  input_path="$new_path"
61484  # Check if we need to convert this using DOS-style short mode. If the path
61485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61486  # take no chances and rewrite it.
61487  # Note: m4 eats our [], so we need to use [ and ] instead.
61488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61489  if test "x$has_forbidden_chars" != x; then
61490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61491    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61492  fi
61493
61494
61495  windows_path="$new_path"
61496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61497    unix_path=`$CYGPATH -u "$windows_path"`
61498    new_path="$unix_path"
61499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61501    new_path="$unix_path"
61502  fi
61503
61504  if test "x$path" != "x$new_path"; then
61505    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61506    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61507$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61508  fi
61509
61510  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61511  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61512
61513    else
61514      # We're on a unix platform. Hooray! :)
61515      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61516      has_space=`$ECHO "$path" | $GREP " "`
61517      if test "x$has_space" != x; then
61518        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61519$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61520        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61521      fi
61522
61523      # Use eval to expand a potential ~
61524      eval path="$path"
61525      if test ! -f "$path" && test ! -d "$path"; then
61526        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61527      fi
61528
61529      if test -d "$path"; then
61530        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61531      else
61532        dir="`$DIRNAME "$path"`"
61533        base="`$BASENAME "$path"`"
61534        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61535      fi
61536    fi
61537  fi
61538
61539
61540  # Only process if variable expands to non-empty
61541
61542  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61543    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61544
61545  # Input might be given as Windows format, start by converting to
61546  # unix format.
61547  path="$POTENTIAL_FREETYPE_LIB_PATH"
61548  new_path=`$CYGPATH -u "$path"`
61549
61550  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61551  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61552  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61553  # "foo.exe" is OK but "foo" is an error.
61554  #
61555  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61556  # It is also a way to make sure we got the proper file name for the real test later on.
61557  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61558  if test "x$test_shortpath" = x; then
61559    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61560$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61561    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61562  fi
61563
61564  # Call helper function which possibly converts this using DOS-style short mode.
61565  # If so, the updated path is stored in $new_path.
61566
61567  input_path="$new_path"
61568  # Check if we need to convert this using DOS-style short mode. If the path
61569  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61570  # take no chances and rewrite it.
61571  # Note: m4 eats our [], so we need to use [ and ] instead.
61572  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61573  if test "x$has_forbidden_chars" != x; then
61574    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61575    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61576    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61577    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61578      # Going to short mode and back again did indeed matter. Since short mode is
61579      # case insensitive, let's make it lowercase to improve readability.
61580      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61581      # Now convert it back to Unix-style (cygpath)
61582      input_path=`$CYGPATH -u "$shortmode_path"`
61583      new_path="$input_path"
61584    fi
61585  fi
61586
61587  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61588  if test "x$test_cygdrive_prefix" = x; then
61589    # As a simple fix, exclude /usr/bin since it's not a real path.
61590    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61591      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61592      # a path prefixed by /cygdrive for fixpath to work.
61593      new_path="$CYGWIN_ROOT_PATH$input_path"
61594    fi
61595  fi
61596
61597
61598  if test "x$path" != "x$new_path"; then
61599    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61600    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61601$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61602  fi
61603
61604    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61605
61606  path="$POTENTIAL_FREETYPE_LIB_PATH"
61607  has_colon=`$ECHO $path | $GREP ^.:`
61608  new_path="$path"
61609  if test "x$has_colon" = x; then
61610    # Not in mixed or Windows style, start by that.
61611    new_path=`cmd //c echo $path`
61612  fi
61613
61614
61615  input_path="$new_path"
61616  # Check if we need to convert this using DOS-style short mode. If the path
61617  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61618  # take no chances and rewrite it.
61619  # Note: m4 eats our [], so we need to use [ and ] instead.
61620  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61621  if test "x$has_forbidden_chars" != x; then
61622    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61623    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61624  fi
61625
61626
61627  windows_path="$new_path"
61628  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61629    unix_path=`$CYGPATH -u "$windows_path"`
61630    new_path="$unix_path"
61631  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61632    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61633    new_path="$unix_path"
61634  fi
61635
61636  if test "x$path" != "x$new_path"; then
61637    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61639$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61640  fi
61641
61642  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61643  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61644
61645    else
61646      # We're on a unix platform. Hooray! :)
61647      path="$POTENTIAL_FREETYPE_LIB_PATH"
61648      has_space=`$ECHO "$path" | $GREP " "`
61649      if test "x$has_space" != x; then
61650        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61651$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61652        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61653      fi
61654
61655      # Use eval to expand a potential ~
61656      eval path="$path"
61657      if test ! -f "$path" && test ! -d "$path"; then
61658        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61659      fi
61660
61661      if test -d "$path"; then
61662        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61663      else
61664        dir="`$DIRNAME "$path"`"
61665        base="`$BASENAME "$path"`"
61666        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61667      fi
61668    fi
61669  fi
61670
61671
61672    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61673    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61674$as_echo_n "checking for freetype includes... " >&6; }
61675    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61676$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61677    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61678    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61679$as_echo_n "checking for freetype libraries... " >&6; }
61680    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61681$as_echo "$FREETYPE_LIB_PATH" >&6; }
61682  fi
61683
61684            fi
61685          fi
61686
61687          if test "x$FOUND_FREETYPE" != xyes; then
61688            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61689
61690  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61691  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61692  METHOD="well-known location"
61693
61694  # Let's start with an optimistic view of the world :-)
61695  FOUND_FREETYPE=yes
61696
61697  # First look for the canonical freetype main include file ft2build.h.
61698  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61699    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61700    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61701    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61702      # Fail.
61703      FOUND_FREETYPE=no
61704    fi
61705  fi
61706
61707  if test "x$FOUND_FREETYPE" = xyes; then
61708    # Include file found, let's continue the sanity check.
61709    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61710$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61711
61712    # Reset to default value
61713    FREETYPE_BASE_NAME=freetype
61714    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61715    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61716      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61717          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61718        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61719        # for the .6 version explicitly.
61720        FREETYPE_BASE_NAME=freetype.6
61721        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61722        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61723$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61724      else
61725        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61726$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61727        FOUND_FREETYPE=no
61728      fi
61729    else
61730      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61731        # On Windows, we will need both .lib and .dll file.
61732        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61733          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61734$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61735          FOUND_FREETYPE=no
61736        fi
61737      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61738          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61739        # Found lib in isa dir, use that instead.
61740        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61741        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61742$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61743      fi
61744    fi
61745  fi
61746
61747  if test "x$FOUND_FREETYPE" = xyes; then
61748
61749  # Only process if variable expands to non-empty
61750
61751  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61753
61754  # Input might be given as Windows format, start by converting to
61755  # unix format.
61756  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61757  new_path=`$CYGPATH -u "$path"`
61758
61759  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61760  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61761  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61762  # "foo.exe" is OK but "foo" is an error.
61763  #
61764  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61765  # It is also a way to make sure we got the proper file name for the real test later on.
61766  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61767  if test "x$test_shortpath" = x; then
61768    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61769$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61770    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61771  fi
61772
61773  # Call helper function which possibly converts this using DOS-style short mode.
61774  # If so, the updated path is stored in $new_path.
61775
61776  input_path="$new_path"
61777  # Check if we need to convert this using DOS-style short mode. If the path
61778  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61779  # take no chances and rewrite it.
61780  # Note: m4 eats our [], so we need to use [ and ] instead.
61781  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61782  if test "x$has_forbidden_chars" != x; then
61783    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61784    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61785    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61786    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61787      # Going to short mode and back again did indeed matter. Since short mode is
61788      # case insensitive, let's make it lowercase to improve readability.
61789      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61790      # Now convert it back to Unix-style (cygpath)
61791      input_path=`$CYGPATH -u "$shortmode_path"`
61792      new_path="$input_path"
61793    fi
61794  fi
61795
61796  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61797  if test "x$test_cygdrive_prefix" = x; then
61798    # As a simple fix, exclude /usr/bin since it's not a real path.
61799    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61800      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61801      # a path prefixed by /cygdrive for fixpath to work.
61802      new_path="$CYGWIN_ROOT_PATH$input_path"
61803    fi
61804  fi
61805
61806
61807  if test "x$path" != "x$new_path"; then
61808    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61809    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61810$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61811  fi
61812
61813    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61814
61815  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61816  has_colon=`$ECHO $path | $GREP ^.:`
61817  new_path="$path"
61818  if test "x$has_colon" = x; then
61819    # Not in mixed or Windows style, start by that.
61820    new_path=`cmd //c echo $path`
61821  fi
61822
61823
61824  input_path="$new_path"
61825  # Check if we need to convert this using DOS-style short mode. If the path
61826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61827  # take no chances and rewrite it.
61828  # Note: m4 eats our [], so we need to use [ and ] instead.
61829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61830  if test "x$has_forbidden_chars" != x; then
61831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61832    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61833  fi
61834
61835
61836  windows_path="$new_path"
61837  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61838    unix_path=`$CYGPATH -u "$windows_path"`
61839    new_path="$unix_path"
61840  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61841    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61842    new_path="$unix_path"
61843  fi
61844
61845  if test "x$path" != "x$new_path"; then
61846    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61847    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61848$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61849  fi
61850
61851  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61852  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61853
61854    else
61855      # We're on a unix platform. Hooray! :)
61856      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61857      has_space=`$ECHO "$path" | $GREP " "`
61858      if test "x$has_space" != x; then
61859        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61860$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61861        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61862      fi
61863
61864      # Use eval to expand a potential ~
61865      eval path="$path"
61866      if test ! -f "$path" && test ! -d "$path"; then
61867        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61868      fi
61869
61870      if test -d "$path"; then
61871        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61872      else
61873        dir="`$DIRNAME "$path"`"
61874        base="`$BASENAME "$path"`"
61875        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61876      fi
61877    fi
61878  fi
61879
61880
61881  # Only process if variable expands to non-empty
61882
61883  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61884    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61885
61886  # Input might be given as Windows format, start by converting to
61887  # unix format.
61888  path="$POTENTIAL_FREETYPE_LIB_PATH"
61889  new_path=`$CYGPATH -u "$path"`
61890
61891  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61892  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61893  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61894  # "foo.exe" is OK but "foo" is an error.
61895  #
61896  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61897  # It is also a way to make sure we got the proper file name for the real test later on.
61898  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61899  if test "x$test_shortpath" = x; then
61900    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61901$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61902    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61903  fi
61904
61905  # Call helper function which possibly converts this using DOS-style short mode.
61906  # If so, the updated path is stored in $new_path.
61907
61908  input_path="$new_path"
61909  # Check if we need to convert this using DOS-style short mode. If the path
61910  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61911  # take no chances and rewrite it.
61912  # Note: m4 eats our [], so we need to use [ and ] instead.
61913  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61914  if test "x$has_forbidden_chars" != x; then
61915    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61916    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61917    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61918    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61919      # Going to short mode and back again did indeed matter. Since short mode is
61920      # case insensitive, let's make it lowercase to improve readability.
61921      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61922      # Now convert it back to Unix-style (cygpath)
61923      input_path=`$CYGPATH -u "$shortmode_path"`
61924      new_path="$input_path"
61925    fi
61926  fi
61927
61928  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61929  if test "x$test_cygdrive_prefix" = x; then
61930    # As a simple fix, exclude /usr/bin since it's not a real path.
61931    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61932      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61933      # a path prefixed by /cygdrive for fixpath to work.
61934      new_path="$CYGWIN_ROOT_PATH$input_path"
61935    fi
61936  fi
61937
61938
61939  if test "x$path" != "x$new_path"; then
61940    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61941    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61942$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61943  fi
61944
61945    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61946
61947  path="$POTENTIAL_FREETYPE_LIB_PATH"
61948  has_colon=`$ECHO $path | $GREP ^.:`
61949  new_path="$path"
61950  if test "x$has_colon" = x; then
61951    # Not in mixed or Windows style, start by that.
61952    new_path=`cmd //c echo $path`
61953  fi
61954
61955
61956  input_path="$new_path"
61957  # Check if we need to convert this using DOS-style short mode. If the path
61958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61959  # take no chances and rewrite it.
61960  # Note: m4 eats our [], so we need to use [ and ] instead.
61961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61962  if test "x$has_forbidden_chars" != x; then
61963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61964    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61965  fi
61966
61967
61968  windows_path="$new_path"
61969  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61970    unix_path=`$CYGPATH -u "$windows_path"`
61971    new_path="$unix_path"
61972  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61973    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61974    new_path="$unix_path"
61975  fi
61976
61977  if test "x$path" != "x$new_path"; then
61978    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61979    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61980$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61981  fi
61982
61983  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61984  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61985
61986    else
61987      # We're on a unix platform. Hooray! :)
61988      path="$POTENTIAL_FREETYPE_LIB_PATH"
61989      has_space=`$ECHO "$path" | $GREP " "`
61990      if test "x$has_space" != x; then
61991        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61992$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61993        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61994      fi
61995
61996      # Use eval to expand a potential ~
61997      eval path="$path"
61998      if test ! -f "$path" && test ! -d "$path"; then
61999        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62000      fi
62001
62002      if test -d "$path"; then
62003        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62004      else
62005        dir="`$DIRNAME "$path"`"
62006        base="`$BASENAME "$path"`"
62007        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62008      fi
62009    fi
62010  fi
62011
62012
62013    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62014    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62015$as_echo_n "checking for freetype includes... " >&6; }
62016    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62017$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62018    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62019    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62020$as_echo_n "checking for freetype libraries... " >&6; }
62021    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62022$as_echo "$FREETYPE_LIB_PATH" >&6; }
62023  fi
62024
62025          fi
62026
62027          if test "x$FOUND_FREETYPE" != xyes; then
62028            FREETYPE_BASE_DIR="$SYSROOT/usr"
62029            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
62030
62031  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62032  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
62033  METHOD="well-known location"
62034
62035  # Let's start with an optimistic view of the world :-)
62036  FOUND_FREETYPE=yes
62037
62038  # First look for the canonical freetype main include file ft2build.h.
62039  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62040    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62041    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62042    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62043      # Fail.
62044      FOUND_FREETYPE=no
62045    fi
62046  fi
62047
62048  if test "x$FOUND_FREETYPE" = xyes; then
62049    # Include file found, let's continue the sanity check.
62050    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62051$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62052
62053    # Reset to default value
62054    FREETYPE_BASE_NAME=freetype
62055    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62056    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62057      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62058          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62059        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62060        # for the .6 version explicitly.
62061        FREETYPE_BASE_NAME=freetype.6
62062        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62063        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62064$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62065      else
62066        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62067$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62068        FOUND_FREETYPE=no
62069      fi
62070    else
62071      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62072        # On Windows, we will need both .lib and .dll file.
62073        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62074          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62075$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62076          FOUND_FREETYPE=no
62077        fi
62078      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62079          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62080        # Found lib in isa dir, use that instead.
62081        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62082        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62083$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62084      fi
62085    fi
62086  fi
62087
62088  if test "x$FOUND_FREETYPE" = xyes; then
62089
62090  # Only process if variable expands to non-empty
62091
62092  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62093    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62094
62095  # Input might be given as Windows format, start by converting to
62096  # unix format.
62097  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62098  new_path=`$CYGPATH -u "$path"`
62099
62100  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62101  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62102  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62103  # "foo.exe" is OK but "foo" is an error.
62104  #
62105  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62106  # It is also a way to make sure we got the proper file name for the real test later on.
62107  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62108  if test "x$test_shortpath" = x; then
62109    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62110$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62111    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62112  fi
62113
62114  # Call helper function which possibly converts this using DOS-style short mode.
62115  # If so, the updated path is stored in $new_path.
62116
62117  input_path="$new_path"
62118  # Check if we need to convert this using DOS-style short mode. If the path
62119  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62120  # take no chances and rewrite it.
62121  # Note: m4 eats our [], so we need to use [ and ] instead.
62122  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62123  if test "x$has_forbidden_chars" != x; then
62124    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62125    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62126    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62127    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62128      # Going to short mode and back again did indeed matter. Since short mode is
62129      # case insensitive, let's make it lowercase to improve readability.
62130      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62131      # Now convert it back to Unix-style (cygpath)
62132      input_path=`$CYGPATH -u "$shortmode_path"`
62133      new_path="$input_path"
62134    fi
62135  fi
62136
62137  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62138  if test "x$test_cygdrive_prefix" = x; then
62139    # As a simple fix, exclude /usr/bin since it's not a real path.
62140    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62141      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62142      # a path prefixed by /cygdrive for fixpath to work.
62143      new_path="$CYGWIN_ROOT_PATH$input_path"
62144    fi
62145  fi
62146
62147
62148  if test "x$path" != "x$new_path"; then
62149    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62150    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62151$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62152  fi
62153
62154    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62155
62156  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62157  has_colon=`$ECHO $path | $GREP ^.:`
62158  new_path="$path"
62159  if test "x$has_colon" = x; then
62160    # Not in mixed or Windows style, start by that.
62161    new_path=`cmd //c echo $path`
62162  fi
62163
62164
62165  input_path="$new_path"
62166  # Check if we need to convert this using DOS-style short mode. If the path
62167  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62168  # take no chances and rewrite it.
62169  # Note: m4 eats our [], so we need to use [ and ] instead.
62170  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62171  if test "x$has_forbidden_chars" != x; then
62172    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62173    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62174  fi
62175
62176
62177  windows_path="$new_path"
62178  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62179    unix_path=`$CYGPATH -u "$windows_path"`
62180    new_path="$unix_path"
62181  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62182    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62183    new_path="$unix_path"
62184  fi
62185
62186  if test "x$path" != "x$new_path"; then
62187    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62188    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62189$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62190  fi
62191
62192  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62193  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62194
62195    else
62196      # We're on a unix platform. Hooray! :)
62197      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62198      has_space=`$ECHO "$path" | $GREP " "`
62199      if test "x$has_space" != x; then
62200        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62201$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62202        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62203      fi
62204
62205      # Use eval to expand a potential ~
62206      eval path="$path"
62207      if test ! -f "$path" && test ! -d "$path"; then
62208        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62209      fi
62210
62211      if test -d "$path"; then
62212        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62213      else
62214        dir="`$DIRNAME "$path"`"
62215        base="`$BASENAME "$path"`"
62216        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62217      fi
62218    fi
62219  fi
62220
62221
62222  # Only process if variable expands to non-empty
62223
62224  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62225    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62226
62227  # Input might be given as Windows format, start by converting to
62228  # unix format.
62229  path="$POTENTIAL_FREETYPE_LIB_PATH"
62230  new_path=`$CYGPATH -u "$path"`
62231
62232  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62233  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62234  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62235  # "foo.exe" is OK but "foo" is an error.
62236  #
62237  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62238  # It is also a way to make sure we got the proper file name for the real test later on.
62239  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62240  if test "x$test_shortpath" = x; then
62241    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62242$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62243    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62244  fi
62245
62246  # Call helper function which possibly converts this using DOS-style short mode.
62247  # If so, the updated path is stored in $new_path.
62248
62249  input_path="$new_path"
62250  # Check if we need to convert this using DOS-style short mode. If the path
62251  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62252  # take no chances and rewrite it.
62253  # Note: m4 eats our [], so we need to use [ and ] instead.
62254  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62255  if test "x$has_forbidden_chars" != x; then
62256    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62257    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62258    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62259    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62260      # Going to short mode and back again did indeed matter. Since short mode is
62261      # case insensitive, let's make it lowercase to improve readability.
62262      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62263      # Now convert it back to Unix-style (cygpath)
62264      input_path=`$CYGPATH -u "$shortmode_path"`
62265      new_path="$input_path"
62266    fi
62267  fi
62268
62269  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62270  if test "x$test_cygdrive_prefix" = x; then
62271    # As a simple fix, exclude /usr/bin since it's not a real path.
62272    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62273      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62274      # a path prefixed by /cygdrive for fixpath to work.
62275      new_path="$CYGWIN_ROOT_PATH$input_path"
62276    fi
62277  fi
62278
62279
62280  if test "x$path" != "x$new_path"; then
62281    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62282    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62283$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62284  fi
62285
62286    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62287
62288  path="$POTENTIAL_FREETYPE_LIB_PATH"
62289  has_colon=`$ECHO $path | $GREP ^.:`
62290  new_path="$path"
62291  if test "x$has_colon" = x; then
62292    # Not in mixed or Windows style, start by that.
62293    new_path=`cmd //c echo $path`
62294  fi
62295
62296
62297  input_path="$new_path"
62298  # Check if we need to convert this using DOS-style short mode. If the path
62299  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62300  # take no chances and rewrite it.
62301  # Note: m4 eats our [], so we need to use [ and ] instead.
62302  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62303  if test "x$has_forbidden_chars" != x; then
62304    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62305    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62306  fi
62307
62308
62309  windows_path="$new_path"
62310  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62311    unix_path=`$CYGPATH -u "$windows_path"`
62312    new_path="$unix_path"
62313  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62314    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62315    new_path="$unix_path"
62316  fi
62317
62318  if test "x$path" != "x$new_path"; then
62319    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62320    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62321$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62322  fi
62323
62324  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62325  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62326
62327    else
62328      # We're on a unix platform. Hooray! :)
62329      path="$POTENTIAL_FREETYPE_LIB_PATH"
62330      has_space=`$ECHO "$path" | $GREP " "`
62331      if test "x$has_space" != x; then
62332        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62333$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62334        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62335      fi
62336
62337      # Use eval to expand a potential ~
62338      eval path="$path"
62339      if test ! -f "$path" && test ! -d "$path"; then
62340        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62341      fi
62342
62343      if test -d "$path"; then
62344        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62345      else
62346        dir="`$DIRNAME "$path"`"
62347        base="`$BASENAME "$path"`"
62348        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62349      fi
62350    fi
62351  fi
62352
62353
62354    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62355    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62356$as_echo_n "checking for freetype includes... " >&6; }
62357    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62358$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62359    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62360    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62361$as_echo_n "checking for freetype libraries... " >&6; }
62362    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62363$as_echo "$FREETYPE_LIB_PATH" >&6; }
62364  fi
62365
62366            else
62367
62368  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62369  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
62370  METHOD="well-known location"
62371
62372  # Let's start with an optimistic view of the world :-)
62373  FOUND_FREETYPE=yes
62374
62375  # First look for the canonical freetype main include file ft2build.h.
62376  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62377    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62378    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62379    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62380      # Fail.
62381      FOUND_FREETYPE=no
62382    fi
62383  fi
62384
62385  if test "x$FOUND_FREETYPE" = xyes; then
62386    # Include file found, let's continue the sanity check.
62387    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62388$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62389
62390    # Reset to default value
62391    FREETYPE_BASE_NAME=freetype
62392    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62393    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62394      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62395          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62396        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62397        # for the .6 version explicitly.
62398        FREETYPE_BASE_NAME=freetype.6
62399        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62400        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62401$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62402      else
62403        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62404$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62405        FOUND_FREETYPE=no
62406      fi
62407    else
62408      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62409        # On Windows, we will need both .lib and .dll file.
62410        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62411          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62412$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62413          FOUND_FREETYPE=no
62414        fi
62415      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62416          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62417        # Found lib in isa dir, use that instead.
62418        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62419        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62420$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62421      fi
62422    fi
62423  fi
62424
62425  if test "x$FOUND_FREETYPE" = xyes; then
62426
62427  # Only process if variable expands to non-empty
62428
62429  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62431
62432  # Input might be given as Windows format, start by converting to
62433  # unix format.
62434  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62435  new_path=`$CYGPATH -u "$path"`
62436
62437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62440  # "foo.exe" is OK but "foo" is an error.
62441  #
62442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62443  # It is also a way to make sure we got the proper file name for the real test later on.
62444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62445  if test "x$test_shortpath" = x; then
62446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62447$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62448    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62449  fi
62450
62451  # Call helper function which possibly converts this using DOS-style short mode.
62452  # If so, the updated path is stored in $new_path.
62453
62454  input_path="$new_path"
62455  # Check if we need to convert this using DOS-style short mode. If the path
62456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62457  # take no chances and rewrite it.
62458  # Note: m4 eats our [], so we need to use [ and ] instead.
62459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62460  if test "x$has_forbidden_chars" != x; then
62461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62465      # Going to short mode and back again did indeed matter. Since short mode is
62466      # case insensitive, let's make it lowercase to improve readability.
62467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62468      # Now convert it back to Unix-style (cygpath)
62469      input_path=`$CYGPATH -u "$shortmode_path"`
62470      new_path="$input_path"
62471    fi
62472  fi
62473
62474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62475  if test "x$test_cygdrive_prefix" = x; then
62476    # As a simple fix, exclude /usr/bin since it's not a real path.
62477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62479      # a path prefixed by /cygdrive for fixpath to work.
62480      new_path="$CYGWIN_ROOT_PATH$input_path"
62481    fi
62482  fi
62483
62484
62485  if test "x$path" != "x$new_path"; then
62486    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62488$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62489  fi
62490
62491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62492
62493  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62494  has_colon=`$ECHO $path | $GREP ^.:`
62495  new_path="$path"
62496  if test "x$has_colon" = x; then
62497    # Not in mixed or Windows style, start by that.
62498    new_path=`cmd //c echo $path`
62499  fi
62500
62501
62502  input_path="$new_path"
62503  # Check if we need to convert this using DOS-style short mode. If the path
62504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62505  # take no chances and rewrite it.
62506  # Note: m4 eats our [], so we need to use [ and ] instead.
62507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62508  if test "x$has_forbidden_chars" != x; then
62509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62511  fi
62512
62513
62514  windows_path="$new_path"
62515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62516    unix_path=`$CYGPATH -u "$windows_path"`
62517    new_path="$unix_path"
62518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62520    new_path="$unix_path"
62521  fi
62522
62523  if test "x$path" != "x$new_path"; then
62524    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62526$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62527  fi
62528
62529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62531
62532    else
62533      # We're on a unix platform. Hooray! :)
62534      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62535      has_space=`$ECHO "$path" | $GREP " "`
62536      if test "x$has_space" != x; then
62537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62538$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62540      fi
62541
62542      # Use eval to expand a potential ~
62543      eval path="$path"
62544      if test ! -f "$path" && test ! -d "$path"; then
62545        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62546      fi
62547
62548      if test -d "$path"; then
62549        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62550      else
62551        dir="`$DIRNAME "$path"`"
62552        base="`$BASENAME "$path"`"
62553        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62554      fi
62555    fi
62556  fi
62557
62558
62559  # Only process if variable expands to non-empty
62560
62561  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62562    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62563
62564  # Input might be given as Windows format, start by converting to
62565  # unix format.
62566  path="$POTENTIAL_FREETYPE_LIB_PATH"
62567  new_path=`$CYGPATH -u "$path"`
62568
62569  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62570  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62571  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62572  # "foo.exe" is OK but "foo" is an error.
62573  #
62574  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62575  # It is also a way to make sure we got the proper file name for the real test later on.
62576  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62577  if test "x$test_shortpath" = x; then
62578    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62579$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62580    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62581  fi
62582
62583  # Call helper function which possibly converts this using DOS-style short mode.
62584  # If so, the updated path is stored in $new_path.
62585
62586  input_path="$new_path"
62587  # Check if we need to convert this using DOS-style short mode. If the path
62588  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62589  # take no chances and rewrite it.
62590  # Note: m4 eats our [], so we need to use [ and ] instead.
62591  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62592  if test "x$has_forbidden_chars" != x; then
62593    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62594    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62595    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62596    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62597      # Going to short mode and back again did indeed matter. Since short mode is
62598      # case insensitive, let's make it lowercase to improve readability.
62599      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62600      # Now convert it back to Unix-style (cygpath)
62601      input_path=`$CYGPATH -u "$shortmode_path"`
62602      new_path="$input_path"
62603    fi
62604  fi
62605
62606  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62607  if test "x$test_cygdrive_prefix" = x; then
62608    # As a simple fix, exclude /usr/bin since it's not a real path.
62609    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62610      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62611      # a path prefixed by /cygdrive for fixpath to work.
62612      new_path="$CYGWIN_ROOT_PATH$input_path"
62613    fi
62614  fi
62615
62616
62617  if test "x$path" != "x$new_path"; then
62618    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62619    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62620$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62621  fi
62622
62623    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62624
62625  path="$POTENTIAL_FREETYPE_LIB_PATH"
62626  has_colon=`$ECHO $path | $GREP ^.:`
62627  new_path="$path"
62628  if test "x$has_colon" = x; then
62629    # Not in mixed or Windows style, start by that.
62630    new_path=`cmd //c echo $path`
62631  fi
62632
62633
62634  input_path="$new_path"
62635  # Check if we need to convert this using DOS-style short mode. If the path
62636  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62637  # take no chances and rewrite it.
62638  # Note: m4 eats our [], so we need to use [ and ] instead.
62639  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62640  if test "x$has_forbidden_chars" != x; then
62641    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62642    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62643  fi
62644
62645
62646  windows_path="$new_path"
62647  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62648    unix_path=`$CYGPATH -u "$windows_path"`
62649    new_path="$unix_path"
62650  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62651    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62652    new_path="$unix_path"
62653  fi
62654
62655  if test "x$path" != "x$new_path"; then
62656    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62657    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62658$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62659  fi
62660
62661  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62662  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62663
62664    else
62665      # We're on a unix platform. Hooray! :)
62666      path="$POTENTIAL_FREETYPE_LIB_PATH"
62667      has_space=`$ECHO "$path" | $GREP " "`
62668      if test "x$has_space" != x; then
62669        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62670$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62671        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62672      fi
62673
62674      # Use eval to expand a potential ~
62675      eval path="$path"
62676      if test ! -f "$path" && test ! -d "$path"; then
62677        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62678      fi
62679
62680      if test -d "$path"; then
62681        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62682      else
62683        dir="`$DIRNAME "$path"`"
62684        base="`$BASENAME "$path"`"
62685        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62686      fi
62687    fi
62688  fi
62689
62690
62691    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62692    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62693$as_echo_n "checking for freetype includes... " >&6; }
62694    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62695$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62696    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62697    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62698$as_echo_n "checking for freetype libraries... " >&6; }
62699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62700$as_echo "$FREETYPE_LIB_PATH" >&6; }
62701  fi
62702
62703              if test "x$FOUND_FREETYPE" != xyes; then
62704
62705  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62706  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62707  METHOD="well-known location"
62708
62709  # Let's start with an optimistic view of the world :-)
62710  FOUND_FREETYPE=yes
62711
62712  # First look for the canonical freetype main include file ft2build.h.
62713  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62714    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62715    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62716    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62717      # Fail.
62718      FOUND_FREETYPE=no
62719    fi
62720  fi
62721
62722  if test "x$FOUND_FREETYPE" = xyes; then
62723    # Include file found, let's continue the sanity check.
62724    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62725$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62726
62727    # Reset to default value
62728    FREETYPE_BASE_NAME=freetype
62729    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62730    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62731      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62732          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62733        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62734        # for the .6 version explicitly.
62735        FREETYPE_BASE_NAME=freetype.6
62736        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62737        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62738$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62739      else
62740        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62741$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62742        FOUND_FREETYPE=no
62743      fi
62744    else
62745      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62746        # On Windows, we will need both .lib and .dll file.
62747        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62748          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62749$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62750          FOUND_FREETYPE=no
62751        fi
62752      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62753          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62754        # Found lib in isa dir, use that instead.
62755        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62756        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62757$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62758      fi
62759    fi
62760  fi
62761
62762  if test "x$FOUND_FREETYPE" = xyes; then
62763
62764  # Only process if variable expands to non-empty
62765
62766  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62767    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62768
62769  # Input might be given as Windows format, start by converting to
62770  # unix format.
62771  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62772  new_path=`$CYGPATH -u "$path"`
62773
62774  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62775  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62776  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62777  # "foo.exe" is OK but "foo" is an error.
62778  #
62779  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62780  # It is also a way to make sure we got the proper file name for the real test later on.
62781  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62782  if test "x$test_shortpath" = x; then
62783    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62784$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62785    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62786  fi
62787
62788  # Call helper function which possibly converts this using DOS-style short mode.
62789  # If so, the updated path is stored in $new_path.
62790
62791  input_path="$new_path"
62792  # Check if we need to convert this using DOS-style short mode. If the path
62793  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62794  # take no chances and rewrite it.
62795  # Note: m4 eats our [], so we need to use [ and ] instead.
62796  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62797  if test "x$has_forbidden_chars" != x; then
62798    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62799    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62800    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62801    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62802      # Going to short mode and back again did indeed matter. Since short mode is
62803      # case insensitive, let's make it lowercase to improve readability.
62804      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62805      # Now convert it back to Unix-style (cygpath)
62806      input_path=`$CYGPATH -u "$shortmode_path"`
62807      new_path="$input_path"
62808    fi
62809  fi
62810
62811  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62812  if test "x$test_cygdrive_prefix" = x; then
62813    # As a simple fix, exclude /usr/bin since it's not a real path.
62814    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62815      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62816      # a path prefixed by /cygdrive for fixpath to work.
62817      new_path="$CYGWIN_ROOT_PATH$input_path"
62818    fi
62819  fi
62820
62821
62822  if test "x$path" != "x$new_path"; then
62823    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62824    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62825$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62826  fi
62827
62828    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62829
62830  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62831  has_colon=`$ECHO $path | $GREP ^.:`
62832  new_path="$path"
62833  if test "x$has_colon" = x; then
62834    # Not in mixed or Windows style, start by that.
62835    new_path=`cmd //c echo $path`
62836  fi
62837
62838
62839  input_path="$new_path"
62840  # Check if we need to convert this using DOS-style short mode. If the path
62841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62842  # take no chances and rewrite it.
62843  # Note: m4 eats our [], so we need to use [ and ] instead.
62844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62845  if test "x$has_forbidden_chars" != x; then
62846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62847    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62848  fi
62849
62850
62851  windows_path="$new_path"
62852  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62853    unix_path=`$CYGPATH -u "$windows_path"`
62854    new_path="$unix_path"
62855  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62856    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62857    new_path="$unix_path"
62858  fi
62859
62860  if test "x$path" != "x$new_path"; then
62861    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62862    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62863$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62864  fi
62865
62866  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62867  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62868
62869    else
62870      # We're on a unix platform. Hooray! :)
62871      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62872      has_space=`$ECHO "$path" | $GREP " "`
62873      if test "x$has_space" != x; then
62874        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62875$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62876        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62877      fi
62878
62879      # Use eval to expand a potential ~
62880      eval path="$path"
62881      if test ! -f "$path" && test ! -d "$path"; then
62882        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62883      fi
62884
62885      if test -d "$path"; then
62886        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62887      else
62888        dir="`$DIRNAME "$path"`"
62889        base="`$BASENAME "$path"`"
62890        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62891      fi
62892    fi
62893  fi
62894
62895
62896  # Only process if variable expands to non-empty
62897
62898  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62899    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62900
62901  # Input might be given as Windows format, start by converting to
62902  # unix format.
62903  path="$POTENTIAL_FREETYPE_LIB_PATH"
62904  new_path=`$CYGPATH -u "$path"`
62905
62906  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62907  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62908  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62909  # "foo.exe" is OK but "foo" is an error.
62910  #
62911  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62912  # It is also a way to make sure we got the proper file name for the real test later on.
62913  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62914  if test "x$test_shortpath" = x; then
62915    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62916$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62917    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62918  fi
62919
62920  # Call helper function which possibly converts this using DOS-style short mode.
62921  # If so, the updated path is stored in $new_path.
62922
62923  input_path="$new_path"
62924  # Check if we need to convert this using DOS-style short mode. If the path
62925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62926  # take no chances and rewrite it.
62927  # Note: m4 eats our [], so we need to use [ and ] instead.
62928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62929  if test "x$has_forbidden_chars" != x; then
62930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62931    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62932    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62933    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62934      # Going to short mode and back again did indeed matter. Since short mode is
62935      # case insensitive, let's make it lowercase to improve readability.
62936      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62937      # Now convert it back to Unix-style (cygpath)
62938      input_path=`$CYGPATH -u "$shortmode_path"`
62939      new_path="$input_path"
62940    fi
62941  fi
62942
62943  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62944  if test "x$test_cygdrive_prefix" = x; then
62945    # As a simple fix, exclude /usr/bin since it's not a real path.
62946    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62947      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62948      # a path prefixed by /cygdrive for fixpath to work.
62949      new_path="$CYGWIN_ROOT_PATH$input_path"
62950    fi
62951  fi
62952
62953
62954  if test "x$path" != "x$new_path"; then
62955    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62956    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62957$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62958  fi
62959
62960    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62961
62962  path="$POTENTIAL_FREETYPE_LIB_PATH"
62963  has_colon=`$ECHO $path | $GREP ^.:`
62964  new_path="$path"
62965  if test "x$has_colon" = x; then
62966    # Not in mixed or Windows style, start by that.
62967    new_path=`cmd //c echo $path`
62968  fi
62969
62970
62971  input_path="$new_path"
62972  # Check if we need to convert this using DOS-style short mode. If the path
62973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62974  # take no chances and rewrite it.
62975  # Note: m4 eats our [], so we need to use [ and ] instead.
62976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62977  if test "x$has_forbidden_chars" != x; then
62978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62980  fi
62981
62982
62983  windows_path="$new_path"
62984  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62985    unix_path=`$CYGPATH -u "$windows_path"`
62986    new_path="$unix_path"
62987  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62988    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62989    new_path="$unix_path"
62990  fi
62991
62992  if test "x$path" != "x$new_path"; then
62993    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62994    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62995$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62996  fi
62997
62998  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62999  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63000
63001    else
63002      # We're on a unix platform. Hooray! :)
63003      path="$POTENTIAL_FREETYPE_LIB_PATH"
63004      has_space=`$ECHO "$path" | $GREP " "`
63005      if test "x$has_space" != x; then
63006        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63007$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63008        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63009      fi
63010
63011      # Use eval to expand a potential ~
63012      eval path="$path"
63013      if test ! -f "$path" && test ! -d "$path"; then
63014        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63015      fi
63016
63017      if test -d "$path"; then
63018        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63019      else
63020        dir="`$DIRNAME "$path"`"
63021        base="`$BASENAME "$path"`"
63022        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63023      fi
63024    fi
63025  fi
63026
63027
63028    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
63029    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
63030$as_echo_n "checking for freetype includes... " >&6; }
63031    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
63032$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
63033    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
63034    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
63035$as_echo_n "checking for freetype libraries... " >&6; }
63036    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
63037$as_echo "$FREETYPE_LIB_PATH" >&6; }
63038  fi
63039
63040              fi
63041            fi
63042          fi
63043        fi
63044      fi # end check in well-known locations
63045
63046      if test "x$FOUND_FREETYPE" != xyes; then
63047
63048  # Print a helpful message on how to acquire the necessary build dependency.
63049  # freetype is the help tag: freetype, cups, alsa etc
63050  MISSING_DEPENDENCY=freetype
63051
63052  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63053    cygwin_help $MISSING_DEPENDENCY
63054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63055    msys_help $MISSING_DEPENDENCY
63056  else
63057    PKGHANDLER_COMMAND=
63058
63059    case $PKGHANDLER in
63060      apt-get)
63061        apt_help     $MISSING_DEPENDENCY ;;
63062      yum)
63063        yum_help     $MISSING_DEPENDENCY ;;
63064      port)
63065        port_help    $MISSING_DEPENDENCY ;;
63066      pkgutil)
63067        pkgutil_help $MISSING_DEPENDENCY ;;
63068      pkgadd)
63069        pkgadd_help  $MISSING_DEPENDENCY ;;
63070    esac
63071
63072    if test "x$PKGHANDLER_COMMAND" != x; then
63073      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63074    fi
63075  fi
63076
63077        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
63078      fi
63079    fi # end user specified settings
63080
63081    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
63082    if test "x$FREETYPE_CFLAGS" = x; then
63083
63084  # Only process if variable expands to non-empty
63085
63086  if test "x$FREETYPE_INCLUDE_PATH" != x; then
63087    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63088
63089  # Input might be given as Windows format, start by converting to
63090  # unix format.
63091  path="$FREETYPE_INCLUDE_PATH"
63092  new_path=`$CYGPATH -u "$path"`
63093
63094  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63095  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63096  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63097  # "foo.exe" is OK but "foo" is an error.
63098  #
63099  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63100  # It is also a way to make sure we got the proper file name for the real test later on.
63101  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63102  if test "x$test_shortpath" = x; then
63103    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63104$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63105    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
63106  fi
63107
63108  # Call helper function which possibly converts this using DOS-style short mode.
63109  # If so, the updated path is stored in $new_path.
63110
63111  input_path="$new_path"
63112  # Check if we need to convert this using DOS-style short mode. If the path
63113  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63114  # take no chances and rewrite it.
63115  # Note: m4 eats our [], so we need to use [ and ] instead.
63116  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63117  if test "x$has_forbidden_chars" != x; then
63118    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63119    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63120    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63121    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63122      # Going to short mode and back again did indeed matter. Since short mode is
63123      # case insensitive, let's make it lowercase to improve readability.
63124      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63125      # Now convert it back to Unix-style (cygpath)
63126      input_path=`$CYGPATH -u "$shortmode_path"`
63127      new_path="$input_path"
63128    fi
63129  fi
63130
63131  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63132  if test "x$test_cygdrive_prefix" = x; then
63133    # As a simple fix, exclude /usr/bin since it's not a real path.
63134    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63135      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63136      # a path prefixed by /cygdrive for fixpath to work.
63137      new_path="$CYGWIN_ROOT_PATH$input_path"
63138    fi
63139  fi
63140
63141
63142  if test "x$path" != "x$new_path"; then
63143    FREETYPE_INCLUDE_PATH="$new_path"
63144    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63145$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63146  fi
63147
63148    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63149
63150  path="$FREETYPE_INCLUDE_PATH"
63151  has_colon=`$ECHO $path | $GREP ^.:`
63152  new_path="$path"
63153  if test "x$has_colon" = x; then
63154    # Not in mixed or Windows style, start by that.
63155    new_path=`cmd //c echo $path`
63156  fi
63157
63158
63159  input_path="$new_path"
63160  # Check if we need to convert this using DOS-style short mode. If the path
63161  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63162  # take no chances and rewrite it.
63163  # Note: m4 eats our [], so we need to use [ and ] instead.
63164  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63165  if test "x$has_forbidden_chars" != x; then
63166    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63167    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63168  fi
63169
63170
63171  windows_path="$new_path"
63172  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63173    unix_path=`$CYGPATH -u "$windows_path"`
63174    new_path="$unix_path"
63175  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63176    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63177    new_path="$unix_path"
63178  fi
63179
63180  if test "x$path" != "x$new_path"; then
63181    FREETYPE_INCLUDE_PATH="$new_path"
63182    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
63183$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
63184  fi
63185
63186  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63187  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63188
63189    else
63190      # We're on a unix platform. Hooray! :)
63191      path="$FREETYPE_INCLUDE_PATH"
63192      has_space=`$ECHO "$path" | $GREP " "`
63193      if test "x$has_space" != x; then
63194        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
63195$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
63196        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63197      fi
63198
63199      # Use eval to expand a potential ~
63200      eval path="$path"
63201      if test ! -f "$path" && test ! -d "$path"; then
63202        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63203      fi
63204
63205      if test -d "$path"; then
63206        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
63207      else
63208        dir="`$DIRNAME "$path"`"
63209        base="`$BASENAME "$path"`"
63210        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63211      fi
63212    fi
63213  fi
63214
63215      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
63216        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
63217      else
63218        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
63219      fi
63220    fi
63221
63222    if test "x$FREETYPE_LIBS" = x; then
63223
63224  # Only process if variable expands to non-empty
63225
63226  if test "x$FREETYPE_LIB_PATH" != x; then
63227    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63228
63229  # Input might be given as Windows format, start by converting to
63230  # unix format.
63231  path="$FREETYPE_LIB_PATH"
63232  new_path=`$CYGPATH -u "$path"`
63233
63234  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
63235  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
63236  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
63237  # "foo.exe" is OK but "foo" is an error.
63238  #
63239  # This test is therefore slightly more accurate than "test -f" to check for file precense.
63240  # It is also a way to make sure we got the proper file name for the real test later on.
63241  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
63242  if test "x$test_shortpath" = x; then
63243    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63244$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63245    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
63246  fi
63247
63248  # Call helper function which possibly converts this using DOS-style short mode.
63249  # If so, the updated path is stored in $new_path.
63250
63251  input_path="$new_path"
63252  # Check if we need to convert this using DOS-style short mode. If the path
63253  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63254  # take no chances and rewrite it.
63255  # Note: m4 eats our [], so we need to use [ and ] instead.
63256  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
63257  if test "x$has_forbidden_chars" != x; then
63258    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63259    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
63260    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
63261    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
63262      # Going to short mode and back again did indeed matter. Since short mode is
63263      # case insensitive, let's make it lowercase to improve readability.
63264      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63265      # Now convert it back to Unix-style (cygpath)
63266      input_path=`$CYGPATH -u "$shortmode_path"`
63267      new_path="$input_path"
63268    fi
63269  fi
63270
63271  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
63272  if test "x$test_cygdrive_prefix" = x; then
63273    # As a simple fix, exclude /usr/bin since it's not a real path.
63274    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
63275      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
63276      # a path prefixed by /cygdrive for fixpath to work.
63277      new_path="$CYGWIN_ROOT_PATH$input_path"
63278    fi
63279  fi
63280
63281
63282  if test "x$path" != "x$new_path"; then
63283    FREETYPE_LIB_PATH="$new_path"
63284    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63285$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63286  fi
63287
63288    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63289
63290  path="$FREETYPE_LIB_PATH"
63291  has_colon=`$ECHO $path | $GREP ^.:`
63292  new_path="$path"
63293  if test "x$has_colon" = x; then
63294    # Not in mixed or Windows style, start by that.
63295    new_path=`cmd //c echo $path`
63296  fi
63297
63298
63299  input_path="$new_path"
63300  # Check if we need to convert this using DOS-style short mode. If the path
63301  # contains just simple characters, use it. Otherwise (spaces, weird characters),
63302  # take no chances and rewrite it.
63303  # Note: m4 eats our [], so we need to use [ and ] instead.
63304  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
63305  if test "x$has_forbidden_chars" != x; then
63306    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
63307    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
63308  fi
63309
63310
63311  windows_path="$new_path"
63312  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63313    unix_path=`$CYGPATH -u "$windows_path"`
63314    new_path="$unix_path"
63315  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63316    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
63317    new_path="$unix_path"
63318  fi
63319
63320  if test "x$path" != "x$new_path"; then
63321    FREETYPE_LIB_PATH="$new_path"
63322    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
63323$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
63324  fi
63325
63326  # Save the first 10 bytes of this path to the storage, so fixpath can work.
63327  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
63328
63329    else
63330      # We're on a unix platform. Hooray! :)
63331      path="$FREETYPE_LIB_PATH"
63332      has_space=`$ECHO "$path" | $GREP " "`
63333      if test "x$has_space" != x; then
63334        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
63335$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
63336        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
63337      fi
63338
63339      # Use eval to expand a potential ~
63340      eval path="$path"
63341      if test ! -f "$path" && test ! -d "$path"; then
63342        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
63343      fi
63344
63345      if test -d "$path"; then
63346        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
63347      else
63348        dir="`$DIRNAME "$path"`"
63349        base="`$BASENAME "$path"`"
63350        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
63351      fi
63352    fi
63353  fi
63354
63355      if test "x$OPENJDK_TARGET_OS" = xwindows; then
63356        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
63357      else
63358        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
63359      fi
63360    fi
63361
63362    # Try to compile it
63363    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
63364$as_echo_n "checking if we can compile and link with freetype... " >&6; }
63365    ac_ext=cpp
63366ac_cpp='$CXXCPP $CPPFLAGS'
63367ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63368ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63369ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63370
63371    PREV_CXXCFLAGS="$CXXFLAGS"
63372    PREV_LIBS="$LIBS"
63373    PREV_CXX="$CXX"
63374    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
63375    LIBS="$LIBS $FREETYPE_LIBS"
63376    CXX="$FIXPATH $CXX"
63377    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63378/* end confdefs.h.  */
63379
63380          #include<ft2build.h>
63381          #include FT_FREETYPE_H
63382          int main () {
63383            FT_Init_FreeType(NULL);
63384            return 0;
63385          }
63386
63387_ACEOF
63388if ac_fn_cxx_try_link "$LINENO"; then :
63389
63390          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63391$as_echo "yes" >&6; }
63392
63393else
63394
63395          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63396$as_echo "no" >&6; }
63397          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
63398$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
63399          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
63400$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
63401
63402
63403  # Print a helpful message on how to acquire the necessary build dependency.
63404  # freetype is the help tag: freetype, cups, alsa etc
63405  MISSING_DEPENDENCY=freetype
63406
63407  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63408    cygwin_help $MISSING_DEPENDENCY
63409  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63410    msys_help $MISSING_DEPENDENCY
63411  else
63412    PKGHANDLER_COMMAND=
63413
63414    case $PKGHANDLER in
63415      apt-get)
63416        apt_help     $MISSING_DEPENDENCY ;;
63417      yum)
63418        yum_help     $MISSING_DEPENDENCY ;;
63419      port)
63420        port_help    $MISSING_DEPENDENCY ;;
63421      pkgutil)
63422        pkgutil_help $MISSING_DEPENDENCY ;;
63423      pkgadd)
63424        pkgadd_help  $MISSING_DEPENDENCY ;;
63425    esac
63426
63427    if test "x$PKGHANDLER_COMMAND" != x; then
63428      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63429    fi
63430  fi
63431
63432
63433          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
63434
63435
63436fi
63437rm -f core conftest.err conftest.$ac_objext \
63438    conftest$ac_exeext conftest.$ac_ext
63439    CXXCFLAGS="$PREV_CXXFLAGS"
63440    LIBS="$PREV_LIBS"
63441    CXX="$PREV_CXX"
63442    ac_ext=cpp
63443ac_cpp='$CXXCPP $CPPFLAGS'
63444ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63445ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63446ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63447
63448
63449    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
63450$as_echo_n "checking if we should bundle freetype... " >&6; }
63451    if test "x$BUNDLE_FREETYPE" = xyes; then
63452      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
63453    fi
63454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
63455$as_echo "$BUNDLE_FREETYPE" >&6; }
63456
63457  fi # end freetype needed
63458
63459
63460
63461
63462
63463
63464
63465# Check whether --with-alsa was given.
63466if test "${with_alsa+set}" = set; then :
63467  withval=$with_alsa;
63468fi
63469
63470
63471# Check whether --with-alsa-include was given.
63472if test "${with_alsa_include+set}" = set; then :
63473  withval=$with_alsa_include;
63474fi
63475
63476
63477# Check whether --with-alsa-lib was given.
63478if test "${with_alsa_lib+set}" = set; then :
63479  withval=$with_alsa_lib;
63480fi
63481
63482
63483  if test "x$NEEDS_LIB_ALSA" = xfalse; then
63484    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
63485        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
63486        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
63487      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
63488$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
63489    fi
63490    ALSA_CFLAGS=
63491    ALSA_LIBS=
63492  else
63493    ALSA_FOUND=no
63494
63495    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
63496      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
63497    fi
63498
63499    if test "x${with_alsa}" != x; then
63500      ALSA_LIBS="-L${with_alsa}/lib -lasound"
63501      ALSA_CFLAGS="-I${with_alsa}/include"
63502      ALSA_FOUND=yes
63503    fi
63504    if test "x${with_alsa_include}" != x; then
63505      ALSA_CFLAGS="-I${with_alsa_include}"
63506      ALSA_FOUND=yes
63507    fi
63508    if test "x${with_alsa_lib}" != x; then
63509      ALSA_LIBS="-L${with_alsa_lib} -lasound"
63510      ALSA_FOUND=yes
63511    fi
63512    # Do not try pkg-config if we have a sysroot set.
63513    if test "x$SYSROOT" = x; then
63514      if test "x$ALSA_FOUND" = xno; then
63515
63516pkg_failed=no
63517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
63518$as_echo_n "checking for ALSA... " >&6; }
63519
63520if test -n "$ALSA_CFLAGS"; then
63521    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
63522 elif test -n "$PKG_CONFIG"; then
63523    if test -n "$PKG_CONFIG" && \
63524    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63525  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63526  ac_status=$?
63527  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63528  test $ac_status = 0; }; then
63529  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
63530else
63531  pkg_failed=yes
63532fi
63533 else
63534    pkg_failed=untried
63535fi
63536if test -n "$ALSA_LIBS"; then
63537    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63538 elif test -n "$PKG_CONFIG"; then
63539    if test -n "$PKG_CONFIG" && \
63540    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63541  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63542  ac_status=$?
63543  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63544  test $ac_status = 0; }; then
63545  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63546else
63547  pkg_failed=yes
63548fi
63549 else
63550    pkg_failed=untried
63551fi
63552
63553
63554
63555if test $pkg_failed = yes; then
63556
63557if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63558        _pkg_short_errors_supported=yes
63559else
63560        _pkg_short_errors_supported=no
63561fi
63562        if test $_pkg_short_errors_supported = yes; then
63563	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63564        else
63565	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63566        fi
63567	# Put the nasty error message in config.log where it belongs
63568	echo "$ALSA_PKG_ERRORS" >&5
63569
63570	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63571$as_echo "no" >&6; }
63572                ALSA_FOUND=no
63573elif test $pkg_failed = untried; then
63574	ALSA_FOUND=no
63575else
63576	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63577	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63578        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63579$as_echo "yes" >&6; }
63580	ALSA_FOUND=yes
63581fi
63582      fi
63583    fi
63584    if test "x$ALSA_FOUND" = xno; then
63585      for ac_header in alsa/asoundlib.h
63586do :
63587  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63588if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63589  cat >>confdefs.h <<_ACEOF
63590#define HAVE_ALSA_ASOUNDLIB_H 1
63591_ACEOF
63592
63593            ALSA_FOUND=yes
63594            ALSA_CFLAGS=-Iignoreme
63595            ALSA_LIBS=-lasound
63596            DEFAULT_ALSA=yes
63597
63598else
63599  ALSA_FOUND=no
63600
63601fi
63602
63603done
63604
63605    fi
63606    if test "x$ALSA_FOUND" = xno; then
63607
63608  # Print a helpful message on how to acquire the necessary build dependency.
63609  # alsa is the help tag: freetype, cups, alsa etc
63610  MISSING_DEPENDENCY=alsa
63611
63612  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63613    cygwin_help $MISSING_DEPENDENCY
63614  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63615    msys_help $MISSING_DEPENDENCY
63616  else
63617    PKGHANDLER_COMMAND=
63618
63619    case $PKGHANDLER in
63620      apt-get)
63621        apt_help     $MISSING_DEPENDENCY ;;
63622      yum)
63623        yum_help     $MISSING_DEPENDENCY ;;
63624      port)
63625        port_help    $MISSING_DEPENDENCY ;;
63626      pkgutil)
63627        pkgutil_help $MISSING_DEPENDENCY ;;
63628      pkgadd)
63629        pkgadd_help  $MISSING_DEPENDENCY ;;
63630    esac
63631
63632    if test "x$PKGHANDLER_COMMAND" != x; then
63633      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63634    fi
63635  fi
63636
63637      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63638    fi
63639  fi
63640
63641
63642
63643
63644
63645
63646# Check whether --with-libffi was given.
63647if test "${with_libffi+set}" = set; then :
63648  withval=$with_libffi;
63649fi
63650
63651
63652# Check whether --with-libffi-include was given.
63653if test "${with_libffi_include+set}" = set; then :
63654  withval=$with_libffi_include;
63655fi
63656
63657
63658# Check whether --with-libffi-lib was given.
63659if test "${with_libffi_lib+set}" = set; then :
63660  withval=$with_libffi_lib;
63661fi
63662
63663
63664  if test "x$NEEDS_LIB_FFI" = xfalse; then
63665    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63666        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63667        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63668      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63669$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63670    fi
63671    LIBFFI_CFLAGS=
63672    LIBFFI_LIBS=
63673  else
63674    LIBFFI_FOUND=no
63675
63676    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63677      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63678    fi
63679
63680    if test "x${with_libffi}" != x; then
63681      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63682      LIBFFI_CFLAGS="-I${with_libffi}/include"
63683      LIBFFI_FOUND=yes
63684    fi
63685    if test "x${with_libffi_include}" != x; then
63686      LIBFFI_CFLAGS="-I${with_libffi_include}"
63687      LIBFFI_FOUND=yes
63688    fi
63689    if test "x${with_libffi_lib}" != x; then
63690      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63691      LIBFFI_FOUND=yes
63692    fi
63693    # Do not try pkg-config if we have a sysroot set.
63694    if test "x$SYSROOT" = x; then
63695      if test "x$LIBFFI_FOUND" = xno; then
63696        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63697
63698pkg_failed=no
63699{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63700$as_echo_n "checking for LIBFFI... " >&6; }
63701
63702if test -n "$LIBFFI_CFLAGS"; then
63703    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63704 elif test -n "$PKG_CONFIG"; then
63705    if test -n "$PKG_CONFIG" && \
63706    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63707  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63708  ac_status=$?
63709  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63710  test $ac_status = 0; }; then
63711  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63712else
63713  pkg_failed=yes
63714fi
63715 else
63716    pkg_failed=untried
63717fi
63718if test -n "$LIBFFI_LIBS"; then
63719    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63720 elif test -n "$PKG_CONFIG"; then
63721    if test -n "$PKG_CONFIG" && \
63722    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63723  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63724  ac_status=$?
63725  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63726  test $ac_status = 0; }; then
63727  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63728else
63729  pkg_failed=yes
63730fi
63731 else
63732    pkg_failed=untried
63733fi
63734
63735
63736
63737if test $pkg_failed = yes; then
63738
63739if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63740        _pkg_short_errors_supported=yes
63741else
63742        _pkg_short_errors_supported=no
63743fi
63744        if test $_pkg_short_errors_supported = yes; then
63745	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63746        else
63747	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63748        fi
63749	# Put the nasty error message in config.log where it belongs
63750	echo "$LIBFFI_PKG_ERRORS" >&5
63751
63752	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63753$as_echo "no" >&6; }
63754                LIBFFI_FOUND=no
63755elif test $pkg_failed = untried; then
63756	LIBFFI_FOUND=no
63757else
63758	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63759	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63760        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63761$as_echo "yes" >&6; }
63762	LIBFFI_FOUND=yes
63763fi
63764      fi
63765    fi
63766    if test "x$LIBFFI_FOUND" = xno; then
63767      for ac_header in ffi.h
63768do :
63769  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63770if test "x$ac_cv_header_ffi_h" = xyes; then :
63771  cat >>confdefs.h <<_ACEOF
63772#define HAVE_FFI_H 1
63773_ACEOF
63774
63775            LIBFFI_FOUND=yes
63776            LIBFFI_CFLAGS=
63777            LIBFFI_LIBS=-lffi
63778
63779else
63780  LIBFFI_FOUND=no
63781
63782fi
63783
63784done
63785
63786    fi
63787    if test "x$LIBFFI_FOUND" = xno; then
63788
63789  # Print a helpful message on how to acquire the necessary build dependency.
63790  # ffi is the help tag: freetype, cups, alsa etc
63791  MISSING_DEPENDENCY=ffi
63792
63793  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63794    cygwin_help $MISSING_DEPENDENCY
63795  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63796    msys_help $MISSING_DEPENDENCY
63797  else
63798    PKGHANDLER_COMMAND=
63799
63800    case $PKGHANDLER in
63801      apt-get)
63802        apt_help     $MISSING_DEPENDENCY ;;
63803      yum)
63804        yum_help     $MISSING_DEPENDENCY ;;
63805      port)
63806        port_help    $MISSING_DEPENDENCY ;;
63807      pkgutil)
63808        pkgutil_help $MISSING_DEPENDENCY ;;
63809      pkgadd)
63810        pkgadd_help  $MISSING_DEPENDENCY ;;
63811    esac
63812
63813    if test "x$PKGHANDLER_COMMAND" != x; then
63814      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63815    fi
63816  fi
63817
63818      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63819    fi
63820
63821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63822$as_echo_n "checking if libffi works... " >&6; }
63823    ac_ext=c
63824ac_cpp='$CPP $CPPFLAGS'
63825ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63826ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63827ac_compiler_gnu=$ac_cv_c_compiler_gnu
63828
63829    OLD_CFLAGS="$CFLAGS"
63830    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63831    OLD_LIBS="$LIBS"
63832    LIBS="$LIBS $LIBFFI_LIBS"
63833    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63834/* end confdefs.h.  */
63835#include <ffi.h>
63836int
63837main ()
63838{
63839
63840          ffi_call(NULL, NULL, NULL, NULL);
63841          return 0;
63842
63843  ;
63844  return 0;
63845}
63846_ACEOF
63847if ac_fn_c_try_link "$LINENO"; then :
63848  LIBFFI_WORKS=yes
63849else
63850  LIBFFI_WORKS=no
63851
63852fi
63853rm -f core conftest.err conftest.$ac_objext \
63854    conftest$ac_exeext conftest.$ac_ext
63855    CFLAGS="$OLD_CFLAGS"
63856    LIBS="$OLD_LIBS"
63857    ac_ext=cpp
63858ac_cpp='$CXXCPP $CPPFLAGS'
63859ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63860ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63861ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63862
63863    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63864$as_echo "$LIBFFI_WORKS" >&6; }
63865
63866    if test "x$LIBFFI_WORKS" = xno; then
63867
63868  # Print a helpful message on how to acquire the necessary build dependency.
63869  # ffi is the help tag: freetype, cups, alsa etc
63870  MISSING_DEPENDENCY=ffi
63871
63872  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63873    cygwin_help $MISSING_DEPENDENCY
63874  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63875    msys_help $MISSING_DEPENDENCY
63876  else
63877    PKGHANDLER_COMMAND=
63878
63879    case $PKGHANDLER in
63880      apt-get)
63881        apt_help     $MISSING_DEPENDENCY ;;
63882      yum)
63883        yum_help     $MISSING_DEPENDENCY ;;
63884      port)
63885        port_help    $MISSING_DEPENDENCY ;;
63886      pkgutil)
63887        pkgutil_help $MISSING_DEPENDENCY ;;
63888      pkgadd)
63889        pkgadd_help  $MISSING_DEPENDENCY ;;
63890    esac
63891
63892    if test "x$PKGHANDLER_COMMAND" != x; then
63893      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63894    fi
63895  fi
63896
63897      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63898    fi
63899  fi
63900
63901
63902
63903
63904
63905  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63906    # Extract the first word of "llvm-config", so it can be a program name with args.
63907set dummy llvm-config; ac_word=$2
63908{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63909$as_echo_n "checking for $ac_word... " >&6; }
63910if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63911  $as_echo_n "(cached) " >&6
63912else
63913  if test -n "$LLVM_CONFIG"; then
63914  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63915else
63916as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63917for as_dir in $PATH
63918do
63919  IFS=$as_save_IFS
63920  test -z "$as_dir" && as_dir=.
63921    for ac_exec_ext in '' $ac_executable_extensions; do
63922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63923    ac_cv_prog_LLVM_CONFIG="llvm-config"
63924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63925    break 2
63926  fi
63927done
63928  done
63929IFS=$as_save_IFS
63930
63931fi
63932fi
63933LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63934if test -n "$LLVM_CONFIG"; then
63935  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63936$as_echo "$LLVM_CONFIG" >&6; }
63937else
63938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63939$as_echo "no" >&6; }
63940fi
63941
63942
63943
63944    if test "x$LLVM_CONFIG" != xllvm-config; then
63945      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63946    fi
63947
63948    llvm_components="jit mcjit engine nativecodegen native"
63949    unset LLVM_CFLAGS
63950    for flag in $("$LLVM_CONFIG" --cxxflags); do
63951      if echo "${flag}" | grep -q '^-[ID]'; then
63952        if test "${flag}" != "-D_DEBUG" ; then
63953          if test "${LLVM_CFLAGS}" != "" ; then
63954            LLVM_CFLAGS="${LLVM_CFLAGS} "
63955          fi
63956          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63957        fi
63958      fi
63959    done
63960    llvm_version=$("${LLVM_CONFIG}" --version | $SED 's/\.//; s/svn.*//')
63961    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63962
63963    unset LLVM_LDFLAGS
63964    for flag in $("${LLVM_CONFIG}" --ldflags); do
63965      if echo "${flag}" | grep -q '^-L'; then
63966        if test "${LLVM_LDFLAGS}" != ""; then
63967          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63968        fi
63969        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63970      fi
63971    done
63972
63973    unset LLVM_LIBS
63974    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63975      if echo "${flag}" | grep -q '^-l'; then
63976        if test "${LLVM_LIBS}" != ""; then
63977          LLVM_LIBS="${LLVM_LIBS} "
63978        fi
63979        LLVM_LIBS="${LLVM_LIBS}${flag}"
63980      fi
63981    done
63982
63983    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63984    # always properly detect -ltinfo
63985    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63986
63987
63988
63989
63990  fi
63991
63992
63993
63994# Check whether --with-libjpeg was given.
63995if test "${with_libjpeg+set}" = set; then :
63996  withval=$with_libjpeg;
63997fi
63998
63999
64000  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
64001$as_echo_n "checking for which libjpeg to use... " >&6; }
64002  # default is bundled
64003  DEFAULT_LIBJPEG=bundled
64004  # if user didn't specify, use DEFAULT_LIBJPEG
64005  if test "x${with_libjpeg}" = "x"; then
64006    with_libjpeg=${DEFAULT_LIBJPEG}
64007  fi
64008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
64009$as_echo "${with_libjpeg}" >&6; }
64010
64011  if test "x${with_libjpeg}" = "xbundled"; then
64012    USE_EXTERNAL_LIBJPEG=false
64013  elif test "x${with_libjpeg}" = "xsystem"; then
64014    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
64015if test "x$ac_cv_header_jpeglib_h" = xyes; then :
64016
64017else
64018   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
64019fi
64020
64021
64022    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
64023$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
64024if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
64025  $as_echo_n "(cached) " >&6
64026else
64027  ac_check_lib_save_LIBS=$LIBS
64028LIBS="-ljpeg  $LIBS"
64029cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64030/* end confdefs.h.  */
64031
64032/* Override any GCC internal prototype to avoid an error.
64033   Use char because int might match the return type of a GCC
64034   builtin and then its argument prototype would still apply.  */
64035#ifdef __cplusplus
64036extern "C"
64037#endif
64038char jpeg_CreateDecompress ();
64039int
64040main ()
64041{
64042return jpeg_CreateDecompress ();
64043  ;
64044  return 0;
64045}
64046_ACEOF
64047if ac_fn_cxx_try_link "$LINENO"; then :
64048  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
64049else
64050  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
64051fi
64052rm -f core conftest.err conftest.$ac_objext \
64053    conftest$ac_exeext conftest.$ac_ext
64054LIBS=$ac_check_lib_save_LIBS
64055fi
64056{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
64057$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
64058if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
64059  cat >>confdefs.h <<_ACEOF
64060#define HAVE_LIBJPEG 1
64061_ACEOF
64062
64063  LIBS="-ljpeg $LIBS"
64064
64065else
64066   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
64067fi
64068
64069
64070    USE_EXTERNAL_LIBJPEG=true
64071  else
64072    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
64073  fi
64074
64075
64076
64077
64078
64079# Check whether --with-giflib was given.
64080if test "${with_giflib+set}" = set; then :
64081  withval=$with_giflib;
64082fi
64083
64084
64085  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
64086$as_echo_n "checking for which giflib to use... " >&6; }
64087  # default is bundled
64088  DEFAULT_GIFLIB=bundled
64089  # if user didn't specify, use DEFAULT_GIFLIB
64090  if test "x${with_giflib}" = "x"; then
64091    with_giflib=${DEFAULT_GIFLIB}
64092  fi
64093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
64094$as_echo "${with_giflib}" >&6; }
64095
64096  if test "x${with_giflib}" = "xbundled"; then
64097    USE_EXTERNAL_LIBGIF=false
64098  elif test "x${with_giflib}" = "xsystem"; then
64099    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
64100if test "x$ac_cv_header_gif_lib_h" = xyes; then :
64101
64102else
64103   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
64104fi
64105
64106
64107    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
64108$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
64109if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
64110  $as_echo_n "(cached) " >&6
64111else
64112  ac_check_lib_save_LIBS=$LIBS
64113LIBS="-lgif  $LIBS"
64114cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64115/* end confdefs.h.  */
64116
64117/* Override any GCC internal prototype to avoid an error.
64118   Use char because int might match the return type of a GCC
64119   builtin and then its argument prototype would still apply.  */
64120#ifdef __cplusplus
64121extern "C"
64122#endif
64123char DGifGetCode ();
64124int
64125main ()
64126{
64127return DGifGetCode ();
64128  ;
64129  return 0;
64130}
64131_ACEOF
64132if ac_fn_cxx_try_link "$LINENO"; then :
64133  ac_cv_lib_gif_DGifGetCode=yes
64134else
64135  ac_cv_lib_gif_DGifGetCode=no
64136fi
64137rm -f core conftest.err conftest.$ac_objext \
64138    conftest$ac_exeext conftest.$ac_ext
64139LIBS=$ac_check_lib_save_LIBS
64140fi
64141{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
64142$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
64143if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
64144  cat >>confdefs.h <<_ACEOF
64145#define HAVE_LIBGIF 1
64146_ACEOF
64147
64148  LIBS="-lgif $LIBS"
64149
64150else
64151   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
64152fi
64153
64154
64155    USE_EXTERNAL_LIBGIF=true
64156  else
64157    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
64158  fi
64159
64160
64161
64162
64163
64164# Check whether --with-libpng was given.
64165if test "${with_libpng+set}" = set; then :
64166  withval=$with_libpng;
64167fi
64168
64169
64170  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
64171$as_echo_n "checking for which libpng to use... " >&6; }
64172
64173  # default is bundled
64174  DEFAULT_LIBPNG=bundled
64175  # if user didn't specify, use DEFAULT_LIBPNG
64176  if test "x${with_libpng}" = "x"; then
64177      with_libpng=${DEFAULT_LIBPNG}
64178  fi
64179
64180  if test "x${with_libpng}" = "xbundled"; then
64181      USE_EXTERNAL_LIBPNG=false
64182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64183$as_echo "bundled" >&6; }
64184  elif test "x${with_libpng}" = "xsystem"; then
64185
64186pkg_failed=no
64187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
64188$as_echo_n "checking for PNG... " >&6; }
64189
64190if test -n "$PNG_CFLAGS"; then
64191    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
64192 elif test -n "$PKG_CONFIG"; then
64193    if test -n "$PKG_CONFIG" && \
64194    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64195  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64196  ac_status=$?
64197  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64198  test $ac_status = 0; }; then
64199  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
64200else
64201  pkg_failed=yes
64202fi
64203 else
64204    pkg_failed=untried
64205fi
64206if test -n "$PNG_LIBS"; then
64207    pkg_cv_PNG_LIBS="$PNG_LIBS"
64208 elif test -n "$PKG_CONFIG"; then
64209    if test -n "$PKG_CONFIG" && \
64210    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
64211  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
64212  ac_status=$?
64213  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64214  test $ac_status = 0; }; then
64215  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
64216else
64217  pkg_failed=yes
64218fi
64219 else
64220    pkg_failed=untried
64221fi
64222
64223
64224
64225if test $pkg_failed = yes; then
64226
64227if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64228        _pkg_short_errors_supported=yes
64229else
64230        _pkg_short_errors_supported=no
64231fi
64232        if test $_pkg_short_errors_supported = yes; then
64233	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
64234        else
64235	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
64236        fi
64237	# Put the nasty error message in config.log where it belongs
64238	echo "$PNG_PKG_ERRORS" >&5
64239
64240	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64241$as_echo "no" >&6; }
64242                 LIBPNG_FOUND=no
64243elif test $pkg_failed = untried; then
64244	 LIBPNG_FOUND=no
64245else
64246	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
64247	PNG_LIBS=$pkg_cv_PNG_LIBS
64248        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64249$as_echo "yes" >&6; }
64250	 LIBPNG_FOUND=yes
64251fi
64252      if test "x${LIBPNG_FOUND}" = "xyes"; then
64253          USE_EXTERNAL_LIBPNG=true
64254          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64255$as_echo "system" >&6; }
64256      else
64257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64258$as_echo "system not found" >&6; }
64259          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
64260      fi
64261  else
64262      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
64263  fi
64264
64265
64266
64267
64268
64269# Check whether --with-zlib was given.
64270if test "${with_zlib+set}" = set; then :
64271  withval=$with_zlib;
64272fi
64273
64274
64275  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
64276$as_echo_n "checking for compress in -lz... " >&6; }
64277if ${ac_cv_lib_z_compress+:} false; then :
64278  $as_echo_n "(cached) " >&6
64279else
64280  ac_check_lib_save_LIBS=$LIBS
64281LIBS="-lz  $LIBS"
64282cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64283/* end confdefs.h.  */
64284
64285/* Override any GCC internal prototype to avoid an error.
64286   Use char because int might match the return type of a GCC
64287   builtin and then its argument prototype would still apply.  */
64288#ifdef __cplusplus
64289extern "C"
64290#endif
64291char compress ();
64292int
64293main ()
64294{
64295return compress ();
64296  ;
64297  return 0;
64298}
64299_ACEOF
64300if ac_fn_cxx_try_link "$LINENO"; then :
64301  ac_cv_lib_z_compress=yes
64302else
64303  ac_cv_lib_z_compress=no
64304fi
64305rm -f core conftest.err conftest.$ac_objext \
64306    conftest$ac_exeext conftest.$ac_ext
64307LIBS=$ac_check_lib_save_LIBS
64308fi
64309{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
64310$as_echo "$ac_cv_lib_z_compress" >&6; }
64311if test "x$ac_cv_lib_z_compress" = xyes; then :
64312   ZLIB_FOUND=yes
64313else
64314   ZLIB_FOUND=no
64315fi
64316
64317
64318  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
64319$as_echo_n "checking for which zlib to use... " >&6; }
64320
64321  DEFAULT_ZLIB=system
64322  if test "x$OPENJDK_TARGET_OS" = xwindows; then
64323    # On windows default is bundled...on others default is system
64324    DEFAULT_ZLIB=bundled
64325  fi
64326
64327  if test "x${ZLIB_FOUND}" != "xyes"; then
64328    # If we don't find any system...set default to bundled
64329    DEFAULT_ZLIB=bundled
64330  fi
64331
64332  # If user didn't specify, use DEFAULT_ZLIB
64333  if test "x${with_zlib}" = "x"; then
64334    with_zlib=${DEFAULT_ZLIB}
64335  fi
64336
64337  if test "x${with_zlib}" = "xbundled"; then
64338    USE_EXTERNAL_LIBZ=false
64339    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64340$as_echo "bundled" >&6; }
64341  elif test "x${with_zlib}" = "xsystem"; then
64342    if test "x${ZLIB_FOUND}" = "xyes"; then
64343      USE_EXTERNAL_LIBZ=true
64344      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64345$as_echo "system" >&6; }
64346    else
64347      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
64348$as_echo "system not found" >&6; }
64349      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
64350    fi
64351  else
64352    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
64353  fi
64354
64355
64356
64357
64358
64359# Check whether --with-lcms was given.
64360if test "${with_lcms+set}" = set; then :
64361  withval=$with_lcms;
64362fi
64363
64364
64365  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
64366$as_echo_n "checking for which lcms to use... " >&6; }
64367
64368  DEFAULT_LCMS=bundled
64369  # If user didn't specify, use DEFAULT_LCMS
64370  if test "x${with_lcms}" = "x"; then
64371      with_lcms=${DEFAULT_LCMS}
64372  fi
64373
64374  if test "x${with_lcms}" = "xbundled"; then
64375    USE_EXTERNAL_LCMS=false
64376    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
64377$as_echo "bundled" >&6; }
64378  elif test "x${with_lcms}" = "xsystem"; then
64379    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
64380$as_echo "system" >&6; }
64381
64382pkg_failed=no
64383{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
64384$as_echo_n "checking for LCMS... " >&6; }
64385
64386if test -n "$LCMS_CFLAGS"; then
64387    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
64388 elif test -n "$PKG_CONFIG"; then
64389    if test -n "$PKG_CONFIG" && \
64390    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64391  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64392  ac_status=$?
64393  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64394  test $ac_status = 0; }; then
64395  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
64396else
64397  pkg_failed=yes
64398fi
64399 else
64400    pkg_failed=untried
64401fi
64402if test -n "$LCMS_LIBS"; then
64403    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
64404 elif test -n "$PKG_CONFIG"; then
64405    if test -n "$PKG_CONFIG" && \
64406    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
64407  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
64408  ac_status=$?
64409  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
64410  test $ac_status = 0; }; then
64411  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
64412else
64413  pkg_failed=yes
64414fi
64415 else
64416    pkg_failed=untried
64417fi
64418
64419
64420
64421if test $pkg_failed = yes; then
64422
64423if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
64424        _pkg_short_errors_supported=yes
64425else
64426        _pkg_short_errors_supported=no
64427fi
64428        if test $_pkg_short_errors_supported = yes; then
64429	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
64430        else
64431	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
64432        fi
64433	# Put the nasty error message in config.log where it belongs
64434	echo "$LCMS_PKG_ERRORS" >&5
64435
64436	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64437$as_echo "no" >&6; }
64438                LCMS_FOUND=no
64439elif test $pkg_failed = untried; then
64440	LCMS_FOUND=no
64441else
64442	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
64443	LCMS_LIBS=$pkg_cv_LCMS_LIBS
64444        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64445$as_echo "yes" >&6; }
64446	LCMS_FOUND=yes
64447fi
64448    if test "x${LCMS_FOUND}" = "xyes"; then
64449      USE_EXTERNAL_LCMS=true
64450    else
64451      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
64452    fi
64453  else
64454    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
64455  fi
64456
64457
64458
64459
64460
64461
64462
64463
64464
64465
64466
64467  # Setup libm (the maths library)
64468  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
64469    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
64470$as_echo_n "checking for cos in -lm... " >&6; }
64471if ${ac_cv_lib_m_cos+:} false; then :
64472  $as_echo_n "(cached) " >&6
64473else
64474  ac_check_lib_save_LIBS=$LIBS
64475LIBS="-lm  $LIBS"
64476cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64477/* end confdefs.h.  */
64478
64479/* Override any GCC internal prototype to avoid an error.
64480   Use char because int might match the return type of a GCC
64481   builtin and then its argument prototype would still apply.  */
64482#ifdef __cplusplus
64483extern "C"
64484#endif
64485char cos ();
64486int
64487main ()
64488{
64489return cos ();
64490  ;
64491  return 0;
64492}
64493_ACEOF
64494if ac_fn_cxx_try_link "$LINENO"; then :
64495  ac_cv_lib_m_cos=yes
64496else
64497  ac_cv_lib_m_cos=no
64498fi
64499rm -f core conftest.err conftest.$ac_objext \
64500    conftest$ac_exeext conftest.$ac_ext
64501LIBS=$ac_check_lib_save_LIBS
64502fi
64503{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
64504$as_echo "$ac_cv_lib_m_cos" >&6; }
64505if test "x$ac_cv_lib_m_cos" = xyes; then :
64506  cat >>confdefs.h <<_ACEOF
64507#define HAVE_LIBM 1
64508_ACEOF
64509
64510  LIBS="-lm $LIBS"
64511
64512else
64513
64514        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
64515$as_echo "$as_me: Maths library was not found" >&6;}
64516
64517fi
64518
64519    LIBM="-lm"
64520  else
64521    LIBM=""
64522  fi
64523
64524
64525  # Setup libdl (for dynamic library loading)
64526  save_LIBS="$LIBS"
64527  LIBS=""
64528  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
64529$as_echo_n "checking for dlopen in -ldl... " >&6; }
64530if ${ac_cv_lib_dl_dlopen+:} false; then :
64531  $as_echo_n "(cached) " >&6
64532else
64533  ac_check_lib_save_LIBS=$LIBS
64534LIBS="-ldl  $LIBS"
64535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64536/* end confdefs.h.  */
64537
64538/* Override any GCC internal prototype to avoid an error.
64539   Use char because int might match the return type of a GCC
64540   builtin and then its argument prototype would still apply.  */
64541#ifdef __cplusplus
64542extern "C"
64543#endif
64544char dlopen ();
64545int
64546main ()
64547{
64548return dlopen ();
64549  ;
64550  return 0;
64551}
64552_ACEOF
64553if ac_fn_cxx_try_link "$LINENO"; then :
64554  ac_cv_lib_dl_dlopen=yes
64555else
64556  ac_cv_lib_dl_dlopen=no
64557fi
64558rm -f core conftest.err conftest.$ac_objext \
64559    conftest$ac_exeext conftest.$ac_ext
64560LIBS=$ac_check_lib_save_LIBS
64561fi
64562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64563$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64564if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64565  cat >>confdefs.h <<_ACEOF
64566#define HAVE_LIBDL 1
64567_ACEOF
64568
64569  LIBS="-ldl $LIBS"
64570
64571fi
64572
64573  LIBDL="$LIBS"
64574
64575  LIBS="$save_LIBS"
64576
64577  # Deprecated libraries, keep the flags for backwards compatibility
64578  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64579
64580
64581# Check whether --with-dxsdk was given.
64582if test "${with_dxsdk+set}" = set; then :
64583  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64584$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64585fi
64586
64587
64588
64589
64590# Check whether --with-dxsdk-lib was given.
64591if test "${with_dxsdk_lib+set}" = set; then :
64592  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64593$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64594fi
64595
64596
64597
64598
64599# Check whether --with-dxsdk-include was given.
64600if test "${with_dxsdk_include+set}" = set; then :
64601  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64602$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64603fi
64604
64605
64606  fi
64607
64608  # Control if libzip can use mmap. Available for purposes of overriding.
64609  LIBZIP_CAN_USE_MMAP=true
64610
64611
64612
64613  if test "$OPENJDK_TARGET_OS" = "solaris" && test "x$BUILD_GTEST" = "xtrue"; then
64614    # Find the root of the Solaris Studio installation from the compiler path
64615    SOLARIS_STUDIO_DIR="$(dirname $CC)/.."
64616    STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4$OPENJDK_TARGET_CPU_ISADIR/libstlport.so.1"
64617    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for libstlport.so.1" >&5
64618$as_echo_n "checking for libstlport.so.1... " >&6; }
64619    if ! test -f "$STLPORT_LIB" && test "x$OPENJDK_TARGET_CPU_ISADIR" = "x/sparcv9"; then
64620      # SS12u3 has libstlport under 'stlport4/v9' instead of 'stlport4/sparcv9'
64621      STLPORT_LIB="$SOLARIS_STUDIO_DIR/lib/stlport4/v9/libstlport.so.1"
64622    fi
64623    if test -f "$STLPORT_LIB"; then
64624      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, $STLPORT_LIB" >&5
64625$as_echo "yes, $STLPORT_LIB" >&6; }
64626
64627  # Only process if variable expands to non-empty
64628
64629  if test "x$STLPORT_LIB" != x; then
64630    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64631
64632  # Input might be given as Windows format, start by converting to
64633  # unix format.
64634  path="$STLPORT_LIB"
64635  new_path=`$CYGPATH -u "$path"`
64636
64637  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
64638  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
64639  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
64640  # "foo.exe" is OK but "foo" is an error.
64641  #
64642  # This test is therefore slightly more accurate than "test -f" to check for file precense.
64643  # It is also a way to make sure we got the proper file name for the real test later on.
64644  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
64645  if test "x$test_shortpath" = x; then
64646    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64647$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64648    as_fn_error $? "Cannot locate the the path of STLPORT_LIB" "$LINENO" 5
64649  fi
64650
64651  # Call helper function which possibly converts this using DOS-style short mode.
64652  # If so, the updated path is stored in $new_path.
64653
64654  input_path="$new_path"
64655  # Check if we need to convert this using DOS-style short mode. If the path
64656  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64657  # take no chances and rewrite it.
64658  # Note: m4 eats our [], so we need to use [ and ] instead.
64659  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
64660  if test "x$has_forbidden_chars" != x; then
64661    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64662    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
64663    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
64664    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
64665      # Going to short mode and back again did indeed matter. Since short mode is
64666      # case insensitive, let's make it lowercase to improve readability.
64667      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64668      # Now convert it back to Unix-style (cygpath)
64669      input_path=`$CYGPATH -u "$shortmode_path"`
64670      new_path="$input_path"
64671    fi
64672  fi
64673
64674  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
64675  if test "x$test_cygdrive_prefix" = x; then
64676    # As a simple fix, exclude /usr/bin since it's not a real path.
64677    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
64678      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
64679      # a path prefixed by /cygdrive for fixpath to work.
64680      new_path="$CYGWIN_ROOT_PATH$input_path"
64681    fi
64682  fi
64683
64684
64685  if test "x$path" != "x$new_path"; then
64686    STLPORT_LIB="$new_path"
64687    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64688$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64689  fi
64690
64691    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64692
64693  path="$STLPORT_LIB"
64694  has_colon=`$ECHO $path | $GREP ^.:`
64695  new_path="$path"
64696  if test "x$has_colon" = x; then
64697    # Not in mixed or Windows style, start by that.
64698    new_path=`cmd //c echo $path`
64699  fi
64700
64701
64702  input_path="$new_path"
64703  # Check if we need to convert this using DOS-style short mode. If the path
64704  # contains just simple characters, use it. Otherwise (spaces, weird characters),
64705  # take no chances and rewrite it.
64706  # Note: m4 eats our [], so we need to use [ and ] instead.
64707  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
64708  if test "x$has_forbidden_chars" != x; then
64709    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
64710    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
64711  fi
64712
64713
64714  windows_path="$new_path"
64715  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
64716    unix_path=`$CYGPATH -u "$windows_path"`
64717    new_path="$unix_path"
64718  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
64719    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
64720    new_path="$unix_path"
64721  fi
64722
64723  if test "x$path" != "x$new_path"; then
64724    STLPORT_LIB="$new_path"
64725    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STLPORT_LIB to \"$new_path\"" >&5
64726$as_echo "$as_me: Rewriting STLPORT_LIB to \"$new_path\"" >&6;}
64727  fi
64728
64729  # Save the first 10 bytes of this path to the storage, so fixpath can work.
64730  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
64731
64732    else
64733      # We're on a unix platform. Hooray! :)
64734      path="$STLPORT_LIB"
64735      has_space=`$ECHO "$path" | $GREP " "`
64736      if test "x$has_space" != x; then
64737        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&5
64738$as_echo "$as_me: The path of STLPORT_LIB, which resolves as \"$path\", is invalid." >&6;}
64739        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
64740      fi
64741
64742      # Use eval to expand a potential ~
64743      eval path="$path"
64744      if test ! -f "$path" && test ! -d "$path"; then
64745        as_fn_error $? "The path of STLPORT_LIB, which resolves as \"$path\", is not found." "$LINENO" 5
64746      fi
64747
64748      if test -d "$path"; then
64749        STLPORT_LIB="`cd "$path"; $THEPWDCMD -L`"
64750      else
64751        dir="`$DIRNAME "$path"`"
64752        base="`$BASENAME "$path"`"
64753        STLPORT_LIB="`cd "$dir"; $THEPWDCMD -L`/$base"
64754      fi
64755    fi
64756  fi
64757
64758    else
64759      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, not found at $STLPORT_LIB" >&5
64760$as_echo "no, not found at $STLPORT_LIB" >&6; }
64761      as_fn_error $? "Failed to find libstlport.so.1, cannot build Hotspot gtests" "$LINENO" 5
64762    fi
64763
64764  fi
64765
64766
64767
64768
64769
64770
64771
64772
64773
64774
64775
64776
64777
64778
64779###############################################################################
64780#
64781# We need to do some final tweaking, when everything else is done.
64782#
64783###############################################################################
64784
64785
64786  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64787$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64788
64789  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64790    ENABLE_INTREE_EC=yes
64791    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64792$as_echo "yes" >&6; }
64793  else
64794    ENABLE_INTREE_EC=no
64795    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64796$as_echo "no" >&6; }
64797  fi
64798
64799
64800
64801
64802  # Check whether --enable-jtreg-failure-handler was given.
64803if test "${enable_jtreg_failure_handler+set}" = set; then :
64804  enableval=$enable_jtreg_failure_handler;
64805fi
64806
64807
64808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64809$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64810
64811  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64812    if test "x$JT_HOME" = "x"; then
64813      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64814    else
64815      BUILD_FAILURE_HANDLER=true
64816      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64817$as_echo "yes, forced" >&6; }
64818    fi
64819  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64820    BUILD_FAILURE_HANDLER=false
64821    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64822$as_echo "no, forced" >&6; }
64823  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64824      || test "x$enable_jtreg_failure_handler" = "x"; then
64825    if test "x$JT_HOME" = "x"; then
64826      BUILD_FAILURE_HANDLER=false
64827      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64828$as_echo "no, missing jtreg" >&6; }
64829    else
64830      BUILD_FAILURE_HANDLER=true
64831      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64832$as_echo "yes, jtreg present" >&6; }
64833    fi
64834  else
64835    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64836  fi
64837
64838
64839
64840
64841  # Check whether --enable-generate-classlist was given.
64842if test "${enable_generate_classlist+set}" = set; then :
64843  enableval=$enable_generate_classlist;
64844fi
64845
64846
64847  # Check if it's likely that it's possible to generate the classlist. Depending
64848  # on exact jvm configuration it could be possible anyway.
64849  if   [[ " $JVM_VARIANTS " =~ " server " ]]   ||   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
64850    ENABLE_GENERATE_CLASSLIST_POSSIBLE="true"
64851  else
64852    ENABLE_GENERATE_CLASSLIST_POSSIBLE="false"
64853  fi
64854
64855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the CDS classlist generation should be enabled" >&5
64856$as_echo_n "checking if the CDS classlist generation should be enabled... " >&6; }
64857  if test "x$enable_generate_classlist" = "xyes"; then
64858    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64859$as_echo "yes, forced" >&6; }
64860    ENABLE_GENERATE_CLASSLIST="true"
64861    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xfalse"; then
64862      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&5
64863$as_echo "$as_me: WARNING: Generation of classlist might not be possible with JVM Variants $JVM_VARIANTS" >&2;}
64864    fi
64865  elif test "x$enable_generate_classlist" = "xno"; then
64866    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64867$as_echo "no, forced" >&6; }
64868    ENABLE_GENERATE_CLASSLIST="false"
64869  elif test "x$enable_generate_classlist" = "x"; then
64870    if test "x$ENABLE_GENERATE_CLASSLIST_POSSIBLE" = "xtrue"; then
64871      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64872$as_echo "yes" >&6; }
64873      ENABLE_GENERATE_CLASSLIST="true"
64874    else
64875      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64876$as_echo "no" >&6; }
64877      ENABLE_GENERATE_CLASSLIST="false"
64878    fi
64879  else
64880    as_fn_error $? "Invalid value for --enable-generate-classlist: $enable_generate_classlist" "$LINENO" 5
64881  fi
64882
64883
64884
64885
64886###############################################################################
64887#
64888# Configure parts of the build that only affect the build performance,
64889# not the result.
64890#
64891###############################################################################
64892
64893
64894  # How many cores do we have on this build system?
64895
64896# Check whether --with-num-cores was given.
64897if test "${with_num_cores+set}" = set; then :
64898  withval=$with_num_cores;
64899fi
64900
64901  if test "x$with_num_cores" = x; then
64902    # The number of cores were not specified, try to probe them.
64903
64904  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64905$as_echo_n "checking for number of cores... " >&6; }
64906  NUM_CORES=1
64907  FOUND_CORES=no
64908
64909  if test -f /proc/cpuinfo; then
64910    # Looks like a Linux (or cygwin) system
64911    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64912    FOUND_CORES=yes
64913  elif test -x /usr/sbin/psrinfo; then
64914    # Looks like a Solaris system
64915    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64916    FOUND_CORES=yes
64917  elif test -x /usr/sbin/sysctl; then
64918    # Looks like a MacOSX system
64919    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64920    FOUND_CORES=yes
64921  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64922    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64923    FOUND_CORES=yes
64924  elif test -n "$NUMBER_OF_PROCESSORS"; then
64925    # On windows, look in the env
64926    NUM_CORES=$NUMBER_OF_PROCESSORS
64927    FOUND_CORES=yes
64928  fi
64929
64930  if test "x$FOUND_CORES" = xyes; then
64931    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64932$as_echo "$NUM_CORES" >&6; }
64933  else
64934    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64935$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64936    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64937$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64938  fi
64939
64940  else
64941    NUM_CORES=$with_num_cores
64942  fi
64943
64944
64945
64946  # How much memory do we have on this build system?
64947
64948# Check whether --with-memory-size was given.
64949if test "${with_memory_size+set}" = set; then :
64950  withval=$with_memory_size;
64951fi
64952
64953  if test "x$with_memory_size" = x; then
64954    # The memory size was not specified, try to probe it.
64955
64956  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64957$as_echo_n "checking for memory size... " >&6; }
64958  # Default to 1024 MB
64959  MEMORY_SIZE=1024
64960  FOUND_MEM=no
64961
64962  if test -f /proc/meminfo; then
64963    # Looks like a Linux (or cygwin) system
64964    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64965    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64966    FOUND_MEM=yes
64967  elif test -x /usr/sbin/prtconf; then
64968    # Looks like a Solaris or AIX system
64969    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64970    FOUND_MEM=yes
64971  elif test -x /usr/sbin/sysctl; then
64972    # Looks like a MacOSX system
64973    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64974    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64975    FOUND_MEM=yes
64976  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64977    # Windows, but without cygwin
64978    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64979    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64980    FOUND_MEM=yes
64981  fi
64982
64983  if test "x$FOUND_MEM" = xyes; then
64984    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64985$as_echo "$MEMORY_SIZE MB" >&6; }
64986  else
64987    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64988$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64989    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64990$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64991  fi
64992
64993  else
64994    MEMORY_SIZE=$with_memory_size
64995  fi
64996
64997
64998
64999  # Provide a decent default number of parallel jobs for make depending on
65000  # number of cores, amount of memory and machine architecture.
65001
65002# Check whether --with-jobs was given.
65003if test "${with_jobs+set}" = set; then :
65004  withval=$with_jobs;
65005fi
65006
65007  if test "x$with_jobs" = x; then
65008    # Number of jobs was not specified, calculate.
65009    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
65010$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
65011    # Approximate memory in GB.
65012    memory_gb=`expr $MEMORY_SIZE / 1024`
65013    # Pick the lowest of memory in gb and number of cores.
65014    if test "$memory_gb" -lt "$NUM_CORES"; then
65015      JOBS="$memory_gb"
65016    else
65017      JOBS="$NUM_CORES"
65018    fi
65019    if test "$JOBS" -eq "0"; then
65020      JOBS=1
65021    fi
65022    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
65023$as_echo "$JOBS" >&6; }
65024  else
65025    JOBS=$with_jobs
65026  fi
65027
65028
65029
65030  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
65031
65032# Check whether --with-test-jobs was given.
65033if test "${with_test_jobs+set}" = set; then :
65034  withval=$with_test_jobs;
65035fi
65036
65037  if test "x$with_test_jobs" = x; then
65038      TEST_JOBS=0
65039  else
65040      TEST_JOBS=$with_test_jobs
65041  fi
65042
65043
65044
65045# Setup arguments for the boot jdk (after cores and memory have been setup)
65046
65047  ##############################################################################
65048  #
65049  # Specify jvm options for anything that is run with the Boot JDK.
65050  # Not all JVM:s accept the same arguments on the command line.
65051  #
65052
65053# Check whether --with-boot-jdk-jvmargs was given.
65054if test "${with_boot_jdk_jvmargs+set}" = set; then :
65055  withval=$with_boot_jdk_jvmargs;
65056fi
65057
65058
65059  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
65060$as_echo_n "checking flags for boot jdk java command ... " >&6; }
65061
65062  # Disable special log output when a debug build is used as Boot JDK...
65063
65064  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
65065  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
65066  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
65067  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65068  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65069  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65070    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
65071    JVM_ARG_OK=true
65072  else
65073    $ECHO "Arg failed:" >&5
65074    $ECHO "$OUTPUT" >&5
65075    JVM_ARG_OK=false
65076  fi
65077
65078
65079  # Apply user provided options.
65080
65081  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
65082  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
65083  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
65084  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65085  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65086  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65087    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
65088    JVM_ARG_OK=true
65089  else
65090    $ECHO "Arg failed:" >&5
65091    $ECHO "$OUTPUT" >&5
65092    JVM_ARG_OK=false
65093  fi
65094
65095
65096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
65097$as_echo "$boot_jdk_jvmargs" >&6; }
65098
65099  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
65100  JAVA_FLAGS=$boot_jdk_jvmargs
65101
65102
65103
65104  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
65105$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
65106
65107  # Starting amount of heap memory.
65108
65109  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
65110  $ECHO "Command: $JAVA -Xms64M -version" >&5
65111  OUTPUT=`$JAVA -Xms64M -version 2>&1`
65112  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65113  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65114  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65115    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
65116    JVM_ARG_OK=true
65117  else
65118    $ECHO "Arg failed:" >&5
65119    $ECHO "$OUTPUT" >&5
65120    JVM_ARG_OK=false
65121  fi
65122
65123
65124  # Maximum amount of heap memory.
65125  # Maximum stack size.
65126  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
65127  if test "x$BOOT_JDK_BITS" = "x32"; then
65128    if test "$JVM_MAX_HEAP" -gt "1100"; then
65129      JVM_MAX_HEAP=1100
65130    elif test "$JVM_MAX_HEAP" -lt "512"; then
65131      JVM_MAX_HEAP=512
65132    fi
65133    STACK_SIZE=768
65134  else
65135    # Running a 64 bit JVM allows for and requires a bigger heap
65136    if test "$JVM_MAX_HEAP" -gt "1600"; then
65137      JVM_MAX_HEAP=1600
65138    elif test "$JVM_MAX_HEAP" -lt "512"; then
65139      JVM_MAX_HEAP=512
65140    fi
65141    STACK_SIZE=1536
65142  fi
65143
65144  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
65145  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
65146  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
65147  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65148  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65149  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65150    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
65151    JVM_ARG_OK=true
65152  else
65153    $ECHO "Arg failed:" >&5
65154    $ECHO "$OUTPUT" >&5
65155    JVM_ARG_OK=false
65156  fi
65157
65158
65159  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
65160  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
65161  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
65162  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65163  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65164  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65165    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
65166    JVM_ARG_OK=true
65167  else
65168    $ECHO "Arg failed:" >&5
65169    $ECHO "$OUTPUT" >&5
65170    JVM_ARG_OK=false
65171  fi
65172
65173
65174  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
65175$as_echo "$boot_jdk_jvmargs_big" >&6; }
65176
65177  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
65178
65179
65180  # By default, the main javac compilations use big
65181  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
65182
65183
65184  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
65185$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
65186
65187  # Use serial gc for small short lived tools if possible
65188
65189  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
65190  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
65191  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
65192  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65193  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65194  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65195    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
65196    JVM_ARG_OK=true
65197  else
65198    $ECHO "Arg failed:" >&5
65199    $ECHO "$OUTPUT" >&5
65200    JVM_ARG_OK=false
65201  fi
65202
65203
65204  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
65205  $ECHO "Command: $JAVA -Xms32M -version" >&5
65206  OUTPUT=`$JAVA -Xms32M -version 2>&1`
65207  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65208  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65209  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65210    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
65211    JVM_ARG_OK=true
65212  else
65213    $ECHO "Arg failed:" >&5
65214    $ECHO "$OUTPUT" >&5
65215    JVM_ARG_OK=false
65216  fi
65217
65218
65219  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
65220  $ECHO "Command: $JAVA -Xmx512M -version" >&5
65221  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
65222  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65223  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65224  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65225    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
65226    JVM_ARG_OK=true
65227  else
65228    $ECHO "Arg failed:" >&5
65229    $ECHO "$OUTPUT" >&5
65230    JVM_ARG_OK=false
65231  fi
65232
65233
65234  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
65235  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
65236  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
65237  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65238  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65239  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65240    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
65241    JVM_ARG_OK=true
65242  else
65243    $ECHO "Arg failed:" >&5
65244    $ECHO "$OUTPUT" >&5
65245    JVM_ARG_OK=false
65246  fi
65247
65248
65249  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
65250$as_echo "$boot_jdk_jvmargs_small" >&6; }
65251
65252  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
65253
65254
65255  JAVA_TOOL_FLAGS_SMALL=""
65256  for f in $JAVA_FLAGS_SMALL; do
65257    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
65258  done
65259
65260
65261
65262# Setup smart javac (after cores and memory have been setup)
65263
65264
65265# Check whether --with-sjavac-server-java was given.
65266if test "${with_sjavac_server_java+set}" = set; then :
65267  withval=$with_sjavac_server_java;
65268fi
65269
65270
65271  if test "x$with_sjavac_server_java" != x; then
65272    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
65273    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
65274    if test "x$FOUND_VERSION" = x; then
65275      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
65276    fi
65277  else
65278    SJAVAC_SERVER_JAVA="$JAVA"
65279  fi
65280
65281
65282  if test "$MEMORY_SIZE" -gt "3000"; then
65283
65284  $ECHO "Check if jvm arg is ok: -d64" >&5
65285  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
65286  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
65287  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65288  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65289  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65290    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
65291    JVM_ARG_OK=true
65292  else
65293    $ECHO "Arg failed:" >&5
65294    $ECHO "$OUTPUT" >&5
65295    JVM_ARG_OK=false
65296  fi
65297
65298    if test "$JVM_ARG_OK" = true; then
65299      JVM_64BIT=true
65300      JVM_ARG_OK=false
65301    fi
65302  fi
65303
65304  MX_VALUE=`expr $MEMORY_SIZE / 2`
65305  if test "$JVM_64BIT" = true; then
65306    # Set ms lower than mx since more than one instance of the server might
65307    # get launched at the same time before they figure out which instance won.
65308    MS_VALUE=512
65309    if test "$MX_VALUE" -gt "2048"; then
65310      MX_VALUE=2048
65311    fi
65312  else
65313    MS_VALUE=256
65314    if test "$MX_VALUE" -gt "1500"; then
65315      MX_VALUE=1500
65316    fi
65317  fi
65318  if test "$MX_VALUE" -lt "512"; then
65319    MX_VALUE=512
65320  fi
65321
65322  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
65323  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
65324  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
65325  FOUND_WARN=`$ECHO "$OUTPUT" | $GREP -i warn`
65326  FOUND_VERSION=`$ECHO $OUTPUT | $GREP " version \""`
65327  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
65328    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
65329    JVM_ARG_OK=true
65330  else
65331    $ECHO "Arg failed:" >&5
65332    $ECHO "$OUTPUT" >&5
65333    JVM_ARG_OK=false
65334  fi
65335
65336
65337
65338  # Check whether --enable-sjavac was given.
65339if test "${enable_sjavac+set}" = set; then :
65340  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
65341else
65342  ENABLE_SJAVAC="no"
65343fi
65344
65345  if test "x$JVM_ARG_OK" = "xfalse"; then
65346    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
65347$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
65348    ENABLE_SJAVAC="no"
65349  fi
65350  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
65351$as_echo_n "checking whether to use sjavac... " >&6; }
65352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
65353$as_echo "$ENABLE_SJAVAC" >&6; }
65354
65355
65356  # Check whether --enable-javac-server was given.
65357if test "${enable_javac_server+set}" = set; then :
65358  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
65359else
65360  ENABLE_JAVAC_SERVER="yes"
65361fi
65362
65363  if test "x$JVM_ARG_OK" = "xfalse"; then
65364    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
65365$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
65366    ENABLE_JAVAC_SERVER="no"
65367  fi
65368  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
65369$as_echo_n "checking whether to use javac server... " >&6; }
65370  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
65371$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
65372
65373
65374  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
65375    # When using a server javac, the small client instances do not need much
65376    # resources.
65377    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
65378  fi
65379
65380
65381# Setup use of icecc if requested
65382
65383  # Check whether --enable-icecc was given.
65384if test "${enable_icecc+set}" = set; then :
65385  enableval=$enable_icecc;
65386fi
65387
65388
65389  if test "x${enable_icecc}" = "xyes"; then
65390
65391
65392
65393  # Publish this variable in the help.
65394
65395
65396  if [ -z "${ICECC_CMD+x}" ]; then
65397    # The variable is not set by user, try to locate tool using the code snippet
65398    for ac_prog in icecc
65399do
65400  # Extract the first word of "$ac_prog", so it can be a program name with args.
65401set dummy $ac_prog; ac_word=$2
65402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65403$as_echo_n "checking for $ac_word... " >&6; }
65404if ${ac_cv_path_ICECC_CMD+:} false; then :
65405  $as_echo_n "(cached) " >&6
65406else
65407  case $ICECC_CMD in
65408  [\\/]* | ?:[\\/]*)
65409  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65410  ;;
65411  *)
65412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65413for as_dir in $PATH
65414do
65415  IFS=$as_save_IFS
65416  test -z "$as_dir" && as_dir=.
65417    for ac_exec_ext in '' $ac_executable_extensions; do
65418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65419    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65421    break 2
65422  fi
65423done
65424  done
65425IFS=$as_save_IFS
65426
65427  ;;
65428esac
65429fi
65430ICECC_CMD=$ac_cv_path_ICECC_CMD
65431if test -n "$ICECC_CMD"; then
65432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65433$as_echo "$ICECC_CMD" >&6; }
65434else
65435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65436$as_echo "no" >&6; }
65437fi
65438
65439
65440  test -n "$ICECC_CMD" && break
65441done
65442
65443  else
65444    # The variable is set, but is it from the command line or the environment?
65445
65446    # Try to remove the string !ICECC_CMD! from our list.
65447    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
65448    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65449      # If it failed, the variable was not from the command line. Ignore it,
65450      # but warn the user (except for BASH, which is always set by the calling BASH).
65451      if test "xICECC_CMD" != xBASH; then
65452        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
65453$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
65454      fi
65455      # Try to locate tool using the code snippet
65456      for ac_prog in icecc
65457do
65458  # Extract the first word of "$ac_prog", so it can be a program name with args.
65459set dummy $ac_prog; ac_word=$2
65460{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65461$as_echo_n "checking for $ac_word... " >&6; }
65462if ${ac_cv_path_ICECC_CMD+:} false; then :
65463  $as_echo_n "(cached) " >&6
65464else
65465  case $ICECC_CMD in
65466  [\\/]* | ?:[\\/]*)
65467  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65468  ;;
65469  *)
65470  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65471for as_dir in $PATH
65472do
65473  IFS=$as_save_IFS
65474  test -z "$as_dir" && as_dir=.
65475    for ac_exec_ext in '' $ac_executable_extensions; do
65476  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65477    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65478    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65479    break 2
65480  fi
65481done
65482  done
65483IFS=$as_save_IFS
65484
65485  ;;
65486esac
65487fi
65488ICECC_CMD=$ac_cv_path_ICECC_CMD
65489if test -n "$ICECC_CMD"; then
65490  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65491$as_echo "$ICECC_CMD" >&6; }
65492else
65493  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65494$as_echo "no" >&6; }
65495fi
65496
65497
65498  test -n "$ICECC_CMD" && break
65499done
65500
65501    else
65502      # If it succeeded, then it was overridden by the user. We will use it
65503      # for the tool.
65504
65505      # First remove it from the list of overridden variables, so we can test
65506      # for unknown variables in the end.
65507      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65508
65509      # Check if we try to supply an empty value
65510      if test "x$ICECC_CMD" = x; then
65511        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
65512$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
65513        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65514$as_echo_n "checking for ICECC_CMD... " >&6; }
65515        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65516$as_echo "disabled" >&6; }
65517      else
65518        # Check if the provided tool contains a complete path.
65519        tool_specified="$ICECC_CMD"
65520        tool_basename="${tool_specified##*/}"
65521        if test "x$tool_basename" = "x$tool_specified"; then
65522          # A command without a complete path is provided, search $PATH.
65523          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
65524$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
65525          # Extract the first word of "$tool_basename", so it can be a program name with args.
65526set dummy $tool_basename; ac_word=$2
65527{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65528$as_echo_n "checking for $ac_word... " >&6; }
65529if ${ac_cv_path_ICECC_CMD+:} false; then :
65530  $as_echo_n "(cached) " >&6
65531else
65532  case $ICECC_CMD in
65533  [\\/]* | ?:[\\/]*)
65534  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
65535  ;;
65536  *)
65537  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65538for as_dir in $PATH
65539do
65540  IFS=$as_save_IFS
65541  test -z "$as_dir" && as_dir=.
65542    for ac_exec_ext in '' $ac_executable_extensions; do
65543  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65544    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
65545    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65546    break 2
65547  fi
65548done
65549  done
65550IFS=$as_save_IFS
65551
65552  ;;
65553esac
65554fi
65555ICECC_CMD=$ac_cv_path_ICECC_CMD
65556if test -n "$ICECC_CMD"; then
65557  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
65558$as_echo "$ICECC_CMD" >&6; }
65559else
65560  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65561$as_echo "no" >&6; }
65562fi
65563
65564
65565          if test "x$ICECC_CMD" = x; then
65566            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65567          fi
65568        else
65569          # Otherwise we believe it is a complete path. Use it as it is.
65570          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
65571$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
65572          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
65573$as_echo_n "checking for ICECC_CMD... " >&6; }
65574          if test ! -x "$tool_specified"; then
65575            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65576$as_echo "not found" >&6; }
65577            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
65578          fi
65579          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65580$as_echo "$tool_specified" >&6; }
65581        fi
65582      fi
65583    fi
65584
65585  fi
65586
65587
65588
65589  if test "x$ICECC_CMD" = x; then
65590    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
65591  fi
65592
65593
65594    old_path="$PATH"
65595
65596    # Look for icecc-create-env in some known places
65597    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65598
65599
65600
65601  # Publish this variable in the help.
65602
65603
65604  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65605    # The variable is not set by user, try to locate tool using the code snippet
65606    for ac_prog in icecc-create-env
65607do
65608  # Extract the first word of "$ac_prog", so it can be a program name with args.
65609set dummy $ac_prog; ac_word=$2
65610{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65611$as_echo_n "checking for $ac_word... " >&6; }
65612if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65613  $as_echo_n "(cached) " >&6
65614else
65615  case $ICECC_CREATE_ENV in
65616  [\\/]* | ?:[\\/]*)
65617  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65618  ;;
65619  *)
65620  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65621for as_dir in $PATH
65622do
65623  IFS=$as_save_IFS
65624  test -z "$as_dir" && as_dir=.
65625    for ac_exec_ext in '' $ac_executable_extensions; do
65626  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65627    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65628    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65629    break 2
65630  fi
65631done
65632  done
65633IFS=$as_save_IFS
65634
65635  ;;
65636esac
65637fi
65638ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65639if test -n "$ICECC_CREATE_ENV"; then
65640  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65641$as_echo "$ICECC_CREATE_ENV" >&6; }
65642else
65643  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65644$as_echo "no" >&6; }
65645fi
65646
65647
65648  test -n "$ICECC_CREATE_ENV" && break
65649done
65650
65651  else
65652    # The variable is set, but is it from the command line or the environment?
65653
65654    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65655    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65656    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65657      # If it failed, the variable was not from the command line. Ignore it,
65658      # but warn the user (except for BASH, which is always set by the calling BASH).
65659      if test "xICECC_CREATE_ENV" != xBASH; then
65660        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65661$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65662      fi
65663      # Try to locate tool using the code snippet
65664      for ac_prog in icecc-create-env
65665do
65666  # Extract the first word of "$ac_prog", so it can be a program name with args.
65667set dummy $ac_prog; ac_word=$2
65668{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65669$as_echo_n "checking for $ac_word... " >&6; }
65670if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65671  $as_echo_n "(cached) " >&6
65672else
65673  case $ICECC_CREATE_ENV in
65674  [\\/]* | ?:[\\/]*)
65675  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65676  ;;
65677  *)
65678  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65679for as_dir in $PATH
65680do
65681  IFS=$as_save_IFS
65682  test -z "$as_dir" && as_dir=.
65683    for ac_exec_ext in '' $ac_executable_extensions; do
65684  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65685    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65686    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65687    break 2
65688  fi
65689done
65690  done
65691IFS=$as_save_IFS
65692
65693  ;;
65694esac
65695fi
65696ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65697if test -n "$ICECC_CREATE_ENV"; then
65698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65699$as_echo "$ICECC_CREATE_ENV" >&6; }
65700else
65701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65702$as_echo "no" >&6; }
65703fi
65704
65705
65706  test -n "$ICECC_CREATE_ENV" && break
65707done
65708
65709    else
65710      # If it succeeded, then it was overridden by the user. We will use it
65711      # for the tool.
65712
65713      # First remove it from the list of overridden variables, so we can test
65714      # for unknown variables in the end.
65715      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65716
65717      # Check if we try to supply an empty value
65718      if test "x$ICECC_CREATE_ENV" = x; then
65719        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65720$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65721        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65722$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65723        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65724$as_echo "disabled" >&6; }
65725      else
65726        # Check if the provided tool contains a complete path.
65727        tool_specified="$ICECC_CREATE_ENV"
65728        tool_basename="${tool_specified##*/}"
65729        if test "x$tool_basename" = "x$tool_specified"; then
65730          # A command without a complete path is provided, search $PATH.
65731          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65732$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65733          # Extract the first word of "$tool_basename", so it can be a program name with args.
65734set dummy $tool_basename; ac_word=$2
65735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65736$as_echo_n "checking for $ac_word... " >&6; }
65737if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65738  $as_echo_n "(cached) " >&6
65739else
65740  case $ICECC_CREATE_ENV in
65741  [\\/]* | ?:[\\/]*)
65742  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65743  ;;
65744  *)
65745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65746for as_dir in $PATH
65747do
65748  IFS=$as_save_IFS
65749  test -z "$as_dir" && as_dir=.
65750    for ac_exec_ext in '' $ac_executable_extensions; do
65751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65752    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65754    break 2
65755  fi
65756done
65757  done
65758IFS=$as_save_IFS
65759
65760  ;;
65761esac
65762fi
65763ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65764if test -n "$ICECC_CREATE_ENV"; then
65765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65766$as_echo "$ICECC_CREATE_ENV" >&6; }
65767else
65768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65769$as_echo "no" >&6; }
65770fi
65771
65772
65773          if test "x$ICECC_CREATE_ENV" = x; then
65774            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65775          fi
65776        else
65777          # Otherwise we believe it is a complete path. Use it as it is.
65778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65779$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65780          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65781$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65782          if test ! -x "$tool_specified"; then
65783            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65784$as_echo "not found" >&6; }
65785            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65786          fi
65787          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65788$as_echo "$tool_specified" >&6; }
65789        fi
65790      fi
65791    fi
65792
65793  fi
65794
65795
65796
65797  if test "x$ICECC_CREATE_ENV" = x; then
65798    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65799  fi
65800
65801
65802    # Use icecc-create-env to create a minimal compilation environment that can
65803    # be sent to the other hosts in the icecream cluster.
65804    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65805    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65806    # Older versions of icecc does not have the --gcc parameter
65807    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65808      icecc_gcc_arg="--gcc"
65809    fi
65810    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65811
65812  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65813      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65814          ${icecc_create_env_log} 2>&1 )
65815  if test "$?" != "0"; then
65816    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65817$as_echo "$as_me: icecc-create-env output:" >&6;}
65818    cat \
65819          ${icecc_create_env_log}
65820    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65821  fi
65822
65823    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65824      # For clang, the icecc compilerwrapper is needed. It usually resides next
65825      # to icecc-create-env.
65826
65827
65828
65829  # Publish this variable in the help.
65830
65831
65832  if [ -z "${ICECC_WRAPPER+x}" ]; then
65833    # The variable is not set by user, try to locate tool using the code snippet
65834    for ac_prog in compilerwrapper
65835do
65836  # Extract the first word of "$ac_prog", so it can be a program name with args.
65837set dummy $ac_prog; ac_word=$2
65838{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65839$as_echo_n "checking for $ac_word... " >&6; }
65840if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65841  $as_echo_n "(cached) " >&6
65842else
65843  case $ICECC_WRAPPER in
65844  [\\/]* | ?:[\\/]*)
65845  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65846  ;;
65847  *)
65848  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65849for as_dir in $PATH
65850do
65851  IFS=$as_save_IFS
65852  test -z "$as_dir" && as_dir=.
65853    for ac_exec_ext in '' $ac_executable_extensions; do
65854  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65855    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65856    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65857    break 2
65858  fi
65859done
65860  done
65861IFS=$as_save_IFS
65862
65863  ;;
65864esac
65865fi
65866ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65867if test -n "$ICECC_WRAPPER"; then
65868  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65869$as_echo "$ICECC_WRAPPER" >&6; }
65870else
65871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65872$as_echo "no" >&6; }
65873fi
65874
65875
65876  test -n "$ICECC_WRAPPER" && break
65877done
65878
65879  else
65880    # The variable is set, but is it from the command line or the environment?
65881
65882    # Try to remove the string !ICECC_WRAPPER! from our list.
65883    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65884    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65885      # If it failed, the variable was not from the command line. Ignore it,
65886      # but warn the user (except for BASH, which is always set by the calling BASH).
65887      if test "xICECC_WRAPPER" != xBASH; then
65888        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65889$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65890      fi
65891      # Try to locate tool using the code snippet
65892      for ac_prog in compilerwrapper
65893do
65894  # Extract the first word of "$ac_prog", so it can be a program name with args.
65895set dummy $ac_prog; ac_word=$2
65896{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65897$as_echo_n "checking for $ac_word... " >&6; }
65898if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65899  $as_echo_n "(cached) " >&6
65900else
65901  case $ICECC_WRAPPER in
65902  [\\/]* | ?:[\\/]*)
65903  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65904  ;;
65905  *)
65906  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65907for as_dir in $PATH
65908do
65909  IFS=$as_save_IFS
65910  test -z "$as_dir" && as_dir=.
65911    for ac_exec_ext in '' $ac_executable_extensions; do
65912  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65913    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65914    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65915    break 2
65916  fi
65917done
65918  done
65919IFS=$as_save_IFS
65920
65921  ;;
65922esac
65923fi
65924ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65925if test -n "$ICECC_WRAPPER"; then
65926  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65927$as_echo "$ICECC_WRAPPER" >&6; }
65928else
65929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65930$as_echo "no" >&6; }
65931fi
65932
65933
65934  test -n "$ICECC_WRAPPER" && break
65935done
65936
65937    else
65938      # If it succeeded, then it was overridden by the user. We will use it
65939      # for the tool.
65940
65941      # First remove it from the list of overridden variables, so we can test
65942      # for unknown variables in the end.
65943      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65944
65945      # Check if we try to supply an empty value
65946      if test "x$ICECC_WRAPPER" = x; then
65947        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65948$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65949        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65950$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65951        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65952$as_echo "disabled" >&6; }
65953      else
65954        # Check if the provided tool contains a complete path.
65955        tool_specified="$ICECC_WRAPPER"
65956        tool_basename="${tool_specified##*/}"
65957        if test "x$tool_basename" = "x$tool_specified"; then
65958          # A command without a complete path is provided, search $PATH.
65959          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65960$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65961          # Extract the first word of "$tool_basename", so it can be a program name with args.
65962set dummy $tool_basename; ac_word=$2
65963{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65964$as_echo_n "checking for $ac_word... " >&6; }
65965if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65966  $as_echo_n "(cached) " >&6
65967else
65968  case $ICECC_WRAPPER in
65969  [\\/]* | ?:[\\/]*)
65970  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65971  ;;
65972  *)
65973  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65974for as_dir in $PATH
65975do
65976  IFS=$as_save_IFS
65977  test -z "$as_dir" && as_dir=.
65978    for ac_exec_ext in '' $ac_executable_extensions; do
65979  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65980    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65981    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65982    break 2
65983  fi
65984done
65985  done
65986IFS=$as_save_IFS
65987
65988  ;;
65989esac
65990fi
65991ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65992if test -n "$ICECC_WRAPPER"; then
65993  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65994$as_echo "$ICECC_WRAPPER" >&6; }
65995else
65996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65997$as_echo "no" >&6; }
65998fi
65999
66000
66001          if test "x$ICECC_WRAPPER" = x; then
66002            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66003          fi
66004        else
66005          # Otherwise we believe it is a complete path. Use it as it is.
66006          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
66007$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
66008          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
66009$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
66010          if test ! -x "$tool_specified"; then
66011            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66012$as_echo "not found" >&6; }
66013            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
66014          fi
66015          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66016$as_echo "$tool_specified" >&6; }
66017        fi
66018      fi
66019    fi
66020
66021  fi
66022
66023
66024
66025  if test "x$ICECC_WRAPPER" = x; then
66026    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
66027  fi
66028
66029
66030
66031  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66032      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
66033  if test "$?" != "0"; then
66034    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66035$as_echo "$as_me: icecc-create-env output:" >&6;}
66036    cat ${icecc_create_env_log}
66037    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66038  fi
66039
66040    else
66041      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
66042    fi
66043    PATH="$old_path"
66044    # The bundle with the compiler gets a name based on checksums. Parse log file
66045    # to find it.
66046    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
66047    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66048    if test ! -f ${ICECC_ENV_BUNDLE}; then
66049      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66050    fi
66051    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
66052$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
66053    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66054$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66055    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
66056
66057    if test "x${COMPILE_TYPE}" = "xcross"; then
66058      # If cross compiling, create a separate env package for the build compiler
66059      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
66060      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
66061      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
66062
66063  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66064      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
66065            ${icecc_create_env_log_build} 2>&1 )
66066  if test "$?" != "0"; then
66067    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66068$as_echo "$as_me: icecc-create-env output:" >&6;}
66069    cat \
66070            ${icecc_create_env_log_build}
66071    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66072  fi
66073
66074      elif test "x${BUILD_CC##*/}" = "xclang"; then
66075
66076  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
66077      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
66078  if test "$?" != "0"; then
66079    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
66080$as_echo "$as_me: icecc-create-env output:" >&6;}
66081    cat ${icecc_create_env_log_build}
66082    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
66083  fi
66084
66085      else
66086        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
66087      fi
66088      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
66089      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
66090      if test ! -f ${ICECC_ENV_BUNDLE}; then
66091        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
66092      fi
66093      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
66094$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
66095      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
66096$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
66097      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
66098          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
66099    else
66100      BUILD_ICECC="${ICECC}"
66101    fi
66102
66103
66104  fi
66105
66106
66107# Can the C/C++ compiler use precompiled headers?
66108
66109
66110  ###############################################################################
66111  #
66112  # Can the C/C++ compiler use precompiled headers?
66113  #
66114  # Check whether --enable-precompiled-headers was given.
66115if test "${enable_precompiled_headers+set}" = set; then :
66116  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
66117else
66118  ENABLE_PRECOMPH=yes
66119fi
66120
66121
66122  USE_PRECOMPILED_HEADER=1
66123  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
66124$as_echo_n "checking If precompiled header is enabled... " >&6; }
66125  if test "x$ENABLE_PRECOMPH" = xno; then
66126    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
66127$as_echo "no, forced" >&6; }
66128    USE_PRECOMPILED_HEADER=0
66129  elif test "x$ICECC" != "x"; then
66130    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
66131$as_echo "no, does not work effectively with icecc" >&6; }
66132    USE_PRECOMPILED_HEADER=0
66133  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
66134    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
66135$as_echo "no, does not work with Solaris Studio" >&6; }
66136    USE_PRECOMPILED_HEADER=0
66137  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
66138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with xlc" >&5
66139$as_echo "no, does not work with xlc" >&6; }
66140    USE_PRECOMPILED_HEADER=0
66141  else
66142    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66143$as_echo "yes" >&6; }
66144  fi
66145
66146  if test "x$ENABLE_PRECOMPH" = xyes; then
66147    # Check that the compiler actually supports precomp headers.
66148    if test "x$TOOLCHAIN_TYPE" = xgcc; then
66149      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
66150$as_echo_n "checking that precompiled headers work... " >&6; }
66151      echo "int alfa();" > conftest.h
66152      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
66153      if test ! -f conftest.hpp.gch; then
66154        USE_PRECOMPILED_HEADER=0
66155        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66156$as_echo "no" >&6; }
66157      else
66158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66159$as_echo "yes" >&6; }
66160      fi
66161      $RM conftest.h conftest.hpp.gch
66162    fi
66163  fi
66164
66165
66166
66167
66168# Setup use of ccache, if available
66169
66170  # Check whether --enable-ccache was given.
66171if test "${enable_ccache+set}" = set; then :
66172  enableval=$enable_ccache;
66173fi
66174
66175
66176  CCACHE=
66177  CCACHE_STATUS=
66178  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
66179$as_echo_n "checking is ccache enabled... " >&6; }
66180  if test "x$enable_ccache" = xyes; then
66181    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
66182      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66183$as_echo "yes" >&6; }
66184      OLD_PATH="$PATH"
66185      if test "x$TOOLCHAIN_PATH" != x; then
66186        PATH=$TOOLCHAIN_PATH:$PATH
66187      fi
66188
66189
66190
66191  # Publish this variable in the help.
66192
66193
66194  if [ -z "${CCACHE+x}" ]; then
66195    # The variable is not set by user, try to locate tool using the code snippet
66196    for ac_prog in ccache
66197do
66198  # Extract the first word of "$ac_prog", so it can be a program name with args.
66199set dummy $ac_prog; ac_word=$2
66200{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66201$as_echo_n "checking for $ac_word... " >&6; }
66202if ${ac_cv_path_CCACHE+:} false; then :
66203  $as_echo_n "(cached) " >&6
66204else
66205  case $CCACHE in
66206  [\\/]* | ?:[\\/]*)
66207  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66208  ;;
66209  *)
66210  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66211for as_dir in $PATH
66212do
66213  IFS=$as_save_IFS
66214  test -z "$as_dir" && as_dir=.
66215    for ac_exec_ext in '' $ac_executable_extensions; do
66216  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66217    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66218    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66219    break 2
66220  fi
66221done
66222  done
66223IFS=$as_save_IFS
66224
66225  ;;
66226esac
66227fi
66228CCACHE=$ac_cv_path_CCACHE
66229if test -n "$CCACHE"; then
66230  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66231$as_echo "$CCACHE" >&6; }
66232else
66233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66234$as_echo "no" >&6; }
66235fi
66236
66237
66238  test -n "$CCACHE" && break
66239done
66240
66241  else
66242    # The variable is set, but is it from the command line or the environment?
66243
66244    # Try to remove the string !CCACHE! from our list.
66245    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
66246    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
66247      # If it failed, the variable was not from the command line. Ignore it,
66248      # but warn the user (except for BASH, which is always set by the calling BASH).
66249      if test "xCCACHE" != xBASH; then
66250        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
66251$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
66252      fi
66253      # Try to locate tool using the code snippet
66254      for ac_prog in ccache
66255do
66256  # Extract the first word of "$ac_prog", so it can be a program name with args.
66257set dummy $ac_prog; ac_word=$2
66258{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66259$as_echo_n "checking for $ac_word... " >&6; }
66260if ${ac_cv_path_CCACHE+:} false; then :
66261  $as_echo_n "(cached) " >&6
66262else
66263  case $CCACHE in
66264  [\\/]* | ?:[\\/]*)
66265  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66266  ;;
66267  *)
66268  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66269for as_dir in $PATH
66270do
66271  IFS=$as_save_IFS
66272  test -z "$as_dir" && as_dir=.
66273    for ac_exec_ext in '' $ac_executable_extensions; do
66274  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66275    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66276    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66277    break 2
66278  fi
66279done
66280  done
66281IFS=$as_save_IFS
66282
66283  ;;
66284esac
66285fi
66286CCACHE=$ac_cv_path_CCACHE
66287if test -n "$CCACHE"; then
66288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66289$as_echo "$CCACHE" >&6; }
66290else
66291  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66292$as_echo "no" >&6; }
66293fi
66294
66295
66296  test -n "$CCACHE" && break
66297done
66298
66299    else
66300      # If it succeeded, then it was overridden by the user. We will use it
66301      # for the tool.
66302
66303      # First remove it from the list of overridden variables, so we can test
66304      # for unknown variables in the end.
66305      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
66306
66307      # Check if we try to supply an empty value
66308      if test "x$CCACHE" = x; then
66309        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
66310$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
66311        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66312$as_echo_n "checking for CCACHE... " >&6; }
66313        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
66314$as_echo "disabled" >&6; }
66315      else
66316        # Check if the provided tool contains a complete path.
66317        tool_specified="$CCACHE"
66318        tool_basename="${tool_specified##*/}"
66319        if test "x$tool_basename" = "x$tool_specified"; then
66320          # A command without a complete path is provided, search $PATH.
66321          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
66322$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
66323          # Extract the first word of "$tool_basename", so it can be a program name with args.
66324set dummy $tool_basename; ac_word=$2
66325{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
66326$as_echo_n "checking for $ac_word... " >&6; }
66327if ${ac_cv_path_CCACHE+:} false; then :
66328  $as_echo_n "(cached) " >&6
66329else
66330  case $CCACHE in
66331  [\\/]* | ?:[\\/]*)
66332  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
66333  ;;
66334  *)
66335  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66336for as_dir in $PATH
66337do
66338  IFS=$as_save_IFS
66339  test -z "$as_dir" && as_dir=.
66340    for ac_exec_ext in '' $ac_executable_extensions; do
66341  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
66342    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
66343    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
66344    break 2
66345  fi
66346done
66347  done
66348IFS=$as_save_IFS
66349
66350  ;;
66351esac
66352fi
66353CCACHE=$ac_cv_path_CCACHE
66354if test -n "$CCACHE"; then
66355  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
66356$as_echo "$CCACHE" >&6; }
66357else
66358  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66359$as_echo "no" >&6; }
66360fi
66361
66362
66363          if test "x$CCACHE" = x; then
66364            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
66365          fi
66366        else
66367          # Otherwise we believe it is a complete path. Use it as it is.
66368          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
66369$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
66370          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
66371$as_echo_n "checking for CCACHE... " >&6; }
66372          if test ! -x "$tool_specified"; then
66373            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
66374$as_echo "not found" >&6; }
66375            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
66376          fi
66377          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
66378$as_echo "$tool_specified" >&6; }
66379        fi
66380      fi
66381    fi
66382
66383  fi
66384
66385
66386
66387  if test "x$CCACHE" = x; then
66388    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
66389  fi
66390
66391
66392      PATH="$OLD_PATH"
66393      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
66394      CCACHE_STATUS="Active ($CCACHE_VERSION)"
66395    else
66396      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66397$as_echo "no" >&6; }
66398      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
66399$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
66400    fi
66401  elif test "x$enable_ccache" = xno; then
66402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
66403$as_echo "no, explicitly disabled" >&6; }
66404    CCACHE_STATUS="Disabled"
66405  elif test "x$enable_ccache" = x; then
66406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66407$as_echo "no" >&6; }
66408  else
66409    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
66410$as_echo "unknown" >&6; }
66411    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
66412  fi
66413
66414
66415
66416# Check whether --with-ccache-dir was given.
66417if test "${with_ccache_dir+set}" = set; then :
66418  withval=$with_ccache_dir;
66419fi
66420
66421
66422  if test "x$with_ccache_dir" != x; then
66423    # When using a non home ccache directory, assume the use is to share ccache files
66424    # with other users. Thus change the umask.
66425    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
66426    if test "x$CCACHE" = x; then
66427      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
66428$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
66429    fi
66430  fi
66431
66432  if test "x$CCACHE" != x; then
66433
66434  if test "x$CCACHE" != x; then
66435    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
66436      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
66437          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
66438      if test "x$HAS_BAD_CCACHE" != "x"; then
66439        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
66440      fi
66441      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
66442$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
66443      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
66444      PUSHED_FLAGS="$CXXFLAGS"
66445      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
66446      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
66447/* end confdefs.h.  */
66448
66449int
66450main ()
66451{
66452
66453  ;
66454  return 0;
66455}
66456_ACEOF
66457if ac_fn_cxx_try_compile "$LINENO"; then :
66458  CC_KNOWS_CCACHE_TRICK=yes
66459else
66460  CC_KNOWS_CCACHE_TRICK=no
66461fi
66462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
66463      CXXFLAGS="$PUSHED_FLAGS"
66464      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
66465        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
66466$as_echo "yes" >&6; }
66467        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
66468
66469        CCACHE_SLOPPINESS=pch_defines,time_macros
66470      else
66471        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
66472$as_echo "no" >&6; }
66473        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
66474      fi
66475    fi
66476
66477    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
66478        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
66479
66480    if test "x$SET_CCACHE_DIR" != x; then
66481      mkdir -p $CCACHE_DIR > /dev/null 2>&1
66482      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
66483    fi
66484  fi
66485
66486  fi
66487
66488
66489###############################################################################
66490#
66491# And now the finish...
66492#
66493###############################################################################
66494
66495# Check for some common pitfalls
66496
66497  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
66498    file_to_test="$SRC_ROOT/LICENSE"
66499    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
66500      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
66501    fi
66502  fi
66503
66504
66505  # Did user specify any unknown variables?
66506
66507  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
66508    # Replace the separating ! with spaces before presenting for end user.
66509    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
66510    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
66511$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
66512  fi
66513
66514
66515  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
66516$as_echo_n "checking if build directory is on local disk... " >&6; }
66517
66518  # df -l lists only local disks; if the given directory is not found then
66519  # a non-zero exit code is given
66520  if test "x$DF" = x; then
66521    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
66522      # msys does not have df; use Windows "net use" instead.
66523      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
66524      if test "x$IS_NETWORK_DISK" = x; then
66525        OUTPUT_DIR_IS_LOCAL="yes"
66526      else
66527        OUTPUT_DIR_IS_LOCAL="no"
66528      fi
66529    else
66530      # No df here, say it's local
66531      OUTPUT_DIR_IS_LOCAL="yes"
66532    fi
66533  else
66534    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
66535      OUTPUT_DIR_IS_LOCAL="yes"
66536    else
66537      OUTPUT_DIR_IS_LOCAL="no"
66538    fi
66539  fi
66540
66541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
66542$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
66543
66544
66545
66546  # Check if the user has any old-style ALT_ variables set.
66547  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
66548
66549  # Before generating output files, test if they exist. If they do, this is a reconfigure.
66550  # Since we can't properly handle the dependencies for this, warn the user about the situation
66551  if test -e $OUTPUT_ROOT/spec.gmk; then
66552    IS_RECONFIGURE=yes
66553  else
66554    IS_RECONFIGURE=no
66555  fi
66556
66557
66558# At the end, call the custom hook. (Dummy macro if no custom sources available)
66559
66560
66561# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
66562
66563  # Keep feature lists sorted and free of duplicates
66564  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
66565  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
66566  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
66567  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
66568  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
66569  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
66570  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
66571
66572  # Validate features
66573  for variant in $JVM_VARIANTS; do
66574    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
66575$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
66576    features_var_name=JVM_FEATURES_$variant
66577    JVM_FEATURES_TO_TEST=${!features_var_name}
66578    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
66579$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
66580    NEEDLE=${VALID_JVM_FEATURES// /$'\n'}
66581    STACK=${JVM_FEATURES_TO_TEST// /$'\n'}
66582    INVALID_FEATURES=`$GREP -Fvx "${NEEDLE}" <<< "${STACK}"`
66583    if test "x$INVALID_FEATURES" != x; then
66584      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
66585    fi
66586  done
66587
66588
66589# We're messing a bit with internal autoconf variables to put the config.status
66590# in the output directory instead of the current directory.
66591CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
66592
66593# Create the actual output files. Now the main work of configure is done.
66594cat >confcache <<\_ACEOF
66595# This file is a shell script that caches the results of configure
66596# tests run on this system so they can be shared between configure
66597# scripts and configure runs, see configure's option --config-cache.
66598# It is not useful on other systems.  If it contains results you don't
66599# want to keep, you may remove or edit it.
66600#
66601# config.status only pays attention to the cache file if you give it
66602# the --recheck option to rerun configure.
66603#
66604# `ac_cv_env_foo' variables (set or unset) will be overridden when
66605# loading this file, other *unset* `ac_cv_foo' will be assigned the
66606# following values.
66607
66608_ACEOF
66609
66610# The following way of writing the cache mishandles newlines in values,
66611# but we know of no workaround that is simple, portable, and efficient.
66612# So, we kill variables containing newlines.
66613# Ultrix sh set writes to stderr and can't be redirected directly,
66614# and sets the high bit in the cache file unless we assign to the vars.
66615(
66616  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66617    eval ac_val=\$$ac_var
66618    case $ac_val in #(
66619    *${as_nl}*)
66620      case $ac_var in #(
66621      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66622$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66623      esac
66624      case $ac_var in #(
66625      _ | IFS | as_nl) ;; #(
66626      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66627      *) { eval $ac_var=; unset $ac_var;} ;;
66628      esac ;;
66629    esac
66630  done
66631
66632  (set) 2>&1 |
66633    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66634    *${as_nl}ac_space=\ *)
66635      # `set' does not quote correctly, so add quotes: double-quote
66636      # substitution turns \\\\ into \\, and sed turns \\ into \.
66637      sed -n \
66638	"s/'/'\\\\''/g;
66639	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66640      ;; #(
66641    *)
66642      # `set' quotes correctly as required by POSIX, so do not add quotes.
66643      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66644      ;;
66645    esac |
66646    sort
66647) |
66648  sed '
66649     /^ac_cv_env_/b end
66650     t clear
66651     :clear
66652     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66653     t end
66654     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66655     :end' >>confcache
66656if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66657  if test -w "$cache_file"; then
66658    if test "x$cache_file" != "x/dev/null"; then
66659      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66660$as_echo "$as_me: updating cache $cache_file" >&6;}
66661      if test ! -f "$cache_file" || test -h "$cache_file"; then
66662	cat confcache >"$cache_file"
66663      else
66664        case $cache_file in #(
66665        */* | ?:*)
66666	  mv -f confcache "$cache_file"$$ &&
66667	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66668        *)
66669	  mv -f confcache "$cache_file" ;;
66670	esac
66671      fi
66672    fi
66673  else
66674    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66675$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66676  fi
66677fi
66678rm -f confcache
66679
66680test "x$prefix" = xNONE && prefix=$ac_default_prefix
66681# Let make expand exec_prefix.
66682test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66683
66684# Transform confdefs.h into DEFS.
66685# Protect against shell expansion while executing Makefile rules.
66686# Protect against Makefile macro expansion.
66687#
66688# If the first sed substitution is executed (which looks for macros that
66689# take arguments), then branch to the quote section.  Otherwise,
66690# look for a macro that doesn't take arguments.
66691ac_script='
66692:mline
66693/\\$/{
66694 N
66695 s,\\\n,,
66696 b mline
66697}
66698t clear
66699:clear
66700s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66701t quote
66702s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66703t quote
66704b any
66705:quote
66706s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66707s/\[/\\&/g
66708s/\]/\\&/g
66709s/\$/$$/g
66710H
66711:any
66712${
66713	g
66714	s/^\n//
66715	s/\n/ /g
66716	p
66717}
66718'
66719DEFS=`sed -n "$ac_script" confdefs.h`
66720
66721
66722ac_libobjs=
66723ac_ltlibobjs=
66724U=
66725for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66726  # 1. Remove the extension, and $U if already installed.
66727  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66728  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66729  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66730  #    will be set to the directory where LIBOBJS objects are built.
66731  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66732  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66733done
66734LIBOBJS=$ac_libobjs
66735
66736LTLIBOBJS=$ac_ltlibobjs
66737
66738
66739
66740: "${CONFIG_STATUS=./config.status}"
66741ac_write_fail=0
66742ac_clean_files_save=$ac_clean_files
66743ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66744{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66745$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66746as_write_fail=0
66747cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66748#! $SHELL
66749# Generated by $as_me.
66750# Run this file to recreate the current configuration.
66751# Compiler output produced by configure, useful for debugging
66752# configure, is in config.log if it exists.
66753
66754debug=false
66755ac_cs_recheck=false
66756ac_cs_silent=false
66757
66758SHELL=\${CONFIG_SHELL-$SHELL}
66759export SHELL
66760_ASEOF
66761cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66762## -------------------- ##
66763## M4sh Initialization. ##
66764## -------------------- ##
66765
66766# Be more Bourne compatible
66767DUALCASE=1; export DUALCASE # for MKS sh
66768if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66769  emulate sh
66770  NULLCMD=:
66771  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66772  # is contrary to our usage.  Disable this feature.
66773  alias -g '${1+"$@"}'='"$@"'
66774  setopt NO_GLOB_SUBST
66775else
66776  case `(set -o) 2>/dev/null` in #(
66777  *posix*) :
66778    set -o posix ;; #(
66779  *) :
66780     ;;
66781esac
66782fi
66783
66784
66785as_nl='
66786'
66787export as_nl
66788# Printing a long string crashes Solaris 7 /usr/bin/printf.
66789as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66790as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66791as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66792# Prefer a ksh shell builtin over an external printf program on Solaris,
66793# but without wasting forks for bash or zsh.
66794if test -z "$BASH_VERSION$ZSH_VERSION" \
66795    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66796  as_echo='print -r --'
66797  as_echo_n='print -rn --'
66798elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66799  as_echo='printf %s\n'
66800  as_echo_n='printf %s'
66801else
66802  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66803    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66804    as_echo_n='/usr/ucb/echo -n'
66805  else
66806    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66807    as_echo_n_body='eval
66808      arg=$1;
66809      case $arg in #(
66810      *"$as_nl"*)
66811	expr "X$arg" : "X\\(.*\\)$as_nl";
66812	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66813      esac;
66814      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66815    '
66816    export as_echo_n_body
66817    as_echo_n='sh -c $as_echo_n_body as_echo'
66818  fi
66819  export as_echo_body
66820  as_echo='sh -c $as_echo_body as_echo'
66821fi
66822
66823# The user is always right.
66824if test "${PATH_SEPARATOR+set}" != set; then
66825  PATH_SEPARATOR=:
66826  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66827    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66828      PATH_SEPARATOR=';'
66829  }
66830fi
66831
66832
66833# IFS
66834# We need space, tab and new line, in precisely that order.  Quoting is
66835# there to prevent editors from complaining about space-tab.
66836# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66837# splitting by setting IFS to empty value.)
66838IFS=" ""	$as_nl"
66839
66840# Find who we are.  Look in the path if we contain no directory separator.
66841as_myself=
66842case $0 in #((
66843  *[\\/]* ) as_myself=$0 ;;
66844  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66845for as_dir in $PATH
66846do
66847  IFS=$as_save_IFS
66848  test -z "$as_dir" && as_dir=.
66849    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66850  done
66851IFS=$as_save_IFS
66852
66853     ;;
66854esac
66855# We did not find ourselves, most probably we were run as `sh COMMAND'
66856# in which case we are not to be found in the path.
66857if test "x$as_myself" = x; then
66858  as_myself=$0
66859fi
66860if test ! -f "$as_myself"; then
66861  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66862  exit 1
66863fi
66864
66865# Unset variables that we do not need and which cause bugs (e.g. in
66866# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66867# suppresses any "Segmentation fault" message there.  '((' could
66868# trigger a bug in pdksh 5.2.14.
66869for as_var in BASH_ENV ENV MAIL MAILPATH
66870do eval test x\${$as_var+set} = xset \
66871  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66872done
66873PS1='$ '
66874PS2='> '
66875PS4='+ '
66876
66877# NLS nuisances.
66878LC_ALL=C
66879export LC_ALL
66880LANGUAGE=C
66881export LANGUAGE
66882
66883# CDPATH.
66884(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66885
66886
66887# as_fn_error STATUS ERROR [LINENO LOG_FD]
66888# ----------------------------------------
66889# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66890# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66891# script with STATUS, using 1 if that was 0.
66892as_fn_error ()
66893{
66894  as_status=$1; test $as_status -eq 0 && as_status=1
66895  if test "$4"; then
66896    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66897    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66898  fi
66899  $as_echo "$as_me: error: $2" >&2
66900  as_fn_exit $as_status
66901} # as_fn_error
66902
66903
66904# as_fn_set_status STATUS
66905# -----------------------
66906# Set $? to STATUS, without forking.
66907as_fn_set_status ()
66908{
66909  return $1
66910} # as_fn_set_status
66911
66912# as_fn_exit STATUS
66913# -----------------
66914# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66915as_fn_exit ()
66916{
66917  set +e
66918  as_fn_set_status $1
66919  exit $1
66920} # as_fn_exit
66921
66922# as_fn_unset VAR
66923# ---------------
66924# Portably unset VAR.
66925as_fn_unset ()
66926{
66927  { eval $1=; unset $1;}
66928}
66929as_unset=as_fn_unset
66930# as_fn_append VAR VALUE
66931# ----------------------
66932# Append the text in VALUE to the end of the definition contained in VAR. Take
66933# advantage of any shell optimizations that allow amortized linear growth over
66934# repeated appends, instead of the typical quadratic growth present in naive
66935# implementations.
66936if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66937  eval 'as_fn_append ()
66938  {
66939    eval $1+=\$2
66940  }'
66941else
66942  as_fn_append ()
66943  {
66944    eval $1=\$$1\$2
66945  }
66946fi # as_fn_append
66947
66948# as_fn_arith ARG...
66949# ------------------
66950# Perform arithmetic evaluation on the ARGs, and store the result in the
66951# global $as_val. Take advantage of shells that can avoid forks. The arguments
66952# must be portable across $(()) and expr.
66953if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66954  eval 'as_fn_arith ()
66955  {
66956    as_val=$(( $* ))
66957  }'
66958else
66959  as_fn_arith ()
66960  {
66961    as_val=`expr "$@" || test $? -eq 1`
66962  }
66963fi # as_fn_arith
66964
66965
66966if expr a : '\(a\)' >/dev/null 2>&1 &&
66967   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66968  as_expr=expr
66969else
66970  as_expr=false
66971fi
66972
66973if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66974  as_basename=basename
66975else
66976  as_basename=false
66977fi
66978
66979if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66980  as_dirname=dirname
66981else
66982  as_dirname=false
66983fi
66984
66985as_me=`$as_basename -- "$0" ||
66986$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66987	 X"$0" : 'X\(//\)$' \| \
66988	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66989$as_echo X/"$0" |
66990    sed '/^.*\/\([^/][^/]*\)\/*$/{
66991	    s//\1/
66992	    q
66993	  }
66994	  /^X\/\(\/\/\)$/{
66995	    s//\1/
66996	    q
66997	  }
66998	  /^X\/\(\/\).*/{
66999	    s//\1/
67000	    q
67001	  }
67002	  s/.*/./; q'`
67003
67004# Avoid depending upon Character Ranges.
67005as_cr_letters='abcdefghijklmnopqrstuvwxyz'
67006as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
67007as_cr_Letters=$as_cr_letters$as_cr_LETTERS
67008as_cr_digits='0123456789'
67009as_cr_alnum=$as_cr_Letters$as_cr_digits
67010
67011ECHO_C= ECHO_N= ECHO_T=
67012case `echo -n x` in #(((((
67013-n*)
67014  case `echo 'xy\c'` in
67015  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
67016  xy)  ECHO_C='\c';;
67017  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
67018       ECHO_T='	';;
67019  esac;;
67020*)
67021  ECHO_N='-n';;
67022esac
67023
67024rm -f conf$$ conf$$.exe conf$$.file
67025if test -d conf$$.dir; then
67026  rm -f conf$$.dir/conf$$.file
67027else
67028  rm -f conf$$.dir
67029  mkdir conf$$.dir 2>/dev/null
67030fi
67031if (echo >conf$$.file) 2>/dev/null; then
67032  if ln -s conf$$.file conf$$ 2>/dev/null; then
67033    as_ln_s='ln -s'
67034    # ... but there are two gotchas:
67035    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
67036    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
67037    # In both cases, we have to default to `cp -pR'.
67038    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
67039      as_ln_s='cp -pR'
67040  elif ln conf$$.file conf$$ 2>/dev/null; then
67041    as_ln_s=ln
67042  else
67043    as_ln_s='cp -pR'
67044  fi
67045else
67046  as_ln_s='cp -pR'
67047fi
67048rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
67049rmdir conf$$.dir 2>/dev/null
67050
67051
67052# as_fn_mkdir_p
67053# -------------
67054# Create "$as_dir" as a directory, including parents if necessary.
67055as_fn_mkdir_p ()
67056{
67057
67058  case $as_dir in #(
67059  -*) as_dir=./$as_dir;;
67060  esac
67061  test -d "$as_dir" || eval $as_mkdir_p || {
67062    as_dirs=
67063    while :; do
67064      case $as_dir in #(
67065      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
67066      *) as_qdir=$as_dir;;
67067      esac
67068      as_dirs="'$as_qdir' $as_dirs"
67069      as_dir=`$as_dirname -- "$as_dir" ||
67070$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67071	 X"$as_dir" : 'X\(//\)[^/]' \| \
67072	 X"$as_dir" : 'X\(//\)$' \| \
67073	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
67074$as_echo X"$as_dir" |
67075    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67076	    s//\1/
67077	    q
67078	  }
67079	  /^X\(\/\/\)[^/].*/{
67080	    s//\1/
67081	    q
67082	  }
67083	  /^X\(\/\/\)$/{
67084	    s//\1/
67085	    q
67086	  }
67087	  /^X\(\/\).*/{
67088	    s//\1/
67089	    q
67090	  }
67091	  s/.*/./; q'`
67092      test -d "$as_dir" && break
67093    done
67094    test -z "$as_dirs" || eval "mkdir $as_dirs"
67095  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
67096
67097
67098} # as_fn_mkdir_p
67099if mkdir -p . 2>/dev/null; then
67100  as_mkdir_p='mkdir -p "$as_dir"'
67101else
67102  test -d ./-p && rmdir ./-p
67103  as_mkdir_p=false
67104fi
67105
67106
67107# as_fn_executable_p FILE
67108# -----------------------
67109# Test if FILE is an executable regular file.
67110as_fn_executable_p ()
67111{
67112  test -f "$1" && test -x "$1"
67113} # as_fn_executable_p
67114as_test_x='test -x'
67115as_executable_p=as_fn_executable_p
67116
67117# Sed expression to map a string onto a valid CPP name.
67118as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
67119
67120# Sed expression to map a string onto a valid variable name.
67121as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
67122
67123
67124exec 6>&1
67125## ----------------------------------- ##
67126## Main body of $CONFIG_STATUS script. ##
67127## ----------------------------------- ##
67128_ASEOF
67129test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
67130
67131cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67132# Save the log message, to keep $0 and so on meaningful, and to
67133# report actual input values of CONFIG_FILES etc. instead of their
67134# values after options handling.
67135ac_log="
67136This file was extended by OpenJDK $as_me jdk9, which was
67137generated by GNU Autoconf 2.69.  Invocation command line was
67138
67139  CONFIG_FILES    = $CONFIG_FILES
67140  CONFIG_HEADERS  = $CONFIG_HEADERS
67141  CONFIG_LINKS    = $CONFIG_LINKS
67142  CONFIG_COMMANDS = $CONFIG_COMMANDS
67143  $ $0 $@
67144
67145on `(hostname || uname -n) 2>/dev/null | sed 1q`
67146"
67147
67148_ACEOF
67149
67150case $ac_config_files in *"
67151"*) set x $ac_config_files; shift; ac_config_files=$*;;
67152esac
67153
67154
67155
67156cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67157# Files that config.status was made for.
67158config_files="$ac_config_files"
67159
67160_ACEOF
67161
67162cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67163ac_cs_usage="\
67164\`$as_me' instantiates files and other configuration actions
67165from templates according to the current configuration.  Unless the files
67166and actions are specified as TAGs, all are instantiated by default.
67167
67168Usage: $0 [OPTION]... [TAG]...
67169
67170  -h, --help       print this help, then exit
67171  -V, --version    print version number and configuration settings, then exit
67172      --config     print configuration, then exit
67173  -q, --quiet, --silent
67174                   do not print progress messages
67175  -d, --debug      don't remove temporary files
67176      --recheck    update $as_me by reconfiguring in the same conditions
67177      --file=FILE[:TEMPLATE]
67178                   instantiate the configuration file FILE
67179
67180Configuration files:
67181$config_files
67182
67183Report bugs to <build-dev@openjdk.java.net>.
67184OpenJDK home page: <http://openjdk.java.net>."
67185
67186_ACEOF
67187cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67188ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
67189ac_cs_version="\\
67190OpenJDK config.status jdk9
67191configured by $0, generated by GNU Autoconf 2.69,
67192  with options \\"\$ac_cs_config\\"
67193
67194Copyright (C) 2012 Free Software Foundation, Inc.
67195This config.status script is free software; the Free Software Foundation
67196gives unlimited permission to copy, distribute and modify it."
67197
67198ac_pwd='$ac_pwd'
67199srcdir='$srcdir'
67200AWK='$AWK'
67201test -n "\$AWK" || AWK=awk
67202_ACEOF
67203
67204cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67205# The default lists apply if the user does not specify any file.
67206ac_need_defaults=:
67207while test $# != 0
67208do
67209  case $1 in
67210  --*=?*)
67211    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67212    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
67213    ac_shift=:
67214    ;;
67215  --*=)
67216    ac_option=`expr "X$1" : 'X\([^=]*\)='`
67217    ac_optarg=
67218    ac_shift=:
67219    ;;
67220  *)
67221    ac_option=$1
67222    ac_optarg=$2
67223    ac_shift=shift
67224    ;;
67225  esac
67226
67227  case $ac_option in
67228  # Handling of the options.
67229  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
67230    ac_cs_recheck=: ;;
67231  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
67232    $as_echo "$ac_cs_version"; exit ;;
67233  --config | --confi | --conf | --con | --co | --c )
67234    $as_echo "$ac_cs_config"; exit ;;
67235  --debug | --debu | --deb | --de | --d | -d )
67236    debug=: ;;
67237  --file | --fil | --fi | --f )
67238    $ac_shift
67239    case $ac_optarg in
67240    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
67241    '') as_fn_error $? "missing file argument" ;;
67242    esac
67243    as_fn_append CONFIG_FILES " '$ac_optarg'"
67244    ac_need_defaults=false;;
67245  --he | --h |  --help | --hel | -h )
67246    $as_echo "$ac_cs_usage"; exit ;;
67247  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
67248  | -silent | --silent | --silen | --sile | --sil | --si | --s)
67249    ac_cs_silent=: ;;
67250
67251  # This is an error.
67252  -*) as_fn_error $? "unrecognized option: \`$1'
67253Try \`$0 --help' for more information." ;;
67254
67255  *) as_fn_append ac_config_targets " $1"
67256     ac_need_defaults=false ;;
67257
67258  esac
67259  shift
67260done
67261
67262ac_configure_extra_args=
67263
67264if $ac_cs_silent; then
67265  exec 6>/dev/null
67266  ac_configure_extra_args="$ac_configure_extra_args --silent"
67267fi
67268
67269_ACEOF
67270cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67271if \$ac_cs_recheck; then
67272  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
67273  shift
67274  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
67275  CONFIG_SHELL='$SHELL'
67276  export CONFIG_SHELL
67277  exec "\$@"
67278fi
67279
67280_ACEOF
67281cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67282exec 5>>config.log
67283{
67284  echo
67285  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
67286## Running $as_me. ##
67287_ASBOX
67288  $as_echo "$ac_log"
67289} >&5
67290
67291_ACEOF
67292cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67293_ACEOF
67294
67295cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67296
67297# Handling of arguments.
67298for ac_config_target in $ac_config_targets
67299do
67300  case $ac_config_target in
67301    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
67302    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
67303    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
67304    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
67305    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
67306
67307  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
67308  esac
67309done
67310
67311
67312# If the user did not use the arguments to specify the items to instantiate,
67313# then the envvar interface is used.  Set only those that are not.
67314# We use the long form for the default assignment because of an extremely
67315# bizarre bug on SunOS 4.1.3.
67316if $ac_need_defaults; then
67317  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
67318fi
67319
67320# Have a temporary directory for convenience.  Make it in the build tree
67321# simply because there is no reason against having it here, and in addition,
67322# creating and moving files from /tmp can sometimes cause problems.
67323# Hook for its removal unless debugging.
67324# Note that there is a small window in which the directory will not be cleaned:
67325# after its creation but before its name has been assigned to `$tmp'.
67326$debug ||
67327{
67328  tmp= ac_tmp=
67329  trap 'exit_status=$?
67330  : "${ac_tmp:=$tmp}"
67331  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
67332' 0
67333  trap 'as_fn_exit 1' 1 2 13 15
67334}
67335# Create a (secure) tmp directory for tmp files.
67336
67337{
67338  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
67339  test -d "$tmp"
67340}  ||
67341{
67342  tmp=./conf$$-$RANDOM
67343  (umask 077 && mkdir "$tmp")
67344} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
67345ac_tmp=$tmp
67346
67347# Set up the scripts for CONFIG_FILES section.
67348# No need to generate them if there are no CONFIG_FILES.
67349# This happens for instance with `./config.status config.h'.
67350if test -n "$CONFIG_FILES"; then
67351
67352
67353ac_cr=`echo X | tr X '\015'`
67354# On cygwin, bash can eat \r inside `` if the user requested igncr.
67355# But we know of no other shell where ac_cr would be empty at this
67356# point, so we can use a bashism as a fallback.
67357if test "x$ac_cr" = x; then
67358  eval ac_cr=\$\'\\r\'
67359fi
67360ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
67361if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
67362  ac_cs_awk_cr='\\r'
67363else
67364  ac_cs_awk_cr=$ac_cr
67365fi
67366
67367echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
67368_ACEOF
67369
67370
67371{
67372  echo "cat >conf$$subs.awk <<_ACEOF" &&
67373  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
67374  echo "_ACEOF"
67375} >conf$$subs.sh ||
67376  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67377ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
67378ac_delim='%!_!# '
67379for ac_last_try in false false false false false :; do
67380  . ./conf$$subs.sh ||
67381    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67382
67383  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
67384  if test $ac_delim_n = $ac_delim_num; then
67385    break
67386  elif $ac_last_try; then
67387    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
67388  else
67389    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
67390  fi
67391done
67392rm -f conf$$subs.sh
67393
67394cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67395cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
67396_ACEOF
67397sed -n '
67398h
67399s/^/S["/; s/!.*/"]=/
67400p
67401g
67402s/^[^!]*!//
67403:repl
67404t repl
67405s/'"$ac_delim"'$//
67406t delim
67407:nl
67408h
67409s/\(.\{148\}\)..*/\1/
67410t more1
67411s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
67412p
67413n
67414b repl
67415:more1
67416s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67417p
67418g
67419s/.\{148\}//
67420t nl
67421:delim
67422h
67423s/\(.\{148\}\)..*/\1/
67424t more2
67425s/["\\]/\\&/g; s/^/"/; s/$/"/
67426p
67427b
67428:more2
67429s/["\\]/\\&/g; s/^/"/; s/$/"\\/
67430p
67431g
67432s/.\{148\}//
67433t delim
67434' <conf$$subs.awk | sed '
67435/^[^""]/{
67436  N
67437  s/\n//
67438}
67439' >>$CONFIG_STATUS || ac_write_fail=1
67440rm -f conf$$subs.awk
67441cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67442_ACAWK
67443cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
67444  for (key in S) S_is_set[key] = 1
67445  FS = ""
67446
67447}
67448{
67449  line = $ 0
67450  nfields = split(line, field, "@")
67451  substed = 0
67452  len = length(field[1])
67453  for (i = 2; i < nfields; i++) {
67454    key = field[i]
67455    keylen = length(key)
67456    if (S_is_set[key]) {
67457      value = S[key]
67458      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
67459      len += length(value) + length(field[++i])
67460      substed = 1
67461    } else
67462      len += 1 + keylen
67463  }
67464
67465  print line
67466}
67467
67468_ACAWK
67469_ACEOF
67470cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67471if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
67472  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
67473else
67474  cat
67475fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
67476  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
67477_ACEOF
67478
67479# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
67480# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
67481# trailing colons and then remove the whole line if VPATH becomes empty
67482# (actually we leave an empty line to preserve line numbers).
67483if test "x$srcdir" = x.; then
67484  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
67485h
67486s///
67487s/^/:/
67488s/[	 ]*$/:/
67489s/:\$(srcdir):/:/g
67490s/:\${srcdir}:/:/g
67491s/:@srcdir@:/:/g
67492s/^:*//
67493s/:*$//
67494x
67495s/\(=[	 ]*\).*/\1/
67496G
67497s/\n//
67498s/^[^=]*=[	 ]*$//
67499}'
67500fi
67501
67502cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67503fi # test -n "$CONFIG_FILES"
67504
67505
67506eval set X "  :F $CONFIG_FILES      "
67507shift
67508for ac_tag
67509do
67510  case $ac_tag in
67511  :[FHLC]) ac_mode=$ac_tag; continue;;
67512  esac
67513  case $ac_mode$ac_tag in
67514  :[FHL]*:*);;
67515  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
67516  :[FH]-) ac_tag=-:-;;
67517  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
67518  esac
67519  ac_save_IFS=$IFS
67520  IFS=:
67521  set x $ac_tag
67522  IFS=$ac_save_IFS
67523  shift
67524  ac_file=$1
67525  shift
67526
67527  case $ac_mode in
67528  :L) ac_source=$1;;
67529  :[FH])
67530    ac_file_inputs=
67531    for ac_f
67532    do
67533      case $ac_f in
67534      -) ac_f="$ac_tmp/stdin";;
67535      *) # Look for the file first in the build tree, then in the source tree
67536	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
67537	 # because $ac_f cannot contain `:'.
67538	 test -f "$ac_f" ||
67539	   case $ac_f in
67540	   [\\/$]*) false;;
67541	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
67542	   esac ||
67543	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
67544      esac
67545      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
67546      as_fn_append ac_file_inputs " '$ac_f'"
67547    done
67548
67549    # Let's still pretend it is `configure' which instantiates (i.e., don't
67550    # use $as_me), people would be surprised to read:
67551    #    /* config.h.  Generated by config.status.  */
67552    configure_input='Generated from '`
67553	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
67554	`' by configure.'
67555    if test x"$ac_file" != x-; then
67556      configure_input="$ac_file.  $configure_input"
67557      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
67558$as_echo "$as_me: creating $ac_file" >&6;}
67559    fi
67560    # Neutralize special characters interpreted by sed in replacement strings.
67561    case $configure_input in #(
67562    *\&* | *\|* | *\\* )
67563       ac_sed_conf_input=`$as_echo "$configure_input" |
67564       sed 's/[\\\\&|]/\\\\&/g'`;; #(
67565    *) ac_sed_conf_input=$configure_input;;
67566    esac
67567
67568    case $ac_tag in
67569    *:-:* | *:-) cat >"$ac_tmp/stdin" \
67570      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
67571    esac
67572    ;;
67573  esac
67574
67575  ac_dir=`$as_dirname -- "$ac_file" ||
67576$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
67577	 X"$ac_file" : 'X\(//\)[^/]' \| \
67578	 X"$ac_file" : 'X\(//\)$' \| \
67579	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
67580$as_echo X"$ac_file" |
67581    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
67582	    s//\1/
67583	    q
67584	  }
67585	  /^X\(\/\/\)[^/].*/{
67586	    s//\1/
67587	    q
67588	  }
67589	  /^X\(\/\/\)$/{
67590	    s//\1/
67591	    q
67592	  }
67593	  /^X\(\/\).*/{
67594	    s//\1/
67595	    q
67596	  }
67597	  s/.*/./; q'`
67598  as_dir="$ac_dir"; as_fn_mkdir_p
67599  ac_builddir=.
67600
67601case "$ac_dir" in
67602.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67603*)
67604  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67605  # A ".." for each directory in $ac_dir_suffix.
67606  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67607  case $ac_top_builddir_sub in
67608  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67609  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67610  esac ;;
67611esac
67612ac_abs_top_builddir=$ac_pwd
67613ac_abs_builddir=$ac_pwd$ac_dir_suffix
67614# for backward compatibility:
67615ac_top_builddir=$ac_top_build_prefix
67616
67617case $srcdir in
67618  .)  # We are building in place.
67619    ac_srcdir=.
67620    ac_top_srcdir=$ac_top_builddir_sub
67621    ac_abs_top_srcdir=$ac_pwd ;;
67622  [\\/]* | ?:[\\/]* )  # Absolute name.
67623    ac_srcdir=$srcdir$ac_dir_suffix;
67624    ac_top_srcdir=$srcdir
67625    ac_abs_top_srcdir=$srcdir ;;
67626  *) # Relative name.
67627    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67628    ac_top_srcdir=$ac_top_build_prefix$srcdir
67629    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67630esac
67631ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67632
67633
67634  case $ac_mode in
67635  :F)
67636  #
67637  # CONFIG_FILE
67638  #
67639
67640_ACEOF
67641
67642cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67643# If the template does not know about datarootdir, expand it.
67644# FIXME: This hack should be removed a few years after 2.60.
67645ac_datarootdir_hack=; ac_datarootdir_seen=
67646ac_sed_dataroot='
67647/datarootdir/ {
67648  p
67649  q
67650}
67651/@datadir@/p
67652/@docdir@/p
67653/@infodir@/p
67654/@localedir@/p
67655/@mandir@/p'
67656case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67657*datarootdir*) ac_datarootdir_seen=yes;;
67658*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67659  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67660$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67661_ACEOF
67662cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67663  ac_datarootdir_hack='
67664  s&@datadir@&$datadir&g
67665  s&@docdir@&$docdir&g
67666  s&@infodir@&$infodir&g
67667  s&@localedir@&$localedir&g
67668  s&@mandir@&$mandir&g
67669  s&\\\${datarootdir}&$datarootdir&g' ;;
67670esac
67671_ACEOF
67672
67673# Neutralize VPATH when `$srcdir' = `.'.
67674# Shell code in configure.ac might set extrasub.
67675# FIXME: do we really want to maintain this feature?
67676cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67677ac_sed_extra="$ac_vpsub
67678$extrasub
67679_ACEOF
67680cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67681:t
67682/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67683s|@configure_input@|$ac_sed_conf_input|;t t
67684s&@top_builddir@&$ac_top_builddir_sub&;t t
67685s&@top_build_prefix@&$ac_top_build_prefix&;t t
67686s&@srcdir@&$ac_srcdir&;t t
67687s&@abs_srcdir@&$ac_abs_srcdir&;t t
67688s&@top_srcdir@&$ac_top_srcdir&;t t
67689s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67690s&@builddir@&$ac_builddir&;t t
67691s&@abs_builddir@&$ac_abs_builddir&;t t
67692s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67693$ac_datarootdir_hack
67694"
67695eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67696  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67697
67698test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67699  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67700  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67701      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67702  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67703which seems to be undefined.  Please make sure it is defined" >&5
67704$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67705which seems to be undefined.  Please make sure it is defined" >&2;}
67706
67707  rm -f "$ac_tmp/stdin"
67708  case $ac_file in
67709  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67710  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67711  esac \
67712  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67713 ;;
67714
67715
67716
67717  esac
67718
67719done # for ac_tag
67720
67721
67722as_fn_exit 0
67723_ACEOF
67724ac_clean_files=$ac_clean_files_save
67725
67726test $ac_write_fail = 0 ||
67727  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67728
67729
67730# configure is writing to config.log, and then calls config.status.
67731# config.status does its own redirection, appending to config.log.
67732# Unfortunately, on DOS this fails, as config.log is still kept open
67733# by configure, so config.status won't be able to write to it; its
67734# output is simply discarded.  So we exec the FD to /dev/null,
67735# effectively closing config.log, so it can be properly (re)opened and
67736# appended to by config.status.  When coming back to configure, we
67737# need to make the FD available again.
67738if test "$no_create" != yes; then
67739  ac_cs_success=:
67740  ac_config_status_args=
67741  test "$silent" = yes &&
67742    ac_config_status_args="$ac_config_status_args --quiet"
67743  exec 5>/dev/null
67744  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67745  exec 5>>config.log
67746  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67747  # would make configure fail if this is the last instruction.
67748  $ac_cs_success || as_fn_exit 1
67749fi
67750if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67751  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67752$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67753fi
67754
67755
67756# After AC_OUTPUT, we need to do final work
67757
67758
67759  # Try to move config.log (generated by autoconf) to the configure-support directory.
67760  if test -e ./config.log; then
67761    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67762  fi
67763
67764  # Rotate our log file (configure.log)
67765  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67766    $RM -f "$OUTPUT_ROOT/configure.log.old"
67767  fi
67768  if test -e "$OUTPUT_ROOT/configure.log"; then
67769    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67770  fi
67771
67772  # Move configure.log from current directory to the build output root
67773  if test -e ./configure.log; then
67774    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67775  fi
67776
67777  # Make the compare script executable
67778  $CHMOD +x $OUTPUT_ROOT/compare.sh
67779
67780
67781# Finally output some useful information to the user
67782
67783  # Finally output some useful information to the user
67784
67785  printf "\n"
67786  printf "====================================================\n"
67787  if test "x$no_create" != "xyes"; then
67788    if test "x$IS_RECONFIGURE" != "xyes"; then
67789      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67790    else
67791      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67792    fi
67793  else
67794    if test "x$IS_RECONFIGURE" != "xyes"; then
67795      printf "A configuration has been successfully checked but not created\n"
67796    else
67797      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67798    fi
67799  fi
67800  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67801    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67802  else
67803    printf "using default settings.\n"
67804  fi
67805
67806  printf "\n"
67807  printf "Configuration summary:\n"
67808  printf "* Debug level:    $DEBUG_LEVEL\n"
67809  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67810  printf "* JDK variant:    $JDK_VARIANT\n"
67811  printf "* JVM variants:   $JVM_VARIANTS\n"
67812  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67813  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67814
67815  printf "\n"
67816  printf "Tools summary:\n"
67817  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67818    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67819  fi
67820  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67821  if test "x$TOOLCHAIN_VERSION" != "x"; then
67822    print_version=" $TOOLCHAIN_VERSION"
67823  fi
67824  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67825  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67826  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67827
67828  printf "\n"
67829  printf "Build performance summary:\n"
67830  printf "* Cores to use:   $JOBS\n"
67831  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67832  if test "x$CCACHE_STATUS" != "x"; then
67833    printf "* ccache status:  $CCACHE_STATUS\n"
67834  fi
67835  printf "\n"
67836
67837  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67838    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67839    printf "will result in longer build times.\n"
67840    printf "\n"
67841  fi
67842
67843  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67844    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67845    printf "These are not respected, and will be ignored. It is recommended\n"
67846    printf "that you clean your environment. The following variables are set:\n"
67847    printf "$FOUND_ALT_VARIABLES\n"
67848    printf "\n"
67849  fi
67850
67851  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67852    printf "WARNING: Your build output directory is not on a local disk.\n"
67853    printf "This will severely degrade build performance!\n"
67854    printf "It is recommended that you create an output directory on a local disk,\n"
67855    printf "and run the configure script again from that directory.\n"
67856    printf "\n"
67857  fi
67858
67859  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67860    printf "WARNING: The result of this configuration has overridden an older\n"
67861    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67862    printf "proper build. Failure to do so might result in strange build problems.\n"
67863    printf "\n"
67864  fi
67865
67866  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67867    printf "WARNING: The result of this configuration was not saved.\n"
67868    printf "You should run without '--no-create | -n' to create the configuration.\n"
67869    printf "\n"
67870  fi
67871
67872
67873
67874  # Locate config.log.
67875  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67876    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67877  elif test -e "./config.log"; then
67878    CONFIG_LOG_PATH="."
67879  fi
67880
67881  if test -e "$CONFIG_LOG_PATH/config.log"; then
67882    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67883    if test $? -eq 0; then
67884      printf "The following warnings were produced. Repeated here for convenience:\n"
67885      # We must quote sed expression (using []) to stop m4 from eating the [].
67886      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67887      printf "\n"
67888    fi
67889  fi
67890
67891