generated-configure.sh revision 2058:b12ea8f800aa
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
653BUILD_FAILURE_HANDLER
654ENABLE_INTREE_EC
655JVM_VARIANT_CORE
656JVM_VARIANT_ZEROSHARK
657JVM_VARIANT_ZERO
658JVM_VARIANT_HOTSPOT
659JVM_VARIANT_MINIMAL1
660JVM_VARIANT_CLIENT
661JVM_VARIANT_SERVER
662JVM_VARIANTS_COMMA
663TEST_IN_BUILD
664HOTSPOT_MAKE_ARGS
665MACOSX_UNIVERSAL
666DEBUG_CLASSFILES
667FASTDEBUG
668VARIANT
669USE_NEW_HOTSPOT_BUILD
670LIBZIP_CAN_USE_MMAP
671LIBDL
672LIBM
673USE_EXTERNAL_LCMS
674LCMS_LIBS
675LCMS_CFLAGS
676USE_EXTERNAL_LIBZ
677USE_EXTERNAL_LIBPNG
678PNG_LIBS
679PNG_CFLAGS
680USE_EXTERNAL_LIBGIF
681USE_EXTERNAL_LIBJPEG
682LLVM_LIBS
683LLVM_LDFLAGS
684LLVM_CFLAGS
685LLVM_CONFIG
686LIBFFI_LIBS
687LIBFFI_CFLAGS
688ALSA_LIBS
689ALSA_CFLAGS
690FREETYPE_BUNDLE_LIB_PATH
691FREETYPE_LIBS
692FREETYPE_CFLAGS
693CUPS_CFLAGS
694X_EXTRA_LIBS
695X_LIBS
696X_PRE_LIBS
697X_CFLAGS
698XMKMF
699MSVCP_DLL
700MSVCR_DLL
701LIBCXX
702STATIC_CXX_SETTING
703FIXPATH_DETACH_FLAG
704FIXPATH
705VALID_JVM_FEATURES
706JVM_FEATURES_custom
707JVM_FEATURES_zeroshark
708JVM_FEATURES_zero
709JVM_FEATURES_minimal
710JVM_FEATURES_core
711JVM_FEATURES_client
712JVM_FEATURES_server
713INCLUDE_DTRACE
714GCOV_ENABLED
715STRIP_POLICY
716DEBUG_BINARIES
717ZIP_EXTERNAL_DEBUG_SYMBOLS
718COPY_DEBUG_SYMBOLS
719COMPILE_WITH_DEBUG_SYMBOLS
720CFLAGS_WARNINGS_ARE_ERRORS
721BUILD_CC_DISABLE_WARNING_PREFIX
722DISABLE_WARNING_PREFIX
723HOTSPOT_SET_WARNINGS_AS_ERRORS
724WARNINGS_AS_ERRORS
725COMPILER_SUPPORTS_TARGET_BITS_FLAG
726ZERO_ARCHFLAG
727LDFLAGS_TESTEXE
728LDFLAGS_TESTLIB
729CXXFLAGS_TESTEXE
730CXXFLAGS_TESTLIB
731CFLAGS_TESTEXE
732CFLAGS_TESTLIB
733OPENJDK_BUILD_JVM_LIBS
734OPENJDK_BUILD_JVM_ASFLAGS
735OPENJDK_BUILD_JVM_LDFLAGS
736OPENJDK_BUILD_JVM_CFLAGS
737OPENJDK_BUILD_LDFLAGS_HASH_STYLE
738OPENJDK_BUILD_LDFLAGS_CXX_JDK
739OPENJDK_BUILD_JDKEXE_LIBS
740OPENJDK_BUILD_JDKLIB_LIBS
741OPENJDK_BUILD_LDFLAGS_JDKEXE
742OPENJDK_BUILD_LDFLAGS_JDKLIB
743OPENJDK_BUILD_CXXFLAGS_JDKEXE
744OPENJDK_BUILD_CXXFLAGS_JDKLIB
745OPENJDK_BUILD_CFLAGS_JDKEXE
746OPENJDK_BUILD_CFLAGS_JDKLIB
747OPENJDK_BUILD_CXXSTD_CXXFLAG
748JVM_LIBS
749JVM_ASFLAGS
750JVM_LDFLAGS
751JVM_CFLAGS
752LDFLAGS_HASH_STYLE
753LDFLAGS_CXX_JDK
754JDKEXE_LIBS
755JDKLIB_LIBS
756LDFLAGS_JDKEXE
757LDFLAGS_JDKLIB
758CXXFLAGS_JDKEXE
759CXXFLAGS_JDKLIB
760CFLAGS_JDKEXE
761CFLAGS_JDKLIB
762MACOSX_VERSION_MIN
763NO_LIFETIME_DSE_CFLAG
764NO_NULL_POINTER_CHECK_CFLAG
765CXXSTD_CXXFLAG
766CXX_O_FLAG_SIZE
767CXX_O_FLAG_NONE
768CXX_O_FLAG_DEBUG
769CXX_O_FLAG_NORM
770CXX_O_FLAG_HI
771CXX_O_FLAG_HIGHEST
772CXX_O_FLAG_HIGHEST_JVM
773C_O_FLAG_SIZE
774C_O_FLAG_NONE
775C_O_FLAG_DEBUG
776C_O_FLAG_NORM
777C_O_FLAG_HI
778C_O_FLAG_HIGHEST
779C_O_FLAG_HIGHEST_JVM
780JVM_CFLAGS_SYMBOLS
781CXXFLAGS_DEBUG_SYMBOLS
782CFLAGS_DEBUG_SYMBOLS
783CXX_FLAG_DEPS
784C_FLAG_DEPS
785SHARED_LIBRARY_FLAGS
786SET_SHARED_LIBRARY_MAPFILE
787SET_SHARED_LIBRARY_NAME
788SET_SHARED_LIBRARY_ORIGIN
789SET_EXECUTABLE_ORIGIN
790CXX_FLAG_REORDER
791C_FLAG_REORDER
792JVM_RCFLAGS
793RC_FLAGS
794AR_OUT_OPTION
795LD_OUT_OPTION
796EXE_OUT_OPTION
797CC_OUT_OPTION
798STRIPFLAGS
799ARFLAGS
800COMPILER_BINDCMD_FILE_FLAG
801COMPILER_COMMAND_FILE_FLAG
802COMPILER_TARGET_BITS_FLAG
803JT_HOME
804JTREGEXE
805HOTSPOT_TOOLCHAIN_TYPE
806USING_BROKEN_SUSE_LD
807PACKAGE_PATH
808USE_CLANG
809HOTSPOT_LD
810HOTSPOT_CXX
811HOTSPOT_RC
812HOTSPOT_MT
813BUILD_AS
814BUILD_LDCXX
815BUILD_LD
816BUILD_STRIP
817BUILD_OBJCOPY
818BUILD_AR
819BUILD_NM
820BUILD_CXX
821BUILD_CC
822BUILD_SYSROOT_LDFLAGS
823BUILD_SYSROOT_CFLAGS
824ac_ct_OBJDUMP
825OBJDUMP
826ac_ct_OBJCOPY
827OBJCOPY
828ac_ct_NM
829ac_ct_STRIP
830GNM
831NM
832STRIP
833MSBUILD
834DUMPBIN
835RC
836MT
837LIPO
838ac_ct_AR
839AR
840AS
841LDCXX
842LD
843CXXCPP
844CPP
845CXX_VERSION_NUMBER
846CC_VERSION_NUMBER
847ac_ct_CXX
848CXXFLAGS
849CXX
850TOOLCHAIN_PATH_CXX
851POTENTIAL_CXX
852OBJEXT
853EXEEXT
854ac_ct_CC
855CPPFLAGS
856LDFLAGS
857CFLAGS
858CC
859TOOLCHAIN_PATH_CC
860POTENTIAL_CC
861TOOLCHAIN_VERSION
862VS_LIB
863VS_INCLUDE
864VS_PATH
865CYGWIN_LINK
866SYSROOT_LDFLAGS
867SYSROOT_CFLAGS
868EXTRA_LDFLAGS
869EXTRA_CXXFLAGS
870EXTRA_CFLAGS
871LEGACY_EXTRA_LDFLAGS
872LEGACY_EXTRA_CXXFLAGS
873LEGACY_EXTRA_CFLAGS
874EXE_SUFFIX
875OBJ_SUFFIX
876STATIC_LIBRARY
877SHARED_LIBRARY
878STATIC_LIBRARY_SUFFIX
879SHARED_LIBRARY_SUFFIX
880LIBRARY_PREFIX
881TOOLCHAIN_TYPE
882STATIC_BUILD
883IMPORT_MODULES_MAKE
884IMPORT_MODULES_SRC
885IMPORT_MODULES_CONF
886IMPORT_MODULES_LIBS
887IMPORT_MODULES_CMDS
888IMPORT_MODULES_CLASSES
889BUILD_HOTSPOT
890HOTSPOT_DIST
891BUILD_OUTPUT
892JDK_TOPDIR
893NASHORN_TOPDIR
894HOTSPOT_TOPDIR
895JAXWS_TOPDIR
896JAXP_TOPDIR
897CORBA_TOPDIR
898LANGTOOLS_TOPDIR
899EXTERNAL_BUILDJDK
900BUILD_JDK
901CREATE_BUILDJDK
902JLINK
903JMOD
904BOOT_JDK_BITS
905JAVAC_FLAGS
906BOOT_JDK_MODULAR
907BOOT_JDK_SOURCETARGET
908JARSIGNER
909JAR
910JAVAH
911JAVAC
912JAVA
913BOOT_JDK
914JAVA_CHECK
915JAVAC_CHECK
916VERSION_IS_GA
917VERSION_SHORT
918VERSION_STRING
919VERSION_NUMBER_FOUR_POSITIONS
920VERSION_NUMBER
921VERSION_OPT
922VERSION_BUILD
923VERSION_PRE
924VERSION_PATCH
925VERSION_SECURITY
926VERSION_MINOR
927VERSION_MAJOR
928MACOSX_BUNDLE_ID_BASE
929MACOSX_BUNDLE_NAME_BASE
930HOTSPOT_VM_DISTRO
931COMPANY_NAME
932JDK_RC_PLATFORM_NAME
933PRODUCT_SUFFIX
934PRODUCT_NAME
935LAUNCHER_NAME
936JLINK_KEEP_PACKAGED_MODULES
937COPYRIGHT_YEAR
938COMPRESS_JARS
939INCLUDE_SA
940UNLIMITED_CRYPTO
941CACERTS_FILE
942BUILD_HEADLESS
943SUPPORT_HEADFUL
944SUPPORT_HEADLESS
945DEFAULT_MAKE_TARGET
946OS_VERSION_MICRO
947OS_VERSION_MINOR
948OS_VERSION_MAJOR
949PKG_CONFIG
950BASH_ARGS
951SETFILE
952CODESIGN
953XATTR
954DSYMUTIL
955IS_GNU_TIME
956PATCH
957DTRACE
958TIME
959STAT
960HG
961READELF
962OTOOL
963LDD
964ZIP
965UNZIP
966FIND_DELETE
967OUTPUT_SYNC
968OUTPUT_SYNC_SUPPORTED
969CHECK_TOOLSDIR_MAKE
970CHECK_TOOLSDIR_GMAKE
971CHECK_MAKE
972CHECK_GMAKE
973MAKE
974PKGHANDLER
975CONFIGURESUPPORT_OUTPUTDIR
976OUTPUT_ROOT
977CONF_NAME
978SPEC
979SDKROOT
980XCODEBUILD
981VALID_JVM_VARIANTS
982JVM_VARIANTS
983DEBUG_LEVEL
984HOTSPOT_DEBUG_LEVEL
985JDK_VARIANT
986SET_OPENJDK
987USERNAME
988CANONICAL_TOPDIR
989ORIGINAL_TOPDIR
990TOPDIR
991PATH_SEP
992ZERO_ARCHDEF
993HOTSPOT_BUILD_CPU_DEFINE
994HOTSPOT_BUILD_CPU_ARCH
995HOTSPOT_BUILD_CPU
996HOTSPOT_BUILD_OS_TYPE
997HOTSPOT_BUILD_OS
998OPENJDK_BUILD_OS_EXPORT_DIR
999OPENJDK_BUILD_CPU_JLI_CFLAGS
1000OPENJDK_BUILD_CPU_OSARCH
1001OPENJDK_BUILD_CPU_ISADIR
1002OPENJDK_BUILD_CPU_LIBDIR
1003OPENJDK_BUILD_CPU_LEGACY_LIB
1004OPENJDK_BUILD_CPU_LEGACY
1005HOTSPOT_TARGET_CPU_DEFINE
1006HOTSPOT_TARGET_CPU_ARCH
1007HOTSPOT_TARGET_CPU
1008HOTSPOT_TARGET_OS_TYPE
1009HOTSPOT_TARGET_OS
1010DEFINE_CROSS_COMPILE_ARCH
1011LP64
1012OPENJDK_TARGET_OS_EXPORT_DIR
1013OPENJDK_TARGET_CPU_JLI_CFLAGS
1014OPENJDK_TARGET_CPU_OSARCH
1015OPENJDK_TARGET_CPU_ISADIR
1016OPENJDK_TARGET_CPU_LIBDIR
1017OPENJDK_TARGET_CPU_LEGACY_LIB
1018OPENJDK_TARGET_CPU_LEGACY
1019REQUIRED_OS_VERSION
1020REQUIRED_OS_NAME
1021COMPILE_TYPE
1022OPENJDK_TARGET_CPU_ENDIAN
1023OPENJDK_TARGET_CPU_BITS
1024OPENJDK_TARGET_CPU_ARCH
1025OPENJDK_TARGET_CPU
1026OPENJDK_TARGET_OS_ENV
1027OPENJDK_TARGET_OS_TYPE
1028OPENJDK_TARGET_OS
1029OPENJDK_BUILD_CPU_ENDIAN
1030OPENJDK_BUILD_CPU_BITS
1031OPENJDK_BUILD_CPU_ARCH
1032OPENJDK_BUILD_CPU
1033OPENJDK_BUILD_OS_ENV
1034OPENJDK_BUILD_OS_TYPE
1035OPENJDK_BUILD_OS
1036OPENJDK_BUILD_AUTOCONF_NAME
1037OPENJDK_TARGET_AUTOCONF_NAME
1038target_os
1039target_vendor
1040target_cpu
1041target
1042host_os
1043host_vendor
1044host_cpu
1045host
1046build_os
1047build_vendor
1048build_cpu
1049build
1050NICE
1051CPIO
1052DF
1053READLINK
1054CYGPATH
1055SED
1056FGREP
1057EGREP
1058GREP
1059AWK
1060XARGS
1061WHICH
1062WC
1063UNIQ
1064UNAME
1065TR
1066TOUCH
1067TEE
1068TAR
1069TAIL
1070SORT
1071SH
1072RMDIR
1073RM
1074PRINTF
1075NAWK
1076MV
1077MKTEMP
1078MKDIR
1079LS
1080LN
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
1205with_stdc__lib
1206with_msvcr_dll
1207with_msvcp_dll
1208with_x
1209with_cups
1210with_cups_include
1211with_freetype
1212with_freetype_include
1213with_freetype_lib
1214with_freetype_src
1215enable_freetype_bundling
1216with_alsa
1217with_alsa_include
1218with_alsa_lib
1219with_libffi
1220with_libffi_include
1221with_libffi_lib
1222with_libjpeg
1223with_giflib
1224with_libpng
1225with_zlib
1226with_lcms
1227with_dxsdk
1228with_dxsdk_lib
1229with_dxsdk_include
1230enable_new_hotspot_build
1231enable_hotspot_test_in_build
1232enable_jtreg_failure_handler
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
1265LN
1266LS
1267MKDIR
1268MKTEMP
1269MV
1270NAWK
1271PRINTF
1272RM
1273RMDIR
1274SH
1275SORT
1276TAIL
1277TAR
1278TEE
1279TOUCH
1280TR
1281UNAME
1282UNIQ
1283WC
1284WHICH
1285XARGS
1286AWK
1287GREP
1288EGREP
1289FGREP
1290SED
1291CYGPATH
1292READLINK
1293DF
1294CPIO
1295NICE
1296MAKE
1297UNZIP
1298ZIP
1299LDD
1300OTOOL
1301READELF
1302HG
1303STAT
1304TIME
1305DTRACE
1306PATCH
1307DSYMUTIL
1308XATTR
1309CODESIGN
1310SETFILE
1311PKG_CONFIG
1312JAVA
1313JAVAC
1314JAVAH
1315JAR
1316JARSIGNER
1317CC
1318CFLAGS
1319LDFLAGS
1320LIBS
1321CPPFLAGS
1322CXX
1323CXXFLAGS
1324CCC
1325CPP
1326CXXCPP
1327AS
1328AR
1329LIPO
1330STRIP
1331NM
1332GNM
1333OBJCOPY
1334OBJDUMP
1335BUILD_CC
1336BUILD_CXX
1337BUILD_NM
1338BUILD_AR
1339BUILD_OBJCOPY
1340BUILD_STRIP
1341JTREGEXE
1342XMKMF
1343FREETYPE_CFLAGS
1344FREETYPE_LIBS
1345ALSA_CFLAGS
1346ALSA_LIBS
1347LIBFFI_CFLAGS
1348LIBFFI_LIBS
1349PNG_CFLAGS
1350PNG_LIBS
1351LCMS_CFLAGS
1352LCMS_LIBS
1353ICECC_CMD
1354ICECC_CREATE_ENV
1355ICECC_WRAPPER
1356CCACHE'
1357
1358
1359# Initialize some variables set by options.
1360ac_init_help=
1361ac_init_version=false
1362ac_unrecognized_opts=
1363ac_unrecognized_sep=
1364# The variables have the same names as the options, with
1365# dashes changed to underlines.
1366cache_file=/dev/null
1367exec_prefix=NONE
1368no_create=
1369no_recursion=
1370prefix=NONE
1371program_prefix=NONE
1372program_suffix=NONE
1373program_transform_name=s,x,x,
1374silent=
1375site=
1376srcdir=
1377verbose=
1378x_includes=NONE
1379x_libraries=NONE
1380
1381# Installation directory options.
1382# These are left unexpanded so users can "make install exec_prefix=/foo"
1383# and all the variables that are supposed to be based on exec_prefix
1384# by default will actually change.
1385# Use braces instead of parens because sh, perl, etc. also accept them.
1386# (The list follows the same order as the GNU Coding Standards.)
1387bindir='${exec_prefix}/bin'
1388sbindir='${exec_prefix}/sbin'
1389libexecdir='${exec_prefix}/libexec'
1390datarootdir='${prefix}/share'
1391datadir='${datarootdir}'
1392sysconfdir='${prefix}/etc'
1393sharedstatedir='${prefix}/com'
1394localstatedir='${prefix}/var'
1395includedir='${prefix}/include'
1396oldincludedir='/usr/include'
1397docdir='${datarootdir}/doc/${PACKAGE_TARNAME}'
1398infodir='${datarootdir}/info'
1399htmldir='${docdir}'
1400dvidir='${docdir}'
1401pdfdir='${docdir}'
1402psdir='${docdir}'
1403libdir='${exec_prefix}/lib'
1404localedir='${datarootdir}/locale'
1405mandir='${datarootdir}/man'
1406
1407ac_prev=
1408ac_dashdash=
1409for ac_option
1410do
1411  # If the previous option needs an argument, assign it.
1412  if test -n "$ac_prev"; then
1413    eval $ac_prev=\$ac_option
1414    ac_prev=
1415    continue
1416  fi
1417
1418  case $ac_option in
1419  *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;;
1420  *=)   ac_optarg= ;;
1421  *)    ac_optarg=yes ;;
1422  esac
1423
1424  # Accept the important Cygnus configure options, so we can diagnose typos.
1425
1426  case $ac_dashdash$ac_option in
1427  --)
1428    ac_dashdash=yes ;;
1429
1430  -bindir | --bindir | --bindi | --bind | --bin | --bi)
1431    ac_prev=bindir ;;
1432  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
1433    bindir=$ac_optarg ;;
1434
1435  -build | --build | --buil | --bui | --bu)
1436    ac_prev=build_alias ;;
1437  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
1438    build_alias=$ac_optarg ;;
1439
1440  -cache-file | --cache-file | --cache-fil | --cache-fi \
1441  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
1442    ac_prev=cache_file ;;
1443  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
1444  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
1445    cache_file=$ac_optarg ;;
1446
1447  --config-cache | -C)
1448    cache_file=config.cache ;;
1449
1450  -datadir | --datadir | --datadi | --datad)
1451    ac_prev=datadir ;;
1452  -datadir=* | --datadir=* | --datadi=* | --datad=*)
1453    datadir=$ac_optarg ;;
1454
1455  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
1456  | --dataroo | --dataro | --datar)
1457    ac_prev=datarootdir ;;
1458  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
1459  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
1460    datarootdir=$ac_optarg ;;
1461
1462  -disable-* | --disable-*)
1463    ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
1464    # Reject names that are not valid shell variable names.
1465    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1466      as_fn_error $? "invalid feature name: $ac_useropt"
1467    ac_useropt_orig=$ac_useropt
1468    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1469    case $ac_user_opts in
1470      *"
1471"enable_$ac_useropt"
1472"*) ;;
1473      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig"
1474	 ac_unrecognized_sep=', ';;
1475    esac
1476    eval enable_$ac_useropt=no ;;
1477
1478  -docdir | --docdir | --docdi | --doc | --do)
1479    ac_prev=docdir ;;
1480  -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*)
1481    docdir=$ac_optarg ;;
1482
1483  -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv)
1484    ac_prev=dvidir ;;
1485  -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*)
1486    dvidir=$ac_optarg ;;
1487
1488  -enable-* | --enable-*)
1489    ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
1490    # Reject names that are not valid shell variable names.
1491    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1492      as_fn_error $? "invalid feature name: $ac_useropt"
1493    ac_useropt_orig=$ac_useropt
1494    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1495    case $ac_user_opts in
1496      *"
1497"enable_$ac_useropt"
1498"*) ;;
1499      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig"
1500	 ac_unrecognized_sep=', ';;
1501    esac
1502    eval enable_$ac_useropt=\$ac_optarg ;;
1503
1504  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
1505  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
1506  | --exec | --exe | --ex)
1507    ac_prev=exec_prefix ;;
1508  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
1509  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
1510  | --exec=* | --exe=* | --ex=*)
1511    exec_prefix=$ac_optarg ;;
1512
1513  -gas | --gas | --ga | --g)
1514    # Obsolete; use --with-gas.
1515    with_gas=yes ;;
1516
1517  -help | --help | --hel | --he | -h)
1518    ac_init_help=long ;;
1519  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
1520    ac_init_help=recursive ;;
1521  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
1522    ac_init_help=short ;;
1523
1524  -host | --host | --hos | --ho)
1525    ac_prev=host_alias ;;
1526  -host=* | --host=* | --hos=* | --ho=*)
1527    host_alias=$ac_optarg ;;
1528
1529  -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht)
1530    ac_prev=htmldir ;;
1531  -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \
1532  | --ht=*)
1533    htmldir=$ac_optarg ;;
1534
1535  -includedir | --includedir | --includedi | --included | --include \
1536  | --includ | --inclu | --incl | --inc)
1537    ac_prev=includedir ;;
1538  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
1539  | --includ=* | --inclu=* | --incl=* | --inc=*)
1540    includedir=$ac_optarg ;;
1541
1542  -infodir | --infodir | --infodi | --infod | --info | --inf)
1543    ac_prev=infodir ;;
1544  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
1545    infodir=$ac_optarg ;;
1546
1547  -libdir | --libdir | --libdi | --libd)
1548    ac_prev=libdir ;;
1549  -libdir=* | --libdir=* | --libdi=* | --libd=*)
1550    libdir=$ac_optarg ;;
1551
1552  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
1553  | --libexe | --libex | --libe)
1554    ac_prev=libexecdir ;;
1555  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
1556  | --libexe=* | --libex=* | --libe=*)
1557    libexecdir=$ac_optarg ;;
1558
1559  -localedir | --localedir | --localedi | --localed | --locale)
1560    ac_prev=localedir ;;
1561  -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*)
1562    localedir=$ac_optarg ;;
1563
1564  -localstatedir | --localstatedir | --localstatedi | --localstated \
1565  | --localstate | --localstat | --localsta | --localst | --locals)
1566    ac_prev=localstatedir ;;
1567  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
1568  | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*)
1569    localstatedir=$ac_optarg ;;
1570
1571  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
1572    ac_prev=mandir ;;
1573  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
1574    mandir=$ac_optarg ;;
1575
1576  -nfp | --nfp | --nf)
1577    # Obsolete; use --without-fp.
1578    with_fp=no ;;
1579
1580  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
1581  | --no-cr | --no-c | -n)
1582    no_create=yes ;;
1583
1584  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
1585  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
1586    no_recursion=yes ;;
1587
1588  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
1589  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
1590  | --oldin | --oldi | --old | --ol | --o)
1591    ac_prev=oldincludedir ;;
1592  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
1593  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
1594  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
1595    oldincludedir=$ac_optarg ;;
1596
1597  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
1598    ac_prev=prefix ;;
1599  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
1600    prefix=$ac_optarg ;;
1601
1602  -program-prefix | --program-prefix | --program-prefi | --program-pref \
1603  | --program-pre | --program-pr | --program-p)
1604    ac_prev=program_prefix ;;
1605  -program-prefix=* | --program-prefix=* | --program-prefi=* \
1606  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
1607    program_prefix=$ac_optarg ;;
1608
1609  -program-suffix | --program-suffix | --program-suffi | --program-suff \
1610  | --program-suf | --program-su | --program-s)
1611    ac_prev=program_suffix ;;
1612  -program-suffix=* | --program-suffix=* | --program-suffi=* \
1613  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
1614    program_suffix=$ac_optarg ;;
1615
1616  -program-transform-name | --program-transform-name \
1617  | --program-transform-nam | --program-transform-na \
1618  | --program-transform-n | --program-transform- \
1619  | --program-transform | --program-transfor \
1620  | --program-transfo | --program-transf \
1621  | --program-trans | --program-tran \
1622  | --progr-tra | --program-tr | --program-t)
1623    ac_prev=program_transform_name ;;
1624  -program-transform-name=* | --program-transform-name=* \
1625  | --program-transform-nam=* | --program-transform-na=* \
1626  | --program-transform-n=* | --program-transform-=* \
1627  | --program-transform=* | --program-transfor=* \
1628  | --program-transfo=* | --program-transf=* \
1629  | --program-trans=* | --program-tran=* \
1630  | --progr-tra=* | --program-tr=* | --program-t=*)
1631    program_transform_name=$ac_optarg ;;
1632
1633  -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd)
1634    ac_prev=pdfdir ;;
1635  -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*)
1636    pdfdir=$ac_optarg ;;
1637
1638  -psdir | --psdir | --psdi | --psd | --ps)
1639    ac_prev=psdir ;;
1640  -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*)
1641    psdir=$ac_optarg ;;
1642
1643  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
1644  | -silent | --silent | --silen | --sile | --sil)
1645    silent=yes ;;
1646
1647  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
1648    ac_prev=sbindir ;;
1649  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
1650  | --sbi=* | --sb=*)
1651    sbindir=$ac_optarg ;;
1652
1653  -sharedstatedir | --sharedstatedir | --sharedstatedi \
1654  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
1655  | --sharedst | --shareds | --shared | --share | --shar \
1656  | --sha | --sh)
1657    ac_prev=sharedstatedir ;;
1658  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
1659  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
1660  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
1661  | --sha=* | --sh=*)
1662    sharedstatedir=$ac_optarg ;;
1663
1664  -site | --site | --sit)
1665    ac_prev=site ;;
1666  -site=* | --site=* | --sit=*)
1667    site=$ac_optarg ;;
1668
1669  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
1670    ac_prev=srcdir ;;
1671  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
1672    srcdir=$ac_optarg ;;
1673
1674  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
1675  | --syscon | --sysco | --sysc | --sys | --sy)
1676    ac_prev=sysconfdir ;;
1677  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
1678  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
1679    sysconfdir=$ac_optarg ;;
1680
1681  -target | --target | --targe | --targ | --tar | --ta | --t)
1682    ac_prev=target_alias ;;
1683  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
1684    target_alias=$ac_optarg ;;
1685
1686  -v | -verbose | --verbose | --verbos | --verbo | --verb)
1687    verbose=yes ;;
1688
1689  -version | --version | --versio | --versi | --vers | -V)
1690    ac_init_version=: ;;
1691
1692  -with-* | --with-*)
1693    ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
1694    # Reject names that are not valid shell variable names.
1695    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1696      as_fn_error $? "invalid package name: $ac_useropt"
1697    ac_useropt_orig=$ac_useropt
1698    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1699    case $ac_user_opts in
1700      *"
1701"with_$ac_useropt"
1702"*) ;;
1703      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig"
1704	 ac_unrecognized_sep=', ';;
1705    esac
1706    eval with_$ac_useropt=\$ac_optarg ;;
1707
1708  -without-* | --without-*)
1709    ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'`
1710    # Reject names that are not valid shell variable names.
1711    expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null &&
1712      as_fn_error $? "invalid package name: $ac_useropt"
1713    ac_useropt_orig=$ac_useropt
1714    ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'`
1715    case $ac_user_opts in
1716      *"
1717"with_$ac_useropt"
1718"*) ;;
1719      *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig"
1720	 ac_unrecognized_sep=', ';;
1721    esac
1722    eval with_$ac_useropt=no ;;
1723
1724  --x)
1725    # Obsolete; use --with-x.
1726    with_x=yes ;;
1727
1728  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
1729  | --x-incl | --x-inc | --x-in | --x-i)
1730    ac_prev=x_includes ;;
1731  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
1732  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
1733    x_includes=$ac_optarg ;;
1734
1735  -x-libraries | --x-libraries | --x-librarie | --x-librari \
1736  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
1737    ac_prev=x_libraries ;;
1738  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
1739  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
1740    x_libraries=$ac_optarg ;;
1741
1742  -*) as_fn_error $? "unrecognized option: \`$ac_option'
1743Try \`$0 --help' for more information"
1744    ;;
1745
1746  *=*)
1747    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
1748    # Reject names that are not valid shell variable names.
1749    case $ac_envvar in #(
1750      '' | [0-9]* | *[!_$as_cr_alnum]* )
1751      as_fn_error $? "invalid variable name: \`$ac_envvar'" ;;
1752    esac
1753    eval $ac_envvar=\$ac_optarg
1754    export $ac_envvar ;;
1755
1756  *)
1757    # FIXME: should be removed in autoconf 3.0.
1758    $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2
1759    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
1760      $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2
1761    : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}"
1762    ;;
1763
1764  esac
1765done
1766
1767if test -n "$ac_prev"; then
1768  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
1769  as_fn_error $? "missing argument to $ac_option"
1770fi
1771
1772if test -n "$ac_unrecognized_opts"; then
1773  case $enable_option_checking in
1774    no) ;;
1775    fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;;
1776    *)     $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;;
1777  esac
1778fi
1779
1780# Check all directory arguments for consistency.
1781for ac_var in	exec_prefix prefix bindir sbindir libexecdir datarootdir \
1782		datadir sysconfdir sharedstatedir localstatedir includedir \
1783		oldincludedir docdir infodir htmldir dvidir pdfdir psdir \
1784		libdir localedir mandir
1785do
1786  eval ac_val=\$$ac_var
1787  # Remove trailing slashes.
1788  case $ac_val in
1789    */ )
1790      ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'`
1791      eval $ac_var=\$ac_val;;
1792  esac
1793  # Be sure to have absolute directory names.
1794  case $ac_val in
1795    [\\/$]* | ?:[\\/]* )  continue;;
1796    NONE | '' ) case $ac_var in *prefix ) continue;; esac;;
1797  esac
1798  as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val"
1799done
1800
1801# There might be people who depend on the old broken behavior: `$host'
1802# used to hold the argument of --host etc.
1803# FIXME: To remove some day.
1804build=$build_alias
1805host=$host_alias
1806target=$target_alias
1807
1808# FIXME: To remove some day.
1809if test "x$host_alias" != x; then
1810  if test "x$build_alias" = x; then
1811    cross_compiling=maybe
1812  elif test "x$build_alias" != "x$host_alias"; then
1813    cross_compiling=yes
1814  fi
1815fi
1816
1817ac_tool_prefix=
1818test -n "$host_alias" && ac_tool_prefix=$host_alias-
1819
1820test "$silent" = yes && exec 6>/dev/null
1821
1822
1823ac_pwd=`pwd` && test -n "$ac_pwd" &&
1824ac_ls_di=`ls -di .` &&
1825ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` ||
1826  as_fn_error $? "working directory cannot be determined"
1827test "X$ac_ls_di" = "X$ac_pwd_ls_di" ||
1828  as_fn_error $? "pwd does not report name of working directory"
1829
1830
1831# Find the source files, if location was not specified.
1832if test -z "$srcdir"; then
1833  ac_srcdir_defaulted=yes
1834  # Try the directory containing this script, then the parent directory.
1835  ac_confdir=`$as_dirname -- "$as_myself" ||
1836$as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
1837	 X"$as_myself" : 'X\(//\)[^/]' \| \
1838	 X"$as_myself" : 'X\(//\)$' \| \
1839	 X"$as_myself" : 'X\(/\)' \| . 2>/dev/null ||
1840$as_echo X"$as_myself" |
1841    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
1842	    s//\1/
1843	    q
1844	  }
1845	  /^X\(\/\/\)[^/].*/{
1846	    s//\1/
1847	    q
1848	  }
1849	  /^X\(\/\/\)$/{
1850	    s//\1/
1851	    q
1852	  }
1853	  /^X\(\/\).*/{
1854	    s//\1/
1855	    q
1856	  }
1857	  s/.*/./; q'`
1858  srcdir=$ac_confdir
1859  if test ! -r "$srcdir/$ac_unique_file"; then
1860    srcdir=..
1861  fi
1862else
1863  ac_srcdir_defaulted=no
1864fi
1865if test ! -r "$srcdir/$ac_unique_file"; then
1866  test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .."
1867  as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir"
1868fi
1869ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work"
1870ac_abs_confdir=`(
1871	cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg"
1872	pwd)`
1873# When building in place, set srcdir=.
1874if test "$ac_abs_confdir" = "$ac_pwd"; then
1875  srcdir=.
1876fi
1877# Remove unnecessary trailing slashes from srcdir.
1878# Double slashes in file names in object file debugging info
1879# mess up M-x gdb in Emacs.
1880case $srcdir in
1881*/) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;;
1882esac
1883for ac_var in $ac_precious_vars; do
1884  eval ac_env_${ac_var}_set=\${${ac_var}+set}
1885  eval ac_env_${ac_var}_value=\$${ac_var}
1886  eval ac_cv_env_${ac_var}_set=\${${ac_var}+set}
1887  eval ac_cv_env_${ac_var}_value=\$${ac_var}
1888done
1889
1890#
1891# Report the --help message.
1892#
1893if test "$ac_init_help" = "long"; then
1894  # Omit some internal or obsolete options to make the list less imposing.
1895  # This message is too long to be a string in the A/UX 3.1 sh.
1896  cat <<_ACEOF
1897\`configure' configures OpenJDK jdk9 to adapt to many kinds of systems.
1898
1899Usage: $0 [OPTION]... [VAR=VALUE]...
1900
1901To assign environment variables (e.g., CC, CFLAGS...), specify them as
1902VAR=VALUE.  See below for descriptions of some of the useful variables.
1903
1904Defaults for the options are specified in brackets.
1905
1906Configuration:
1907  -h, --help              display this help and exit
1908      --help=short        display options specific to this package
1909      --help=recursive    display the short help of all the included packages
1910  -V, --version           display version information and exit
1911  -q, --quiet, --silent   do not print \`checking ...' messages
1912      --cache-file=FILE   cache test results in FILE [disabled]
1913  -C, --config-cache      alias for \`--cache-file=config.cache'
1914  -n, --no-create         do not create output files
1915      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
1916
1917Installation directories:
1918  --prefix=PREFIX         install architecture-independent files in PREFIX
1919                          [$ac_default_prefix]
1920  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
1921                          [PREFIX]
1922
1923By default, \`make install' will install all the files in
1924\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
1925an installation prefix other than \`$ac_default_prefix' using \`--prefix',
1926for instance \`--prefix=\$HOME'.
1927
1928For better control, use the options below.
1929
1930Fine tuning of the installation directories:
1931  --bindir=DIR            user executables [EPREFIX/bin]
1932  --sbindir=DIR           system admin executables [EPREFIX/sbin]
1933  --libexecdir=DIR        program executables [EPREFIX/libexec]
1934  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
1935  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
1936  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
1937  --libdir=DIR            object code libraries [EPREFIX/lib]
1938  --includedir=DIR        C header files [PREFIX/include]
1939  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
1940  --datarootdir=DIR       read-only arch.-independent data root [PREFIX/share]
1941  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
1942  --infodir=DIR           info documentation [DATAROOTDIR/info]
1943  --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
1944  --mandir=DIR            man documentation [DATAROOTDIR/man]
1945  --docdir=DIR            documentation root [DATAROOTDIR/doc/openjdk]
1946  --htmldir=DIR           html documentation [DOCDIR]
1947  --dvidir=DIR            dvi documentation [DOCDIR]
1948  --pdfdir=DIR            pdf documentation [DOCDIR]
1949  --psdir=DIR             ps documentation [DOCDIR]
1950_ACEOF
1951
1952  cat <<\_ACEOF
1953
1954X features:
1955  --x-includes=DIR    X include files are in DIR
1956  --x-libraries=DIR   X library files are in DIR
1957
1958System types:
1959  --build=BUILD     configure for building on BUILD [guessed]
1960  --host=HOST       cross-compile to build programs to run on HOST [BUILD]
1961  --target=TARGET   configure for building compilers for TARGET [HOST]
1962_ACEOF
1963fi
1964
1965if test -n "$ac_init_help"; then
1966  case $ac_init_help in
1967     short | recursive ) echo "Configuration of OpenJDK jdk9:";;
1968   esac
1969  cat <<\_ACEOF
1970
1971Optional Features:
1972  --disable-option-checking  ignore unrecognized --enable/--with options
1973  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
1974  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
1975  --enable-openjdk-only   suppress building custom source even if present
1976                          [disabled]
1977  --enable-debug          set the debug level to fastdebug (shorthand for
1978                          --with-debug-level=fastdebug) [disabled]
1979  --disable-headful       disable building headful support (graphical UI
1980                          support) [enabled]
1981  --enable-unlimited-crypto
1982                          Enable unlimited crypto policy [disabled]
1983  --disable-keep-packaged-modules
1984                          Do not keep packaged modules in jdk image [enable]
1985  --enable-static-build   enable static library build [disabled]
1986  --disable-warnings-as-errors
1987                          do not consider native warnings to be an error
1988                          [enabled]
1989  --enable-debug-symbols  Deprecated. Option is kept for backwards
1990                          compatibility and is ignored
1991  --enable-zip-debug-info Deprecated. Option is kept for backwards
1992                          compatibility and is ignored
1993  --enable-native-coverage
1994                          enable native compilation with code coverage
1995                          data[disabled]
1996  --enable-dtrace[=yes/no/auto]
1997                          enable dtrace. Default is auto, where dtrace is
1998                          enabled if all dependencies are present.
1999  --disable-freetype-bundling
2000                          disable bundling of the freetype library with the
2001                          build result [enabled on Windows or when using
2002                          --with-freetype, disabled otherwise]
2003  --disable-new-hotspot-build
2004                          disable the new hotspot build system (use the old)
2005                          [enabled]
2006  --enable-hotspot-test-in-build
2007                          run the Queens test after Hotspot build [disabled]
2008  --enable-jtreg-failure-handler
2009                          forces build of the jtreg failure handler to be
2010                          enabled, missing dependencies become fatal errors.
2011                          Default is auto, where the failure handler is built
2012                          if all dependencies are present and otherwise just
2013                          disabled.
2014  --enable-sjavac         use sjavac to do fast incremental compiles
2015                          [disabled]
2016  --disable-javac-server  disable javac server [enabled]
2017  --enable-icecc          enable distribted compilation of native code using
2018                          icecc/icecream [disabled]
2019  --disable-precompiled-headers
2020                          disable using precompiled headers when compiling C++
2021                          [enabled]
2022  --enable-ccache         enable using ccache to speed up recompilations
2023                          [disabled]
2024
2025Optional Packages:
2026  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
2027  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
2028  --with-target-bits      build 32-bit or 64-bit binaries (for platforms that
2029                          support it), e.g. --with-target-bits=32 [guessed]
2030  --with-custom-make-dir  Deprecated. Option is kept for backwards
2031                          compatibility and is ignored
2032  --with-jdk-variant      JDK variant to build (normal) [normal]
2033  --with-debug-level      set the debug level (release, fastdebug, slowdebug,
2034                          optimized) [release]
2035  --with-jvm-variants     JVM variants (separated by commas) to build
2036                          (server,client,minimal,core,zero,zeroshark,custom)
2037                          [server]
2038  --with-devkit           use this devkit for compilers, tools and resources
2039  --with-sys-root         alias for --with-sysroot for backwards compatability
2040  --with-sysroot          use this directory as sysroot
2041  --with-tools-dir        alias for --with-toolchain-path for backwards
2042                          compatibility
2043  --with-toolchain-path   prepend these directories when searching for
2044                          toolchain binaries (compilers etc)
2045  --with-extra-path       prepend these directories to the default path
2046  --with-sdk-name         use the platform SDK of the given name. [macosx]
2047  --with-conf-name        use this as the name of the configuration [generated
2048                          from important configuration options]
2049  --with-output-sync      set make output sync type if supported by make.
2050                          [recurse]
2051  --with-default-make-target
2052                          set the default make target [exploded-image]
2053  --with-cacerts-file     specify alternative cacerts file
2054  --with-copyright-year   Set copyright year value for build [current year]
2055  --with-milestone        Deprecated. Option is kept for backwards
2056                          compatibility and is ignored
2057  --with-update-version   Deprecated. Option is kept for backwards
2058                          compatibility and is ignored
2059  --with-user-release-suffix
2060                          Deprecated. Option is kept for backwards
2061                          compatibility and is ignored
2062  --with-build-number     Deprecated. Option is kept for backwards
2063                          compatibility and is ignored
2064  --with-version-string   Set version string [calculated]
2065  --with-version-pre      Set the base part of the version 'PRE' field
2066                          (pre-release identifier) ['internal']
2067  --with-version-opt      Set version 'OPT' field (build metadata)
2068                          [<timestamp>.<user>.<dirname>]
2069  --with-version-build    Set version 'BUILD' field (build number) [not
2070                          specified]
2071  --with-version-major    Set version 'MAJOR' field (first number) [current
2072                          source value]
2073  --with-version-minor    Set version 'MINOR' field (second number) [current
2074                          source value]
2075  --with-version-security Set version 'SECURITY' field (third number) [current
2076                          source value]
2077  --with-version-patch    Set version 'PATCH' field (fourth number) [not
2078                          specified]
2079  --with-boot-jdk         path to Boot JDK (used to bootstrap build) [probed]
2080  --with-build-jdk        path to JDK of same version as is being built[the
2081                          newly built JDK]
2082  --with-add-source-root  Deprecated. Option is kept for backwards
2083                          compatibility and is ignored
2084  --with-override-source-root
2085                          Deprecated. Option is kept for backwards
2086                          compatibility and is ignored
2087  --with-adds-and-overrides
2088                          Deprecated. Option is kept for backwards
2089                          compatibility and is ignored
2090  --with-override-langtools
2091                          Deprecated. Option is kept for backwards
2092                          compatibility and is ignored
2093  --with-override-corba   Deprecated. Option is kept for backwards
2094                          compatibility and is ignored
2095  --with-override-jaxp    Deprecated. Option is kept for backwards
2096                          compatibility and is ignored
2097  --with-override-jaxws   Deprecated. Option is kept for backwards
2098                          compatibility and is ignored
2099  --with-override-hotspot Deprecated. Option is kept for backwards
2100                          compatibility and is ignored
2101  --with-override-nashorn Deprecated. Option is kept for backwards
2102                          compatibility and is ignored
2103  --with-override-jdk     Deprecated. Option is kept for backwards
2104                          compatibility and is ignored
2105  --with-import-hotspot   import hotspot binaries from this jdk image or
2106                          hotspot build dist dir instead of building from
2107                          source
2108  --with-import-modules   import a set of prebuilt modules either as a zip
2109                          file or an exploded directory
2110  --with-toolchain-type   the toolchain type (or family) to use, use '--help'
2111                          to show possible values [platform dependent]
2112  --with-extra-cflags     extra flags to be used when compiling jdk c-files
2113  --with-extra-cxxflags   extra flags to be used when compiling jdk c++-files
2114  --with-extra-ldflags    extra flags to be used when linking jdk
2115  --with-toolchain-version
2116                          the version of the toolchain to look for, use
2117                          '--help' to show possible values [platform
2118                          dependent]
2119  --with-build-devkit     Devkit to use for the build platform toolchain
2120  --with-jtreg            Regression Test Harness [probed]
2121  --with-native-debug-symbols
2122                          set the native debug symbol configuration (none,
2123                          internal, external, zipped) [varying]
2124  --with-jvm-features     additional JVM features to enable (separated by
2125                          comma), use '--help' to show possible values [none]
2126  --with-jvm-interpreter  Deprecated. Option is kept for backwards
2127                          compatibility and is ignored
2128  --with-stdc++lib=<static>,<dynamic>,<default>
2129                          force linking of the C++ runtime on Linux to either
2130                          static or dynamic, default is static with dynamic as
2131                          fallback
2132  --with-msvcr-dll        path to microsoft C runtime dll (msvcr*.dll)
2133                          (Windows only) [probed]
2134  --with-msvcp-dll        path to microsoft C++ runtime dll (msvcp*.dll)
2135                          (Windows only) [probed]
2136  --with-x                use the X Window System
2137  --with-cups             specify prefix directory for the cups package
2138                          (expecting the headers under PATH/include)
2139  --with-cups-include     specify directory for the cups include files
2140  --with-freetype         specify prefix directory for the freetype package
2141                          (expecting the libraries under PATH/lib and the
2142                          headers under PATH/include)
2143  --with-freetype-include specify directory for the freetype include files
2144  --with-freetype-lib     specify directory for the freetype library
2145  --with-freetype-src     specify directory with freetype sources to
2146                          automatically build the library (experimental,
2147                          Windows-only)
2148  --with-alsa             specify prefix directory for the alsa package
2149                          (expecting the libraries under PATH/lib and the
2150                          headers under PATH/include)
2151  --with-alsa-include     specify directory for the alsa include files
2152  --with-alsa-lib         specify directory for the alsa library
2153  --with-libffi           specify prefix directory for the libffi package
2154                          (expecting the libraries under PATH/lib and the
2155                          headers under PATH/include)
2156  --with-libffi-include   specify directory for the libffi include files
2157  --with-libffi-lib       specify directory for the libffi library
2158  --with-libjpeg          use libjpeg from build system or OpenJDK source
2159                          (system, bundled) [bundled]
2160  --with-giflib           use giflib from build system or OpenJDK source
2161                          (system, bundled) [bundled]
2162  --with-libpng           use libpng from build system or OpenJDK source
2163                          (system, bundled) [bundled]
2164  --with-zlib             use zlib from build system or OpenJDK source
2165                          (system, bundled) [bundled]
2166  --with-lcms             use lcms2 from build system or OpenJDK source
2167                          (system, bundled) [bundled]
2168  --with-dxsdk            Deprecated. Option is kept for backwards
2169                          compatibility and is ignored
2170  --with-dxsdk-lib        Deprecated. Option is kept for backwards
2171                          compatibility and is ignored
2172  --with-dxsdk-include    Deprecated. Option is kept for backwards
2173                          compatibility and is ignored
2174  --with-num-cores        number of cores in the build system, e.g.
2175                          --with-num-cores=8 [probed]
2176  --with-memory-size      memory (in MB) available in the build system, e.g.
2177                          --with-memory-size=1024 [probed]
2178  --with-jobs             number of parallel jobs to let make run [calculated
2179                          based on cores and memory]
2180  --with-test-jobs        number of parallel tests jobs to run [based on build
2181                          jobs]
2182  --with-boot-jdk-jvmargs specify JVM arguments to be passed to all java
2183                          invocations of boot JDK, overriding the default
2184                          values, e.g --with-boot-jdk-jvmargs="-Xmx8G
2185                          -enableassertions"
2186  --with-sjavac-server-java
2187                          use this java binary for running the sjavac
2188                          background server [Boot JDK java]
2189  --with-ccache-dir       where to store ccache files [~/.ccache]
2190
2191Some influential environment variables:
2192  BASENAME    Override default value for BASENAME
2193  BASH        Override default value for BASH
2194  CAT         Override default value for CAT
2195  CHMOD       Override default value for CHMOD
2196  CMP         Override default value for CMP
2197  COMM        Override default value for COMM
2198  CP          Override default value for CP
2199  CUT         Override default value for CUT
2200  DATE        Override default value for DATE
2201  DIFF        Override default value for DIFF
2202  DIRNAME     Override default value for DIRNAME
2203  ECHO        Override default value for ECHO
2204  EXPR        Override default value for EXPR
2205  FILE        Override default value for FILE
2206  FIND        Override default value for FIND
2207  HEAD        Override default value for HEAD
2208  LN          Override default value for LN
2209  LS          Override default value for LS
2210  MKDIR       Override default value for MKDIR
2211  MKTEMP      Override default value for MKTEMP
2212  MV          Override default value for MV
2213  NAWK        Override default value for NAWK
2214  PRINTF      Override default value for PRINTF
2215  RM          Override default value for RM
2216  RMDIR       Override default value for RMDIR
2217  SH          Override default value for SH
2218  SORT        Override default value for SORT
2219  TAIL        Override default value for TAIL
2220  TAR         Override default value for TAR
2221  TEE         Override default value for TEE
2222  TOUCH       Override default value for TOUCH
2223  TR          Override default value for TR
2224  UNAME       Override default value for UNAME
2225  UNIQ        Override default value for UNIQ
2226  WC          Override default value for WC
2227  WHICH       Override default value for WHICH
2228  XARGS       Override default value for XARGS
2229  AWK         Override default value for AWK
2230  GREP        Override default value for GREP
2231  EGREP       Override default value for EGREP
2232  FGREP       Override default value for FGREP
2233  SED         Override default value for SED
2234  CYGPATH     Override default value for CYGPATH
2235  READLINK    Override default value for READLINK
2236  DF          Override default value for DF
2237  CPIO        Override default value for CPIO
2238  NICE        Override default value for NICE
2239  MAKE        Override default value for MAKE
2240  UNZIP       Override default value for UNZIP
2241  ZIP         Override default value for ZIP
2242  LDD         Override default value for LDD
2243  OTOOL       Override default value for OTOOL
2244  READELF     Override default value for READELF
2245  HG          Override default value for HG
2246  STAT        Override default value for STAT
2247  TIME        Override default value for TIME
2248  DTRACE      Override default value for DTRACE
2249  PATCH       Override default value for PATCH
2250  DSYMUTIL    Override default value for DSYMUTIL
2251  XATTR       Override default value for XATTR
2252  CODESIGN    Override default value for CODESIGN
2253  SETFILE     Override default value for SETFILE
2254  PKG_CONFIG  path to pkg-config utility
2255  JAVA        Override default value for JAVA
2256  JAVAC       Override default value for JAVAC
2257  JAVAH       Override default value for JAVAH
2258  JAR         Override default value for JAR
2259  JARSIGNER   Override default value for JARSIGNER
2260  CC          C compiler command
2261  CFLAGS      C compiler flags
2262  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
2263              nonstandard directory <lib dir>
2264  LIBS        libraries to pass to the linker, e.g. -l<library>
2265  CPPFLAGS    (Objective) C/C++ preprocessor flags, e.g. -I<include dir> if
2266              you have headers in a nonstandard directory <include dir>
2267  CXX         C++ compiler command
2268  CXXFLAGS    C++ compiler flags
2269  CPP         C preprocessor
2270  CXXCPP      C++ preprocessor
2271  AS          Override default value for AS
2272  AR          Override default value for AR
2273  LIPO        Override default value for LIPO
2274  STRIP       Override default value for STRIP
2275  NM          Override default value for NM
2276  GNM         Override default value for GNM
2277  OBJCOPY     Override default value for OBJCOPY
2278  OBJDUMP     Override default value for OBJDUMP
2279  BUILD_CC    Override default value for BUILD_CC
2280  BUILD_CXX   Override default value for BUILD_CXX
2281  BUILD_NM    Override default value for BUILD_NM
2282  BUILD_AR    Override default value for BUILD_AR
2283  BUILD_OBJCOPY
2284              Override default value for BUILD_OBJCOPY
2285  BUILD_STRIP Override default value for BUILD_STRIP
2286  JTREGEXE    Override default value for JTREGEXE
2287  XMKMF       Path to xmkmf, Makefile generator for X Window System
2288  FREETYPE_CFLAGS
2289              C compiler flags for FREETYPE, overriding pkg-config
2290  FREETYPE_LIBS
2291              linker flags for FREETYPE, overriding pkg-config
2292  ALSA_CFLAGS C compiler flags for ALSA, overriding pkg-config
2293  ALSA_LIBS   linker flags for ALSA, overriding pkg-config
2294  LIBFFI_CFLAGS
2295              C compiler flags for LIBFFI, overriding pkg-config
2296  LIBFFI_LIBS linker flags for LIBFFI, overriding pkg-config
2297  PNG_CFLAGS  C compiler flags for PNG, overriding pkg-config
2298  PNG_LIBS    linker flags for PNG, overriding pkg-config
2299  LCMS_CFLAGS C compiler flags for LCMS, overriding pkg-config
2300  LCMS_LIBS   linker flags for LCMS, overriding pkg-config
2301  ICECC_CMD   Override default value for ICECC_CMD
2302  ICECC_CREATE_ENV
2303              Override default value for ICECC_CREATE_ENV
2304  ICECC_WRAPPER
2305              Override default value for ICECC_WRAPPER
2306  CCACHE      Override default value for CCACHE
2307
2308Use these variables to override the choices made by `configure' or to help
2309it to find libraries and programs with nonstandard names/locations.
2310
2311Report bugs to <build-dev@openjdk.java.net>.
2312OpenJDK home page: <http://openjdk.java.net>.
2313_ACEOF
2314ac_status=$?
2315fi
2316
2317if test "$ac_init_help" = "recursive"; then
2318  # If there are subdirs, report their specific --help.
2319  for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
2320    test -d "$ac_dir" ||
2321      { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } ||
2322      continue
2323    ac_builddir=.
2324
2325case "$ac_dir" in
2326.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
2327*)
2328  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
2329  # A ".." for each directory in $ac_dir_suffix.
2330  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
2331  case $ac_top_builddir_sub in
2332  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
2333  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
2334  esac ;;
2335esac
2336ac_abs_top_builddir=$ac_pwd
2337ac_abs_builddir=$ac_pwd$ac_dir_suffix
2338# for backward compatibility:
2339ac_top_builddir=$ac_top_build_prefix
2340
2341case $srcdir in
2342  .)  # We are building in place.
2343    ac_srcdir=.
2344    ac_top_srcdir=$ac_top_builddir_sub
2345    ac_abs_top_srcdir=$ac_pwd ;;
2346  [\\/]* | ?:[\\/]* )  # Absolute name.
2347    ac_srcdir=$srcdir$ac_dir_suffix;
2348    ac_top_srcdir=$srcdir
2349    ac_abs_top_srcdir=$srcdir ;;
2350  *) # Relative name.
2351    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
2352    ac_top_srcdir=$ac_top_build_prefix$srcdir
2353    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
2354esac
2355ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
2356
2357    cd "$ac_dir" || { ac_status=$?; continue; }
2358    # Check for guested configure.
2359    if test -f "$ac_srcdir/configure.gnu"; then
2360      echo &&
2361      $SHELL "$ac_srcdir/configure.gnu" --help=recursive
2362    elif test -f "$ac_srcdir/configure"; then
2363      echo &&
2364      $SHELL "$ac_srcdir/configure" --help=recursive
2365    else
2366      $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
2367    fi || ac_status=$?
2368    cd "$ac_pwd" || { ac_status=$?; break; }
2369  done
2370fi
2371
2372test -n "$ac_init_help" && exit $ac_status
2373if $ac_init_version; then
2374  cat <<\_ACEOF
2375OpenJDK configure jdk9
2376generated by GNU Autoconf 2.69
2377
2378Copyright (C) 2012 Free Software Foundation, Inc.
2379This configure script is free software; the Free Software Foundation
2380gives unlimited permission to copy, distribute and modify it.
2381_ACEOF
2382  exit
2383fi
2384
2385## ------------------------ ##
2386## Autoconf initialization. ##
2387## ------------------------ ##
2388
2389# ac_fn_c_try_compile LINENO
2390# --------------------------
2391# Try to compile conftest.$ac_ext, and return whether this succeeded.
2392ac_fn_c_try_compile ()
2393{
2394  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2395  rm -f conftest.$ac_objext
2396  if { { ac_try="$ac_compile"
2397case "(($ac_try" in
2398  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2399  *) ac_try_echo=$ac_try;;
2400esac
2401eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2402$as_echo "$ac_try_echo"; } >&5
2403  (eval "$ac_compile") 2>conftest.err
2404  ac_status=$?
2405  if test -s conftest.err; then
2406    grep -v '^ *+' conftest.err >conftest.er1
2407    cat conftest.er1 >&5
2408    mv -f conftest.er1 conftest.err
2409  fi
2410  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2411  test $ac_status = 0; } && {
2412	 test -z "$ac_c_werror_flag" ||
2413	 test ! -s conftest.err
2414       } && test -s conftest.$ac_objext; then :
2415  ac_retval=0
2416else
2417  $as_echo "$as_me: failed program was:" >&5
2418sed 's/^/| /' conftest.$ac_ext >&5
2419
2420	ac_retval=1
2421fi
2422  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2423  as_fn_set_status $ac_retval
2424
2425} # ac_fn_c_try_compile
2426
2427# ac_fn_cxx_try_compile LINENO
2428# ----------------------------
2429# Try to compile conftest.$ac_ext, and return whether this succeeded.
2430ac_fn_cxx_try_compile ()
2431{
2432  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2433  rm -f conftest.$ac_objext
2434  if { { ac_try="$ac_compile"
2435case "(($ac_try" in
2436  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2437  *) ac_try_echo=$ac_try;;
2438esac
2439eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2440$as_echo "$ac_try_echo"; } >&5
2441  (eval "$ac_compile") 2>conftest.err
2442  ac_status=$?
2443  if test -s conftest.err; then
2444    grep -v '^ *+' conftest.err >conftest.er1
2445    cat conftest.er1 >&5
2446    mv -f conftest.er1 conftest.err
2447  fi
2448  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2449  test $ac_status = 0; } && {
2450	 test -z "$ac_cxx_werror_flag" ||
2451	 test ! -s conftest.err
2452       } && test -s conftest.$ac_objext; then :
2453  ac_retval=0
2454else
2455  $as_echo "$as_me: failed program was:" >&5
2456sed 's/^/| /' conftest.$ac_ext >&5
2457
2458	ac_retval=1
2459fi
2460  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2461  as_fn_set_status $ac_retval
2462
2463} # ac_fn_cxx_try_compile
2464
2465# ac_fn_c_try_cpp LINENO
2466# ----------------------
2467# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2468ac_fn_c_try_cpp ()
2469{
2470  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2471  if { { ac_try="$ac_cpp conftest.$ac_ext"
2472case "(($ac_try" in
2473  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2474  *) ac_try_echo=$ac_try;;
2475esac
2476eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2477$as_echo "$ac_try_echo"; } >&5
2478  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2479  ac_status=$?
2480  if test -s conftest.err; then
2481    grep -v '^ *+' conftest.err >conftest.er1
2482    cat conftest.er1 >&5
2483    mv -f conftest.er1 conftest.err
2484  fi
2485  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2486  test $ac_status = 0; } > conftest.i && {
2487	 test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" ||
2488	 test ! -s conftest.err
2489       }; then :
2490  ac_retval=0
2491else
2492  $as_echo "$as_me: failed program was:" >&5
2493sed 's/^/| /' conftest.$ac_ext >&5
2494
2495    ac_retval=1
2496fi
2497  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2498  as_fn_set_status $ac_retval
2499
2500} # ac_fn_c_try_cpp
2501
2502# ac_fn_cxx_try_cpp LINENO
2503# ------------------------
2504# Try to preprocess conftest.$ac_ext, and return whether this succeeded.
2505ac_fn_cxx_try_cpp ()
2506{
2507  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2508  if { { ac_try="$ac_cpp conftest.$ac_ext"
2509case "(($ac_try" in
2510  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2511  *) ac_try_echo=$ac_try;;
2512esac
2513eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2514$as_echo "$ac_try_echo"; } >&5
2515  (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err
2516  ac_status=$?
2517  if test -s conftest.err; then
2518    grep -v '^ *+' conftest.err >conftest.er1
2519    cat conftest.er1 >&5
2520    mv -f conftest.er1 conftest.err
2521  fi
2522  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2523  test $ac_status = 0; } > conftest.i && {
2524	 test -z "$ac_cxx_preproc_warn_flag$ac_cxx_werror_flag" ||
2525	 test ! -s conftest.err
2526       }; then :
2527  ac_retval=0
2528else
2529  $as_echo "$as_me: failed program was:" >&5
2530sed 's/^/| /' conftest.$ac_ext >&5
2531
2532    ac_retval=1
2533fi
2534  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2535  as_fn_set_status $ac_retval
2536
2537} # ac_fn_cxx_try_cpp
2538
2539# ac_fn_c_try_link LINENO
2540# -----------------------
2541# Try to link conftest.$ac_ext, and return whether this succeeded.
2542ac_fn_c_try_link ()
2543{
2544  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2545  rm -f conftest.$ac_objext conftest$ac_exeext
2546  if { { ac_try="$ac_link"
2547case "(($ac_try" in
2548  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2549  *) ac_try_echo=$ac_try;;
2550esac
2551eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2552$as_echo "$ac_try_echo"; } >&5
2553  (eval "$ac_link") 2>conftest.err
2554  ac_status=$?
2555  if test -s conftest.err; then
2556    grep -v '^ *+' conftest.err >conftest.er1
2557    cat conftest.er1 >&5
2558    mv -f conftest.er1 conftest.err
2559  fi
2560  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2561  test $ac_status = 0; } && {
2562	 test -z "$ac_c_werror_flag" ||
2563	 test ! -s conftest.err
2564       } && test -s conftest$ac_exeext && {
2565	 test "$cross_compiling" = yes ||
2566	 test -x conftest$ac_exeext
2567       }; then :
2568  ac_retval=0
2569else
2570  $as_echo "$as_me: failed program was:" >&5
2571sed 's/^/| /' conftest.$ac_ext >&5
2572
2573	ac_retval=1
2574fi
2575  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2576  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2577  # interfere with the next link command; also delete a directory that is
2578  # left behind by Apple's compiler.  We do this before executing the actions.
2579  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2580  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2581  as_fn_set_status $ac_retval
2582
2583} # ac_fn_c_try_link
2584
2585# ac_fn_cxx_check_header_mongrel LINENO HEADER VAR INCLUDES
2586# ---------------------------------------------------------
2587# Tests whether HEADER exists, giving a warning if it cannot be compiled using
2588# the include files in INCLUDES and setting the cache variable VAR
2589# accordingly.
2590ac_fn_cxx_check_header_mongrel ()
2591{
2592  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2593  if eval \${$3+:} false; then :
2594  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2595$as_echo_n "checking for $2... " >&6; }
2596if eval \${$3+:} false; then :
2597  $as_echo_n "(cached) " >&6
2598fi
2599eval ac_res=\$$3
2600	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2601$as_echo "$ac_res" >&6; }
2602else
2603  # Is the header compilable?
2604{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5
2605$as_echo_n "checking $2 usability... " >&6; }
2606cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2607/* end confdefs.h.  */
2608$4
2609#include <$2>
2610_ACEOF
2611if ac_fn_cxx_try_compile "$LINENO"; then :
2612  ac_header_compiler=yes
2613else
2614  ac_header_compiler=no
2615fi
2616rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2617{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5
2618$as_echo "$ac_header_compiler" >&6; }
2619
2620# Is the header present?
2621{ $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5
2622$as_echo_n "checking $2 presence... " >&6; }
2623cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2624/* end confdefs.h.  */
2625#include <$2>
2626_ACEOF
2627if ac_fn_cxx_try_cpp "$LINENO"; then :
2628  ac_header_preproc=yes
2629else
2630  ac_header_preproc=no
2631fi
2632rm -f conftest.err conftest.i conftest.$ac_ext
2633{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5
2634$as_echo "$ac_header_preproc" >&6; }
2635
2636# So?  What about this header?
2637case $ac_header_compiler:$ac_header_preproc:$ac_cxx_preproc_warn_flag in #((
2638  yes:no: )
2639    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5
2640$as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;}
2641    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2642$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2643    ;;
2644  no:yes:* )
2645    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5
2646$as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;}
2647    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     check for missing prerequisite headers?" >&5
2648$as_echo "$as_me: WARNING: $2:     check for missing prerequisite headers?" >&2;}
2649    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5
2650$as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;}
2651    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&5
2652$as_echo "$as_me: WARNING: $2:     section \"Present But Cannot Be Compiled\"" >&2;}
2653    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5
2654$as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;}
2655( $as_echo "## ----------------------------------------- ##
2656## Report this to build-dev@openjdk.java.net ##
2657## ----------------------------------------- ##"
2658     ) | sed "s/^/$as_me: WARNING:     /" >&2
2659    ;;
2660esac
2661  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2662$as_echo_n "checking for $2... " >&6; }
2663if eval \${$3+:} false; then :
2664  $as_echo_n "(cached) " >&6
2665else
2666  eval "$3=\$ac_header_compiler"
2667fi
2668eval ac_res=\$$3
2669	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2670$as_echo "$ac_res" >&6; }
2671fi
2672  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2673
2674} # ac_fn_cxx_check_header_mongrel
2675
2676# ac_fn_cxx_try_run LINENO
2677# ------------------------
2678# Try to link conftest.$ac_ext, and return whether this succeeded. Assumes
2679# that executables *can* be run.
2680ac_fn_cxx_try_run ()
2681{
2682  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2683  if { { ac_try="$ac_link"
2684case "(($ac_try" in
2685  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2686  *) ac_try_echo=$ac_try;;
2687esac
2688eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2689$as_echo "$ac_try_echo"; } >&5
2690  (eval "$ac_link") 2>&5
2691  ac_status=$?
2692  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2693  test $ac_status = 0; } && { ac_try='./conftest$ac_exeext'
2694  { { case "(($ac_try" in
2695  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2696  *) ac_try_echo=$ac_try;;
2697esac
2698eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2699$as_echo "$ac_try_echo"; } >&5
2700  (eval "$ac_try") 2>&5
2701  ac_status=$?
2702  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2703  test $ac_status = 0; }; }; then :
2704  ac_retval=0
2705else
2706  $as_echo "$as_me: program exited with status $ac_status" >&5
2707       $as_echo "$as_me: failed program was:" >&5
2708sed 's/^/| /' conftest.$ac_ext >&5
2709
2710       ac_retval=$ac_status
2711fi
2712  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2713  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2714  as_fn_set_status $ac_retval
2715
2716} # ac_fn_cxx_try_run
2717
2718# ac_fn_cxx_check_header_compile LINENO HEADER VAR INCLUDES
2719# ---------------------------------------------------------
2720# Tests whether HEADER exists and can be compiled using the include files in
2721# INCLUDES, setting the cache variable VAR accordingly.
2722ac_fn_cxx_check_header_compile ()
2723{
2724  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2725  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2726$as_echo_n "checking for $2... " >&6; }
2727if eval \${$3+:} false; then :
2728  $as_echo_n "(cached) " >&6
2729else
2730  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2731/* end confdefs.h.  */
2732$4
2733#include <$2>
2734_ACEOF
2735if ac_fn_cxx_try_compile "$LINENO"; then :
2736  eval "$3=yes"
2737else
2738  eval "$3=no"
2739fi
2740rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2741fi
2742eval ac_res=\$$3
2743	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
2744$as_echo "$ac_res" >&6; }
2745  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2746
2747} # ac_fn_cxx_check_header_compile
2748
2749# ac_fn_cxx_compute_int LINENO EXPR VAR INCLUDES
2750# ----------------------------------------------
2751# Tries to find the compile-time value of EXPR in a program that includes
2752# INCLUDES, setting VAR accordingly. Returns whether the value could be
2753# computed
2754ac_fn_cxx_compute_int ()
2755{
2756  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2757  if test "$cross_compiling" = yes; then
2758    # Depending upon the size, compute the lo and hi bounds.
2759cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2760/* end confdefs.h.  */
2761$4
2762int
2763main ()
2764{
2765static int test_array [1 - 2 * !(($2) >= 0)];
2766test_array [0] = 0;
2767return test_array [0];
2768
2769  ;
2770  return 0;
2771}
2772_ACEOF
2773if ac_fn_cxx_try_compile "$LINENO"; then :
2774  ac_lo=0 ac_mid=0
2775  while :; do
2776    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2777/* end confdefs.h.  */
2778$4
2779int
2780main ()
2781{
2782static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2783test_array [0] = 0;
2784return test_array [0];
2785
2786  ;
2787  return 0;
2788}
2789_ACEOF
2790if ac_fn_cxx_try_compile "$LINENO"; then :
2791  ac_hi=$ac_mid; break
2792else
2793  as_fn_arith $ac_mid + 1 && ac_lo=$as_val
2794			if test $ac_lo -le $ac_mid; then
2795			  ac_lo= ac_hi=
2796			  break
2797			fi
2798			as_fn_arith 2 '*' $ac_mid + 1 && ac_mid=$as_val
2799fi
2800rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2801  done
2802else
2803  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2804/* end confdefs.h.  */
2805$4
2806int
2807main ()
2808{
2809static int test_array [1 - 2 * !(($2) < 0)];
2810test_array [0] = 0;
2811return test_array [0];
2812
2813  ;
2814  return 0;
2815}
2816_ACEOF
2817if ac_fn_cxx_try_compile "$LINENO"; then :
2818  ac_hi=-1 ac_mid=-1
2819  while :; do
2820    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2821/* end confdefs.h.  */
2822$4
2823int
2824main ()
2825{
2826static int test_array [1 - 2 * !(($2) >= $ac_mid)];
2827test_array [0] = 0;
2828return test_array [0];
2829
2830  ;
2831  return 0;
2832}
2833_ACEOF
2834if ac_fn_cxx_try_compile "$LINENO"; then :
2835  ac_lo=$ac_mid; break
2836else
2837  as_fn_arith '(' $ac_mid ')' - 1 && ac_hi=$as_val
2838			if test $ac_mid -le $ac_hi; then
2839			  ac_lo= ac_hi=
2840			  break
2841			fi
2842			as_fn_arith 2 '*' $ac_mid && ac_mid=$as_val
2843fi
2844rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2845  done
2846else
2847  ac_lo= ac_hi=
2848fi
2849rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2850fi
2851rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2852# Binary search between lo and hi bounds.
2853while test "x$ac_lo" != "x$ac_hi"; do
2854  as_fn_arith '(' $ac_hi - $ac_lo ')' / 2 + $ac_lo && ac_mid=$as_val
2855  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2856/* end confdefs.h.  */
2857$4
2858int
2859main ()
2860{
2861static int test_array [1 - 2 * !(($2) <= $ac_mid)];
2862test_array [0] = 0;
2863return test_array [0];
2864
2865  ;
2866  return 0;
2867}
2868_ACEOF
2869if ac_fn_cxx_try_compile "$LINENO"; then :
2870  ac_hi=$ac_mid
2871else
2872  as_fn_arith '(' $ac_mid ')' + 1 && ac_lo=$as_val
2873fi
2874rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
2875done
2876case $ac_lo in #((
2877?*) eval "$3=\$ac_lo"; ac_retval=0 ;;
2878'') ac_retval=1 ;;
2879esac
2880  else
2881    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2882/* end confdefs.h.  */
2883$4
2884static long int longval () { return $2; }
2885static unsigned long int ulongval () { return $2; }
2886#include <stdio.h>
2887#include <stdlib.h>
2888int
2889main ()
2890{
2891
2892  FILE *f = fopen ("conftest.val", "w");
2893  if (! f)
2894    return 1;
2895  if (($2) < 0)
2896    {
2897      long int i = longval ();
2898      if (i != ($2))
2899	return 1;
2900      fprintf (f, "%ld", i);
2901    }
2902  else
2903    {
2904      unsigned long int i = ulongval ();
2905      if (i != ($2))
2906	return 1;
2907      fprintf (f, "%lu", i);
2908    }
2909  /* Do not output a trailing newline, as this causes \r\n confusion
2910     on some platforms.  */
2911  return ferror (f) || fclose (f) != 0;
2912
2913  ;
2914  return 0;
2915}
2916_ACEOF
2917if ac_fn_cxx_try_run "$LINENO"; then :
2918  echo >>conftest.val; read $3 <conftest.val; ac_retval=0
2919else
2920  ac_retval=1
2921fi
2922rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
2923  conftest.$ac_objext conftest.beam conftest.$ac_ext
2924rm -f conftest.val
2925
2926  fi
2927  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2928  as_fn_set_status $ac_retval
2929
2930} # ac_fn_cxx_compute_int
2931
2932# ac_fn_cxx_try_link LINENO
2933# -------------------------
2934# Try to link conftest.$ac_ext, and return whether this succeeded.
2935ac_fn_cxx_try_link ()
2936{
2937  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2938  rm -f conftest.$ac_objext conftest$ac_exeext
2939  if { { ac_try="$ac_link"
2940case "(($ac_try" in
2941  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
2942  *) ac_try_echo=$ac_try;;
2943esac
2944eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
2945$as_echo "$ac_try_echo"; } >&5
2946  (eval "$ac_link") 2>conftest.err
2947  ac_status=$?
2948  if test -s conftest.err; then
2949    grep -v '^ *+' conftest.err >conftest.er1
2950    cat conftest.er1 >&5
2951    mv -f conftest.er1 conftest.err
2952  fi
2953  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
2954  test $ac_status = 0; } && {
2955	 test -z "$ac_cxx_werror_flag" ||
2956	 test ! -s conftest.err
2957       } && test -s conftest$ac_exeext && {
2958	 test "$cross_compiling" = yes ||
2959	 test -x conftest$ac_exeext
2960       }; then :
2961  ac_retval=0
2962else
2963  $as_echo "$as_me: failed program was:" >&5
2964sed 's/^/| /' conftest.$ac_ext >&5
2965
2966	ac_retval=1
2967fi
2968  # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information
2969  # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would
2970  # interfere with the next link command; also delete a directory that is
2971  # left behind by Apple's compiler.  We do this before executing the actions.
2972  rm -rf conftest.dSYM conftest_ipa8_conftest.oo
2973  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
2974  as_fn_set_status $ac_retval
2975
2976} # ac_fn_cxx_try_link
2977
2978# ac_fn_cxx_check_func LINENO FUNC VAR
2979# ------------------------------------
2980# Tests whether FUNC exists, setting the cache variable VAR accordingly
2981ac_fn_cxx_check_func ()
2982{
2983  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
2984  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
2985$as_echo_n "checking for $2... " >&6; }
2986if eval \${$3+:} false; then :
2987  $as_echo_n "(cached) " >&6
2988else
2989  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
2990/* end confdefs.h.  */
2991/* Define $2 to an innocuous variant, in case <limits.h> declares $2.
2992   For example, HP-UX 11i <limits.h> declares gettimeofday.  */
2993#define $2 innocuous_$2
2994
2995/* System header to define __stub macros and hopefully few prototypes,
2996    which can conflict with char $2 (); below.
2997    Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
2998    <limits.h> exists even on freestanding compilers.  */
2999
3000#ifdef __STDC__
3001# include <limits.h>
3002#else
3003# include <assert.h>
3004#endif
3005
3006#undef $2
3007
3008/* Override any GCC internal prototype to avoid an error.
3009   Use char because int might match the return type of a GCC
3010   builtin and then its argument prototype would still apply.  */
3011#ifdef __cplusplus
3012extern "C"
3013#endif
3014char $2 ();
3015/* The GNU C library defines this for functions which it implements
3016    to always fail with ENOSYS.  Some functions are actually named
3017    something starting with __ and the normal name is an alias.  */
3018#if defined __stub_$2 || defined __stub___$2
3019choke me
3020#endif
3021
3022int
3023main ()
3024{
3025return $2 ();
3026  ;
3027  return 0;
3028}
3029_ACEOF
3030if ac_fn_cxx_try_link "$LINENO"; then :
3031  eval "$3=yes"
3032else
3033  eval "$3=no"
3034fi
3035rm -f core conftest.err conftest.$ac_objext \
3036    conftest$ac_exeext conftest.$ac_ext
3037fi
3038eval ac_res=\$$3
3039	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3040$as_echo "$ac_res" >&6; }
3041  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3042
3043} # ac_fn_cxx_check_func
3044
3045# ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES
3046# -------------------------------------------------------
3047# Tests whether HEADER exists and can be compiled using the include files in
3048# INCLUDES, setting the cache variable VAR accordingly.
3049ac_fn_c_check_header_compile ()
3050{
3051  as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
3052  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5
3053$as_echo_n "checking for $2... " >&6; }
3054if eval \${$3+:} false; then :
3055  $as_echo_n "(cached) " >&6
3056else
3057  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
3058/* end confdefs.h.  */
3059$4
3060#include <$2>
3061_ACEOF
3062if ac_fn_c_try_compile "$LINENO"; then :
3063  eval "$3=yes"
3064else
3065  eval "$3=no"
3066fi
3067rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
3068fi
3069eval ac_res=\$$3
3070	       { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5
3071$as_echo "$ac_res" >&6; }
3072  eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno
3073
3074} # ac_fn_c_check_header_compile
3075cat >config.log <<_ACEOF
3076This file contains any messages produced by compilers while
3077running configure, to aid debugging if configure makes a mistake.
3078
3079It was created by OpenJDK $as_me jdk9, which was
3080generated by GNU Autoconf 2.69.  Invocation command line was
3081
3082  $ $0 $@
3083
3084_ACEOF
3085exec 5>>config.log
3086{
3087cat <<_ASUNAME
3088## --------- ##
3089## Platform. ##
3090## --------- ##
3091
3092hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
3093uname -m = `(uname -m) 2>/dev/null || echo unknown`
3094uname -r = `(uname -r) 2>/dev/null || echo unknown`
3095uname -s = `(uname -s) 2>/dev/null || echo unknown`
3096uname -v = `(uname -v) 2>/dev/null || echo unknown`
3097
3098/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
3099/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
3100
3101/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
3102/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
3103/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
3104/usr/bin/hostinfo      = `(/usr/bin/hostinfo) 2>/dev/null      || echo unknown`
3105/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
3106/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
3107/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
3108
3109_ASUNAME
3110
3111as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
3112for as_dir in $PATH
3113do
3114  IFS=$as_save_IFS
3115  test -z "$as_dir" && as_dir=.
3116    $as_echo "PATH: $as_dir"
3117  done
3118IFS=$as_save_IFS
3119
3120} >&5
3121
3122cat >&5 <<_ACEOF
3123
3124
3125## ----------- ##
3126## Core tests. ##
3127## ----------- ##
3128
3129_ACEOF
3130
3131
3132# Keep a trace of the command line.
3133# Strip out --no-create and --no-recursion so they do not pile up.
3134# Strip out --silent because we don't want to record it for future runs.
3135# Also quote any args containing shell meta-characters.
3136# Make two passes to allow for proper duplicate-argument suppression.
3137ac_configure_args=
3138ac_configure_args0=
3139ac_configure_args1=
3140ac_must_keep_next=false
3141for ac_pass in 1 2
3142do
3143  for ac_arg
3144  do
3145    case $ac_arg in
3146    -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;;
3147    -q | -quiet | --quiet | --quie | --qui | --qu | --q \
3148    | -silent | --silent | --silen | --sile | --sil)
3149      continue ;;
3150    *\'*)
3151      ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
3152    esac
3153    case $ac_pass in
3154    1) as_fn_append ac_configure_args0 " '$ac_arg'" ;;
3155    2)
3156      as_fn_append ac_configure_args1 " '$ac_arg'"
3157      if test $ac_must_keep_next = true; then
3158	ac_must_keep_next=false # Got value, back to normal.
3159      else
3160	case $ac_arg in
3161	  *=* | --config-cache | -C | -disable-* | --disable-* \
3162	  | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \
3163	  | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \
3164	  | -with-* | --with-* | -without-* | --without-* | --x)
3165	    case "$ac_configure_args0 " in
3166	      "$ac_configure_args1"*" '$ac_arg' "* ) continue ;;
3167	    esac
3168	    ;;
3169	  -* ) ac_must_keep_next=true ;;
3170	esac
3171      fi
3172      as_fn_append ac_configure_args " '$ac_arg'"
3173      ;;
3174    esac
3175  done
3176done
3177{ ac_configure_args0=; unset ac_configure_args0;}
3178{ ac_configure_args1=; unset ac_configure_args1;}
3179
3180# When interrupted or exit'd, cleanup temporary files, and complete
3181# config.log.  We remove comments because anyway the quotes in there
3182# would cause problems or look ugly.
3183# WARNING: Use '\'' to represent an apostrophe within the trap.
3184# WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug.
3185trap 'exit_status=$?
3186  # Save into config.log some information that might help in debugging.
3187  {
3188    echo
3189
3190    $as_echo "## ---------------- ##
3191## Cache variables. ##
3192## ---------------- ##"
3193    echo
3194    # The following way of writing the cache mishandles newlines in values,
3195(
3196  for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do
3197    eval ac_val=\$$ac_var
3198    case $ac_val in #(
3199    *${as_nl}*)
3200      case $ac_var in #(
3201      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
3202$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
3203      esac
3204      case $ac_var in #(
3205      _ | IFS | as_nl) ;; #(
3206      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
3207      *) { eval $ac_var=; unset $ac_var;} ;;
3208      esac ;;
3209    esac
3210  done
3211  (set) 2>&1 |
3212    case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #(
3213    *${as_nl}ac_space=\ *)
3214      sed -n \
3215	"s/'\''/'\''\\\\'\'''\''/g;
3216	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p"
3217      ;; #(
3218    *)
3219      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
3220      ;;
3221    esac |
3222    sort
3223)
3224    echo
3225
3226    $as_echo "## ----------------- ##
3227## Output variables. ##
3228## ----------------- ##"
3229    echo
3230    for ac_var in $ac_subst_vars
3231    do
3232      eval ac_val=\$$ac_var
3233      case $ac_val in
3234      *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3235      esac
3236      $as_echo "$ac_var='\''$ac_val'\''"
3237    done | sort
3238    echo
3239
3240    if test -n "$ac_subst_files"; then
3241      $as_echo "## ------------------- ##
3242## File substitutions. ##
3243## ------------------- ##"
3244      echo
3245      for ac_var in $ac_subst_files
3246      do
3247	eval ac_val=\$$ac_var
3248	case $ac_val in
3249	*\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;;
3250	esac
3251	$as_echo "$ac_var='\''$ac_val'\''"
3252      done | sort
3253      echo
3254    fi
3255
3256    if test -s confdefs.h; then
3257      $as_echo "## ----------- ##
3258## confdefs.h. ##
3259## ----------- ##"
3260      echo
3261      cat confdefs.h
3262      echo
3263    fi
3264    test "$ac_signal" != 0 &&
3265      $as_echo "$as_me: caught signal $ac_signal"
3266    $as_echo "$as_me: exit $exit_status"
3267  } >&5
3268  rm -f core *.core core.conftest.* &&
3269    rm -f -r conftest* confdefs* conf$$* $ac_clean_files &&
3270    exit $exit_status
3271' 0
3272for ac_signal in 1 2 13 15; do
3273  trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal
3274done
3275ac_signal=0
3276
3277# confdefs.h avoids OS command line length limits that DEFS can exceed.
3278rm -f -r conftest* confdefs.h
3279
3280$as_echo "/* confdefs.h */" > confdefs.h
3281
3282# Predefined preprocessor variables.
3283
3284cat >>confdefs.h <<_ACEOF
3285#define PACKAGE_NAME "$PACKAGE_NAME"
3286_ACEOF
3287
3288cat >>confdefs.h <<_ACEOF
3289#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
3290_ACEOF
3291
3292cat >>confdefs.h <<_ACEOF
3293#define PACKAGE_VERSION "$PACKAGE_VERSION"
3294_ACEOF
3295
3296cat >>confdefs.h <<_ACEOF
3297#define PACKAGE_STRING "$PACKAGE_STRING"
3298_ACEOF
3299
3300cat >>confdefs.h <<_ACEOF
3301#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
3302_ACEOF
3303
3304cat >>confdefs.h <<_ACEOF
3305#define PACKAGE_URL "$PACKAGE_URL"
3306_ACEOF
3307
3308
3309# Let the site file select an alternate cache file if it wants to.
3310# Prefer an explicitly selected file to automatically selected ones.
3311ac_site_file1=NONE
3312ac_site_file2=NONE
3313if test -n "$CONFIG_SITE"; then
3314  # We do not want a PATH search for config.site.
3315  case $CONFIG_SITE in #((
3316    -*)  ac_site_file1=./$CONFIG_SITE;;
3317    */*) ac_site_file1=$CONFIG_SITE;;
3318    *)   ac_site_file1=./$CONFIG_SITE;;
3319  esac
3320elif test "x$prefix" != xNONE; then
3321  ac_site_file1=$prefix/share/config.site
3322  ac_site_file2=$prefix/etc/config.site
3323else
3324  ac_site_file1=$ac_default_prefix/share/config.site
3325  ac_site_file2=$ac_default_prefix/etc/config.site
3326fi
3327for ac_site_file in "$ac_site_file1" "$ac_site_file2"
3328do
3329  test "x$ac_site_file" = xNONE && continue
3330  if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then
3331    { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5
3332$as_echo "$as_me: loading site script $ac_site_file" >&6;}
3333    sed 's/^/| /' "$ac_site_file" >&5
3334    . "$ac_site_file" \
3335      || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3336$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3337as_fn_error $? "failed to load site script $ac_site_file
3338See \`config.log' for more details" "$LINENO" 5; }
3339  fi
3340done
3341
3342if test -r "$cache_file"; then
3343  # Some versions of bash will fail to source /dev/null (special files
3344  # actually), so we avoid doing that.  DJGPP emulates it as a regular file.
3345  if test /dev/null != "$cache_file" && test -f "$cache_file"; then
3346    { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5
3347$as_echo "$as_me: loading cache $cache_file" >&6;}
3348    case $cache_file in
3349      [\\/]* | ?:[\\/]* ) . "$cache_file";;
3350      *)                      . "./$cache_file";;
3351    esac
3352  fi
3353else
3354  { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5
3355$as_echo "$as_me: creating cache $cache_file" >&6;}
3356  >$cache_file
3357fi
3358
3359# Check that the precious variables saved in the cache have kept the same
3360# value.
3361ac_cache_corrupted=false
3362for ac_var in $ac_precious_vars; do
3363  eval ac_old_set=\$ac_cv_env_${ac_var}_set
3364  eval ac_new_set=\$ac_env_${ac_var}_set
3365  eval ac_old_val=\$ac_cv_env_${ac_var}_value
3366  eval ac_new_val=\$ac_env_${ac_var}_value
3367  case $ac_old_set,$ac_new_set in
3368    set,)
3369      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
3370$as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
3371      ac_cache_corrupted=: ;;
3372    ,set)
3373      { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5
3374$as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
3375      ac_cache_corrupted=: ;;
3376    ,);;
3377    *)
3378      if test "x$ac_old_val" != "x$ac_new_val"; then
3379	# differences in whitespace do not lead to failure.
3380	ac_old_val_w=`echo x $ac_old_val`
3381	ac_new_val_w=`echo x $ac_new_val`
3382	if test "$ac_old_val_w" != "$ac_new_val_w"; then
3383	  { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5
3384$as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
3385	  ac_cache_corrupted=:
3386	else
3387	  { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5
3388$as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;}
3389	  eval $ac_var=\$ac_old_val
3390	fi
3391	{ $as_echo "$as_me:${as_lineno-$LINENO}:   former value:  \`$ac_old_val'" >&5
3392$as_echo "$as_me:   former value:  \`$ac_old_val'" >&2;}
3393	{ $as_echo "$as_me:${as_lineno-$LINENO}:   current value: \`$ac_new_val'" >&5
3394$as_echo "$as_me:   current value: \`$ac_new_val'" >&2;}
3395      fi;;
3396  esac
3397  # Pass precious variables to config.status.
3398  if test "$ac_new_set" = set; then
3399    case $ac_new_val in
3400    *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
3401    *) ac_arg=$ac_var=$ac_new_val ;;
3402    esac
3403    case " $ac_configure_args " in
3404      *" '$ac_arg' "*) ;; # Avoid dups.  Use of quotes ensures accuracy.
3405      *) as_fn_append ac_configure_args " '$ac_arg'" ;;
3406    esac
3407  fi
3408done
3409if $ac_cache_corrupted; then
3410  { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
3411$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
3412  { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5
3413$as_echo "$as_me: error: changes in the environment can compromise the build" >&2;}
3414  as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5
3415fi
3416## -------------------- ##
3417## Main body of script. ##
3418## -------------------- ##
3419
3420ac_ext=c
3421ac_cpp='$CPP $CPPFLAGS'
3422ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
3423ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
3424ac_compiler_gnu=$ac_cv_c_compiler_gnu
3425
3426
3427
3428ac_aux_dir=
3429for ac_dir in $TOPDIR/common/autoconf/build-aux "$srcdir"/$TOPDIR/common/autoconf/build-aux; do
3430  if test -f "$ac_dir/install-sh"; then
3431    ac_aux_dir=$ac_dir
3432    ac_install_sh="$ac_aux_dir/install-sh -c"
3433    break
3434  elif 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/shtool"; then
3439    ac_aux_dir=$ac_dir
3440    ac_install_sh="$ac_aux_dir/shtool install -c"
3441    break
3442  fi
3443done
3444if test -z "$ac_aux_dir"; then
3445  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
3446fi
3447
3448# These three variables are undocumented and unsupported,
3449# and are intended to be withdrawn in a future Autoconf release.
3450# They can cause serious problems if a builder's source tree is in a directory
3451# whose full name contains unusual characters.
3452ac_config_guess="$SHELL $ac_aux_dir/config.guess"  # Please don't use this var.
3453ac_config_sub="$SHELL $ac_aux_dir/config.sub"  # Please don't use this var.
3454ac_configure="$SHELL $ac_aux_dir/configure"  # Please don't use this var.
3455
3456
3457# pkg.m4 - Macros to locate and utilise pkg-config.            -*- Autoconf -*-
3458
3459#
3460# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
3461# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3462#
3463# This code is free software; you can redistribute it and/or modify it
3464# under the terms of the GNU General Public License version 2 only, as
3465# published by the Free Software Foundation.  Oracle designates this
3466# particular file as subject to the "Classpath" exception as provided
3467# by Oracle in the LICENSE file that accompanied this code.
3468#
3469# This code is distributed in the hope that it will be useful, but WITHOUT
3470# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3471# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3472# version 2 for more details (a copy is included in the LICENSE file that
3473# accompanied this code).
3474#
3475# You should have received a copy of the GNU General Public License version
3476# 2 along with this work; if not, write to the Free Software Foundation,
3477# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3478#
3479# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3480# or visit www.oracle.com if you need additional information or have any
3481# questions.
3482#
3483
3484#
3485# Copyright �� 2004 Scott James Remnant <scott@netsplit.com>.
3486#
3487# This program is free software; you can redistribute it and/or modify
3488# it under the terms of the GNU General Public License as published by
3489# the Free Software Foundation; either version 2 of the License, or
3490# (at your option) any later version.
3491#
3492# This program is distributed in the hope that it will be useful, but
3493# WITHOUT ANY WARRANTY; without even the implied warranty of
3494# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
3495# General Public License for more details.
3496#
3497# You should have received a copy of the GNU General Public License
3498# along with this program; if not, write to the Free Software
3499# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3500#
3501# As a special exception to the GNU General Public License, if you
3502# distribute this file as part of a program that contains a
3503# configuration script generated by Autoconf, you may include it under
3504# the same distribution terms that you use for the rest of that program.
3505
3506# PKG_PROG_PKG_CONFIG([MIN-VERSION])
3507# ----------------------------------
3508# PKG_PROG_PKG_CONFIG
3509
3510# PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND])
3511#
3512# Check to see whether a particular set of modules exists.  Similar
3513# to PKG_CHECK_MODULES(), but does not set variables or print errors.
3514#
3515#
3516# Similar to PKG_CHECK_MODULES, make sure that the first instance of
3517# this or PKG_CHECK_MODULES is called, or make sure to call
3518# PKG_CHECK_EXISTS manually
3519# --------------------------------------------------------------
3520
3521
3522
3523# _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES])
3524# ---------------------------------------------
3525# _PKG_CONFIG
3526
3527# _PKG_SHORT_ERRORS_SUPPORTED
3528# -----------------------------
3529# _PKG_SHORT_ERRORS_SUPPORTED
3530
3531
3532# PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND],
3533# [ACTION-IF-NOT-FOUND])
3534#
3535#
3536# Note that if there is a possibility the first call to
3537# PKG_CHECK_MODULES might not happen, you should be sure to include an
3538# explicit call to PKG_PROG_PKG_CONFIG in your configure.ac
3539#
3540#
3541# --------------------------------------------------------------
3542# PKG_CHECK_MODULES
3543
3544
3545# Include these first...
3546#
3547# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3548# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3549#
3550# This code is free software; you can redistribute it and/or modify it
3551# under the terms of the GNU General Public License version 2 only, as
3552# published by the Free Software Foundation.  Oracle designates this
3553# particular file as subject to the "Classpath" exception as provided
3554# by Oracle in the LICENSE file that accompanied this code.
3555#
3556# This code is distributed in the hope that it will be useful, but WITHOUT
3557# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3558# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3559# version 2 for more details (a copy is included in the LICENSE file that
3560# accompanied this code).
3561#
3562# You should have received a copy of the GNU General Public License version
3563# 2 along with this work; if not, write to the Free Software Foundation,
3564# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3565#
3566# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3567# or visit www.oracle.com if you need additional information or have any
3568# questions.
3569#
3570
3571# Create a function/macro that takes a series of named arguments. The call is
3572# similar to AC_DEFUN, but the setup of the function looks like this:
3573# BASIC_DEFUN_NAMED([MYFUNC], [FOO *BAR], [$@], [
3574# ... do something
3575#   AC_MSG_NOTICE([Value of BAR is ARG_BAR])
3576# ])
3577# A star (*) in front of a named argument means that it is required and it's
3578# presence will be verified. To pass e.g. the first value as a normal indexed
3579# argument, use [m4_shift($@)] as the third argument instead of [$@]. These
3580# arguments are referenced in the function by their name prefixed by ARG_, e.g.
3581# "ARG_FOO".
3582#
3583# The generated function can be called like this:
3584# MYFUNC(FOO: [foo-val],
3585#     BAR: [
3586#         $ECHO hello world
3587#     ])
3588# Note that the argument value must start on the same line as the argument name.
3589#
3590# Argument 1: Name of the function to define
3591# Argument 2: List of legal named arguments, with a * prefix for required arguments
3592# Argument 3: Argument array to treat as named, typically $@
3593# Argument 4: The main function body
3594
3595
3596# Test if $1 is a valid argument to $3 (often is $JAVA passed as $3)
3597# If so, then append $1 to $2 \
3598# Also set JVM_ARG_OK to true/false depending on outcome.
3599
3600
3601# Appends a string to a path variable, only adding the : when needed.
3602
3603
3604# Prepends a string to a path variable, only adding the : when needed.
3605
3606
3607# This will make sure the given variable points to a full and proper
3608# path. This means:
3609# 1) There will be no spaces in the path. On unix platforms,
3610#    spaces in the path will result in an error. On Windows,
3611#    the path will be rewritten using short-style to be space-free.
3612# 2) The path will be absolute, and it will be in unix-style (on
3613#     cygwin).
3614# $1: The name of the variable to fix
3615
3616
3617# This will make sure the given variable points to a executable
3618# with a full and proper path. This means:
3619# 1) There will be no spaces in the path. On unix platforms,
3620#    spaces in the path will result in an error. On Windows,
3621#    the path will be rewritten using short-style to be space-free.
3622# 2) The path will be absolute, and it will be in unix-style (on
3623#     cygwin).
3624# Any arguments given to the executable is preserved.
3625# If the input variable does not have a directory specification, then
3626# it need to be in the PATH.
3627# $1: The name of the variable to fix
3628
3629
3630
3631
3632# Register a --with argument but mark it as deprecated
3633# $1: The name of the with argument to deprecate, not including --with-
3634
3635
3636# Register a --enable argument but mark it as deprecated
3637# $1: The name of the with argument to deprecate, not including --enable-
3638# $2: The name of the argument to deprecate, in shell variable style (i.e. with _ instead of -)
3639# $3: Messages to user.
3640
3641
3642
3643
3644# Test that variable $1 denoting a program is not empty. If empty, exit with an error.
3645# $1: variable to check
3646
3647
3648# Check that there are no unprocessed overridden variables left.
3649# If so, they are an incorrect argument and we will exit with an error.
3650
3651
3652# Setup a tool for the given variable. If correctly specified by the user,
3653# use that value, otherwise search for the tool using the supplied code snippet.
3654# $1: variable to set
3655# $2: code snippet to call to look for the tool
3656# $3: code snippet to call if variable was used to find tool
3657
3658
3659# Call BASIC_SETUP_TOOL with AC_PATH_PROGS to locate the tool
3660# $1: variable to set
3661# $2: executable name (or list of names) to look for
3662
3663
3664# Call BASIC_SETUP_TOOL with AC_CHECK_TOOLS to locate the tool
3665# $1: variable to set
3666# $2: executable name (or list of names) to look for
3667
3668
3669# Like BASIC_PATH_PROGS but fails if no tool was found.
3670# $1: variable to set
3671# $2: executable name (or list of names) to look for
3672
3673
3674# Like BASIC_SETUP_TOOL but fails if no tool was found.
3675# $1: variable to set
3676# $2: autoconf macro to call to look for the special tool
3677
3678
3679# Setup the most fundamental tools that relies on not much else to set up,
3680# but is used by much of the early bootstrap code.
3681
3682
3683# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3684
3685
3686# Evaluates platform specific overrides for devkit variables.
3687# $1: Name of variable
3688
3689
3690
3691
3692
3693
3694#%%% Simple tools %%%
3695
3696# Check if we have found a usable version of make
3697# $1: the path to a potential make binary (or empty)
3698# $2: the description on how we found this
3699
3700
3701
3702
3703# Goes looking for a usable version of GNU make.
3704
3705
3706
3707
3708
3709
3710# Check if build directory is on local disk. If not possible to determine,
3711# we prefer to claim it's local.
3712# Argument 1: directory to test
3713# Argument 2: what to do if it is on local disk
3714# Argument 3: what to do otherwise (remote disk or failure)
3715
3716
3717# Check that source files have basic read permissions set. This might
3718# not be the case in cygwin in certain conditions.
3719
3720
3721
3722
3723# Check for support for specific options in bash
3724
3725
3726################################################################################
3727#
3728# Default make target
3729#
3730
3731
3732# Code to run after AC_OUTPUT
3733
3734
3735#
3736# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
3737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3738#
3739# This code is free software; you can redistribute it and/or modify it
3740# under the terms of the GNU General Public License version 2 only, as
3741# published by the Free Software Foundation.  Oracle designates this
3742# particular file as subject to the "Classpath" exception as provided
3743# by Oracle in the LICENSE file that accompanied this code.
3744#
3745# This code is distributed in the hope that it will be useful, but WITHOUT
3746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3748# version 2 for more details (a copy is included in the LICENSE file that
3749# accompanied this code).
3750#
3751# You should have received a copy of the GNU General Public License version
3752# 2 along with this work; if not, write to the Free Software Foundation,
3753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3754#
3755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3756# or visit www.oracle.com if you need additional information or have any
3757# questions.
3758#
3759
3760
3761
3762
3763
3764# Helper function which possibly converts a path using DOS-style short mode.
3765# If so, the updated path is stored in $new_path.
3766# $1: The path to check
3767
3768
3769# Helper function which possibly converts a path using DOS-style short mode.
3770# If so, the updated path is stored in $new_path.
3771# $1: The path to check
3772
3773
3774# FIXME: The BASIC_FIXUP_*_CYGWIN/MSYS is most likely too convoluted
3775# and could probably be heavily simplified. However, all changes in this
3776# area tend to need lot of testing in different scenarios, and in lack of
3777# proper unit testing, cleaning this up has not been deemed worth the effort
3778# at the moment.
3779
3780
3781
3782
3783
3784
3785
3786
3787
3788# Setup basic configuration paths, and platform-specific stuff related to PATHs.
3789
3790
3791
3792
3793# ... then the rest
3794#
3795# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
3796# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3797#
3798# This code is free software; you can redistribute it and/or modify it
3799# under the terms of the GNU General Public License version 2 only, as
3800# published by the Free Software Foundation.  Oracle designates this
3801# particular file as subject to the "Classpath" exception as provided
3802# by Oracle in the LICENSE file that accompanied this code.
3803#
3804# This code is distributed in the hope that it will be useful, but WITHOUT
3805# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3806# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3807# version 2 for more details (a copy is included in the LICENSE file that
3808# accompanied this code).
3809#
3810# You should have received a copy of the GNU General Public License version
3811# 2 along with this work; if not, write to the Free Software Foundation,
3812# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3813#
3814# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3815# or visit www.oracle.com if you need additional information or have any
3816# questions.
3817#
3818
3819########################################################################
3820# This file handles detection of the Boot JDK. The Boot JDK detection
3821# process has been developed as a response to solve a complex real-world
3822# problem. Initially, it was simple, but it has grown as platform after
3823# platform, idiosyncracy after idiosyncracy has been supported.
3824#
3825# The basic idea is this:
3826# 1) You need an acceptable *) JDK to use as a Boot JDK
3827# 2) There are several ways to locate a JDK, that are mostly platform
3828#    dependent **)
3829# 3) You can have multiple JDKs installed
3830# 4) If possible, configure should try to dig out an acceptable JDK
3831#    automatically, without having to resort to command-line options
3832#
3833# *)  acceptable means e.g. JDK7 for building JDK8, a complete JDK (with
3834#     javac) and not a JRE, etc.
3835#
3836# **) On Windows we typically use a well-known path.
3837#     On MacOSX we typically use the tool java_home.
3838#     On Linux we typically find javac in the $PATH, and then follow a
3839#     chain of symlinks that often ends up in a real JDK.
3840#
3841# This leads to the code where we check in different ways to locate a
3842# JDK, and if one is found, check if it is acceptable. If not, we print
3843# our reasons for rejecting it (useful when debugging non-working
3844# configure situations) and continue checking the next one.
3845########################################################################
3846
3847# Execute the check given as argument, and verify the result
3848# If the Boot JDK was previously found, do nothing
3849# $1 A command line (typically autoconf macro) to execute
3850
3851
3852# Test: Is bootjdk explicitely set by command line arguments?
3853
3854
3855# Test: Is $JAVA_HOME set?
3856
3857
3858# Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
3859
3860
3861# Test: Is there a /usr/libexec/java_home? (Typically on MacOSX)
3862# $1: Argument to the java_home binary (optional)
3863
3864
3865# Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
3866
3867
3868# Look for a jdk in the given path. If there are multiple, try to select the newest.
3869# If found, set BOOT_JDK and BOOT_JDK_FOUND.
3870# $1 = Path to directory containing jdk installations.
3871# $2 = String to append to the found JDK directory to get the proper JDK home
3872
3873
3874# Call BOOTJDK_FIND_BEST_JDK_IN_DIRECTORY, but use the given
3875# environmental variable as base for where to look.
3876# $1 Name of an environmal variable, assumed to point to the Program Files directory.
3877
3878
3879# Test: Is there a JDK installed in default, well-known locations?
3880
3881
3882# Check that a command-line tool in the Boot JDK is correct
3883# $1 = name of variable to assign
3884# $2 = name of binary
3885
3886
3887###############################################################################
3888#
3889# We need a Boot JDK to bootstrap the build.
3890#
3891
3892
3893
3894
3895
3896# BUILD_JDK: the location of the latest JDK that can run
3897#   on the host system and supports the target class file version
3898#   generated in this JDK build.  This variable should only be
3899#   used after the launchers are built.
3900#
3901
3902# Execute the check given as argument, and verify the result.
3903# If the JDK was previously found, do nothing.
3904# $1 A command line (typically autoconf macro) to execute
3905
3906
3907# By default the BUILD_JDK is the JDK_OUTPUTDIR.  If the target architecture
3908# is different than the host system doing the build (e.g. cross-compilation),
3909# a special BUILD_JDK is built as part of the build process.  An external
3910# prebuilt BUILD_JDK can also be supplied.
3911
3912
3913#
3914# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3915# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3916#
3917# This code is free software; you can redistribute it and/or modify it
3918# under the terms of the GNU General Public License version 2 only, as
3919# published by the Free Software Foundation.  Oracle designates this
3920# particular file as subject to the "Classpath" exception as provided
3921# by Oracle in the LICENSE file that accompanied this code.
3922#
3923# This code is distributed in the hope that it will be useful, but WITHOUT
3924# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3925# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3926# version 2 for more details (a copy is included in the LICENSE file that
3927# accompanied this code).
3928#
3929# You should have received a copy of the GNU General Public License version
3930# 2 along with this work; if not, write to the Free Software Foundation,
3931# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3932#
3933# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3934# or visit www.oracle.com if you need additional information or have any
3935# questions.
3936#
3937
3938
3939
3940
3941
3942
3943
3944
3945
3946
3947
3948
3949
3950
3951
3952
3953
3954################################################################################
3955#
3956# Runs icecc-create-env once and prints the error if it fails
3957#
3958# $1: arguments to icecc-create-env
3959# $2: log file
3960#
3961
3962
3963################################################################################
3964#
3965# Optionally enable distributed compilation of native code using icecc/icecream
3966#
3967
3968
3969
3970
3971
3972
3973
3974#
3975# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
3976# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
3977#
3978# This code is free software; you can redistribute it and/or modify it
3979# under the terms of the GNU General Public License version 2 only, as
3980# published by the Free Software Foundation.  Oracle designates this
3981# particular file as subject to the "Classpath" exception as provided
3982# by Oracle in the LICENSE file that accompanied this code.
3983#
3984# This code is distributed in the hope that it will be useful, but WITHOUT
3985# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
3986# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
3987# version 2 for more details (a copy is included in the LICENSE file that
3988# accompanied this code).
3989#
3990# You should have received a copy of the GNU General Public License version
3991# 2 along with this work; if not, write to the Free Software Foundation,
3992# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
3993#
3994# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
3995# or visit www.oracle.com if you need additional information or have any
3996# questions.
3997#
3998
3999# Reset the global CFLAGS/LDFLAGS variables and initialize them with the
4000# corresponding configure arguments instead
4001
4002
4003# Setup the sysroot flags and add them to global CFLAGS and LDFLAGS so
4004# that configure can use them while detecting compilers.
4005# TOOLCHAIN_TYPE is available here.
4006# Param 1 - Optional prefix to all variables. (e.g BUILD_)
4007
4008
4009
4010
4011
4012
4013# Documentation on common flags used for solstudio in HIGHEST.
4014#
4015# WARNING: Use of OPTIMIZATION_LEVEL=HIGHEST in your Makefile needs to be
4016#          done with care, there are some assumptions below that need to
4017#          be understood about the use of pointers, and IEEE behavior.
4018#
4019# -fns: Use non-standard floating point mode (not IEEE 754)
4020# -fsimple: Do some simplification of floating point arithmetic (not IEEE 754)
4021# -fsingle: Use single precision floating point with 'float'
4022# -xalias_level=basic: Assume memory references via basic pointer types do not alias
4023#   (Source with excessing pointer casting and data access with mixed
4024#    pointer types are not recommended)
4025# -xbuiltin=%all: Use intrinsic or inline versions for math/std functions
4026#   (If you expect perfect errno behavior, do not use this)
4027# -xdepend: Loop data dependency optimizations (need -xO3 or higher)
4028# -xrestrict: Pointer parameters to functions do not overlap
4029#   (Similar to -xalias_level=basic usage, but less obvious sometimes.
4030#    If you pass in multiple pointers to the same data, do not use this)
4031# -xlibmil: Inline some library routines
4032#   (If you expect perfect errno behavior, do not use this)
4033# -xlibmopt: Use optimized math routines (CURRENTLY DISABLED)
4034#   (If you expect perfect errno behavior, do not use this)
4035#  Can cause undefined external on Solaris 8 X86 on __sincos, removing for now
4036
4037    # FIXME: this will never happen since sparc != sparcv9, ie 32 bit, which we don't build anymore.
4038    # Bug?
4039    #if test "x$OPENJDK_TARGET_CPU" = xsparc; then
4040    #  CFLAGS_JDK="${CFLAGS_JDK} -xmemalign=4s"
4041    #  CXXFLAGS_JDK="${CXXFLAGS_JDK} -xmemalign=4s"
4042    #fi
4043
4044
4045
4046
4047
4048
4049################################################################################
4050# $1 - Either BUILD or TARGET to pick the correct OS/CPU variables to check
4051#      conditionals against.
4052# $2 - Optional prefix for each variable defined.
4053
4054
4055# FLAGS_C_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4056#                                  IF_FALSE: [RUN-IF-FALSE])
4057# ------------------------------------------------------------
4058# Check that the C compiler supports an argument
4059
4060
4061
4062
4063# FLAGS_CXX_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4064#                                    IF_FALSE: [RUN-IF-FALSE])
4065# ------------------------------------------------------------
4066# Check that the C++ compiler supports an argument
4067
4068
4069
4070
4071# FLAGS_COMPILER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4072#                                IF_FALSE: [RUN-IF-FALSE])
4073# ------------------------------------------------------------
4074# Check that the C and C++ compilers support an argument
4075
4076
4077
4078
4079# FLAGS_LINKER_CHECK_ARGUMENTS(ARGUMENT: [ARGUMENT], IF_TRUE: [RUN-IF-TRUE],
4080#                                   IF_FALSE: [RUN-IF-FALSE])
4081# ------------------------------------------------------------
4082# Check that the linker support an argument
4083
4084
4085
4086
4087
4088
4089
4090
4091#
4092# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4093# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4094#
4095# This code is free software; you can redistribute it and/or modify it
4096# under the terms of the GNU General Public License version 2 only, as
4097# published by the Free Software Foundation.  Oracle designates this
4098# particular file as subject to the "Classpath" exception as provided
4099# by Oracle in the LICENSE file that accompanied this code.
4100#
4101# This code is distributed in the hope that it will be useful, but WITHOUT
4102# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4103# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4104# version 2 for more details (a copy is included in the LICENSE file that
4105# accompanied this code).
4106#
4107# You should have received a copy of the GNU General Public License version
4108# 2 along with this work; if not, write to the Free Software Foundation,
4109# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4110#
4111# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4112# or visit www.oracle.com if you need additional information or have any
4113# questions.
4114#
4115
4116
4117
4118
4119
4120cygwin_help() {
4121  case $1 in
4122    unzip)
4123      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P unzip )"
4124      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4125      ;;
4126    zip)
4127      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P zip )"
4128      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4129      ;;
4130    make)
4131      PKGHANDLER_COMMAND="( cd <location of cygwin setup.exe> && cmd /c setup -q -P make )"
4132      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
4133      ;;
4134    freetype)
4135      HELP_MSG="
4136The freetype library can now be build during the configure process.
4137Download the freetype sources and unpack them into an arbitrary directory:
4138
4139wget http://download.savannah.gnu.org/releases/freetype/freetype-2.5.3.tar.gz
4140tar -xzf freetype-2.5.3.tar.gz
4141
4142Then run configure with '--with-freetype-src=<freetype_src>'. This will
4143automatically build the freetype library into '<freetype_src>/lib64' for 64-bit
4144builds or into '<freetype_src>/lib32' for 32-bit builds.
4145Afterwards you can always use '--with-freetype-include=<freetype_src>/include'
4146and '--with-freetype-lib=<freetype_src>/lib32|64' for other builds.
4147
4148Alternatively you can unpack the sources like this to use the default directory:
4149
4150tar --one-top-level=$HOME/freetype --strip-components=1 -xzf freetype-2.5.3.tar.gz"
4151      ;;
4152  esac
4153}
4154
4155msys_help() {
4156  PKGHANDLER_COMMAND=""
4157}
4158
4159apt_help() {
4160  case $1 in
4161    reduced)
4162      PKGHANDLER_COMMAND="sudo apt-get install gcc-multilib g++-multilib" ;;
4163    devkit)
4164      PKGHANDLER_COMMAND="sudo apt-get install build-essential" ;;
4165    openjdk)
4166      PKGHANDLER_COMMAND="sudo apt-get install openjdk-8-jdk" ;;
4167    alsa)
4168      PKGHANDLER_COMMAND="sudo apt-get install libasound2-dev" ;;
4169    cups)
4170      PKGHANDLER_COMMAND="sudo apt-get install libcups2-dev" ;;
4171    freetype)
4172      PKGHANDLER_COMMAND="sudo apt-get install libfreetype6-dev" ;;
4173    ffi)
4174      PKGHANDLER_COMMAND="sudo apt-get install libffi-dev" ;;
4175    x11)
4176      PKGHANDLER_COMMAND="sudo apt-get install libX11-dev libxext-dev libxrender-dev libxtst-dev libxt-dev" ;;
4177    ccache)
4178      PKGHANDLER_COMMAND="sudo apt-get install ccache" ;;
4179    dtrace)
4180      PKGHANDLER_COMMAND="sudo apt-get install systemtap-sdt-dev" ;;
4181  esac
4182}
4183
4184yum_help() {
4185  case $1 in
4186    devkit)
4187      PKGHANDLER_COMMAND="sudo yum groupinstall \"Development Tools\"" ;;
4188    openjdk)
4189      PKGHANDLER_COMMAND="sudo yum install java-1.8.0-openjdk-devel" ;;
4190    alsa)
4191      PKGHANDLER_COMMAND="sudo yum install alsa-lib-devel" ;;
4192    cups)
4193      PKGHANDLER_COMMAND="sudo yum install cups-devel" ;;
4194    freetype)
4195      PKGHANDLER_COMMAND="sudo yum install freetype-devel" ;;
4196    x11)
4197      PKGHANDLER_COMMAND="sudo yum install libXtst-devel libXt-devel libXrender-devel libXi-devel" ;;
4198    ccache)
4199      PKGHANDLER_COMMAND="sudo yum install ccache" ;;
4200  esac
4201}
4202
4203port_help() {
4204  PKGHANDLER_COMMAND=""
4205}
4206
4207pkgutil_help() {
4208  PKGHANDLER_COMMAND=""
4209}
4210
4211pkgadd_help() {
4212  PKGHANDLER_COMMAND=""
4213}
4214
4215# This function will check if we're called from the "configure" wrapper while
4216# printing --help. If so, we will print out additional information that can
4217# only be extracted within the autoconf script, and then exit. This must be
4218# called at the very beginning in configure.ac.
4219
4220
4221
4222
4223
4224
4225#
4226# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4227# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4228#
4229# This code is free software; you can redistribute it and/or modify it
4230# under the terms of the GNU General Public License version 2 only, as
4231# published by the Free Software Foundation.  Oracle designates this
4232# particular file as subject to the "Classpath" exception as provided
4233# by Oracle in the LICENSE file that accompanied this code.
4234#
4235# This code is distributed in the hope that it will be useful, but WITHOUT
4236# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4237# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4238# version 2 for more details (a copy is included in the LICENSE file that
4239# accompanied this code).
4240#
4241# You should have received a copy of the GNU General Public License version
4242# 2 along with this work; if not, write to the Free Software Foundation,
4243# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4244#
4245# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4246# or visit www.oracle.com if you need additional information or have any
4247# questions.
4248#
4249
4250# All valid JVM features, regardless of platform
4251VALID_JVM_FEATURES="compiler1 compiler2 zero shark minimal dtrace jvmti jvmci \
4252    fprof vm-structs jni-check services management all-gcs nmt cds static-build"
4253
4254# All valid JVM variants
4255VALID_JVM_VARIANTS="server client minimal core zero zeroshark custom"
4256
4257###############################################################################
4258# Check if the specified JVM variant should be built. To be used in shell if
4259# constructs, like this:
4260# if HOTSPOT_CHECK_JVM_VARIANT(server); then
4261#
4262# Only valid to use after HOTSPOT_SETUP_JVM_VARIANTS has setup variants.
4263
4264# Definition kept in one line to allow inlining in if statements.
4265# Additional [] needed to keep m4 from mangling shell constructs.
4266
4267
4268###############################################################################
4269# Check if the specified JVM features are explicitly enabled. To be used in
4270# shell if constructs, like this:
4271# if HOTSPOT_CHECK_JVM_FEATURE(jvmti); then
4272#
4273# Only valid to use after HOTSPOT_SETUP_JVM_FEATURES has setup features.
4274
4275# Definition kept in one line to allow inlining in if statements.
4276# Additional [] needed to keep m4 from mangling shell constructs.
4277
4278
4279###############################################################################
4280# Check which variants of the JVM that we want to build. Available variants are:
4281#   server: normal interpreter, and a tiered C1/C2 compiler
4282#   client: normal interpreter, and C1 (no C2 compiler)
4283#   minimal: reduced form of client with optional features stripped out
4284#   core: normal interpreter only, no compiler
4285#   zero: C++ based interpreter only, no compiler
4286#   zeroshark: C++ based interpreter, and a llvm-based compiler
4287#   custom: baseline JVM with no default features
4288#
4289
4290
4291###############################################################################
4292# Check if dtrace should be enabled and has all prerequisites present.
4293#
4294
4295
4296###############################################################################
4297# Set up all JVM features for each JVM variant.
4298#
4299
4300
4301###############################################################################
4302# Validate JVM features once all setup is complete, including custom setup.
4303#
4304
4305
4306###############################################################################
4307# Support for old hotspot build. Remove once new hotspot build has proven
4308# to work satisfactory.
4309#
4310
4311
4312#
4313# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4314# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4315#
4316# This code is free software; you can redistribute it and/or modify it
4317# under the terms of the GNU General Public License version 2 only, as
4318# published by the Free Software Foundation.  Oracle designates this
4319# particular file as subject to the "Classpath" exception as provided
4320# by Oracle in the LICENSE file that accompanied this code.
4321#
4322# This code is distributed in the hope that it will be useful, but WITHOUT
4323# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4324# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4325# version 2 for more details (a copy is included in the LICENSE file that
4326# accompanied this code).
4327#
4328# You should have received a copy of the GNU General Public License version
4329# 2 along with this work; if not, write to the Free Software Foundation,
4330# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4331#
4332# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4333# or visit www.oracle.com if you need additional information or have any
4334# questions.
4335#
4336
4337###############################################################################
4338# Check which variant of the JDK that we want to build.
4339# Currently we have:
4340#    normal:   standard edition
4341# but the custom make system may add other variants
4342#
4343# Effectively the JDK variant gives a name to a specific set of
4344# modules to compile into the JDK.
4345
4346
4347###############################################################################
4348# Set the debug level
4349#    release: no debug information, all optimizations, no asserts.
4350#    optimized: no debug information, all optimizations, no asserts, HotSpot target is 'optimized'.
4351#    fastdebug: debug information (-g), all optimizations, all asserts
4352#    slowdebug: debug information (-g), no optimizations, all asserts
4353
4354
4355###############################################################################
4356#
4357# Should we build only OpenJDK even if closed sources are present?
4358#
4359
4360
4361
4362
4363###############################################################################
4364#
4365# Enable or disable the elliptic curve crypto implementation
4366#
4367
4368
4369
4370
4371################################################################################
4372#
4373# Gcov coverage data for hotspot
4374#
4375
4376
4377################################################################################
4378#
4379# Static build support.  When enabled will generate static
4380# libraries instead of shared libraries for all JDK libs.
4381#
4382
4383
4384################################################################################
4385#
4386# jlink options.
4387# We always keep packaged modules in JDK image.
4388#
4389
4390
4391################################################################################
4392#
4393# Check if building of the jtreg failure handler should be enabled.
4394#
4395
4396
4397#
4398# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4399# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4400#
4401# This code is free software; you can redistribute it and/or modify it
4402# under the terms of the GNU General Public License version 2 only, as
4403# published by the Free Software Foundation.  Oracle designates this
4404# particular file as subject to the "Classpath" exception as provided
4405# by Oracle in the LICENSE file that accompanied this code.
4406#
4407# This code is distributed in the hope that it will be useful, but WITHOUT
4408# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4409# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4410# version 2 for more details (a copy is included in the LICENSE file that
4411# accompanied this code).
4412#
4413# You should have received a copy of the GNU General Public License version
4414# 2 along with this work; if not, write to the Free Software Foundation,
4415# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4416#
4417# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4418# or visit www.oracle.com if you need additional information or have any
4419# questions.
4420#
4421
4422###############################################################################
4423#
4424# Setup version numbers
4425#
4426
4427# Verify that a given string represents a valid version number, and assign it
4428# to a variable.
4429
4430# Argument 1: the variable to assign to
4431# Argument 2: the value given by the user
4432
4433
4434
4435
4436#
4437# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4438# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4439#
4440# This code is free software; you can redistribute it and/or modify it
4441# under the terms of the GNU General Public License version 2 only, as
4442# published by the Free Software Foundation.  Oracle designates this
4443# particular file as subject to the "Classpath" exception as provided
4444# by Oracle in the LICENSE file that accompanied this code.
4445#
4446# This code is distributed in the hope that it will be useful, but WITHOUT
4447# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4448# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4449# version 2 for more details (a copy is included in the LICENSE file that
4450# accompanied this code).
4451#
4452# You should have received a copy of the GNU General Public License version
4453# 2 along with this work; if not, write to the Free Software Foundation,
4454# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4455#
4456# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4457# or visit www.oracle.com if you need additional information or have any
4458# questions.
4459#
4460
4461# Major library component reside in separate files.
4462#
4463# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4464# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4465#
4466# This code is free software; you can redistribute it and/or modify it
4467# under the terms of the GNU General Public License version 2 only, as
4468# published by the Free Software Foundation.  Oracle designates this
4469# particular file as subject to the "Classpath" exception as provided
4470# by Oracle in the LICENSE file that accompanied this code.
4471#
4472# This code is distributed in the hope that it will be useful, but WITHOUT
4473# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4474# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4475# version 2 for more details (a copy is included in the LICENSE file that
4476# accompanied this code).
4477#
4478# You should have received a copy of the GNU General Public License version
4479# 2 along with this work; if not, write to the Free Software Foundation,
4480# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4481#
4482# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4483# or visit www.oracle.com if you need additional information or have any
4484# questions.
4485#
4486
4487################################################################################
4488# Setup alsa (Advanced Linux Sound Architecture)
4489################################################################################
4490
4491
4492#
4493# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4494# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4495#
4496# This code is free software; you can redistribute it and/or modify it
4497# under the terms of the GNU General Public License version 2 only, as
4498# published by the Free Software Foundation.  Oracle designates this
4499# particular file as subject to the "Classpath" exception as provided
4500# by Oracle in the LICENSE file that accompanied this code.
4501#
4502# This code is distributed in the hope that it will be useful, but WITHOUT
4503# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4504# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4505# version 2 for more details (a copy is included in the LICENSE file that
4506# accompanied this code).
4507#
4508# You should have received a copy of the GNU General Public License version
4509# 2 along with this work; if not, write to the Free Software Foundation,
4510# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4511#
4512# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4513# or visit www.oracle.com if you need additional information or have any
4514# questions.
4515#
4516
4517################################################################################
4518# Setup bundled libraries.
4519#
4520# For libjpeg, giflib, libpng, lcms2 and zlib, the source is present in the
4521# OpenJDK repository. Default is to use these libraries as bundled, but they
4522# might be replaced by en external version by the user.
4523################################################################################
4524
4525
4526################################################################################
4527# Setup libjpeg
4528################################################################################
4529
4530
4531################################################################################
4532# Setup giflib
4533################################################################################
4534
4535
4536################################################################################
4537# Setup libpng
4538################################################################################
4539
4540
4541################################################################################
4542# Setup zlib
4543################################################################################
4544
4545
4546################################################################################
4547# Setup lcms (Little CMS)
4548################################################################################
4549
4550
4551#
4552# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4553# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4554#
4555# This code is free software; you can redistribute it and/or modify it
4556# under the terms of the GNU General Public License version 2 only, as
4557# published by the Free Software Foundation.  Oracle designates this
4558# particular file as subject to the "Classpath" exception as provided
4559# by Oracle in the LICENSE file that accompanied this code.
4560#
4561# This code is distributed in the hope that it will be useful, but WITHOUT
4562# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4563# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4564# version 2 for more details (a copy is included in the LICENSE file that
4565# accompanied this code).
4566#
4567# You should have received a copy of the GNU General Public License version
4568# 2 along with this work; if not, write to the Free Software Foundation,
4569# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4570#
4571# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4572# or visit www.oracle.com if you need additional information or have any
4573# questions.
4574#
4575
4576################################################################################
4577# Setup cups (Common Unix Printing System)
4578################################################################################
4579
4580
4581#
4582# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
4583# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4584#
4585# This code is free software; you can redistribute it and/or modify it
4586# under the terms of the GNU General Public License version 2 only, as
4587# published by the Free Software Foundation.  Oracle designates this
4588# particular file as subject to the "Classpath" exception as provided
4589# by Oracle in the LICENSE file that accompanied this code.
4590#
4591# This code is distributed in the hope that it will be useful, but WITHOUT
4592# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4593# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4594# version 2 for more details (a copy is included in the LICENSE file that
4595# accompanied this code).
4596#
4597# You should have received a copy of the GNU General Public License version
4598# 2 along with this work; if not, write to the Free Software Foundation,
4599# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4600#
4601# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4602# or visit www.oracle.com if you need additional information or have any
4603# questions.
4604#
4605
4606################################################################################
4607# Setup libffi (Foreign Function Interface)
4608################################################################################
4609
4610
4611#
4612# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4613# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4614#
4615# This code is free software; you can redistribute it and/or modify it
4616# under the terms of the GNU General Public License version 2 only, as
4617# published by the Free Software Foundation.  Oracle designates this
4618# particular file as subject to the "Classpath" exception as provided
4619# by Oracle in the LICENSE file that accompanied this code.
4620#
4621# This code is distributed in the hope that it will be useful, but WITHOUT
4622# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4623# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4624# version 2 for more details (a copy is included in the LICENSE file that
4625# accompanied this code).
4626#
4627# You should have received a copy of the GNU General Public License version
4628# 2 along with this work; if not, write to the Free Software Foundation,
4629# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4630#
4631# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4632# or visit www.oracle.com if you need additional information or have any
4633# questions.
4634#
4635
4636################################################################################
4637# Build the freetype lib from source
4638################################################################################
4639
4640
4641################################################################################
4642# Check if a potential freeype library match is correct and usable
4643################################################################################
4644
4645
4646################################################################################
4647# Setup freetype (The FreeType2 font rendering library)
4648################################################################################
4649
4650
4651#
4652# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4653# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4654#
4655# This code is free software; you can redistribute it and/or modify it
4656# under the terms of the GNU General Public License version 2 only, as
4657# published by the Free Software Foundation.  Oracle designates this
4658# particular file as subject to the "Classpath" exception as provided
4659# by Oracle in the LICENSE file that accompanied this code.
4660#
4661# This code is distributed in the hope that it will be useful, but WITHOUT
4662# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4663# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4664# version 2 for more details (a copy is included in the LICENSE file that
4665# accompanied this code).
4666#
4667# You should have received a copy of the GNU General Public License version
4668# 2 along with this work; if not, write to the Free Software Foundation,
4669# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4670#
4671# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4672# or visit www.oracle.com if you need additional information or have any
4673# questions.
4674#
4675
4676################################################################################
4677# Setup the standard C/C++ runtime libraries.
4678#
4679# Most importantly, determine if stdc++ should be linked statically or
4680# dynamically.
4681################################################################################
4682
4683
4684#
4685# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4686# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4687#
4688# This code is free software; you can redistribute it and/or modify it
4689# under the terms of the GNU General Public License version 2 only, as
4690# published by the Free Software Foundation.  Oracle designates this
4691# particular file as subject to the "Classpath" exception as provided
4692# by Oracle in the LICENSE file that accompanied this code.
4693#
4694# This code is distributed in the hope that it will be useful, but WITHOUT
4695# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4696# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4697# version 2 for more details (a copy is included in the LICENSE file that
4698# accompanied this code).
4699#
4700# You should have received a copy of the GNU General Public License version
4701# 2 along with this work; if not, write to the Free Software Foundation,
4702# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4703#
4704# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4705# or visit www.oracle.com if you need additional information or have any
4706# questions.
4707#
4708
4709################################################################################
4710# Setup X11 Windows system
4711################################################################################
4712
4713
4714
4715################################################################################
4716# Determine which libraries are needed for this configuration
4717################################################################################
4718
4719
4720################################################################################
4721# Parse library options, and setup needed libraries
4722################################################################################
4723
4724
4725################################################################################
4726# Setup llvm (Low-Level VM)
4727################################################################################
4728
4729
4730################################################################################
4731# Setup various libraries, typically small system libraries
4732################################################################################
4733
4734
4735#
4736# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4737# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4738#
4739# This code is free software; you can redistribute it and/or modify it
4740# under the terms of the GNU General Public License version 2 only, as
4741# published by the Free Software Foundation.  Oracle designates this
4742# particular file as subject to the "Classpath" exception as provided
4743# by Oracle in the LICENSE file that accompanied this code.
4744#
4745# This code is distributed in the hope that it will be useful, but WITHOUT
4746# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4747# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4748# version 2 for more details (a copy is included in the LICENSE file that
4749# accompanied this code).
4750#
4751# You should have received a copy of the GNU General Public License version
4752# 2 along with this work; if not, write to the Free Software Foundation,
4753# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4754#
4755# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4756# or visit www.oracle.com if you need additional information or have any
4757# questions.
4758#
4759
4760# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4761# Converts autoconf style CPU name to OpenJDK style, into
4762# VAR_CPU, VAR_CPU_ARCH, VAR_CPU_BITS and VAR_CPU_ENDIAN.
4763
4764
4765# Support macro for PLATFORM_EXTRACT_TARGET_AND_BUILD.
4766# Converts autoconf style OS name to OpenJDK style, into
4767# VAR_OS, VAR_OS_TYPE and VAR_OS_ENV.
4768
4769
4770# Expects $host_os $host_cpu $build_os and $build_cpu
4771# and $with_target_bits to have been setup!
4772#
4773# Translate the standard triplet(quadruplet) definition
4774# of the target/build system into OPENJDK_TARGET_OS, OPENJDK_TARGET_CPU,
4775# OPENJDK_BUILD_OS, etc.
4776
4777
4778# Check if a reduced build (32-bit on 64-bit platforms) is requested, and modify behaviour
4779# accordingly. Must be done after setting up build and target system, but before
4780# doing anything else with these values.
4781
4782
4783# Setup the legacy variables, for controlling the old makefiles.
4784#
4785
4786
4787# $1 - Either TARGET or BUILD to setup the variables for.
4788
4789
4790
4791
4792#%%% Build and target systems %%%
4793
4794
4795
4796
4797# Support macro for PLATFORM_SETUP_OPENJDK_TARGET_BITS.
4798# Add -mX to various FLAGS variables.
4799
4800
4801
4802
4803
4804
4805#
4806# Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved.
4807# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4808#
4809# This code is free software; you can redistribute it and/or modify it
4810# under the terms of the GNU General Public License version 2 only, as
4811# published by the Free Software Foundation.  Oracle designates this
4812# particular file as subject to the "Classpath" exception as provided
4813# by Oracle in the LICENSE file that accompanied this code.
4814#
4815# This code is distributed in the hope that it will be useful, but WITHOUT
4816# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4817# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4818# version 2 for more details (a copy is included in the LICENSE file that
4819# accompanied this code).
4820#
4821# You should have received a copy of the GNU General Public License version
4822# 2 along with this work; if not, write to the Free Software Foundation,
4823# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4824#
4825# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4826# or visit www.oracle.com if you need additional information or have any
4827# questions.
4828#
4829
4830
4831
4832
4833
4834
4835
4836################################################################################
4837# Define a mechanism for importing extra prebuilt modules
4838#
4839
4840
4841
4842#
4843# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
4844# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4845#
4846# This code is free software; you can redistribute it and/or modify it
4847# under the terms of the GNU General Public License version 2 only, as
4848# published by the Free Software Foundation.  Oracle designates this
4849# particular file as subject to the "Classpath" exception as provided
4850# by Oracle in the LICENSE file that accompanied this code.
4851#
4852# This code is distributed in the hope that it will be useful, but WITHOUT
4853# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4854# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4855# version 2 for more details (a copy is included in the LICENSE file that
4856# accompanied this code).
4857#
4858# You should have received a copy of the GNU General Public License version
4859# 2 along with this work; if not, write to the Free Software Foundation,
4860# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4861#
4862# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4863# or visit www.oracle.com if you need additional information or have any
4864# questions.
4865#
4866
4867########################################################################
4868# This file is responsible for detecting, verifying and setting up the
4869# toolchain, i.e. the compiler, linker and related utilities. It will setup
4870# proper paths to the binaries, but it will not setup any flags.
4871#
4872# The binaries used is determined by the toolchain type, which is the family of
4873# compilers and related tools that are used.
4874########################################################################
4875
4876
4877# All valid toolchains, regardless of platform (used by help.m4)
4878VALID_TOOLCHAINS_all="gcc clang solstudio xlc microsoft"
4879
4880# These toolchains are valid on different platforms
4881VALID_TOOLCHAINS_linux="gcc clang"
4882VALID_TOOLCHAINS_solaris="solstudio"
4883VALID_TOOLCHAINS_macosx="gcc clang"
4884VALID_TOOLCHAINS_aix="xlc"
4885VALID_TOOLCHAINS_windows="microsoft"
4886
4887# Toolchain descriptions
4888TOOLCHAIN_DESCRIPTION_clang="clang/LLVM"
4889TOOLCHAIN_DESCRIPTION_gcc="GNU Compiler Collection"
4890TOOLCHAIN_DESCRIPTION_microsoft="Microsoft Visual Studio"
4891TOOLCHAIN_DESCRIPTION_solstudio="Oracle Solaris Studio"
4892TOOLCHAIN_DESCRIPTION_xlc="IBM XL C/C++"
4893
4894# Minimum supported versions, empty means unspecified
4895TOOLCHAIN_MINIMUM_VERSION_clang="3.2"
4896TOOLCHAIN_MINIMUM_VERSION_gcc="4.3"
4897TOOLCHAIN_MINIMUM_VERSION_microsoft=""
4898TOOLCHAIN_MINIMUM_VERSION_solstudio="5.12"
4899TOOLCHAIN_MINIMUM_VERSION_xlc=""
4900
4901# Prepare the system so that TOOLCHAIN_CHECK_COMPILER_VERSION can be called.
4902# Must have CC_VERSION_NUMBER and CXX_VERSION_NUMBER.
4903# $1 - optional variable prefix for compiler and version variables (BUILD_)
4904# $2 - optional variable prefix for comparable variable (OPENJDK_BUILD_)
4905
4906
4907# Check if the configured compiler (C and C++) is of a specific version or
4908# newer. TOOLCHAIN_PREPARE_FOR_VERSION_COMPARISONS must have been called before.
4909#
4910# Arguments:
4911#   VERSION:   The version string to check against the found version
4912#   IF_AT_LEAST:   block to run if the compiler is at least this version (>=)
4913#   IF_OLDER_THAN:   block to run if the compiler is older than this version (<)
4914#   PREFIX:   Optional variable prefix for compiler to compare version for (OPENJDK_BUILD_)
4915
4916
4917
4918
4919# Setup a number of variables describing how native output files are
4920# named on this platform/toolchain.
4921
4922
4923# Determine which toolchain type to use, and make sure it is valid for this
4924# platform. Setup various information about the selected toolchain.
4925
4926
4927# Before we start detecting the toolchain executables, we might need some
4928# special setup, e.g. additional paths etc.
4929
4930
4931# Restore path, etc
4932
4933
4934# Check if a compiler is of the toolchain type we expect, and save the version
4935# information from it. If the compiler does not match the expected type,
4936# this function will abort using AC_MSG_ERROR. If it matches, the version will
4937# be stored in CC_VERSION_NUMBER/CXX_VERSION_NUMBER (as a dotted number), and
4938# the full version string in CC_VERSION_STRING/CXX_VERSION_STRING.
4939#
4940# $1 = compiler to test (CC or CXX)
4941# $2 = human readable name of compiler (C or C++)
4942
4943
4944# Try to locate the given C or C++ compiler in the path, or otherwise.
4945#
4946# $1 = compiler to test (CC or CXX)
4947# $2 = human readable name of compiler (C or C++)
4948# $3 = list of compiler names to search for
4949
4950
4951# Detect the core components of the toolchain, i.e. the compilers (CC and CXX),
4952# preprocessor (CPP and CXXCPP), the linker (LD), the assembler (AS) and the
4953# archiver (AR). Verify that the compilers are correct according to the
4954# toolchain type.
4955
4956
4957# Setup additional tools that is considered a part of the toolchain, but not the
4958# core part. Many of these are highly platform-specific and do not exist,
4959# and/or are not needed on all platforms.
4960
4961
4962# Setup the build tools (i.e, the compiler and linker used to build programs
4963# that should be run on the build platform, not the target platform, as a build
4964# helper). Since the non-cross-compile case uses the normal, target compilers
4965# for this, we can only do this after these have been setup.
4966
4967
4968# Setup legacy variables that are still needed as alternative ways to refer to
4969# parts of the toolchain.
4970
4971
4972# Do some additional checks on the detected tools.
4973
4974
4975# Setup the JTReg Regression Test Harness.
4976
4977
4978#
4979# Copyright (c) 2011, 2012, Oracle and/or its affiliates. All rights reserved.
4980# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4981#
4982# This code is free software; you can redistribute it and/or modify it
4983# under the terms of the GNU General Public License version 2 only, as
4984# published by the Free Software Foundation.  Oracle designates this
4985# particular file as subject to the "Classpath" exception as provided
4986# by Oracle in the LICENSE file that accompanied this code.
4987#
4988# This code is distributed in the hope that it will be useful, but WITHOUT
4989# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
4990# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
4991# version 2 for more details (a copy is included in the LICENSE file that
4992# accompanied this code).
4993#
4994# You should have received a copy of the GNU General Public License version
4995# 2 along with this work; if not, write to the Free Software Foundation,
4996# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
4997#
4998# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
4999# or visit www.oracle.com if you need additional information or have any
5000# questions.
5001#
5002
5003################################################################################
5004# The order of these defines the priority by which we try to find them.
5005VALID_VS_VERSIONS="2013 2012 2010"
5006
5007VS_DESCRIPTION_2010="Microsoft Visual Studio 2010"
5008VS_VERSION_INTERNAL_2010=100
5009VS_MSVCR_2010=msvcr100.dll
5010# We don't use msvcp on Visual Studio 2010
5011#VS_MSVCP_2010=msvcp100.dll
5012VS_ENVVAR_2010="VS100COMNTOOLS"
5013VS_VS_INSTALLDIR_2010="Microsoft Visual Studio 10.0"
5014VS_SDK_INSTALLDIR_2010="Microsoft SDKs/Windows/v7.1"
5015VS_VS_PLATFORM_NAME_2010="v100"
5016VS_SDK_PLATFORM_NAME_2010="Windows7.1SDK"
5017
5018VS_DESCRIPTION_2012="Microsoft Visual Studio 2012"
5019VS_VERSION_INTERNAL_2012=110
5020VS_MSVCR_2012=msvcr110.dll
5021VS_MSVCP_2012=msvcp110.dll
5022VS_ENVVAR_2012="VS110COMNTOOLS"
5023VS_VS_INSTALLDIR_2012="Microsoft Visual Studio 11.0"
5024VS_SDK_INSTALLDIR_2012=
5025VS_VS_PLATFORM_NAME_2012="v110"
5026VS_SDK_PLATFORM_NAME_2012=
5027
5028VS_DESCRIPTION_2013="Microsoft Visual Studio 2013"
5029VS_VERSION_INTERNAL_2013=120
5030VS_MSVCR_2013=msvcr120.dll
5031VS_MSVCP_2013=msvcp120.dll
5032VS_ENVVAR_2013="VS120COMNTOOLS"
5033VS_VS_INSTALLDIR_2013="Microsoft Visual Studio 12.0"
5034VS_SDK_INSTALLDIR_2013=
5035VS_VS_PLATFORM_NAME_2013="v120"
5036VS_SDK_PLATFORM_NAME_2013=
5037
5038################################################################################
5039
5040
5041
5042################################################################################
5043
5044
5045
5046################################################################################
5047# Finds the bat or cmd file in Visual Studio or the SDK that sets up a proper
5048# build environment and assigns it to VS_ENV_CMD
5049
5050
5051################################################################################
5052
5053
5054
5055################################################################################
5056# Check if the VS env variables were setup prior to running configure.
5057# If not, then find vcvarsall.bat and run it automatically, and integrate
5058# the set env variables into the spec file.
5059
5060
5061
5062
5063
5064
5065
5066
5067
5068
5069
5070
5071
5072
5073# This line needs to be here, verbatim, after all includes and the dummy hook
5074# definitions. It is replaced with custom functionality when building
5075# custom sources.
5076#CUSTOM_AUTOCONF_INCLUDE
5077
5078# Do not change or remove the following line, it is needed for consistency checks:
5079DATE_WHEN_GENERATED=1462970869
5080
5081###############################################################################
5082#
5083# Initialization / Boot-strapping
5084#
5085# The bootstrapping process needs to solve the "chicken or the egg" problem,
5086# thus it jumps back and forth, each time gaining something needed later on.
5087#
5088###############################################################################
5089
5090# If we are requested to print additional help, do that and then exit.
5091# This must be the very first call.
5092
5093  if test "x$CONFIGURE_PRINT_ADDITIONAL_HELP" != x; then
5094
5095    # Print available toolchains
5096    $PRINTF "The following toolchains are available as arguments to --with-toolchain-type.\n"
5097    $PRINTF "Which are valid to use depends on the build platform.\n"
5098    for toolchain in $VALID_TOOLCHAINS_all; do
5099      # Use indirect variable referencing
5100      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
5101      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
5102      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
5103    done
5104    $PRINTF "\n"
5105
5106    # Print available jvm features
5107    $PRINTF "The following JVM features are available as arguments to --with-jvm-features.\n"
5108    $PRINTF "Which are valid to use depends on the target platform.\n  "
5109    $PRINTF "%s " $VALID_JVM_FEATURES
5110    $PRINTF "\n"
5111
5112    # And now exit directly
5113    exit 0
5114  fi
5115
5116
5117# Basic initialization that must happen first of all in the normal process.
5118
5119  # Save the original command line. This is passed to us by the wrapper configure script.
5120
5121  # Save the path variable before it gets changed
5122  ORIGINAL_PATH="$PATH"
5123
5124  DATE_WHEN_CONFIGURED=`LANG=C date`
5125
5126  { $as_echo "$as_me:${as_lineno-$LINENO}: Configuration created at $DATE_WHEN_CONFIGURED." >&5
5127$as_echo "$as_me: Configuration created at $DATE_WHEN_CONFIGURED." >&6;}
5128  { $as_echo "$as_me:${as_lineno-$LINENO}: configure script generated at timestamp $DATE_WHEN_GENERATED." >&5
5129$as_echo "$as_me: configure script generated at timestamp $DATE_WHEN_GENERATED." >&6;}
5130
5131
5132  # Start with tools that do not need have cross compilation support
5133  # and can be expected to be found in the default PATH. These tools are
5134  # used by configure.
5135
5136  # First are all the simple required tools.
5137
5138
5139
5140  # Publish this variable in the help.
5141
5142
5143  if [ -z "${BASENAME+x}" ]; then
5144    # The variable is not set by user, try to locate tool using the code snippet
5145    for ac_prog in basename
5146do
5147  # Extract the first word of "$ac_prog", so it can be a program name with args.
5148set dummy $ac_prog; ac_word=$2
5149{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5150$as_echo_n "checking for $ac_word... " >&6; }
5151if ${ac_cv_path_BASENAME+:} false; then :
5152  $as_echo_n "(cached) " >&6
5153else
5154  case $BASENAME in
5155  [\\/]* | ?:[\\/]*)
5156  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5157  ;;
5158  *)
5159  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5160for as_dir in $PATH
5161do
5162  IFS=$as_save_IFS
5163  test -z "$as_dir" && as_dir=.
5164    for ac_exec_ext in '' $ac_executable_extensions; do
5165  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5166    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5167    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5168    break 2
5169  fi
5170done
5171  done
5172IFS=$as_save_IFS
5173
5174  ;;
5175esac
5176fi
5177BASENAME=$ac_cv_path_BASENAME
5178if test -n "$BASENAME"; then
5179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5180$as_echo "$BASENAME" >&6; }
5181else
5182  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5183$as_echo "no" >&6; }
5184fi
5185
5186
5187  test -n "$BASENAME" && break
5188done
5189
5190  else
5191    # The variable is set, but is it from the command line or the environment?
5192
5193    # Try to remove the string !BASENAME! from our list.
5194    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASENAME!/}
5195    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5196      # If it failed, the variable was not from the command line. Ignore it,
5197      # but warn the user (except for BASH, which is always set by the calling BASH).
5198      if test "xBASENAME" != xBASH; then
5199        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&5
5200$as_echo "$as_me: WARNING: Ignoring value of BASENAME from the environment. Use command line variables instead." >&2;}
5201      fi
5202      # Try to locate tool using the code snippet
5203      for ac_prog in basename
5204do
5205  # Extract the first word of "$ac_prog", so it can be a program name with args.
5206set dummy $ac_prog; ac_word=$2
5207{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5208$as_echo_n "checking for $ac_word... " >&6; }
5209if ${ac_cv_path_BASENAME+:} false; then :
5210  $as_echo_n "(cached) " >&6
5211else
5212  case $BASENAME in
5213  [\\/]* | ?:[\\/]*)
5214  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5215  ;;
5216  *)
5217  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5218for as_dir in $PATH
5219do
5220  IFS=$as_save_IFS
5221  test -z "$as_dir" && as_dir=.
5222    for ac_exec_ext in '' $ac_executable_extensions; do
5223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5224    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5226    break 2
5227  fi
5228done
5229  done
5230IFS=$as_save_IFS
5231
5232  ;;
5233esac
5234fi
5235BASENAME=$ac_cv_path_BASENAME
5236if test -n "$BASENAME"; then
5237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5238$as_echo "$BASENAME" >&6; }
5239else
5240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5241$as_echo "no" >&6; }
5242fi
5243
5244
5245  test -n "$BASENAME" && break
5246done
5247
5248    else
5249      # If it succeeded, then it was overridden by the user. We will use it
5250      # for the tool.
5251
5252      # First remove it from the list of overridden variables, so we can test
5253      # for unknown variables in the end.
5254      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5255
5256      # Check if we try to supply an empty value
5257      if test "x$BASENAME" = x; then
5258        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASENAME= (no value)" >&5
5259$as_echo "$as_me: Setting user supplied tool BASENAME= (no value)" >&6;}
5260        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5261$as_echo_n "checking for BASENAME... " >&6; }
5262        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5263$as_echo "disabled" >&6; }
5264      else
5265        # Check if the provided tool contains a complete path.
5266        tool_specified="$BASENAME"
5267        tool_basename="${tool_specified##*/}"
5268        if test "x$tool_basename" = "x$tool_specified"; then
5269          # A command without a complete path is provided, search $PATH.
5270          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASENAME=$tool_basename" >&5
5271$as_echo "$as_me: Will search for user supplied tool BASENAME=$tool_basename" >&6;}
5272          # Extract the first word of "$tool_basename", so it can be a program name with args.
5273set dummy $tool_basename; ac_word=$2
5274{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5275$as_echo_n "checking for $ac_word... " >&6; }
5276if ${ac_cv_path_BASENAME+:} false; then :
5277  $as_echo_n "(cached) " >&6
5278else
5279  case $BASENAME in
5280  [\\/]* | ?:[\\/]*)
5281  ac_cv_path_BASENAME="$BASENAME" # Let the user override the test with a path.
5282  ;;
5283  *)
5284  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5285for as_dir in $PATH
5286do
5287  IFS=$as_save_IFS
5288  test -z "$as_dir" && as_dir=.
5289    for ac_exec_ext in '' $ac_executable_extensions; do
5290  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5291    ac_cv_path_BASENAME="$as_dir/$ac_word$ac_exec_ext"
5292    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5293    break 2
5294  fi
5295done
5296  done
5297IFS=$as_save_IFS
5298
5299  ;;
5300esac
5301fi
5302BASENAME=$ac_cv_path_BASENAME
5303if test -n "$BASENAME"; then
5304  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASENAME" >&5
5305$as_echo "$BASENAME" >&6; }
5306else
5307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5308$as_echo "no" >&6; }
5309fi
5310
5311
5312          if test "x$BASENAME" = x; then
5313            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5314          fi
5315        else
5316          # Otherwise we believe it is a complete path. Use it as it is.
5317          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASENAME=$tool_specified" >&5
5318$as_echo "$as_me: Will use user supplied tool BASENAME=$tool_specified" >&6;}
5319          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASENAME" >&5
5320$as_echo_n "checking for BASENAME... " >&6; }
5321          if test ! -x "$tool_specified"; then
5322            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5323$as_echo "not found" >&6; }
5324            as_fn_error $? "User supplied tool BASENAME=$tool_specified does not exist or is not executable" "$LINENO" 5
5325          fi
5326          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5327$as_echo "$tool_specified" >&6; }
5328        fi
5329      fi
5330    fi
5331
5332  fi
5333
5334
5335
5336  if test "x$BASENAME" = x; then
5337    as_fn_error $? "Could not find required tool for BASENAME" "$LINENO" 5
5338  fi
5339
5340
5341
5342
5343
5344  # Publish this variable in the help.
5345
5346
5347  if [ -z "${BASH+x}" ]; then
5348    # The variable is not set by user, try to locate tool using the code snippet
5349    for ac_prog in bash
5350do
5351  # Extract the first word of "$ac_prog", so it can be a program name with args.
5352set dummy $ac_prog; ac_word=$2
5353{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5354$as_echo_n "checking for $ac_word... " >&6; }
5355if ${ac_cv_path_BASH+:} false; then :
5356  $as_echo_n "(cached) " >&6
5357else
5358  case $BASH in
5359  [\\/]* | ?:[\\/]*)
5360  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5361  ;;
5362  *)
5363  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5364for as_dir in $PATH
5365do
5366  IFS=$as_save_IFS
5367  test -z "$as_dir" && as_dir=.
5368    for ac_exec_ext in '' $ac_executable_extensions; do
5369  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5370    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5371    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5372    break 2
5373  fi
5374done
5375  done
5376IFS=$as_save_IFS
5377
5378  ;;
5379esac
5380fi
5381BASH=$ac_cv_path_BASH
5382if test -n "$BASH"; then
5383  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5384$as_echo "$BASH" >&6; }
5385else
5386  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5387$as_echo "no" >&6; }
5388fi
5389
5390
5391  test -n "$BASH" && break
5392done
5393
5394  else
5395    # The variable is set, but is it from the command line or the environment?
5396
5397    # Try to remove the string !BASH! from our list.
5398    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BASH!/}
5399    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5400      # If it failed, the variable was not from the command line. Ignore it,
5401      # but warn the user (except for BASH, which is always set by the calling BASH).
5402      if test "xBASH" != xBASH; then
5403        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&5
5404$as_echo "$as_me: WARNING: Ignoring value of BASH from the environment. Use command line variables instead." >&2;}
5405      fi
5406      # Try to locate tool using the code snippet
5407      for ac_prog in bash
5408do
5409  # Extract the first word of "$ac_prog", so it can be a program name with args.
5410set dummy $ac_prog; ac_word=$2
5411{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5412$as_echo_n "checking for $ac_word... " >&6; }
5413if ${ac_cv_path_BASH+:} false; then :
5414  $as_echo_n "(cached) " >&6
5415else
5416  case $BASH in
5417  [\\/]* | ?:[\\/]*)
5418  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5419  ;;
5420  *)
5421  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5422for as_dir in $PATH
5423do
5424  IFS=$as_save_IFS
5425  test -z "$as_dir" && as_dir=.
5426    for ac_exec_ext in '' $ac_executable_extensions; do
5427  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5428    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5429    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5430    break 2
5431  fi
5432done
5433  done
5434IFS=$as_save_IFS
5435
5436  ;;
5437esac
5438fi
5439BASH=$ac_cv_path_BASH
5440if test -n "$BASH"; then
5441  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5442$as_echo "$BASH" >&6; }
5443else
5444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5445$as_echo "no" >&6; }
5446fi
5447
5448
5449  test -n "$BASH" && break
5450done
5451
5452    else
5453      # If it succeeded, then it was overridden by the user. We will use it
5454      # for the tool.
5455
5456      # First remove it from the list of overridden variables, so we can test
5457      # for unknown variables in the end.
5458      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5459
5460      # Check if we try to supply an empty value
5461      if test "x$BASH" = x; then
5462        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BASH= (no value)" >&5
5463$as_echo "$as_me: Setting user supplied tool BASH= (no value)" >&6;}
5464        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5465$as_echo_n "checking for BASH... " >&6; }
5466        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5467$as_echo "disabled" >&6; }
5468      else
5469        # Check if the provided tool contains a complete path.
5470        tool_specified="$BASH"
5471        tool_basename="${tool_specified##*/}"
5472        if test "x$tool_basename" = "x$tool_specified"; then
5473          # A command without a complete path is provided, search $PATH.
5474          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BASH=$tool_basename" >&5
5475$as_echo "$as_me: Will search for user supplied tool BASH=$tool_basename" >&6;}
5476          # Extract the first word of "$tool_basename", so it can be a program name with args.
5477set dummy $tool_basename; ac_word=$2
5478{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5479$as_echo_n "checking for $ac_word... " >&6; }
5480if ${ac_cv_path_BASH+:} false; then :
5481  $as_echo_n "(cached) " >&6
5482else
5483  case $BASH in
5484  [\\/]* | ?:[\\/]*)
5485  ac_cv_path_BASH="$BASH" # Let the user override the test with a path.
5486  ;;
5487  *)
5488  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5489for as_dir in $PATH
5490do
5491  IFS=$as_save_IFS
5492  test -z "$as_dir" && as_dir=.
5493    for ac_exec_ext in '' $ac_executable_extensions; do
5494  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5495    ac_cv_path_BASH="$as_dir/$ac_word$ac_exec_ext"
5496    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5497    break 2
5498  fi
5499done
5500  done
5501IFS=$as_save_IFS
5502
5503  ;;
5504esac
5505fi
5506BASH=$ac_cv_path_BASH
5507if test -n "$BASH"; then
5508  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BASH" >&5
5509$as_echo "$BASH" >&6; }
5510else
5511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5512$as_echo "no" >&6; }
5513fi
5514
5515
5516          if test "x$BASH" = x; then
5517            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5518          fi
5519        else
5520          # Otherwise we believe it is a complete path. Use it as it is.
5521          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BASH=$tool_specified" >&5
5522$as_echo "$as_me: Will use user supplied tool BASH=$tool_specified" >&6;}
5523          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BASH" >&5
5524$as_echo_n "checking for BASH... " >&6; }
5525          if test ! -x "$tool_specified"; then
5526            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5527$as_echo "not found" >&6; }
5528            as_fn_error $? "User supplied tool BASH=$tool_specified does not exist or is not executable" "$LINENO" 5
5529          fi
5530          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5531$as_echo "$tool_specified" >&6; }
5532        fi
5533      fi
5534    fi
5535
5536  fi
5537
5538
5539
5540  if test "x$BASH" = x; then
5541    as_fn_error $? "Could not find required tool for BASH" "$LINENO" 5
5542  fi
5543
5544
5545
5546
5547
5548  # Publish this variable in the help.
5549
5550
5551  if [ -z "${CAT+x}" ]; then
5552    # The variable is not set by user, try to locate tool using the code snippet
5553    for ac_prog in cat
5554do
5555  # Extract the first word of "$ac_prog", so it can be a program name with args.
5556set dummy $ac_prog; ac_word=$2
5557{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5558$as_echo_n "checking for $ac_word... " >&6; }
5559if ${ac_cv_path_CAT+:} false; then :
5560  $as_echo_n "(cached) " >&6
5561else
5562  case $CAT in
5563  [\\/]* | ?:[\\/]*)
5564  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5565  ;;
5566  *)
5567  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5568for as_dir in $PATH
5569do
5570  IFS=$as_save_IFS
5571  test -z "$as_dir" && as_dir=.
5572    for ac_exec_ext in '' $ac_executable_extensions; do
5573  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5574    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5575    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5576    break 2
5577  fi
5578done
5579  done
5580IFS=$as_save_IFS
5581
5582  ;;
5583esac
5584fi
5585CAT=$ac_cv_path_CAT
5586if test -n "$CAT"; then
5587  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5588$as_echo "$CAT" >&6; }
5589else
5590  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5591$as_echo "no" >&6; }
5592fi
5593
5594
5595  test -n "$CAT" && break
5596done
5597
5598  else
5599    # The variable is set, but is it from the command line or the environment?
5600
5601    # Try to remove the string !CAT! from our list.
5602    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CAT!/}
5603    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5604      # If it failed, the variable was not from the command line. Ignore it,
5605      # but warn the user (except for BASH, which is always set by the calling BASH).
5606      if test "xCAT" != xBASH; then
5607        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&5
5608$as_echo "$as_me: WARNING: Ignoring value of CAT from the environment. Use command line variables instead." >&2;}
5609      fi
5610      # Try to locate tool using the code snippet
5611      for ac_prog in cat
5612do
5613  # Extract the first word of "$ac_prog", so it can be a program name with args.
5614set dummy $ac_prog; ac_word=$2
5615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5616$as_echo_n "checking for $ac_word... " >&6; }
5617if ${ac_cv_path_CAT+:} false; then :
5618  $as_echo_n "(cached) " >&6
5619else
5620  case $CAT in
5621  [\\/]* | ?:[\\/]*)
5622  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5623  ;;
5624  *)
5625  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5626for as_dir in $PATH
5627do
5628  IFS=$as_save_IFS
5629  test -z "$as_dir" && as_dir=.
5630    for ac_exec_ext in '' $ac_executable_extensions; do
5631  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5632    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5633    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5634    break 2
5635  fi
5636done
5637  done
5638IFS=$as_save_IFS
5639
5640  ;;
5641esac
5642fi
5643CAT=$ac_cv_path_CAT
5644if test -n "$CAT"; then
5645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5646$as_echo "$CAT" >&6; }
5647else
5648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5649$as_echo "no" >&6; }
5650fi
5651
5652
5653  test -n "$CAT" && break
5654done
5655
5656    else
5657      # If it succeeded, then it was overridden by the user. We will use it
5658      # for the tool.
5659
5660      # First remove it from the list of overridden variables, so we can test
5661      # for unknown variables in the end.
5662      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5663
5664      # Check if we try to supply an empty value
5665      if test "x$CAT" = x; then
5666        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CAT= (no value)" >&5
5667$as_echo "$as_me: Setting user supplied tool CAT= (no value)" >&6;}
5668        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5669$as_echo_n "checking for CAT... " >&6; }
5670        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5671$as_echo "disabled" >&6; }
5672      else
5673        # Check if the provided tool contains a complete path.
5674        tool_specified="$CAT"
5675        tool_basename="${tool_specified##*/}"
5676        if test "x$tool_basename" = "x$tool_specified"; then
5677          # A command without a complete path is provided, search $PATH.
5678          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CAT=$tool_basename" >&5
5679$as_echo "$as_me: Will search for user supplied tool CAT=$tool_basename" >&6;}
5680          # Extract the first word of "$tool_basename", so it can be a program name with args.
5681set dummy $tool_basename; ac_word=$2
5682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5683$as_echo_n "checking for $ac_word... " >&6; }
5684if ${ac_cv_path_CAT+:} false; then :
5685  $as_echo_n "(cached) " >&6
5686else
5687  case $CAT in
5688  [\\/]* | ?:[\\/]*)
5689  ac_cv_path_CAT="$CAT" # Let the user override the test with a path.
5690  ;;
5691  *)
5692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5693for as_dir in $PATH
5694do
5695  IFS=$as_save_IFS
5696  test -z "$as_dir" && as_dir=.
5697    for ac_exec_ext in '' $ac_executable_extensions; do
5698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5699    ac_cv_path_CAT="$as_dir/$ac_word$ac_exec_ext"
5700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5701    break 2
5702  fi
5703done
5704  done
5705IFS=$as_save_IFS
5706
5707  ;;
5708esac
5709fi
5710CAT=$ac_cv_path_CAT
5711if test -n "$CAT"; then
5712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CAT" >&5
5713$as_echo "$CAT" >&6; }
5714else
5715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5716$as_echo "no" >&6; }
5717fi
5718
5719
5720          if test "x$CAT" = x; then
5721            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5722          fi
5723        else
5724          # Otherwise we believe it is a complete path. Use it as it is.
5725          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CAT=$tool_specified" >&5
5726$as_echo "$as_me: Will use user supplied tool CAT=$tool_specified" >&6;}
5727          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CAT" >&5
5728$as_echo_n "checking for CAT... " >&6; }
5729          if test ! -x "$tool_specified"; then
5730            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5731$as_echo "not found" >&6; }
5732            as_fn_error $? "User supplied tool CAT=$tool_specified does not exist or is not executable" "$LINENO" 5
5733          fi
5734          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5735$as_echo "$tool_specified" >&6; }
5736        fi
5737      fi
5738    fi
5739
5740  fi
5741
5742
5743
5744  if test "x$CAT" = x; then
5745    as_fn_error $? "Could not find required tool for CAT" "$LINENO" 5
5746  fi
5747
5748
5749
5750
5751
5752  # Publish this variable in the help.
5753
5754
5755  if [ -z "${CHMOD+x}" ]; then
5756    # The variable is not set by user, try to locate tool using the code snippet
5757    for ac_prog in chmod
5758do
5759  # Extract the first word of "$ac_prog", so it can be a program name with args.
5760set dummy $ac_prog; ac_word=$2
5761{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5762$as_echo_n "checking for $ac_word... " >&6; }
5763if ${ac_cv_path_CHMOD+:} false; then :
5764  $as_echo_n "(cached) " >&6
5765else
5766  case $CHMOD in
5767  [\\/]* | ?:[\\/]*)
5768  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5769  ;;
5770  *)
5771  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5772for as_dir in $PATH
5773do
5774  IFS=$as_save_IFS
5775  test -z "$as_dir" && as_dir=.
5776    for ac_exec_ext in '' $ac_executable_extensions; do
5777  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5778    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5779    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5780    break 2
5781  fi
5782done
5783  done
5784IFS=$as_save_IFS
5785
5786  ;;
5787esac
5788fi
5789CHMOD=$ac_cv_path_CHMOD
5790if test -n "$CHMOD"; then
5791  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5792$as_echo "$CHMOD" >&6; }
5793else
5794  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5795$as_echo "no" >&6; }
5796fi
5797
5798
5799  test -n "$CHMOD" && break
5800done
5801
5802  else
5803    # The variable is set, but is it from the command line or the environment?
5804
5805    # Try to remove the string !CHMOD! from our list.
5806    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CHMOD!/}
5807    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
5808      # If it failed, the variable was not from the command line. Ignore it,
5809      # but warn the user (except for BASH, which is always set by the calling BASH).
5810      if test "xCHMOD" != xBASH; then
5811        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&5
5812$as_echo "$as_me: WARNING: Ignoring value of CHMOD from the environment. Use command line variables instead." >&2;}
5813      fi
5814      # Try to locate tool using the code snippet
5815      for ac_prog in chmod
5816do
5817  # Extract the first word of "$ac_prog", so it can be a program name with args.
5818set dummy $ac_prog; ac_word=$2
5819{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5820$as_echo_n "checking for $ac_word... " >&6; }
5821if ${ac_cv_path_CHMOD+:} false; then :
5822  $as_echo_n "(cached) " >&6
5823else
5824  case $CHMOD in
5825  [\\/]* | ?:[\\/]*)
5826  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5827  ;;
5828  *)
5829  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5830for as_dir in $PATH
5831do
5832  IFS=$as_save_IFS
5833  test -z "$as_dir" && as_dir=.
5834    for ac_exec_ext in '' $ac_executable_extensions; do
5835  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5836    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5837    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5838    break 2
5839  fi
5840done
5841  done
5842IFS=$as_save_IFS
5843
5844  ;;
5845esac
5846fi
5847CHMOD=$ac_cv_path_CHMOD
5848if test -n "$CHMOD"; then
5849  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5850$as_echo "$CHMOD" >&6; }
5851else
5852  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5853$as_echo "no" >&6; }
5854fi
5855
5856
5857  test -n "$CHMOD" && break
5858done
5859
5860    else
5861      # If it succeeded, then it was overridden by the user. We will use it
5862      # for the tool.
5863
5864      # First remove it from the list of overridden variables, so we can test
5865      # for unknown variables in the end.
5866      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
5867
5868      # Check if we try to supply an empty value
5869      if test "x$CHMOD" = x; then
5870        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CHMOD= (no value)" >&5
5871$as_echo "$as_me: Setting user supplied tool CHMOD= (no value)" >&6;}
5872        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5873$as_echo_n "checking for CHMOD... " >&6; }
5874        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
5875$as_echo "disabled" >&6; }
5876      else
5877        # Check if the provided tool contains a complete path.
5878        tool_specified="$CHMOD"
5879        tool_basename="${tool_specified##*/}"
5880        if test "x$tool_basename" = "x$tool_specified"; then
5881          # A command without a complete path is provided, search $PATH.
5882          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CHMOD=$tool_basename" >&5
5883$as_echo "$as_me: Will search for user supplied tool CHMOD=$tool_basename" >&6;}
5884          # Extract the first word of "$tool_basename", so it can be a program name with args.
5885set dummy $tool_basename; ac_word=$2
5886{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5887$as_echo_n "checking for $ac_word... " >&6; }
5888if ${ac_cv_path_CHMOD+:} false; then :
5889  $as_echo_n "(cached) " >&6
5890else
5891  case $CHMOD in
5892  [\\/]* | ?:[\\/]*)
5893  ac_cv_path_CHMOD="$CHMOD" # Let the user override the test with a path.
5894  ;;
5895  *)
5896  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5897for as_dir in $PATH
5898do
5899  IFS=$as_save_IFS
5900  test -z "$as_dir" && as_dir=.
5901    for ac_exec_ext in '' $ac_executable_extensions; do
5902  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5903    ac_cv_path_CHMOD="$as_dir/$ac_word$ac_exec_ext"
5904    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5905    break 2
5906  fi
5907done
5908  done
5909IFS=$as_save_IFS
5910
5911  ;;
5912esac
5913fi
5914CHMOD=$ac_cv_path_CHMOD
5915if test -n "$CHMOD"; then
5916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHMOD" >&5
5917$as_echo "$CHMOD" >&6; }
5918else
5919  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5920$as_echo "no" >&6; }
5921fi
5922
5923
5924          if test "x$CHMOD" = x; then
5925            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
5926          fi
5927        else
5928          # Otherwise we believe it is a complete path. Use it as it is.
5929          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CHMOD=$tool_specified" >&5
5930$as_echo "$as_me: Will use user supplied tool CHMOD=$tool_specified" >&6;}
5931          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CHMOD" >&5
5932$as_echo_n "checking for CHMOD... " >&6; }
5933          if test ! -x "$tool_specified"; then
5934            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
5935$as_echo "not found" >&6; }
5936            as_fn_error $? "User supplied tool CHMOD=$tool_specified does not exist or is not executable" "$LINENO" 5
5937          fi
5938          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
5939$as_echo "$tool_specified" >&6; }
5940        fi
5941      fi
5942    fi
5943
5944  fi
5945
5946
5947
5948  if test "x$CHMOD" = x; then
5949    as_fn_error $? "Could not find required tool for CHMOD" "$LINENO" 5
5950  fi
5951
5952
5953
5954
5955
5956  # Publish this variable in the help.
5957
5958
5959  if [ -z "${CMP+x}" ]; then
5960    # The variable is not set by user, try to locate tool using the code snippet
5961    for ac_prog in cmp
5962do
5963  # Extract the first word of "$ac_prog", so it can be a program name with args.
5964set dummy $ac_prog; ac_word=$2
5965{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
5966$as_echo_n "checking for $ac_word... " >&6; }
5967if ${ac_cv_path_CMP+:} false; then :
5968  $as_echo_n "(cached) " >&6
5969else
5970  case $CMP in
5971  [\\/]* | ?:[\\/]*)
5972  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
5973  ;;
5974  *)
5975  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
5976for as_dir in $PATH
5977do
5978  IFS=$as_save_IFS
5979  test -z "$as_dir" && as_dir=.
5980    for ac_exec_ext in '' $ac_executable_extensions; do
5981  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
5982    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
5983    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
5984    break 2
5985  fi
5986done
5987  done
5988IFS=$as_save_IFS
5989
5990  ;;
5991esac
5992fi
5993CMP=$ac_cv_path_CMP
5994if test -n "$CMP"; then
5995  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
5996$as_echo "$CMP" >&6; }
5997else
5998  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
5999$as_echo "no" >&6; }
6000fi
6001
6002
6003  test -n "$CMP" && break
6004done
6005
6006  else
6007    # The variable is set, but is it from the command line or the environment?
6008
6009    # Try to remove the string !CMP! from our list.
6010    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CMP!/}
6011    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6012      # If it failed, the variable was not from the command line. Ignore it,
6013      # but warn the user (except for BASH, which is always set by the calling BASH).
6014      if test "xCMP" != xBASH; then
6015        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&5
6016$as_echo "$as_me: WARNING: Ignoring value of CMP from the environment. Use command line variables instead." >&2;}
6017      fi
6018      # Try to locate tool using the code snippet
6019      for ac_prog in cmp
6020do
6021  # Extract the first word of "$ac_prog", so it can be a program name with args.
6022set dummy $ac_prog; ac_word=$2
6023{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6024$as_echo_n "checking for $ac_word... " >&6; }
6025if ${ac_cv_path_CMP+:} false; then :
6026  $as_echo_n "(cached) " >&6
6027else
6028  case $CMP in
6029  [\\/]* | ?:[\\/]*)
6030  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6031  ;;
6032  *)
6033  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6034for as_dir in $PATH
6035do
6036  IFS=$as_save_IFS
6037  test -z "$as_dir" && as_dir=.
6038    for ac_exec_ext in '' $ac_executable_extensions; do
6039  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6040    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6041    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6042    break 2
6043  fi
6044done
6045  done
6046IFS=$as_save_IFS
6047
6048  ;;
6049esac
6050fi
6051CMP=$ac_cv_path_CMP
6052if test -n "$CMP"; then
6053  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6054$as_echo "$CMP" >&6; }
6055else
6056  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6057$as_echo "no" >&6; }
6058fi
6059
6060
6061  test -n "$CMP" && break
6062done
6063
6064    else
6065      # If it succeeded, then it was overridden by the user. We will use it
6066      # for the tool.
6067
6068      # First remove it from the list of overridden variables, so we can test
6069      # for unknown variables in the end.
6070      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6071
6072      # Check if we try to supply an empty value
6073      if test "x$CMP" = x; then
6074        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CMP= (no value)" >&5
6075$as_echo "$as_me: Setting user supplied tool CMP= (no value)" >&6;}
6076        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6077$as_echo_n "checking for CMP... " >&6; }
6078        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6079$as_echo "disabled" >&6; }
6080      else
6081        # Check if the provided tool contains a complete path.
6082        tool_specified="$CMP"
6083        tool_basename="${tool_specified##*/}"
6084        if test "x$tool_basename" = "x$tool_specified"; then
6085          # A command without a complete path is provided, search $PATH.
6086          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CMP=$tool_basename" >&5
6087$as_echo "$as_me: Will search for user supplied tool CMP=$tool_basename" >&6;}
6088          # Extract the first word of "$tool_basename", so it can be a program name with args.
6089set dummy $tool_basename; ac_word=$2
6090{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6091$as_echo_n "checking for $ac_word... " >&6; }
6092if ${ac_cv_path_CMP+:} false; then :
6093  $as_echo_n "(cached) " >&6
6094else
6095  case $CMP in
6096  [\\/]* | ?:[\\/]*)
6097  ac_cv_path_CMP="$CMP" # Let the user override the test with a path.
6098  ;;
6099  *)
6100  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6101for as_dir in $PATH
6102do
6103  IFS=$as_save_IFS
6104  test -z "$as_dir" && as_dir=.
6105    for ac_exec_ext in '' $ac_executable_extensions; do
6106  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6107    ac_cv_path_CMP="$as_dir/$ac_word$ac_exec_ext"
6108    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6109    break 2
6110  fi
6111done
6112  done
6113IFS=$as_save_IFS
6114
6115  ;;
6116esac
6117fi
6118CMP=$ac_cv_path_CMP
6119if test -n "$CMP"; then
6120  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CMP" >&5
6121$as_echo "$CMP" >&6; }
6122else
6123  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6124$as_echo "no" >&6; }
6125fi
6126
6127
6128          if test "x$CMP" = x; then
6129            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6130          fi
6131        else
6132          # Otherwise we believe it is a complete path. Use it as it is.
6133          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CMP=$tool_specified" >&5
6134$as_echo "$as_me: Will use user supplied tool CMP=$tool_specified" >&6;}
6135          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CMP" >&5
6136$as_echo_n "checking for CMP... " >&6; }
6137          if test ! -x "$tool_specified"; then
6138            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6139$as_echo "not found" >&6; }
6140            as_fn_error $? "User supplied tool CMP=$tool_specified does not exist or is not executable" "$LINENO" 5
6141          fi
6142          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6143$as_echo "$tool_specified" >&6; }
6144        fi
6145      fi
6146    fi
6147
6148  fi
6149
6150
6151
6152  if test "x$CMP" = x; then
6153    as_fn_error $? "Could not find required tool for CMP" "$LINENO" 5
6154  fi
6155
6156
6157
6158
6159
6160  # Publish this variable in the help.
6161
6162
6163  if [ -z "${COMM+x}" ]; then
6164    # The variable is not set by user, try to locate tool using the code snippet
6165    for ac_prog in comm
6166do
6167  # Extract the first word of "$ac_prog", so it can be a program name with args.
6168set dummy $ac_prog; ac_word=$2
6169{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6170$as_echo_n "checking for $ac_word... " >&6; }
6171if ${ac_cv_path_COMM+:} false; then :
6172  $as_echo_n "(cached) " >&6
6173else
6174  case $COMM in
6175  [\\/]* | ?:[\\/]*)
6176  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6177  ;;
6178  *)
6179  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6180for as_dir in $PATH
6181do
6182  IFS=$as_save_IFS
6183  test -z "$as_dir" && as_dir=.
6184    for ac_exec_ext in '' $ac_executable_extensions; do
6185  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6186    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6187    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6188    break 2
6189  fi
6190done
6191  done
6192IFS=$as_save_IFS
6193
6194  ;;
6195esac
6196fi
6197COMM=$ac_cv_path_COMM
6198if test -n "$COMM"; then
6199  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6200$as_echo "$COMM" >&6; }
6201else
6202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6203$as_echo "no" >&6; }
6204fi
6205
6206
6207  test -n "$COMM" && break
6208done
6209
6210  else
6211    # The variable is set, but is it from the command line or the environment?
6212
6213    # Try to remove the string !COMM! from our list.
6214    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!COMM!/}
6215    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6216      # If it failed, the variable was not from the command line. Ignore it,
6217      # but warn the user (except for BASH, which is always set by the calling BASH).
6218      if test "xCOMM" != xBASH; then
6219        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&5
6220$as_echo "$as_me: WARNING: Ignoring value of COMM from the environment. Use command line variables instead." >&2;}
6221      fi
6222      # Try to locate tool using the code snippet
6223      for ac_prog in comm
6224do
6225  # Extract the first word of "$ac_prog", so it can be a program name with args.
6226set dummy $ac_prog; ac_word=$2
6227{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6228$as_echo_n "checking for $ac_word... " >&6; }
6229if ${ac_cv_path_COMM+:} false; then :
6230  $as_echo_n "(cached) " >&6
6231else
6232  case $COMM in
6233  [\\/]* | ?:[\\/]*)
6234  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6235  ;;
6236  *)
6237  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6238for as_dir in $PATH
6239do
6240  IFS=$as_save_IFS
6241  test -z "$as_dir" && as_dir=.
6242    for ac_exec_ext in '' $ac_executable_extensions; do
6243  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6244    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6245    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6246    break 2
6247  fi
6248done
6249  done
6250IFS=$as_save_IFS
6251
6252  ;;
6253esac
6254fi
6255COMM=$ac_cv_path_COMM
6256if test -n "$COMM"; then
6257  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6258$as_echo "$COMM" >&6; }
6259else
6260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6261$as_echo "no" >&6; }
6262fi
6263
6264
6265  test -n "$COMM" && break
6266done
6267
6268    else
6269      # If it succeeded, then it was overridden by the user. We will use it
6270      # for the tool.
6271
6272      # First remove it from the list of overridden variables, so we can test
6273      # for unknown variables in the end.
6274      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6275
6276      # Check if we try to supply an empty value
6277      if test "x$COMM" = x; then
6278        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool COMM= (no value)" >&5
6279$as_echo "$as_me: Setting user supplied tool COMM= (no value)" >&6;}
6280        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6281$as_echo_n "checking for COMM... " >&6; }
6282        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6283$as_echo "disabled" >&6; }
6284      else
6285        # Check if the provided tool contains a complete path.
6286        tool_specified="$COMM"
6287        tool_basename="${tool_specified##*/}"
6288        if test "x$tool_basename" = "x$tool_specified"; then
6289          # A command without a complete path is provided, search $PATH.
6290          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool COMM=$tool_basename" >&5
6291$as_echo "$as_me: Will search for user supplied tool COMM=$tool_basename" >&6;}
6292          # Extract the first word of "$tool_basename", so it can be a program name with args.
6293set dummy $tool_basename; ac_word=$2
6294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6295$as_echo_n "checking for $ac_word... " >&6; }
6296if ${ac_cv_path_COMM+:} false; then :
6297  $as_echo_n "(cached) " >&6
6298else
6299  case $COMM in
6300  [\\/]* | ?:[\\/]*)
6301  ac_cv_path_COMM="$COMM" # Let the user override the test with a path.
6302  ;;
6303  *)
6304  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6305for as_dir in $PATH
6306do
6307  IFS=$as_save_IFS
6308  test -z "$as_dir" && as_dir=.
6309    for ac_exec_ext in '' $ac_executable_extensions; do
6310  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6311    ac_cv_path_COMM="$as_dir/$ac_word$ac_exec_ext"
6312    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6313    break 2
6314  fi
6315done
6316  done
6317IFS=$as_save_IFS
6318
6319  ;;
6320esac
6321fi
6322COMM=$ac_cv_path_COMM
6323if test -n "$COMM"; then
6324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMM" >&5
6325$as_echo "$COMM" >&6; }
6326else
6327  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6328$as_echo "no" >&6; }
6329fi
6330
6331
6332          if test "x$COMM" = x; then
6333            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6334          fi
6335        else
6336          # Otherwise we believe it is a complete path. Use it as it is.
6337          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool COMM=$tool_specified" >&5
6338$as_echo "$as_me: Will use user supplied tool COMM=$tool_specified" >&6;}
6339          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for COMM" >&5
6340$as_echo_n "checking for COMM... " >&6; }
6341          if test ! -x "$tool_specified"; then
6342            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6343$as_echo "not found" >&6; }
6344            as_fn_error $? "User supplied tool COMM=$tool_specified does not exist or is not executable" "$LINENO" 5
6345          fi
6346          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6347$as_echo "$tool_specified" >&6; }
6348        fi
6349      fi
6350    fi
6351
6352  fi
6353
6354
6355
6356  if test "x$COMM" = x; then
6357    as_fn_error $? "Could not find required tool for COMM" "$LINENO" 5
6358  fi
6359
6360
6361
6362
6363
6364  # Publish this variable in the help.
6365
6366
6367  if [ -z "${CP+x}" ]; then
6368    # The variable is not set by user, try to locate tool using the code snippet
6369    for ac_prog in cp
6370do
6371  # Extract the first word of "$ac_prog", so it can be a program name with args.
6372set dummy $ac_prog; ac_word=$2
6373{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6374$as_echo_n "checking for $ac_word... " >&6; }
6375if ${ac_cv_path_CP+:} false; then :
6376  $as_echo_n "(cached) " >&6
6377else
6378  case $CP in
6379  [\\/]* | ?:[\\/]*)
6380  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6381  ;;
6382  *)
6383  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6384for as_dir in $PATH
6385do
6386  IFS=$as_save_IFS
6387  test -z "$as_dir" && as_dir=.
6388    for ac_exec_ext in '' $ac_executable_extensions; do
6389  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6390    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6391    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6392    break 2
6393  fi
6394done
6395  done
6396IFS=$as_save_IFS
6397
6398  ;;
6399esac
6400fi
6401CP=$ac_cv_path_CP
6402if test -n "$CP"; then
6403  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6404$as_echo "$CP" >&6; }
6405else
6406  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6407$as_echo "no" >&6; }
6408fi
6409
6410
6411  test -n "$CP" && break
6412done
6413
6414  else
6415    # The variable is set, but is it from the command line or the environment?
6416
6417    # Try to remove the string !CP! from our list.
6418    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CP!/}
6419    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6420      # If it failed, the variable was not from the command line. Ignore it,
6421      # but warn the user (except for BASH, which is always set by the calling BASH).
6422      if test "xCP" != xBASH; then
6423        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&5
6424$as_echo "$as_me: WARNING: Ignoring value of CP from the environment. Use command line variables instead." >&2;}
6425      fi
6426      # Try to locate tool using the code snippet
6427      for ac_prog in cp
6428do
6429  # Extract the first word of "$ac_prog", so it can be a program name with args.
6430set dummy $ac_prog; ac_word=$2
6431{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6432$as_echo_n "checking for $ac_word... " >&6; }
6433if ${ac_cv_path_CP+:} false; then :
6434  $as_echo_n "(cached) " >&6
6435else
6436  case $CP in
6437  [\\/]* | ?:[\\/]*)
6438  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6439  ;;
6440  *)
6441  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6442for as_dir in $PATH
6443do
6444  IFS=$as_save_IFS
6445  test -z "$as_dir" && as_dir=.
6446    for ac_exec_ext in '' $ac_executable_extensions; do
6447  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6448    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6449    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6450    break 2
6451  fi
6452done
6453  done
6454IFS=$as_save_IFS
6455
6456  ;;
6457esac
6458fi
6459CP=$ac_cv_path_CP
6460if test -n "$CP"; then
6461  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6462$as_echo "$CP" >&6; }
6463else
6464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6465$as_echo "no" >&6; }
6466fi
6467
6468
6469  test -n "$CP" && break
6470done
6471
6472    else
6473      # If it succeeded, then it was overridden by the user. We will use it
6474      # for the tool.
6475
6476      # First remove it from the list of overridden variables, so we can test
6477      # for unknown variables in the end.
6478      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6479
6480      # Check if we try to supply an empty value
6481      if test "x$CP" = x; then
6482        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CP= (no value)" >&5
6483$as_echo "$as_me: Setting user supplied tool CP= (no value)" >&6;}
6484        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6485$as_echo_n "checking for CP... " >&6; }
6486        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6487$as_echo "disabled" >&6; }
6488      else
6489        # Check if the provided tool contains a complete path.
6490        tool_specified="$CP"
6491        tool_basename="${tool_specified##*/}"
6492        if test "x$tool_basename" = "x$tool_specified"; then
6493          # A command without a complete path is provided, search $PATH.
6494          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CP=$tool_basename" >&5
6495$as_echo "$as_me: Will search for user supplied tool CP=$tool_basename" >&6;}
6496          # Extract the first word of "$tool_basename", so it can be a program name with args.
6497set dummy $tool_basename; ac_word=$2
6498{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6499$as_echo_n "checking for $ac_word... " >&6; }
6500if ${ac_cv_path_CP+:} false; then :
6501  $as_echo_n "(cached) " >&6
6502else
6503  case $CP in
6504  [\\/]* | ?:[\\/]*)
6505  ac_cv_path_CP="$CP" # Let the user override the test with a path.
6506  ;;
6507  *)
6508  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6509for as_dir in $PATH
6510do
6511  IFS=$as_save_IFS
6512  test -z "$as_dir" && as_dir=.
6513    for ac_exec_ext in '' $ac_executable_extensions; do
6514  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6515    ac_cv_path_CP="$as_dir/$ac_word$ac_exec_ext"
6516    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6517    break 2
6518  fi
6519done
6520  done
6521IFS=$as_save_IFS
6522
6523  ;;
6524esac
6525fi
6526CP=$ac_cv_path_CP
6527if test -n "$CP"; then
6528  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CP" >&5
6529$as_echo "$CP" >&6; }
6530else
6531  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6532$as_echo "no" >&6; }
6533fi
6534
6535
6536          if test "x$CP" = x; then
6537            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6538          fi
6539        else
6540          # Otherwise we believe it is a complete path. Use it as it is.
6541          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CP=$tool_specified" >&5
6542$as_echo "$as_me: Will use user supplied tool CP=$tool_specified" >&6;}
6543          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CP" >&5
6544$as_echo_n "checking for CP... " >&6; }
6545          if test ! -x "$tool_specified"; then
6546            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6547$as_echo "not found" >&6; }
6548            as_fn_error $? "User supplied tool CP=$tool_specified does not exist or is not executable" "$LINENO" 5
6549          fi
6550          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6551$as_echo "$tool_specified" >&6; }
6552        fi
6553      fi
6554    fi
6555
6556  fi
6557
6558
6559
6560  if test "x$CP" = x; then
6561    as_fn_error $? "Could not find required tool for CP" "$LINENO" 5
6562  fi
6563
6564
6565
6566
6567
6568  # Publish this variable in the help.
6569
6570
6571  if [ -z "${CUT+x}" ]; then
6572    # The variable is not set by user, try to locate tool using the code snippet
6573    for ac_prog in cut
6574do
6575  # Extract the first word of "$ac_prog", so it can be a program name with args.
6576set dummy $ac_prog; ac_word=$2
6577{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6578$as_echo_n "checking for $ac_word... " >&6; }
6579if ${ac_cv_path_CUT+:} false; then :
6580  $as_echo_n "(cached) " >&6
6581else
6582  case $CUT in
6583  [\\/]* | ?:[\\/]*)
6584  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6585  ;;
6586  *)
6587  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6588for as_dir in $PATH
6589do
6590  IFS=$as_save_IFS
6591  test -z "$as_dir" && as_dir=.
6592    for ac_exec_ext in '' $ac_executable_extensions; do
6593  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6594    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6595    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6596    break 2
6597  fi
6598done
6599  done
6600IFS=$as_save_IFS
6601
6602  ;;
6603esac
6604fi
6605CUT=$ac_cv_path_CUT
6606if test -n "$CUT"; then
6607  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6608$as_echo "$CUT" >&6; }
6609else
6610  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6611$as_echo "no" >&6; }
6612fi
6613
6614
6615  test -n "$CUT" && break
6616done
6617
6618  else
6619    # The variable is set, but is it from the command line or the environment?
6620
6621    # Try to remove the string !CUT! from our list.
6622    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CUT!/}
6623    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6624      # If it failed, the variable was not from the command line. Ignore it,
6625      # but warn the user (except for BASH, which is always set by the calling BASH).
6626      if test "xCUT" != xBASH; then
6627        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&5
6628$as_echo "$as_me: WARNING: Ignoring value of CUT from the environment. Use command line variables instead." >&2;}
6629      fi
6630      # Try to locate tool using the code snippet
6631      for ac_prog in cut
6632do
6633  # Extract the first word of "$ac_prog", so it can be a program name with args.
6634set dummy $ac_prog; ac_word=$2
6635{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6636$as_echo_n "checking for $ac_word... " >&6; }
6637if ${ac_cv_path_CUT+:} false; then :
6638  $as_echo_n "(cached) " >&6
6639else
6640  case $CUT in
6641  [\\/]* | ?:[\\/]*)
6642  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6643  ;;
6644  *)
6645  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6646for as_dir in $PATH
6647do
6648  IFS=$as_save_IFS
6649  test -z "$as_dir" && as_dir=.
6650    for ac_exec_ext in '' $ac_executable_extensions; do
6651  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6652    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6653    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6654    break 2
6655  fi
6656done
6657  done
6658IFS=$as_save_IFS
6659
6660  ;;
6661esac
6662fi
6663CUT=$ac_cv_path_CUT
6664if test -n "$CUT"; then
6665  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6666$as_echo "$CUT" >&6; }
6667else
6668  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6669$as_echo "no" >&6; }
6670fi
6671
6672
6673  test -n "$CUT" && break
6674done
6675
6676    else
6677      # If it succeeded, then it was overridden by the user. We will use it
6678      # for the tool.
6679
6680      # First remove it from the list of overridden variables, so we can test
6681      # for unknown variables in the end.
6682      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6683
6684      # Check if we try to supply an empty value
6685      if test "x$CUT" = x; then
6686        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CUT= (no value)" >&5
6687$as_echo "$as_me: Setting user supplied tool CUT= (no value)" >&6;}
6688        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6689$as_echo_n "checking for CUT... " >&6; }
6690        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6691$as_echo "disabled" >&6; }
6692      else
6693        # Check if the provided tool contains a complete path.
6694        tool_specified="$CUT"
6695        tool_basename="${tool_specified##*/}"
6696        if test "x$tool_basename" = "x$tool_specified"; then
6697          # A command without a complete path is provided, search $PATH.
6698          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CUT=$tool_basename" >&5
6699$as_echo "$as_me: Will search for user supplied tool CUT=$tool_basename" >&6;}
6700          # Extract the first word of "$tool_basename", so it can be a program name with args.
6701set dummy $tool_basename; ac_word=$2
6702{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6703$as_echo_n "checking for $ac_word... " >&6; }
6704if ${ac_cv_path_CUT+:} false; then :
6705  $as_echo_n "(cached) " >&6
6706else
6707  case $CUT in
6708  [\\/]* | ?:[\\/]*)
6709  ac_cv_path_CUT="$CUT" # Let the user override the test with a path.
6710  ;;
6711  *)
6712  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6713for as_dir in $PATH
6714do
6715  IFS=$as_save_IFS
6716  test -z "$as_dir" && as_dir=.
6717    for ac_exec_ext in '' $ac_executable_extensions; do
6718  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6719    ac_cv_path_CUT="$as_dir/$ac_word$ac_exec_ext"
6720    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6721    break 2
6722  fi
6723done
6724  done
6725IFS=$as_save_IFS
6726
6727  ;;
6728esac
6729fi
6730CUT=$ac_cv_path_CUT
6731if test -n "$CUT"; then
6732  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUT" >&5
6733$as_echo "$CUT" >&6; }
6734else
6735  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6736$as_echo "no" >&6; }
6737fi
6738
6739
6740          if test "x$CUT" = x; then
6741            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6742          fi
6743        else
6744          # Otherwise we believe it is a complete path. Use it as it is.
6745          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CUT=$tool_specified" >&5
6746$as_echo "$as_me: Will use user supplied tool CUT=$tool_specified" >&6;}
6747          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CUT" >&5
6748$as_echo_n "checking for CUT... " >&6; }
6749          if test ! -x "$tool_specified"; then
6750            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6751$as_echo "not found" >&6; }
6752            as_fn_error $? "User supplied tool CUT=$tool_specified does not exist or is not executable" "$LINENO" 5
6753          fi
6754          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6755$as_echo "$tool_specified" >&6; }
6756        fi
6757      fi
6758    fi
6759
6760  fi
6761
6762
6763
6764  if test "x$CUT" = x; then
6765    as_fn_error $? "Could not find required tool for CUT" "$LINENO" 5
6766  fi
6767
6768
6769
6770
6771
6772  # Publish this variable in the help.
6773
6774
6775  if [ -z "${DATE+x}" ]; then
6776    # The variable is not set by user, try to locate tool using the code snippet
6777    for ac_prog in date
6778do
6779  # Extract the first word of "$ac_prog", so it can be a program name with args.
6780set dummy $ac_prog; ac_word=$2
6781{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6782$as_echo_n "checking for $ac_word... " >&6; }
6783if ${ac_cv_path_DATE+:} false; then :
6784  $as_echo_n "(cached) " >&6
6785else
6786  case $DATE in
6787  [\\/]* | ?:[\\/]*)
6788  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6789  ;;
6790  *)
6791  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6792for as_dir in $PATH
6793do
6794  IFS=$as_save_IFS
6795  test -z "$as_dir" && as_dir=.
6796    for ac_exec_ext in '' $ac_executable_extensions; do
6797  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6798    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6799    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6800    break 2
6801  fi
6802done
6803  done
6804IFS=$as_save_IFS
6805
6806  ;;
6807esac
6808fi
6809DATE=$ac_cv_path_DATE
6810if test -n "$DATE"; then
6811  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6812$as_echo "$DATE" >&6; }
6813else
6814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6815$as_echo "no" >&6; }
6816fi
6817
6818
6819  test -n "$DATE" && break
6820done
6821
6822  else
6823    # The variable is set, but is it from the command line or the environment?
6824
6825    # Try to remove the string !DATE! from our list.
6826    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DATE!/}
6827    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
6828      # If it failed, the variable was not from the command line. Ignore it,
6829      # but warn the user (except for BASH, which is always set by the calling BASH).
6830      if test "xDATE" != xBASH; then
6831        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&5
6832$as_echo "$as_me: WARNING: Ignoring value of DATE from the environment. Use command line variables instead." >&2;}
6833      fi
6834      # Try to locate tool using the code snippet
6835      for ac_prog in date
6836do
6837  # Extract the first word of "$ac_prog", so it can be a program name with args.
6838set dummy $ac_prog; ac_word=$2
6839{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6840$as_echo_n "checking for $ac_word... " >&6; }
6841if ${ac_cv_path_DATE+:} false; then :
6842  $as_echo_n "(cached) " >&6
6843else
6844  case $DATE in
6845  [\\/]* | ?:[\\/]*)
6846  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6847  ;;
6848  *)
6849  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6850for as_dir in $PATH
6851do
6852  IFS=$as_save_IFS
6853  test -z "$as_dir" && as_dir=.
6854    for ac_exec_ext in '' $ac_executable_extensions; do
6855  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6856    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6857    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6858    break 2
6859  fi
6860done
6861  done
6862IFS=$as_save_IFS
6863
6864  ;;
6865esac
6866fi
6867DATE=$ac_cv_path_DATE
6868if test -n "$DATE"; then
6869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6870$as_echo "$DATE" >&6; }
6871else
6872  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6873$as_echo "no" >&6; }
6874fi
6875
6876
6877  test -n "$DATE" && break
6878done
6879
6880    else
6881      # If it succeeded, then it was overridden by the user. We will use it
6882      # for the tool.
6883
6884      # First remove it from the list of overridden variables, so we can test
6885      # for unknown variables in the end.
6886      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
6887
6888      # Check if we try to supply an empty value
6889      if test "x$DATE" = x; then
6890        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DATE= (no value)" >&5
6891$as_echo "$as_me: Setting user supplied tool DATE= (no value)" >&6;}
6892        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6893$as_echo_n "checking for DATE... " >&6; }
6894        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
6895$as_echo "disabled" >&6; }
6896      else
6897        # Check if the provided tool contains a complete path.
6898        tool_specified="$DATE"
6899        tool_basename="${tool_specified##*/}"
6900        if test "x$tool_basename" = "x$tool_specified"; then
6901          # A command without a complete path is provided, search $PATH.
6902          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DATE=$tool_basename" >&5
6903$as_echo "$as_me: Will search for user supplied tool DATE=$tool_basename" >&6;}
6904          # Extract the first word of "$tool_basename", so it can be a program name with args.
6905set dummy $tool_basename; ac_word=$2
6906{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6907$as_echo_n "checking for $ac_word... " >&6; }
6908if ${ac_cv_path_DATE+:} false; then :
6909  $as_echo_n "(cached) " >&6
6910else
6911  case $DATE in
6912  [\\/]* | ?:[\\/]*)
6913  ac_cv_path_DATE="$DATE" # Let the user override the test with a path.
6914  ;;
6915  *)
6916  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6917for as_dir in $PATH
6918do
6919  IFS=$as_save_IFS
6920  test -z "$as_dir" && as_dir=.
6921    for ac_exec_ext in '' $ac_executable_extensions; do
6922  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
6923    ac_cv_path_DATE="$as_dir/$ac_word$ac_exec_ext"
6924    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
6925    break 2
6926  fi
6927done
6928  done
6929IFS=$as_save_IFS
6930
6931  ;;
6932esac
6933fi
6934DATE=$ac_cv_path_DATE
6935if test -n "$DATE"; then
6936  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DATE" >&5
6937$as_echo "$DATE" >&6; }
6938else
6939  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
6940$as_echo "no" >&6; }
6941fi
6942
6943
6944          if test "x$DATE" = x; then
6945            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
6946          fi
6947        else
6948          # Otherwise we believe it is a complete path. Use it as it is.
6949          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DATE=$tool_specified" >&5
6950$as_echo "$as_me: Will use user supplied tool DATE=$tool_specified" >&6;}
6951          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DATE" >&5
6952$as_echo_n "checking for DATE... " >&6; }
6953          if test ! -x "$tool_specified"; then
6954            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
6955$as_echo "not found" >&6; }
6956            as_fn_error $? "User supplied tool DATE=$tool_specified does not exist or is not executable" "$LINENO" 5
6957          fi
6958          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
6959$as_echo "$tool_specified" >&6; }
6960        fi
6961      fi
6962    fi
6963
6964  fi
6965
6966
6967
6968  if test "x$DATE" = x; then
6969    as_fn_error $? "Could not find required tool for DATE" "$LINENO" 5
6970  fi
6971
6972
6973
6974
6975
6976  # Publish this variable in the help.
6977
6978
6979  if [ -z "${DIFF+x}" ]; then
6980    # The variable is not set by user, try to locate tool using the code snippet
6981    for ac_prog in gdiff diff
6982do
6983  # Extract the first word of "$ac_prog", so it can be a program name with args.
6984set dummy $ac_prog; ac_word=$2
6985{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
6986$as_echo_n "checking for $ac_word... " >&6; }
6987if ${ac_cv_path_DIFF+:} false; then :
6988  $as_echo_n "(cached) " >&6
6989else
6990  case $DIFF in
6991  [\\/]* | ?:[\\/]*)
6992  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
6993  ;;
6994  *)
6995  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
6996for as_dir in $PATH
6997do
6998  IFS=$as_save_IFS
6999  test -z "$as_dir" && as_dir=.
7000    for ac_exec_ext in '' $ac_executable_extensions; do
7001  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7002    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7003    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7004    break 2
7005  fi
7006done
7007  done
7008IFS=$as_save_IFS
7009
7010  ;;
7011esac
7012fi
7013DIFF=$ac_cv_path_DIFF
7014if test -n "$DIFF"; then
7015  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7016$as_echo "$DIFF" >&6; }
7017else
7018  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7019$as_echo "no" >&6; }
7020fi
7021
7022
7023  test -n "$DIFF" && break
7024done
7025
7026  else
7027    # The variable is set, but is it from the command line or the environment?
7028
7029    # Try to remove the string !DIFF! from our list.
7030    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIFF!/}
7031    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7032      # If it failed, the variable was not from the command line. Ignore it,
7033      # but warn the user (except for BASH, which is always set by the calling BASH).
7034      if test "xDIFF" != xBASH; then
7035        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&5
7036$as_echo "$as_me: WARNING: Ignoring value of DIFF from the environment. Use command line variables instead." >&2;}
7037      fi
7038      # Try to locate tool using the code snippet
7039      for ac_prog in gdiff diff
7040do
7041  # Extract the first word of "$ac_prog", so it can be a program name with args.
7042set dummy $ac_prog; ac_word=$2
7043{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7044$as_echo_n "checking for $ac_word... " >&6; }
7045if ${ac_cv_path_DIFF+:} false; then :
7046  $as_echo_n "(cached) " >&6
7047else
7048  case $DIFF in
7049  [\\/]* | ?:[\\/]*)
7050  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7051  ;;
7052  *)
7053  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7054for as_dir in $PATH
7055do
7056  IFS=$as_save_IFS
7057  test -z "$as_dir" && as_dir=.
7058    for ac_exec_ext in '' $ac_executable_extensions; do
7059  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7060    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7061    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7062    break 2
7063  fi
7064done
7065  done
7066IFS=$as_save_IFS
7067
7068  ;;
7069esac
7070fi
7071DIFF=$ac_cv_path_DIFF
7072if test -n "$DIFF"; then
7073  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7074$as_echo "$DIFF" >&6; }
7075else
7076  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7077$as_echo "no" >&6; }
7078fi
7079
7080
7081  test -n "$DIFF" && break
7082done
7083
7084    else
7085      # If it succeeded, then it was overridden by the user. We will use it
7086      # for the tool.
7087
7088      # First remove it from the list of overridden variables, so we can test
7089      # for unknown variables in the end.
7090      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7091
7092      # Check if we try to supply an empty value
7093      if test "x$DIFF" = x; then
7094        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIFF= (no value)" >&5
7095$as_echo "$as_me: Setting user supplied tool DIFF= (no value)" >&6;}
7096        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7097$as_echo_n "checking for DIFF... " >&6; }
7098        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7099$as_echo "disabled" >&6; }
7100      else
7101        # Check if the provided tool contains a complete path.
7102        tool_specified="$DIFF"
7103        tool_basename="${tool_specified##*/}"
7104        if test "x$tool_basename" = "x$tool_specified"; then
7105          # A command without a complete path is provided, search $PATH.
7106          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIFF=$tool_basename" >&5
7107$as_echo "$as_me: Will search for user supplied tool DIFF=$tool_basename" >&6;}
7108          # Extract the first word of "$tool_basename", so it can be a program name with args.
7109set dummy $tool_basename; ac_word=$2
7110{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7111$as_echo_n "checking for $ac_word... " >&6; }
7112if ${ac_cv_path_DIFF+:} false; then :
7113  $as_echo_n "(cached) " >&6
7114else
7115  case $DIFF in
7116  [\\/]* | ?:[\\/]*)
7117  ac_cv_path_DIFF="$DIFF" # Let the user override the test with a path.
7118  ;;
7119  *)
7120  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7121for as_dir in $PATH
7122do
7123  IFS=$as_save_IFS
7124  test -z "$as_dir" && as_dir=.
7125    for ac_exec_ext in '' $ac_executable_extensions; do
7126  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7127    ac_cv_path_DIFF="$as_dir/$ac_word$ac_exec_ext"
7128    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7129    break 2
7130  fi
7131done
7132  done
7133IFS=$as_save_IFS
7134
7135  ;;
7136esac
7137fi
7138DIFF=$ac_cv_path_DIFF
7139if test -n "$DIFF"; then
7140  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIFF" >&5
7141$as_echo "$DIFF" >&6; }
7142else
7143  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7144$as_echo "no" >&6; }
7145fi
7146
7147
7148          if test "x$DIFF" = x; then
7149            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7150          fi
7151        else
7152          # Otherwise we believe it is a complete path. Use it as it is.
7153          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIFF=$tool_specified" >&5
7154$as_echo "$as_me: Will use user supplied tool DIFF=$tool_specified" >&6;}
7155          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIFF" >&5
7156$as_echo_n "checking for DIFF... " >&6; }
7157          if test ! -x "$tool_specified"; then
7158            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7159$as_echo "not found" >&6; }
7160            as_fn_error $? "User supplied tool DIFF=$tool_specified does not exist or is not executable" "$LINENO" 5
7161          fi
7162          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7163$as_echo "$tool_specified" >&6; }
7164        fi
7165      fi
7166    fi
7167
7168  fi
7169
7170
7171
7172  if test "x$DIFF" = x; then
7173    as_fn_error $? "Could not find required tool for DIFF" "$LINENO" 5
7174  fi
7175
7176
7177
7178
7179
7180  # Publish this variable in the help.
7181
7182
7183  if [ -z "${DIRNAME+x}" ]; then
7184    # The variable is not set by user, try to locate tool using the code snippet
7185    for ac_prog in dirname
7186do
7187  # Extract the first word of "$ac_prog", so it can be a program name with args.
7188set dummy $ac_prog; ac_word=$2
7189{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7190$as_echo_n "checking for $ac_word... " >&6; }
7191if ${ac_cv_path_DIRNAME+:} false; then :
7192  $as_echo_n "(cached) " >&6
7193else
7194  case $DIRNAME in
7195  [\\/]* | ?:[\\/]*)
7196  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7197  ;;
7198  *)
7199  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7200for as_dir in $PATH
7201do
7202  IFS=$as_save_IFS
7203  test -z "$as_dir" && as_dir=.
7204    for ac_exec_ext in '' $ac_executable_extensions; do
7205  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7206    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7207    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7208    break 2
7209  fi
7210done
7211  done
7212IFS=$as_save_IFS
7213
7214  ;;
7215esac
7216fi
7217DIRNAME=$ac_cv_path_DIRNAME
7218if test -n "$DIRNAME"; then
7219  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7220$as_echo "$DIRNAME" >&6; }
7221else
7222  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7223$as_echo "no" >&6; }
7224fi
7225
7226
7227  test -n "$DIRNAME" && break
7228done
7229
7230  else
7231    # The variable is set, but is it from the command line or the environment?
7232
7233    # Try to remove the string !DIRNAME! from our list.
7234    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DIRNAME!/}
7235    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7236      # If it failed, the variable was not from the command line. Ignore it,
7237      # but warn the user (except for BASH, which is always set by the calling BASH).
7238      if test "xDIRNAME" != xBASH; then
7239        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&5
7240$as_echo "$as_me: WARNING: Ignoring value of DIRNAME from the environment. Use command line variables instead." >&2;}
7241      fi
7242      # Try to locate tool using the code snippet
7243      for ac_prog in dirname
7244do
7245  # Extract the first word of "$ac_prog", so it can be a program name with args.
7246set dummy $ac_prog; ac_word=$2
7247{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7248$as_echo_n "checking for $ac_word... " >&6; }
7249if ${ac_cv_path_DIRNAME+:} false; then :
7250  $as_echo_n "(cached) " >&6
7251else
7252  case $DIRNAME in
7253  [\\/]* | ?:[\\/]*)
7254  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7255  ;;
7256  *)
7257  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7258for as_dir in $PATH
7259do
7260  IFS=$as_save_IFS
7261  test -z "$as_dir" && as_dir=.
7262    for ac_exec_ext in '' $ac_executable_extensions; do
7263  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7264    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7265    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7266    break 2
7267  fi
7268done
7269  done
7270IFS=$as_save_IFS
7271
7272  ;;
7273esac
7274fi
7275DIRNAME=$ac_cv_path_DIRNAME
7276if test -n "$DIRNAME"; then
7277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7278$as_echo "$DIRNAME" >&6; }
7279else
7280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7281$as_echo "no" >&6; }
7282fi
7283
7284
7285  test -n "$DIRNAME" && break
7286done
7287
7288    else
7289      # If it succeeded, then it was overridden by the user. We will use it
7290      # for the tool.
7291
7292      # First remove it from the list of overridden variables, so we can test
7293      # for unknown variables in the end.
7294      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7295
7296      # Check if we try to supply an empty value
7297      if test "x$DIRNAME" = x; then
7298        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DIRNAME= (no value)" >&5
7299$as_echo "$as_me: Setting user supplied tool DIRNAME= (no value)" >&6;}
7300        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7301$as_echo_n "checking for DIRNAME... " >&6; }
7302        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7303$as_echo "disabled" >&6; }
7304      else
7305        # Check if the provided tool contains a complete path.
7306        tool_specified="$DIRNAME"
7307        tool_basename="${tool_specified##*/}"
7308        if test "x$tool_basename" = "x$tool_specified"; then
7309          # A command without a complete path is provided, search $PATH.
7310          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DIRNAME=$tool_basename" >&5
7311$as_echo "$as_me: Will search for user supplied tool DIRNAME=$tool_basename" >&6;}
7312          # Extract the first word of "$tool_basename", so it can be a program name with args.
7313set dummy $tool_basename; ac_word=$2
7314{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7315$as_echo_n "checking for $ac_word... " >&6; }
7316if ${ac_cv_path_DIRNAME+:} false; then :
7317  $as_echo_n "(cached) " >&6
7318else
7319  case $DIRNAME in
7320  [\\/]* | ?:[\\/]*)
7321  ac_cv_path_DIRNAME="$DIRNAME" # Let the user override the test with a path.
7322  ;;
7323  *)
7324  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7325for as_dir in $PATH
7326do
7327  IFS=$as_save_IFS
7328  test -z "$as_dir" && as_dir=.
7329    for ac_exec_ext in '' $ac_executable_extensions; do
7330  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7331    ac_cv_path_DIRNAME="$as_dir/$ac_word$ac_exec_ext"
7332    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7333    break 2
7334  fi
7335done
7336  done
7337IFS=$as_save_IFS
7338
7339  ;;
7340esac
7341fi
7342DIRNAME=$ac_cv_path_DIRNAME
7343if test -n "$DIRNAME"; then
7344  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DIRNAME" >&5
7345$as_echo "$DIRNAME" >&6; }
7346else
7347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7348$as_echo "no" >&6; }
7349fi
7350
7351
7352          if test "x$DIRNAME" = x; then
7353            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7354          fi
7355        else
7356          # Otherwise we believe it is a complete path. Use it as it is.
7357          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DIRNAME=$tool_specified" >&5
7358$as_echo "$as_me: Will use user supplied tool DIRNAME=$tool_specified" >&6;}
7359          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DIRNAME" >&5
7360$as_echo_n "checking for DIRNAME... " >&6; }
7361          if test ! -x "$tool_specified"; then
7362            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7363$as_echo "not found" >&6; }
7364            as_fn_error $? "User supplied tool DIRNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
7365          fi
7366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7367$as_echo "$tool_specified" >&6; }
7368        fi
7369      fi
7370    fi
7371
7372  fi
7373
7374
7375
7376  if test "x$DIRNAME" = x; then
7377    as_fn_error $? "Could not find required tool for DIRNAME" "$LINENO" 5
7378  fi
7379
7380
7381
7382
7383
7384  # Publish this variable in the help.
7385
7386
7387  if [ -z "${ECHO+x}" ]; then
7388    # The variable is not set by user, try to locate tool using the code snippet
7389    for ac_prog in echo
7390do
7391  # Extract the first word of "$ac_prog", so it can be a program name with args.
7392set dummy $ac_prog; ac_word=$2
7393{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7394$as_echo_n "checking for $ac_word... " >&6; }
7395if ${ac_cv_path_ECHO+:} false; then :
7396  $as_echo_n "(cached) " >&6
7397else
7398  case $ECHO in
7399  [\\/]* | ?:[\\/]*)
7400  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7401  ;;
7402  *)
7403  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7404for as_dir in $PATH
7405do
7406  IFS=$as_save_IFS
7407  test -z "$as_dir" && as_dir=.
7408    for ac_exec_ext in '' $ac_executable_extensions; do
7409  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7410    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7411    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7412    break 2
7413  fi
7414done
7415  done
7416IFS=$as_save_IFS
7417
7418  ;;
7419esac
7420fi
7421ECHO=$ac_cv_path_ECHO
7422if test -n "$ECHO"; then
7423  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7424$as_echo "$ECHO" >&6; }
7425else
7426  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7427$as_echo "no" >&6; }
7428fi
7429
7430
7431  test -n "$ECHO" && break
7432done
7433
7434  else
7435    # The variable is set, but is it from the command line or the environment?
7436
7437    # Try to remove the string !ECHO! from our list.
7438    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ECHO!/}
7439    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7440      # If it failed, the variable was not from the command line. Ignore it,
7441      # but warn the user (except for BASH, which is always set by the calling BASH).
7442      if test "xECHO" != xBASH; then
7443        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&5
7444$as_echo "$as_me: WARNING: Ignoring value of ECHO from the environment. Use command line variables instead." >&2;}
7445      fi
7446      # Try to locate tool using the code snippet
7447      for ac_prog in echo
7448do
7449  # Extract the first word of "$ac_prog", so it can be a program name with args.
7450set dummy $ac_prog; ac_word=$2
7451{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7452$as_echo_n "checking for $ac_word... " >&6; }
7453if ${ac_cv_path_ECHO+:} false; then :
7454  $as_echo_n "(cached) " >&6
7455else
7456  case $ECHO in
7457  [\\/]* | ?:[\\/]*)
7458  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7459  ;;
7460  *)
7461  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7462for as_dir in $PATH
7463do
7464  IFS=$as_save_IFS
7465  test -z "$as_dir" && as_dir=.
7466    for ac_exec_ext in '' $ac_executable_extensions; do
7467  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7468    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7469    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7470    break 2
7471  fi
7472done
7473  done
7474IFS=$as_save_IFS
7475
7476  ;;
7477esac
7478fi
7479ECHO=$ac_cv_path_ECHO
7480if test -n "$ECHO"; then
7481  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7482$as_echo "$ECHO" >&6; }
7483else
7484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7485$as_echo "no" >&6; }
7486fi
7487
7488
7489  test -n "$ECHO" && break
7490done
7491
7492    else
7493      # If it succeeded, then it was overridden by the user. We will use it
7494      # for the tool.
7495
7496      # First remove it from the list of overridden variables, so we can test
7497      # for unknown variables in the end.
7498      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7499
7500      # Check if we try to supply an empty value
7501      if test "x$ECHO" = x; then
7502        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ECHO= (no value)" >&5
7503$as_echo "$as_me: Setting user supplied tool ECHO= (no value)" >&6;}
7504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7505$as_echo_n "checking for ECHO... " >&6; }
7506        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7507$as_echo "disabled" >&6; }
7508      else
7509        # Check if the provided tool contains a complete path.
7510        tool_specified="$ECHO"
7511        tool_basename="${tool_specified##*/}"
7512        if test "x$tool_basename" = "x$tool_specified"; then
7513          # A command without a complete path is provided, search $PATH.
7514          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ECHO=$tool_basename" >&5
7515$as_echo "$as_me: Will search for user supplied tool ECHO=$tool_basename" >&6;}
7516          # Extract the first word of "$tool_basename", so it can be a program name with args.
7517set dummy $tool_basename; ac_word=$2
7518{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7519$as_echo_n "checking for $ac_word... " >&6; }
7520if ${ac_cv_path_ECHO+:} false; then :
7521  $as_echo_n "(cached) " >&6
7522else
7523  case $ECHO in
7524  [\\/]* | ?:[\\/]*)
7525  ac_cv_path_ECHO="$ECHO" # Let the user override the test with a path.
7526  ;;
7527  *)
7528  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7529for as_dir in $PATH
7530do
7531  IFS=$as_save_IFS
7532  test -z "$as_dir" && as_dir=.
7533    for ac_exec_ext in '' $ac_executable_extensions; do
7534  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7535    ac_cv_path_ECHO="$as_dir/$ac_word$ac_exec_ext"
7536    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7537    break 2
7538  fi
7539done
7540  done
7541IFS=$as_save_IFS
7542
7543  ;;
7544esac
7545fi
7546ECHO=$ac_cv_path_ECHO
7547if test -n "$ECHO"; then
7548  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ECHO" >&5
7549$as_echo "$ECHO" >&6; }
7550else
7551  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7552$as_echo "no" >&6; }
7553fi
7554
7555
7556          if test "x$ECHO" = x; then
7557            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7558          fi
7559        else
7560          # Otherwise we believe it is a complete path. Use it as it is.
7561          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ECHO=$tool_specified" >&5
7562$as_echo "$as_me: Will use user supplied tool ECHO=$tool_specified" >&6;}
7563          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ECHO" >&5
7564$as_echo_n "checking for ECHO... " >&6; }
7565          if test ! -x "$tool_specified"; then
7566            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7567$as_echo "not found" >&6; }
7568            as_fn_error $? "User supplied tool ECHO=$tool_specified does not exist or is not executable" "$LINENO" 5
7569          fi
7570          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7571$as_echo "$tool_specified" >&6; }
7572        fi
7573      fi
7574    fi
7575
7576  fi
7577
7578
7579
7580  if test "x$ECHO" = x; then
7581    as_fn_error $? "Could not find required tool for ECHO" "$LINENO" 5
7582  fi
7583
7584
7585
7586
7587
7588  # Publish this variable in the help.
7589
7590
7591  if [ -z "${EXPR+x}" ]; then
7592    # The variable is not set by user, try to locate tool using the code snippet
7593    for ac_prog in expr
7594do
7595  # Extract the first word of "$ac_prog", so it can be a program name with args.
7596set dummy $ac_prog; ac_word=$2
7597{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7598$as_echo_n "checking for $ac_word... " >&6; }
7599if ${ac_cv_path_EXPR+:} false; then :
7600  $as_echo_n "(cached) " >&6
7601else
7602  case $EXPR in
7603  [\\/]* | ?:[\\/]*)
7604  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7605  ;;
7606  *)
7607  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7608for as_dir in $PATH
7609do
7610  IFS=$as_save_IFS
7611  test -z "$as_dir" && as_dir=.
7612    for ac_exec_ext in '' $ac_executable_extensions; do
7613  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7614    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7615    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7616    break 2
7617  fi
7618done
7619  done
7620IFS=$as_save_IFS
7621
7622  ;;
7623esac
7624fi
7625EXPR=$ac_cv_path_EXPR
7626if test -n "$EXPR"; then
7627  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7628$as_echo "$EXPR" >&6; }
7629else
7630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7631$as_echo "no" >&6; }
7632fi
7633
7634
7635  test -n "$EXPR" && break
7636done
7637
7638  else
7639    # The variable is set, but is it from the command line or the environment?
7640
7641    # Try to remove the string !EXPR! from our list.
7642    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EXPR!/}
7643    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7644      # If it failed, the variable was not from the command line. Ignore it,
7645      # but warn the user (except for BASH, which is always set by the calling BASH).
7646      if test "xEXPR" != xBASH; then
7647        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&5
7648$as_echo "$as_me: WARNING: Ignoring value of EXPR from the environment. Use command line variables instead." >&2;}
7649      fi
7650      # Try to locate tool using the code snippet
7651      for ac_prog in expr
7652do
7653  # Extract the first word of "$ac_prog", so it can be a program name with args.
7654set dummy $ac_prog; ac_word=$2
7655{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7656$as_echo_n "checking for $ac_word... " >&6; }
7657if ${ac_cv_path_EXPR+:} false; then :
7658  $as_echo_n "(cached) " >&6
7659else
7660  case $EXPR in
7661  [\\/]* | ?:[\\/]*)
7662  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7663  ;;
7664  *)
7665  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7666for as_dir in $PATH
7667do
7668  IFS=$as_save_IFS
7669  test -z "$as_dir" && as_dir=.
7670    for ac_exec_ext in '' $ac_executable_extensions; do
7671  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7672    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7673    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7674    break 2
7675  fi
7676done
7677  done
7678IFS=$as_save_IFS
7679
7680  ;;
7681esac
7682fi
7683EXPR=$ac_cv_path_EXPR
7684if test -n "$EXPR"; then
7685  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7686$as_echo "$EXPR" >&6; }
7687else
7688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7689$as_echo "no" >&6; }
7690fi
7691
7692
7693  test -n "$EXPR" && break
7694done
7695
7696    else
7697      # If it succeeded, then it was overridden by the user. We will use it
7698      # for the tool.
7699
7700      # First remove it from the list of overridden variables, so we can test
7701      # for unknown variables in the end.
7702      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7703
7704      # Check if we try to supply an empty value
7705      if test "x$EXPR" = x; then
7706        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EXPR= (no value)" >&5
7707$as_echo "$as_me: Setting user supplied tool EXPR= (no value)" >&6;}
7708        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7709$as_echo_n "checking for EXPR... " >&6; }
7710        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7711$as_echo "disabled" >&6; }
7712      else
7713        # Check if the provided tool contains a complete path.
7714        tool_specified="$EXPR"
7715        tool_basename="${tool_specified##*/}"
7716        if test "x$tool_basename" = "x$tool_specified"; then
7717          # A command without a complete path is provided, search $PATH.
7718          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EXPR=$tool_basename" >&5
7719$as_echo "$as_me: Will search for user supplied tool EXPR=$tool_basename" >&6;}
7720          # Extract the first word of "$tool_basename", so it can be a program name with args.
7721set dummy $tool_basename; ac_word=$2
7722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7723$as_echo_n "checking for $ac_word... " >&6; }
7724if ${ac_cv_path_EXPR+:} false; then :
7725  $as_echo_n "(cached) " >&6
7726else
7727  case $EXPR in
7728  [\\/]* | ?:[\\/]*)
7729  ac_cv_path_EXPR="$EXPR" # Let the user override the test with a path.
7730  ;;
7731  *)
7732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7733for as_dir in $PATH
7734do
7735  IFS=$as_save_IFS
7736  test -z "$as_dir" && as_dir=.
7737    for ac_exec_ext in '' $ac_executable_extensions; do
7738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7739    ac_cv_path_EXPR="$as_dir/$ac_word$ac_exec_ext"
7740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7741    break 2
7742  fi
7743done
7744  done
7745IFS=$as_save_IFS
7746
7747  ;;
7748esac
7749fi
7750EXPR=$ac_cv_path_EXPR
7751if test -n "$EXPR"; then
7752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXPR" >&5
7753$as_echo "$EXPR" >&6; }
7754else
7755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7756$as_echo "no" >&6; }
7757fi
7758
7759
7760          if test "x$EXPR" = x; then
7761            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7762          fi
7763        else
7764          # Otherwise we believe it is a complete path. Use it as it is.
7765          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EXPR=$tool_specified" >&5
7766$as_echo "$as_me: Will use user supplied tool EXPR=$tool_specified" >&6;}
7767          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EXPR" >&5
7768$as_echo_n "checking for EXPR... " >&6; }
7769          if test ! -x "$tool_specified"; then
7770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7771$as_echo "not found" >&6; }
7772            as_fn_error $? "User supplied tool EXPR=$tool_specified does not exist or is not executable" "$LINENO" 5
7773          fi
7774          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7775$as_echo "$tool_specified" >&6; }
7776        fi
7777      fi
7778    fi
7779
7780  fi
7781
7782
7783
7784  if test "x$EXPR" = x; then
7785    as_fn_error $? "Could not find required tool for EXPR" "$LINENO" 5
7786  fi
7787
7788
7789
7790
7791
7792  # Publish this variable in the help.
7793
7794
7795  if [ -z "${FILE+x}" ]; then
7796    # The variable is not set by user, try to locate tool using the code snippet
7797    for ac_prog in file
7798do
7799  # Extract the first word of "$ac_prog", so it can be a program name with args.
7800set dummy $ac_prog; ac_word=$2
7801{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7802$as_echo_n "checking for $ac_word... " >&6; }
7803if ${ac_cv_path_FILE+:} false; then :
7804  $as_echo_n "(cached) " >&6
7805else
7806  case $FILE in
7807  [\\/]* | ?:[\\/]*)
7808  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7809  ;;
7810  *)
7811  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7812for as_dir in $PATH
7813do
7814  IFS=$as_save_IFS
7815  test -z "$as_dir" && as_dir=.
7816    for ac_exec_ext in '' $ac_executable_extensions; do
7817  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7818    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7819    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7820    break 2
7821  fi
7822done
7823  done
7824IFS=$as_save_IFS
7825
7826  ;;
7827esac
7828fi
7829FILE=$ac_cv_path_FILE
7830if test -n "$FILE"; then
7831  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7832$as_echo "$FILE" >&6; }
7833else
7834  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7835$as_echo "no" >&6; }
7836fi
7837
7838
7839  test -n "$FILE" && break
7840done
7841
7842  else
7843    # The variable is set, but is it from the command line or the environment?
7844
7845    # Try to remove the string !FILE! from our list.
7846    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FILE!/}
7847    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
7848      # If it failed, the variable was not from the command line. Ignore it,
7849      # but warn the user (except for BASH, which is always set by the calling BASH).
7850      if test "xFILE" != xBASH; then
7851        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&5
7852$as_echo "$as_me: WARNING: Ignoring value of FILE from the environment. Use command line variables instead." >&2;}
7853      fi
7854      # Try to locate tool using the code snippet
7855      for ac_prog in file
7856do
7857  # Extract the first word of "$ac_prog", so it can be a program name with args.
7858set dummy $ac_prog; ac_word=$2
7859{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7860$as_echo_n "checking for $ac_word... " >&6; }
7861if ${ac_cv_path_FILE+:} false; then :
7862  $as_echo_n "(cached) " >&6
7863else
7864  case $FILE in
7865  [\\/]* | ?:[\\/]*)
7866  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7867  ;;
7868  *)
7869  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7870for as_dir in $PATH
7871do
7872  IFS=$as_save_IFS
7873  test -z "$as_dir" && as_dir=.
7874    for ac_exec_ext in '' $ac_executable_extensions; do
7875  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7876    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7877    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7878    break 2
7879  fi
7880done
7881  done
7882IFS=$as_save_IFS
7883
7884  ;;
7885esac
7886fi
7887FILE=$ac_cv_path_FILE
7888if test -n "$FILE"; then
7889  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7890$as_echo "$FILE" >&6; }
7891else
7892  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7893$as_echo "no" >&6; }
7894fi
7895
7896
7897  test -n "$FILE" && break
7898done
7899
7900    else
7901      # If it succeeded, then it was overridden by the user. We will use it
7902      # for the tool.
7903
7904      # First remove it from the list of overridden variables, so we can test
7905      # for unknown variables in the end.
7906      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
7907
7908      # Check if we try to supply an empty value
7909      if test "x$FILE" = x; then
7910        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FILE= (no value)" >&5
7911$as_echo "$as_me: Setting user supplied tool FILE= (no value)" >&6;}
7912        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7913$as_echo_n "checking for FILE... " >&6; }
7914        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
7915$as_echo "disabled" >&6; }
7916      else
7917        # Check if the provided tool contains a complete path.
7918        tool_specified="$FILE"
7919        tool_basename="${tool_specified##*/}"
7920        if test "x$tool_basename" = "x$tool_specified"; then
7921          # A command without a complete path is provided, search $PATH.
7922          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FILE=$tool_basename" >&5
7923$as_echo "$as_me: Will search for user supplied tool FILE=$tool_basename" >&6;}
7924          # Extract the first word of "$tool_basename", so it can be a program name with args.
7925set dummy $tool_basename; ac_word=$2
7926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
7927$as_echo_n "checking for $ac_word... " >&6; }
7928if ${ac_cv_path_FILE+:} false; then :
7929  $as_echo_n "(cached) " >&6
7930else
7931  case $FILE in
7932  [\\/]* | ?:[\\/]*)
7933  ac_cv_path_FILE="$FILE" # Let the user override the test with a path.
7934  ;;
7935  *)
7936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
7937for as_dir in $PATH
7938do
7939  IFS=$as_save_IFS
7940  test -z "$as_dir" && as_dir=.
7941    for ac_exec_ext in '' $ac_executable_extensions; do
7942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
7943    ac_cv_path_FILE="$as_dir/$ac_word$ac_exec_ext"
7944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
7945    break 2
7946  fi
7947done
7948  done
7949IFS=$as_save_IFS
7950
7951  ;;
7952esac
7953fi
7954FILE=$ac_cv_path_FILE
7955if test -n "$FILE"; then
7956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FILE" >&5
7957$as_echo "$FILE" >&6; }
7958else
7959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7960$as_echo "no" >&6; }
7961fi
7962
7963
7964          if test "x$FILE" = x; then
7965            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
7966          fi
7967        else
7968          # Otherwise we believe it is a complete path. Use it as it is.
7969          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FILE=$tool_specified" >&5
7970$as_echo "$as_me: Will use user supplied tool FILE=$tool_specified" >&6;}
7971          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FILE" >&5
7972$as_echo_n "checking for FILE... " >&6; }
7973          if test ! -x "$tool_specified"; then
7974            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
7975$as_echo "not found" >&6; }
7976            as_fn_error $? "User supplied tool FILE=$tool_specified does not exist or is not executable" "$LINENO" 5
7977          fi
7978          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
7979$as_echo "$tool_specified" >&6; }
7980        fi
7981      fi
7982    fi
7983
7984  fi
7985
7986
7987
7988  if test "x$FILE" = x; then
7989    as_fn_error $? "Could not find required tool for FILE" "$LINENO" 5
7990  fi
7991
7992
7993
7994
7995
7996  # Publish this variable in the help.
7997
7998
7999  if [ -z "${FIND+x}" ]; then
8000    # The variable is not set by user, try to locate tool using the code snippet
8001    for ac_prog in find
8002do
8003  # Extract the first word of "$ac_prog", so it can be a program name with args.
8004set dummy $ac_prog; ac_word=$2
8005{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8006$as_echo_n "checking for $ac_word... " >&6; }
8007if ${ac_cv_path_FIND+:} false; then :
8008  $as_echo_n "(cached) " >&6
8009else
8010  case $FIND in
8011  [\\/]* | ?:[\\/]*)
8012  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8013  ;;
8014  *)
8015  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8016for as_dir in $PATH
8017do
8018  IFS=$as_save_IFS
8019  test -z "$as_dir" && as_dir=.
8020    for ac_exec_ext in '' $ac_executable_extensions; do
8021  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8022    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8023    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8024    break 2
8025  fi
8026done
8027  done
8028IFS=$as_save_IFS
8029
8030  ;;
8031esac
8032fi
8033FIND=$ac_cv_path_FIND
8034if test -n "$FIND"; then
8035  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8036$as_echo "$FIND" >&6; }
8037else
8038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8039$as_echo "no" >&6; }
8040fi
8041
8042
8043  test -n "$FIND" && break
8044done
8045
8046  else
8047    # The variable is set, but is it from the command line or the environment?
8048
8049    # Try to remove the string !FIND! from our list.
8050    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FIND!/}
8051    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8052      # If it failed, the variable was not from the command line. Ignore it,
8053      # but warn the user (except for BASH, which is always set by the calling BASH).
8054      if test "xFIND" != xBASH; then
8055        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&5
8056$as_echo "$as_me: WARNING: Ignoring value of FIND from the environment. Use command line variables instead." >&2;}
8057      fi
8058      # Try to locate tool using the code snippet
8059      for ac_prog in find
8060do
8061  # Extract the first word of "$ac_prog", so it can be a program name with args.
8062set dummy $ac_prog; ac_word=$2
8063{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8064$as_echo_n "checking for $ac_word... " >&6; }
8065if ${ac_cv_path_FIND+:} false; then :
8066  $as_echo_n "(cached) " >&6
8067else
8068  case $FIND in
8069  [\\/]* | ?:[\\/]*)
8070  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8071  ;;
8072  *)
8073  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8074for as_dir in $PATH
8075do
8076  IFS=$as_save_IFS
8077  test -z "$as_dir" && as_dir=.
8078    for ac_exec_ext in '' $ac_executable_extensions; do
8079  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8080    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8081    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8082    break 2
8083  fi
8084done
8085  done
8086IFS=$as_save_IFS
8087
8088  ;;
8089esac
8090fi
8091FIND=$ac_cv_path_FIND
8092if test -n "$FIND"; then
8093  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8094$as_echo "$FIND" >&6; }
8095else
8096  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8097$as_echo "no" >&6; }
8098fi
8099
8100
8101  test -n "$FIND" && break
8102done
8103
8104    else
8105      # If it succeeded, then it was overridden by the user. We will use it
8106      # for the tool.
8107
8108      # First remove it from the list of overridden variables, so we can test
8109      # for unknown variables in the end.
8110      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8111
8112      # Check if we try to supply an empty value
8113      if test "x$FIND" = x; then
8114        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FIND= (no value)" >&5
8115$as_echo "$as_me: Setting user supplied tool FIND= (no value)" >&6;}
8116        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8117$as_echo_n "checking for FIND... " >&6; }
8118        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8119$as_echo "disabled" >&6; }
8120      else
8121        # Check if the provided tool contains a complete path.
8122        tool_specified="$FIND"
8123        tool_basename="${tool_specified##*/}"
8124        if test "x$tool_basename" = "x$tool_specified"; then
8125          # A command without a complete path is provided, search $PATH.
8126          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FIND=$tool_basename" >&5
8127$as_echo "$as_me: Will search for user supplied tool FIND=$tool_basename" >&6;}
8128          # Extract the first word of "$tool_basename", so it can be a program name with args.
8129set dummy $tool_basename; ac_word=$2
8130{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8131$as_echo_n "checking for $ac_word... " >&6; }
8132if ${ac_cv_path_FIND+:} false; then :
8133  $as_echo_n "(cached) " >&6
8134else
8135  case $FIND in
8136  [\\/]* | ?:[\\/]*)
8137  ac_cv_path_FIND="$FIND" # Let the user override the test with a path.
8138  ;;
8139  *)
8140  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8141for as_dir in $PATH
8142do
8143  IFS=$as_save_IFS
8144  test -z "$as_dir" && as_dir=.
8145    for ac_exec_ext in '' $ac_executable_extensions; do
8146  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8147    ac_cv_path_FIND="$as_dir/$ac_word$ac_exec_ext"
8148    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8149    break 2
8150  fi
8151done
8152  done
8153IFS=$as_save_IFS
8154
8155  ;;
8156esac
8157fi
8158FIND=$ac_cv_path_FIND
8159if test -n "$FIND"; then
8160  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FIND" >&5
8161$as_echo "$FIND" >&6; }
8162else
8163  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8164$as_echo "no" >&6; }
8165fi
8166
8167
8168          if test "x$FIND" = x; then
8169            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8170          fi
8171        else
8172          # Otherwise we believe it is a complete path. Use it as it is.
8173          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FIND=$tool_specified" >&5
8174$as_echo "$as_me: Will use user supplied tool FIND=$tool_specified" >&6;}
8175          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FIND" >&5
8176$as_echo_n "checking for FIND... " >&6; }
8177          if test ! -x "$tool_specified"; then
8178            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8179$as_echo "not found" >&6; }
8180            as_fn_error $? "User supplied tool FIND=$tool_specified does not exist or is not executable" "$LINENO" 5
8181          fi
8182          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8183$as_echo "$tool_specified" >&6; }
8184        fi
8185      fi
8186    fi
8187
8188  fi
8189
8190
8191
8192  if test "x$FIND" = x; then
8193    as_fn_error $? "Could not find required tool for FIND" "$LINENO" 5
8194  fi
8195
8196
8197
8198
8199
8200  # Publish this variable in the help.
8201
8202
8203  if [ -z "${HEAD+x}" ]; then
8204    # The variable is not set by user, try to locate tool using the code snippet
8205    for ac_prog in head
8206do
8207  # Extract the first word of "$ac_prog", so it can be a program name with args.
8208set dummy $ac_prog; ac_word=$2
8209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8210$as_echo_n "checking for $ac_word... " >&6; }
8211if ${ac_cv_path_HEAD+:} false; then :
8212  $as_echo_n "(cached) " >&6
8213else
8214  case $HEAD in
8215  [\\/]* | ?:[\\/]*)
8216  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8217  ;;
8218  *)
8219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8220for as_dir in $PATH
8221do
8222  IFS=$as_save_IFS
8223  test -z "$as_dir" && as_dir=.
8224    for ac_exec_ext in '' $ac_executable_extensions; do
8225  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8226    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8227    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8228    break 2
8229  fi
8230done
8231  done
8232IFS=$as_save_IFS
8233
8234  ;;
8235esac
8236fi
8237HEAD=$ac_cv_path_HEAD
8238if test -n "$HEAD"; then
8239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8240$as_echo "$HEAD" >&6; }
8241else
8242  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8243$as_echo "no" >&6; }
8244fi
8245
8246
8247  test -n "$HEAD" && break
8248done
8249
8250  else
8251    # The variable is set, but is it from the command line or the environment?
8252
8253    # Try to remove the string !HEAD! from our list.
8254    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HEAD!/}
8255    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8256      # If it failed, the variable was not from the command line. Ignore it,
8257      # but warn the user (except for BASH, which is always set by the calling BASH).
8258      if test "xHEAD" != xBASH; then
8259        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&5
8260$as_echo "$as_me: WARNING: Ignoring value of HEAD from the environment. Use command line variables instead." >&2;}
8261      fi
8262      # Try to locate tool using the code snippet
8263      for ac_prog in head
8264do
8265  # Extract the first word of "$ac_prog", so it can be a program name with args.
8266set dummy $ac_prog; ac_word=$2
8267{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8268$as_echo_n "checking for $ac_word... " >&6; }
8269if ${ac_cv_path_HEAD+:} false; then :
8270  $as_echo_n "(cached) " >&6
8271else
8272  case $HEAD in
8273  [\\/]* | ?:[\\/]*)
8274  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8275  ;;
8276  *)
8277  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8278for as_dir in $PATH
8279do
8280  IFS=$as_save_IFS
8281  test -z "$as_dir" && as_dir=.
8282    for ac_exec_ext in '' $ac_executable_extensions; do
8283  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8284    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8285    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8286    break 2
8287  fi
8288done
8289  done
8290IFS=$as_save_IFS
8291
8292  ;;
8293esac
8294fi
8295HEAD=$ac_cv_path_HEAD
8296if test -n "$HEAD"; then
8297  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8298$as_echo "$HEAD" >&6; }
8299else
8300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8301$as_echo "no" >&6; }
8302fi
8303
8304
8305  test -n "$HEAD" && break
8306done
8307
8308    else
8309      # If it succeeded, then it was overridden by the user. We will use it
8310      # for the tool.
8311
8312      # First remove it from the list of overridden variables, so we can test
8313      # for unknown variables in the end.
8314      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8315
8316      # Check if we try to supply an empty value
8317      if test "x$HEAD" = x; then
8318        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HEAD= (no value)" >&5
8319$as_echo "$as_me: Setting user supplied tool HEAD= (no value)" >&6;}
8320        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8321$as_echo_n "checking for HEAD... " >&6; }
8322        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8323$as_echo "disabled" >&6; }
8324      else
8325        # Check if the provided tool contains a complete path.
8326        tool_specified="$HEAD"
8327        tool_basename="${tool_specified##*/}"
8328        if test "x$tool_basename" = "x$tool_specified"; then
8329          # A command without a complete path is provided, search $PATH.
8330          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HEAD=$tool_basename" >&5
8331$as_echo "$as_me: Will search for user supplied tool HEAD=$tool_basename" >&6;}
8332          # Extract the first word of "$tool_basename", so it can be a program name with args.
8333set dummy $tool_basename; ac_word=$2
8334{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8335$as_echo_n "checking for $ac_word... " >&6; }
8336if ${ac_cv_path_HEAD+:} false; then :
8337  $as_echo_n "(cached) " >&6
8338else
8339  case $HEAD in
8340  [\\/]* | ?:[\\/]*)
8341  ac_cv_path_HEAD="$HEAD" # Let the user override the test with a path.
8342  ;;
8343  *)
8344  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8345for as_dir in $PATH
8346do
8347  IFS=$as_save_IFS
8348  test -z "$as_dir" && as_dir=.
8349    for ac_exec_ext in '' $ac_executable_extensions; do
8350  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8351    ac_cv_path_HEAD="$as_dir/$ac_word$ac_exec_ext"
8352    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8353    break 2
8354  fi
8355done
8356  done
8357IFS=$as_save_IFS
8358
8359  ;;
8360esac
8361fi
8362HEAD=$ac_cv_path_HEAD
8363if test -n "$HEAD"; then
8364  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HEAD" >&5
8365$as_echo "$HEAD" >&6; }
8366else
8367  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8368$as_echo "no" >&6; }
8369fi
8370
8371
8372          if test "x$HEAD" = x; then
8373            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8374          fi
8375        else
8376          # Otherwise we believe it is a complete path. Use it as it is.
8377          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HEAD=$tool_specified" >&5
8378$as_echo "$as_me: Will use user supplied tool HEAD=$tool_specified" >&6;}
8379          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HEAD" >&5
8380$as_echo_n "checking for HEAD... " >&6; }
8381          if test ! -x "$tool_specified"; then
8382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8383$as_echo "not found" >&6; }
8384            as_fn_error $? "User supplied tool HEAD=$tool_specified does not exist or is not executable" "$LINENO" 5
8385          fi
8386          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8387$as_echo "$tool_specified" >&6; }
8388        fi
8389      fi
8390    fi
8391
8392  fi
8393
8394
8395
8396  if test "x$HEAD" = x; then
8397    as_fn_error $? "Could not find required tool for HEAD" "$LINENO" 5
8398  fi
8399
8400
8401
8402
8403
8404  # Publish this variable in the help.
8405
8406
8407  if [ -z "${LN+x}" ]; then
8408    # The variable is not set by user, try to locate tool using the code snippet
8409    for ac_prog in ln
8410do
8411  # Extract the first word of "$ac_prog", so it can be a program name with args.
8412set dummy $ac_prog; ac_word=$2
8413{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8414$as_echo_n "checking for $ac_word... " >&6; }
8415if ${ac_cv_path_LN+:} false; then :
8416  $as_echo_n "(cached) " >&6
8417else
8418  case $LN in
8419  [\\/]* | ?:[\\/]*)
8420  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8421  ;;
8422  *)
8423  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8424for as_dir in $PATH
8425do
8426  IFS=$as_save_IFS
8427  test -z "$as_dir" && as_dir=.
8428    for ac_exec_ext in '' $ac_executable_extensions; do
8429  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8430    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8431    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8432    break 2
8433  fi
8434done
8435  done
8436IFS=$as_save_IFS
8437
8438  ;;
8439esac
8440fi
8441LN=$ac_cv_path_LN
8442if test -n "$LN"; then
8443  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8444$as_echo "$LN" >&6; }
8445else
8446  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8447$as_echo "no" >&6; }
8448fi
8449
8450
8451  test -n "$LN" && break
8452done
8453
8454  else
8455    # The variable is set, but is it from the command line or the environment?
8456
8457    # Try to remove the string !LN! from our list.
8458    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LN!/}
8459    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8460      # If it failed, the variable was not from the command line. Ignore it,
8461      # but warn the user (except for BASH, which is always set by the calling BASH).
8462      if test "xLN" != xBASH; then
8463        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&5
8464$as_echo "$as_me: WARNING: Ignoring value of LN from the environment. Use command line variables instead." >&2;}
8465      fi
8466      # Try to locate tool using the code snippet
8467      for ac_prog in ln
8468do
8469  # Extract the first word of "$ac_prog", so it can be a program name with args.
8470set dummy $ac_prog; ac_word=$2
8471{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8472$as_echo_n "checking for $ac_word... " >&6; }
8473if ${ac_cv_path_LN+:} false; then :
8474  $as_echo_n "(cached) " >&6
8475else
8476  case $LN in
8477  [\\/]* | ?:[\\/]*)
8478  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8479  ;;
8480  *)
8481  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8482for as_dir in $PATH
8483do
8484  IFS=$as_save_IFS
8485  test -z "$as_dir" && as_dir=.
8486    for ac_exec_ext in '' $ac_executable_extensions; do
8487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8488    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8490    break 2
8491  fi
8492done
8493  done
8494IFS=$as_save_IFS
8495
8496  ;;
8497esac
8498fi
8499LN=$ac_cv_path_LN
8500if test -n "$LN"; then
8501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8502$as_echo "$LN" >&6; }
8503else
8504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8505$as_echo "no" >&6; }
8506fi
8507
8508
8509  test -n "$LN" && break
8510done
8511
8512    else
8513      # If it succeeded, then it was overridden by the user. We will use it
8514      # for the tool.
8515
8516      # First remove it from the list of overridden variables, so we can test
8517      # for unknown variables in the end.
8518      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8519
8520      # Check if we try to supply an empty value
8521      if test "x$LN" = x; then
8522        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LN= (no value)" >&5
8523$as_echo "$as_me: Setting user supplied tool LN= (no value)" >&6;}
8524        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8525$as_echo_n "checking for LN... " >&6; }
8526        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8527$as_echo "disabled" >&6; }
8528      else
8529        # Check if the provided tool contains a complete path.
8530        tool_specified="$LN"
8531        tool_basename="${tool_specified##*/}"
8532        if test "x$tool_basename" = "x$tool_specified"; then
8533          # A command without a complete path is provided, search $PATH.
8534          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LN=$tool_basename" >&5
8535$as_echo "$as_me: Will search for user supplied tool LN=$tool_basename" >&6;}
8536          # Extract the first word of "$tool_basename", so it can be a program name with args.
8537set dummy $tool_basename; ac_word=$2
8538{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8539$as_echo_n "checking for $ac_word... " >&6; }
8540if ${ac_cv_path_LN+:} false; then :
8541  $as_echo_n "(cached) " >&6
8542else
8543  case $LN in
8544  [\\/]* | ?:[\\/]*)
8545  ac_cv_path_LN="$LN" # Let the user override the test with a path.
8546  ;;
8547  *)
8548  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8549for as_dir in $PATH
8550do
8551  IFS=$as_save_IFS
8552  test -z "$as_dir" && as_dir=.
8553    for ac_exec_ext in '' $ac_executable_extensions; do
8554  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8555    ac_cv_path_LN="$as_dir/$ac_word$ac_exec_ext"
8556    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8557    break 2
8558  fi
8559done
8560  done
8561IFS=$as_save_IFS
8562
8563  ;;
8564esac
8565fi
8566LN=$ac_cv_path_LN
8567if test -n "$LN"; then
8568  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LN" >&5
8569$as_echo "$LN" >&6; }
8570else
8571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8572$as_echo "no" >&6; }
8573fi
8574
8575
8576          if test "x$LN" = x; then
8577            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8578          fi
8579        else
8580          # Otherwise we believe it is a complete path. Use it as it is.
8581          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LN=$tool_specified" >&5
8582$as_echo "$as_me: Will use user supplied tool LN=$tool_specified" >&6;}
8583          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LN" >&5
8584$as_echo_n "checking for LN... " >&6; }
8585          if test ! -x "$tool_specified"; then
8586            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8587$as_echo "not found" >&6; }
8588            as_fn_error $? "User supplied tool LN=$tool_specified does not exist or is not executable" "$LINENO" 5
8589          fi
8590          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8591$as_echo "$tool_specified" >&6; }
8592        fi
8593      fi
8594    fi
8595
8596  fi
8597
8598
8599
8600  if test "x$LN" = x; then
8601    as_fn_error $? "Could not find required tool for LN" "$LINENO" 5
8602  fi
8603
8604
8605
8606
8607
8608  # Publish this variable in the help.
8609
8610
8611  if [ -z "${LS+x}" ]; then
8612    # The variable is not set by user, try to locate tool using the code snippet
8613    for ac_prog in ls
8614do
8615  # Extract the first word of "$ac_prog", so it can be a program name with args.
8616set dummy $ac_prog; ac_word=$2
8617{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8618$as_echo_n "checking for $ac_word... " >&6; }
8619if ${ac_cv_path_LS+:} false; then :
8620  $as_echo_n "(cached) " >&6
8621else
8622  case $LS in
8623  [\\/]* | ?:[\\/]*)
8624  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8625  ;;
8626  *)
8627  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8628for as_dir in $PATH
8629do
8630  IFS=$as_save_IFS
8631  test -z "$as_dir" && as_dir=.
8632    for ac_exec_ext in '' $ac_executable_extensions; do
8633  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8634    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8635    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8636    break 2
8637  fi
8638done
8639  done
8640IFS=$as_save_IFS
8641
8642  ;;
8643esac
8644fi
8645LS=$ac_cv_path_LS
8646if test -n "$LS"; then
8647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8648$as_echo "$LS" >&6; }
8649else
8650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8651$as_echo "no" >&6; }
8652fi
8653
8654
8655  test -n "$LS" && break
8656done
8657
8658  else
8659    # The variable is set, but is it from the command line or the environment?
8660
8661    # Try to remove the string !LS! from our list.
8662    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LS!/}
8663    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8664      # If it failed, the variable was not from the command line. Ignore it,
8665      # but warn the user (except for BASH, which is always set by the calling BASH).
8666      if test "xLS" != xBASH; then
8667        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&5
8668$as_echo "$as_me: WARNING: Ignoring value of LS from the environment. Use command line variables instead." >&2;}
8669      fi
8670      # Try to locate tool using the code snippet
8671      for ac_prog in ls
8672do
8673  # Extract the first word of "$ac_prog", so it can be a program name with args.
8674set dummy $ac_prog; ac_word=$2
8675{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8676$as_echo_n "checking for $ac_word... " >&6; }
8677if ${ac_cv_path_LS+:} false; then :
8678  $as_echo_n "(cached) " >&6
8679else
8680  case $LS in
8681  [\\/]* | ?:[\\/]*)
8682  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8683  ;;
8684  *)
8685  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8686for as_dir in $PATH
8687do
8688  IFS=$as_save_IFS
8689  test -z "$as_dir" && as_dir=.
8690    for ac_exec_ext in '' $ac_executable_extensions; do
8691  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8692    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8693    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8694    break 2
8695  fi
8696done
8697  done
8698IFS=$as_save_IFS
8699
8700  ;;
8701esac
8702fi
8703LS=$ac_cv_path_LS
8704if test -n "$LS"; then
8705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8706$as_echo "$LS" >&6; }
8707else
8708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8709$as_echo "no" >&6; }
8710fi
8711
8712
8713  test -n "$LS" && break
8714done
8715
8716    else
8717      # If it succeeded, then it was overridden by the user. We will use it
8718      # for the tool.
8719
8720      # First remove it from the list of overridden variables, so we can test
8721      # for unknown variables in the end.
8722      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8723
8724      # Check if we try to supply an empty value
8725      if test "x$LS" = x; then
8726        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LS= (no value)" >&5
8727$as_echo "$as_me: Setting user supplied tool LS= (no value)" >&6;}
8728        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8729$as_echo_n "checking for LS... " >&6; }
8730        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8731$as_echo "disabled" >&6; }
8732      else
8733        # Check if the provided tool contains a complete path.
8734        tool_specified="$LS"
8735        tool_basename="${tool_specified##*/}"
8736        if test "x$tool_basename" = "x$tool_specified"; then
8737          # A command without a complete path is provided, search $PATH.
8738          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LS=$tool_basename" >&5
8739$as_echo "$as_me: Will search for user supplied tool LS=$tool_basename" >&6;}
8740          # Extract the first word of "$tool_basename", so it can be a program name with args.
8741set dummy $tool_basename; ac_word=$2
8742{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8743$as_echo_n "checking for $ac_word... " >&6; }
8744if ${ac_cv_path_LS+:} false; then :
8745  $as_echo_n "(cached) " >&6
8746else
8747  case $LS in
8748  [\\/]* | ?:[\\/]*)
8749  ac_cv_path_LS="$LS" # Let the user override the test with a path.
8750  ;;
8751  *)
8752  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8753for as_dir in $PATH
8754do
8755  IFS=$as_save_IFS
8756  test -z "$as_dir" && as_dir=.
8757    for ac_exec_ext in '' $ac_executable_extensions; do
8758  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8759    ac_cv_path_LS="$as_dir/$ac_word$ac_exec_ext"
8760    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8761    break 2
8762  fi
8763done
8764  done
8765IFS=$as_save_IFS
8766
8767  ;;
8768esac
8769fi
8770LS=$ac_cv_path_LS
8771if test -n "$LS"; then
8772  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LS" >&5
8773$as_echo "$LS" >&6; }
8774else
8775  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8776$as_echo "no" >&6; }
8777fi
8778
8779
8780          if test "x$LS" = x; then
8781            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8782          fi
8783        else
8784          # Otherwise we believe it is a complete path. Use it as it is.
8785          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LS=$tool_specified" >&5
8786$as_echo "$as_me: Will use user supplied tool LS=$tool_specified" >&6;}
8787          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LS" >&5
8788$as_echo_n "checking for LS... " >&6; }
8789          if test ! -x "$tool_specified"; then
8790            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8791$as_echo "not found" >&6; }
8792            as_fn_error $? "User supplied tool LS=$tool_specified does not exist or is not executable" "$LINENO" 5
8793          fi
8794          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8795$as_echo "$tool_specified" >&6; }
8796        fi
8797      fi
8798    fi
8799
8800  fi
8801
8802
8803
8804  if test "x$LS" = x; then
8805    as_fn_error $? "Could not find required tool for LS" "$LINENO" 5
8806  fi
8807
8808
8809
8810
8811
8812  # Publish this variable in the help.
8813
8814
8815  if [ -z "${MKDIR+x}" ]; then
8816    # The variable is not set by user, try to locate tool using the code snippet
8817    for ac_prog in mkdir
8818do
8819  # Extract the first word of "$ac_prog", so it can be a program name with args.
8820set dummy $ac_prog; ac_word=$2
8821{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8822$as_echo_n "checking for $ac_word... " >&6; }
8823if ${ac_cv_path_MKDIR+:} false; then :
8824  $as_echo_n "(cached) " >&6
8825else
8826  case $MKDIR in
8827  [\\/]* | ?:[\\/]*)
8828  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8829  ;;
8830  *)
8831  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8832for as_dir in $PATH
8833do
8834  IFS=$as_save_IFS
8835  test -z "$as_dir" && as_dir=.
8836    for ac_exec_ext in '' $ac_executable_extensions; do
8837  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8838    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8839    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8840    break 2
8841  fi
8842done
8843  done
8844IFS=$as_save_IFS
8845
8846  ;;
8847esac
8848fi
8849MKDIR=$ac_cv_path_MKDIR
8850if test -n "$MKDIR"; then
8851  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8852$as_echo "$MKDIR" >&6; }
8853else
8854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8855$as_echo "no" >&6; }
8856fi
8857
8858
8859  test -n "$MKDIR" && break
8860done
8861
8862  else
8863    # The variable is set, but is it from the command line or the environment?
8864
8865    # Try to remove the string !MKDIR! from our list.
8866    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKDIR!/}
8867    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
8868      # If it failed, the variable was not from the command line. Ignore it,
8869      # but warn the user (except for BASH, which is always set by the calling BASH).
8870      if test "xMKDIR" != xBASH; then
8871        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&5
8872$as_echo "$as_me: WARNING: Ignoring value of MKDIR from the environment. Use command line variables instead." >&2;}
8873      fi
8874      # Try to locate tool using the code snippet
8875      for ac_prog in mkdir
8876do
8877  # Extract the first word of "$ac_prog", so it can be a program name with args.
8878set dummy $ac_prog; ac_word=$2
8879{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8880$as_echo_n "checking for $ac_word... " >&6; }
8881if ${ac_cv_path_MKDIR+:} false; then :
8882  $as_echo_n "(cached) " >&6
8883else
8884  case $MKDIR in
8885  [\\/]* | ?:[\\/]*)
8886  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8887  ;;
8888  *)
8889  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8890for as_dir in $PATH
8891do
8892  IFS=$as_save_IFS
8893  test -z "$as_dir" && as_dir=.
8894    for ac_exec_ext in '' $ac_executable_extensions; do
8895  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8896    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8897    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8898    break 2
8899  fi
8900done
8901  done
8902IFS=$as_save_IFS
8903
8904  ;;
8905esac
8906fi
8907MKDIR=$ac_cv_path_MKDIR
8908if test -n "$MKDIR"; then
8909  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8910$as_echo "$MKDIR" >&6; }
8911else
8912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8913$as_echo "no" >&6; }
8914fi
8915
8916
8917  test -n "$MKDIR" && break
8918done
8919
8920    else
8921      # If it succeeded, then it was overridden by the user. We will use it
8922      # for the tool.
8923
8924      # First remove it from the list of overridden variables, so we can test
8925      # for unknown variables in the end.
8926      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
8927
8928      # Check if we try to supply an empty value
8929      if test "x$MKDIR" = x; then
8930        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKDIR= (no value)" >&5
8931$as_echo "$as_me: Setting user supplied tool MKDIR= (no value)" >&6;}
8932        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8933$as_echo_n "checking for MKDIR... " >&6; }
8934        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
8935$as_echo "disabled" >&6; }
8936      else
8937        # Check if the provided tool contains a complete path.
8938        tool_specified="$MKDIR"
8939        tool_basename="${tool_specified##*/}"
8940        if test "x$tool_basename" = "x$tool_specified"; then
8941          # A command without a complete path is provided, search $PATH.
8942          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKDIR=$tool_basename" >&5
8943$as_echo "$as_me: Will search for user supplied tool MKDIR=$tool_basename" >&6;}
8944          # Extract the first word of "$tool_basename", so it can be a program name with args.
8945set dummy $tool_basename; ac_word=$2
8946{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
8947$as_echo_n "checking for $ac_word... " >&6; }
8948if ${ac_cv_path_MKDIR+:} false; then :
8949  $as_echo_n "(cached) " >&6
8950else
8951  case $MKDIR in
8952  [\\/]* | ?:[\\/]*)
8953  ac_cv_path_MKDIR="$MKDIR" # Let the user override the test with a path.
8954  ;;
8955  *)
8956  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
8957for as_dir in $PATH
8958do
8959  IFS=$as_save_IFS
8960  test -z "$as_dir" && as_dir=.
8961    for ac_exec_ext in '' $ac_executable_extensions; do
8962  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
8963    ac_cv_path_MKDIR="$as_dir/$ac_word$ac_exec_ext"
8964    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
8965    break 2
8966  fi
8967done
8968  done
8969IFS=$as_save_IFS
8970
8971  ;;
8972esac
8973fi
8974MKDIR=$ac_cv_path_MKDIR
8975if test -n "$MKDIR"; then
8976  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR" >&5
8977$as_echo "$MKDIR" >&6; }
8978else
8979  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
8980$as_echo "no" >&6; }
8981fi
8982
8983
8984          if test "x$MKDIR" = x; then
8985            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
8986          fi
8987        else
8988          # Otherwise we believe it is a complete path. Use it as it is.
8989          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKDIR=$tool_specified" >&5
8990$as_echo "$as_me: Will use user supplied tool MKDIR=$tool_specified" >&6;}
8991          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKDIR" >&5
8992$as_echo_n "checking for MKDIR... " >&6; }
8993          if test ! -x "$tool_specified"; then
8994            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
8995$as_echo "not found" >&6; }
8996            as_fn_error $? "User supplied tool MKDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
8997          fi
8998          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
8999$as_echo "$tool_specified" >&6; }
9000        fi
9001      fi
9002    fi
9003
9004  fi
9005
9006
9007
9008  if test "x$MKDIR" = x; then
9009    as_fn_error $? "Could not find required tool for MKDIR" "$LINENO" 5
9010  fi
9011
9012
9013
9014
9015
9016  # Publish this variable in the help.
9017
9018
9019  if [ -z "${MKTEMP+x}" ]; then
9020    # The variable is not set by user, try to locate tool using the code snippet
9021    for ac_prog in mktemp
9022do
9023  # Extract the first word of "$ac_prog", so it can be a program name with args.
9024set dummy $ac_prog; ac_word=$2
9025{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9026$as_echo_n "checking for $ac_word... " >&6; }
9027if ${ac_cv_path_MKTEMP+:} false; then :
9028  $as_echo_n "(cached) " >&6
9029else
9030  case $MKTEMP in
9031  [\\/]* | ?:[\\/]*)
9032  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9033  ;;
9034  *)
9035  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9036for as_dir in $PATH
9037do
9038  IFS=$as_save_IFS
9039  test -z "$as_dir" && as_dir=.
9040    for ac_exec_ext in '' $ac_executable_extensions; do
9041  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9042    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9043    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9044    break 2
9045  fi
9046done
9047  done
9048IFS=$as_save_IFS
9049
9050  ;;
9051esac
9052fi
9053MKTEMP=$ac_cv_path_MKTEMP
9054if test -n "$MKTEMP"; then
9055  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9056$as_echo "$MKTEMP" >&6; }
9057else
9058  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9059$as_echo "no" >&6; }
9060fi
9061
9062
9063  test -n "$MKTEMP" && break
9064done
9065
9066  else
9067    # The variable is set, but is it from the command line or the environment?
9068
9069    # Try to remove the string !MKTEMP! from our list.
9070    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MKTEMP!/}
9071    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9072      # If it failed, the variable was not from the command line. Ignore it,
9073      # but warn the user (except for BASH, which is always set by the calling BASH).
9074      if test "xMKTEMP" != xBASH; then
9075        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&5
9076$as_echo "$as_me: WARNING: Ignoring value of MKTEMP from the environment. Use command line variables instead." >&2;}
9077      fi
9078      # Try to locate tool using the code snippet
9079      for ac_prog in mktemp
9080do
9081  # Extract the first word of "$ac_prog", so it can be a program name with args.
9082set dummy $ac_prog; ac_word=$2
9083{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9084$as_echo_n "checking for $ac_word... " >&6; }
9085if ${ac_cv_path_MKTEMP+:} false; then :
9086  $as_echo_n "(cached) " >&6
9087else
9088  case $MKTEMP in
9089  [\\/]* | ?:[\\/]*)
9090  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9091  ;;
9092  *)
9093  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9094for as_dir in $PATH
9095do
9096  IFS=$as_save_IFS
9097  test -z "$as_dir" && as_dir=.
9098    for ac_exec_ext in '' $ac_executable_extensions; do
9099  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9100    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9101    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9102    break 2
9103  fi
9104done
9105  done
9106IFS=$as_save_IFS
9107
9108  ;;
9109esac
9110fi
9111MKTEMP=$ac_cv_path_MKTEMP
9112if test -n "$MKTEMP"; then
9113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9114$as_echo "$MKTEMP" >&6; }
9115else
9116  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9117$as_echo "no" >&6; }
9118fi
9119
9120
9121  test -n "$MKTEMP" && break
9122done
9123
9124    else
9125      # If it succeeded, then it was overridden by the user. We will use it
9126      # for the tool.
9127
9128      # First remove it from the list of overridden variables, so we can test
9129      # for unknown variables in the end.
9130      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9131
9132      # Check if we try to supply an empty value
9133      if test "x$MKTEMP" = x; then
9134        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MKTEMP= (no value)" >&5
9135$as_echo "$as_me: Setting user supplied tool MKTEMP= (no value)" >&6;}
9136        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9137$as_echo_n "checking for MKTEMP... " >&6; }
9138        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9139$as_echo "disabled" >&6; }
9140      else
9141        # Check if the provided tool contains a complete path.
9142        tool_specified="$MKTEMP"
9143        tool_basename="${tool_specified##*/}"
9144        if test "x$tool_basename" = "x$tool_specified"; then
9145          # A command without a complete path is provided, search $PATH.
9146          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MKTEMP=$tool_basename" >&5
9147$as_echo "$as_me: Will search for user supplied tool MKTEMP=$tool_basename" >&6;}
9148          # Extract the first word of "$tool_basename", so it can be a program name with args.
9149set dummy $tool_basename; ac_word=$2
9150{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9151$as_echo_n "checking for $ac_word... " >&6; }
9152if ${ac_cv_path_MKTEMP+:} false; then :
9153  $as_echo_n "(cached) " >&6
9154else
9155  case $MKTEMP in
9156  [\\/]* | ?:[\\/]*)
9157  ac_cv_path_MKTEMP="$MKTEMP" # Let the user override the test with a path.
9158  ;;
9159  *)
9160  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9161for as_dir in $PATH
9162do
9163  IFS=$as_save_IFS
9164  test -z "$as_dir" && as_dir=.
9165    for ac_exec_ext in '' $ac_executable_extensions; do
9166  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9167    ac_cv_path_MKTEMP="$as_dir/$ac_word$ac_exec_ext"
9168    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9169    break 2
9170  fi
9171done
9172  done
9173IFS=$as_save_IFS
9174
9175  ;;
9176esac
9177fi
9178MKTEMP=$ac_cv_path_MKTEMP
9179if test -n "$MKTEMP"; then
9180  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKTEMP" >&5
9181$as_echo "$MKTEMP" >&6; }
9182else
9183  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9184$as_echo "no" >&6; }
9185fi
9186
9187
9188          if test "x$MKTEMP" = x; then
9189            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9190          fi
9191        else
9192          # Otherwise we believe it is a complete path. Use it as it is.
9193          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MKTEMP=$tool_specified" >&5
9194$as_echo "$as_me: Will use user supplied tool MKTEMP=$tool_specified" >&6;}
9195          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MKTEMP" >&5
9196$as_echo_n "checking for MKTEMP... " >&6; }
9197          if test ! -x "$tool_specified"; then
9198            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9199$as_echo "not found" >&6; }
9200            as_fn_error $? "User supplied tool MKTEMP=$tool_specified does not exist or is not executable" "$LINENO" 5
9201          fi
9202          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9203$as_echo "$tool_specified" >&6; }
9204        fi
9205      fi
9206    fi
9207
9208  fi
9209
9210
9211
9212  if test "x$MKTEMP" = x; then
9213    as_fn_error $? "Could not find required tool for MKTEMP" "$LINENO" 5
9214  fi
9215
9216
9217
9218
9219
9220  # Publish this variable in the help.
9221
9222
9223  if [ -z "${MV+x}" ]; then
9224    # The variable is not set by user, try to locate tool using the code snippet
9225    for ac_prog in mv
9226do
9227  # Extract the first word of "$ac_prog", so it can be a program name with args.
9228set dummy $ac_prog; ac_word=$2
9229{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9230$as_echo_n "checking for $ac_word... " >&6; }
9231if ${ac_cv_path_MV+:} false; then :
9232  $as_echo_n "(cached) " >&6
9233else
9234  case $MV in
9235  [\\/]* | ?:[\\/]*)
9236  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9237  ;;
9238  *)
9239  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9240for as_dir in $PATH
9241do
9242  IFS=$as_save_IFS
9243  test -z "$as_dir" && as_dir=.
9244    for ac_exec_ext in '' $ac_executable_extensions; do
9245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9246    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9248    break 2
9249  fi
9250done
9251  done
9252IFS=$as_save_IFS
9253
9254  ;;
9255esac
9256fi
9257MV=$ac_cv_path_MV
9258if test -n "$MV"; then
9259  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9260$as_echo "$MV" >&6; }
9261else
9262  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9263$as_echo "no" >&6; }
9264fi
9265
9266
9267  test -n "$MV" && break
9268done
9269
9270  else
9271    # The variable is set, but is it from the command line or the environment?
9272
9273    # Try to remove the string !MV! from our list.
9274    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MV!/}
9275    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9276      # If it failed, the variable was not from the command line. Ignore it,
9277      # but warn the user (except for BASH, which is always set by the calling BASH).
9278      if test "xMV" != xBASH; then
9279        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&5
9280$as_echo "$as_me: WARNING: Ignoring value of MV from the environment. Use command line variables instead." >&2;}
9281      fi
9282      # Try to locate tool using the code snippet
9283      for ac_prog in mv
9284do
9285  # Extract the first word of "$ac_prog", so it can be a program name with args.
9286set dummy $ac_prog; ac_word=$2
9287{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9288$as_echo_n "checking for $ac_word... " >&6; }
9289if ${ac_cv_path_MV+:} false; then :
9290  $as_echo_n "(cached) " >&6
9291else
9292  case $MV in
9293  [\\/]* | ?:[\\/]*)
9294  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9295  ;;
9296  *)
9297  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9298for as_dir in $PATH
9299do
9300  IFS=$as_save_IFS
9301  test -z "$as_dir" && as_dir=.
9302    for ac_exec_ext in '' $ac_executable_extensions; do
9303  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9304    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9305    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9306    break 2
9307  fi
9308done
9309  done
9310IFS=$as_save_IFS
9311
9312  ;;
9313esac
9314fi
9315MV=$ac_cv_path_MV
9316if test -n "$MV"; then
9317  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9318$as_echo "$MV" >&6; }
9319else
9320  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9321$as_echo "no" >&6; }
9322fi
9323
9324
9325  test -n "$MV" && break
9326done
9327
9328    else
9329      # If it succeeded, then it was overridden by the user. We will use it
9330      # for the tool.
9331
9332      # First remove it from the list of overridden variables, so we can test
9333      # for unknown variables in the end.
9334      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9335
9336      # Check if we try to supply an empty value
9337      if test "x$MV" = x; then
9338        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MV= (no value)" >&5
9339$as_echo "$as_me: Setting user supplied tool MV= (no value)" >&6;}
9340        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9341$as_echo_n "checking for MV... " >&6; }
9342        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9343$as_echo "disabled" >&6; }
9344      else
9345        # Check if the provided tool contains a complete path.
9346        tool_specified="$MV"
9347        tool_basename="${tool_specified##*/}"
9348        if test "x$tool_basename" = "x$tool_specified"; then
9349          # A command without a complete path is provided, search $PATH.
9350          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MV=$tool_basename" >&5
9351$as_echo "$as_me: Will search for user supplied tool MV=$tool_basename" >&6;}
9352          # Extract the first word of "$tool_basename", so it can be a program name with args.
9353set dummy $tool_basename; ac_word=$2
9354{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9355$as_echo_n "checking for $ac_word... " >&6; }
9356if ${ac_cv_path_MV+:} false; then :
9357  $as_echo_n "(cached) " >&6
9358else
9359  case $MV in
9360  [\\/]* | ?:[\\/]*)
9361  ac_cv_path_MV="$MV" # Let the user override the test with a path.
9362  ;;
9363  *)
9364  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9365for as_dir in $PATH
9366do
9367  IFS=$as_save_IFS
9368  test -z "$as_dir" && as_dir=.
9369    for ac_exec_ext in '' $ac_executable_extensions; do
9370  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9371    ac_cv_path_MV="$as_dir/$ac_word$ac_exec_ext"
9372    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9373    break 2
9374  fi
9375done
9376  done
9377IFS=$as_save_IFS
9378
9379  ;;
9380esac
9381fi
9382MV=$ac_cv_path_MV
9383if test -n "$MV"; then
9384  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MV" >&5
9385$as_echo "$MV" >&6; }
9386else
9387  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9388$as_echo "no" >&6; }
9389fi
9390
9391
9392          if test "x$MV" = x; then
9393            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9394          fi
9395        else
9396          # Otherwise we believe it is a complete path. Use it as it is.
9397          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MV=$tool_specified" >&5
9398$as_echo "$as_me: Will use user supplied tool MV=$tool_specified" >&6;}
9399          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MV" >&5
9400$as_echo_n "checking for MV... " >&6; }
9401          if test ! -x "$tool_specified"; then
9402            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9403$as_echo "not found" >&6; }
9404            as_fn_error $? "User supplied tool MV=$tool_specified does not exist or is not executable" "$LINENO" 5
9405          fi
9406          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9407$as_echo "$tool_specified" >&6; }
9408        fi
9409      fi
9410    fi
9411
9412  fi
9413
9414
9415
9416  if test "x$MV" = x; then
9417    as_fn_error $? "Could not find required tool for MV" "$LINENO" 5
9418  fi
9419
9420
9421
9422
9423
9424  # Publish this variable in the help.
9425
9426
9427  if [ -z "${NAWK+x}" ]; then
9428    # The variable is not set by user, try to locate tool using the code snippet
9429    for ac_prog in nawk gawk awk
9430do
9431  # Extract the first word of "$ac_prog", so it can be a program name with args.
9432set dummy $ac_prog; ac_word=$2
9433{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9434$as_echo_n "checking for $ac_word... " >&6; }
9435if ${ac_cv_path_NAWK+:} false; then :
9436  $as_echo_n "(cached) " >&6
9437else
9438  case $NAWK in
9439  [\\/]* | ?:[\\/]*)
9440  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9441  ;;
9442  *)
9443  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9444for as_dir in $PATH
9445do
9446  IFS=$as_save_IFS
9447  test -z "$as_dir" && as_dir=.
9448    for ac_exec_ext in '' $ac_executable_extensions; do
9449  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9450    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9451    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9452    break 2
9453  fi
9454done
9455  done
9456IFS=$as_save_IFS
9457
9458  ;;
9459esac
9460fi
9461NAWK=$ac_cv_path_NAWK
9462if test -n "$NAWK"; then
9463  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9464$as_echo "$NAWK" >&6; }
9465else
9466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9467$as_echo "no" >&6; }
9468fi
9469
9470
9471  test -n "$NAWK" && break
9472done
9473
9474  else
9475    # The variable is set, but is it from the command line or the environment?
9476
9477    # Try to remove the string !NAWK! from our list.
9478    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NAWK!/}
9479    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9480      # If it failed, the variable was not from the command line. Ignore it,
9481      # but warn the user (except for BASH, which is always set by the calling BASH).
9482      if test "xNAWK" != xBASH; then
9483        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&5
9484$as_echo "$as_me: WARNING: Ignoring value of NAWK from the environment. Use command line variables instead." >&2;}
9485      fi
9486      # Try to locate tool using the code snippet
9487      for ac_prog in nawk gawk awk
9488do
9489  # Extract the first word of "$ac_prog", so it can be a program name with args.
9490set dummy $ac_prog; ac_word=$2
9491{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9492$as_echo_n "checking for $ac_word... " >&6; }
9493if ${ac_cv_path_NAWK+:} false; then :
9494  $as_echo_n "(cached) " >&6
9495else
9496  case $NAWK in
9497  [\\/]* | ?:[\\/]*)
9498  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9499  ;;
9500  *)
9501  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9502for as_dir in $PATH
9503do
9504  IFS=$as_save_IFS
9505  test -z "$as_dir" && as_dir=.
9506    for ac_exec_ext in '' $ac_executable_extensions; do
9507  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9508    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9509    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9510    break 2
9511  fi
9512done
9513  done
9514IFS=$as_save_IFS
9515
9516  ;;
9517esac
9518fi
9519NAWK=$ac_cv_path_NAWK
9520if test -n "$NAWK"; then
9521  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9522$as_echo "$NAWK" >&6; }
9523else
9524  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9525$as_echo "no" >&6; }
9526fi
9527
9528
9529  test -n "$NAWK" && break
9530done
9531
9532    else
9533      # If it succeeded, then it was overridden by the user. We will use it
9534      # for the tool.
9535
9536      # First remove it from the list of overridden variables, so we can test
9537      # for unknown variables in the end.
9538      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9539
9540      # Check if we try to supply an empty value
9541      if test "x$NAWK" = x; then
9542        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NAWK= (no value)" >&5
9543$as_echo "$as_me: Setting user supplied tool NAWK= (no value)" >&6;}
9544        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9545$as_echo_n "checking for NAWK... " >&6; }
9546        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9547$as_echo "disabled" >&6; }
9548      else
9549        # Check if the provided tool contains a complete path.
9550        tool_specified="$NAWK"
9551        tool_basename="${tool_specified##*/}"
9552        if test "x$tool_basename" = "x$tool_specified"; then
9553          # A command without a complete path is provided, search $PATH.
9554          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NAWK=$tool_basename" >&5
9555$as_echo "$as_me: Will search for user supplied tool NAWK=$tool_basename" >&6;}
9556          # Extract the first word of "$tool_basename", so it can be a program name with args.
9557set dummy $tool_basename; ac_word=$2
9558{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9559$as_echo_n "checking for $ac_word... " >&6; }
9560if ${ac_cv_path_NAWK+:} false; then :
9561  $as_echo_n "(cached) " >&6
9562else
9563  case $NAWK in
9564  [\\/]* | ?:[\\/]*)
9565  ac_cv_path_NAWK="$NAWK" # Let the user override the test with a path.
9566  ;;
9567  *)
9568  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9569for as_dir in $PATH
9570do
9571  IFS=$as_save_IFS
9572  test -z "$as_dir" && as_dir=.
9573    for ac_exec_ext in '' $ac_executable_extensions; do
9574  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9575    ac_cv_path_NAWK="$as_dir/$ac_word$ac_exec_ext"
9576    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9577    break 2
9578  fi
9579done
9580  done
9581IFS=$as_save_IFS
9582
9583  ;;
9584esac
9585fi
9586NAWK=$ac_cv_path_NAWK
9587if test -n "$NAWK"; then
9588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NAWK" >&5
9589$as_echo "$NAWK" >&6; }
9590else
9591  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9592$as_echo "no" >&6; }
9593fi
9594
9595
9596          if test "x$NAWK" = x; then
9597            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9598          fi
9599        else
9600          # Otherwise we believe it is a complete path. Use it as it is.
9601          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NAWK=$tool_specified" >&5
9602$as_echo "$as_me: Will use user supplied tool NAWK=$tool_specified" >&6;}
9603          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NAWK" >&5
9604$as_echo_n "checking for NAWK... " >&6; }
9605          if test ! -x "$tool_specified"; then
9606            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9607$as_echo "not found" >&6; }
9608            as_fn_error $? "User supplied tool NAWK=$tool_specified does not exist or is not executable" "$LINENO" 5
9609          fi
9610          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9611$as_echo "$tool_specified" >&6; }
9612        fi
9613      fi
9614    fi
9615
9616  fi
9617
9618
9619
9620  if test "x$NAWK" = x; then
9621    as_fn_error $? "Could not find required tool for NAWK" "$LINENO" 5
9622  fi
9623
9624
9625
9626
9627
9628  # Publish this variable in the help.
9629
9630
9631  if [ -z "${PRINTF+x}" ]; then
9632    # The variable is not set by user, try to locate tool using the code snippet
9633    for ac_prog in printf
9634do
9635  # Extract the first word of "$ac_prog", so it can be a program name with args.
9636set dummy $ac_prog; ac_word=$2
9637{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9638$as_echo_n "checking for $ac_word... " >&6; }
9639if ${ac_cv_path_PRINTF+:} false; then :
9640  $as_echo_n "(cached) " >&6
9641else
9642  case $PRINTF in
9643  [\\/]* | ?:[\\/]*)
9644  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9645  ;;
9646  *)
9647  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9648for as_dir in $PATH
9649do
9650  IFS=$as_save_IFS
9651  test -z "$as_dir" && as_dir=.
9652    for ac_exec_ext in '' $ac_executable_extensions; do
9653  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9654    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9655    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9656    break 2
9657  fi
9658done
9659  done
9660IFS=$as_save_IFS
9661
9662  ;;
9663esac
9664fi
9665PRINTF=$ac_cv_path_PRINTF
9666if test -n "$PRINTF"; then
9667  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9668$as_echo "$PRINTF" >&6; }
9669else
9670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9671$as_echo "no" >&6; }
9672fi
9673
9674
9675  test -n "$PRINTF" && break
9676done
9677
9678  else
9679    # The variable is set, but is it from the command line or the environment?
9680
9681    # Try to remove the string !PRINTF! from our list.
9682    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PRINTF!/}
9683    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9684      # If it failed, the variable was not from the command line. Ignore it,
9685      # but warn the user (except for BASH, which is always set by the calling BASH).
9686      if test "xPRINTF" != xBASH; then
9687        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&5
9688$as_echo "$as_me: WARNING: Ignoring value of PRINTF from the environment. Use command line variables instead." >&2;}
9689      fi
9690      # Try to locate tool using the code snippet
9691      for ac_prog in printf
9692do
9693  # Extract the first word of "$ac_prog", so it can be a program name with args.
9694set dummy $ac_prog; ac_word=$2
9695{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9696$as_echo_n "checking for $ac_word... " >&6; }
9697if ${ac_cv_path_PRINTF+:} false; then :
9698  $as_echo_n "(cached) " >&6
9699else
9700  case $PRINTF in
9701  [\\/]* | ?:[\\/]*)
9702  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9703  ;;
9704  *)
9705  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9706for as_dir in $PATH
9707do
9708  IFS=$as_save_IFS
9709  test -z "$as_dir" && as_dir=.
9710    for ac_exec_ext in '' $ac_executable_extensions; do
9711  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9712    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9713    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9714    break 2
9715  fi
9716done
9717  done
9718IFS=$as_save_IFS
9719
9720  ;;
9721esac
9722fi
9723PRINTF=$ac_cv_path_PRINTF
9724if test -n "$PRINTF"; then
9725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9726$as_echo "$PRINTF" >&6; }
9727else
9728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9729$as_echo "no" >&6; }
9730fi
9731
9732
9733  test -n "$PRINTF" && break
9734done
9735
9736    else
9737      # If it succeeded, then it was overridden by the user. We will use it
9738      # for the tool.
9739
9740      # First remove it from the list of overridden variables, so we can test
9741      # for unknown variables in the end.
9742      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9743
9744      # Check if we try to supply an empty value
9745      if test "x$PRINTF" = x; then
9746        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PRINTF= (no value)" >&5
9747$as_echo "$as_me: Setting user supplied tool PRINTF= (no value)" >&6;}
9748        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9749$as_echo_n "checking for PRINTF... " >&6; }
9750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9751$as_echo "disabled" >&6; }
9752      else
9753        # Check if the provided tool contains a complete path.
9754        tool_specified="$PRINTF"
9755        tool_basename="${tool_specified##*/}"
9756        if test "x$tool_basename" = "x$tool_specified"; then
9757          # A command without a complete path is provided, search $PATH.
9758          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PRINTF=$tool_basename" >&5
9759$as_echo "$as_me: Will search for user supplied tool PRINTF=$tool_basename" >&6;}
9760          # Extract the first word of "$tool_basename", so it can be a program name with args.
9761set dummy $tool_basename; ac_word=$2
9762{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9763$as_echo_n "checking for $ac_word... " >&6; }
9764if ${ac_cv_path_PRINTF+:} false; then :
9765  $as_echo_n "(cached) " >&6
9766else
9767  case $PRINTF in
9768  [\\/]* | ?:[\\/]*)
9769  ac_cv_path_PRINTF="$PRINTF" # Let the user override the test with a path.
9770  ;;
9771  *)
9772  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9773for as_dir in $PATH
9774do
9775  IFS=$as_save_IFS
9776  test -z "$as_dir" && as_dir=.
9777    for ac_exec_ext in '' $ac_executable_extensions; do
9778  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9779    ac_cv_path_PRINTF="$as_dir/$ac_word$ac_exec_ext"
9780    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9781    break 2
9782  fi
9783done
9784  done
9785IFS=$as_save_IFS
9786
9787  ;;
9788esac
9789fi
9790PRINTF=$ac_cv_path_PRINTF
9791if test -n "$PRINTF"; then
9792  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PRINTF" >&5
9793$as_echo "$PRINTF" >&6; }
9794else
9795  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9796$as_echo "no" >&6; }
9797fi
9798
9799
9800          if test "x$PRINTF" = x; then
9801            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
9802          fi
9803        else
9804          # Otherwise we believe it is a complete path. Use it as it is.
9805          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PRINTF=$tool_specified" >&5
9806$as_echo "$as_me: Will use user supplied tool PRINTF=$tool_specified" >&6;}
9807          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PRINTF" >&5
9808$as_echo_n "checking for PRINTF... " >&6; }
9809          if test ! -x "$tool_specified"; then
9810            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
9811$as_echo "not found" >&6; }
9812            as_fn_error $? "User supplied tool PRINTF=$tool_specified does not exist or is not executable" "$LINENO" 5
9813          fi
9814          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
9815$as_echo "$tool_specified" >&6; }
9816        fi
9817      fi
9818    fi
9819
9820  fi
9821
9822
9823
9824  if test "x$PRINTF" = x; then
9825    as_fn_error $? "Could not find required tool for PRINTF" "$LINENO" 5
9826  fi
9827
9828
9829
9830
9831
9832  # Publish this variable in the help.
9833
9834
9835  if [ -z "${RM+x}" ]; then
9836    # The variable is not set by user, try to locate tool using the code snippet
9837    for ac_prog in rm
9838do
9839  # Extract the first word of "$ac_prog", so it can be a program name with args.
9840set dummy $ac_prog; ac_word=$2
9841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9842$as_echo_n "checking for $ac_word... " >&6; }
9843if ${ac_cv_path_RM+:} false; then :
9844  $as_echo_n "(cached) " >&6
9845else
9846  case $RM in
9847  [\\/]* | ?:[\\/]*)
9848  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9849  ;;
9850  *)
9851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9852for as_dir in $PATH
9853do
9854  IFS=$as_save_IFS
9855  test -z "$as_dir" && as_dir=.
9856    for ac_exec_ext in '' $ac_executable_extensions; do
9857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9858    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9860    break 2
9861  fi
9862done
9863  done
9864IFS=$as_save_IFS
9865
9866  ;;
9867esac
9868fi
9869RM=$ac_cv_path_RM
9870if test -n "$RM"; then
9871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9872$as_echo "$RM" >&6; }
9873else
9874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9875$as_echo "no" >&6; }
9876fi
9877
9878
9879  test -n "$RM" && break
9880done
9881
9882  else
9883    # The variable is set, but is it from the command line or the environment?
9884
9885    # Try to remove the string !RM! from our list.
9886    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RM!/}
9887    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
9888      # If it failed, the variable was not from the command line. Ignore it,
9889      # but warn the user (except for BASH, which is always set by the calling BASH).
9890      if test "xRM" != xBASH; then
9891        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&5
9892$as_echo "$as_me: WARNING: Ignoring value of RM from the environment. Use command line variables instead." >&2;}
9893      fi
9894      # Try to locate tool using the code snippet
9895      for ac_prog in rm
9896do
9897  # Extract the first word of "$ac_prog", so it can be a program name with args.
9898set dummy $ac_prog; ac_word=$2
9899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9900$as_echo_n "checking for $ac_word... " >&6; }
9901if ${ac_cv_path_RM+:} false; then :
9902  $as_echo_n "(cached) " >&6
9903else
9904  case $RM in
9905  [\\/]* | ?:[\\/]*)
9906  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9907  ;;
9908  *)
9909  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9910for as_dir in $PATH
9911do
9912  IFS=$as_save_IFS
9913  test -z "$as_dir" && as_dir=.
9914    for ac_exec_ext in '' $ac_executable_extensions; do
9915  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9916    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9917    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9918    break 2
9919  fi
9920done
9921  done
9922IFS=$as_save_IFS
9923
9924  ;;
9925esac
9926fi
9927RM=$ac_cv_path_RM
9928if test -n "$RM"; then
9929  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9930$as_echo "$RM" >&6; }
9931else
9932  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
9933$as_echo "no" >&6; }
9934fi
9935
9936
9937  test -n "$RM" && break
9938done
9939
9940    else
9941      # If it succeeded, then it was overridden by the user. We will use it
9942      # for the tool.
9943
9944      # First remove it from the list of overridden variables, so we can test
9945      # for unknown variables in the end.
9946      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
9947
9948      # Check if we try to supply an empty value
9949      if test "x$RM" = x; then
9950        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RM= (no value)" >&5
9951$as_echo "$as_me: Setting user supplied tool RM= (no value)" >&6;}
9952        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
9953$as_echo_n "checking for RM... " >&6; }
9954        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
9955$as_echo "disabled" >&6; }
9956      else
9957        # Check if the provided tool contains a complete path.
9958        tool_specified="$RM"
9959        tool_basename="${tool_specified##*/}"
9960        if test "x$tool_basename" = "x$tool_specified"; then
9961          # A command without a complete path is provided, search $PATH.
9962          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RM=$tool_basename" >&5
9963$as_echo "$as_me: Will search for user supplied tool RM=$tool_basename" >&6;}
9964          # Extract the first word of "$tool_basename", so it can be a program name with args.
9965set dummy $tool_basename; ac_word=$2
9966{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
9967$as_echo_n "checking for $ac_word... " >&6; }
9968if ${ac_cv_path_RM+:} false; then :
9969  $as_echo_n "(cached) " >&6
9970else
9971  case $RM in
9972  [\\/]* | ?:[\\/]*)
9973  ac_cv_path_RM="$RM" # Let the user override the test with a path.
9974  ;;
9975  *)
9976  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
9977for as_dir in $PATH
9978do
9979  IFS=$as_save_IFS
9980  test -z "$as_dir" && as_dir=.
9981    for ac_exec_ext in '' $ac_executable_extensions; do
9982  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
9983    ac_cv_path_RM="$as_dir/$ac_word$ac_exec_ext"
9984    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
9985    break 2
9986  fi
9987done
9988  done
9989IFS=$as_save_IFS
9990
9991  ;;
9992esac
9993fi
9994RM=$ac_cv_path_RM
9995if test -n "$RM"; then
9996  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RM" >&5
9997$as_echo "$RM" >&6; }
9998else
9999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10000$as_echo "no" >&6; }
10001fi
10002
10003
10004          if test "x$RM" = x; then
10005            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10006          fi
10007        else
10008          # Otherwise we believe it is a complete path. Use it as it is.
10009          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RM=$tool_specified" >&5
10010$as_echo "$as_me: Will use user supplied tool RM=$tool_specified" >&6;}
10011          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RM" >&5
10012$as_echo_n "checking for RM... " >&6; }
10013          if test ! -x "$tool_specified"; then
10014            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10015$as_echo "not found" >&6; }
10016            as_fn_error $? "User supplied tool RM=$tool_specified does not exist or is not executable" "$LINENO" 5
10017          fi
10018          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10019$as_echo "$tool_specified" >&6; }
10020        fi
10021      fi
10022    fi
10023
10024  fi
10025
10026
10027
10028  if test "x$RM" = x; then
10029    as_fn_error $? "Could not find required tool for RM" "$LINENO" 5
10030  fi
10031
10032
10033
10034
10035
10036  # Publish this variable in the help.
10037
10038
10039  if [ -z "${RMDIR+x}" ]; then
10040    # The variable is not set by user, try to locate tool using the code snippet
10041    for ac_prog in rmdir
10042do
10043  # Extract the first word of "$ac_prog", so it can be a program name with args.
10044set dummy $ac_prog; ac_word=$2
10045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10046$as_echo_n "checking for $ac_word... " >&6; }
10047if ${ac_cv_path_RMDIR+:} false; then :
10048  $as_echo_n "(cached) " >&6
10049else
10050  case $RMDIR in
10051  [\\/]* | ?:[\\/]*)
10052  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10053  ;;
10054  *)
10055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10056for as_dir in $PATH
10057do
10058  IFS=$as_save_IFS
10059  test -z "$as_dir" && as_dir=.
10060    for ac_exec_ext in '' $ac_executable_extensions; do
10061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10062    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10064    break 2
10065  fi
10066done
10067  done
10068IFS=$as_save_IFS
10069
10070  ;;
10071esac
10072fi
10073RMDIR=$ac_cv_path_RMDIR
10074if test -n "$RMDIR"; then
10075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10076$as_echo "$RMDIR" >&6; }
10077else
10078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10079$as_echo "no" >&6; }
10080fi
10081
10082
10083  test -n "$RMDIR" && break
10084done
10085
10086  else
10087    # The variable is set, but is it from the command line or the environment?
10088
10089    # Try to remove the string !RMDIR! from our list.
10090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!RMDIR!/}
10091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10092      # If it failed, the variable was not from the command line. Ignore it,
10093      # but warn the user (except for BASH, which is always set by the calling BASH).
10094      if test "xRMDIR" != xBASH; then
10095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&5
10096$as_echo "$as_me: WARNING: Ignoring value of RMDIR from the environment. Use command line variables instead." >&2;}
10097      fi
10098      # Try to locate tool using the code snippet
10099      for ac_prog in rmdir
10100do
10101  # Extract the first word of "$ac_prog", so it can be a program name with args.
10102set dummy $ac_prog; ac_word=$2
10103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10104$as_echo_n "checking for $ac_word... " >&6; }
10105if ${ac_cv_path_RMDIR+:} false; then :
10106  $as_echo_n "(cached) " >&6
10107else
10108  case $RMDIR in
10109  [\\/]* | ?:[\\/]*)
10110  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10111  ;;
10112  *)
10113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10114for as_dir in $PATH
10115do
10116  IFS=$as_save_IFS
10117  test -z "$as_dir" && as_dir=.
10118    for ac_exec_ext in '' $ac_executable_extensions; do
10119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10120    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10122    break 2
10123  fi
10124done
10125  done
10126IFS=$as_save_IFS
10127
10128  ;;
10129esac
10130fi
10131RMDIR=$ac_cv_path_RMDIR
10132if test -n "$RMDIR"; then
10133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10134$as_echo "$RMDIR" >&6; }
10135else
10136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10137$as_echo "no" >&6; }
10138fi
10139
10140
10141  test -n "$RMDIR" && break
10142done
10143
10144    else
10145      # If it succeeded, then it was overridden by the user. We will use it
10146      # for the tool.
10147
10148      # First remove it from the list of overridden variables, so we can test
10149      # for unknown variables in the end.
10150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10151
10152      # Check if we try to supply an empty value
10153      if test "x$RMDIR" = x; then
10154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool RMDIR= (no value)" >&5
10155$as_echo "$as_me: Setting user supplied tool RMDIR= (no value)" >&6;}
10156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10157$as_echo_n "checking for RMDIR... " >&6; }
10158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10159$as_echo "disabled" >&6; }
10160      else
10161        # Check if the provided tool contains a complete path.
10162        tool_specified="$RMDIR"
10163        tool_basename="${tool_specified##*/}"
10164        if test "x$tool_basename" = "x$tool_specified"; then
10165          # A command without a complete path is provided, search $PATH.
10166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool RMDIR=$tool_basename" >&5
10167$as_echo "$as_me: Will search for user supplied tool RMDIR=$tool_basename" >&6;}
10168          # Extract the first word of "$tool_basename", so it can be a program name with args.
10169set dummy $tool_basename; ac_word=$2
10170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10171$as_echo_n "checking for $ac_word... " >&6; }
10172if ${ac_cv_path_RMDIR+:} false; then :
10173  $as_echo_n "(cached) " >&6
10174else
10175  case $RMDIR in
10176  [\\/]* | ?:[\\/]*)
10177  ac_cv_path_RMDIR="$RMDIR" # Let the user override the test with a path.
10178  ;;
10179  *)
10180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10181for as_dir in $PATH
10182do
10183  IFS=$as_save_IFS
10184  test -z "$as_dir" && as_dir=.
10185    for ac_exec_ext in '' $ac_executable_extensions; do
10186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10187    ac_cv_path_RMDIR="$as_dir/$ac_word$ac_exec_ext"
10188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10189    break 2
10190  fi
10191done
10192  done
10193IFS=$as_save_IFS
10194
10195  ;;
10196esac
10197fi
10198RMDIR=$ac_cv_path_RMDIR
10199if test -n "$RMDIR"; then
10200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RMDIR" >&5
10201$as_echo "$RMDIR" >&6; }
10202else
10203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10204$as_echo "no" >&6; }
10205fi
10206
10207
10208          if test "x$RMDIR" = x; then
10209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10210          fi
10211        else
10212          # Otherwise we believe it is a complete path. Use it as it is.
10213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool RMDIR=$tool_specified" >&5
10214$as_echo "$as_me: Will use user supplied tool RMDIR=$tool_specified" >&6;}
10215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for RMDIR" >&5
10216$as_echo_n "checking for RMDIR... " >&6; }
10217          if test ! -x "$tool_specified"; then
10218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10219$as_echo "not found" >&6; }
10220            as_fn_error $? "User supplied tool RMDIR=$tool_specified does not exist or is not executable" "$LINENO" 5
10221          fi
10222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10223$as_echo "$tool_specified" >&6; }
10224        fi
10225      fi
10226    fi
10227
10228  fi
10229
10230
10231
10232  if test "x$RMDIR" = x; then
10233    as_fn_error $? "Could not find required tool for RMDIR" "$LINENO" 5
10234  fi
10235
10236
10237
10238
10239
10240  # Publish this variable in the help.
10241
10242
10243  if [ -z "${SH+x}" ]; then
10244    # The variable is not set by user, try to locate tool using the code snippet
10245    for ac_prog in sh
10246do
10247  # Extract the first word of "$ac_prog", so it can be a program name with args.
10248set dummy $ac_prog; ac_word=$2
10249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10250$as_echo_n "checking for $ac_word... " >&6; }
10251if ${ac_cv_path_SH+:} false; then :
10252  $as_echo_n "(cached) " >&6
10253else
10254  case $SH in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10260for as_dir in $PATH
10261do
10262  IFS=$as_save_IFS
10263  test -z "$as_dir" && as_dir=.
10264    for ac_exec_ext in '' $ac_executable_extensions; do
10265  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10266    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10267    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10268    break 2
10269  fi
10270done
10271  done
10272IFS=$as_save_IFS
10273
10274  ;;
10275esac
10276fi
10277SH=$ac_cv_path_SH
10278if test -n "$SH"; then
10279  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10280$as_echo "$SH" >&6; }
10281else
10282  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10283$as_echo "no" >&6; }
10284fi
10285
10286
10287  test -n "$SH" && break
10288done
10289
10290  else
10291    # The variable is set, but is it from the command line or the environment?
10292
10293    # Try to remove the string !SH! from our list.
10294    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SH!/}
10295    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10296      # If it failed, the variable was not from the command line. Ignore it,
10297      # but warn the user (except for BASH, which is always set by the calling BASH).
10298      if test "xSH" != xBASH; then
10299        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&5
10300$as_echo "$as_me: WARNING: Ignoring value of SH from the environment. Use command line variables instead." >&2;}
10301      fi
10302      # Try to locate tool using the code snippet
10303      for ac_prog in sh
10304do
10305  # Extract the first word of "$ac_prog", so it can be a program name with args.
10306set dummy $ac_prog; ac_word=$2
10307{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10308$as_echo_n "checking for $ac_word... " >&6; }
10309if ${ac_cv_path_SH+:} false; then :
10310  $as_echo_n "(cached) " >&6
10311else
10312  case $SH in
10313  [\\/]* | ?:[\\/]*)
10314  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10315  ;;
10316  *)
10317  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10318for as_dir in $PATH
10319do
10320  IFS=$as_save_IFS
10321  test -z "$as_dir" && as_dir=.
10322    for ac_exec_ext in '' $ac_executable_extensions; do
10323  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10324    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10325    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10326    break 2
10327  fi
10328done
10329  done
10330IFS=$as_save_IFS
10331
10332  ;;
10333esac
10334fi
10335SH=$ac_cv_path_SH
10336if test -n "$SH"; then
10337  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10338$as_echo "$SH" >&6; }
10339else
10340  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10341$as_echo "no" >&6; }
10342fi
10343
10344
10345  test -n "$SH" && break
10346done
10347
10348    else
10349      # If it succeeded, then it was overridden by the user. We will use it
10350      # for the tool.
10351
10352      # First remove it from the list of overridden variables, so we can test
10353      # for unknown variables in the end.
10354      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10355
10356      # Check if we try to supply an empty value
10357      if test "x$SH" = x; then
10358        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SH= (no value)" >&5
10359$as_echo "$as_me: Setting user supplied tool SH= (no value)" >&6;}
10360        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10361$as_echo_n "checking for SH... " >&6; }
10362        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10363$as_echo "disabled" >&6; }
10364      else
10365        # Check if the provided tool contains a complete path.
10366        tool_specified="$SH"
10367        tool_basename="${tool_specified##*/}"
10368        if test "x$tool_basename" = "x$tool_specified"; then
10369          # A command without a complete path is provided, search $PATH.
10370          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SH=$tool_basename" >&5
10371$as_echo "$as_me: Will search for user supplied tool SH=$tool_basename" >&6;}
10372          # Extract the first word of "$tool_basename", so it can be a program name with args.
10373set dummy $tool_basename; ac_word=$2
10374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10375$as_echo_n "checking for $ac_word... " >&6; }
10376if ${ac_cv_path_SH+:} false; then :
10377  $as_echo_n "(cached) " >&6
10378else
10379  case $SH in
10380  [\\/]* | ?:[\\/]*)
10381  ac_cv_path_SH="$SH" # Let the user override the test with a path.
10382  ;;
10383  *)
10384  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10385for as_dir in $PATH
10386do
10387  IFS=$as_save_IFS
10388  test -z "$as_dir" && as_dir=.
10389    for ac_exec_ext in '' $ac_executable_extensions; do
10390  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10391    ac_cv_path_SH="$as_dir/$ac_word$ac_exec_ext"
10392    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10393    break 2
10394  fi
10395done
10396  done
10397IFS=$as_save_IFS
10398
10399  ;;
10400esac
10401fi
10402SH=$ac_cv_path_SH
10403if test -n "$SH"; then
10404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SH" >&5
10405$as_echo "$SH" >&6; }
10406else
10407  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10408$as_echo "no" >&6; }
10409fi
10410
10411
10412          if test "x$SH" = x; then
10413            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10414          fi
10415        else
10416          # Otherwise we believe it is a complete path. Use it as it is.
10417          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SH=$tool_specified" >&5
10418$as_echo "$as_me: Will use user supplied tool SH=$tool_specified" >&6;}
10419          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SH" >&5
10420$as_echo_n "checking for SH... " >&6; }
10421          if test ! -x "$tool_specified"; then
10422            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10423$as_echo "not found" >&6; }
10424            as_fn_error $? "User supplied tool SH=$tool_specified does not exist or is not executable" "$LINENO" 5
10425          fi
10426          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10427$as_echo "$tool_specified" >&6; }
10428        fi
10429      fi
10430    fi
10431
10432  fi
10433
10434
10435
10436  if test "x$SH" = x; then
10437    as_fn_error $? "Could not find required tool for SH" "$LINENO" 5
10438  fi
10439
10440
10441
10442
10443
10444  # Publish this variable in the help.
10445
10446
10447  if [ -z "${SORT+x}" ]; then
10448    # The variable is not set by user, try to locate tool using the code snippet
10449    for ac_prog in sort
10450do
10451  # Extract the first word of "$ac_prog", so it can be a program name with args.
10452set dummy $ac_prog; ac_word=$2
10453{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10454$as_echo_n "checking for $ac_word... " >&6; }
10455if ${ac_cv_path_SORT+:} false; then :
10456  $as_echo_n "(cached) " >&6
10457else
10458  case $SORT in
10459  [\\/]* | ?:[\\/]*)
10460  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10461  ;;
10462  *)
10463  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10464for as_dir in $PATH
10465do
10466  IFS=$as_save_IFS
10467  test -z "$as_dir" && as_dir=.
10468    for ac_exec_ext in '' $ac_executable_extensions; do
10469  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10470    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10471    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10472    break 2
10473  fi
10474done
10475  done
10476IFS=$as_save_IFS
10477
10478  ;;
10479esac
10480fi
10481SORT=$ac_cv_path_SORT
10482if test -n "$SORT"; then
10483  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10484$as_echo "$SORT" >&6; }
10485else
10486  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10487$as_echo "no" >&6; }
10488fi
10489
10490
10491  test -n "$SORT" && break
10492done
10493
10494  else
10495    # The variable is set, but is it from the command line or the environment?
10496
10497    # Try to remove the string !SORT! from our list.
10498    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SORT!/}
10499    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10500      # If it failed, the variable was not from the command line. Ignore it,
10501      # but warn the user (except for BASH, which is always set by the calling BASH).
10502      if test "xSORT" != xBASH; then
10503        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&5
10504$as_echo "$as_me: WARNING: Ignoring value of SORT from the environment. Use command line variables instead." >&2;}
10505      fi
10506      # Try to locate tool using the code snippet
10507      for ac_prog in sort
10508do
10509  # Extract the first word of "$ac_prog", so it can be a program name with args.
10510set dummy $ac_prog; ac_word=$2
10511{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10512$as_echo_n "checking for $ac_word... " >&6; }
10513if ${ac_cv_path_SORT+:} false; then :
10514  $as_echo_n "(cached) " >&6
10515else
10516  case $SORT in
10517  [\\/]* | ?:[\\/]*)
10518  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10519  ;;
10520  *)
10521  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10522for as_dir in $PATH
10523do
10524  IFS=$as_save_IFS
10525  test -z "$as_dir" && as_dir=.
10526    for ac_exec_ext in '' $ac_executable_extensions; do
10527  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10528    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10529    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10530    break 2
10531  fi
10532done
10533  done
10534IFS=$as_save_IFS
10535
10536  ;;
10537esac
10538fi
10539SORT=$ac_cv_path_SORT
10540if test -n "$SORT"; then
10541  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10542$as_echo "$SORT" >&6; }
10543else
10544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10545$as_echo "no" >&6; }
10546fi
10547
10548
10549  test -n "$SORT" && break
10550done
10551
10552    else
10553      # If it succeeded, then it was overridden by the user. We will use it
10554      # for the tool.
10555
10556      # First remove it from the list of overridden variables, so we can test
10557      # for unknown variables in the end.
10558      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10559
10560      # Check if we try to supply an empty value
10561      if test "x$SORT" = x; then
10562        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SORT= (no value)" >&5
10563$as_echo "$as_me: Setting user supplied tool SORT= (no value)" >&6;}
10564        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10565$as_echo_n "checking for SORT... " >&6; }
10566        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10567$as_echo "disabled" >&6; }
10568      else
10569        # Check if the provided tool contains a complete path.
10570        tool_specified="$SORT"
10571        tool_basename="${tool_specified##*/}"
10572        if test "x$tool_basename" = "x$tool_specified"; then
10573          # A command without a complete path is provided, search $PATH.
10574          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SORT=$tool_basename" >&5
10575$as_echo "$as_me: Will search for user supplied tool SORT=$tool_basename" >&6;}
10576          # Extract the first word of "$tool_basename", so it can be a program name with args.
10577set dummy $tool_basename; ac_word=$2
10578{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10579$as_echo_n "checking for $ac_word... " >&6; }
10580if ${ac_cv_path_SORT+:} false; then :
10581  $as_echo_n "(cached) " >&6
10582else
10583  case $SORT in
10584  [\\/]* | ?:[\\/]*)
10585  ac_cv_path_SORT="$SORT" # Let the user override the test with a path.
10586  ;;
10587  *)
10588  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10589for as_dir in $PATH
10590do
10591  IFS=$as_save_IFS
10592  test -z "$as_dir" && as_dir=.
10593    for ac_exec_ext in '' $ac_executable_extensions; do
10594  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10595    ac_cv_path_SORT="$as_dir/$ac_word$ac_exec_ext"
10596    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10597    break 2
10598  fi
10599done
10600  done
10601IFS=$as_save_IFS
10602
10603  ;;
10604esac
10605fi
10606SORT=$ac_cv_path_SORT
10607if test -n "$SORT"; then
10608  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SORT" >&5
10609$as_echo "$SORT" >&6; }
10610else
10611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10612$as_echo "no" >&6; }
10613fi
10614
10615
10616          if test "x$SORT" = x; then
10617            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10618          fi
10619        else
10620          # Otherwise we believe it is a complete path. Use it as it is.
10621          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SORT=$tool_specified" >&5
10622$as_echo "$as_me: Will use user supplied tool SORT=$tool_specified" >&6;}
10623          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SORT" >&5
10624$as_echo_n "checking for SORT... " >&6; }
10625          if test ! -x "$tool_specified"; then
10626            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10627$as_echo "not found" >&6; }
10628            as_fn_error $? "User supplied tool SORT=$tool_specified does not exist or is not executable" "$LINENO" 5
10629          fi
10630          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10631$as_echo "$tool_specified" >&6; }
10632        fi
10633      fi
10634    fi
10635
10636  fi
10637
10638
10639
10640  if test "x$SORT" = x; then
10641    as_fn_error $? "Could not find required tool for SORT" "$LINENO" 5
10642  fi
10643
10644
10645
10646
10647
10648  # Publish this variable in the help.
10649
10650
10651  if [ -z "${TAIL+x}" ]; then
10652    # The variable is not set by user, try to locate tool using the code snippet
10653    for ac_prog in tail
10654do
10655  # Extract the first word of "$ac_prog", so it can be a program name with args.
10656set dummy $ac_prog; ac_word=$2
10657{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10658$as_echo_n "checking for $ac_word... " >&6; }
10659if ${ac_cv_path_TAIL+:} false; then :
10660  $as_echo_n "(cached) " >&6
10661else
10662  case $TAIL in
10663  [\\/]* | ?:[\\/]*)
10664  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10665  ;;
10666  *)
10667  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10668for as_dir in $PATH
10669do
10670  IFS=$as_save_IFS
10671  test -z "$as_dir" && as_dir=.
10672    for ac_exec_ext in '' $ac_executable_extensions; do
10673  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10674    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10675    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10676    break 2
10677  fi
10678done
10679  done
10680IFS=$as_save_IFS
10681
10682  ;;
10683esac
10684fi
10685TAIL=$ac_cv_path_TAIL
10686if test -n "$TAIL"; then
10687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10688$as_echo "$TAIL" >&6; }
10689else
10690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10691$as_echo "no" >&6; }
10692fi
10693
10694
10695  test -n "$TAIL" && break
10696done
10697
10698  else
10699    # The variable is set, but is it from the command line or the environment?
10700
10701    # Try to remove the string !TAIL! from our list.
10702    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAIL!/}
10703    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10704      # If it failed, the variable was not from the command line. Ignore it,
10705      # but warn the user (except for BASH, which is always set by the calling BASH).
10706      if test "xTAIL" != xBASH; then
10707        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&5
10708$as_echo "$as_me: WARNING: Ignoring value of TAIL from the environment. Use command line variables instead." >&2;}
10709      fi
10710      # Try to locate tool using the code snippet
10711      for ac_prog in tail
10712do
10713  # Extract the first word of "$ac_prog", so it can be a program name with args.
10714set dummy $ac_prog; ac_word=$2
10715{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10716$as_echo_n "checking for $ac_word... " >&6; }
10717if ${ac_cv_path_TAIL+:} false; then :
10718  $as_echo_n "(cached) " >&6
10719else
10720  case $TAIL in
10721  [\\/]* | ?:[\\/]*)
10722  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10723  ;;
10724  *)
10725  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10726for as_dir in $PATH
10727do
10728  IFS=$as_save_IFS
10729  test -z "$as_dir" && as_dir=.
10730    for ac_exec_ext in '' $ac_executable_extensions; do
10731  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10732    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10733    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10734    break 2
10735  fi
10736done
10737  done
10738IFS=$as_save_IFS
10739
10740  ;;
10741esac
10742fi
10743TAIL=$ac_cv_path_TAIL
10744if test -n "$TAIL"; then
10745  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10746$as_echo "$TAIL" >&6; }
10747else
10748  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10749$as_echo "no" >&6; }
10750fi
10751
10752
10753  test -n "$TAIL" && break
10754done
10755
10756    else
10757      # If it succeeded, then it was overridden by the user. We will use it
10758      # for the tool.
10759
10760      # First remove it from the list of overridden variables, so we can test
10761      # for unknown variables in the end.
10762      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10763
10764      # Check if we try to supply an empty value
10765      if test "x$TAIL" = x; then
10766        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAIL= (no value)" >&5
10767$as_echo "$as_me: Setting user supplied tool TAIL= (no value)" >&6;}
10768        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10769$as_echo_n "checking for TAIL... " >&6; }
10770        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10771$as_echo "disabled" >&6; }
10772      else
10773        # Check if the provided tool contains a complete path.
10774        tool_specified="$TAIL"
10775        tool_basename="${tool_specified##*/}"
10776        if test "x$tool_basename" = "x$tool_specified"; then
10777          # A command without a complete path is provided, search $PATH.
10778          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAIL=$tool_basename" >&5
10779$as_echo "$as_me: Will search for user supplied tool TAIL=$tool_basename" >&6;}
10780          # Extract the first word of "$tool_basename", so it can be a program name with args.
10781set dummy $tool_basename; ac_word=$2
10782{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10783$as_echo_n "checking for $ac_word... " >&6; }
10784if ${ac_cv_path_TAIL+:} false; then :
10785  $as_echo_n "(cached) " >&6
10786else
10787  case $TAIL in
10788  [\\/]* | ?:[\\/]*)
10789  ac_cv_path_TAIL="$TAIL" # Let the user override the test with a path.
10790  ;;
10791  *)
10792  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10793for as_dir in $PATH
10794do
10795  IFS=$as_save_IFS
10796  test -z "$as_dir" && as_dir=.
10797    for ac_exec_ext in '' $ac_executable_extensions; do
10798  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10799    ac_cv_path_TAIL="$as_dir/$ac_word$ac_exec_ext"
10800    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10801    break 2
10802  fi
10803done
10804  done
10805IFS=$as_save_IFS
10806
10807  ;;
10808esac
10809fi
10810TAIL=$ac_cv_path_TAIL
10811if test -n "$TAIL"; then
10812  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAIL" >&5
10813$as_echo "$TAIL" >&6; }
10814else
10815  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10816$as_echo "no" >&6; }
10817fi
10818
10819
10820          if test "x$TAIL" = x; then
10821            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
10822          fi
10823        else
10824          # Otherwise we believe it is a complete path. Use it as it is.
10825          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAIL=$tool_specified" >&5
10826$as_echo "$as_me: Will use user supplied tool TAIL=$tool_specified" >&6;}
10827          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAIL" >&5
10828$as_echo_n "checking for TAIL... " >&6; }
10829          if test ! -x "$tool_specified"; then
10830            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
10831$as_echo "not found" >&6; }
10832            as_fn_error $? "User supplied tool TAIL=$tool_specified does not exist or is not executable" "$LINENO" 5
10833          fi
10834          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
10835$as_echo "$tool_specified" >&6; }
10836        fi
10837      fi
10838    fi
10839
10840  fi
10841
10842
10843
10844  if test "x$TAIL" = x; then
10845    as_fn_error $? "Could not find required tool for TAIL" "$LINENO" 5
10846  fi
10847
10848
10849
10850
10851
10852  # Publish this variable in the help.
10853
10854
10855  if [ -z "${TAR+x}" ]; then
10856    # The variable is not set by user, try to locate tool using the code snippet
10857    for ac_prog in tar
10858do
10859  # Extract the first word of "$ac_prog", so it can be a program name with args.
10860set dummy $ac_prog; ac_word=$2
10861{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10862$as_echo_n "checking for $ac_word... " >&6; }
10863if ${ac_cv_path_TAR+:} false; then :
10864  $as_echo_n "(cached) " >&6
10865else
10866  case $TAR in
10867  [\\/]* | ?:[\\/]*)
10868  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10869  ;;
10870  *)
10871  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10872for as_dir in $PATH
10873do
10874  IFS=$as_save_IFS
10875  test -z "$as_dir" && as_dir=.
10876    for ac_exec_ext in '' $ac_executable_extensions; do
10877  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10878    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10879    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10880    break 2
10881  fi
10882done
10883  done
10884IFS=$as_save_IFS
10885
10886  ;;
10887esac
10888fi
10889TAR=$ac_cv_path_TAR
10890if test -n "$TAR"; then
10891  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10892$as_echo "$TAR" >&6; }
10893else
10894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10895$as_echo "no" >&6; }
10896fi
10897
10898
10899  test -n "$TAR" && break
10900done
10901
10902  else
10903    # The variable is set, but is it from the command line or the environment?
10904
10905    # Try to remove the string !TAR! from our list.
10906    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TAR!/}
10907    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
10908      # If it failed, the variable was not from the command line. Ignore it,
10909      # but warn the user (except for BASH, which is always set by the calling BASH).
10910      if test "xTAR" != xBASH; then
10911        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&5
10912$as_echo "$as_me: WARNING: Ignoring value of TAR from the environment. Use command line variables instead." >&2;}
10913      fi
10914      # Try to locate tool using the code snippet
10915      for ac_prog in tar
10916do
10917  # Extract the first word of "$ac_prog", so it can be a program name with args.
10918set dummy $ac_prog; ac_word=$2
10919{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10920$as_echo_n "checking for $ac_word... " >&6; }
10921if ${ac_cv_path_TAR+:} false; then :
10922  $as_echo_n "(cached) " >&6
10923else
10924  case $TAR in
10925  [\\/]* | ?:[\\/]*)
10926  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10927  ;;
10928  *)
10929  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10930for as_dir in $PATH
10931do
10932  IFS=$as_save_IFS
10933  test -z "$as_dir" && as_dir=.
10934    for ac_exec_ext in '' $ac_executable_extensions; do
10935  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
10936    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
10937    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
10938    break 2
10939  fi
10940done
10941  done
10942IFS=$as_save_IFS
10943
10944  ;;
10945esac
10946fi
10947TAR=$ac_cv_path_TAR
10948if test -n "$TAR"; then
10949  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
10950$as_echo "$TAR" >&6; }
10951else
10952  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
10953$as_echo "no" >&6; }
10954fi
10955
10956
10957  test -n "$TAR" && break
10958done
10959
10960    else
10961      # If it succeeded, then it was overridden by the user. We will use it
10962      # for the tool.
10963
10964      # First remove it from the list of overridden variables, so we can test
10965      # for unknown variables in the end.
10966      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
10967
10968      # Check if we try to supply an empty value
10969      if test "x$TAR" = x; then
10970        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TAR= (no value)" >&5
10971$as_echo "$as_me: Setting user supplied tool TAR= (no value)" >&6;}
10972        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
10973$as_echo_n "checking for TAR... " >&6; }
10974        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
10975$as_echo "disabled" >&6; }
10976      else
10977        # Check if the provided tool contains a complete path.
10978        tool_specified="$TAR"
10979        tool_basename="${tool_specified##*/}"
10980        if test "x$tool_basename" = "x$tool_specified"; then
10981          # A command without a complete path is provided, search $PATH.
10982          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TAR=$tool_basename" >&5
10983$as_echo "$as_me: Will search for user supplied tool TAR=$tool_basename" >&6;}
10984          # Extract the first word of "$tool_basename", so it can be a program name with args.
10985set dummy $tool_basename; ac_word=$2
10986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
10987$as_echo_n "checking for $ac_word... " >&6; }
10988if ${ac_cv_path_TAR+:} false; then :
10989  $as_echo_n "(cached) " >&6
10990else
10991  case $TAR in
10992  [\\/]* | ?:[\\/]*)
10993  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
10994  ;;
10995  *)
10996  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
10997for as_dir in $PATH
10998do
10999  IFS=$as_save_IFS
11000  test -z "$as_dir" && as_dir=.
11001    for ac_exec_ext in '' $ac_executable_extensions; do
11002  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11003    ac_cv_path_TAR="$as_dir/$ac_word$ac_exec_ext"
11004    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11005    break 2
11006  fi
11007done
11008  done
11009IFS=$as_save_IFS
11010
11011  ;;
11012esac
11013fi
11014TAR=$ac_cv_path_TAR
11015if test -n "$TAR"; then
11016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TAR" >&5
11017$as_echo "$TAR" >&6; }
11018else
11019  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11020$as_echo "no" >&6; }
11021fi
11022
11023
11024          if test "x$TAR" = x; then
11025            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11026          fi
11027        else
11028          # Otherwise we believe it is a complete path. Use it as it is.
11029          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TAR=$tool_specified" >&5
11030$as_echo "$as_me: Will use user supplied tool TAR=$tool_specified" >&6;}
11031          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TAR" >&5
11032$as_echo_n "checking for TAR... " >&6; }
11033          if test ! -x "$tool_specified"; then
11034            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11035$as_echo "not found" >&6; }
11036            as_fn_error $? "User supplied tool TAR=$tool_specified does not exist or is not executable" "$LINENO" 5
11037          fi
11038          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11039$as_echo "$tool_specified" >&6; }
11040        fi
11041      fi
11042    fi
11043
11044  fi
11045
11046
11047
11048  if test "x$TAR" = x; then
11049    as_fn_error $? "Could not find required tool for TAR" "$LINENO" 5
11050  fi
11051
11052
11053
11054
11055
11056  # Publish this variable in the help.
11057
11058
11059  if [ -z "${TEE+x}" ]; then
11060    # The variable is not set by user, try to locate tool using the code snippet
11061    for ac_prog in tee
11062do
11063  # Extract the first word of "$ac_prog", so it can be a program name with args.
11064set dummy $ac_prog; ac_word=$2
11065{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11066$as_echo_n "checking for $ac_word... " >&6; }
11067if ${ac_cv_path_TEE+:} false; then :
11068  $as_echo_n "(cached) " >&6
11069else
11070  case $TEE in
11071  [\\/]* | ?:[\\/]*)
11072  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11073  ;;
11074  *)
11075  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11076for as_dir in $PATH
11077do
11078  IFS=$as_save_IFS
11079  test -z "$as_dir" && as_dir=.
11080    for ac_exec_ext in '' $ac_executable_extensions; do
11081  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11082    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11083    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11084    break 2
11085  fi
11086done
11087  done
11088IFS=$as_save_IFS
11089
11090  ;;
11091esac
11092fi
11093TEE=$ac_cv_path_TEE
11094if test -n "$TEE"; then
11095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11096$as_echo "$TEE" >&6; }
11097else
11098  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11099$as_echo "no" >&6; }
11100fi
11101
11102
11103  test -n "$TEE" && break
11104done
11105
11106  else
11107    # The variable is set, but is it from the command line or the environment?
11108
11109    # Try to remove the string !TEE! from our list.
11110    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TEE!/}
11111    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11112      # If it failed, the variable was not from the command line. Ignore it,
11113      # but warn the user (except for BASH, which is always set by the calling BASH).
11114      if test "xTEE" != xBASH; then
11115        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&5
11116$as_echo "$as_me: WARNING: Ignoring value of TEE from the environment. Use command line variables instead." >&2;}
11117      fi
11118      # Try to locate tool using the code snippet
11119      for ac_prog in tee
11120do
11121  # Extract the first word of "$ac_prog", so it can be a program name with args.
11122set dummy $ac_prog; ac_word=$2
11123{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11124$as_echo_n "checking for $ac_word... " >&6; }
11125if ${ac_cv_path_TEE+:} false; then :
11126  $as_echo_n "(cached) " >&6
11127else
11128  case $TEE in
11129  [\\/]* | ?:[\\/]*)
11130  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11131  ;;
11132  *)
11133  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11134for as_dir in $PATH
11135do
11136  IFS=$as_save_IFS
11137  test -z "$as_dir" && as_dir=.
11138    for ac_exec_ext in '' $ac_executable_extensions; do
11139  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11140    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11141    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11142    break 2
11143  fi
11144done
11145  done
11146IFS=$as_save_IFS
11147
11148  ;;
11149esac
11150fi
11151TEE=$ac_cv_path_TEE
11152if test -n "$TEE"; then
11153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11154$as_echo "$TEE" >&6; }
11155else
11156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11157$as_echo "no" >&6; }
11158fi
11159
11160
11161  test -n "$TEE" && break
11162done
11163
11164    else
11165      # If it succeeded, then it was overridden by the user. We will use it
11166      # for the tool.
11167
11168      # First remove it from the list of overridden variables, so we can test
11169      # for unknown variables in the end.
11170      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11171
11172      # Check if we try to supply an empty value
11173      if test "x$TEE" = x; then
11174        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TEE= (no value)" >&5
11175$as_echo "$as_me: Setting user supplied tool TEE= (no value)" >&6;}
11176        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11177$as_echo_n "checking for TEE... " >&6; }
11178        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11179$as_echo "disabled" >&6; }
11180      else
11181        # Check if the provided tool contains a complete path.
11182        tool_specified="$TEE"
11183        tool_basename="${tool_specified##*/}"
11184        if test "x$tool_basename" = "x$tool_specified"; then
11185          # A command without a complete path is provided, search $PATH.
11186          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TEE=$tool_basename" >&5
11187$as_echo "$as_me: Will search for user supplied tool TEE=$tool_basename" >&6;}
11188          # Extract the first word of "$tool_basename", so it can be a program name with args.
11189set dummy $tool_basename; ac_word=$2
11190{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11191$as_echo_n "checking for $ac_word... " >&6; }
11192if ${ac_cv_path_TEE+:} false; then :
11193  $as_echo_n "(cached) " >&6
11194else
11195  case $TEE in
11196  [\\/]* | ?:[\\/]*)
11197  ac_cv_path_TEE="$TEE" # Let the user override the test with a path.
11198  ;;
11199  *)
11200  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11201for as_dir in $PATH
11202do
11203  IFS=$as_save_IFS
11204  test -z "$as_dir" && as_dir=.
11205    for ac_exec_ext in '' $ac_executable_extensions; do
11206  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11207    ac_cv_path_TEE="$as_dir/$ac_word$ac_exec_ext"
11208    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11209    break 2
11210  fi
11211done
11212  done
11213IFS=$as_save_IFS
11214
11215  ;;
11216esac
11217fi
11218TEE=$ac_cv_path_TEE
11219if test -n "$TEE"; then
11220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TEE" >&5
11221$as_echo "$TEE" >&6; }
11222else
11223  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11224$as_echo "no" >&6; }
11225fi
11226
11227
11228          if test "x$TEE" = x; then
11229            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11230          fi
11231        else
11232          # Otherwise we believe it is a complete path. Use it as it is.
11233          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TEE=$tool_specified" >&5
11234$as_echo "$as_me: Will use user supplied tool TEE=$tool_specified" >&6;}
11235          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TEE" >&5
11236$as_echo_n "checking for TEE... " >&6; }
11237          if test ! -x "$tool_specified"; then
11238            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11239$as_echo "not found" >&6; }
11240            as_fn_error $? "User supplied tool TEE=$tool_specified does not exist or is not executable" "$LINENO" 5
11241          fi
11242          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11243$as_echo "$tool_specified" >&6; }
11244        fi
11245      fi
11246    fi
11247
11248  fi
11249
11250
11251
11252  if test "x$TEE" = x; then
11253    as_fn_error $? "Could not find required tool for TEE" "$LINENO" 5
11254  fi
11255
11256
11257
11258
11259
11260  # Publish this variable in the help.
11261
11262
11263  if [ -z "${TOUCH+x}" ]; then
11264    # The variable is not set by user, try to locate tool using the code snippet
11265    for ac_prog in touch
11266do
11267  # Extract the first word of "$ac_prog", so it can be a program name with args.
11268set dummy $ac_prog; ac_word=$2
11269{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11270$as_echo_n "checking for $ac_word... " >&6; }
11271if ${ac_cv_path_TOUCH+:} false; then :
11272  $as_echo_n "(cached) " >&6
11273else
11274  case $TOUCH in
11275  [\\/]* | ?:[\\/]*)
11276  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11277  ;;
11278  *)
11279  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11280for as_dir in $PATH
11281do
11282  IFS=$as_save_IFS
11283  test -z "$as_dir" && as_dir=.
11284    for ac_exec_ext in '' $ac_executable_extensions; do
11285  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11286    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11287    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11288    break 2
11289  fi
11290done
11291  done
11292IFS=$as_save_IFS
11293
11294  ;;
11295esac
11296fi
11297TOUCH=$ac_cv_path_TOUCH
11298if test -n "$TOUCH"; then
11299  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11300$as_echo "$TOUCH" >&6; }
11301else
11302  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11303$as_echo "no" >&6; }
11304fi
11305
11306
11307  test -n "$TOUCH" && break
11308done
11309
11310  else
11311    # The variable is set, but is it from the command line or the environment?
11312
11313    # Try to remove the string !TOUCH! from our list.
11314    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TOUCH!/}
11315    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11316      # If it failed, the variable was not from the command line. Ignore it,
11317      # but warn the user (except for BASH, which is always set by the calling BASH).
11318      if test "xTOUCH" != xBASH; then
11319        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&5
11320$as_echo "$as_me: WARNING: Ignoring value of TOUCH from the environment. Use command line variables instead." >&2;}
11321      fi
11322      # Try to locate tool using the code snippet
11323      for ac_prog in touch
11324do
11325  # Extract the first word of "$ac_prog", so it can be a program name with args.
11326set dummy $ac_prog; ac_word=$2
11327{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11328$as_echo_n "checking for $ac_word... " >&6; }
11329if ${ac_cv_path_TOUCH+:} false; then :
11330  $as_echo_n "(cached) " >&6
11331else
11332  case $TOUCH in
11333  [\\/]* | ?:[\\/]*)
11334  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11335  ;;
11336  *)
11337  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11338for as_dir in $PATH
11339do
11340  IFS=$as_save_IFS
11341  test -z "$as_dir" && as_dir=.
11342    for ac_exec_ext in '' $ac_executable_extensions; do
11343  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11344    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11345    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11346    break 2
11347  fi
11348done
11349  done
11350IFS=$as_save_IFS
11351
11352  ;;
11353esac
11354fi
11355TOUCH=$ac_cv_path_TOUCH
11356if test -n "$TOUCH"; then
11357  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11358$as_echo "$TOUCH" >&6; }
11359else
11360  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11361$as_echo "no" >&6; }
11362fi
11363
11364
11365  test -n "$TOUCH" && break
11366done
11367
11368    else
11369      # If it succeeded, then it was overridden by the user. We will use it
11370      # for the tool.
11371
11372      # First remove it from the list of overridden variables, so we can test
11373      # for unknown variables in the end.
11374      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11375
11376      # Check if we try to supply an empty value
11377      if test "x$TOUCH" = x; then
11378        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TOUCH= (no value)" >&5
11379$as_echo "$as_me: Setting user supplied tool TOUCH= (no value)" >&6;}
11380        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11381$as_echo_n "checking for TOUCH... " >&6; }
11382        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11383$as_echo "disabled" >&6; }
11384      else
11385        # Check if the provided tool contains a complete path.
11386        tool_specified="$TOUCH"
11387        tool_basename="${tool_specified##*/}"
11388        if test "x$tool_basename" = "x$tool_specified"; then
11389          # A command without a complete path is provided, search $PATH.
11390          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TOUCH=$tool_basename" >&5
11391$as_echo "$as_me: Will search for user supplied tool TOUCH=$tool_basename" >&6;}
11392          # Extract the first word of "$tool_basename", so it can be a program name with args.
11393set dummy $tool_basename; ac_word=$2
11394{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11395$as_echo_n "checking for $ac_word... " >&6; }
11396if ${ac_cv_path_TOUCH+:} false; then :
11397  $as_echo_n "(cached) " >&6
11398else
11399  case $TOUCH in
11400  [\\/]* | ?:[\\/]*)
11401  ac_cv_path_TOUCH="$TOUCH" # Let the user override the test with a path.
11402  ;;
11403  *)
11404  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11405for as_dir in $PATH
11406do
11407  IFS=$as_save_IFS
11408  test -z "$as_dir" && as_dir=.
11409    for ac_exec_ext in '' $ac_executable_extensions; do
11410  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11411    ac_cv_path_TOUCH="$as_dir/$ac_word$ac_exec_ext"
11412    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11413    break 2
11414  fi
11415done
11416  done
11417IFS=$as_save_IFS
11418
11419  ;;
11420esac
11421fi
11422TOUCH=$ac_cv_path_TOUCH
11423if test -n "$TOUCH"; then
11424  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOUCH" >&5
11425$as_echo "$TOUCH" >&6; }
11426else
11427  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11428$as_echo "no" >&6; }
11429fi
11430
11431
11432          if test "x$TOUCH" = x; then
11433            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11434          fi
11435        else
11436          # Otherwise we believe it is a complete path. Use it as it is.
11437          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TOUCH=$tool_specified" >&5
11438$as_echo "$as_me: Will use user supplied tool TOUCH=$tool_specified" >&6;}
11439          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TOUCH" >&5
11440$as_echo_n "checking for TOUCH... " >&6; }
11441          if test ! -x "$tool_specified"; then
11442            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11443$as_echo "not found" >&6; }
11444            as_fn_error $? "User supplied tool TOUCH=$tool_specified does not exist or is not executable" "$LINENO" 5
11445          fi
11446          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11447$as_echo "$tool_specified" >&6; }
11448        fi
11449      fi
11450    fi
11451
11452  fi
11453
11454
11455
11456  if test "x$TOUCH" = x; then
11457    as_fn_error $? "Could not find required tool for TOUCH" "$LINENO" 5
11458  fi
11459
11460
11461
11462
11463
11464  # Publish this variable in the help.
11465
11466
11467  if [ -z "${TR+x}" ]; then
11468    # The variable is not set by user, try to locate tool using the code snippet
11469    for ac_prog in tr
11470do
11471  # Extract the first word of "$ac_prog", so it can be a program name with args.
11472set dummy $ac_prog; ac_word=$2
11473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11474$as_echo_n "checking for $ac_word... " >&6; }
11475if ${ac_cv_path_TR+:} false; then :
11476  $as_echo_n "(cached) " >&6
11477else
11478  case $TR in
11479  [\\/]* | ?:[\\/]*)
11480  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11481  ;;
11482  *)
11483  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11484for as_dir in $PATH
11485do
11486  IFS=$as_save_IFS
11487  test -z "$as_dir" && as_dir=.
11488    for ac_exec_ext in '' $ac_executable_extensions; do
11489  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11490    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11491    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11492    break 2
11493  fi
11494done
11495  done
11496IFS=$as_save_IFS
11497
11498  ;;
11499esac
11500fi
11501TR=$ac_cv_path_TR
11502if test -n "$TR"; then
11503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11504$as_echo "$TR" >&6; }
11505else
11506  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11507$as_echo "no" >&6; }
11508fi
11509
11510
11511  test -n "$TR" && break
11512done
11513
11514  else
11515    # The variable is set, but is it from the command line or the environment?
11516
11517    # Try to remove the string !TR! from our list.
11518    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TR!/}
11519    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11520      # If it failed, the variable was not from the command line. Ignore it,
11521      # but warn the user (except for BASH, which is always set by the calling BASH).
11522      if test "xTR" != xBASH; then
11523        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&5
11524$as_echo "$as_me: WARNING: Ignoring value of TR from the environment. Use command line variables instead." >&2;}
11525      fi
11526      # Try to locate tool using the code snippet
11527      for ac_prog in tr
11528do
11529  # Extract the first word of "$ac_prog", so it can be a program name with args.
11530set dummy $ac_prog; ac_word=$2
11531{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11532$as_echo_n "checking for $ac_word... " >&6; }
11533if ${ac_cv_path_TR+:} false; then :
11534  $as_echo_n "(cached) " >&6
11535else
11536  case $TR in
11537  [\\/]* | ?:[\\/]*)
11538  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11539  ;;
11540  *)
11541  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11542for as_dir in $PATH
11543do
11544  IFS=$as_save_IFS
11545  test -z "$as_dir" && as_dir=.
11546    for ac_exec_ext in '' $ac_executable_extensions; do
11547  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11548    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11549    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11550    break 2
11551  fi
11552done
11553  done
11554IFS=$as_save_IFS
11555
11556  ;;
11557esac
11558fi
11559TR=$ac_cv_path_TR
11560if test -n "$TR"; then
11561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11562$as_echo "$TR" >&6; }
11563else
11564  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11565$as_echo "no" >&6; }
11566fi
11567
11568
11569  test -n "$TR" && break
11570done
11571
11572    else
11573      # If it succeeded, then it was overridden by the user. We will use it
11574      # for the tool.
11575
11576      # First remove it from the list of overridden variables, so we can test
11577      # for unknown variables in the end.
11578      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11579
11580      # Check if we try to supply an empty value
11581      if test "x$TR" = x; then
11582        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TR= (no value)" >&5
11583$as_echo "$as_me: Setting user supplied tool TR= (no value)" >&6;}
11584        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11585$as_echo_n "checking for TR... " >&6; }
11586        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11587$as_echo "disabled" >&6; }
11588      else
11589        # Check if the provided tool contains a complete path.
11590        tool_specified="$TR"
11591        tool_basename="${tool_specified##*/}"
11592        if test "x$tool_basename" = "x$tool_specified"; then
11593          # A command without a complete path is provided, search $PATH.
11594          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TR=$tool_basename" >&5
11595$as_echo "$as_me: Will search for user supplied tool TR=$tool_basename" >&6;}
11596          # Extract the first word of "$tool_basename", so it can be a program name with args.
11597set dummy $tool_basename; ac_word=$2
11598{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11599$as_echo_n "checking for $ac_word... " >&6; }
11600if ${ac_cv_path_TR+:} false; then :
11601  $as_echo_n "(cached) " >&6
11602else
11603  case $TR in
11604  [\\/]* | ?:[\\/]*)
11605  ac_cv_path_TR="$TR" # Let the user override the test with a path.
11606  ;;
11607  *)
11608  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11609for as_dir in $PATH
11610do
11611  IFS=$as_save_IFS
11612  test -z "$as_dir" && as_dir=.
11613    for ac_exec_ext in '' $ac_executable_extensions; do
11614  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11615    ac_cv_path_TR="$as_dir/$ac_word$ac_exec_ext"
11616    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11617    break 2
11618  fi
11619done
11620  done
11621IFS=$as_save_IFS
11622
11623  ;;
11624esac
11625fi
11626TR=$ac_cv_path_TR
11627if test -n "$TR"; then
11628  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TR" >&5
11629$as_echo "$TR" >&6; }
11630else
11631  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11632$as_echo "no" >&6; }
11633fi
11634
11635
11636          if test "x$TR" = x; then
11637            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11638          fi
11639        else
11640          # Otherwise we believe it is a complete path. Use it as it is.
11641          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TR=$tool_specified" >&5
11642$as_echo "$as_me: Will use user supplied tool TR=$tool_specified" >&6;}
11643          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TR" >&5
11644$as_echo_n "checking for TR... " >&6; }
11645          if test ! -x "$tool_specified"; then
11646            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11647$as_echo "not found" >&6; }
11648            as_fn_error $? "User supplied tool TR=$tool_specified does not exist or is not executable" "$LINENO" 5
11649          fi
11650          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11651$as_echo "$tool_specified" >&6; }
11652        fi
11653      fi
11654    fi
11655
11656  fi
11657
11658
11659
11660  if test "x$TR" = x; then
11661    as_fn_error $? "Could not find required tool for TR" "$LINENO" 5
11662  fi
11663
11664
11665
11666
11667
11668  # Publish this variable in the help.
11669
11670
11671  if [ -z "${UNAME+x}" ]; then
11672    # The variable is not set by user, try to locate tool using the code snippet
11673    for ac_prog in uname
11674do
11675  # Extract the first word of "$ac_prog", so it can be a program name with args.
11676set dummy $ac_prog; ac_word=$2
11677{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11678$as_echo_n "checking for $ac_word... " >&6; }
11679if ${ac_cv_path_UNAME+:} false; then :
11680  $as_echo_n "(cached) " >&6
11681else
11682  case $UNAME in
11683  [\\/]* | ?:[\\/]*)
11684  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11685  ;;
11686  *)
11687  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11688for as_dir in $PATH
11689do
11690  IFS=$as_save_IFS
11691  test -z "$as_dir" && as_dir=.
11692    for ac_exec_ext in '' $ac_executable_extensions; do
11693  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11694    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11695    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11696    break 2
11697  fi
11698done
11699  done
11700IFS=$as_save_IFS
11701
11702  ;;
11703esac
11704fi
11705UNAME=$ac_cv_path_UNAME
11706if test -n "$UNAME"; then
11707  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11708$as_echo "$UNAME" >&6; }
11709else
11710  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11711$as_echo "no" >&6; }
11712fi
11713
11714
11715  test -n "$UNAME" && break
11716done
11717
11718  else
11719    # The variable is set, but is it from the command line or the environment?
11720
11721    # Try to remove the string !UNAME! from our list.
11722    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNAME!/}
11723    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11724      # If it failed, the variable was not from the command line. Ignore it,
11725      # but warn the user (except for BASH, which is always set by the calling BASH).
11726      if test "xUNAME" != xBASH; then
11727        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&5
11728$as_echo "$as_me: WARNING: Ignoring value of UNAME from the environment. Use command line variables instead." >&2;}
11729      fi
11730      # Try to locate tool using the code snippet
11731      for ac_prog in uname
11732do
11733  # Extract the first word of "$ac_prog", so it can be a program name with args.
11734set dummy $ac_prog; ac_word=$2
11735{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11736$as_echo_n "checking for $ac_word... " >&6; }
11737if ${ac_cv_path_UNAME+:} false; then :
11738  $as_echo_n "(cached) " >&6
11739else
11740  case $UNAME in
11741  [\\/]* | ?:[\\/]*)
11742  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11743  ;;
11744  *)
11745  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11746for as_dir in $PATH
11747do
11748  IFS=$as_save_IFS
11749  test -z "$as_dir" && as_dir=.
11750    for ac_exec_ext in '' $ac_executable_extensions; do
11751  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11752    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11753    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11754    break 2
11755  fi
11756done
11757  done
11758IFS=$as_save_IFS
11759
11760  ;;
11761esac
11762fi
11763UNAME=$ac_cv_path_UNAME
11764if test -n "$UNAME"; then
11765  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11766$as_echo "$UNAME" >&6; }
11767else
11768  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11769$as_echo "no" >&6; }
11770fi
11771
11772
11773  test -n "$UNAME" && break
11774done
11775
11776    else
11777      # If it succeeded, then it was overridden by the user. We will use it
11778      # for the tool.
11779
11780      # First remove it from the list of overridden variables, so we can test
11781      # for unknown variables in the end.
11782      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11783
11784      # Check if we try to supply an empty value
11785      if test "x$UNAME" = x; then
11786        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNAME= (no value)" >&5
11787$as_echo "$as_me: Setting user supplied tool UNAME= (no value)" >&6;}
11788        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11789$as_echo_n "checking for UNAME... " >&6; }
11790        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11791$as_echo "disabled" >&6; }
11792      else
11793        # Check if the provided tool contains a complete path.
11794        tool_specified="$UNAME"
11795        tool_basename="${tool_specified##*/}"
11796        if test "x$tool_basename" = "x$tool_specified"; then
11797          # A command without a complete path is provided, search $PATH.
11798          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNAME=$tool_basename" >&5
11799$as_echo "$as_me: Will search for user supplied tool UNAME=$tool_basename" >&6;}
11800          # Extract the first word of "$tool_basename", so it can be a program name with args.
11801set dummy $tool_basename; ac_word=$2
11802{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11803$as_echo_n "checking for $ac_word... " >&6; }
11804if ${ac_cv_path_UNAME+:} false; then :
11805  $as_echo_n "(cached) " >&6
11806else
11807  case $UNAME in
11808  [\\/]* | ?:[\\/]*)
11809  ac_cv_path_UNAME="$UNAME" # Let the user override the test with a path.
11810  ;;
11811  *)
11812  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11813for as_dir in $PATH
11814do
11815  IFS=$as_save_IFS
11816  test -z "$as_dir" && as_dir=.
11817    for ac_exec_ext in '' $ac_executable_extensions; do
11818  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11819    ac_cv_path_UNAME="$as_dir/$ac_word$ac_exec_ext"
11820    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11821    break 2
11822  fi
11823done
11824  done
11825IFS=$as_save_IFS
11826
11827  ;;
11828esac
11829fi
11830UNAME=$ac_cv_path_UNAME
11831if test -n "$UNAME"; then
11832  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNAME" >&5
11833$as_echo "$UNAME" >&6; }
11834else
11835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11836$as_echo "no" >&6; }
11837fi
11838
11839
11840          if test "x$UNAME" = x; then
11841            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
11842          fi
11843        else
11844          # Otherwise we believe it is a complete path. Use it as it is.
11845          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNAME=$tool_specified" >&5
11846$as_echo "$as_me: Will use user supplied tool UNAME=$tool_specified" >&6;}
11847          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNAME" >&5
11848$as_echo_n "checking for UNAME... " >&6; }
11849          if test ! -x "$tool_specified"; then
11850            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
11851$as_echo "not found" >&6; }
11852            as_fn_error $? "User supplied tool UNAME=$tool_specified does not exist or is not executable" "$LINENO" 5
11853          fi
11854          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
11855$as_echo "$tool_specified" >&6; }
11856        fi
11857      fi
11858    fi
11859
11860  fi
11861
11862
11863
11864  if test "x$UNAME" = x; then
11865    as_fn_error $? "Could not find required tool for UNAME" "$LINENO" 5
11866  fi
11867
11868
11869
11870
11871
11872  # Publish this variable in the help.
11873
11874
11875  if [ -z "${UNIQ+x}" ]; then
11876    # The variable is not set by user, try to locate tool using the code snippet
11877    for ac_prog in uniq
11878do
11879  # Extract the first word of "$ac_prog", so it can be a program name with args.
11880set dummy $ac_prog; ac_word=$2
11881{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11882$as_echo_n "checking for $ac_word... " >&6; }
11883if ${ac_cv_path_UNIQ+:} false; then :
11884  $as_echo_n "(cached) " >&6
11885else
11886  case $UNIQ in
11887  [\\/]* | ?:[\\/]*)
11888  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11889  ;;
11890  *)
11891  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11892for as_dir in $PATH
11893do
11894  IFS=$as_save_IFS
11895  test -z "$as_dir" && as_dir=.
11896    for ac_exec_ext in '' $ac_executable_extensions; do
11897  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11898    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11899    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11900    break 2
11901  fi
11902done
11903  done
11904IFS=$as_save_IFS
11905
11906  ;;
11907esac
11908fi
11909UNIQ=$ac_cv_path_UNIQ
11910if test -n "$UNIQ"; then
11911  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11912$as_echo "$UNIQ" >&6; }
11913else
11914  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11915$as_echo "no" >&6; }
11916fi
11917
11918
11919  test -n "$UNIQ" && break
11920done
11921
11922  else
11923    # The variable is set, but is it from the command line or the environment?
11924
11925    # Try to remove the string !UNIQ! from our list.
11926    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNIQ!/}
11927    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
11928      # If it failed, the variable was not from the command line. Ignore it,
11929      # but warn the user (except for BASH, which is always set by the calling BASH).
11930      if test "xUNIQ" != xBASH; then
11931        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&5
11932$as_echo "$as_me: WARNING: Ignoring value of UNIQ from the environment. Use command line variables instead." >&2;}
11933      fi
11934      # Try to locate tool using the code snippet
11935      for ac_prog in uniq
11936do
11937  # Extract the first word of "$ac_prog", so it can be a program name with args.
11938set dummy $ac_prog; ac_word=$2
11939{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
11940$as_echo_n "checking for $ac_word... " >&6; }
11941if ${ac_cv_path_UNIQ+:} false; then :
11942  $as_echo_n "(cached) " >&6
11943else
11944  case $UNIQ in
11945  [\\/]* | ?:[\\/]*)
11946  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
11947  ;;
11948  *)
11949  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
11950for as_dir in $PATH
11951do
11952  IFS=$as_save_IFS
11953  test -z "$as_dir" && as_dir=.
11954    for ac_exec_ext in '' $ac_executable_extensions; do
11955  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
11956    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
11957    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
11958    break 2
11959  fi
11960done
11961  done
11962IFS=$as_save_IFS
11963
11964  ;;
11965esac
11966fi
11967UNIQ=$ac_cv_path_UNIQ
11968if test -n "$UNIQ"; then
11969  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
11970$as_echo "$UNIQ" >&6; }
11971else
11972  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
11973$as_echo "no" >&6; }
11974fi
11975
11976
11977  test -n "$UNIQ" && break
11978done
11979
11980    else
11981      # If it succeeded, then it was overridden by the user. We will use it
11982      # for the tool.
11983
11984      # First remove it from the list of overridden variables, so we can test
11985      # for unknown variables in the end.
11986      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
11987
11988      # Check if we try to supply an empty value
11989      if test "x$UNIQ" = x; then
11990        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNIQ= (no value)" >&5
11991$as_echo "$as_me: Setting user supplied tool UNIQ= (no value)" >&6;}
11992        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
11993$as_echo_n "checking for UNIQ... " >&6; }
11994        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
11995$as_echo "disabled" >&6; }
11996      else
11997        # Check if the provided tool contains a complete path.
11998        tool_specified="$UNIQ"
11999        tool_basename="${tool_specified##*/}"
12000        if test "x$tool_basename" = "x$tool_specified"; then
12001          # A command without a complete path is provided, search $PATH.
12002          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNIQ=$tool_basename" >&5
12003$as_echo "$as_me: Will search for user supplied tool UNIQ=$tool_basename" >&6;}
12004          # Extract the first word of "$tool_basename", so it can be a program name with args.
12005set dummy $tool_basename; ac_word=$2
12006{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12007$as_echo_n "checking for $ac_word... " >&6; }
12008if ${ac_cv_path_UNIQ+:} false; then :
12009  $as_echo_n "(cached) " >&6
12010else
12011  case $UNIQ in
12012  [\\/]* | ?:[\\/]*)
12013  ac_cv_path_UNIQ="$UNIQ" # Let the user override the test with a path.
12014  ;;
12015  *)
12016  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12017for as_dir in $PATH
12018do
12019  IFS=$as_save_IFS
12020  test -z "$as_dir" && as_dir=.
12021    for ac_exec_ext in '' $ac_executable_extensions; do
12022  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12023    ac_cv_path_UNIQ="$as_dir/$ac_word$ac_exec_ext"
12024    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12025    break 2
12026  fi
12027done
12028  done
12029IFS=$as_save_IFS
12030
12031  ;;
12032esac
12033fi
12034UNIQ=$ac_cv_path_UNIQ
12035if test -n "$UNIQ"; then
12036  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNIQ" >&5
12037$as_echo "$UNIQ" >&6; }
12038else
12039  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12040$as_echo "no" >&6; }
12041fi
12042
12043
12044          if test "x$UNIQ" = x; then
12045            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12046          fi
12047        else
12048          # Otherwise we believe it is a complete path. Use it as it is.
12049          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNIQ=$tool_specified" >&5
12050$as_echo "$as_me: Will use user supplied tool UNIQ=$tool_specified" >&6;}
12051          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNIQ" >&5
12052$as_echo_n "checking for UNIQ... " >&6; }
12053          if test ! -x "$tool_specified"; then
12054            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12055$as_echo "not found" >&6; }
12056            as_fn_error $? "User supplied tool UNIQ=$tool_specified does not exist or is not executable" "$LINENO" 5
12057          fi
12058          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12059$as_echo "$tool_specified" >&6; }
12060        fi
12061      fi
12062    fi
12063
12064  fi
12065
12066
12067
12068  if test "x$UNIQ" = x; then
12069    as_fn_error $? "Could not find required tool for UNIQ" "$LINENO" 5
12070  fi
12071
12072
12073
12074
12075
12076  # Publish this variable in the help.
12077
12078
12079  if [ -z "${WC+x}" ]; then
12080    # The variable is not set by user, try to locate tool using the code snippet
12081    for ac_prog in wc
12082do
12083  # Extract the first word of "$ac_prog", so it can be a program name with args.
12084set dummy $ac_prog; ac_word=$2
12085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12086$as_echo_n "checking for $ac_word... " >&6; }
12087if ${ac_cv_path_WC+:} false; then :
12088  $as_echo_n "(cached) " >&6
12089else
12090  case $WC in
12091  [\\/]* | ?:[\\/]*)
12092  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12093  ;;
12094  *)
12095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12096for as_dir in $PATH
12097do
12098  IFS=$as_save_IFS
12099  test -z "$as_dir" && as_dir=.
12100    for ac_exec_ext in '' $ac_executable_extensions; do
12101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12102    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12104    break 2
12105  fi
12106done
12107  done
12108IFS=$as_save_IFS
12109
12110  ;;
12111esac
12112fi
12113WC=$ac_cv_path_WC
12114if test -n "$WC"; then
12115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12116$as_echo "$WC" >&6; }
12117else
12118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12119$as_echo "no" >&6; }
12120fi
12121
12122
12123  test -n "$WC" && break
12124done
12125
12126  else
12127    # The variable is set, but is it from the command line or the environment?
12128
12129    # Try to remove the string !WC! from our list.
12130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WC!/}
12131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12132      # If it failed, the variable was not from the command line. Ignore it,
12133      # but warn the user (except for BASH, which is always set by the calling BASH).
12134      if test "xWC" != xBASH; then
12135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&5
12136$as_echo "$as_me: WARNING: Ignoring value of WC from the environment. Use command line variables instead." >&2;}
12137      fi
12138      # Try to locate tool using the code snippet
12139      for ac_prog in wc
12140do
12141  # Extract the first word of "$ac_prog", so it can be a program name with args.
12142set dummy $ac_prog; ac_word=$2
12143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12144$as_echo_n "checking for $ac_word... " >&6; }
12145if ${ac_cv_path_WC+:} false; then :
12146  $as_echo_n "(cached) " >&6
12147else
12148  case $WC in
12149  [\\/]* | ?:[\\/]*)
12150  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12151  ;;
12152  *)
12153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12154for as_dir in $PATH
12155do
12156  IFS=$as_save_IFS
12157  test -z "$as_dir" && as_dir=.
12158    for ac_exec_ext in '' $ac_executable_extensions; do
12159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12160    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12162    break 2
12163  fi
12164done
12165  done
12166IFS=$as_save_IFS
12167
12168  ;;
12169esac
12170fi
12171WC=$ac_cv_path_WC
12172if test -n "$WC"; then
12173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12174$as_echo "$WC" >&6; }
12175else
12176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12177$as_echo "no" >&6; }
12178fi
12179
12180
12181  test -n "$WC" && break
12182done
12183
12184    else
12185      # If it succeeded, then it was overridden by the user. We will use it
12186      # for the tool.
12187
12188      # First remove it from the list of overridden variables, so we can test
12189      # for unknown variables in the end.
12190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12191
12192      # Check if we try to supply an empty value
12193      if test "x$WC" = x; then
12194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WC= (no value)" >&5
12195$as_echo "$as_me: Setting user supplied tool WC= (no value)" >&6;}
12196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12197$as_echo_n "checking for WC... " >&6; }
12198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12199$as_echo "disabled" >&6; }
12200      else
12201        # Check if the provided tool contains a complete path.
12202        tool_specified="$WC"
12203        tool_basename="${tool_specified##*/}"
12204        if test "x$tool_basename" = "x$tool_specified"; then
12205          # A command without a complete path is provided, search $PATH.
12206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WC=$tool_basename" >&5
12207$as_echo "$as_me: Will search for user supplied tool WC=$tool_basename" >&6;}
12208          # Extract the first word of "$tool_basename", so it can be a program name with args.
12209set dummy $tool_basename; ac_word=$2
12210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12211$as_echo_n "checking for $ac_word... " >&6; }
12212if ${ac_cv_path_WC+:} false; then :
12213  $as_echo_n "(cached) " >&6
12214else
12215  case $WC in
12216  [\\/]* | ?:[\\/]*)
12217  ac_cv_path_WC="$WC" # Let the user override the test with a path.
12218  ;;
12219  *)
12220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12221for as_dir in $PATH
12222do
12223  IFS=$as_save_IFS
12224  test -z "$as_dir" && as_dir=.
12225    for ac_exec_ext in '' $ac_executable_extensions; do
12226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12227    ac_cv_path_WC="$as_dir/$ac_word$ac_exec_ext"
12228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12229    break 2
12230  fi
12231done
12232  done
12233IFS=$as_save_IFS
12234
12235  ;;
12236esac
12237fi
12238WC=$ac_cv_path_WC
12239if test -n "$WC"; then
12240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WC" >&5
12241$as_echo "$WC" >&6; }
12242else
12243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12244$as_echo "no" >&6; }
12245fi
12246
12247
12248          if test "x$WC" = x; then
12249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12250          fi
12251        else
12252          # Otherwise we believe it is a complete path. Use it as it is.
12253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WC=$tool_specified" >&5
12254$as_echo "$as_me: Will use user supplied tool WC=$tool_specified" >&6;}
12255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WC" >&5
12256$as_echo_n "checking for WC... " >&6; }
12257          if test ! -x "$tool_specified"; then
12258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12259$as_echo "not found" >&6; }
12260            as_fn_error $? "User supplied tool WC=$tool_specified does not exist or is not executable" "$LINENO" 5
12261          fi
12262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12263$as_echo "$tool_specified" >&6; }
12264        fi
12265      fi
12266    fi
12267
12268  fi
12269
12270
12271
12272  if test "x$WC" = x; then
12273    as_fn_error $? "Could not find required tool for WC" "$LINENO" 5
12274  fi
12275
12276
12277
12278
12279
12280  # Publish this variable in the help.
12281
12282
12283  if [ -z "${WHICH+x}" ]; then
12284    # The variable is not set by user, try to locate tool using the code snippet
12285    for ac_prog in which
12286do
12287  # Extract the first word of "$ac_prog", so it can be a program name with args.
12288set dummy $ac_prog; ac_word=$2
12289{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12290$as_echo_n "checking for $ac_word... " >&6; }
12291if ${ac_cv_path_WHICH+:} false; then :
12292  $as_echo_n "(cached) " >&6
12293else
12294  case $WHICH in
12295  [\\/]* | ?:[\\/]*)
12296  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12297  ;;
12298  *)
12299  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12300for as_dir in $PATH
12301do
12302  IFS=$as_save_IFS
12303  test -z "$as_dir" && as_dir=.
12304    for ac_exec_ext in '' $ac_executable_extensions; do
12305  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12306    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12307    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12308    break 2
12309  fi
12310done
12311  done
12312IFS=$as_save_IFS
12313
12314  ;;
12315esac
12316fi
12317WHICH=$ac_cv_path_WHICH
12318if test -n "$WHICH"; then
12319  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12320$as_echo "$WHICH" >&6; }
12321else
12322  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12323$as_echo "no" >&6; }
12324fi
12325
12326
12327  test -n "$WHICH" && break
12328done
12329
12330  else
12331    # The variable is set, but is it from the command line or the environment?
12332
12333    # Try to remove the string !WHICH! from our list.
12334    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!WHICH!/}
12335    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12336      # If it failed, the variable was not from the command line. Ignore it,
12337      # but warn the user (except for BASH, which is always set by the calling BASH).
12338      if test "xWHICH" != xBASH; then
12339        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&5
12340$as_echo "$as_me: WARNING: Ignoring value of WHICH from the environment. Use command line variables instead." >&2;}
12341      fi
12342      # Try to locate tool using the code snippet
12343      for ac_prog in which
12344do
12345  # Extract the first word of "$ac_prog", so it can be a program name with args.
12346set dummy $ac_prog; ac_word=$2
12347{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12348$as_echo_n "checking for $ac_word... " >&6; }
12349if ${ac_cv_path_WHICH+:} false; then :
12350  $as_echo_n "(cached) " >&6
12351else
12352  case $WHICH in
12353  [\\/]* | ?:[\\/]*)
12354  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12355  ;;
12356  *)
12357  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12358for as_dir in $PATH
12359do
12360  IFS=$as_save_IFS
12361  test -z "$as_dir" && as_dir=.
12362    for ac_exec_ext in '' $ac_executable_extensions; do
12363  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12364    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12365    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12366    break 2
12367  fi
12368done
12369  done
12370IFS=$as_save_IFS
12371
12372  ;;
12373esac
12374fi
12375WHICH=$ac_cv_path_WHICH
12376if test -n "$WHICH"; then
12377  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12378$as_echo "$WHICH" >&6; }
12379else
12380  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12381$as_echo "no" >&6; }
12382fi
12383
12384
12385  test -n "$WHICH" && break
12386done
12387
12388    else
12389      # If it succeeded, then it was overridden by the user. We will use it
12390      # for the tool.
12391
12392      # First remove it from the list of overridden variables, so we can test
12393      # for unknown variables in the end.
12394      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12395
12396      # Check if we try to supply an empty value
12397      if test "x$WHICH" = x; then
12398        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool WHICH= (no value)" >&5
12399$as_echo "$as_me: Setting user supplied tool WHICH= (no value)" >&6;}
12400        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12401$as_echo_n "checking for WHICH... " >&6; }
12402        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12403$as_echo "disabled" >&6; }
12404      else
12405        # Check if the provided tool contains a complete path.
12406        tool_specified="$WHICH"
12407        tool_basename="${tool_specified##*/}"
12408        if test "x$tool_basename" = "x$tool_specified"; then
12409          # A command without a complete path is provided, search $PATH.
12410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool WHICH=$tool_basename" >&5
12411$as_echo "$as_me: Will search for user supplied tool WHICH=$tool_basename" >&6;}
12412          # Extract the first word of "$tool_basename", so it can be a program name with args.
12413set dummy $tool_basename; ac_word=$2
12414{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12415$as_echo_n "checking for $ac_word... " >&6; }
12416if ${ac_cv_path_WHICH+:} false; then :
12417  $as_echo_n "(cached) " >&6
12418else
12419  case $WHICH in
12420  [\\/]* | ?:[\\/]*)
12421  ac_cv_path_WHICH="$WHICH" # Let the user override the test with a path.
12422  ;;
12423  *)
12424  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12425for as_dir in $PATH
12426do
12427  IFS=$as_save_IFS
12428  test -z "$as_dir" && as_dir=.
12429    for ac_exec_ext in '' $ac_executable_extensions; do
12430  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12431    ac_cv_path_WHICH="$as_dir/$ac_word$ac_exec_ext"
12432    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12433    break 2
12434  fi
12435done
12436  done
12437IFS=$as_save_IFS
12438
12439  ;;
12440esac
12441fi
12442WHICH=$ac_cv_path_WHICH
12443if test -n "$WHICH"; then
12444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $WHICH" >&5
12445$as_echo "$WHICH" >&6; }
12446else
12447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12448$as_echo "no" >&6; }
12449fi
12450
12451
12452          if test "x$WHICH" = x; then
12453            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12454          fi
12455        else
12456          # Otherwise we believe it is a complete path. Use it as it is.
12457          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool WHICH=$tool_specified" >&5
12458$as_echo "$as_me: Will use user supplied tool WHICH=$tool_specified" >&6;}
12459          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for WHICH" >&5
12460$as_echo_n "checking for WHICH... " >&6; }
12461          if test ! -x "$tool_specified"; then
12462            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12463$as_echo "not found" >&6; }
12464            as_fn_error $? "User supplied tool WHICH=$tool_specified does not exist or is not executable" "$LINENO" 5
12465          fi
12466          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12467$as_echo "$tool_specified" >&6; }
12468        fi
12469      fi
12470    fi
12471
12472  fi
12473
12474
12475
12476  if test "x$WHICH" = x; then
12477    as_fn_error $? "Could not find required tool for WHICH" "$LINENO" 5
12478  fi
12479
12480
12481
12482
12483
12484  # Publish this variable in the help.
12485
12486
12487  if [ -z "${XARGS+x}" ]; then
12488    # The variable is not set by user, try to locate tool using the code snippet
12489    for ac_prog in xargs
12490do
12491  # Extract the first word of "$ac_prog", so it can be a program name with args.
12492set dummy $ac_prog; ac_word=$2
12493{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12494$as_echo_n "checking for $ac_word... " >&6; }
12495if ${ac_cv_path_XARGS+:} false; then :
12496  $as_echo_n "(cached) " >&6
12497else
12498  case $XARGS in
12499  [\\/]* | ?:[\\/]*)
12500  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12501  ;;
12502  *)
12503  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12504for as_dir in $PATH
12505do
12506  IFS=$as_save_IFS
12507  test -z "$as_dir" && as_dir=.
12508    for ac_exec_ext in '' $ac_executable_extensions; do
12509  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12510    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12511    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12512    break 2
12513  fi
12514done
12515  done
12516IFS=$as_save_IFS
12517
12518  ;;
12519esac
12520fi
12521XARGS=$ac_cv_path_XARGS
12522if test -n "$XARGS"; then
12523  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12524$as_echo "$XARGS" >&6; }
12525else
12526  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12527$as_echo "no" >&6; }
12528fi
12529
12530
12531  test -n "$XARGS" && break
12532done
12533
12534  else
12535    # The variable is set, but is it from the command line or the environment?
12536
12537    # Try to remove the string !XARGS! from our list.
12538    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XARGS!/}
12539    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12540      # If it failed, the variable was not from the command line. Ignore it,
12541      # but warn the user (except for BASH, which is always set by the calling BASH).
12542      if test "xXARGS" != xBASH; then
12543        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&5
12544$as_echo "$as_me: WARNING: Ignoring value of XARGS from the environment. Use command line variables instead." >&2;}
12545      fi
12546      # Try to locate tool using the code snippet
12547      for ac_prog in xargs
12548do
12549  # Extract the first word of "$ac_prog", so it can be a program name with args.
12550set dummy $ac_prog; ac_word=$2
12551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12552$as_echo_n "checking for $ac_word... " >&6; }
12553if ${ac_cv_path_XARGS+:} false; then :
12554  $as_echo_n "(cached) " >&6
12555else
12556  case $XARGS in
12557  [\\/]* | ?:[\\/]*)
12558  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12559  ;;
12560  *)
12561  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12562for as_dir in $PATH
12563do
12564  IFS=$as_save_IFS
12565  test -z "$as_dir" && as_dir=.
12566    for ac_exec_ext in '' $ac_executable_extensions; do
12567  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12568    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12569    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12570    break 2
12571  fi
12572done
12573  done
12574IFS=$as_save_IFS
12575
12576  ;;
12577esac
12578fi
12579XARGS=$ac_cv_path_XARGS
12580if test -n "$XARGS"; then
12581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12582$as_echo "$XARGS" >&6; }
12583else
12584  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12585$as_echo "no" >&6; }
12586fi
12587
12588
12589  test -n "$XARGS" && break
12590done
12591
12592    else
12593      # If it succeeded, then it was overridden by the user. We will use it
12594      # for the tool.
12595
12596      # First remove it from the list of overridden variables, so we can test
12597      # for unknown variables in the end.
12598      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12599
12600      # Check if we try to supply an empty value
12601      if test "x$XARGS" = x; then
12602        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XARGS= (no value)" >&5
12603$as_echo "$as_me: Setting user supplied tool XARGS= (no value)" >&6;}
12604        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12605$as_echo_n "checking for XARGS... " >&6; }
12606        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12607$as_echo "disabled" >&6; }
12608      else
12609        # Check if the provided tool contains a complete path.
12610        tool_specified="$XARGS"
12611        tool_basename="${tool_specified##*/}"
12612        if test "x$tool_basename" = "x$tool_specified"; then
12613          # A command without a complete path is provided, search $PATH.
12614          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XARGS=$tool_basename" >&5
12615$as_echo "$as_me: Will search for user supplied tool XARGS=$tool_basename" >&6;}
12616          # Extract the first word of "$tool_basename", so it can be a program name with args.
12617set dummy $tool_basename; ac_word=$2
12618{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12619$as_echo_n "checking for $ac_word... " >&6; }
12620if ${ac_cv_path_XARGS+:} false; then :
12621  $as_echo_n "(cached) " >&6
12622else
12623  case $XARGS in
12624  [\\/]* | ?:[\\/]*)
12625  ac_cv_path_XARGS="$XARGS" # Let the user override the test with a path.
12626  ;;
12627  *)
12628  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12629for as_dir in $PATH
12630do
12631  IFS=$as_save_IFS
12632  test -z "$as_dir" && as_dir=.
12633    for ac_exec_ext in '' $ac_executable_extensions; do
12634  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12635    ac_cv_path_XARGS="$as_dir/$ac_word$ac_exec_ext"
12636    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12637    break 2
12638  fi
12639done
12640  done
12641IFS=$as_save_IFS
12642
12643  ;;
12644esac
12645fi
12646XARGS=$ac_cv_path_XARGS
12647if test -n "$XARGS"; then
12648  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XARGS" >&5
12649$as_echo "$XARGS" >&6; }
12650else
12651  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12652$as_echo "no" >&6; }
12653fi
12654
12655
12656          if test "x$XARGS" = x; then
12657            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12658          fi
12659        else
12660          # Otherwise we believe it is a complete path. Use it as it is.
12661          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XARGS=$tool_specified" >&5
12662$as_echo "$as_me: Will use user supplied tool XARGS=$tool_specified" >&6;}
12663          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XARGS" >&5
12664$as_echo_n "checking for XARGS... " >&6; }
12665          if test ! -x "$tool_specified"; then
12666            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12667$as_echo "not found" >&6; }
12668            as_fn_error $? "User supplied tool XARGS=$tool_specified does not exist or is not executable" "$LINENO" 5
12669          fi
12670          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12671$as_echo "$tool_specified" >&6; }
12672        fi
12673      fi
12674    fi
12675
12676  fi
12677
12678
12679
12680  if test "x$XARGS" = x; then
12681    as_fn_error $? "Could not find required tool for XARGS" "$LINENO" 5
12682  fi
12683
12684
12685
12686  # Then required tools that require some special treatment.
12687
12688
12689  # Publish this variable in the help.
12690
12691
12692  if [ -z "${AWK+x}" ]; then
12693    # The variable is not set by user, try to locate tool using the code snippet
12694    for ac_prog in gawk mawk nawk awk
12695do
12696  # Extract the first word of "$ac_prog", so it can be a program name with args.
12697set dummy $ac_prog; ac_word=$2
12698{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12699$as_echo_n "checking for $ac_word... " >&6; }
12700if ${ac_cv_prog_AWK+:} false; then :
12701  $as_echo_n "(cached) " >&6
12702else
12703  if test -n "$AWK"; then
12704  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12705else
12706as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12707for as_dir in $PATH
12708do
12709  IFS=$as_save_IFS
12710  test -z "$as_dir" && as_dir=.
12711    for ac_exec_ext in '' $ac_executable_extensions; do
12712  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12713    ac_cv_prog_AWK="$ac_prog"
12714    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12715    break 2
12716  fi
12717done
12718  done
12719IFS=$as_save_IFS
12720
12721fi
12722fi
12723AWK=$ac_cv_prog_AWK
12724if test -n "$AWK"; then
12725  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12726$as_echo "$AWK" >&6; }
12727else
12728  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12729$as_echo "no" >&6; }
12730fi
12731
12732
12733  test -n "$AWK" && break
12734done
12735
12736  else
12737    # The variable is set, but is it from the command line or the environment?
12738
12739    # Try to remove the string !AWK! from our list.
12740    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AWK!/}
12741    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12742      # If it failed, the variable was not from the command line. Ignore it,
12743      # but warn the user (except for BASH, which is always set by the calling BASH).
12744      if test "xAWK" != xBASH; then
12745        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&5
12746$as_echo "$as_me: WARNING: Ignoring value of AWK from the environment. Use command line variables instead." >&2;}
12747      fi
12748      # Try to locate tool using the code snippet
12749      for ac_prog in gawk mawk nawk awk
12750do
12751  # Extract the first word of "$ac_prog", so it can be a program name with args.
12752set dummy $ac_prog; ac_word=$2
12753{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12754$as_echo_n "checking for $ac_word... " >&6; }
12755if ${ac_cv_prog_AWK+:} false; then :
12756  $as_echo_n "(cached) " >&6
12757else
12758  if test -n "$AWK"; then
12759  ac_cv_prog_AWK="$AWK" # Let the user override the test.
12760else
12761as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12762for as_dir in $PATH
12763do
12764  IFS=$as_save_IFS
12765  test -z "$as_dir" && as_dir=.
12766    for ac_exec_ext in '' $ac_executable_extensions; do
12767  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12768    ac_cv_prog_AWK="$ac_prog"
12769    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12770    break 2
12771  fi
12772done
12773  done
12774IFS=$as_save_IFS
12775
12776fi
12777fi
12778AWK=$ac_cv_prog_AWK
12779if test -n "$AWK"; then
12780  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12781$as_echo "$AWK" >&6; }
12782else
12783  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12784$as_echo "no" >&6; }
12785fi
12786
12787
12788  test -n "$AWK" && break
12789done
12790
12791    else
12792      # If it succeeded, then it was overridden by the user. We will use it
12793      # for the tool.
12794
12795      # First remove it from the list of overridden variables, so we can test
12796      # for unknown variables in the end.
12797      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
12798
12799      # Check if we try to supply an empty value
12800      if test "x$AWK" = x; then
12801        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AWK= (no value)" >&5
12802$as_echo "$as_me: Setting user supplied tool AWK= (no value)" >&6;}
12803        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12804$as_echo_n "checking for AWK... " >&6; }
12805        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
12806$as_echo "disabled" >&6; }
12807      else
12808        # Check if the provided tool contains a complete path.
12809        tool_specified="$AWK"
12810        tool_basename="${tool_specified##*/}"
12811        if test "x$tool_basename" = "x$tool_specified"; then
12812          # A command without a complete path is provided, search $PATH.
12813          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AWK=$tool_basename" >&5
12814$as_echo "$as_me: Will search for user supplied tool AWK=$tool_basename" >&6;}
12815          # Extract the first word of "$tool_basename", so it can be a program name with args.
12816set dummy $tool_basename; ac_word=$2
12817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
12818$as_echo_n "checking for $ac_word... " >&6; }
12819if ${ac_cv_path_AWK+:} false; then :
12820  $as_echo_n "(cached) " >&6
12821else
12822  case $AWK in
12823  [\\/]* | ?:[\\/]*)
12824  ac_cv_path_AWK="$AWK" # Let the user override the test with a path.
12825  ;;
12826  *)
12827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12828for as_dir in $PATH
12829do
12830  IFS=$as_save_IFS
12831  test -z "$as_dir" && as_dir=.
12832    for ac_exec_ext in '' $ac_executable_extensions; do
12833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
12834    ac_cv_path_AWK="$as_dir/$ac_word$ac_exec_ext"
12835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
12836    break 2
12837  fi
12838done
12839  done
12840IFS=$as_save_IFS
12841
12842  ;;
12843esac
12844fi
12845AWK=$ac_cv_path_AWK
12846if test -n "$AWK"; then
12847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5
12848$as_echo "$AWK" >&6; }
12849else
12850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
12851$as_echo "no" >&6; }
12852fi
12853
12854
12855          if test "x$AWK" = x; then
12856            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
12857          fi
12858        else
12859          # Otherwise we believe it is a complete path. Use it as it is.
12860          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AWK=$tool_specified" >&5
12861$as_echo "$as_me: Will use user supplied tool AWK=$tool_specified" >&6;}
12862          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AWK" >&5
12863$as_echo_n "checking for AWK... " >&6; }
12864          if test ! -x "$tool_specified"; then
12865            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
12866$as_echo "not found" >&6; }
12867            as_fn_error $? "User supplied tool AWK=$tool_specified does not exist or is not executable" "$LINENO" 5
12868          fi
12869          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
12870$as_echo "$tool_specified" >&6; }
12871        fi
12872      fi
12873    fi
12874
12875  fi
12876
12877
12878  if test "x$AWK" = x; then
12879    as_fn_error $? "Could not find required tool for AWK" "$LINENO" 5
12880  fi
12881
12882
12883
12884
12885  # Publish this variable in the help.
12886
12887
12888  if [ -z "${GREP+x}" ]; then
12889    # The variable is not set by user, try to locate tool using the code snippet
12890    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12891$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12892if ${ac_cv_path_GREP+:} false; then :
12893  $as_echo_n "(cached) " >&6
12894else
12895  if test -z "$GREP"; then
12896  ac_path_GREP_found=false
12897  # Loop through the user's path and test for each of PROGNAME-LIST
12898  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12899for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12900do
12901  IFS=$as_save_IFS
12902  test -z "$as_dir" && as_dir=.
12903    for ac_prog in grep ggrep; do
12904    for ac_exec_ext in '' $ac_executable_extensions; do
12905      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12906      as_fn_executable_p "$ac_path_GREP" || continue
12907# Check for GNU ac_path_GREP and select it if it is found.
12908  # Check for GNU $ac_path_GREP
12909case `"$ac_path_GREP" --version 2>&1` in
12910*GNU*)
12911  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12912*)
12913  ac_count=0
12914  $as_echo_n 0123456789 >"conftest.in"
12915  while :
12916  do
12917    cat "conftest.in" "conftest.in" >"conftest.tmp"
12918    mv "conftest.tmp" "conftest.in"
12919    cp "conftest.in" "conftest.nl"
12920    $as_echo 'GREP' >> "conftest.nl"
12921    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12922    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12923    as_fn_arith $ac_count + 1 && ac_count=$as_val
12924    if test $ac_count -gt ${ac_path_GREP_max-0}; then
12925      # Best one so far, save it but keep looking for a better one
12926      ac_cv_path_GREP="$ac_path_GREP"
12927      ac_path_GREP_max=$ac_count
12928    fi
12929    # 10*(2^10) chars as input seems more than enough
12930    test $ac_count -gt 10 && break
12931  done
12932  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
12933esac
12934
12935      $ac_path_GREP_found && break 3
12936    done
12937  done
12938  done
12939IFS=$as_save_IFS
12940  if test -z "$ac_cv_path_GREP"; then
12941    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
12942  fi
12943else
12944  ac_cv_path_GREP=$GREP
12945fi
12946
12947fi
12948{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
12949$as_echo "$ac_cv_path_GREP" >&6; }
12950 GREP="$ac_cv_path_GREP"
12951
12952
12953  else
12954    # The variable is set, but is it from the command line or the environment?
12955
12956    # Try to remove the string !GREP! from our list.
12957    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GREP!/}
12958    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
12959      # If it failed, the variable was not from the command line. Ignore it,
12960      # but warn the user (except for BASH, which is always set by the calling BASH).
12961      if test "xGREP" != xBASH; then
12962        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&5
12963$as_echo "$as_me: WARNING: Ignoring value of GREP from the environment. Use command line variables instead." >&2;}
12964      fi
12965      # Try to locate tool using the code snippet
12966      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5
12967$as_echo_n "checking for grep that handles long lines and -e... " >&6; }
12968if ${ac_cv_path_GREP+:} false; then :
12969  $as_echo_n "(cached) " >&6
12970else
12971  if test -z "$GREP"; then
12972  ac_path_GREP_found=false
12973  # Loop through the user's path and test for each of PROGNAME-LIST
12974  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
12975for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
12976do
12977  IFS=$as_save_IFS
12978  test -z "$as_dir" && as_dir=.
12979    for ac_prog in grep ggrep; do
12980    for ac_exec_ext in '' $ac_executable_extensions; do
12981      ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext"
12982      as_fn_executable_p "$ac_path_GREP" || continue
12983# Check for GNU ac_path_GREP and select it if it is found.
12984  # Check for GNU $ac_path_GREP
12985case `"$ac_path_GREP" --version 2>&1` in
12986*GNU*)
12987  ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;;
12988*)
12989  ac_count=0
12990  $as_echo_n 0123456789 >"conftest.in"
12991  while :
12992  do
12993    cat "conftest.in" "conftest.in" >"conftest.tmp"
12994    mv "conftest.tmp" "conftest.in"
12995    cp "conftest.in" "conftest.nl"
12996    $as_echo 'GREP' >> "conftest.nl"
12997    "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break
12998    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
12999    as_fn_arith $ac_count + 1 && ac_count=$as_val
13000    if test $ac_count -gt ${ac_path_GREP_max-0}; then
13001      # Best one so far, save it but keep looking for a better one
13002      ac_cv_path_GREP="$ac_path_GREP"
13003      ac_path_GREP_max=$ac_count
13004    fi
13005    # 10*(2^10) chars as input seems more than enough
13006    test $ac_count -gt 10 && break
13007  done
13008  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13009esac
13010
13011      $ac_path_GREP_found && break 3
13012    done
13013  done
13014  done
13015IFS=$as_save_IFS
13016  if test -z "$ac_cv_path_GREP"; then
13017    as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13018  fi
13019else
13020  ac_cv_path_GREP=$GREP
13021fi
13022
13023fi
13024{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5
13025$as_echo "$ac_cv_path_GREP" >&6; }
13026 GREP="$ac_cv_path_GREP"
13027
13028
13029    else
13030      # If it succeeded, then it was overridden by the user. We will use it
13031      # for the tool.
13032
13033      # First remove it from the list of overridden variables, so we can test
13034      # for unknown variables in the end.
13035      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13036
13037      # Check if we try to supply an empty value
13038      if test "x$GREP" = x; then
13039        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GREP= (no value)" >&5
13040$as_echo "$as_me: Setting user supplied tool GREP= (no value)" >&6;}
13041        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13042$as_echo_n "checking for GREP... " >&6; }
13043        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13044$as_echo "disabled" >&6; }
13045      else
13046        # Check if the provided tool contains a complete path.
13047        tool_specified="$GREP"
13048        tool_basename="${tool_specified##*/}"
13049        if test "x$tool_basename" = "x$tool_specified"; then
13050          # A command without a complete path is provided, search $PATH.
13051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GREP=$tool_basename" >&5
13052$as_echo "$as_me: Will search for user supplied tool GREP=$tool_basename" >&6;}
13053          # Extract the first word of "$tool_basename", so it can be a program name with args.
13054set dummy $tool_basename; ac_word=$2
13055{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13056$as_echo_n "checking for $ac_word... " >&6; }
13057if ${ac_cv_path_GREP+:} false; then :
13058  $as_echo_n "(cached) " >&6
13059else
13060  case $GREP in
13061  [\\/]* | ?:[\\/]*)
13062  ac_cv_path_GREP="$GREP" # Let the user override the test with a path.
13063  ;;
13064  *)
13065  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13066for as_dir in $PATH
13067do
13068  IFS=$as_save_IFS
13069  test -z "$as_dir" && as_dir=.
13070    for ac_exec_ext in '' $ac_executable_extensions; do
13071  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13072    ac_cv_path_GREP="$as_dir/$ac_word$ac_exec_ext"
13073    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13074    break 2
13075  fi
13076done
13077  done
13078IFS=$as_save_IFS
13079
13080  ;;
13081esac
13082fi
13083GREP=$ac_cv_path_GREP
13084if test -n "$GREP"; then
13085  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GREP" >&5
13086$as_echo "$GREP" >&6; }
13087else
13088  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13089$as_echo "no" >&6; }
13090fi
13091
13092
13093          if test "x$GREP" = x; then
13094            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13095          fi
13096        else
13097          # Otherwise we believe it is a complete path. Use it as it is.
13098          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GREP=$tool_specified" >&5
13099$as_echo "$as_me: Will use user supplied tool GREP=$tool_specified" >&6;}
13100          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GREP" >&5
13101$as_echo_n "checking for GREP... " >&6; }
13102          if test ! -x "$tool_specified"; then
13103            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13104$as_echo "not found" >&6; }
13105            as_fn_error $? "User supplied tool GREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13106          fi
13107          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13108$as_echo "$tool_specified" >&6; }
13109        fi
13110      fi
13111    fi
13112
13113  fi
13114
13115
13116  if test "x$GREP" = x; then
13117    as_fn_error $? "Could not find required tool for GREP" "$LINENO" 5
13118  fi
13119
13120
13121
13122
13123  # Publish this variable in the help.
13124
13125
13126  if [ -z "${EGREP+x}" ]; then
13127    # The variable is not set by user, try to locate tool using the code snippet
13128    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13129$as_echo_n "checking for egrep... " >&6; }
13130if ${ac_cv_path_EGREP+:} false; then :
13131  $as_echo_n "(cached) " >&6
13132else
13133  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13134   then ac_cv_path_EGREP="$GREP -E"
13135   else
13136     if test -z "$EGREP"; then
13137  ac_path_EGREP_found=false
13138  # Loop through the user's path and test for each of PROGNAME-LIST
13139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13140for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13141do
13142  IFS=$as_save_IFS
13143  test -z "$as_dir" && as_dir=.
13144    for ac_prog in egrep; do
13145    for ac_exec_ext in '' $ac_executable_extensions; do
13146      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13147      as_fn_executable_p "$ac_path_EGREP" || continue
13148# Check for GNU ac_path_EGREP and select it if it is found.
13149  # Check for GNU $ac_path_EGREP
13150case `"$ac_path_EGREP" --version 2>&1` in
13151*GNU*)
13152  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13153*)
13154  ac_count=0
13155  $as_echo_n 0123456789 >"conftest.in"
13156  while :
13157  do
13158    cat "conftest.in" "conftest.in" >"conftest.tmp"
13159    mv "conftest.tmp" "conftest.in"
13160    cp "conftest.in" "conftest.nl"
13161    $as_echo 'EGREP' >> "conftest.nl"
13162    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13163    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13164    as_fn_arith $ac_count + 1 && ac_count=$as_val
13165    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13166      # Best one so far, save it but keep looking for a better one
13167      ac_cv_path_EGREP="$ac_path_EGREP"
13168      ac_path_EGREP_max=$ac_count
13169    fi
13170    # 10*(2^10) chars as input seems more than enough
13171    test $ac_count -gt 10 && break
13172  done
13173  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13174esac
13175
13176      $ac_path_EGREP_found && break 3
13177    done
13178  done
13179  done
13180IFS=$as_save_IFS
13181  if test -z "$ac_cv_path_EGREP"; then
13182    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13183  fi
13184else
13185  ac_cv_path_EGREP=$EGREP
13186fi
13187
13188   fi
13189fi
13190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13191$as_echo "$ac_cv_path_EGREP" >&6; }
13192 EGREP="$ac_cv_path_EGREP"
13193
13194
13195  else
13196    # The variable is set, but is it from the command line or the environment?
13197
13198    # Try to remove the string !EGREP! from our list.
13199    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!EGREP!/}
13200    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13201      # If it failed, the variable was not from the command line. Ignore it,
13202      # but warn the user (except for BASH, which is always set by the calling BASH).
13203      if test "xEGREP" != xBASH; then
13204        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&5
13205$as_echo "$as_me: WARNING: Ignoring value of EGREP from the environment. Use command line variables instead." >&2;}
13206      fi
13207      # Try to locate tool using the code snippet
13208      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5
13209$as_echo_n "checking for egrep... " >&6; }
13210if ${ac_cv_path_EGREP+:} false; then :
13211  $as_echo_n "(cached) " >&6
13212else
13213  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
13214   then ac_cv_path_EGREP="$GREP -E"
13215   else
13216     if test -z "$EGREP"; then
13217  ac_path_EGREP_found=false
13218  # Loop through the user's path and test for each of PROGNAME-LIST
13219  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13220for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13221do
13222  IFS=$as_save_IFS
13223  test -z "$as_dir" && as_dir=.
13224    for ac_prog in egrep; do
13225    for ac_exec_ext in '' $ac_executable_extensions; do
13226      ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext"
13227      as_fn_executable_p "$ac_path_EGREP" || continue
13228# Check for GNU ac_path_EGREP and select it if it is found.
13229  # Check for GNU $ac_path_EGREP
13230case `"$ac_path_EGREP" --version 2>&1` in
13231*GNU*)
13232  ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;;
13233*)
13234  ac_count=0
13235  $as_echo_n 0123456789 >"conftest.in"
13236  while :
13237  do
13238    cat "conftest.in" "conftest.in" >"conftest.tmp"
13239    mv "conftest.tmp" "conftest.in"
13240    cp "conftest.in" "conftest.nl"
13241    $as_echo 'EGREP' >> "conftest.nl"
13242    "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break
13243    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13244    as_fn_arith $ac_count + 1 && ac_count=$as_val
13245    if test $ac_count -gt ${ac_path_EGREP_max-0}; then
13246      # Best one so far, save it but keep looking for a better one
13247      ac_cv_path_EGREP="$ac_path_EGREP"
13248      ac_path_EGREP_max=$ac_count
13249    fi
13250    # 10*(2^10) chars as input seems more than enough
13251    test $ac_count -gt 10 && break
13252  done
13253  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13254esac
13255
13256      $ac_path_EGREP_found && break 3
13257    done
13258  done
13259  done
13260IFS=$as_save_IFS
13261  if test -z "$ac_cv_path_EGREP"; then
13262    as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13263  fi
13264else
13265  ac_cv_path_EGREP=$EGREP
13266fi
13267
13268   fi
13269fi
13270{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5
13271$as_echo "$ac_cv_path_EGREP" >&6; }
13272 EGREP="$ac_cv_path_EGREP"
13273
13274
13275    else
13276      # If it succeeded, then it was overridden by the user. We will use it
13277      # for the tool.
13278
13279      # First remove it from the list of overridden variables, so we can test
13280      # for unknown variables in the end.
13281      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13282
13283      # Check if we try to supply an empty value
13284      if test "x$EGREP" = x; then
13285        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool EGREP= (no value)" >&5
13286$as_echo "$as_me: Setting user supplied tool EGREP= (no value)" >&6;}
13287        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13288$as_echo_n "checking for EGREP... " >&6; }
13289        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13290$as_echo "disabled" >&6; }
13291      else
13292        # Check if the provided tool contains a complete path.
13293        tool_specified="$EGREP"
13294        tool_basename="${tool_specified##*/}"
13295        if test "x$tool_basename" = "x$tool_specified"; then
13296          # A command without a complete path is provided, search $PATH.
13297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool EGREP=$tool_basename" >&5
13298$as_echo "$as_me: Will search for user supplied tool EGREP=$tool_basename" >&6;}
13299          # Extract the first word of "$tool_basename", so it can be a program name with args.
13300set dummy $tool_basename; ac_word=$2
13301{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13302$as_echo_n "checking for $ac_word... " >&6; }
13303if ${ac_cv_path_EGREP+:} false; then :
13304  $as_echo_n "(cached) " >&6
13305else
13306  case $EGREP in
13307  [\\/]* | ?:[\\/]*)
13308  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
13309  ;;
13310  *)
13311  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13312for as_dir in $PATH
13313do
13314  IFS=$as_save_IFS
13315  test -z "$as_dir" && as_dir=.
13316    for ac_exec_ext in '' $ac_executable_extensions; do
13317  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13318    ac_cv_path_EGREP="$as_dir/$ac_word$ac_exec_ext"
13319    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13320    break 2
13321  fi
13322done
13323  done
13324IFS=$as_save_IFS
13325
13326  ;;
13327esac
13328fi
13329EGREP=$ac_cv_path_EGREP
13330if test -n "$EGREP"; then
13331  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EGREP" >&5
13332$as_echo "$EGREP" >&6; }
13333else
13334  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13335$as_echo "no" >&6; }
13336fi
13337
13338
13339          if test "x$EGREP" = x; then
13340            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13341          fi
13342        else
13343          # Otherwise we believe it is a complete path. Use it as it is.
13344          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool EGREP=$tool_specified" >&5
13345$as_echo "$as_me: Will use user supplied tool EGREP=$tool_specified" >&6;}
13346          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for EGREP" >&5
13347$as_echo_n "checking for EGREP... " >&6; }
13348          if test ! -x "$tool_specified"; then
13349            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13350$as_echo "not found" >&6; }
13351            as_fn_error $? "User supplied tool EGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13352          fi
13353          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13354$as_echo "$tool_specified" >&6; }
13355        fi
13356      fi
13357    fi
13358
13359  fi
13360
13361
13362  if test "x$EGREP" = x; then
13363    as_fn_error $? "Could not find required tool for EGREP" "$LINENO" 5
13364  fi
13365
13366
13367
13368
13369  # Publish this variable in the help.
13370
13371
13372  if [ -z "${FGREP+x}" ]; then
13373    # The variable is not set by user, try to locate tool using the code snippet
13374    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13375$as_echo_n "checking for fgrep... " >&6; }
13376if ${ac_cv_path_FGREP+:} false; then :
13377  $as_echo_n "(cached) " >&6
13378else
13379  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13380   then ac_cv_path_FGREP="$GREP -F"
13381   else
13382     if test -z "$FGREP"; then
13383  ac_path_FGREP_found=false
13384  # Loop through the user's path and test for each of PROGNAME-LIST
13385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13386for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13387do
13388  IFS=$as_save_IFS
13389  test -z "$as_dir" && as_dir=.
13390    for ac_prog in fgrep; do
13391    for ac_exec_ext in '' $ac_executable_extensions; do
13392      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13393      as_fn_executable_p "$ac_path_FGREP" || continue
13394# Check for GNU ac_path_FGREP and select it if it is found.
13395  # Check for GNU $ac_path_FGREP
13396case `"$ac_path_FGREP" --version 2>&1` in
13397*GNU*)
13398  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13399*)
13400  ac_count=0
13401  $as_echo_n 0123456789 >"conftest.in"
13402  while :
13403  do
13404    cat "conftest.in" "conftest.in" >"conftest.tmp"
13405    mv "conftest.tmp" "conftest.in"
13406    cp "conftest.in" "conftest.nl"
13407    $as_echo 'FGREP' >> "conftest.nl"
13408    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13409    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13410    as_fn_arith $ac_count + 1 && ac_count=$as_val
13411    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13412      # Best one so far, save it but keep looking for a better one
13413      ac_cv_path_FGREP="$ac_path_FGREP"
13414      ac_path_FGREP_max=$ac_count
13415    fi
13416    # 10*(2^10) chars as input seems more than enough
13417    test $ac_count -gt 10 && break
13418  done
13419  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13420esac
13421
13422      $ac_path_FGREP_found && break 3
13423    done
13424  done
13425  done
13426IFS=$as_save_IFS
13427  if test -z "$ac_cv_path_FGREP"; then
13428    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13429  fi
13430else
13431  ac_cv_path_FGREP=$FGREP
13432fi
13433
13434   fi
13435fi
13436{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13437$as_echo "$ac_cv_path_FGREP" >&6; }
13438 FGREP="$ac_cv_path_FGREP"
13439
13440
13441  else
13442    # The variable is set, but is it from the command line or the environment?
13443
13444    # Try to remove the string !FGREP! from our list.
13445    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!FGREP!/}
13446    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13447      # If it failed, the variable was not from the command line. Ignore it,
13448      # but warn the user (except for BASH, which is always set by the calling BASH).
13449      if test "xFGREP" != xBASH; then
13450        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&5
13451$as_echo "$as_me: WARNING: Ignoring value of FGREP from the environment. Use command line variables instead." >&2;}
13452      fi
13453      # Try to locate tool using the code snippet
13454      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5
13455$as_echo_n "checking for fgrep... " >&6; }
13456if ${ac_cv_path_FGREP+:} false; then :
13457  $as_echo_n "(cached) " >&6
13458else
13459  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
13460   then ac_cv_path_FGREP="$GREP -F"
13461   else
13462     if test -z "$FGREP"; then
13463  ac_path_FGREP_found=false
13464  # Loop through the user's path and test for each of PROGNAME-LIST
13465  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13466for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin
13467do
13468  IFS=$as_save_IFS
13469  test -z "$as_dir" && as_dir=.
13470    for ac_prog in fgrep; do
13471    for ac_exec_ext in '' $ac_executable_extensions; do
13472      ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext"
13473      as_fn_executable_p "$ac_path_FGREP" || continue
13474# Check for GNU ac_path_FGREP and select it if it is found.
13475  # Check for GNU $ac_path_FGREP
13476case `"$ac_path_FGREP" --version 2>&1` in
13477*GNU*)
13478  ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;;
13479*)
13480  ac_count=0
13481  $as_echo_n 0123456789 >"conftest.in"
13482  while :
13483  do
13484    cat "conftest.in" "conftest.in" >"conftest.tmp"
13485    mv "conftest.tmp" "conftest.in"
13486    cp "conftest.in" "conftest.nl"
13487    $as_echo 'FGREP' >> "conftest.nl"
13488    "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break
13489    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13490    as_fn_arith $ac_count + 1 && ac_count=$as_val
13491    if test $ac_count -gt ${ac_path_FGREP_max-0}; then
13492      # Best one so far, save it but keep looking for a better one
13493      ac_cv_path_FGREP="$ac_path_FGREP"
13494      ac_path_FGREP_max=$ac_count
13495    fi
13496    # 10*(2^10) chars as input seems more than enough
13497    test $ac_count -gt 10 && break
13498  done
13499  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13500esac
13501
13502      $ac_path_FGREP_found && break 3
13503    done
13504  done
13505  done
13506IFS=$as_save_IFS
13507  if test -z "$ac_cv_path_FGREP"; then
13508    as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5
13509  fi
13510else
13511  ac_cv_path_FGREP=$FGREP
13512fi
13513
13514   fi
13515fi
13516{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5
13517$as_echo "$ac_cv_path_FGREP" >&6; }
13518 FGREP="$ac_cv_path_FGREP"
13519
13520
13521    else
13522      # If it succeeded, then it was overridden by the user. We will use it
13523      # for the tool.
13524
13525      # First remove it from the list of overridden variables, so we can test
13526      # for unknown variables in the end.
13527      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13528
13529      # Check if we try to supply an empty value
13530      if test "x$FGREP" = x; then
13531        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool FGREP= (no value)" >&5
13532$as_echo "$as_me: Setting user supplied tool FGREP= (no value)" >&6;}
13533        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13534$as_echo_n "checking for FGREP... " >&6; }
13535        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13536$as_echo "disabled" >&6; }
13537      else
13538        # Check if the provided tool contains a complete path.
13539        tool_specified="$FGREP"
13540        tool_basename="${tool_specified##*/}"
13541        if test "x$tool_basename" = "x$tool_specified"; then
13542          # A command without a complete path is provided, search $PATH.
13543          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool FGREP=$tool_basename" >&5
13544$as_echo "$as_me: Will search for user supplied tool FGREP=$tool_basename" >&6;}
13545          # Extract the first word of "$tool_basename", so it can be a program name with args.
13546set dummy $tool_basename; ac_word=$2
13547{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13548$as_echo_n "checking for $ac_word... " >&6; }
13549if ${ac_cv_path_FGREP+:} false; then :
13550  $as_echo_n "(cached) " >&6
13551else
13552  case $FGREP in
13553  [\\/]* | ?:[\\/]*)
13554  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
13555  ;;
13556  *)
13557  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13558for as_dir in $PATH
13559do
13560  IFS=$as_save_IFS
13561  test -z "$as_dir" && as_dir=.
13562    for ac_exec_ext in '' $ac_executable_extensions; do
13563  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13564    ac_cv_path_FGREP="$as_dir/$ac_word$ac_exec_ext"
13565    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13566    break 2
13567  fi
13568done
13569  done
13570IFS=$as_save_IFS
13571
13572  ;;
13573esac
13574fi
13575FGREP=$ac_cv_path_FGREP
13576if test -n "$FGREP"; then
13577  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FGREP" >&5
13578$as_echo "$FGREP" >&6; }
13579else
13580  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13581$as_echo "no" >&6; }
13582fi
13583
13584
13585          if test "x$FGREP" = x; then
13586            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13587          fi
13588        else
13589          # Otherwise we believe it is a complete path. Use it as it is.
13590          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool FGREP=$tool_specified" >&5
13591$as_echo "$as_me: Will use user supplied tool FGREP=$tool_specified" >&6;}
13592          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for FGREP" >&5
13593$as_echo_n "checking for FGREP... " >&6; }
13594          if test ! -x "$tool_specified"; then
13595            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13596$as_echo "not found" >&6; }
13597            as_fn_error $? "User supplied tool FGREP=$tool_specified does not exist or is not executable" "$LINENO" 5
13598          fi
13599          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13600$as_echo "$tool_specified" >&6; }
13601        fi
13602      fi
13603    fi
13604
13605  fi
13606
13607
13608  if test "x$FGREP" = x; then
13609    as_fn_error $? "Could not find required tool for FGREP" "$LINENO" 5
13610  fi
13611
13612
13613
13614
13615  # Publish this variable in the help.
13616
13617
13618  if [ -z "${SED+x}" ]; then
13619    # The variable is not set by user, try to locate tool using the code snippet
13620    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13621$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13622if ${ac_cv_path_SED+:} false; then :
13623  $as_echo_n "(cached) " >&6
13624else
13625            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13626     for ac_i in 1 2 3 4 5 6 7; do
13627       ac_script="$ac_script$as_nl$ac_script"
13628     done
13629     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13630     { ac_script=; unset ac_script;}
13631     if test -z "$SED"; then
13632  ac_path_SED_found=false
13633  # Loop through the user's path and test for each of PROGNAME-LIST
13634  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13635for as_dir in $PATH
13636do
13637  IFS=$as_save_IFS
13638  test -z "$as_dir" && as_dir=.
13639    for ac_prog in sed gsed; do
13640    for ac_exec_ext in '' $ac_executable_extensions; do
13641      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13642      as_fn_executable_p "$ac_path_SED" || continue
13643# Check for GNU ac_path_SED and select it if it is found.
13644  # Check for GNU $ac_path_SED
13645case `"$ac_path_SED" --version 2>&1` in
13646*GNU*)
13647  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13648*)
13649  ac_count=0
13650  $as_echo_n 0123456789 >"conftest.in"
13651  while :
13652  do
13653    cat "conftest.in" "conftest.in" >"conftest.tmp"
13654    mv "conftest.tmp" "conftest.in"
13655    cp "conftest.in" "conftest.nl"
13656    $as_echo '' >> "conftest.nl"
13657    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13658    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13659    as_fn_arith $ac_count + 1 && ac_count=$as_val
13660    if test $ac_count -gt ${ac_path_SED_max-0}; then
13661      # Best one so far, save it but keep looking for a better one
13662      ac_cv_path_SED="$ac_path_SED"
13663      ac_path_SED_max=$ac_count
13664    fi
13665    # 10*(2^10) chars as input seems more than enough
13666    test $ac_count -gt 10 && break
13667  done
13668  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13669esac
13670
13671      $ac_path_SED_found && break 3
13672    done
13673  done
13674  done
13675IFS=$as_save_IFS
13676  if test -z "$ac_cv_path_SED"; then
13677    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13678  fi
13679else
13680  ac_cv_path_SED=$SED
13681fi
13682
13683fi
13684{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13685$as_echo "$ac_cv_path_SED" >&6; }
13686 SED="$ac_cv_path_SED"
13687  rm -f conftest.sed
13688
13689  else
13690    # The variable is set, but is it from the command line or the environment?
13691
13692    # Try to remove the string !SED! from our list.
13693    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SED!/}
13694    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13695      # If it failed, the variable was not from the command line. Ignore it,
13696      # but warn the user (except for BASH, which is always set by the calling BASH).
13697      if test "xSED" != xBASH; then
13698        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&5
13699$as_echo "$as_me: WARNING: Ignoring value of SED from the environment. Use command line variables instead." >&2;}
13700      fi
13701      # Try to locate tool using the code snippet
13702      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5
13703$as_echo_n "checking for a sed that does not truncate output... " >&6; }
13704if ${ac_cv_path_SED+:} false; then :
13705  $as_echo_n "(cached) " >&6
13706else
13707            ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/
13708     for ac_i in 1 2 3 4 5 6 7; do
13709       ac_script="$ac_script$as_nl$ac_script"
13710     done
13711     echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed
13712     { ac_script=; unset ac_script;}
13713     if test -z "$SED"; then
13714  ac_path_SED_found=false
13715  # Loop through the user's path and test for each of PROGNAME-LIST
13716  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13717for as_dir in $PATH
13718do
13719  IFS=$as_save_IFS
13720  test -z "$as_dir" && as_dir=.
13721    for ac_prog in sed gsed; do
13722    for ac_exec_ext in '' $ac_executable_extensions; do
13723      ac_path_SED="$as_dir/$ac_prog$ac_exec_ext"
13724      as_fn_executable_p "$ac_path_SED" || continue
13725# Check for GNU ac_path_SED and select it if it is found.
13726  # Check for GNU $ac_path_SED
13727case `"$ac_path_SED" --version 2>&1` in
13728*GNU*)
13729  ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;;
13730*)
13731  ac_count=0
13732  $as_echo_n 0123456789 >"conftest.in"
13733  while :
13734  do
13735    cat "conftest.in" "conftest.in" >"conftest.tmp"
13736    mv "conftest.tmp" "conftest.in"
13737    cp "conftest.in" "conftest.nl"
13738    $as_echo '' >> "conftest.nl"
13739    "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break
13740    diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break
13741    as_fn_arith $ac_count + 1 && ac_count=$as_val
13742    if test $ac_count -gt ${ac_path_SED_max-0}; then
13743      # Best one so far, save it but keep looking for a better one
13744      ac_cv_path_SED="$ac_path_SED"
13745      ac_path_SED_max=$ac_count
13746    fi
13747    # 10*(2^10) chars as input seems more than enough
13748    test $ac_count -gt 10 && break
13749  done
13750  rm -f conftest.in conftest.tmp conftest.nl conftest.out;;
13751esac
13752
13753      $ac_path_SED_found && break 3
13754    done
13755  done
13756  done
13757IFS=$as_save_IFS
13758  if test -z "$ac_cv_path_SED"; then
13759    as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5
13760  fi
13761else
13762  ac_cv_path_SED=$SED
13763fi
13764
13765fi
13766{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5
13767$as_echo "$ac_cv_path_SED" >&6; }
13768 SED="$ac_cv_path_SED"
13769  rm -f conftest.sed
13770
13771    else
13772      # If it succeeded, then it was overridden by the user. We will use it
13773      # for the tool.
13774
13775      # First remove it from the list of overridden variables, so we can test
13776      # for unknown variables in the end.
13777      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13778
13779      # Check if we try to supply an empty value
13780      if test "x$SED" = x; then
13781        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SED= (no value)" >&5
13782$as_echo "$as_me: Setting user supplied tool SED= (no value)" >&6;}
13783        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13784$as_echo_n "checking for SED... " >&6; }
13785        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13786$as_echo "disabled" >&6; }
13787      else
13788        # Check if the provided tool contains a complete path.
13789        tool_specified="$SED"
13790        tool_basename="${tool_specified##*/}"
13791        if test "x$tool_basename" = "x$tool_specified"; then
13792          # A command without a complete path is provided, search $PATH.
13793          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SED=$tool_basename" >&5
13794$as_echo "$as_me: Will search for user supplied tool SED=$tool_basename" >&6;}
13795          # Extract the first word of "$tool_basename", so it can be a program name with args.
13796set dummy $tool_basename; ac_word=$2
13797{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13798$as_echo_n "checking for $ac_word... " >&6; }
13799if ${ac_cv_path_SED+:} false; then :
13800  $as_echo_n "(cached) " >&6
13801else
13802  case $SED in
13803  [\\/]* | ?:[\\/]*)
13804  ac_cv_path_SED="$SED" # Let the user override the test with a path.
13805  ;;
13806  *)
13807  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13808for as_dir in $PATH
13809do
13810  IFS=$as_save_IFS
13811  test -z "$as_dir" && as_dir=.
13812    for ac_exec_ext in '' $ac_executable_extensions; do
13813  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13814    ac_cv_path_SED="$as_dir/$ac_word$ac_exec_ext"
13815    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13816    break 2
13817  fi
13818done
13819  done
13820IFS=$as_save_IFS
13821
13822  ;;
13823esac
13824fi
13825SED=$ac_cv_path_SED
13826if test -n "$SED"; then
13827  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SED" >&5
13828$as_echo "$SED" >&6; }
13829else
13830  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13831$as_echo "no" >&6; }
13832fi
13833
13834
13835          if test "x$SED" = x; then
13836            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
13837          fi
13838        else
13839          # Otherwise we believe it is a complete path. Use it as it is.
13840          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SED=$tool_specified" >&5
13841$as_echo "$as_me: Will use user supplied tool SED=$tool_specified" >&6;}
13842          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SED" >&5
13843$as_echo_n "checking for SED... " >&6; }
13844          if test ! -x "$tool_specified"; then
13845            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
13846$as_echo "not found" >&6; }
13847            as_fn_error $? "User supplied tool SED=$tool_specified does not exist or is not executable" "$LINENO" 5
13848          fi
13849          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
13850$as_echo "$tool_specified" >&6; }
13851        fi
13852      fi
13853    fi
13854
13855  fi
13856
13857
13858  if test "x$SED" = x; then
13859    as_fn_error $? "Could not find required tool for SED" "$LINENO" 5
13860  fi
13861
13862
13863
13864  # Always force rm.
13865  RM="$RM -f"
13866
13867  # pwd behaves differently on various platforms and some don't support the -L flag.
13868  # Always use the bash builtin pwd to get uniform behavior.
13869  THEPWDCMD=pwd
13870
13871  # These are not required on all platforms
13872
13873
13874  # Publish this variable in the help.
13875
13876
13877  if [ -z "${CYGPATH+x}" ]; then
13878    # The variable is not set by user, try to locate tool using the code snippet
13879    for ac_prog in cygpath
13880do
13881  # Extract the first word of "$ac_prog", so it can be a program name with args.
13882set dummy $ac_prog; ac_word=$2
13883{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13884$as_echo_n "checking for $ac_word... " >&6; }
13885if ${ac_cv_path_CYGPATH+:} false; then :
13886  $as_echo_n "(cached) " >&6
13887else
13888  case $CYGPATH in
13889  [\\/]* | ?:[\\/]*)
13890  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13891  ;;
13892  *)
13893  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13894for as_dir in $PATH
13895do
13896  IFS=$as_save_IFS
13897  test -z "$as_dir" && as_dir=.
13898    for ac_exec_ext in '' $ac_executable_extensions; do
13899  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13900    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13901    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13902    break 2
13903  fi
13904done
13905  done
13906IFS=$as_save_IFS
13907
13908  ;;
13909esac
13910fi
13911CYGPATH=$ac_cv_path_CYGPATH
13912if test -n "$CYGPATH"; then
13913  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13914$as_echo "$CYGPATH" >&6; }
13915else
13916  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13917$as_echo "no" >&6; }
13918fi
13919
13920
13921  test -n "$CYGPATH" && break
13922done
13923
13924  else
13925    # The variable is set, but is it from the command line or the environment?
13926
13927    # Try to remove the string !CYGPATH! from our list.
13928    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CYGPATH!/}
13929    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
13930      # If it failed, the variable was not from the command line. Ignore it,
13931      # but warn the user (except for BASH, which is always set by the calling BASH).
13932      if test "xCYGPATH" != xBASH; then
13933        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&5
13934$as_echo "$as_me: WARNING: Ignoring value of CYGPATH from the environment. Use command line variables instead." >&2;}
13935      fi
13936      # Try to locate tool using the code snippet
13937      for ac_prog in cygpath
13938do
13939  # Extract the first word of "$ac_prog", so it can be a program name with args.
13940set dummy $ac_prog; ac_word=$2
13941{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
13942$as_echo_n "checking for $ac_word... " >&6; }
13943if ${ac_cv_path_CYGPATH+:} false; then :
13944  $as_echo_n "(cached) " >&6
13945else
13946  case $CYGPATH in
13947  [\\/]* | ?:[\\/]*)
13948  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
13949  ;;
13950  *)
13951  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
13952for as_dir in $PATH
13953do
13954  IFS=$as_save_IFS
13955  test -z "$as_dir" && as_dir=.
13956    for ac_exec_ext in '' $ac_executable_extensions; do
13957  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
13958    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
13959    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
13960    break 2
13961  fi
13962done
13963  done
13964IFS=$as_save_IFS
13965
13966  ;;
13967esac
13968fi
13969CYGPATH=$ac_cv_path_CYGPATH
13970if test -n "$CYGPATH"; then
13971  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
13972$as_echo "$CYGPATH" >&6; }
13973else
13974  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
13975$as_echo "no" >&6; }
13976fi
13977
13978
13979  test -n "$CYGPATH" && break
13980done
13981
13982    else
13983      # If it succeeded, then it was overridden by the user. We will use it
13984      # for the tool.
13985
13986      # First remove it from the list of overridden variables, so we can test
13987      # for unknown variables in the end.
13988      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
13989
13990      # Check if we try to supply an empty value
13991      if test "x$CYGPATH" = x; then
13992        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CYGPATH= (no value)" >&5
13993$as_echo "$as_me: Setting user supplied tool CYGPATH= (no value)" >&6;}
13994        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
13995$as_echo_n "checking for CYGPATH... " >&6; }
13996        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
13997$as_echo "disabled" >&6; }
13998      else
13999        # Check if the provided tool contains a complete path.
14000        tool_specified="$CYGPATH"
14001        tool_basename="${tool_specified##*/}"
14002        if test "x$tool_basename" = "x$tool_specified"; then
14003          # A command without a complete path is provided, search $PATH.
14004          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CYGPATH=$tool_basename" >&5
14005$as_echo "$as_me: Will search for user supplied tool CYGPATH=$tool_basename" >&6;}
14006          # Extract the first word of "$tool_basename", so it can be a program name with args.
14007set dummy $tool_basename; ac_word=$2
14008{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14009$as_echo_n "checking for $ac_word... " >&6; }
14010if ${ac_cv_path_CYGPATH+:} false; then :
14011  $as_echo_n "(cached) " >&6
14012else
14013  case $CYGPATH in
14014  [\\/]* | ?:[\\/]*)
14015  ac_cv_path_CYGPATH="$CYGPATH" # Let the user override the test with a path.
14016  ;;
14017  *)
14018  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14019for as_dir in $PATH
14020do
14021  IFS=$as_save_IFS
14022  test -z "$as_dir" && as_dir=.
14023    for ac_exec_ext in '' $ac_executable_extensions; do
14024  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14025    ac_cv_path_CYGPATH="$as_dir/$ac_word$ac_exec_ext"
14026    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14027    break 2
14028  fi
14029done
14030  done
14031IFS=$as_save_IFS
14032
14033  ;;
14034esac
14035fi
14036CYGPATH=$ac_cv_path_CYGPATH
14037if test -n "$CYGPATH"; then
14038  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGPATH" >&5
14039$as_echo "$CYGPATH" >&6; }
14040else
14041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14042$as_echo "no" >&6; }
14043fi
14044
14045
14046          if test "x$CYGPATH" = x; then
14047            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14048          fi
14049        else
14050          # Otherwise we believe it is a complete path. Use it as it is.
14051          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CYGPATH=$tool_specified" >&5
14052$as_echo "$as_me: Will use user supplied tool CYGPATH=$tool_specified" >&6;}
14053          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CYGPATH" >&5
14054$as_echo_n "checking for CYGPATH... " >&6; }
14055          if test ! -x "$tool_specified"; then
14056            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14057$as_echo "not found" >&6; }
14058            as_fn_error $? "User supplied tool CYGPATH=$tool_specified does not exist or is not executable" "$LINENO" 5
14059          fi
14060          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14061$as_echo "$tool_specified" >&6; }
14062        fi
14063      fi
14064    fi
14065
14066  fi
14067
14068
14069
14070
14071  # Publish this variable in the help.
14072
14073
14074  if [ -z "${READLINK+x}" ]; then
14075    # The variable is not set by user, try to locate tool using the code snippet
14076    for ac_prog in greadlink readlink
14077do
14078  # Extract the first word of "$ac_prog", so it can be a program name with args.
14079set dummy $ac_prog; ac_word=$2
14080{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14081$as_echo_n "checking for $ac_word... " >&6; }
14082if ${ac_cv_path_READLINK+:} false; then :
14083  $as_echo_n "(cached) " >&6
14084else
14085  case $READLINK in
14086  [\\/]* | ?:[\\/]*)
14087  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14088  ;;
14089  *)
14090  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14091for as_dir in $PATH
14092do
14093  IFS=$as_save_IFS
14094  test -z "$as_dir" && as_dir=.
14095    for ac_exec_ext in '' $ac_executable_extensions; do
14096  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14097    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14098    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14099    break 2
14100  fi
14101done
14102  done
14103IFS=$as_save_IFS
14104
14105  ;;
14106esac
14107fi
14108READLINK=$ac_cv_path_READLINK
14109if test -n "$READLINK"; then
14110  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14111$as_echo "$READLINK" >&6; }
14112else
14113  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14114$as_echo "no" >&6; }
14115fi
14116
14117
14118  test -n "$READLINK" && break
14119done
14120
14121  else
14122    # The variable is set, but is it from the command line or the environment?
14123
14124    # Try to remove the string !READLINK! from our list.
14125    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READLINK!/}
14126    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14127      # If it failed, the variable was not from the command line. Ignore it,
14128      # but warn the user (except for BASH, which is always set by the calling BASH).
14129      if test "xREADLINK" != xBASH; then
14130        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&5
14131$as_echo "$as_me: WARNING: Ignoring value of READLINK from the environment. Use command line variables instead." >&2;}
14132      fi
14133      # Try to locate tool using the code snippet
14134      for ac_prog in greadlink readlink
14135do
14136  # Extract the first word of "$ac_prog", so it can be a program name with args.
14137set dummy $ac_prog; ac_word=$2
14138{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14139$as_echo_n "checking for $ac_word... " >&6; }
14140if ${ac_cv_path_READLINK+:} false; then :
14141  $as_echo_n "(cached) " >&6
14142else
14143  case $READLINK in
14144  [\\/]* | ?:[\\/]*)
14145  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14146  ;;
14147  *)
14148  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14149for as_dir in $PATH
14150do
14151  IFS=$as_save_IFS
14152  test -z "$as_dir" && as_dir=.
14153    for ac_exec_ext in '' $ac_executable_extensions; do
14154  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14155    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14156    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14157    break 2
14158  fi
14159done
14160  done
14161IFS=$as_save_IFS
14162
14163  ;;
14164esac
14165fi
14166READLINK=$ac_cv_path_READLINK
14167if test -n "$READLINK"; then
14168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14169$as_echo "$READLINK" >&6; }
14170else
14171  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14172$as_echo "no" >&6; }
14173fi
14174
14175
14176  test -n "$READLINK" && break
14177done
14178
14179    else
14180      # If it succeeded, then it was overridden by the user. We will use it
14181      # for the tool.
14182
14183      # First remove it from the list of overridden variables, so we can test
14184      # for unknown variables in the end.
14185      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14186
14187      # Check if we try to supply an empty value
14188      if test "x$READLINK" = x; then
14189        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READLINK= (no value)" >&5
14190$as_echo "$as_me: Setting user supplied tool READLINK= (no value)" >&6;}
14191        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14192$as_echo_n "checking for READLINK... " >&6; }
14193        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14194$as_echo "disabled" >&6; }
14195      else
14196        # Check if the provided tool contains a complete path.
14197        tool_specified="$READLINK"
14198        tool_basename="${tool_specified##*/}"
14199        if test "x$tool_basename" = "x$tool_specified"; then
14200          # A command without a complete path is provided, search $PATH.
14201          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READLINK=$tool_basename" >&5
14202$as_echo "$as_me: Will search for user supplied tool READLINK=$tool_basename" >&6;}
14203          # Extract the first word of "$tool_basename", so it can be a program name with args.
14204set dummy $tool_basename; ac_word=$2
14205{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14206$as_echo_n "checking for $ac_word... " >&6; }
14207if ${ac_cv_path_READLINK+:} false; then :
14208  $as_echo_n "(cached) " >&6
14209else
14210  case $READLINK in
14211  [\\/]* | ?:[\\/]*)
14212  ac_cv_path_READLINK="$READLINK" # Let the user override the test with a path.
14213  ;;
14214  *)
14215  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14216for as_dir in $PATH
14217do
14218  IFS=$as_save_IFS
14219  test -z "$as_dir" && as_dir=.
14220    for ac_exec_ext in '' $ac_executable_extensions; do
14221  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14222    ac_cv_path_READLINK="$as_dir/$ac_word$ac_exec_ext"
14223    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14224    break 2
14225  fi
14226done
14227  done
14228IFS=$as_save_IFS
14229
14230  ;;
14231esac
14232fi
14233READLINK=$ac_cv_path_READLINK
14234if test -n "$READLINK"; then
14235  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READLINK" >&5
14236$as_echo "$READLINK" >&6; }
14237else
14238  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14239$as_echo "no" >&6; }
14240fi
14241
14242
14243          if test "x$READLINK" = x; then
14244            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14245          fi
14246        else
14247          # Otherwise we believe it is a complete path. Use it as it is.
14248          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READLINK=$tool_specified" >&5
14249$as_echo "$as_me: Will use user supplied tool READLINK=$tool_specified" >&6;}
14250          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READLINK" >&5
14251$as_echo_n "checking for READLINK... " >&6; }
14252          if test ! -x "$tool_specified"; then
14253            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14254$as_echo "not found" >&6; }
14255            as_fn_error $? "User supplied tool READLINK=$tool_specified does not exist or is not executable" "$LINENO" 5
14256          fi
14257          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14258$as_echo "$tool_specified" >&6; }
14259        fi
14260      fi
14261    fi
14262
14263  fi
14264
14265
14266
14267
14268  # Publish this variable in the help.
14269
14270
14271  if [ -z "${DF+x}" ]; then
14272    # The variable is not set by user, try to locate tool using the code snippet
14273    for ac_prog in df
14274do
14275  # Extract the first word of "$ac_prog", so it can be a program name with args.
14276set dummy $ac_prog; ac_word=$2
14277{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14278$as_echo_n "checking for $ac_word... " >&6; }
14279if ${ac_cv_path_DF+:} false; then :
14280  $as_echo_n "(cached) " >&6
14281else
14282  case $DF in
14283  [\\/]* | ?:[\\/]*)
14284  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14285  ;;
14286  *)
14287  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14288for as_dir in $PATH
14289do
14290  IFS=$as_save_IFS
14291  test -z "$as_dir" && as_dir=.
14292    for ac_exec_ext in '' $ac_executable_extensions; do
14293  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14294    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14295    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14296    break 2
14297  fi
14298done
14299  done
14300IFS=$as_save_IFS
14301
14302  ;;
14303esac
14304fi
14305DF=$ac_cv_path_DF
14306if test -n "$DF"; then
14307  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14308$as_echo "$DF" >&6; }
14309else
14310  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14311$as_echo "no" >&6; }
14312fi
14313
14314
14315  test -n "$DF" && break
14316done
14317
14318  else
14319    # The variable is set, but is it from the command line or the environment?
14320
14321    # Try to remove the string !DF! from our list.
14322    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DF!/}
14323    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14324      # If it failed, the variable was not from the command line. Ignore it,
14325      # but warn the user (except for BASH, which is always set by the calling BASH).
14326      if test "xDF" != xBASH; then
14327        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&5
14328$as_echo "$as_me: WARNING: Ignoring value of DF from the environment. Use command line variables instead." >&2;}
14329      fi
14330      # Try to locate tool using the code snippet
14331      for ac_prog in df
14332do
14333  # Extract the first word of "$ac_prog", so it can be a program name with args.
14334set dummy $ac_prog; ac_word=$2
14335{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14336$as_echo_n "checking for $ac_word... " >&6; }
14337if ${ac_cv_path_DF+:} false; then :
14338  $as_echo_n "(cached) " >&6
14339else
14340  case $DF in
14341  [\\/]* | ?:[\\/]*)
14342  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14343  ;;
14344  *)
14345  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14346for as_dir in $PATH
14347do
14348  IFS=$as_save_IFS
14349  test -z "$as_dir" && as_dir=.
14350    for ac_exec_ext in '' $ac_executable_extensions; do
14351  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14352    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14353    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14354    break 2
14355  fi
14356done
14357  done
14358IFS=$as_save_IFS
14359
14360  ;;
14361esac
14362fi
14363DF=$ac_cv_path_DF
14364if test -n "$DF"; then
14365  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14366$as_echo "$DF" >&6; }
14367else
14368  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14369$as_echo "no" >&6; }
14370fi
14371
14372
14373  test -n "$DF" && break
14374done
14375
14376    else
14377      # If it succeeded, then it was overridden by the user. We will use it
14378      # for the tool.
14379
14380      # First remove it from the list of overridden variables, so we can test
14381      # for unknown variables in the end.
14382      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14383
14384      # Check if we try to supply an empty value
14385      if test "x$DF" = x; then
14386        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DF= (no value)" >&5
14387$as_echo "$as_me: Setting user supplied tool DF= (no value)" >&6;}
14388        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14389$as_echo_n "checking for DF... " >&6; }
14390        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14391$as_echo "disabled" >&6; }
14392      else
14393        # Check if the provided tool contains a complete path.
14394        tool_specified="$DF"
14395        tool_basename="${tool_specified##*/}"
14396        if test "x$tool_basename" = "x$tool_specified"; then
14397          # A command without a complete path is provided, search $PATH.
14398          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DF=$tool_basename" >&5
14399$as_echo "$as_me: Will search for user supplied tool DF=$tool_basename" >&6;}
14400          # Extract the first word of "$tool_basename", so it can be a program name with args.
14401set dummy $tool_basename; ac_word=$2
14402{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14403$as_echo_n "checking for $ac_word... " >&6; }
14404if ${ac_cv_path_DF+:} false; then :
14405  $as_echo_n "(cached) " >&6
14406else
14407  case $DF in
14408  [\\/]* | ?:[\\/]*)
14409  ac_cv_path_DF="$DF" # Let the user override the test with a path.
14410  ;;
14411  *)
14412  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14413for as_dir in $PATH
14414do
14415  IFS=$as_save_IFS
14416  test -z "$as_dir" && as_dir=.
14417    for ac_exec_ext in '' $ac_executable_extensions; do
14418  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14419    ac_cv_path_DF="$as_dir/$ac_word$ac_exec_ext"
14420    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14421    break 2
14422  fi
14423done
14424  done
14425IFS=$as_save_IFS
14426
14427  ;;
14428esac
14429fi
14430DF=$ac_cv_path_DF
14431if test -n "$DF"; then
14432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DF" >&5
14433$as_echo "$DF" >&6; }
14434else
14435  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14436$as_echo "no" >&6; }
14437fi
14438
14439
14440          if test "x$DF" = x; then
14441            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14442          fi
14443        else
14444          # Otherwise we believe it is a complete path. Use it as it is.
14445          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DF=$tool_specified" >&5
14446$as_echo "$as_me: Will use user supplied tool DF=$tool_specified" >&6;}
14447          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DF" >&5
14448$as_echo_n "checking for DF... " >&6; }
14449          if test ! -x "$tool_specified"; then
14450            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14451$as_echo "not found" >&6; }
14452            as_fn_error $? "User supplied tool DF=$tool_specified does not exist or is not executable" "$LINENO" 5
14453          fi
14454          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14455$as_echo "$tool_specified" >&6; }
14456        fi
14457      fi
14458    fi
14459
14460  fi
14461
14462
14463
14464
14465  # Publish this variable in the help.
14466
14467
14468  if [ -z "${CPIO+x}" ]; then
14469    # The variable is not set by user, try to locate tool using the code snippet
14470    for ac_prog in cpio bsdcpio
14471do
14472  # Extract the first word of "$ac_prog", so it can be a program name with args.
14473set dummy $ac_prog; ac_word=$2
14474{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14475$as_echo_n "checking for $ac_word... " >&6; }
14476if ${ac_cv_path_CPIO+:} false; then :
14477  $as_echo_n "(cached) " >&6
14478else
14479  case $CPIO in
14480  [\\/]* | ?:[\\/]*)
14481  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14482  ;;
14483  *)
14484  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14485for as_dir in $PATH
14486do
14487  IFS=$as_save_IFS
14488  test -z "$as_dir" && as_dir=.
14489    for ac_exec_ext in '' $ac_executable_extensions; do
14490  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14491    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14492    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14493    break 2
14494  fi
14495done
14496  done
14497IFS=$as_save_IFS
14498
14499  ;;
14500esac
14501fi
14502CPIO=$ac_cv_path_CPIO
14503if test -n "$CPIO"; then
14504  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14505$as_echo "$CPIO" >&6; }
14506else
14507  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14508$as_echo "no" >&6; }
14509fi
14510
14511
14512  test -n "$CPIO" && break
14513done
14514
14515  else
14516    # The variable is set, but is it from the command line or the environment?
14517
14518    # Try to remove the string !CPIO! from our list.
14519    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CPIO!/}
14520    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14521      # If it failed, the variable was not from the command line. Ignore it,
14522      # but warn the user (except for BASH, which is always set by the calling BASH).
14523      if test "xCPIO" != xBASH; then
14524        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&5
14525$as_echo "$as_me: WARNING: Ignoring value of CPIO from the environment. Use command line variables instead." >&2;}
14526      fi
14527      # Try to locate tool using the code snippet
14528      for ac_prog in cpio bsdcpio
14529do
14530  # Extract the first word of "$ac_prog", so it can be a program name with args.
14531set dummy $ac_prog; ac_word=$2
14532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14533$as_echo_n "checking for $ac_word... " >&6; }
14534if ${ac_cv_path_CPIO+:} false; then :
14535  $as_echo_n "(cached) " >&6
14536else
14537  case $CPIO in
14538  [\\/]* | ?:[\\/]*)
14539  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14540  ;;
14541  *)
14542  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14543for as_dir in $PATH
14544do
14545  IFS=$as_save_IFS
14546  test -z "$as_dir" && as_dir=.
14547    for ac_exec_ext in '' $ac_executable_extensions; do
14548  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14549    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14550    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14551    break 2
14552  fi
14553done
14554  done
14555IFS=$as_save_IFS
14556
14557  ;;
14558esac
14559fi
14560CPIO=$ac_cv_path_CPIO
14561if test -n "$CPIO"; then
14562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14563$as_echo "$CPIO" >&6; }
14564else
14565  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14566$as_echo "no" >&6; }
14567fi
14568
14569
14570  test -n "$CPIO" && break
14571done
14572
14573    else
14574      # If it succeeded, then it was overridden by the user. We will use it
14575      # for the tool.
14576
14577      # First remove it from the list of overridden variables, so we can test
14578      # for unknown variables in the end.
14579      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14580
14581      # Check if we try to supply an empty value
14582      if test "x$CPIO" = x; then
14583        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CPIO= (no value)" >&5
14584$as_echo "$as_me: Setting user supplied tool CPIO= (no value)" >&6;}
14585        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14586$as_echo_n "checking for CPIO... " >&6; }
14587        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14588$as_echo "disabled" >&6; }
14589      else
14590        # Check if the provided tool contains a complete path.
14591        tool_specified="$CPIO"
14592        tool_basename="${tool_specified##*/}"
14593        if test "x$tool_basename" = "x$tool_specified"; then
14594          # A command without a complete path is provided, search $PATH.
14595          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CPIO=$tool_basename" >&5
14596$as_echo "$as_me: Will search for user supplied tool CPIO=$tool_basename" >&6;}
14597          # Extract the first word of "$tool_basename", so it can be a program name with args.
14598set dummy $tool_basename; ac_word=$2
14599{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14600$as_echo_n "checking for $ac_word... " >&6; }
14601if ${ac_cv_path_CPIO+:} false; then :
14602  $as_echo_n "(cached) " >&6
14603else
14604  case $CPIO in
14605  [\\/]* | ?:[\\/]*)
14606  ac_cv_path_CPIO="$CPIO" # Let the user override the test with a path.
14607  ;;
14608  *)
14609  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14610for as_dir in $PATH
14611do
14612  IFS=$as_save_IFS
14613  test -z "$as_dir" && as_dir=.
14614    for ac_exec_ext in '' $ac_executable_extensions; do
14615  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14616    ac_cv_path_CPIO="$as_dir/$ac_word$ac_exec_ext"
14617    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14618    break 2
14619  fi
14620done
14621  done
14622IFS=$as_save_IFS
14623
14624  ;;
14625esac
14626fi
14627CPIO=$ac_cv_path_CPIO
14628if test -n "$CPIO"; then
14629  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPIO" >&5
14630$as_echo "$CPIO" >&6; }
14631else
14632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14633$as_echo "no" >&6; }
14634fi
14635
14636
14637          if test "x$CPIO" = x; then
14638            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14639          fi
14640        else
14641          # Otherwise we believe it is a complete path. Use it as it is.
14642          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CPIO=$tool_specified" >&5
14643$as_echo "$as_me: Will use user supplied tool CPIO=$tool_specified" >&6;}
14644          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CPIO" >&5
14645$as_echo_n "checking for CPIO... " >&6; }
14646          if test ! -x "$tool_specified"; then
14647            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14648$as_echo "not found" >&6; }
14649            as_fn_error $? "User supplied tool CPIO=$tool_specified does not exist or is not executable" "$LINENO" 5
14650          fi
14651          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14652$as_echo "$tool_specified" >&6; }
14653        fi
14654      fi
14655    fi
14656
14657  fi
14658
14659
14660
14661
14662  # Publish this variable in the help.
14663
14664
14665  if [ -z "${NICE+x}" ]; then
14666    # The variable is not set by user, try to locate tool using the code snippet
14667    for ac_prog in nice
14668do
14669  # Extract the first word of "$ac_prog", so it can be a program name with args.
14670set dummy $ac_prog; ac_word=$2
14671{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14672$as_echo_n "checking for $ac_word... " >&6; }
14673if ${ac_cv_path_NICE+:} false; then :
14674  $as_echo_n "(cached) " >&6
14675else
14676  case $NICE in
14677  [\\/]* | ?:[\\/]*)
14678  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14679  ;;
14680  *)
14681  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14682for as_dir in $PATH
14683do
14684  IFS=$as_save_IFS
14685  test -z "$as_dir" && as_dir=.
14686    for ac_exec_ext in '' $ac_executable_extensions; do
14687  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14688    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14689    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14690    break 2
14691  fi
14692done
14693  done
14694IFS=$as_save_IFS
14695
14696  ;;
14697esac
14698fi
14699NICE=$ac_cv_path_NICE
14700if test -n "$NICE"; then
14701  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14702$as_echo "$NICE" >&6; }
14703else
14704  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14705$as_echo "no" >&6; }
14706fi
14707
14708
14709  test -n "$NICE" && break
14710done
14711
14712  else
14713    # The variable is set, but is it from the command line or the environment?
14714
14715    # Try to remove the string !NICE! from our list.
14716    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NICE!/}
14717    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
14718      # If it failed, the variable was not from the command line. Ignore it,
14719      # but warn the user (except for BASH, which is always set by the calling BASH).
14720      if test "xNICE" != xBASH; then
14721        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&5
14722$as_echo "$as_me: WARNING: Ignoring value of NICE from the environment. Use command line variables instead." >&2;}
14723      fi
14724      # Try to locate tool using the code snippet
14725      for ac_prog in nice
14726do
14727  # Extract the first word of "$ac_prog", so it can be a program name with args.
14728set dummy $ac_prog; ac_word=$2
14729{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14730$as_echo_n "checking for $ac_word... " >&6; }
14731if ${ac_cv_path_NICE+:} false; then :
14732  $as_echo_n "(cached) " >&6
14733else
14734  case $NICE in
14735  [\\/]* | ?:[\\/]*)
14736  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14737  ;;
14738  *)
14739  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14740for as_dir in $PATH
14741do
14742  IFS=$as_save_IFS
14743  test -z "$as_dir" && as_dir=.
14744    for ac_exec_ext in '' $ac_executable_extensions; do
14745  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14746    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14747    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14748    break 2
14749  fi
14750done
14751  done
14752IFS=$as_save_IFS
14753
14754  ;;
14755esac
14756fi
14757NICE=$ac_cv_path_NICE
14758if test -n "$NICE"; then
14759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14760$as_echo "$NICE" >&6; }
14761else
14762  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14763$as_echo "no" >&6; }
14764fi
14765
14766
14767  test -n "$NICE" && break
14768done
14769
14770    else
14771      # If it succeeded, then it was overridden by the user. We will use it
14772      # for the tool.
14773
14774      # First remove it from the list of overridden variables, so we can test
14775      # for unknown variables in the end.
14776      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
14777
14778      # Check if we try to supply an empty value
14779      if test "x$NICE" = x; then
14780        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NICE= (no value)" >&5
14781$as_echo "$as_me: Setting user supplied tool NICE= (no value)" >&6;}
14782        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14783$as_echo_n "checking for NICE... " >&6; }
14784        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
14785$as_echo "disabled" >&6; }
14786      else
14787        # Check if the provided tool contains a complete path.
14788        tool_specified="$NICE"
14789        tool_basename="${tool_specified##*/}"
14790        if test "x$tool_basename" = "x$tool_specified"; then
14791          # A command without a complete path is provided, search $PATH.
14792          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NICE=$tool_basename" >&5
14793$as_echo "$as_me: Will search for user supplied tool NICE=$tool_basename" >&6;}
14794          # Extract the first word of "$tool_basename", so it can be a program name with args.
14795set dummy $tool_basename; ac_word=$2
14796{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
14797$as_echo_n "checking for $ac_word... " >&6; }
14798if ${ac_cv_path_NICE+:} false; then :
14799  $as_echo_n "(cached) " >&6
14800else
14801  case $NICE in
14802  [\\/]* | ?:[\\/]*)
14803  ac_cv_path_NICE="$NICE" # Let the user override the test with a path.
14804  ;;
14805  *)
14806  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
14807for as_dir in $PATH
14808do
14809  IFS=$as_save_IFS
14810  test -z "$as_dir" && as_dir=.
14811    for ac_exec_ext in '' $ac_executable_extensions; do
14812  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
14813    ac_cv_path_NICE="$as_dir/$ac_word$ac_exec_ext"
14814    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
14815    break 2
14816  fi
14817done
14818  done
14819IFS=$as_save_IFS
14820
14821  ;;
14822esac
14823fi
14824NICE=$ac_cv_path_NICE
14825if test -n "$NICE"; then
14826  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NICE" >&5
14827$as_echo "$NICE" >&6; }
14828else
14829  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
14830$as_echo "no" >&6; }
14831fi
14832
14833
14834          if test "x$NICE" = x; then
14835            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
14836          fi
14837        else
14838          # Otherwise we believe it is a complete path. Use it as it is.
14839          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NICE=$tool_specified" >&5
14840$as_echo "$as_me: Will use user supplied tool NICE=$tool_specified" >&6;}
14841          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NICE" >&5
14842$as_echo_n "checking for NICE... " >&6; }
14843          if test ! -x "$tool_specified"; then
14844            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
14845$as_echo "not found" >&6; }
14846            as_fn_error $? "User supplied tool NICE=$tool_specified does not exist or is not executable" "$LINENO" 5
14847          fi
14848          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
14849$as_echo "$tool_specified" >&6; }
14850        fi
14851      fi
14852    fi
14853
14854  fi
14855
14856
14857
14858
14859# Now we can determine OpenJDK build and target platforms. This is required to
14860# have early on.
14861# Make sure we can run config.sub.
14862$SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 ||
14863  as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5
14864
14865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5
14866$as_echo_n "checking build system type... " >&6; }
14867if ${ac_cv_build+:} false; then :
14868  $as_echo_n "(cached) " >&6
14869else
14870  ac_build_alias=$build_alias
14871test "x$ac_build_alias" = x &&
14872  ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"`
14873test "x$ac_build_alias" = x &&
14874  as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5
14875ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` ||
14876  as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5
14877
14878fi
14879{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5
14880$as_echo "$ac_cv_build" >&6; }
14881case $ac_cv_build in
14882*-*-*) ;;
14883*) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;;
14884esac
14885build=$ac_cv_build
14886ac_save_IFS=$IFS; IFS='-'
14887set x $ac_cv_build
14888shift
14889build_cpu=$1
14890build_vendor=$2
14891shift; shift
14892# Remember, the first character of IFS is used to create $*,
14893# except with old shells:
14894build_os=$*
14895IFS=$ac_save_IFS
14896case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac
14897
14898
14899{ $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5
14900$as_echo_n "checking host system type... " >&6; }
14901if ${ac_cv_host+:} false; then :
14902  $as_echo_n "(cached) " >&6
14903else
14904  if test "x$host_alias" = x; then
14905  ac_cv_host=$ac_cv_build
14906else
14907  ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` ||
14908    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5
14909fi
14910
14911fi
14912{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5
14913$as_echo "$ac_cv_host" >&6; }
14914case $ac_cv_host in
14915*-*-*) ;;
14916*) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;;
14917esac
14918host=$ac_cv_host
14919ac_save_IFS=$IFS; IFS='-'
14920set x $ac_cv_host
14921shift
14922host_cpu=$1
14923host_vendor=$2
14924shift; shift
14925# Remember, the first character of IFS is used to create $*,
14926# except with old shells:
14927host_os=$*
14928IFS=$ac_save_IFS
14929case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac
14930
14931
14932{ $as_echo "$as_me:${as_lineno-$LINENO}: checking target system type" >&5
14933$as_echo_n "checking target system type... " >&6; }
14934if ${ac_cv_target+:} false; then :
14935  $as_echo_n "(cached) " >&6
14936else
14937  if test "x$target_alias" = x; then
14938  ac_cv_target=$ac_cv_host
14939else
14940  ac_cv_target=`$SHELL "$ac_aux_dir/config.sub" $target_alias` ||
14941    as_fn_error $? "$SHELL $ac_aux_dir/config.sub $target_alias failed" "$LINENO" 5
14942fi
14943
14944fi
14945{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_target" >&5
14946$as_echo "$ac_cv_target" >&6; }
14947case $ac_cv_target in
14948*-*-*) ;;
14949*) as_fn_error $? "invalid value of canonical target" "$LINENO" 5;;
14950esac
14951target=$ac_cv_target
14952ac_save_IFS=$IFS; IFS='-'
14953set x $ac_cv_target
14954shift
14955target_cpu=$1
14956target_vendor=$2
14957shift; shift
14958# Remember, the first character of IFS is used to create $*,
14959# except with old shells:
14960target_os=$*
14961IFS=$ac_save_IFS
14962case $target_os in *\ *) target_os=`echo "$target_os" | sed 's/ /-/g'`;; esac
14963
14964
14965# The aliases save the names the user supplied, while $host etc.
14966# will get canonicalized.
14967test -n "$target_alias" &&
14968  test "$program_prefix$program_suffix$program_transform_name" = \
14969    NONENONEs,x,x, &&
14970  program_prefix=${target_alias}-
14971
14972  # Figure out the build and target systems. # Note that in autoconf terminology, "build" is obvious, but "target"
14973  # is confusing; it assumes you are cross-compiling a cross-compiler (!)  and "target" is thus the target of the
14974  # product you're building. The target of this build is called "host". Since this is confusing to most people, we
14975  # have not adopted that system, but use "target" as the platform we are building for. In some places though we need
14976  # to use the configure naming style.
14977
14978
14979
14980
14981
14982  # Copy the autoconf trip/quadruplet verbatim to OPENJDK_TARGET_AUTOCONF_NAME
14983  # (from the autoconf "host") and OPENJDK_BUILD_AUTOCONF_NAME
14984  # Note that we might later on rewrite e.g. OPENJDK_TARGET_CPU due to reduced build,
14985  # but this will not change the value of OPENJDK_TARGET_AUTOCONF_NAME.
14986  OPENJDK_TARGET_AUTOCONF_NAME="$host"
14987  OPENJDK_BUILD_AUTOCONF_NAME="$build"
14988
14989
14990
14991  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
14992
14993  case "$build_os" in
14994    *linux*)
14995      VAR_OS=linux
14996      VAR_OS_TYPE=unix
14997      ;;
14998    *solaris*)
14999      VAR_OS=solaris
15000      VAR_OS_TYPE=unix
15001      ;;
15002    *darwin*)
15003      VAR_OS=macosx
15004      VAR_OS_TYPE=unix
15005      ;;
15006    *bsd*)
15007      VAR_OS=bsd
15008      VAR_OS_TYPE=unix
15009      ;;
15010    *cygwin*)
15011      VAR_OS=windows
15012      VAR_OS_ENV=windows.cygwin
15013      ;;
15014    *mingw*)
15015      VAR_OS=windows
15016      VAR_OS_ENV=windows.msys
15017      ;;
15018    *aix*)
15019      VAR_OS=aix
15020      VAR_OS_TYPE=unix
15021      ;;
15022    *)
15023      as_fn_error $? "unsupported operating system $build_os" "$LINENO" 5
15024      ;;
15025  esac
15026
15027
15028  # First argument is the cpu name from the trip/quad
15029  case "$build_cpu" in
15030    x86_64)
15031      VAR_CPU=x86_64
15032      VAR_CPU_ARCH=x86
15033      VAR_CPU_BITS=64
15034      VAR_CPU_ENDIAN=little
15035      ;;
15036    i?86)
15037      VAR_CPU=x86
15038      VAR_CPU_ARCH=x86
15039      VAR_CPU_BITS=32
15040      VAR_CPU_ENDIAN=little
15041      ;;
15042    arm*)
15043      VAR_CPU=arm
15044      VAR_CPU_ARCH=arm
15045      VAR_CPU_BITS=32
15046      VAR_CPU_ENDIAN=little
15047      ;;
15048    aarch64)
15049      VAR_CPU=aarch64
15050      VAR_CPU_ARCH=aarch64
15051      VAR_CPU_BITS=64
15052      VAR_CPU_ENDIAN=little
15053      ;;
15054    powerpc)
15055      VAR_CPU=ppc
15056      VAR_CPU_ARCH=ppc
15057      VAR_CPU_BITS=32
15058      VAR_CPU_ENDIAN=big
15059      ;;
15060    powerpc64)
15061      VAR_CPU=ppc64
15062      VAR_CPU_ARCH=ppc
15063      VAR_CPU_BITS=64
15064      VAR_CPU_ENDIAN=big
15065      ;;
15066    powerpc64le)
15067      VAR_CPU=ppc64le
15068      VAR_CPU_ARCH=ppc
15069      VAR_CPU_BITS=64
15070      VAR_CPU_ENDIAN=little
15071      ;;
15072    s390)
15073      VAR_CPU=s390
15074      VAR_CPU_ARCH=s390
15075      VAR_CPU_BITS=32
15076      VAR_CPU_ENDIAN=big
15077      ;;
15078    s390x)
15079      VAR_CPU=s390x
15080      VAR_CPU_ARCH=s390
15081      VAR_CPU_BITS=64
15082      VAR_CPU_ENDIAN=big
15083      ;;
15084    sparc)
15085      VAR_CPU=sparc
15086      VAR_CPU_ARCH=sparc
15087      VAR_CPU_BITS=32
15088      VAR_CPU_ENDIAN=big
15089      ;;
15090    sparcv9|sparc64)
15091      VAR_CPU=sparcv9
15092      VAR_CPU_ARCH=sparc
15093      VAR_CPU_BITS=64
15094      VAR_CPU_ENDIAN=big
15095      ;;
15096    *)
15097      as_fn_error $? "unsupported cpu $build_cpu" "$LINENO" 5
15098      ;;
15099  esac
15100
15101  # ..and setup our own variables. (Do this explicitely to facilitate searching)
15102  OPENJDK_BUILD_OS="$VAR_OS"
15103  if test "x$VAR_OS_TYPE" != x; then
15104    OPENJDK_BUILD_OS_TYPE="$VAR_OS_TYPE"
15105  else
15106    OPENJDK_BUILD_OS_TYPE="$VAR_OS"
15107  fi
15108  if test "x$VAR_OS_ENV" != x; then
15109    OPENJDK_BUILD_OS_ENV="$VAR_OS_ENV"
15110  else
15111    OPENJDK_BUILD_OS_ENV="$VAR_OS"
15112  fi
15113  OPENJDK_BUILD_CPU="$VAR_CPU"
15114  OPENJDK_BUILD_CPU_ARCH="$VAR_CPU_ARCH"
15115  OPENJDK_BUILD_CPU_BITS="$VAR_CPU_BITS"
15116  OPENJDK_BUILD_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15117
15118
15119
15120
15121
15122
15123
15124
15125  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-build os-cpu" >&5
15126$as_echo_n "checking openjdk-build os-cpu... " >&6; }
15127  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&5
15128$as_echo "$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" >&6; }
15129
15130  # Convert the autoconf OS/CPU value to our own data, into the VAR_OS/CPU variables.
15131
15132  case "$host_os" in
15133    *linux*)
15134      VAR_OS=linux
15135      VAR_OS_TYPE=unix
15136      ;;
15137    *solaris*)
15138      VAR_OS=solaris
15139      VAR_OS_TYPE=unix
15140      ;;
15141    *darwin*)
15142      VAR_OS=macosx
15143      VAR_OS_TYPE=unix
15144      ;;
15145    *bsd*)
15146      VAR_OS=bsd
15147      VAR_OS_TYPE=unix
15148      ;;
15149    *cygwin*)
15150      VAR_OS=windows
15151      VAR_OS_ENV=windows.cygwin
15152      ;;
15153    *mingw*)
15154      VAR_OS=windows
15155      VAR_OS_ENV=windows.msys
15156      ;;
15157    *aix*)
15158      VAR_OS=aix
15159      VAR_OS_TYPE=unix
15160      ;;
15161    *)
15162      as_fn_error $? "unsupported operating system $host_os" "$LINENO" 5
15163      ;;
15164  esac
15165
15166
15167  # First argument is the cpu name from the trip/quad
15168  case "$host_cpu" in
15169    x86_64)
15170      VAR_CPU=x86_64
15171      VAR_CPU_ARCH=x86
15172      VAR_CPU_BITS=64
15173      VAR_CPU_ENDIAN=little
15174      ;;
15175    i?86)
15176      VAR_CPU=x86
15177      VAR_CPU_ARCH=x86
15178      VAR_CPU_BITS=32
15179      VAR_CPU_ENDIAN=little
15180      ;;
15181    arm*)
15182      VAR_CPU=arm
15183      VAR_CPU_ARCH=arm
15184      VAR_CPU_BITS=32
15185      VAR_CPU_ENDIAN=little
15186      ;;
15187    aarch64)
15188      VAR_CPU=aarch64
15189      VAR_CPU_ARCH=aarch64
15190      VAR_CPU_BITS=64
15191      VAR_CPU_ENDIAN=little
15192      ;;
15193    powerpc)
15194      VAR_CPU=ppc
15195      VAR_CPU_ARCH=ppc
15196      VAR_CPU_BITS=32
15197      VAR_CPU_ENDIAN=big
15198      ;;
15199    powerpc64)
15200      VAR_CPU=ppc64
15201      VAR_CPU_ARCH=ppc
15202      VAR_CPU_BITS=64
15203      VAR_CPU_ENDIAN=big
15204      ;;
15205    powerpc64le)
15206      VAR_CPU=ppc64le
15207      VAR_CPU_ARCH=ppc
15208      VAR_CPU_BITS=64
15209      VAR_CPU_ENDIAN=little
15210      ;;
15211    s390)
15212      VAR_CPU=s390
15213      VAR_CPU_ARCH=s390
15214      VAR_CPU_BITS=32
15215      VAR_CPU_ENDIAN=big
15216      ;;
15217    s390x)
15218      VAR_CPU=s390x
15219      VAR_CPU_ARCH=s390
15220      VAR_CPU_BITS=64
15221      VAR_CPU_ENDIAN=big
15222      ;;
15223    sparc)
15224      VAR_CPU=sparc
15225      VAR_CPU_ARCH=sparc
15226      VAR_CPU_BITS=32
15227      VAR_CPU_ENDIAN=big
15228      ;;
15229    sparcv9|sparc64)
15230      VAR_CPU=sparcv9
15231      VAR_CPU_ARCH=sparc
15232      VAR_CPU_BITS=64
15233      VAR_CPU_ENDIAN=big
15234      ;;
15235    *)
15236      as_fn_error $? "unsupported cpu $host_cpu" "$LINENO" 5
15237      ;;
15238  esac
15239
15240  # ... and setup our own variables. (Do this explicitely to facilitate searching)
15241  OPENJDK_TARGET_OS="$VAR_OS"
15242  if test "x$VAR_OS_TYPE" != x; then
15243    OPENJDK_TARGET_OS_TYPE="$VAR_OS_TYPE"
15244  else
15245    OPENJDK_TARGET_OS_TYPE="$VAR_OS"
15246  fi
15247  if test "x$VAR_OS_ENV" != x; then
15248    OPENJDK_TARGET_OS_ENV="$VAR_OS_ENV"
15249  else
15250    OPENJDK_TARGET_OS_ENV="$VAR_OS"
15251  fi
15252  OPENJDK_TARGET_CPU="$VAR_CPU"
15253  OPENJDK_TARGET_CPU_ARCH="$VAR_CPU_ARCH"
15254  OPENJDK_TARGET_CPU_BITS="$VAR_CPU_BITS"
15255  OPENJDK_TARGET_CPU_ENDIAN="$VAR_CPU_ENDIAN"
15256
15257
15258
15259
15260
15261
15262
15263
15264  { $as_echo "$as_me:${as_lineno-$LINENO}: checking openjdk-target os-cpu" >&5
15265$as_echo_n "checking openjdk-target os-cpu... " >&6; }
15266  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&5
15267$as_echo "$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" >&6; }
15268
15269
15270
15271# Check whether --with-target-bits was given.
15272if test "${with_target_bits+set}" = set; then :
15273  withval=$with_target_bits;
15274fi
15275
15276
15277  # We have three types of compiles:
15278  # native  == normal compilation, target system == build system
15279  # cross   == traditional cross compilation, target system != build system; special toolchain needed
15280  # reduced == using native compilers, but with special flags (e.g. -m32) to produce 32-bit builds on 64-bit machines
15281  #
15282  if test "x$OPENJDK_BUILD_AUTOCONF_NAME" != "x$OPENJDK_TARGET_AUTOCONF_NAME"; then
15283    # We're doing a proper cross-compilation
15284    COMPILE_TYPE="cross"
15285  else
15286    COMPILE_TYPE="native"
15287  fi
15288
15289  if test "x$with_target_bits" != x; then
15290    if test "x$COMPILE_TYPE" = "xcross"; then
15291      as_fn_error $? "It is not possible to combine --with-target-bits=X and proper cross-compilation. Choose either." "$LINENO" 5
15292    fi
15293
15294    if test "x$with_target_bits" = x32 && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15295      # A reduced build is requested
15296      COMPILE_TYPE="reduced"
15297      OPENJDK_TARGET_CPU_BITS=32
15298      if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
15299        OPENJDK_TARGET_CPU=x86
15300      elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
15301        OPENJDK_TARGET_CPU=sparc
15302      else
15303        as_fn_error $? "Reduced build (--with-target-bits=32) is only supported on x86_64 and sparcv9" "$LINENO" 5
15304      fi
15305    elif test "x$with_target_bits" = x64 && test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
15306      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
15307    elif test "x$with_target_bits" = "x$OPENJDK_TARGET_CPU_BITS"; then
15308      { $as_echo "$as_me:${as_lineno-$LINENO}: --with-target-bits are set to build platform address size; argument has no meaning" >&5
15309$as_echo "$as_me: --with-target-bits are set to build platform address size; argument has no meaning" >&6;}
15310    else
15311      as_fn_error $? "--with-target-bits can only be 32 or 64, you specified $with_target_bits!" "$LINENO" 5
15312    fi
15313  fi
15314
15315
15316  { $as_echo "$as_me:${as_lineno-$LINENO}: checking compilation type" >&5
15317$as_echo_n "checking compilation type... " >&6; }
15318  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $COMPILE_TYPE" >&5
15319$as_echo "$COMPILE_TYPE" >&6; }
15320
15321
15322  if test "x$OPENJDK_TARGET_OS" = "xsolaris"; then
15323    REQUIRED_OS_NAME=SunOS
15324    REQUIRED_OS_VERSION=5.10
15325  fi
15326  if test "x$OPENJDK_TARGET_OS" = "xlinux"; then
15327    REQUIRED_OS_NAME=Linux
15328    REQUIRED_OS_VERSION=2.6
15329  fi
15330  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15331    REQUIRED_OS_NAME=Windows
15332    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
15333      REQUIRED_OS_VERSION=5.2
15334    else
15335      REQUIRED_OS_VERSION=5.1
15336    fi
15337  fi
15338  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
15339    REQUIRED_OS_NAME=Darwin
15340    REQUIRED_OS_VERSION=11.2
15341  fi
15342  if test "x$OPENJDK_TARGET_OS" = "xaix"; then
15343    REQUIRED_OS_NAME=AIX
15344    REQUIRED_OS_VERSION=7.1
15345  fi
15346
15347
15348
15349
15350
15351
15352  # Also store the legacy naming of the cpu.
15353  # Ie i586 and amd64 instead of x86 and x86_64
15354  OPENJDK_TARGET_CPU_LEGACY="$OPENJDK_TARGET_CPU"
15355  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15356    OPENJDK_TARGET_CPU_LEGACY="i586"
15357  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15358    # On all platforms except MacOSX replace x86_64 with amd64.
15359    OPENJDK_TARGET_CPU_LEGACY="amd64"
15360  fi
15361
15362
15363  # And the second legacy naming of the cpu.
15364  # Ie i386 and amd64 instead of x86 and x86_64.
15365  OPENJDK_TARGET_CPU_LEGACY_LIB="$OPENJDK_TARGET_CPU"
15366  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15367    OPENJDK_TARGET_CPU_LEGACY_LIB="i386"
15368  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15369    OPENJDK_TARGET_CPU_LEGACY_LIB="amd64"
15370  fi
15371
15372
15373  # This is the name of the cpu (but using i386 and amd64 instead of
15374  # x86 and x86_64, respectively), preceeded by a /, to be used when
15375  # locating libraries. On macosx, it's empty, though.
15376  OPENJDK_TARGET_CPU_LIBDIR="/$OPENJDK_TARGET_CPU_LEGACY_LIB"
15377  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15378    OPENJDK_TARGET_CPU_LIBDIR=""
15379  fi
15380
15381
15382  # OPENJDK_TARGET_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15383  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15384  # /usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libexample.so
15385  OPENJDK_TARGET_CPU_ISADIR=""
15386  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15387    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15388      OPENJDK_TARGET_CPU_ISADIR="/amd64"
15389    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15390      OPENJDK_TARGET_CPU_ISADIR="/sparcv9"
15391    fi
15392  fi
15393
15394
15395  # Setup OPENJDK_TARGET_CPU_OSARCH, which is used to set the os.arch Java system property
15396  OPENJDK_TARGET_CPU_OSARCH="$OPENJDK_TARGET_CPU"
15397  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$OPENJDK_TARGET_CPU" = xx86; then
15398    # On linux only, we replace x86 with i386.
15399    OPENJDK_TARGET_CPU_OSARCH="i386"
15400  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15401    # On all platforms except macosx, we replace x86_64 with amd64.
15402    OPENJDK_TARGET_CPU_OSARCH="amd64"
15403  fi
15404
15405
15406  OPENJDK_TARGET_CPU_JLI="$OPENJDK_TARGET_CPU"
15407  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15408    OPENJDK_TARGET_CPU_JLI="i386"
15409  elif test "x$OPENJDK_TARGET_OS" != xmacosx && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15410    # On all platforms except macosx, we replace x86_64 with amd64.
15411    OPENJDK_TARGET_CPU_JLI="amd64"
15412  fi
15413  # Now setup the -D flags for building libjli.
15414  OPENJDK_TARGET_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_TARGET_CPU_JLI\"'"
15415  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
15416    if test "x$OPENJDK_TARGET_CPU_ARCH" = xsparc; then
15417      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15418    elif test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
15419      OPENJDK_TARGET_CPU_JLI_CFLAGS="$OPENJDK_TARGET_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15420    fi
15421  fi
15422
15423
15424  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15425      OPENJDK_TARGET_OS_EXPORT_DIR=macosx
15426  else
15427      OPENJDK_TARGET_OS_EXPORT_DIR=${OPENJDK_TARGET_OS_TYPE}
15428  fi
15429
15430
15431  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
15432    A_LP64="LP64:="
15433    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15434    # unpack200.exe
15435    if test "x$OPENJDK_TARGET_OS" = xlinux || test "x$OPENJDK_TARGET_OS" = xmacosx; then
15436      OPENJDK_TARGET_ADD_LP64="-D_LP64=1"
15437    fi
15438  fi
15439  LP64=$A_LP64
15440
15441
15442  if test "x$COMPILE_TYPE" = "xcross"; then
15443    # FIXME: ... or should this include reduced builds..?
15444    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_TARGET_CPU_LEGACY"
15445  else
15446    DEFINE_CROSS_COMPILE_ARCH=""
15447  fi
15448
15449
15450  # Convert openjdk platform names to hotspot names
15451
15452  HOTSPOT_TARGET_OS=${OPENJDK_TARGET_OS}
15453  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
15454    HOTSPOT_TARGET_OS=bsd
15455  fi
15456
15457
15458  HOTSPOT_TARGET_OS_TYPE=${OPENJDK_TARGET_OS_TYPE}
15459  if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
15460    HOTSPOT_TARGET_OS_TYPE=posix
15461  fi
15462
15463
15464  HOTSPOT_TARGET_CPU=${OPENJDK_TARGET_CPU}
15465  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15466    HOTSPOT_TARGET_CPU=x86_32
15467  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15468    HOTSPOT_TARGET_CPU=sparc
15469  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15470    HOTSPOT_TARGET_CPU=ppc_64
15471  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15472    HOTSPOT_TARGET_CPU=ppc_64
15473  fi
15474
15475
15476  # This is identical with OPENJDK_*, but define anyway for consistency.
15477  HOTSPOT_TARGET_CPU_ARCH=${OPENJDK_TARGET_CPU_ARCH}
15478
15479
15480  # Setup HOTSPOT_TARGET_CPU_DEFINE
15481  if test "x$OPENJDK_TARGET_CPU" = xx86; then
15482    HOTSPOT_TARGET_CPU_DEFINE=IA32
15483  elif test "x$OPENJDK_TARGET_CPU" = xx86_64; then
15484    HOTSPOT_TARGET_CPU_DEFINE=AMD64
15485  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
15486    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15487  elif test "x$OPENJDK_TARGET_CPU" = xaarch64; then
15488    HOTSPOT_TARGET_CPU_DEFINE=AARCH64
15489  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
15490    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15491  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
15492    HOTSPOT_TARGET_CPU_DEFINE=PPC64
15493
15494  # The cpu defines below are for zero, we don't support them directly.
15495  elif test "x$OPENJDK_TARGET_CPU" = xsparc; then
15496    HOTSPOT_TARGET_CPU_DEFINE=SPARC
15497  elif test "x$OPENJDK_TARGET_CPU" = xppc; then
15498    HOTSPOT_TARGET_CPU_DEFINE=PPC32
15499  elif test "x$OPENJDK_TARGET_CPU" = xs390; then
15500    HOTSPOT_TARGET_CPU_DEFINE=S390
15501  elif test "x$OPENJDK_TARGET_CPU" = xs390x; then
15502    HOTSPOT_TARGET_CPU_DEFINE=S390
15503  fi
15504
15505
15506
15507
15508  # Also store the legacy naming of the cpu.
15509  # Ie i586 and amd64 instead of x86 and x86_64
15510  OPENJDK_BUILD_CPU_LEGACY="$OPENJDK_BUILD_CPU"
15511  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15512    OPENJDK_BUILD_CPU_LEGACY="i586"
15513  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15514    # On all platforms except MacOSX replace x86_64 with amd64.
15515    OPENJDK_BUILD_CPU_LEGACY="amd64"
15516  fi
15517
15518
15519  # And the second legacy naming of the cpu.
15520  # Ie i386 and amd64 instead of x86 and x86_64.
15521  OPENJDK_BUILD_CPU_LEGACY_LIB="$OPENJDK_BUILD_CPU"
15522  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15523    OPENJDK_BUILD_CPU_LEGACY_LIB="i386"
15524  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15525    OPENJDK_BUILD_CPU_LEGACY_LIB="amd64"
15526  fi
15527
15528
15529  # This is the name of the cpu (but using i386 and amd64 instead of
15530  # x86 and x86_64, respectively), preceeded by a /, to be used when
15531  # locating libraries. On macosx, it's empty, though.
15532  OPENJDK_BUILD_CPU_LIBDIR="/$OPENJDK_BUILD_CPU_LEGACY_LIB"
15533  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15534    OPENJDK_BUILD_CPU_LIBDIR=""
15535  fi
15536
15537
15538  # OPENJDK_BUILD_CPU_ISADIR is normally empty. On 64-bit Solaris systems, it is set to
15539  # /amd64 or /sparcv9. This string is appended to some library paths, like this:
15540  # /usr/lib${OPENJDK_BUILD_CPU_ISADIR}/libexample.so
15541  OPENJDK_BUILD_CPU_ISADIR=""
15542  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15543    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15544      OPENJDK_BUILD_CPU_ISADIR="/amd64"
15545    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15546      OPENJDK_BUILD_CPU_ISADIR="/sparcv9"
15547    fi
15548  fi
15549
15550
15551  # Setup OPENJDK_BUILD_CPU_OSARCH, which is used to set the os.arch Java system property
15552  OPENJDK_BUILD_CPU_OSARCH="$OPENJDK_BUILD_CPU"
15553  if test "x$OPENJDK_BUILD_OS" = xlinux && test "x$OPENJDK_BUILD_CPU" = xx86; then
15554    # On linux only, we replace x86 with i386.
15555    OPENJDK_BUILD_CPU_OSARCH="i386"
15556  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15557    # On all platforms except macosx, we replace x86_64 with amd64.
15558    OPENJDK_BUILD_CPU_OSARCH="amd64"
15559  fi
15560
15561
15562  OPENJDK_BUILD_CPU_JLI="$OPENJDK_BUILD_CPU"
15563  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15564    OPENJDK_BUILD_CPU_JLI="i386"
15565  elif test "x$OPENJDK_BUILD_OS" != xmacosx && test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15566    # On all platforms except macosx, we replace x86_64 with amd64.
15567    OPENJDK_BUILD_CPU_JLI="amd64"
15568  fi
15569  # Now setup the -D flags for building libjli.
15570  OPENJDK_BUILD_CPU_JLI_CFLAGS="-DLIBARCHNAME='\"$OPENJDK_BUILD_CPU_JLI\"'"
15571  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
15572    if test "x$OPENJDK_BUILD_CPU_ARCH" = xsparc; then
15573      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"sparc\"' -DLIBARCH64NAME='\"sparcv9\"'"
15574    elif test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
15575      OPENJDK_BUILD_CPU_JLI_CFLAGS="$OPENJDK_BUILD_CPU_JLI_CFLAGS -DLIBARCH32NAME='\"i386\"' -DLIBARCH64NAME='\"amd64\"'"
15576    fi
15577  fi
15578
15579
15580  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15581      OPENJDK_BUILD_OS_EXPORT_DIR=macosx
15582  else
15583      OPENJDK_BUILD_OS_EXPORT_DIR=${OPENJDK_BUILD_OS_TYPE}
15584  fi
15585
15586
15587  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
15588    A_LP64="LP64:="
15589    # -D_LP64=1 is only set on linux and mac. Setting on windows causes diff in
15590    # unpack200.exe
15591    if test "x$OPENJDK_BUILD_OS" = xlinux || test "x$OPENJDK_BUILD_OS" = xmacosx; then
15592      OPENJDK_BUILD_ADD_LP64="-D_LP64=1"
15593    fi
15594  fi
15595  LP64=$A_LP64
15596
15597
15598  if test "x$COMPILE_TYPE" = "xcross"; then
15599    # FIXME: ... or should this include reduced builds..?
15600    DEFINE_CROSS_COMPILE_ARCH="CROSS_COMPILE_ARCH:=$OPENJDK_BUILD_CPU_LEGACY"
15601  else
15602    DEFINE_CROSS_COMPILE_ARCH=""
15603  fi
15604
15605
15606  # Convert openjdk platform names to hotspot names
15607
15608  HOTSPOT_BUILD_OS=${OPENJDK_BUILD_OS}
15609  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
15610    HOTSPOT_BUILD_OS=bsd
15611  fi
15612
15613
15614  HOTSPOT_BUILD_OS_TYPE=${OPENJDK_BUILD_OS_TYPE}
15615  if test "x$OPENJDK_BUILD_OS_TYPE" = xunix; then
15616    HOTSPOT_BUILD_OS_TYPE=posix
15617  fi
15618
15619
15620  HOTSPOT_BUILD_CPU=${OPENJDK_BUILD_CPU}
15621  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15622    HOTSPOT_BUILD_CPU=x86_32
15623  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15624    HOTSPOT_BUILD_CPU=sparc
15625  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15626    HOTSPOT_BUILD_CPU=ppc_64
15627  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15628    HOTSPOT_BUILD_CPU=ppc_64
15629  fi
15630
15631
15632  # This is identical with OPENJDK_*, but define anyway for consistency.
15633  HOTSPOT_BUILD_CPU_ARCH=${OPENJDK_BUILD_CPU_ARCH}
15634
15635
15636  # Setup HOTSPOT_BUILD_CPU_DEFINE
15637  if test "x$OPENJDK_BUILD_CPU" = xx86; then
15638    HOTSPOT_BUILD_CPU_DEFINE=IA32
15639  elif test "x$OPENJDK_BUILD_CPU" = xx86_64; then
15640    HOTSPOT_BUILD_CPU_DEFINE=AMD64
15641  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
15642    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15643  elif test "x$OPENJDK_BUILD_CPU" = xaarch64; then
15644    HOTSPOT_BUILD_CPU_DEFINE=AARCH64
15645  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
15646    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15647  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
15648    HOTSPOT_BUILD_CPU_DEFINE=PPC64
15649
15650  # The cpu defines below are for zero, we don't support them directly.
15651  elif test "x$OPENJDK_BUILD_CPU" = xsparc; then
15652    HOTSPOT_BUILD_CPU_DEFINE=SPARC
15653  elif test "x$OPENJDK_BUILD_CPU" = xppc; then
15654    HOTSPOT_BUILD_CPU_DEFINE=PPC32
15655  elif test "x$OPENJDK_BUILD_CPU" = xs390; then
15656    HOTSPOT_BUILD_CPU_DEFINE=S390
15657  elif test "x$OPENJDK_BUILD_CPU" = xs390x; then
15658    HOTSPOT_BUILD_CPU_DEFINE=S390
15659  fi
15660
15661
15662
15663
15664  # ZERO_ARCHDEF is used to enable architecture-specific code.
15665  # This is used in legacy hotspot build.
15666  ZERO_ARCHDEF="$HOTSPOT_TARGET_CPU_DEFINE"
15667
15668
15669
15670
15671
15672# Continue setting up basic stuff. Most remaining code require fundamental tools.
15673
15674  # Save the current directory this script was started from
15675  CURDIR="$PWD"
15676
15677  # We might need to rewrite ORIGINAL_PATH, if it includes "#", to quote them
15678  # for make. We couldn't do this when we retrieved ORIGINAL_PATH, since SED
15679  # was not available at that time.
15680  REWRITTEN_PATH=`$ECHO "$ORIGINAL_PATH" | $SED -e 's/#/\\\\#/g'`
15681  if test "x$REWRITTEN_PATH" != "x$ORIGINAL_PATH"; then
15682    ORIGINAL_PATH="$REWRITTEN_PATH"
15683    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&5
15684$as_echo "$as_me: Rewriting ORIGINAL_PATH to $REWRITTEN_PATH" >&6;}
15685  fi
15686
15687  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
15688    PATH_SEP=";"
15689
15690  SRC_ROOT_LENGTH=`$THEPWDCMD -L|$WC -m`
15691  if test $SRC_ROOT_LENGTH -gt 100; then
15692    as_fn_error $? "Your base path is too long. It is $SRC_ROOT_LENGTH characters long, but only 100 is supported" "$LINENO" 5
15693  fi
15694
15695  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15696    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin release" >&5
15697$as_echo_n "checking cygwin release... " >&6; }
15698    CYGWIN_VERSION=`$UNAME -r`
15699    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_VERSION" >&5
15700$as_echo "$CYGWIN_VERSION" >&6; }
15701    WINDOWS_ENV_VENDOR='cygwin'
15702    WINDOWS_ENV_VERSION="$CYGWIN_VERSION"
15703
15704    CYGWIN_VERSION_OLD=`$ECHO $CYGWIN_VERSION | $GREP -e '^1\.0-6'`
15705    if test "x$CYGWIN_VERSION_OLD" != x; then
15706      { $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
15707$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;}
15708      as_fn_error $? "Cannot continue" "$LINENO" 5
15709    fi
15710    if test "x$CYGPATH" = x; then
15711      as_fn_error $? "Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path" "$LINENO" 5
15712    fi
15713    { $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
15714$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
15715    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15716    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
15717    # Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
15718    CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
15719    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5
15720$as_echo "$CYGWIN_ROOT_PATH" >&6; }
15721    WINDOWS_ENV_ROOT_PATH="$CYGWIN_ROOT_PATH"
15722    test_cygdrive_prefix=`$ECHO $CYGWIN_ROOT_PATH | $GREP ^/cygdrive/`
15723    if test "x$test_cygdrive_prefix" = x; then
15724      as_fn_error $? "Your cygdrive prefix is not /cygdrive. This is currently not supported. Change with mount -c." "$LINENO" 5
15725    fi
15726  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15727    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys release" >&5
15728$as_echo_n "checking msys release... " >&6; }
15729    MSYS_VERSION=`$UNAME -r`
15730    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_VERSION" >&5
15731$as_echo "$MSYS_VERSION" >&6; }
15732
15733    WINDOWS_ENV_VENDOR='msys'
15734    WINDOWS_ENV_VERSION="$MSYS_VERSION"
15735
15736    { $as_echo "$as_me:${as_lineno-$LINENO}: checking msys root directory as unix-style path" >&5
15737$as_echo_n "checking msys root directory as unix-style path... " >&6; }
15738    # The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
15739    MSYS_ROOT_PATH=`cd / ; cmd /c cd | grep ".*"`
15740
15741  windows_path="$MSYS_ROOT_PATH"
15742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15743    unix_path=`$CYGPATH -u "$windows_path"`
15744    MSYS_ROOT_PATH="$unix_path"
15745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15747    MSYS_ROOT_PATH="$unix_path"
15748  fi
15749
15750    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSYS_ROOT_PATH" >&5
15751$as_echo "$MSYS_ROOT_PATH" >&6; }
15752    WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"
15753  else
15754    as_fn_error $? "Unknown Windows environment. Neither cygwin nor msys was detected." "$LINENO" 5
15755  fi
15756
15757  # Test if windows or unix (cygwin/msys) find is first in path.
15758  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what kind of 'find' is first on the PATH" >&5
15759$as_echo_n "checking what kind of 'find' is first on the PATH... " >&6; }
15760  FIND_BINARY_OUTPUT=`find --version 2>&1`
15761  if test "x`echo $FIND_BINARY_OUTPUT | $GREP GNU`" != x; then
15762    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unix style" >&5
15763$as_echo "unix style" >&6; }
15764  elif test "x`echo $FIND_BINARY_OUTPUT | $GREP FIND`" != x; then
15765    { $as_echo "$as_me:${as_lineno-$LINENO}: result: Windows" >&5
15766$as_echo "Windows" >&6; }
15767    { $as_echo "$as_me:${as_lineno-$LINENO}: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&5
15768$as_echo "$as_me: Your path contains Windows tools (C:\Windows\system32) before your unix (cygwin or msys) tools." >&6;}
15769    { $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
15770$as_echo "$as_me: This will not work. Please correct and make sure /usr/bin (or similar) is first in path." >&6;}
15771    as_fn_error $? "Cannot continue" "$LINENO" 5
15772  else
15773    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
15774$as_echo "unknown" >&6; }
15775    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: It seems that your find utility is non-standard." >&5
15776$as_echo "$as_me: WARNING: It seems that your find utility is non-standard." >&2;}
15777  fi
15778
15779  else
15780    PATH_SEP=":"
15781  fi
15782
15783
15784  # We get the top-level directory from the supporting wrappers.
15785  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for top-level directory" >&5
15786$as_echo_n "checking for top-level directory... " >&6; }
15787  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOPDIR" >&5
15788$as_echo "$TOPDIR" >&6; }
15789
15790
15791  # Save the original version of TOPDIR for string comparisons
15792  ORIGINAL_TOPDIR="$TOPDIR"
15793
15794
15795  # We can only call BASIC_FIXUP_PATH after BASIC_CHECK_PATHS_WINDOWS.
15796
15797  # Only process if variable expands to non-empty
15798
15799  if test "x$CURDIR" != x; then
15800    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15801
15802  # Input might be given as Windows format, start by converting to
15803  # unix format.
15804  path="$CURDIR"
15805  new_path=`$CYGPATH -u "$path"`
15806
15807  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15808  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15809  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15810  # "foo.exe" is OK but "foo" is an error.
15811  #
15812  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15813  # It is also a way to make sure we got the proper file name for the real test later on.
15814  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15815  if test "x$test_shortpath" = x; then
15816    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15817$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15818    as_fn_error $? "Cannot locate the the path of CURDIR" "$LINENO" 5
15819  fi
15820
15821  # Call helper function which possibly converts this using DOS-style short mode.
15822  # If so, the updated path is stored in $new_path.
15823
15824  input_path="$new_path"
15825  # Check if we need to convert this using DOS-style short mode. If the path
15826  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15827  # take no chances and rewrite it.
15828  # Note: m4 eats our [], so we need to use [ and ] instead.
15829  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15830  if test "x$has_forbidden_chars" != x; then
15831    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15832    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15833    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15834    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15835      # Going to short mode and back again did indeed matter. Since short mode is
15836      # case insensitive, let's make it lowercase to improve readability.
15837      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15838      # Now convert it back to Unix-style (cygpath)
15839      input_path=`$CYGPATH -u "$shortmode_path"`
15840      new_path="$input_path"
15841    fi
15842  fi
15843
15844  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15845  if test "x$test_cygdrive_prefix" = x; then
15846    # As a simple fix, exclude /usr/bin since it's not a real path.
15847    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15848      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15849      # a path prefixed by /cygdrive for fixpath to work.
15850      new_path="$CYGWIN_ROOT_PATH$input_path"
15851    fi
15852  fi
15853
15854
15855  if test "x$path" != "x$new_path"; then
15856    CURDIR="$new_path"
15857    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15858$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15859  fi
15860
15861    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15862
15863  path="$CURDIR"
15864  has_colon=`$ECHO $path | $GREP ^.:`
15865  new_path="$path"
15866  if test "x$has_colon" = x; then
15867    # Not in mixed or Windows style, start by that.
15868    new_path=`cmd //c echo $path`
15869  fi
15870
15871
15872  input_path="$new_path"
15873  # Check if we need to convert this using DOS-style short mode. If the path
15874  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15875  # take no chances and rewrite it.
15876  # Note: m4 eats our [], so we need to use [ and ] instead.
15877  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
15878  if test "x$has_forbidden_chars" != x; then
15879    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15880    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15881  fi
15882
15883
15884  windows_path="$new_path"
15885  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15886    unix_path=`$CYGPATH -u "$windows_path"`
15887    new_path="$unix_path"
15888  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15889    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
15890    new_path="$unix_path"
15891  fi
15892
15893  if test "x$path" != "x$new_path"; then
15894    CURDIR="$new_path"
15895    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CURDIR to \"$new_path\"" >&5
15896$as_echo "$as_me: Rewriting CURDIR to \"$new_path\"" >&6;}
15897  fi
15898
15899  # Save the first 10 bytes of this path to the storage, so fixpath can work.
15900  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
15901
15902    else
15903      # We're on a unix platform. Hooray! :)
15904      path="$CURDIR"
15905      has_space=`$ECHO "$path" | $GREP " "`
15906      if test "x$has_space" != x; then
15907        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CURDIR, which resolves as \"$path\", is invalid." >&5
15908$as_echo "$as_me: The path of CURDIR, which resolves as \"$path\", is invalid." >&6;}
15909        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
15910      fi
15911
15912      # Use eval to expand a potential ~
15913      eval path="$path"
15914      if test ! -f "$path" && test ! -d "$path"; then
15915        as_fn_error $? "The path of CURDIR, which resolves as \"$path\", is not found." "$LINENO" 5
15916      fi
15917
15918      if test -d "$path"; then
15919        CURDIR="`cd "$path"; $THEPWDCMD -L`"
15920      else
15921        dir="`$DIRNAME "$path"`"
15922        base="`$BASENAME "$path"`"
15923        CURDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
15924      fi
15925    fi
15926  fi
15927
15928
15929  # Only process if variable expands to non-empty
15930
15931  if test "x$TOPDIR" != x; then
15932    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
15933
15934  # Input might be given as Windows format, start by converting to
15935  # unix format.
15936  path="$TOPDIR"
15937  new_path=`$CYGPATH -u "$path"`
15938
15939  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
15940  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
15941  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
15942  # "foo.exe" is OK but "foo" is an error.
15943  #
15944  # This test is therefore slightly more accurate than "test -f" to check for file precense.
15945  # It is also a way to make sure we got the proper file name for the real test later on.
15946  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
15947  if test "x$test_shortpath" = x; then
15948    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
15949$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
15950    as_fn_error $? "Cannot locate the the path of TOPDIR" "$LINENO" 5
15951  fi
15952
15953  # Call helper function which possibly converts this using DOS-style short mode.
15954  # If so, the updated path is stored in $new_path.
15955
15956  input_path="$new_path"
15957  # Check if we need to convert this using DOS-style short mode. If the path
15958  # contains just simple characters, use it. Otherwise (spaces, weird characters),
15959  # take no chances and rewrite it.
15960  # Note: m4 eats our [], so we need to use [ and ] instead.
15961  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
15962  if test "x$has_forbidden_chars" != x; then
15963    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
15964    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
15965    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
15966    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
15967      # Going to short mode and back again did indeed matter. Since short mode is
15968      # case insensitive, let's make it lowercase to improve readability.
15969      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
15970      # Now convert it back to Unix-style (cygpath)
15971      input_path=`$CYGPATH -u "$shortmode_path"`
15972      new_path="$input_path"
15973    fi
15974  fi
15975
15976  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
15977  if test "x$test_cygdrive_prefix" = x; then
15978    # As a simple fix, exclude /usr/bin since it's not a real path.
15979    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
15980      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
15981      # a path prefixed by /cygdrive for fixpath to work.
15982      new_path="$CYGWIN_ROOT_PATH$input_path"
15983    fi
15984  fi
15985
15986
15987  if test "x$path" != "x$new_path"; then
15988    TOPDIR="$new_path"
15989    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
15990$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
15991  fi
15992
15993    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
15994
15995  path="$TOPDIR"
15996  has_colon=`$ECHO $path | $GREP ^.:`
15997  new_path="$path"
15998  if test "x$has_colon" = x; then
15999    # Not in mixed or Windows style, start by that.
16000    new_path=`cmd //c echo $path`
16001  fi
16002
16003
16004  input_path="$new_path"
16005  # Check if we need to convert this using DOS-style short mode. If the path
16006  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16007  # take no chances and rewrite it.
16008  # Note: m4 eats our [], so we need to use [ and ] instead.
16009  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16010  if test "x$has_forbidden_chars" != x; then
16011    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16012    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16013  fi
16014
16015
16016  windows_path="$new_path"
16017  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16018    unix_path=`$CYGPATH -u "$windows_path"`
16019    new_path="$unix_path"
16020  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16021    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16022    new_path="$unix_path"
16023  fi
16024
16025  if test "x$path" != "x$new_path"; then
16026    TOPDIR="$new_path"
16027    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting TOPDIR to \"$new_path\"" >&5
16028$as_echo "$as_me: Rewriting TOPDIR to \"$new_path\"" >&6;}
16029  fi
16030
16031  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16032  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16033
16034    else
16035      # We're on a unix platform. Hooray! :)
16036      path="$TOPDIR"
16037      has_space=`$ECHO "$path" | $GREP " "`
16038      if test "x$has_space" != x; then
16039        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of TOPDIR, which resolves as \"$path\", is invalid." >&5
16040$as_echo "$as_me: The path of TOPDIR, which resolves as \"$path\", is invalid." >&6;}
16041        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16042      fi
16043
16044      # Use eval to expand a potential ~
16045      eval path="$path"
16046      if test ! -f "$path" && test ! -d "$path"; then
16047        as_fn_error $? "The path of TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
16048      fi
16049
16050      if test -d "$path"; then
16051        TOPDIR="`cd "$path"; $THEPWDCMD -L`"
16052      else
16053        dir="`$DIRNAME "$path"`"
16054        base="`$BASENAME "$path"`"
16055        TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
16056      fi
16057    fi
16058  fi
16059
16060  # SRC_ROOT is a traditional alias for TOPDIR.
16061  SRC_ROOT=$TOPDIR
16062
16063  # Calculate a canonical version of TOPDIR for string comparisons
16064  CANONICAL_TOPDIR=$TOPDIR
16065
16066  if test "x$OPENJDK_BUILD_OS" != xwindows; then
16067    # Follow a chain of symbolic links. Use readlink
16068    # where it exists, else fall back to horribly
16069    # complicated shell code.
16070    if test "x$READLINK_TESTED" != yes; then
16071      # On MacOSX there is a readlink tool with a different
16072      # purpose than the GNU readlink tool. Check the found readlink.
16073      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
16074      if test "x$ISGNU" = x; then
16075        # A readlink that we do not know how to use.
16076        # Are there other non-GNU readlinks out there?
16077        READLINK_TESTED=yes
16078        READLINK=
16079      fi
16080    fi
16081
16082    if test "x$READLINK" != x; then
16083      CANONICAL_TOPDIR=`$READLINK -f $CANONICAL_TOPDIR`
16084    else
16085      # Save the current directory for restoring afterwards
16086      STARTDIR=$PWD
16087      COUNTER=0
16088      sym_link_dir=`$DIRNAME $CANONICAL_TOPDIR`
16089      sym_link_file=`$BASENAME $CANONICAL_TOPDIR`
16090      cd $sym_link_dir
16091      # Use -P flag to resolve symlinks in directories.
16092      cd `$THEPWDCMD -P`
16093      sym_link_dir=`$THEPWDCMD -P`
16094      # Resolve file symlinks
16095      while test $COUNTER -lt 20; do
16096        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
16097        if test "x$ISLINK" == x; then
16098          # This is not a symbolic link! We are done!
16099          break
16100        fi
16101        # Again resolve directory symlinks since the target of the just found
16102        # link could be in a different directory
16103        cd `$DIRNAME $ISLINK`
16104        sym_link_dir=`$THEPWDCMD -P`
16105        sym_link_file=`$BASENAME $ISLINK`
16106        let COUNTER=COUNTER+1
16107      done
16108      cd $STARTDIR
16109      CANONICAL_TOPDIR=$sym_link_dir/$sym_link_file
16110    fi
16111  fi
16112
16113
16114
16115  # Locate the directory of this script.
16116  AUTOCONF_DIR=$TOPDIR/common/autoconf
16117
16118  # Setup username (for use in adhoc version strings etc)
16119  # Outer [ ] to quote m4.
16120   USERNAME=`$ECHO "$USER" | $TR -d -c '[a-z][A-Z][0-9]'`
16121
16122
16123
16124# Check if it's a pure open build or if custom sources are to be used.
16125
16126  # Check whether --enable-openjdk-only was given.
16127if test "${enable_openjdk_only+set}" = set; then :
16128  enableval=$enable_openjdk_only;
16129else
16130  enable_openjdk_only="no"
16131fi
16132
16133
16134  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for presence of closed sources" >&5
16135$as_echo_n "checking for presence of closed sources... " >&6; }
16136  if test -d "$SRC_ROOT/jdk/src/closed"; then
16137    CLOSED_SOURCE_PRESENT=yes
16138  else
16139    CLOSED_SOURCE_PRESENT=no
16140  fi
16141  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CLOSED_SOURCE_PRESENT" >&5
16142$as_echo "$CLOSED_SOURCE_PRESENT" >&6; }
16143
16144  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if closed source is suppressed (openjdk-only)" >&5
16145$as_echo_n "checking if closed source is suppressed (openjdk-only)... " >&6; }
16146  SUPPRESS_CLOSED_SOURCE="$enable_openjdk_only"
16147  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SUPPRESS_CLOSED_SOURCE" >&5
16148$as_echo "$SUPPRESS_CLOSED_SOURCE" >&6; }
16149
16150  if test "x$CLOSED_SOURCE_PRESENT" = xno; then
16151    OPENJDK=true
16152    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16153      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&5
16154$as_echo "$as_me: WARNING: No closed source present, --enable-openjdk-only makes no sense" >&2;}
16155    fi
16156  else
16157    if test "x$SUPPRESS_CLOSED_SOURCE" = "xyes"; then
16158      OPENJDK=true
16159    else
16160      OPENJDK=false
16161    fi
16162  fi
16163
16164  if test "x$OPENJDK" = "xtrue"; then
16165    SET_OPENJDK="OPENJDK=true"
16166  fi
16167
16168
16169
16170  # custom-make-dir is deprecated. Please use your custom-hook.m4 to override
16171  # the IncludeCustomExtension macro.
16172
16173
16174# Check whether --with-custom-make-dir was given.
16175if test "${with_custom_make_dir+set}" = set; then :
16176  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
16177$as_echo "$as_me: WARNING: Option --with-custom-make-dir is deprecated and will be ignored." >&2;}
16178fi
16179
16180
16181
16182
16183# These are needed to be able to create a configuration name (and thus the output directory)
16184
16185  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variant of the JDK to build" >&5
16186$as_echo_n "checking which variant of the JDK to build... " >&6; }
16187
16188# Check whether --with-jdk-variant was given.
16189if test "${with_jdk_variant+set}" = set; then :
16190  withval=$with_jdk_variant;
16191fi
16192
16193
16194  if test "x$with_jdk_variant" = xnormal || test "x$with_jdk_variant" = x; then
16195    JDK_VARIANT="normal"
16196  else
16197    as_fn_error $? "The available JDK variants are: normal" "$LINENO" 5
16198  fi
16199
16200
16201
16202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JDK_VARIANT" >&5
16203$as_echo "$JDK_VARIANT" >&6; }
16204
16205
16206  DEBUG_LEVEL="release"
16207  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which debug level to use" >&5
16208$as_echo_n "checking which debug level to use... " >&6; }
16209  # Check whether --enable-debug was given.
16210if test "${enable_debug+set}" = set; then :
16211  enableval=$enable_debug;
16212        ENABLE_DEBUG="${enableval}"
16213        DEBUG_LEVEL="fastdebug"
16214
16215else
16216  ENABLE_DEBUG="no"
16217fi
16218
16219
16220
16221# Check whether --with-debug-level was given.
16222if test "${with_debug_level+set}" = set; then :
16223  withval=$with_debug_level;
16224        DEBUG_LEVEL="${withval}"
16225        if test "x$ENABLE_DEBUG" = xyes; then
16226          as_fn_error $? "You cannot use both --enable-debug and --with-debug-level at the same time." "$LINENO" 5
16227        fi
16228
16229fi
16230
16231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEBUG_LEVEL" >&5
16232$as_echo "$DEBUG_LEVEL" >&6; }
16233
16234  if test "x$DEBUG_LEVEL" != xrelease && \
16235      test "x$DEBUG_LEVEL" != xoptimized && \
16236      test "x$DEBUG_LEVEL" != xfastdebug && \
16237      test "x$DEBUG_LEVEL" != xslowdebug; then
16238    as_fn_error $? "Allowed debug levels are: release, fastdebug, slowdebug and optimized" "$LINENO" 5
16239  fi
16240
16241  # Translate DEBUG_LEVEL to debug level used by Hotspot
16242  HOTSPOT_DEBUG_LEVEL="$DEBUG_LEVEL"
16243  if test "x$DEBUG_LEVEL" = xrelease; then
16244    HOTSPOT_DEBUG_LEVEL="product"
16245  elif test "x$DEBUG_LEVEL" = xslowdebug; then
16246    HOTSPOT_DEBUG_LEVEL="debug"
16247  fi
16248
16249  if test "x$DEBUG_LEVEL" = xoptimized; then
16250    # The debug level 'optimized' is a little special because it is currently only
16251    # applicable to the HotSpot build where it means to build a completely
16252    # optimized version of the VM without any debugging code (like for the
16253    # 'release' debug level which is called 'product' in the HotSpot build) but
16254    # with the exception that it can contain additional code which is otherwise
16255    # protected by '#ifndef PRODUCT' macros. These 'optimized' builds are used to
16256    # test new and/or experimental features which are not intended for customer
16257    # shipment. Because these new features need to be tested and benchmarked in
16258    # real world scenarios, we want to build the containing JDK at the 'release'
16259    # debug level.
16260    DEBUG_LEVEL="release"
16261  fi
16262
16263
16264
16265
16266
16267
16268# Check whether --with-jvm-variants was given.
16269if test "${with_jvm_variants+set}" = set; then :
16270  withval=$with_jvm_variants;
16271fi
16272
16273
16274  if test "x$with_jvm_variants" = x; then
16275    with_jvm_variants="server"
16276  fi
16277  JVM_VARIANTS_OPT="$with_jvm_variants"
16278
16279  # Has the user listed more than one variant?
16280  # Additional [] needed to keep m4 from mangling shell constructs.
16281  if  [[ "$JVM_VARIANTS_OPT" =~ "," ]] ; then
16282    BUILDING_MULTIPLE_JVM_VARIANTS=true
16283  else
16284    BUILDING_MULTIPLE_JVM_VARIANTS=false
16285  fi
16286  # Replace the commas with AND for use in the build directory name.
16287  JVM_VARIANTS_WITH_AND=`$ECHO "$JVM_VARIANTS_OPT" | $SED -e 's/,/AND/g'`
16288
16289  { $as_echo "$as_me:${as_lineno-$LINENO}: checking which variants of the JVM to build" >&5
16290$as_echo_n "checking which variants of the JVM to build... " >&6; }
16291  # JVM_VARIANTS is a space-separated list.
16292  # Also use minimal, not minimal1 (which is kept for backwards compatibility).
16293  JVM_VARIANTS=`$ECHO $JVM_VARIANTS_OPT | $SED -e 's/,/ /g' -e 's/minimal1/minimal/'`
16294  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_VARIANTS" >&5
16295$as_echo "$JVM_VARIANTS" >&6; }
16296
16297  # Check that the selected variants are valid
16298
16299  # grep filter function inspired by a comment to http://stackoverflow.com/a/1617326
16300  INVALID_VARIANTS=`$GREP -Fvx "${VALID_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16301  if test "x$INVALID_VARIANTS" != x; then
16302    { $as_echo "$as_me:${as_lineno-$LINENO}: Unknown variant(s) specified: $INVALID_VARIANTS" >&5
16303$as_echo "$as_me: Unknown variant(s) specified: $INVALID_VARIANTS" >&6;}
16304    as_fn_error $? "The available JVM variants are: $VALID_JVM_VARIANTS" "$LINENO" 5
16305  fi
16306
16307  # All "special" variants share the same output directory ("server")
16308  VALID_MULTIPLE_JVM_VARIANTS="server client minimal"
16309  INVALID_MULTIPLE_VARIANTS=`$GREP -Fvx "${VALID_MULTIPLE_JVM_VARIANTS// /$'\n'}" <<< "${JVM_VARIANTS// /$'\n'}"`
16310  if  test "x$INVALID_MULTIPLE_VARIANTS" != x && test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = xtrue; then
16311    as_fn_error $? "You cannot build multiple variants with anything else than $VALID_MULTIPLE_JVM_VARIANTS." "$LINENO" 5
16312  fi
16313
16314
16315
16316
16317  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
16318    # zero behaves as a platform and rewrites these values. This is really weird. :(
16319    # We are guaranteed that we do not build any other variants when building zero.
16320    HOTSPOT_TARGET_CPU=zero
16321    HOTSPOT_TARGET_CPU_ARCH=zero
16322  fi
16323
16324
16325# With basic setup done, call the custom early hook.
16326
16327
16328# Check if we have devkits, extra paths or sysroot set.
16329
16330
16331# Check whether --with-devkit was given.
16332if test "${with_devkit+set}" = set; then :
16333  withval=$with_devkit;
16334
16335  # Only process if variable expands to non-empty
16336
16337  if test "x$with_devkit" != x; then
16338    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16339
16340  # Input might be given as Windows format, start by converting to
16341  # unix format.
16342  path="$with_devkit"
16343  new_path=`$CYGPATH -u "$path"`
16344
16345  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16346  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16347  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16348  # "foo.exe" is OK but "foo" is an error.
16349  #
16350  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16351  # It is also a way to make sure we got the proper file name for the real test later on.
16352  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16353  if test "x$test_shortpath" = x; then
16354    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16355$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16356    as_fn_error $? "Cannot locate the the path of with_devkit" "$LINENO" 5
16357  fi
16358
16359  # Call helper function which possibly converts this using DOS-style short mode.
16360  # If so, the updated path is stored in $new_path.
16361
16362  input_path="$new_path"
16363  # Check if we need to convert this using DOS-style short mode. If the path
16364  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16365  # take no chances and rewrite it.
16366  # Note: m4 eats our [], so we need to use [ and ] instead.
16367  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16368  if test "x$has_forbidden_chars" != x; then
16369    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16370    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16371    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16372    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16373      # Going to short mode and back again did indeed matter. Since short mode is
16374      # case insensitive, let's make it lowercase to improve readability.
16375      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16376      # Now convert it back to Unix-style (cygpath)
16377      input_path=`$CYGPATH -u "$shortmode_path"`
16378      new_path="$input_path"
16379    fi
16380  fi
16381
16382  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16383  if test "x$test_cygdrive_prefix" = x; then
16384    # As a simple fix, exclude /usr/bin since it's not a real path.
16385    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16386      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16387      # a path prefixed by /cygdrive for fixpath to work.
16388      new_path="$CYGWIN_ROOT_PATH$input_path"
16389    fi
16390  fi
16391
16392
16393  if test "x$path" != "x$new_path"; then
16394    with_devkit="$new_path"
16395    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16396$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16397  fi
16398
16399    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16400
16401  path="$with_devkit"
16402  has_colon=`$ECHO $path | $GREP ^.:`
16403  new_path="$path"
16404  if test "x$has_colon" = x; then
16405    # Not in mixed or Windows style, start by that.
16406    new_path=`cmd //c echo $path`
16407  fi
16408
16409
16410  input_path="$new_path"
16411  # Check if we need to convert this using DOS-style short mode. If the path
16412  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16413  # take no chances and rewrite it.
16414  # Note: m4 eats our [], so we need to use [ and ] instead.
16415  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16416  if test "x$has_forbidden_chars" != x; then
16417    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16418    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16419  fi
16420
16421
16422  windows_path="$new_path"
16423  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16424    unix_path=`$CYGPATH -u "$windows_path"`
16425    new_path="$unix_path"
16426  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16427    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16428    new_path="$unix_path"
16429  fi
16430
16431  if test "x$path" != "x$new_path"; then
16432    with_devkit="$new_path"
16433    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_devkit to \"$new_path\"" >&5
16434$as_echo "$as_me: Rewriting with_devkit to \"$new_path\"" >&6;}
16435  fi
16436
16437  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16438  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16439
16440    else
16441      # We're on a unix platform. Hooray! :)
16442      path="$with_devkit"
16443      has_space=`$ECHO "$path" | $GREP " "`
16444      if test "x$has_space" != x; then
16445        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_devkit, which resolves as \"$path\", is invalid." >&5
16446$as_echo "$as_me: The path of with_devkit, which resolves as \"$path\", is invalid." >&6;}
16447        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16448      fi
16449
16450      # Use eval to expand a potential ~
16451      eval path="$path"
16452      if test ! -f "$path" && test ! -d "$path"; then
16453        as_fn_error $? "The path of with_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
16454      fi
16455
16456      if test -d "$path"; then
16457        with_devkit="`cd "$path"; $THEPWDCMD -L`"
16458      else
16459        dir="`$DIRNAME "$path"`"
16460        base="`$BASENAME "$path"`"
16461        with_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
16462      fi
16463    fi
16464  fi
16465
16466        DEVKIT_ROOT="$with_devkit"
16467        # Check for a meta data info file in the root of the devkit
16468        if test -f "$DEVKIT_ROOT/devkit.info"; then
16469          . $DEVKIT_ROOT/devkit.info
16470          # This potentially sets the following:
16471          # A descriptive name of the devkit
16472
16473  if test "x$DEVKIT_NAME" = x; then
16474    eval DEVKIT_NAME="\${DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
16475  fi
16476
16477          # Corresponds to --with-extra-path
16478
16479  if test "x$DEVKIT_EXTRA_PATH" = x; then
16480    eval DEVKIT_EXTRA_PATH="\${DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
16481  fi
16482
16483          # Corresponds to --with-toolchain-path
16484
16485  if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16486    eval DEVKIT_TOOLCHAIN_PATH="\${DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
16487  fi
16488
16489          # Corresponds to --with-sysroot
16490
16491  if test "x$DEVKIT_SYSROOT" = x; then
16492    eval DEVKIT_SYSROOT="\${DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
16493  fi
16494
16495
16496          # Identifies the Visual Studio version in the devkit
16497
16498  if test "x$DEVKIT_VS_VERSION" = x; then
16499    eval DEVKIT_VS_VERSION="\${DEVKIT_VS_VERSION_${OPENJDK_TARGET_CPU}}"
16500  fi
16501
16502          # The Visual Studio include environment variable
16503
16504  if test "x$DEVKIT_VS_INCLUDE" = x; then
16505    eval DEVKIT_VS_INCLUDE="\${DEVKIT_VS_INCLUDE_${OPENJDK_TARGET_CPU}}"
16506  fi
16507
16508          # The Visual Studio lib environment variable
16509
16510  if test "x$DEVKIT_VS_LIB" = x; then
16511    eval DEVKIT_VS_LIB="\${DEVKIT_VS_LIB_${OPENJDK_TARGET_CPU}}"
16512  fi
16513
16514          # Corresponds to --with-msvcr-dll
16515
16516  if test "x$DEVKIT_MSVCR_DLL" = x; then
16517    eval DEVKIT_MSVCR_DLL="\${DEVKIT_MSVCR_DLL_${OPENJDK_TARGET_CPU}}"
16518  fi
16519
16520          # Corresponds to --with-msvcp-dll
16521
16522  if test "x$DEVKIT_MSVCP_DLL" = x; then
16523    eval DEVKIT_MSVCP_DLL="\${DEVKIT_MSVCP_DLL_${OPENJDK_TARGET_CPU}}"
16524  fi
16525
16526        fi
16527
16528        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for devkit" >&5
16529$as_echo_n "checking for devkit... " >&6; }
16530        if test "x$DEVKIT_NAME" != x; then
16531          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_NAME in $DEVKIT_ROOT" >&5
16532$as_echo "$DEVKIT_NAME in $DEVKIT_ROOT" >&6; }
16533        else
16534          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DEVKIT_ROOT" >&5
16535$as_echo "$DEVKIT_ROOT" >&6; }
16536        fi
16537
16538
16539  if test "x$DEVKIT_EXTRA_PATH" != x; then
16540    if test "x$EXTRA_PATH" = x; then
16541      EXTRA_PATH="$DEVKIT_EXTRA_PATH"
16542    else
16543      EXTRA_PATH="$DEVKIT_EXTRA_PATH:$EXTRA_PATH"
16544    fi
16545  fi
16546
16547
16548        # Fallback default of just /bin if DEVKIT_PATH is not defined
16549        if test "x$DEVKIT_TOOLCHAIN_PATH" = x; then
16550          DEVKIT_TOOLCHAIN_PATH="$DEVKIT_ROOT/bin"
16551        fi
16552
16553  if test "x$DEVKIT_TOOLCHAIN_PATH" != x; then
16554    if test "x$TOOLCHAIN_PATH" = x; then
16555      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH"
16556    else
16557      TOOLCHAIN_PATH="$DEVKIT_TOOLCHAIN_PATH:$TOOLCHAIN_PATH"
16558    fi
16559  fi
16560
16561
16562        # If DEVKIT_SYSROOT is set, use that, otherwise try a couple of known
16563        # places for backwards compatiblity.
16564        if test "x$DEVKIT_SYSROOT" != x; then
16565          SYSROOT="$DEVKIT_SYSROOT"
16566        elif test -d "$DEVKIT_ROOT/$host_alias/libc"; then
16567          SYSROOT="$DEVKIT_ROOT/$host_alias/libc"
16568        elif test -d "$DEVKIT_ROOT/$host/sys-root"; then
16569          SYSROOT="$DEVKIT_ROOT/$host/sys-root"
16570        fi
16571
16572
16573fi
16574
16575
16576  # You can force the sysroot if the sysroot encoded into the compiler tools
16577  # is not correct.
16578
16579# Check whether --with-sys-root was given.
16580if test "${with_sys_root+set}" = set; then :
16581  withval=$with_sys_root; SYSROOT=$with_sys_root
16582
16583fi
16584
16585
16586
16587# Check whether --with-sysroot was given.
16588if test "${with_sysroot+set}" = set; then :
16589  withval=$with_sysroot; SYSROOT=$with_sysroot
16590
16591fi
16592
16593
16594
16595# Check whether --with-tools-dir was given.
16596if test "${with_tools_dir+set}" = set; then :
16597  withval=$with_tools_dir;
16598  if test "x$with_tools_dir" != x; then
16599    if test "x$TOOLCHAIN_PATH" = x; then
16600      TOOLCHAIN_PATH="$with_tools_dir"
16601    else
16602      TOOLCHAIN_PATH="$with_tools_dir:$TOOLCHAIN_PATH"
16603    fi
16604  fi
16605
16606
16607fi
16608
16609
16610
16611# Check whether --with-toolchain-path was given.
16612if test "${with_toolchain_path+set}" = set; then :
16613  withval=$with_toolchain_path;
16614  if test "x$with_toolchain_path" != x; then
16615    if test "x$TOOLCHAIN_PATH" = x; then
16616      TOOLCHAIN_PATH="$with_toolchain_path"
16617    else
16618      TOOLCHAIN_PATH="$with_toolchain_path:$TOOLCHAIN_PATH"
16619    fi
16620  fi
16621
16622
16623fi
16624
16625
16626
16627# Check whether --with-extra-path was given.
16628if test "${with_extra_path+set}" = set; then :
16629  withval=$with_extra_path;
16630  if test "x$with_extra_path" != x; then
16631    if test "x$EXTRA_PATH" = x; then
16632      EXTRA_PATH="$with_extra_path"
16633    else
16634      EXTRA_PATH="$with_extra_path:$EXTRA_PATH"
16635    fi
16636  fi
16637
16638
16639fi
16640
16641
16642  if test "x$OPENJDK_BUILD_OS" = "xmacosx"; then
16643    # If a devkit has been supplied, find xcodebuild in the toolchain_path.
16644    # If not, detect if Xcode is installed by running xcodebuild -version
16645    # if no Xcode installed, xcodebuild exits with 1
16646    # if Xcode is installed, even if xcode-select is misconfigured, then it exits with 0
16647    if test "x$DEVKIT_ROOT" != x || /usr/bin/xcodebuild -version >/dev/null 2>&1; then
16648      # We need to use xcodebuild in the toolchain dir provided by the user, this will
16649      # fall back on the stub binary in /usr/bin/xcodebuild
16650      # Extract the first word of "xcodebuild", so it can be a program name with args.
16651set dummy xcodebuild; ac_word=$2
16652{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
16653$as_echo_n "checking for $ac_word... " >&6; }
16654if ${ac_cv_path_XCODEBUILD+:} false; then :
16655  $as_echo_n "(cached) " >&6
16656else
16657  case $XCODEBUILD in
16658  [\\/]* | ?:[\\/]*)
16659  ac_cv_path_XCODEBUILD="$XCODEBUILD" # Let the user override the test with a path.
16660  ;;
16661  *)
16662  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
16663for as_dir in $TOOLCHAIN_PATH
16664do
16665  IFS=$as_save_IFS
16666  test -z "$as_dir" && as_dir=.
16667    for ac_exec_ext in '' $ac_executable_extensions; do
16668  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
16669    ac_cv_path_XCODEBUILD="$as_dir/$ac_word$ac_exec_ext"
16670    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
16671    break 2
16672  fi
16673done
16674  done
16675IFS=$as_save_IFS
16676
16677  test -z "$ac_cv_path_XCODEBUILD" && ac_cv_path_XCODEBUILD="/usr/bin/xcodebuild"
16678  ;;
16679esac
16680fi
16681XCODEBUILD=$ac_cv_path_XCODEBUILD
16682if test -n "$XCODEBUILD"; then
16683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XCODEBUILD" >&5
16684$as_echo "$XCODEBUILD" >&6; }
16685else
16686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
16687$as_echo "no" >&6; }
16688fi
16689
16690
16691    else
16692      # this should result in SYSROOT being empty, unless --with-sysroot is provided
16693      # when only the command line tools are installed there are no SDKs, so headers
16694      # are copied into the system frameworks
16695      XCODEBUILD=
16696
16697    fi
16698
16699    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sdk name" >&5
16700$as_echo_n "checking for sdk name... " >&6; }
16701
16702# Check whether --with-sdk-name was given.
16703if test "${with_sdk_name+set}" = set; then :
16704  withval=$with_sdk_name; SDKNAME=$with_sdk_name
16705
16706fi
16707
16708    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SDKNAME" >&5
16709$as_echo "$SDKNAME" >&6; }
16710
16711    # if toolchain path is specified then don't rely on system headers, they may not compile
16712    HAVE_SYSTEM_FRAMEWORK_HEADERS=0
16713    test -z "$TOOLCHAIN_PATH" && \
16714      HAVE_SYSTEM_FRAMEWORK_HEADERS=`test ! -f /System/Library/Frameworks/Foundation.framework/Headers/Foundation.h; echo $?`
16715
16716    if test -z "$SYSROOT"; then
16717      if test -n "$XCODEBUILD"; then
16718        # if we don't have system headers, use default SDK name (last resort)
16719        if test -z "$SDKNAME" -a $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16720          SDKNAME=${SDKNAME:-macosx}
16721        fi
16722
16723        if test -n "$SDKNAME"; then
16724          # Call xcodebuild to determine SYSROOT
16725          SYSROOT=`"$XCODEBUILD" -sdk $SDKNAME -version | grep '^Path: ' | sed 's/Path: //'`
16726        fi
16727      else
16728        if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0; then
16729          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
16730        fi
16731      fi
16732    else
16733      # warn user if --with-sdk-name was also set
16734      if test -n "$with_sdk_name"; then
16735        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&5
16736$as_echo "$as_me: WARNING: Both SYSROOT and --with-sdk-name are set, only SYSROOT will be used" >&2;}
16737      fi
16738    fi
16739
16740    if test $HAVE_SYSTEM_FRAMEWORK_HEADERS -eq 0 -a -z "$SYSROOT"; then
16741      # If no system framework headers, then SYSROOT must be set, or we won't build
16742      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
16743    fi
16744
16745    # Perform a basic sanity test
16746    if test ! -f "$SYSROOT/System/Library/Frameworks/Foundation.framework/Headers/Foundation.h"; then
16747      if test -z "$SYSROOT"; then
16748        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
16749      else
16750        as_fn_error $? "Invalid SDK or SYSROOT path, dependent framework headers not found" "$LINENO" 5
16751      fi
16752    fi
16753
16754    # set SDKROOT too, Xcode tools will pick it up
16755    SDKROOT=$SYSROOT
16756
16757  fi
16758
16759  # Prepend the extra path to the global path
16760
16761  if test "x$EXTRA_PATH" != x; then
16762    if test "x$PATH" = x; then
16763      PATH="$EXTRA_PATH"
16764    else
16765      PATH="$EXTRA_PATH:$PATH"
16766    fi
16767  fi
16768
16769
16770  if test "x$OPENJDK_BUILD_OS" = "xsolaris"; then
16771    # Add extra search paths on solaris for utilities like ar, as, dtrace etc...
16772    PATH="$PATH:/usr/ccs/bin:/usr/sfw/bin:/opt/csw/bin:/usr/sbin"
16773  fi
16774
16775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5
16776$as_echo_n "checking for sysroot... " >&6; }
16777  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYSROOT" >&5
16778$as_echo "$SYSROOT" >&6; }
16779  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for toolchain path" >&5
16780$as_echo_n "checking for toolchain path... " >&6; }
16781  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH" >&5
16782$as_echo "$TOOLCHAIN_PATH" >&6; }
16783  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for extra path" >&5
16784$as_echo_n "checking for extra path... " >&6; }
16785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $EXTRA_PATH" >&5
16786$as_echo "$EXTRA_PATH" >&6; }
16787
16788
16789# To properly create a configuration name, we need to have the OpenJDK target
16790# and options (variants and debug level) parsed.
16791
16792
16793
16794# Check whether --with-conf-name was given.
16795if test "${with_conf_name+set}" = set; then :
16796  withval=$with_conf_name;  CONF_NAME=${with_conf_name}
16797fi
16798
16799
16800  # Test from where we are running configure, in or outside of src root.
16801  { $as_echo "$as_me:${as_lineno-$LINENO}: checking where to store configuration" >&5
16802$as_echo_n "checking where to store configuration... " >&6; }
16803  if test "x$CURDIR" = "x$SRC_ROOT" || test "x$CURDIR" = "x$SRC_ROOT/common" \
16804      || test "x$CURDIR" = "x$SRC_ROOT/common/autoconf" \
16805      || test "x$CURDIR" = "x$SRC_ROOT/make" ; then
16806    # We are running configure from the src root.
16807    # Create a default ./build/target-variant-debuglevel output root.
16808    if test "x${CONF_NAME}" = x; then
16809      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in default location" >&5
16810$as_echo "in default location" >&6; }
16811      CONF_NAME="${OPENJDK_TARGET_OS}-${OPENJDK_TARGET_CPU}-${JDK_VARIANT}-${JVM_VARIANTS_WITH_AND}-${DEBUG_LEVEL}"
16812    else
16813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: in build directory with custom name" >&5
16814$as_echo "in build directory with custom name" >&6; }
16815    fi
16816    OUTPUT_ROOT="$SRC_ROOT/build/${CONF_NAME}"
16817    $MKDIR -p "$OUTPUT_ROOT"
16818    if test ! -d "$OUTPUT_ROOT"; then
16819      as_fn_error $? "Could not create build directory $OUTPUT_ROOT" "$LINENO" 5
16820    fi
16821  else
16822    # We are running configure from outside of the src dir.
16823    # Then use the current directory as output dir!
16824    # If configuration is situated in normal build directory, just use the build
16825    # directory name as configuration name, otherwise use the complete path.
16826    if test "x${CONF_NAME}" = x; then
16827      CONF_NAME=`$ECHO $CURDIR | $SED -e "s!^${SRC_ROOT}/build/!!"`
16828    fi
16829    OUTPUT_ROOT="$CURDIR"
16830    { $as_echo "$as_me:${as_lineno-$LINENO}: result: in current directory" >&5
16831$as_echo "in current directory" >&6; }
16832
16833    # WARNING: This might be a bad thing to do. You need to be sure you want to
16834    # have a configuration in this directory. Do some sanity checks!
16835
16836    if test ! -e "$OUTPUT_ROOT/spec.gmk"; then
16837      # If we have a spec.gmk, we have run here before and we are OK. Otherwise, check for
16838      # other files
16839      files_present=`$LS $OUTPUT_ROOT`
16840      # Configure has already touched config.log and confdefs.h in the current dir when this check
16841      # is performed.
16842      filtered_files=`$ECHO "$files_present" \
16843          | $SED -e 's/config.log//g' \
16844              -e 's/configure.log//g' \
16845              -e 's/confdefs.h//g' \
16846              -e 's/ //g' \
16847          | $TR -d '\n'`
16848      if test "x$filtered_files" != x; then
16849        { $as_echo "$as_me:${as_lineno-$LINENO}: Current directory is $CURDIR." >&5
16850$as_echo "$as_me: Current directory is $CURDIR." >&6;}
16851        { $as_echo "$as_me:${as_lineno-$LINENO}: Since this is not the source root, configure will output the configuration here" >&5
16852$as_echo "$as_me: Since this is not the source root, configure will output the configuration here" >&6;}
16853        { $as_echo "$as_me:${as_lineno-$LINENO}: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&5
16854$as_echo "$as_me: (as opposed to creating a configuration in <src_root>/build/<conf-name>)." >&6;}
16855        { $as_echo "$as_me:${as_lineno-$LINENO}: However, this directory is not empty. This is not allowed, since it could" >&5
16856$as_echo "$as_me: However, this directory is not empty. This is not allowed, since it could" >&6;}
16857        { $as_echo "$as_me:${as_lineno-$LINENO}: seriously mess up just about everything." >&5
16858$as_echo "$as_me: seriously mess up just about everything." >&6;}
16859        { $as_echo "$as_me:${as_lineno-$LINENO}: Try 'cd $SRC_ROOT' and restart configure" >&5
16860$as_echo "$as_me: Try 'cd $SRC_ROOT' and restart configure" >&6;}
16861        { $as_echo "$as_me:${as_lineno-$LINENO}: (or create a new empty directory and cd to it)." >&5
16862$as_echo "$as_me: (or create a new empty directory and cd to it)." >&6;}
16863        as_fn_error $? "Will not continue creating configuration in $CURDIR" "$LINENO" 5
16864      fi
16865    fi
16866  fi
16867  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what configuration name to use" >&5
16868$as_echo_n "checking what configuration name to use... " >&6; }
16869  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CONF_NAME" >&5
16870$as_echo "$CONF_NAME" >&6; }
16871
16872
16873  # Only process if variable expands to non-empty
16874
16875  if test "x$OUTPUT_ROOT" != x; then
16876    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16877
16878  # Input might be given as Windows format, start by converting to
16879  # unix format.
16880  path="$OUTPUT_ROOT"
16881  new_path=`$CYGPATH -u "$path"`
16882
16883  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
16884  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
16885  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
16886  # "foo.exe" is OK but "foo" is an error.
16887  #
16888  # This test is therefore slightly more accurate than "test -f" to check for file precense.
16889  # It is also a way to make sure we got the proper file name for the real test later on.
16890  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
16891  if test "x$test_shortpath" = x; then
16892    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16893$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16894    as_fn_error $? "Cannot locate the the path of OUTPUT_ROOT" "$LINENO" 5
16895  fi
16896
16897  # Call helper function which possibly converts this using DOS-style short mode.
16898  # If so, the updated path is stored in $new_path.
16899
16900  input_path="$new_path"
16901  # Check if we need to convert this using DOS-style short mode. If the path
16902  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16903  # take no chances and rewrite it.
16904  # Note: m4 eats our [], so we need to use [ and ] instead.
16905  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
16906  if test "x$has_forbidden_chars" != x; then
16907    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16908    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
16909    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
16910    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
16911      # Going to short mode and back again did indeed matter. Since short mode is
16912      # case insensitive, let's make it lowercase to improve readability.
16913      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16914      # Now convert it back to Unix-style (cygpath)
16915      input_path=`$CYGPATH -u "$shortmode_path"`
16916      new_path="$input_path"
16917    fi
16918  fi
16919
16920  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
16921  if test "x$test_cygdrive_prefix" = x; then
16922    # As a simple fix, exclude /usr/bin since it's not a real path.
16923    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
16924      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
16925      # a path prefixed by /cygdrive for fixpath to work.
16926      new_path="$CYGWIN_ROOT_PATH$input_path"
16927    fi
16928  fi
16929
16930
16931  if test "x$path" != "x$new_path"; then
16932    OUTPUT_ROOT="$new_path"
16933    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16934$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16935  fi
16936
16937    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16938
16939  path="$OUTPUT_ROOT"
16940  has_colon=`$ECHO $path | $GREP ^.:`
16941  new_path="$path"
16942  if test "x$has_colon" = x; then
16943    # Not in mixed or Windows style, start by that.
16944    new_path=`cmd //c echo $path`
16945  fi
16946
16947
16948  input_path="$new_path"
16949  # Check if we need to convert this using DOS-style short mode. If the path
16950  # contains just simple characters, use it. Otherwise (spaces, weird characters),
16951  # take no chances and rewrite it.
16952  # Note: m4 eats our [], so we need to use [ and ] instead.
16953  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
16954  if test "x$has_forbidden_chars" != x; then
16955    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
16956    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
16957  fi
16958
16959
16960  windows_path="$new_path"
16961  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
16962    unix_path=`$CYGPATH -u "$windows_path"`
16963    new_path="$unix_path"
16964  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
16965    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
16966    new_path="$unix_path"
16967  fi
16968
16969  if test "x$path" != "x$new_path"; then
16970    OUTPUT_ROOT="$new_path"
16971    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OUTPUT_ROOT to \"$new_path\"" >&5
16972$as_echo "$as_me: Rewriting OUTPUT_ROOT to \"$new_path\"" >&6;}
16973  fi
16974
16975  # Save the first 10 bytes of this path to the storage, so fixpath can work.
16976  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
16977
16978    else
16979      # We're on a unix platform. Hooray! :)
16980      path="$OUTPUT_ROOT"
16981      has_space=`$ECHO "$path" | $GREP " "`
16982      if test "x$has_space" != x; then
16983        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&5
16984$as_echo "$as_me: The path of OUTPUT_ROOT, which resolves as \"$path\", is invalid." >&6;}
16985        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
16986      fi
16987
16988      # Use eval to expand a potential ~
16989      eval path="$path"
16990      if test ! -f "$path" && test ! -d "$path"; then
16991        as_fn_error $? "The path of OUTPUT_ROOT, which resolves as \"$path\", is not found." "$LINENO" 5
16992      fi
16993
16994      if test -d "$path"; then
16995        OUTPUT_ROOT="`cd "$path"; $THEPWDCMD -L`"
16996      else
16997        dir="`$DIRNAME "$path"`"
16998        base="`$BASENAME "$path"`"
16999        OUTPUT_ROOT="`cd "$dir"; $THEPWDCMD -L`/$base"
17000      fi
17001    fi
17002  fi
17003
17004
17005  CONFIGURESUPPORT_OUTPUTDIR="$OUTPUT_ROOT/configure-support"
17006  $MKDIR -p "$CONFIGURESUPPORT_OUTPUTDIR"
17007
17008  SPEC=$OUTPUT_ROOT/spec.gmk
17009
17010  CONF_NAME=$CONF_NAME
17011
17012  OUTPUT_ROOT=$OUTPUT_ROOT
17013
17014
17015
17016  # The spec.gmk file contains all variables for the make system.
17017  ac_config_files="$ac_config_files $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in"
17018
17019  # The hotspot-spec.gmk file contains legacy variables for the hotspot make system.
17020  ac_config_files="$ac_config_files $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in"
17021
17022  # The bootcycle-spec.gmk file contains support for boot cycle builds.
17023  ac_config_files="$ac_config_files $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in"
17024
17025  # The buildjdk-spec.gmk file contains support for building a buildjdk when cross compiling.
17026  ac_config_files="$ac_config_files $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in"
17027
17028  # The compare.sh is used to compare the build output to other builds.
17029  ac_config_files="$ac_config_files $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in"
17030
17031  # The generated Makefile knows where the spec.gmk is and where the source is.
17032  # You can run make from the OUTPUT_ROOT, or from the top-level Makefile
17033  # which will look for generated configurations
17034  ac_config_files="$ac_config_files $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in"
17035
17036
17037
17038# Must be done before we can call HELP_MSG_MISSING_DEPENDENCY.
17039
17040  for ac_prog in apt-get yum port pkgutil pkgadd
17041do
17042  # Extract the first word of "$ac_prog", so it can be a program name with args.
17043set dummy $ac_prog; ac_word=$2
17044{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17045$as_echo_n "checking for $ac_word... " >&6; }
17046if ${ac_cv_prog_PKGHANDLER+:} false; then :
17047  $as_echo_n "(cached) " >&6
17048else
17049  if test -n "$PKGHANDLER"; then
17050  ac_cv_prog_PKGHANDLER="$PKGHANDLER" # Let the user override the test.
17051else
17052as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17053for as_dir in $PATH
17054do
17055  IFS=$as_save_IFS
17056  test -z "$as_dir" && as_dir=.
17057    for ac_exec_ext in '' $ac_executable_extensions; do
17058  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17059    ac_cv_prog_PKGHANDLER="$ac_prog"
17060    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17061    break 2
17062  fi
17063done
17064  done
17065IFS=$as_save_IFS
17066
17067fi
17068fi
17069PKGHANDLER=$ac_cv_prog_PKGHANDLER
17070if test -n "$PKGHANDLER"; then
17071  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKGHANDLER" >&5
17072$as_echo "$PKGHANDLER" >&6; }
17073else
17074  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17075$as_echo "no" >&6; }
17076fi
17077
17078
17079  test -n "$PKGHANDLER" && break
17080done
17081
17082
17083
17084# Setup tools that requires more complex handling, or that is not needed by the configure script.
17085
17086
17087
17088  # Publish this variable in the help.
17089
17090
17091  if [ -z "${MAKE+x}" ]; then
17092    # The variable is not set by user, try to locate tool using the code snippet
17093
17094    # Try our hardest to locate a correct version of GNU make
17095    for ac_prog in gmake
17096do
17097  # Extract the first word of "$ac_prog", so it can be a program name with args.
17098set dummy $ac_prog; ac_word=$2
17099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17100$as_echo_n "checking for $ac_word... " >&6; }
17101if ${ac_cv_path_CHECK_GMAKE+:} false; then :
17102  $as_echo_n "(cached) " >&6
17103else
17104  case $CHECK_GMAKE in
17105  [\\/]* | ?:[\\/]*)
17106  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
17107  ;;
17108  *)
17109  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17110for as_dir in $PATH
17111do
17112  IFS=$as_save_IFS
17113  test -z "$as_dir" && as_dir=.
17114    for ac_exec_ext in '' $ac_executable_extensions; do
17115  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17116    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17117    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17118    break 2
17119  fi
17120done
17121  done
17122IFS=$as_save_IFS
17123
17124  ;;
17125esac
17126fi
17127CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
17128if test -n "$CHECK_GMAKE"; then
17129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
17130$as_echo "$CHECK_GMAKE" >&6; }
17131else
17132  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17133$as_echo "no" >&6; }
17134fi
17135
17136
17137  test -n "$CHECK_GMAKE" && break
17138done
17139
17140
17141  MAKE_CANDIDATE=""$CHECK_GMAKE""
17142  DESCRIPTION="gmake in PATH"
17143
17144  # On Cygwin, we require a newer version of make than on other platforms
17145  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17146    MAKE_VERSION_EXPR="-e 4\."
17147    MAKE_REQUIRED_VERSION="4.0"
17148   else
17149    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17150    MAKE_REQUIRED_VERSION="3.81"
17151  fi
17152
17153  if test "x$MAKE_CANDIDATE" != x; then
17154    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17155$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17156    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17157    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17158    if test "x$IS_GNU_MAKE" = x; then
17159      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17160$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17161    else
17162      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17163      if test "x$IS_MODERN_MAKE" = x; then
17164        { $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
17165$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;}
17166      else
17167        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17168          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17169            MAKE_EXPECTED_ENV='cygwin'
17170          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17171            MAKE_EXPECTED_ENV='msys'
17172          else
17173            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17174          fi
17175          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17176          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17177        else
17178          # Not relevant for non-Windows
17179          IS_MAKE_CORRECT_ENV=true
17180        fi
17181        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17182          { $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
17183$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;}
17184        else
17185          FOUND_MAKE=$MAKE_CANDIDATE
17186
17187  # Only process if variable expands to non-empty
17188
17189  if test "x$FOUND_MAKE" != x; then
17190    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17191
17192  # First separate the path from the arguments. This will split at the first
17193  # space.
17194  complete="$FOUND_MAKE"
17195  path="${complete%% *}"
17196  tmp="$complete EOL"
17197  arguments="${tmp#* }"
17198
17199  # Input might be given as Windows format, start by converting to
17200  # unix format.
17201  new_path=`$CYGPATH -u "$path"`
17202
17203  # Now try to locate executable using which
17204  new_path=`$WHICH "$new_path" 2> /dev/null`
17205  # bat and cmd files are not always considered executable in cygwin causing which
17206  # to not find them
17207  if test "x$new_path" = x \
17208      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17209      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17210    new_path=`$CYGPATH -u "$path"`
17211  fi
17212  if test "x$new_path" = x; then
17213    # Oops. Which didn't find the executable.
17214    # The splitting of arguments from the executable at a space might have been incorrect,
17215    # since paths with space are more likely in Windows. Give it another try with the whole
17216    # argument.
17217    path="$complete"
17218    arguments="EOL"
17219    new_path=`$CYGPATH -u "$path"`
17220    new_path=`$WHICH "$new_path" 2> /dev/null`
17221    # bat and cmd files are not always considered executable in cygwin causing which
17222    # to not find them
17223    if test "x$new_path" = x \
17224        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17225        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17226      new_path=`$CYGPATH -u "$path"`
17227    fi
17228    if test "x$new_path" = x; then
17229      # It's still not found. Now this is an unrecoverable error.
17230      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17231$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17232      has_space=`$ECHO "$complete" | $GREP " "`
17233      if test "x$has_space" != x; then
17234        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17235$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17236      fi
17237      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17238    fi
17239  fi
17240
17241  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17242  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17243  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17244  # "foo.exe" is OK but "foo" is an error.
17245  #
17246  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17247  # It is also a way to make sure we got the proper file name for the real test later on.
17248  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17249  if test "x$test_shortpath" = x; then
17250    # Short path failed, file does not exist as specified.
17251    # Try adding .exe or .cmd
17252    if test -f "${new_path}.exe"; then
17253      input_to_shortpath="${new_path}.exe"
17254    elif test -f "${new_path}.cmd"; then
17255      input_to_shortpath="${new_path}.cmd"
17256    else
17257      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17258$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17259      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17260$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17261      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17262    fi
17263  else
17264    input_to_shortpath="$new_path"
17265  fi
17266
17267  # Call helper function which possibly converts this using DOS-style short mode.
17268  # If so, the updated path is stored in $new_path.
17269  new_path="$input_to_shortpath"
17270
17271  input_path="$input_to_shortpath"
17272  # Check if we need to convert this using DOS-style short mode. If the path
17273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17274  # take no chances and rewrite it.
17275  # Note: m4 eats our [], so we need to use [ and ] instead.
17276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17277  if test "x$has_forbidden_chars" != x; then
17278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17282      # Going to short mode and back again did indeed matter. Since short mode is
17283      # case insensitive, let's make it lowercase to improve readability.
17284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17285      # Now convert it back to Unix-style (cygpath)
17286      input_path=`$CYGPATH -u "$shortmode_path"`
17287      new_path="$input_path"
17288    fi
17289  fi
17290
17291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17292  if test "x$test_cygdrive_prefix" = x; then
17293    # As a simple fix, exclude /usr/bin since it's not a real path.
17294    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17296      # a path prefixed by /cygdrive for fixpath to work.
17297      new_path="$CYGWIN_ROOT_PATH$input_path"
17298    fi
17299  fi
17300
17301  # remove trailing .exe if any
17302  new_path="${new_path/%.exe/}"
17303
17304    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17305
17306  # First separate the path from the arguments. This will split at the first
17307  # space.
17308  complete="$FOUND_MAKE"
17309  path="${complete%% *}"
17310  tmp="$complete EOL"
17311  arguments="${tmp#* }"
17312
17313  # Input might be given as Windows format, start by converting to
17314  # unix format.
17315  new_path="$path"
17316
17317  windows_path="$new_path"
17318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17319    unix_path=`$CYGPATH -u "$windows_path"`
17320    new_path="$unix_path"
17321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17323    new_path="$unix_path"
17324  fi
17325
17326
17327  # Now try to locate executable using which
17328  new_path=`$WHICH "$new_path" 2> /dev/null`
17329
17330  if test "x$new_path" = x; then
17331    # Oops. Which didn't find the executable.
17332    # The splitting of arguments from the executable at a space might have been incorrect,
17333    # since paths with space are more likely in Windows. Give it another try with the whole
17334    # argument.
17335    path="$complete"
17336    arguments="EOL"
17337    new_path="$path"
17338
17339  windows_path="$new_path"
17340  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17341    unix_path=`$CYGPATH -u "$windows_path"`
17342    new_path="$unix_path"
17343  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17344    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17345    new_path="$unix_path"
17346  fi
17347
17348
17349    new_path=`$WHICH "$new_path" 2> /dev/null`
17350    # bat and cmd files are not always considered executable in MSYS causing which
17351    # to not find them
17352    if test "x$new_path" = x \
17353        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17354        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17355      new_path="$path"
17356
17357  windows_path="$new_path"
17358  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17359    unix_path=`$CYGPATH -u "$windows_path"`
17360    new_path="$unix_path"
17361  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17362    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17363    new_path="$unix_path"
17364  fi
17365
17366    fi
17367
17368    if test "x$new_path" = x; then
17369      # It's still not found. Now this is an unrecoverable error.
17370      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17371$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17372      has_space=`$ECHO "$complete" | $GREP " "`
17373      if test "x$has_space" != x; then
17374        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17375$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17376      fi
17377      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17378    fi
17379  fi
17380
17381  # Now new_path has a complete unix path to the binary
17382  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17383    # Keep paths in /bin as-is, but remove trailing .exe if any
17384    new_path="${new_path/%.exe/}"
17385    # Do not save /bin paths to all_fixpath_prefixes!
17386  else
17387    # Not in mixed or Windows style, start by that.
17388    new_path=`cmd //c echo $new_path`
17389
17390  input_path="$new_path"
17391  # Check if we need to convert this using DOS-style short mode. If the path
17392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17393  # take no chances and rewrite it.
17394  # Note: m4 eats our [], so we need to use [ and ] instead.
17395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17396  if test "x$has_forbidden_chars" != x; then
17397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17398    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17399  fi
17400
17401    # Output is in $new_path
17402
17403  windows_path="$new_path"
17404  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17405    unix_path=`$CYGPATH -u "$windows_path"`
17406    new_path="$unix_path"
17407  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17408    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17409    new_path="$unix_path"
17410  fi
17411
17412    # remove trailing .exe if any
17413    new_path="${new_path/%.exe/}"
17414
17415    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17416    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17417  fi
17418
17419    else
17420      # We're on a unix platform. Hooray! :)
17421      # First separate the path from the arguments. This will split at the first
17422      # space.
17423      complete="$FOUND_MAKE"
17424      path="${complete%% *}"
17425      tmp="$complete EOL"
17426      arguments="${tmp#* }"
17427
17428      # Cannot rely on the command "which" here since it doesn't always work.
17429      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17430      if test -z "$is_absolute_path"; then
17431        # Path to executable is not absolute. Find it.
17432        IFS_save="$IFS"
17433        IFS=:
17434        for p in $PATH; do
17435          if test -f "$p/$path" && test -x "$p/$path"; then
17436            new_path="$p/$path"
17437            break
17438          fi
17439        done
17440        IFS="$IFS_save"
17441      else
17442        # This is an absolute path, we can use it without further modifications.
17443        new_path="$path"
17444      fi
17445
17446      if test "x$new_path" = x; then
17447        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17448$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17449        has_space=`$ECHO "$complete" | $GREP " "`
17450        if test "x$has_space" != x; then
17451          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17452$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17453        fi
17454        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17455      fi
17456    fi
17457
17458    # Now join together the path and the arguments once again
17459    if test "x$arguments" != xEOL; then
17460      new_complete="$new_path ${arguments% *}"
17461    else
17462      new_complete="$new_path"
17463    fi
17464
17465    if test "x$complete" != "x$new_complete"; then
17466      FOUND_MAKE="$new_complete"
17467      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17468$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17469    fi
17470  fi
17471
17472        fi
17473      fi
17474    fi
17475  fi
17476
17477
17478    if test "x$FOUND_MAKE" = x; then
17479      for ac_prog in make
17480do
17481  # Extract the first word of "$ac_prog", so it can be a program name with args.
17482set dummy $ac_prog; ac_word=$2
17483{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17484$as_echo_n "checking for $ac_word... " >&6; }
17485if ${ac_cv_path_CHECK_MAKE+:} false; then :
17486  $as_echo_n "(cached) " >&6
17487else
17488  case $CHECK_MAKE in
17489  [\\/]* | ?:[\\/]*)
17490  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
17491  ;;
17492  *)
17493  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17494for as_dir in $PATH
17495do
17496  IFS=$as_save_IFS
17497  test -z "$as_dir" && as_dir=.
17498    for ac_exec_ext in '' $ac_executable_extensions; do
17499  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17500    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
17501    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17502    break 2
17503  fi
17504done
17505  done
17506IFS=$as_save_IFS
17507
17508  ;;
17509esac
17510fi
17511CHECK_MAKE=$ac_cv_path_CHECK_MAKE
17512if test -n "$CHECK_MAKE"; then
17513  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
17514$as_echo "$CHECK_MAKE" >&6; }
17515else
17516  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17517$as_echo "no" >&6; }
17518fi
17519
17520
17521  test -n "$CHECK_MAKE" && break
17522done
17523
17524
17525  MAKE_CANDIDATE=""$CHECK_MAKE""
17526  DESCRIPTION="make in PATH"
17527
17528  # On Cygwin, we require a newer version of make than on other platforms
17529  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17530    MAKE_VERSION_EXPR="-e 4\."
17531    MAKE_REQUIRED_VERSION="4.0"
17532   else
17533    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17534    MAKE_REQUIRED_VERSION="3.81"
17535  fi
17536
17537  if test "x$MAKE_CANDIDATE" != x; then
17538    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17539$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17540    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17541    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17542    if test "x$IS_GNU_MAKE" = x; then
17543      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17544$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17545    else
17546      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17547      if test "x$IS_MODERN_MAKE" = x; then
17548        { $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
17549$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;}
17550      else
17551        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17552          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17553            MAKE_EXPECTED_ENV='cygwin'
17554          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17555            MAKE_EXPECTED_ENV='msys'
17556          else
17557            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17558          fi
17559          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17560          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17561        else
17562          # Not relevant for non-Windows
17563          IS_MAKE_CORRECT_ENV=true
17564        fi
17565        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17566          { $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
17567$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;}
17568        else
17569          FOUND_MAKE=$MAKE_CANDIDATE
17570
17571  # Only process if variable expands to non-empty
17572
17573  if test "x$FOUND_MAKE" != x; then
17574    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17575
17576  # First separate the path from the arguments. This will split at the first
17577  # space.
17578  complete="$FOUND_MAKE"
17579  path="${complete%% *}"
17580  tmp="$complete EOL"
17581  arguments="${tmp#* }"
17582
17583  # Input might be given as Windows format, start by converting to
17584  # unix format.
17585  new_path=`$CYGPATH -u "$path"`
17586
17587  # Now try to locate executable using which
17588  new_path=`$WHICH "$new_path" 2> /dev/null`
17589  # bat and cmd files are not always considered executable in cygwin causing which
17590  # to not find them
17591  if test "x$new_path" = x \
17592      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17593      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17594    new_path=`$CYGPATH -u "$path"`
17595  fi
17596  if test "x$new_path" = x; then
17597    # Oops. Which didn't find the executable.
17598    # The splitting of arguments from the executable at a space might have been incorrect,
17599    # since paths with space are more likely in Windows. Give it another try with the whole
17600    # argument.
17601    path="$complete"
17602    arguments="EOL"
17603    new_path=`$CYGPATH -u "$path"`
17604    new_path=`$WHICH "$new_path" 2> /dev/null`
17605    # bat and cmd files are not always considered executable in cygwin causing which
17606    # to not find them
17607    if test "x$new_path" = x \
17608        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17609        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17610      new_path=`$CYGPATH -u "$path"`
17611    fi
17612    if test "x$new_path" = x; then
17613      # It's still not found. Now this is an unrecoverable error.
17614      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17615$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17616      has_space=`$ECHO "$complete" | $GREP " "`
17617      if test "x$has_space" != x; then
17618        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17619$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17620      fi
17621      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17622    fi
17623  fi
17624
17625  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
17626  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
17627  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
17628  # "foo.exe" is OK but "foo" is an error.
17629  #
17630  # This test is therefore slightly more accurate than "test -f" to check for file presence.
17631  # It is also a way to make sure we got the proper file name for the real test later on.
17632  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
17633  if test "x$test_shortpath" = x; then
17634    # Short path failed, file does not exist as specified.
17635    # Try adding .exe or .cmd
17636    if test -f "${new_path}.exe"; then
17637      input_to_shortpath="${new_path}.exe"
17638    elif test -f "${new_path}.cmd"; then
17639      input_to_shortpath="${new_path}.cmd"
17640    else
17641      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
17642$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
17643      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
17644$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
17645      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17646    fi
17647  else
17648    input_to_shortpath="$new_path"
17649  fi
17650
17651  # Call helper function which possibly converts this using DOS-style short mode.
17652  # If so, the updated path is stored in $new_path.
17653  new_path="$input_to_shortpath"
17654
17655  input_path="$input_to_shortpath"
17656  # Check if we need to convert this using DOS-style short mode. If the path
17657  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17658  # take no chances and rewrite it.
17659  # Note: m4 eats our [], so we need to use [ and ] instead.
17660  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
17661  if test "x$has_forbidden_chars" != x; then
17662    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17663    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
17664    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
17665    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
17666      # Going to short mode and back again did indeed matter. Since short mode is
17667      # case insensitive, let's make it lowercase to improve readability.
17668      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17669      # Now convert it back to Unix-style (cygpath)
17670      input_path=`$CYGPATH -u "$shortmode_path"`
17671      new_path="$input_path"
17672    fi
17673  fi
17674
17675  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
17676  if test "x$test_cygdrive_prefix" = x; then
17677    # As a simple fix, exclude /usr/bin since it's not a real path.
17678    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
17679      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
17680      # a path prefixed by /cygdrive for fixpath to work.
17681      new_path="$CYGWIN_ROOT_PATH$input_path"
17682    fi
17683  fi
17684
17685  # remove trailing .exe if any
17686  new_path="${new_path/%.exe/}"
17687
17688    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17689
17690  # First separate the path from the arguments. This will split at the first
17691  # space.
17692  complete="$FOUND_MAKE"
17693  path="${complete%% *}"
17694  tmp="$complete EOL"
17695  arguments="${tmp#* }"
17696
17697  # Input might be given as Windows format, start by converting to
17698  # unix format.
17699  new_path="$path"
17700
17701  windows_path="$new_path"
17702  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17703    unix_path=`$CYGPATH -u "$windows_path"`
17704    new_path="$unix_path"
17705  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17706    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17707    new_path="$unix_path"
17708  fi
17709
17710
17711  # Now try to locate executable using which
17712  new_path=`$WHICH "$new_path" 2> /dev/null`
17713
17714  if test "x$new_path" = x; then
17715    # Oops. Which didn't find the executable.
17716    # The splitting of arguments from the executable at a space might have been incorrect,
17717    # since paths with space are more likely in Windows. Give it another try with the whole
17718    # argument.
17719    path="$complete"
17720    arguments="EOL"
17721    new_path="$path"
17722
17723  windows_path="$new_path"
17724  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17725    unix_path=`$CYGPATH -u "$windows_path"`
17726    new_path="$unix_path"
17727  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17728    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17729    new_path="$unix_path"
17730  fi
17731
17732
17733    new_path=`$WHICH "$new_path" 2> /dev/null`
17734    # bat and cmd files are not always considered executable in MSYS causing which
17735    # to not find them
17736    if test "x$new_path" = x \
17737        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17738        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17739      new_path="$path"
17740
17741  windows_path="$new_path"
17742  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17743    unix_path=`$CYGPATH -u "$windows_path"`
17744    new_path="$unix_path"
17745  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17746    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17747    new_path="$unix_path"
17748  fi
17749
17750    fi
17751
17752    if test "x$new_path" = x; then
17753      # It's still not found. Now this is an unrecoverable error.
17754      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17755$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17756      has_space=`$ECHO "$complete" | $GREP " "`
17757      if test "x$has_space" != x; then
17758        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
17759$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
17760      fi
17761      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17762    fi
17763  fi
17764
17765  # Now new_path has a complete unix path to the binary
17766  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
17767    # Keep paths in /bin as-is, but remove trailing .exe if any
17768    new_path="${new_path/%.exe/}"
17769    # Do not save /bin paths to all_fixpath_prefixes!
17770  else
17771    # Not in mixed or Windows style, start by that.
17772    new_path=`cmd //c echo $new_path`
17773
17774  input_path="$new_path"
17775  # Check if we need to convert this using DOS-style short mode. If the path
17776  # contains just simple characters, use it. Otherwise (spaces, weird characters),
17777  # take no chances and rewrite it.
17778  # Note: m4 eats our [], so we need to use [ and ] instead.
17779  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
17780  if test "x$has_forbidden_chars" != x; then
17781    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
17782    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
17783  fi
17784
17785    # Output is in $new_path
17786
17787  windows_path="$new_path"
17788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17789    unix_path=`$CYGPATH -u "$windows_path"`
17790    new_path="$unix_path"
17791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17792    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
17793    new_path="$unix_path"
17794  fi
17795
17796    # remove trailing .exe if any
17797    new_path="${new_path/%.exe/}"
17798
17799    # Save the first 10 bytes of this path to the storage, so fixpath can work.
17800    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
17801  fi
17802
17803    else
17804      # We're on a unix platform. Hooray! :)
17805      # First separate the path from the arguments. This will split at the first
17806      # space.
17807      complete="$FOUND_MAKE"
17808      path="${complete%% *}"
17809      tmp="$complete EOL"
17810      arguments="${tmp#* }"
17811
17812      # Cannot rely on the command "which" here since it doesn't always work.
17813      is_absolute_path=`$ECHO "$path" | $GREP ^/`
17814      if test -z "$is_absolute_path"; then
17815        # Path to executable is not absolute. Find it.
17816        IFS_save="$IFS"
17817        IFS=:
17818        for p in $PATH; do
17819          if test -f "$p/$path" && test -x "$p/$path"; then
17820            new_path="$p/$path"
17821            break
17822          fi
17823        done
17824        IFS="$IFS_save"
17825      else
17826        # This is an absolute path, we can use it without further modifications.
17827        new_path="$path"
17828      fi
17829
17830      if test "x$new_path" = x; then
17831        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
17832$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
17833        has_space=`$ECHO "$complete" | $GREP " "`
17834        if test "x$has_space" != x; then
17835          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
17836$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
17837        fi
17838        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
17839      fi
17840    fi
17841
17842    # Now join together the path and the arguments once again
17843    if test "x$arguments" != xEOL; then
17844      new_complete="$new_path ${arguments% *}"
17845    else
17846      new_complete="$new_path"
17847    fi
17848
17849    if test "x$complete" != "x$new_complete"; then
17850      FOUND_MAKE="$new_complete"
17851      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
17852$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
17853    fi
17854  fi
17855
17856        fi
17857      fi
17858    fi
17859  fi
17860
17861    fi
17862
17863    if test "x$FOUND_MAKE" = x; then
17864      if test "x$TOOLCHAIN_PATH" != x; then
17865        # We have a toolchain path, check that as well before giving up.
17866        OLD_PATH=$PATH
17867        PATH=$TOOLCHAIN_PATH:$PATH
17868        for ac_prog in gmake
17869do
17870  # Extract the first word of "$ac_prog", so it can be a program name with args.
17871set dummy $ac_prog; ac_word=$2
17872{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
17873$as_echo_n "checking for $ac_word... " >&6; }
17874if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
17875  $as_echo_n "(cached) " >&6
17876else
17877  case $CHECK_TOOLSDIR_GMAKE in
17878  [\\/]* | ?:[\\/]*)
17879  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
17880  ;;
17881  *)
17882  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
17883for as_dir in $PATH
17884do
17885  IFS=$as_save_IFS
17886  test -z "$as_dir" && as_dir=.
17887    for ac_exec_ext in '' $ac_executable_extensions; do
17888  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
17889    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
17890    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
17891    break 2
17892  fi
17893done
17894  done
17895IFS=$as_save_IFS
17896
17897  ;;
17898esac
17899fi
17900CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
17901if test -n "$CHECK_TOOLSDIR_GMAKE"; then
17902  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
17903$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
17904else
17905  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
17906$as_echo "no" >&6; }
17907fi
17908
17909
17910  test -n "$CHECK_TOOLSDIR_GMAKE" && break
17911done
17912
17913
17914  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
17915  DESCRIPTION="gmake in tools-dir"
17916
17917  # On Cygwin, we require a newer version of make than on other platforms
17918  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17919    MAKE_VERSION_EXPR="-e 4\."
17920    MAKE_REQUIRED_VERSION="4.0"
17921   else
17922    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
17923    MAKE_REQUIRED_VERSION="3.81"
17924  fi
17925
17926  if test "x$MAKE_CANDIDATE" != x; then
17927    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
17928$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
17929    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
17930    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
17931    if test "x$IS_GNU_MAKE" = x; then
17932      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
17933$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
17934    else
17935      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
17936      if test "x$IS_MODERN_MAKE" = x; then
17937        { $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
17938$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;}
17939      else
17940        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
17941          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17942            MAKE_EXPECTED_ENV='cygwin'
17943          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
17944            MAKE_EXPECTED_ENV='msys'
17945          else
17946            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
17947          fi
17948          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
17949          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
17950        else
17951          # Not relevant for non-Windows
17952          IS_MAKE_CORRECT_ENV=true
17953        fi
17954        if test "x$IS_MAKE_CORRECT_ENV" = x; then
17955          { $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
17956$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;}
17957        else
17958          FOUND_MAKE=$MAKE_CANDIDATE
17959
17960  # Only process if variable expands to non-empty
17961
17962  if test "x$FOUND_MAKE" != x; then
17963    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
17964
17965  # First separate the path from the arguments. This will split at the first
17966  # space.
17967  complete="$FOUND_MAKE"
17968  path="${complete%% *}"
17969  tmp="$complete EOL"
17970  arguments="${tmp#* }"
17971
17972  # Input might be given as Windows format, start by converting to
17973  # unix format.
17974  new_path=`$CYGPATH -u "$path"`
17975
17976  # Now try to locate executable using which
17977  new_path=`$WHICH "$new_path" 2> /dev/null`
17978  # bat and cmd files are not always considered executable in cygwin causing which
17979  # to not find them
17980  if test "x$new_path" = x \
17981      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17982      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17983    new_path=`$CYGPATH -u "$path"`
17984  fi
17985  if test "x$new_path" = x; then
17986    # Oops. Which didn't find the executable.
17987    # The splitting of arguments from the executable at a space might have been incorrect,
17988    # since paths with space are more likely in Windows. Give it another try with the whole
17989    # argument.
17990    path="$complete"
17991    arguments="EOL"
17992    new_path=`$CYGPATH -u "$path"`
17993    new_path=`$WHICH "$new_path" 2> /dev/null`
17994    # bat and cmd files are not always considered executable in cygwin causing which
17995    # to not find them
17996    if test "x$new_path" = x \
17997        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
17998        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
17999      new_path=`$CYGPATH -u "$path"`
18000    fi
18001    if test "x$new_path" = x; then
18002      # It's still not found. Now this is an unrecoverable error.
18003      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18004$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18005      has_space=`$ECHO "$complete" | $GREP " "`
18006      if test "x$has_space" != x; then
18007        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18008$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18009      fi
18010      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18011    fi
18012  fi
18013
18014  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18015  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18016  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18017  # "foo.exe" is OK but "foo" is an error.
18018  #
18019  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18020  # It is also a way to make sure we got the proper file name for the real test later on.
18021  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18022  if test "x$test_shortpath" = x; then
18023    # Short path failed, file does not exist as specified.
18024    # Try adding .exe or .cmd
18025    if test -f "${new_path}.exe"; then
18026      input_to_shortpath="${new_path}.exe"
18027    elif test -f "${new_path}.cmd"; then
18028      input_to_shortpath="${new_path}.cmd"
18029    else
18030      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18031$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18032      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18033$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18034      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18035    fi
18036  else
18037    input_to_shortpath="$new_path"
18038  fi
18039
18040  # Call helper function which possibly converts this using DOS-style short mode.
18041  # If so, the updated path is stored in $new_path.
18042  new_path="$input_to_shortpath"
18043
18044  input_path="$input_to_shortpath"
18045  # Check if we need to convert this using DOS-style short mode. If the path
18046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18047  # take no chances and rewrite it.
18048  # Note: m4 eats our [], so we need to use [ and ] instead.
18049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18050  if test "x$has_forbidden_chars" != x; then
18051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18052    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18053    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18054    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18055      # Going to short mode and back again did indeed matter. Since short mode is
18056      # case insensitive, let's make it lowercase to improve readability.
18057      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18058      # Now convert it back to Unix-style (cygpath)
18059      input_path=`$CYGPATH -u "$shortmode_path"`
18060      new_path="$input_path"
18061    fi
18062  fi
18063
18064  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18065  if test "x$test_cygdrive_prefix" = x; then
18066    # As a simple fix, exclude /usr/bin since it's not a real path.
18067    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18068      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18069      # a path prefixed by /cygdrive for fixpath to work.
18070      new_path="$CYGWIN_ROOT_PATH$input_path"
18071    fi
18072  fi
18073
18074  # remove trailing .exe if any
18075  new_path="${new_path/%.exe/}"
18076
18077    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18078
18079  # First separate the path from the arguments. This will split at the first
18080  # space.
18081  complete="$FOUND_MAKE"
18082  path="${complete%% *}"
18083  tmp="$complete EOL"
18084  arguments="${tmp#* }"
18085
18086  # Input might be given as Windows format, start by converting to
18087  # unix format.
18088  new_path="$path"
18089
18090  windows_path="$new_path"
18091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18092    unix_path=`$CYGPATH -u "$windows_path"`
18093    new_path="$unix_path"
18094  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18095    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18096    new_path="$unix_path"
18097  fi
18098
18099
18100  # Now try to locate executable using which
18101  new_path=`$WHICH "$new_path" 2> /dev/null`
18102
18103  if test "x$new_path" = x; then
18104    # Oops. Which didn't find the executable.
18105    # The splitting of arguments from the executable at a space might have been incorrect,
18106    # since paths with space are more likely in Windows. Give it another try with the whole
18107    # argument.
18108    path="$complete"
18109    arguments="EOL"
18110    new_path="$path"
18111
18112  windows_path="$new_path"
18113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18114    unix_path=`$CYGPATH -u "$windows_path"`
18115    new_path="$unix_path"
18116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18118    new_path="$unix_path"
18119  fi
18120
18121
18122    new_path=`$WHICH "$new_path" 2> /dev/null`
18123    # bat and cmd files are not always considered executable in MSYS causing which
18124    # to not find them
18125    if test "x$new_path" = x \
18126        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18127        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18128      new_path="$path"
18129
18130  windows_path="$new_path"
18131  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18132    unix_path=`$CYGPATH -u "$windows_path"`
18133    new_path="$unix_path"
18134  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18135    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18136    new_path="$unix_path"
18137  fi
18138
18139    fi
18140
18141    if test "x$new_path" = x; then
18142      # It's still not found. Now this is an unrecoverable error.
18143      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18144$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18145      has_space=`$ECHO "$complete" | $GREP " "`
18146      if test "x$has_space" != x; then
18147        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18148$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18149      fi
18150      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18151    fi
18152  fi
18153
18154  # Now new_path has a complete unix path to the binary
18155  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18156    # Keep paths in /bin as-is, but remove trailing .exe if any
18157    new_path="${new_path/%.exe/}"
18158    # Do not save /bin paths to all_fixpath_prefixes!
18159  else
18160    # Not in mixed or Windows style, start by that.
18161    new_path=`cmd //c echo $new_path`
18162
18163  input_path="$new_path"
18164  # Check if we need to convert this using DOS-style short mode. If the path
18165  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18166  # take no chances and rewrite it.
18167  # Note: m4 eats our [], so we need to use [ and ] instead.
18168  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18169  if test "x$has_forbidden_chars" != x; then
18170    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18171    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18172  fi
18173
18174    # Output is in $new_path
18175
18176  windows_path="$new_path"
18177  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18178    unix_path=`$CYGPATH -u "$windows_path"`
18179    new_path="$unix_path"
18180  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18181    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18182    new_path="$unix_path"
18183  fi
18184
18185    # remove trailing .exe if any
18186    new_path="${new_path/%.exe/}"
18187
18188    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18189    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18190  fi
18191
18192    else
18193      # We're on a unix platform. Hooray! :)
18194      # First separate the path from the arguments. This will split at the first
18195      # space.
18196      complete="$FOUND_MAKE"
18197      path="${complete%% *}"
18198      tmp="$complete EOL"
18199      arguments="${tmp#* }"
18200
18201      # Cannot rely on the command "which" here since it doesn't always work.
18202      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18203      if test -z "$is_absolute_path"; then
18204        # Path to executable is not absolute. Find it.
18205        IFS_save="$IFS"
18206        IFS=:
18207        for p in $PATH; do
18208          if test -f "$p/$path" && test -x "$p/$path"; then
18209            new_path="$p/$path"
18210            break
18211          fi
18212        done
18213        IFS="$IFS_save"
18214      else
18215        # This is an absolute path, we can use it without further modifications.
18216        new_path="$path"
18217      fi
18218
18219      if test "x$new_path" = x; then
18220        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18221$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18222        has_space=`$ECHO "$complete" | $GREP " "`
18223        if test "x$has_space" != x; then
18224          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18225$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18226        fi
18227        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18228      fi
18229    fi
18230
18231    # Now join together the path and the arguments once again
18232    if test "x$arguments" != xEOL; then
18233      new_complete="$new_path ${arguments% *}"
18234    else
18235      new_complete="$new_path"
18236    fi
18237
18238    if test "x$complete" != "x$new_complete"; then
18239      FOUND_MAKE="$new_complete"
18240      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18241$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18242    fi
18243  fi
18244
18245        fi
18246      fi
18247    fi
18248  fi
18249
18250        if test "x$FOUND_MAKE" = x; then
18251          for ac_prog in make
18252do
18253  # Extract the first word of "$ac_prog", so it can be a program name with args.
18254set dummy $ac_prog; ac_word=$2
18255{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18256$as_echo_n "checking for $ac_word... " >&6; }
18257if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
18258  $as_echo_n "(cached) " >&6
18259else
18260  case $CHECK_TOOLSDIR_MAKE in
18261  [\\/]* | ?:[\\/]*)
18262  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
18263  ;;
18264  *)
18265  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18266for as_dir in $PATH
18267do
18268  IFS=$as_save_IFS
18269  test -z "$as_dir" && as_dir=.
18270    for ac_exec_ext in '' $ac_executable_extensions; do
18271  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18272    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
18273    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18274    break 2
18275  fi
18276done
18277  done
18278IFS=$as_save_IFS
18279
18280  ;;
18281esac
18282fi
18283CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
18284if test -n "$CHECK_TOOLSDIR_MAKE"; then
18285  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
18286$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
18287else
18288  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18289$as_echo "no" >&6; }
18290fi
18291
18292
18293  test -n "$CHECK_TOOLSDIR_MAKE" && break
18294done
18295
18296
18297  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
18298  DESCRIPTION="make in tools-dir"
18299
18300  # On Cygwin, we require a newer version of make than on other platforms
18301  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18302    MAKE_VERSION_EXPR="-e 4\."
18303    MAKE_REQUIRED_VERSION="4.0"
18304   else
18305    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18306    MAKE_REQUIRED_VERSION="3.81"
18307  fi
18308
18309  if test "x$MAKE_CANDIDATE" != x; then
18310    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18311$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18312    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18313    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18314    if test "x$IS_GNU_MAKE" = x; then
18315      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18316$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18317    else
18318      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18319      if test "x$IS_MODERN_MAKE" = x; then
18320        { $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
18321$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;}
18322      else
18323        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18324          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18325            MAKE_EXPECTED_ENV='cygwin'
18326          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18327            MAKE_EXPECTED_ENV='msys'
18328          else
18329            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18330          fi
18331          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18332          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18333        else
18334          # Not relevant for non-Windows
18335          IS_MAKE_CORRECT_ENV=true
18336        fi
18337        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18338          { $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
18339$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;}
18340        else
18341          FOUND_MAKE=$MAKE_CANDIDATE
18342
18343  # Only process if variable expands to non-empty
18344
18345  if test "x$FOUND_MAKE" != x; then
18346    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18347
18348  # First separate the path from the arguments. This will split at the first
18349  # space.
18350  complete="$FOUND_MAKE"
18351  path="${complete%% *}"
18352  tmp="$complete EOL"
18353  arguments="${tmp#* }"
18354
18355  # Input might be given as Windows format, start by converting to
18356  # unix format.
18357  new_path=`$CYGPATH -u "$path"`
18358
18359  # Now try to locate executable using which
18360  new_path=`$WHICH "$new_path" 2> /dev/null`
18361  # bat and cmd files are not always considered executable in cygwin causing which
18362  # to not find them
18363  if test "x$new_path" = x \
18364      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18365      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18366    new_path=`$CYGPATH -u "$path"`
18367  fi
18368  if test "x$new_path" = x; then
18369    # Oops. Which didn't find the executable.
18370    # The splitting of arguments from the executable at a space might have been incorrect,
18371    # since paths with space are more likely in Windows. Give it another try with the whole
18372    # argument.
18373    path="$complete"
18374    arguments="EOL"
18375    new_path=`$CYGPATH -u "$path"`
18376    new_path=`$WHICH "$new_path" 2> /dev/null`
18377    # bat and cmd files are not always considered executable in cygwin causing which
18378    # to not find them
18379    if test "x$new_path" = x \
18380        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18381        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18382      new_path=`$CYGPATH -u "$path"`
18383    fi
18384    if test "x$new_path" = x; then
18385      # It's still not found. Now this is an unrecoverable error.
18386      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18387$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18388      has_space=`$ECHO "$complete" | $GREP " "`
18389      if test "x$has_space" != x; then
18390        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18391$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18392      fi
18393      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18394    fi
18395  fi
18396
18397  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18398  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18399  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18400  # "foo.exe" is OK but "foo" is an error.
18401  #
18402  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18403  # It is also a way to make sure we got the proper file name for the real test later on.
18404  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18405  if test "x$test_shortpath" = x; then
18406    # Short path failed, file does not exist as specified.
18407    # Try adding .exe or .cmd
18408    if test -f "${new_path}.exe"; then
18409      input_to_shortpath="${new_path}.exe"
18410    elif test -f "${new_path}.cmd"; then
18411      input_to_shortpath="${new_path}.cmd"
18412    else
18413      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18414$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18415      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18416$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18417      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18418    fi
18419  else
18420    input_to_shortpath="$new_path"
18421  fi
18422
18423  # Call helper function which possibly converts this using DOS-style short mode.
18424  # If so, the updated path is stored in $new_path.
18425  new_path="$input_to_shortpath"
18426
18427  input_path="$input_to_shortpath"
18428  # Check if we need to convert this using DOS-style short mode. If the path
18429  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18430  # take no chances and rewrite it.
18431  # Note: m4 eats our [], so we need to use [ and ] instead.
18432  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18433  if test "x$has_forbidden_chars" != x; then
18434    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18435    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18436    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18437    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18438      # Going to short mode and back again did indeed matter. Since short mode is
18439      # case insensitive, let's make it lowercase to improve readability.
18440      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18441      # Now convert it back to Unix-style (cygpath)
18442      input_path=`$CYGPATH -u "$shortmode_path"`
18443      new_path="$input_path"
18444    fi
18445  fi
18446
18447  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18448  if test "x$test_cygdrive_prefix" = x; then
18449    # As a simple fix, exclude /usr/bin since it's not a real path.
18450    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18451      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18452      # a path prefixed by /cygdrive for fixpath to work.
18453      new_path="$CYGWIN_ROOT_PATH$input_path"
18454    fi
18455  fi
18456
18457  # remove trailing .exe if any
18458  new_path="${new_path/%.exe/}"
18459
18460    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18461
18462  # First separate the path from the arguments. This will split at the first
18463  # space.
18464  complete="$FOUND_MAKE"
18465  path="${complete%% *}"
18466  tmp="$complete EOL"
18467  arguments="${tmp#* }"
18468
18469  # Input might be given as Windows format, start by converting to
18470  # unix format.
18471  new_path="$path"
18472
18473  windows_path="$new_path"
18474  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18475    unix_path=`$CYGPATH -u "$windows_path"`
18476    new_path="$unix_path"
18477  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18478    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18479    new_path="$unix_path"
18480  fi
18481
18482
18483  # Now try to locate executable using which
18484  new_path=`$WHICH "$new_path" 2> /dev/null`
18485
18486  if test "x$new_path" = x; then
18487    # Oops. Which didn't find the executable.
18488    # The splitting of arguments from the executable at a space might have been incorrect,
18489    # since paths with space are more likely in Windows. Give it another try with the whole
18490    # argument.
18491    path="$complete"
18492    arguments="EOL"
18493    new_path="$path"
18494
18495  windows_path="$new_path"
18496  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18497    unix_path=`$CYGPATH -u "$windows_path"`
18498    new_path="$unix_path"
18499  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18500    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18501    new_path="$unix_path"
18502  fi
18503
18504
18505    new_path=`$WHICH "$new_path" 2> /dev/null`
18506    # bat and cmd files are not always considered executable in MSYS causing which
18507    # to not find them
18508    if test "x$new_path" = x \
18509        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18510        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18511      new_path="$path"
18512
18513  windows_path="$new_path"
18514  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18515    unix_path=`$CYGPATH -u "$windows_path"`
18516    new_path="$unix_path"
18517  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18518    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18519    new_path="$unix_path"
18520  fi
18521
18522    fi
18523
18524    if test "x$new_path" = x; then
18525      # It's still not found. Now this is an unrecoverable error.
18526      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18527$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18528      has_space=`$ECHO "$complete" | $GREP " "`
18529      if test "x$has_space" != x; then
18530        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18531$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18532      fi
18533      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18534    fi
18535  fi
18536
18537  # Now new_path has a complete unix path to the binary
18538  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18539    # Keep paths in /bin as-is, but remove trailing .exe if any
18540    new_path="${new_path/%.exe/}"
18541    # Do not save /bin paths to all_fixpath_prefixes!
18542  else
18543    # Not in mixed or Windows style, start by that.
18544    new_path=`cmd //c echo $new_path`
18545
18546  input_path="$new_path"
18547  # Check if we need to convert this using DOS-style short mode. If the path
18548  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18549  # take no chances and rewrite it.
18550  # Note: m4 eats our [], so we need to use [ and ] instead.
18551  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18552  if test "x$has_forbidden_chars" != x; then
18553    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18554    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18555  fi
18556
18557    # Output is in $new_path
18558
18559  windows_path="$new_path"
18560  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18561    unix_path=`$CYGPATH -u "$windows_path"`
18562    new_path="$unix_path"
18563  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18564    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18565    new_path="$unix_path"
18566  fi
18567
18568    # remove trailing .exe if any
18569    new_path="${new_path/%.exe/}"
18570
18571    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18572    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18573  fi
18574
18575    else
18576      # We're on a unix platform. Hooray! :)
18577      # First separate the path from the arguments. This will split at the first
18578      # space.
18579      complete="$FOUND_MAKE"
18580      path="${complete%% *}"
18581      tmp="$complete EOL"
18582      arguments="${tmp#* }"
18583
18584      # Cannot rely on the command "which" here since it doesn't always work.
18585      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18586      if test -z "$is_absolute_path"; then
18587        # Path to executable is not absolute. Find it.
18588        IFS_save="$IFS"
18589        IFS=:
18590        for p in $PATH; do
18591          if test -f "$p/$path" && test -x "$p/$path"; then
18592            new_path="$p/$path"
18593            break
18594          fi
18595        done
18596        IFS="$IFS_save"
18597      else
18598        # This is an absolute path, we can use it without further modifications.
18599        new_path="$path"
18600      fi
18601
18602      if test "x$new_path" = x; then
18603        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18604$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18605        has_space=`$ECHO "$complete" | $GREP " "`
18606        if test "x$has_space" != x; then
18607          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
18608$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
18609        fi
18610        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18611      fi
18612    fi
18613
18614    # Now join together the path and the arguments once again
18615    if test "x$arguments" != xEOL; then
18616      new_complete="$new_path ${arguments% *}"
18617    else
18618      new_complete="$new_path"
18619    fi
18620
18621    if test "x$complete" != "x$new_complete"; then
18622      FOUND_MAKE="$new_complete"
18623      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
18624$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
18625    fi
18626  fi
18627
18628        fi
18629      fi
18630    fi
18631  fi
18632
18633        fi
18634        PATH=$OLD_PATH
18635      fi
18636    fi
18637
18638    if test "x$FOUND_MAKE" = x; then
18639      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
18640    fi
18641
18642  else
18643    # The variable is set, but is it from the command line or the environment?
18644
18645    # Try to remove the string !MAKE! from our list.
18646    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!MAKE!/}
18647    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
18648      # If it failed, the variable was not from the command line. Ignore it,
18649      # but warn the user (except for BASH, which is always set by the calling BASH).
18650      if test "xMAKE" != xBASH; then
18651        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&5
18652$as_echo "$as_me: WARNING: Ignoring value of MAKE from the environment. Use command line variables instead." >&2;}
18653      fi
18654      # Try to locate tool using the code snippet
18655
18656    # Try our hardest to locate a correct version of GNU make
18657    for ac_prog in gmake
18658do
18659  # Extract the first word of "$ac_prog", so it can be a program name with args.
18660set dummy $ac_prog; ac_word=$2
18661{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
18662$as_echo_n "checking for $ac_word... " >&6; }
18663if ${ac_cv_path_CHECK_GMAKE+:} false; then :
18664  $as_echo_n "(cached) " >&6
18665else
18666  case $CHECK_GMAKE in
18667  [\\/]* | ?:[\\/]*)
18668  ac_cv_path_CHECK_GMAKE="$CHECK_GMAKE" # Let the user override the test with a path.
18669  ;;
18670  *)
18671  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
18672for as_dir in $PATH
18673do
18674  IFS=$as_save_IFS
18675  test -z "$as_dir" && as_dir=.
18676    for ac_exec_ext in '' $ac_executable_extensions; do
18677  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
18678    ac_cv_path_CHECK_GMAKE="$as_dir/$ac_word$ac_exec_ext"
18679    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
18680    break 2
18681  fi
18682done
18683  done
18684IFS=$as_save_IFS
18685
18686  ;;
18687esac
18688fi
18689CHECK_GMAKE=$ac_cv_path_CHECK_GMAKE
18690if test -n "$CHECK_GMAKE"; then
18691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_GMAKE" >&5
18692$as_echo "$CHECK_GMAKE" >&6; }
18693else
18694  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
18695$as_echo "no" >&6; }
18696fi
18697
18698
18699  test -n "$CHECK_GMAKE" && break
18700done
18701
18702
18703  MAKE_CANDIDATE=""$CHECK_GMAKE""
18704  DESCRIPTION="gmake in PATH"
18705
18706  # On Cygwin, we require a newer version of make than on other platforms
18707  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18708    MAKE_VERSION_EXPR="-e 4\."
18709    MAKE_REQUIRED_VERSION="4.0"
18710   else
18711    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
18712    MAKE_REQUIRED_VERSION="3.81"
18713  fi
18714
18715  if test "x$MAKE_CANDIDATE" != x; then
18716    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
18717$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
18718    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
18719    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
18720    if test "x$IS_GNU_MAKE" = x; then
18721      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
18722$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
18723    else
18724      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
18725      if test "x$IS_MODERN_MAKE" = x; then
18726        { $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
18727$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;}
18728      else
18729        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
18730          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18731            MAKE_EXPECTED_ENV='cygwin'
18732          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18733            MAKE_EXPECTED_ENV='msys'
18734          else
18735            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
18736          fi
18737          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
18738          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
18739        else
18740          # Not relevant for non-Windows
18741          IS_MAKE_CORRECT_ENV=true
18742        fi
18743        if test "x$IS_MAKE_CORRECT_ENV" = x; then
18744          { $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
18745$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;}
18746        else
18747          FOUND_MAKE=$MAKE_CANDIDATE
18748
18749  # Only process if variable expands to non-empty
18750
18751  if test "x$FOUND_MAKE" != x; then
18752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18753
18754  # First separate the path from the arguments. This will split at the first
18755  # space.
18756  complete="$FOUND_MAKE"
18757  path="${complete%% *}"
18758  tmp="$complete EOL"
18759  arguments="${tmp#* }"
18760
18761  # Input might be given as Windows format, start by converting to
18762  # unix format.
18763  new_path=`$CYGPATH -u "$path"`
18764
18765  # Now try to locate executable using which
18766  new_path=`$WHICH "$new_path" 2> /dev/null`
18767  # bat and cmd files are not always considered executable in cygwin causing which
18768  # to not find them
18769  if test "x$new_path" = x \
18770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18772    new_path=`$CYGPATH -u "$path"`
18773  fi
18774  if test "x$new_path" = x; then
18775    # Oops. Which didn't find the executable.
18776    # The splitting of arguments from the executable at a space might have been incorrect,
18777    # since paths with space are more likely in Windows. Give it another try with the whole
18778    # argument.
18779    path="$complete"
18780    arguments="EOL"
18781    new_path=`$CYGPATH -u "$path"`
18782    new_path=`$WHICH "$new_path" 2> /dev/null`
18783    # bat and cmd files are not always considered executable in cygwin causing which
18784    # to not find them
18785    if test "x$new_path" = x \
18786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18788      new_path=`$CYGPATH -u "$path"`
18789    fi
18790    if test "x$new_path" = x; then
18791      # It's still not found. Now this is an unrecoverable error.
18792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18793$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18794      has_space=`$ECHO "$complete" | $GREP " "`
18795      if test "x$has_space" != x; then
18796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18798      fi
18799      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18800    fi
18801  fi
18802
18803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
18804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
18805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
18806  # "foo.exe" is OK but "foo" is an error.
18807  #
18808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
18809  # It is also a way to make sure we got the proper file name for the real test later on.
18810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
18811  if test "x$test_shortpath" = x; then
18812    # Short path failed, file does not exist as specified.
18813    # Try adding .exe or .cmd
18814    if test -f "${new_path}.exe"; then
18815      input_to_shortpath="${new_path}.exe"
18816    elif test -f "${new_path}.cmd"; then
18817      input_to_shortpath="${new_path}.cmd"
18818    else
18819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
18820$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
18821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
18822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
18823      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18824    fi
18825  else
18826    input_to_shortpath="$new_path"
18827  fi
18828
18829  # Call helper function which possibly converts this using DOS-style short mode.
18830  # If so, the updated path is stored in $new_path.
18831  new_path="$input_to_shortpath"
18832
18833  input_path="$input_to_shortpath"
18834  # Check if we need to convert this using DOS-style short mode. If the path
18835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18836  # take no chances and rewrite it.
18837  # Note: m4 eats our [], so we need to use [ and ] instead.
18838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
18839  if test "x$has_forbidden_chars" != x; then
18840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
18842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
18843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
18844      # Going to short mode and back again did indeed matter. Since short mode is
18845      # case insensitive, let's make it lowercase to improve readability.
18846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18847      # Now convert it back to Unix-style (cygpath)
18848      input_path=`$CYGPATH -u "$shortmode_path"`
18849      new_path="$input_path"
18850    fi
18851  fi
18852
18853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
18854  if test "x$test_cygdrive_prefix" = x; then
18855    # As a simple fix, exclude /usr/bin since it's not a real path.
18856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
18857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
18858      # a path prefixed by /cygdrive for fixpath to work.
18859      new_path="$CYGWIN_ROOT_PATH$input_path"
18860    fi
18861  fi
18862
18863  # remove trailing .exe if any
18864  new_path="${new_path/%.exe/}"
18865
18866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18867
18868  # First separate the path from the arguments. This will split at the first
18869  # space.
18870  complete="$FOUND_MAKE"
18871  path="${complete%% *}"
18872  tmp="$complete EOL"
18873  arguments="${tmp#* }"
18874
18875  # Input might be given as Windows format, start by converting to
18876  # unix format.
18877  new_path="$path"
18878
18879  windows_path="$new_path"
18880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18881    unix_path=`$CYGPATH -u "$windows_path"`
18882    new_path="$unix_path"
18883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18885    new_path="$unix_path"
18886  fi
18887
18888
18889  # Now try to locate executable using which
18890  new_path=`$WHICH "$new_path" 2> /dev/null`
18891
18892  if test "x$new_path" = x; then
18893    # Oops. Which didn't find the executable.
18894    # The splitting of arguments from the executable at a space might have been incorrect,
18895    # since paths with space are more likely in Windows. Give it another try with the whole
18896    # argument.
18897    path="$complete"
18898    arguments="EOL"
18899    new_path="$path"
18900
18901  windows_path="$new_path"
18902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18903    unix_path=`$CYGPATH -u "$windows_path"`
18904    new_path="$unix_path"
18905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18907    new_path="$unix_path"
18908  fi
18909
18910
18911    new_path=`$WHICH "$new_path" 2> /dev/null`
18912    # bat and cmd files are not always considered executable in MSYS causing which
18913    # to not find them
18914    if test "x$new_path" = x \
18915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
18916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
18917      new_path="$path"
18918
18919  windows_path="$new_path"
18920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18921    unix_path=`$CYGPATH -u "$windows_path"`
18922    new_path="$unix_path"
18923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18925    new_path="$unix_path"
18926  fi
18927
18928    fi
18929
18930    if test "x$new_path" = x; then
18931      # It's still not found. Now this is an unrecoverable error.
18932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
18933$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
18934      has_space=`$ECHO "$complete" | $GREP " "`
18935      if test "x$has_space" != x; then
18936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
18937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
18938      fi
18939      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
18940    fi
18941  fi
18942
18943  # Now new_path has a complete unix path to the binary
18944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
18945    # Keep paths in /bin as-is, but remove trailing .exe if any
18946    new_path="${new_path/%.exe/}"
18947    # Do not save /bin paths to all_fixpath_prefixes!
18948  else
18949    # Not in mixed or Windows style, start by that.
18950    new_path=`cmd //c echo $new_path`
18951
18952  input_path="$new_path"
18953  # Check if we need to convert this using DOS-style short mode. If the path
18954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
18955  # take no chances and rewrite it.
18956  # Note: m4 eats our [], so we need to use [ and ] instead.
18957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
18958  if test "x$has_forbidden_chars" != x; then
18959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
18960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
18961  fi
18962
18963    # Output is in $new_path
18964
18965  windows_path="$new_path"
18966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
18967    unix_path=`$CYGPATH -u "$windows_path"`
18968    new_path="$unix_path"
18969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
18970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
18971    new_path="$unix_path"
18972  fi
18973
18974    # remove trailing .exe if any
18975    new_path="${new_path/%.exe/}"
18976
18977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
18978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
18979  fi
18980
18981    else
18982      # We're on a unix platform. Hooray! :)
18983      # First separate the path from the arguments. This will split at the first
18984      # space.
18985      complete="$FOUND_MAKE"
18986      path="${complete%% *}"
18987      tmp="$complete EOL"
18988      arguments="${tmp#* }"
18989
18990      # Cannot rely on the command "which" here since it doesn't always work.
18991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
18992      if test -z "$is_absolute_path"; then
18993        # Path to executable is not absolute. Find it.
18994        IFS_save="$IFS"
18995        IFS=:
18996        for p in $PATH; do
18997          if test -f "$p/$path" && test -x "$p/$path"; then
18998            new_path="$p/$path"
18999            break
19000          fi
19001        done
19002        IFS="$IFS_save"
19003      else
19004        # This is an absolute path, we can use it without further modifications.
19005        new_path="$path"
19006      fi
19007
19008      if test "x$new_path" = x; then
19009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19010$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19011        has_space=`$ECHO "$complete" | $GREP " "`
19012        if test "x$has_space" != x; then
19013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19015        fi
19016        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19017      fi
19018    fi
19019
19020    # Now join together the path and the arguments once again
19021    if test "x$arguments" != xEOL; then
19022      new_complete="$new_path ${arguments% *}"
19023    else
19024      new_complete="$new_path"
19025    fi
19026
19027    if test "x$complete" != "x$new_complete"; then
19028      FOUND_MAKE="$new_complete"
19029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19030$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19031    fi
19032  fi
19033
19034        fi
19035      fi
19036    fi
19037  fi
19038
19039
19040    if test "x$FOUND_MAKE" = x; then
19041      for ac_prog in make
19042do
19043  # Extract the first word of "$ac_prog", so it can be a program name with args.
19044set dummy $ac_prog; ac_word=$2
19045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19046$as_echo_n "checking for $ac_word... " >&6; }
19047if ${ac_cv_path_CHECK_MAKE+:} false; then :
19048  $as_echo_n "(cached) " >&6
19049else
19050  case $CHECK_MAKE in
19051  [\\/]* | ?:[\\/]*)
19052  ac_cv_path_CHECK_MAKE="$CHECK_MAKE" # Let the user override the test with a path.
19053  ;;
19054  *)
19055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19056for as_dir in $PATH
19057do
19058  IFS=$as_save_IFS
19059  test -z "$as_dir" && as_dir=.
19060    for ac_exec_ext in '' $ac_executable_extensions; do
19061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19062    ac_cv_path_CHECK_MAKE="$as_dir/$ac_word$ac_exec_ext"
19063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19064    break 2
19065  fi
19066done
19067  done
19068IFS=$as_save_IFS
19069
19070  ;;
19071esac
19072fi
19073CHECK_MAKE=$ac_cv_path_CHECK_MAKE
19074if test -n "$CHECK_MAKE"; then
19075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_MAKE" >&5
19076$as_echo "$CHECK_MAKE" >&6; }
19077else
19078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19079$as_echo "no" >&6; }
19080fi
19081
19082
19083  test -n "$CHECK_MAKE" && break
19084done
19085
19086
19087  MAKE_CANDIDATE=""$CHECK_MAKE""
19088  DESCRIPTION="make in PATH"
19089
19090  # On Cygwin, we require a newer version of make than on other platforms
19091  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19092    MAKE_VERSION_EXPR="-e 4\."
19093    MAKE_REQUIRED_VERSION="4.0"
19094   else
19095    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19096    MAKE_REQUIRED_VERSION="3.81"
19097  fi
19098
19099  if test "x$MAKE_CANDIDATE" != x; then
19100    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19101$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19102    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19103    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19104    if test "x$IS_GNU_MAKE" = x; then
19105      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19106$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19107    else
19108      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19109      if test "x$IS_MODERN_MAKE" = x; then
19110        { $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
19111$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;}
19112      else
19113        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19114          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19115            MAKE_EXPECTED_ENV='cygwin'
19116          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19117            MAKE_EXPECTED_ENV='msys'
19118          else
19119            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19120          fi
19121          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19122          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19123        else
19124          # Not relevant for non-Windows
19125          IS_MAKE_CORRECT_ENV=true
19126        fi
19127        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19128          { $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
19129$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;}
19130        else
19131          FOUND_MAKE=$MAKE_CANDIDATE
19132
19133  # Only process if variable expands to non-empty
19134
19135  if test "x$FOUND_MAKE" != x; then
19136    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19137
19138  # First separate the path from the arguments. This will split at the first
19139  # space.
19140  complete="$FOUND_MAKE"
19141  path="${complete%% *}"
19142  tmp="$complete EOL"
19143  arguments="${tmp#* }"
19144
19145  # Input might be given as Windows format, start by converting to
19146  # unix format.
19147  new_path=`$CYGPATH -u "$path"`
19148
19149  # Now try to locate executable using which
19150  new_path=`$WHICH "$new_path" 2> /dev/null`
19151  # bat and cmd files are not always considered executable in cygwin causing which
19152  # to not find them
19153  if test "x$new_path" = x \
19154      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19155      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19156    new_path=`$CYGPATH -u "$path"`
19157  fi
19158  if test "x$new_path" = x; then
19159    # Oops. Which didn't find the executable.
19160    # The splitting of arguments from the executable at a space might have been incorrect,
19161    # since paths with space are more likely in Windows. Give it another try with the whole
19162    # argument.
19163    path="$complete"
19164    arguments="EOL"
19165    new_path=`$CYGPATH -u "$path"`
19166    new_path=`$WHICH "$new_path" 2> /dev/null`
19167    # bat and cmd files are not always considered executable in cygwin causing which
19168    # to not find them
19169    if test "x$new_path" = x \
19170        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19171        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19172      new_path=`$CYGPATH -u "$path"`
19173    fi
19174    if test "x$new_path" = x; then
19175      # It's still not found. Now this is an unrecoverable error.
19176      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19177$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19178      has_space=`$ECHO "$complete" | $GREP " "`
19179      if test "x$has_space" != x; then
19180        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19181$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19182      fi
19183      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19184    fi
19185  fi
19186
19187  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19188  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19189  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19190  # "foo.exe" is OK but "foo" is an error.
19191  #
19192  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19193  # It is also a way to make sure we got the proper file name for the real test later on.
19194  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19195  if test "x$test_shortpath" = x; then
19196    # Short path failed, file does not exist as specified.
19197    # Try adding .exe or .cmd
19198    if test -f "${new_path}.exe"; then
19199      input_to_shortpath="${new_path}.exe"
19200    elif test -f "${new_path}.cmd"; then
19201      input_to_shortpath="${new_path}.cmd"
19202    else
19203      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19204$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19205      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19206$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19207      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19208    fi
19209  else
19210    input_to_shortpath="$new_path"
19211  fi
19212
19213  # Call helper function which possibly converts this using DOS-style short mode.
19214  # If so, the updated path is stored in $new_path.
19215  new_path="$input_to_shortpath"
19216
19217  input_path="$input_to_shortpath"
19218  # Check if we need to convert this using DOS-style short mode. If the path
19219  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19220  # take no chances and rewrite it.
19221  # Note: m4 eats our [], so we need to use [ and ] instead.
19222  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19223  if test "x$has_forbidden_chars" != x; then
19224    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19225    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19226    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19227    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19228      # Going to short mode and back again did indeed matter. Since short mode is
19229      # case insensitive, let's make it lowercase to improve readability.
19230      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19231      # Now convert it back to Unix-style (cygpath)
19232      input_path=`$CYGPATH -u "$shortmode_path"`
19233      new_path="$input_path"
19234    fi
19235  fi
19236
19237  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19238  if test "x$test_cygdrive_prefix" = x; then
19239    # As a simple fix, exclude /usr/bin since it's not a real path.
19240    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19241      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19242      # a path prefixed by /cygdrive for fixpath to work.
19243      new_path="$CYGWIN_ROOT_PATH$input_path"
19244    fi
19245  fi
19246
19247  # remove trailing .exe if any
19248  new_path="${new_path/%.exe/}"
19249
19250    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19251
19252  # First separate the path from the arguments. This will split at the first
19253  # space.
19254  complete="$FOUND_MAKE"
19255  path="${complete%% *}"
19256  tmp="$complete EOL"
19257  arguments="${tmp#* }"
19258
19259  # Input might be given as Windows format, start by converting to
19260  # unix format.
19261  new_path="$path"
19262
19263  windows_path="$new_path"
19264  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19265    unix_path=`$CYGPATH -u "$windows_path"`
19266    new_path="$unix_path"
19267  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19268    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19269    new_path="$unix_path"
19270  fi
19271
19272
19273  # Now try to locate executable using which
19274  new_path=`$WHICH "$new_path" 2> /dev/null`
19275
19276  if test "x$new_path" = x; then
19277    # Oops. Which didn't find the executable.
19278    # The splitting of arguments from the executable at a space might have been incorrect,
19279    # since paths with space are more likely in Windows. Give it another try with the whole
19280    # argument.
19281    path="$complete"
19282    arguments="EOL"
19283    new_path="$path"
19284
19285  windows_path="$new_path"
19286  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19287    unix_path=`$CYGPATH -u "$windows_path"`
19288    new_path="$unix_path"
19289  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19290    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19291    new_path="$unix_path"
19292  fi
19293
19294
19295    new_path=`$WHICH "$new_path" 2> /dev/null`
19296    # bat and cmd files are not always considered executable in MSYS causing which
19297    # to not find them
19298    if test "x$new_path" = x \
19299        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19300        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19301      new_path="$path"
19302
19303  windows_path="$new_path"
19304  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19305    unix_path=`$CYGPATH -u "$windows_path"`
19306    new_path="$unix_path"
19307  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19308    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19309    new_path="$unix_path"
19310  fi
19311
19312    fi
19313
19314    if test "x$new_path" = x; then
19315      # It's still not found. Now this is an unrecoverable error.
19316      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19317$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19318      has_space=`$ECHO "$complete" | $GREP " "`
19319      if test "x$has_space" != x; then
19320        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19321$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19322      fi
19323      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19324    fi
19325  fi
19326
19327  # Now new_path has a complete unix path to the binary
19328  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19329    # Keep paths in /bin as-is, but remove trailing .exe if any
19330    new_path="${new_path/%.exe/}"
19331    # Do not save /bin paths to all_fixpath_prefixes!
19332  else
19333    # Not in mixed or Windows style, start by that.
19334    new_path=`cmd //c echo $new_path`
19335
19336  input_path="$new_path"
19337  # Check if we need to convert this using DOS-style short mode. If the path
19338  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19339  # take no chances and rewrite it.
19340  # Note: m4 eats our [], so we need to use [ and ] instead.
19341  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19342  if test "x$has_forbidden_chars" != x; then
19343    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19344    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19345  fi
19346
19347    # Output is in $new_path
19348
19349  windows_path="$new_path"
19350  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19351    unix_path=`$CYGPATH -u "$windows_path"`
19352    new_path="$unix_path"
19353  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19354    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19355    new_path="$unix_path"
19356  fi
19357
19358    # remove trailing .exe if any
19359    new_path="${new_path/%.exe/}"
19360
19361    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19362    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19363  fi
19364
19365    else
19366      # We're on a unix platform. Hooray! :)
19367      # First separate the path from the arguments. This will split at the first
19368      # space.
19369      complete="$FOUND_MAKE"
19370      path="${complete%% *}"
19371      tmp="$complete EOL"
19372      arguments="${tmp#* }"
19373
19374      # Cannot rely on the command "which" here since it doesn't always work.
19375      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19376      if test -z "$is_absolute_path"; then
19377        # Path to executable is not absolute. Find it.
19378        IFS_save="$IFS"
19379        IFS=:
19380        for p in $PATH; do
19381          if test -f "$p/$path" && test -x "$p/$path"; then
19382            new_path="$p/$path"
19383            break
19384          fi
19385        done
19386        IFS="$IFS_save"
19387      else
19388        # This is an absolute path, we can use it without further modifications.
19389        new_path="$path"
19390      fi
19391
19392      if test "x$new_path" = x; then
19393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19394$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19395        has_space=`$ECHO "$complete" | $GREP " "`
19396        if test "x$has_space" != x; then
19397          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19398$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19399        fi
19400        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19401      fi
19402    fi
19403
19404    # Now join together the path and the arguments once again
19405    if test "x$arguments" != xEOL; then
19406      new_complete="$new_path ${arguments% *}"
19407    else
19408      new_complete="$new_path"
19409    fi
19410
19411    if test "x$complete" != "x$new_complete"; then
19412      FOUND_MAKE="$new_complete"
19413      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19414$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19415    fi
19416  fi
19417
19418        fi
19419      fi
19420    fi
19421  fi
19422
19423    fi
19424
19425    if test "x$FOUND_MAKE" = x; then
19426      if test "x$TOOLCHAIN_PATH" != x; then
19427        # We have a toolchain path, check that as well before giving up.
19428        OLD_PATH=$PATH
19429        PATH=$TOOLCHAIN_PATH:$PATH
19430        for ac_prog in gmake
19431do
19432  # Extract the first word of "$ac_prog", so it can be a program name with args.
19433set dummy $ac_prog; ac_word=$2
19434{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19435$as_echo_n "checking for $ac_word... " >&6; }
19436if ${ac_cv_path_CHECK_TOOLSDIR_GMAKE+:} false; then :
19437  $as_echo_n "(cached) " >&6
19438else
19439  case $CHECK_TOOLSDIR_GMAKE in
19440  [\\/]* | ?:[\\/]*)
19441  ac_cv_path_CHECK_TOOLSDIR_GMAKE="$CHECK_TOOLSDIR_GMAKE" # Let the user override the test with a path.
19442  ;;
19443  *)
19444  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19445for as_dir in $PATH
19446do
19447  IFS=$as_save_IFS
19448  test -z "$as_dir" && as_dir=.
19449    for ac_exec_ext in '' $ac_executable_extensions; do
19450  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19451    ac_cv_path_CHECK_TOOLSDIR_GMAKE="$as_dir/$ac_word$ac_exec_ext"
19452    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19453    break 2
19454  fi
19455done
19456  done
19457IFS=$as_save_IFS
19458
19459  ;;
19460esac
19461fi
19462CHECK_TOOLSDIR_GMAKE=$ac_cv_path_CHECK_TOOLSDIR_GMAKE
19463if test -n "$CHECK_TOOLSDIR_GMAKE"; then
19464  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_GMAKE" >&5
19465$as_echo "$CHECK_TOOLSDIR_GMAKE" >&6; }
19466else
19467  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19468$as_echo "no" >&6; }
19469fi
19470
19471
19472  test -n "$CHECK_TOOLSDIR_GMAKE" && break
19473done
19474
19475
19476  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_GMAKE""
19477  DESCRIPTION="gmake in tools-dir"
19478
19479  # On Cygwin, we require a newer version of make than on other platforms
19480  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19481    MAKE_VERSION_EXPR="-e 4\."
19482    MAKE_REQUIRED_VERSION="4.0"
19483   else
19484    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19485    MAKE_REQUIRED_VERSION="3.81"
19486  fi
19487
19488  if test "x$MAKE_CANDIDATE" != x; then
19489    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19490$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19491    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19492    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19493    if test "x$IS_GNU_MAKE" = x; then
19494      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19495$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19496    else
19497      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19498      if test "x$IS_MODERN_MAKE" = x; then
19499        { $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
19500$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;}
19501      else
19502        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19503          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19504            MAKE_EXPECTED_ENV='cygwin'
19505          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19506            MAKE_EXPECTED_ENV='msys'
19507          else
19508            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19509          fi
19510          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19511          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19512        else
19513          # Not relevant for non-Windows
19514          IS_MAKE_CORRECT_ENV=true
19515        fi
19516        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19517          { $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
19518$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;}
19519        else
19520          FOUND_MAKE=$MAKE_CANDIDATE
19521
19522  # Only process if variable expands to non-empty
19523
19524  if test "x$FOUND_MAKE" != x; then
19525    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19526
19527  # First separate the path from the arguments. This will split at the first
19528  # space.
19529  complete="$FOUND_MAKE"
19530  path="${complete%% *}"
19531  tmp="$complete EOL"
19532  arguments="${tmp#* }"
19533
19534  # Input might be given as Windows format, start by converting to
19535  # unix format.
19536  new_path=`$CYGPATH -u "$path"`
19537
19538  # Now try to locate executable using which
19539  new_path=`$WHICH "$new_path" 2> /dev/null`
19540  # bat and cmd files are not always considered executable in cygwin causing which
19541  # to not find them
19542  if test "x$new_path" = x \
19543      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19544      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19545    new_path=`$CYGPATH -u "$path"`
19546  fi
19547  if test "x$new_path" = x; then
19548    # Oops. Which didn't find the executable.
19549    # The splitting of arguments from the executable at a space might have been incorrect,
19550    # since paths with space are more likely in Windows. Give it another try with the whole
19551    # argument.
19552    path="$complete"
19553    arguments="EOL"
19554    new_path=`$CYGPATH -u "$path"`
19555    new_path=`$WHICH "$new_path" 2> /dev/null`
19556    # bat and cmd files are not always considered executable in cygwin causing which
19557    # to not find them
19558    if test "x$new_path" = x \
19559        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19560        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19561      new_path=`$CYGPATH -u "$path"`
19562    fi
19563    if test "x$new_path" = x; then
19564      # It's still not found. Now this is an unrecoverable error.
19565      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19566$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19567      has_space=`$ECHO "$complete" | $GREP " "`
19568      if test "x$has_space" != x; then
19569        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19570$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19571      fi
19572      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19573    fi
19574  fi
19575
19576  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19577  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19578  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19579  # "foo.exe" is OK but "foo" is an error.
19580  #
19581  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19582  # It is also a way to make sure we got the proper file name for the real test later on.
19583  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19584  if test "x$test_shortpath" = x; then
19585    # Short path failed, file does not exist as specified.
19586    # Try adding .exe or .cmd
19587    if test -f "${new_path}.exe"; then
19588      input_to_shortpath="${new_path}.exe"
19589    elif test -f "${new_path}.cmd"; then
19590      input_to_shortpath="${new_path}.cmd"
19591    else
19592      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19593$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19594      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19595$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19596      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19597    fi
19598  else
19599    input_to_shortpath="$new_path"
19600  fi
19601
19602  # Call helper function which possibly converts this using DOS-style short mode.
19603  # If so, the updated path is stored in $new_path.
19604  new_path="$input_to_shortpath"
19605
19606  input_path="$input_to_shortpath"
19607  # Check if we need to convert this using DOS-style short mode. If the path
19608  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19609  # take no chances and rewrite it.
19610  # Note: m4 eats our [], so we need to use [ and ] instead.
19611  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19612  if test "x$has_forbidden_chars" != x; then
19613    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19614    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19615    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19616    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
19617      # Going to short mode and back again did indeed matter. Since short mode is
19618      # case insensitive, let's make it lowercase to improve readability.
19619      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19620      # Now convert it back to Unix-style (cygpath)
19621      input_path=`$CYGPATH -u "$shortmode_path"`
19622      new_path="$input_path"
19623    fi
19624  fi
19625
19626  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
19627  if test "x$test_cygdrive_prefix" = x; then
19628    # As a simple fix, exclude /usr/bin since it's not a real path.
19629    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
19630      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
19631      # a path prefixed by /cygdrive for fixpath to work.
19632      new_path="$CYGWIN_ROOT_PATH$input_path"
19633    fi
19634  fi
19635
19636  # remove trailing .exe if any
19637  new_path="${new_path/%.exe/}"
19638
19639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19640
19641  # First separate the path from the arguments. This will split at the first
19642  # space.
19643  complete="$FOUND_MAKE"
19644  path="${complete%% *}"
19645  tmp="$complete EOL"
19646  arguments="${tmp#* }"
19647
19648  # Input might be given as Windows format, start by converting to
19649  # unix format.
19650  new_path="$path"
19651
19652  windows_path="$new_path"
19653  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19654    unix_path=`$CYGPATH -u "$windows_path"`
19655    new_path="$unix_path"
19656  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19657    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19658    new_path="$unix_path"
19659  fi
19660
19661
19662  # Now try to locate executable using which
19663  new_path=`$WHICH "$new_path" 2> /dev/null`
19664
19665  if test "x$new_path" = x; then
19666    # Oops. Which didn't find the executable.
19667    # The splitting of arguments from the executable at a space might have been incorrect,
19668    # since paths with space are more likely in Windows. Give it another try with the whole
19669    # argument.
19670    path="$complete"
19671    arguments="EOL"
19672    new_path="$path"
19673
19674  windows_path="$new_path"
19675  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19676    unix_path=`$CYGPATH -u "$windows_path"`
19677    new_path="$unix_path"
19678  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19679    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19680    new_path="$unix_path"
19681  fi
19682
19683
19684    new_path=`$WHICH "$new_path" 2> /dev/null`
19685    # bat and cmd files are not always considered executable in MSYS causing which
19686    # to not find them
19687    if test "x$new_path" = x \
19688        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19689        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19690      new_path="$path"
19691
19692  windows_path="$new_path"
19693  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19694    unix_path=`$CYGPATH -u "$windows_path"`
19695    new_path="$unix_path"
19696  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19697    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19698    new_path="$unix_path"
19699  fi
19700
19701    fi
19702
19703    if test "x$new_path" = x; then
19704      # It's still not found. Now this is an unrecoverable error.
19705      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19706$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19707      has_space=`$ECHO "$complete" | $GREP " "`
19708      if test "x$has_space" != x; then
19709        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19710$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19711      fi
19712      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19713    fi
19714  fi
19715
19716  # Now new_path has a complete unix path to the binary
19717  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
19718    # Keep paths in /bin as-is, but remove trailing .exe if any
19719    new_path="${new_path/%.exe/}"
19720    # Do not save /bin paths to all_fixpath_prefixes!
19721  else
19722    # Not in mixed or Windows style, start by that.
19723    new_path=`cmd //c echo $new_path`
19724
19725  input_path="$new_path"
19726  # Check if we need to convert this using DOS-style short mode. If the path
19727  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19728  # take no chances and rewrite it.
19729  # Note: m4 eats our [], so we need to use [ and ] instead.
19730  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
19731  if test "x$has_forbidden_chars" != x; then
19732    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19733    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
19734  fi
19735
19736    # Output is in $new_path
19737
19738  windows_path="$new_path"
19739  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19740    unix_path=`$CYGPATH -u "$windows_path"`
19741    new_path="$unix_path"
19742  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19743    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
19744    new_path="$unix_path"
19745  fi
19746
19747    # remove trailing .exe if any
19748    new_path="${new_path/%.exe/}"
19749
19750    # Save the first 10 bytes of this path to the storage, so fixpath can work.
19751    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
19752  fi
19753
19754    else
19755      # We're on a unix platform. Hooray! :)
19756      # First separate the path from the arguments. This will split at the first
19757      # space.
19758      complete="$FOUND_MAKE"
19759      path="${complete%% *}"
19760      tmp="$complete EOL"
19761      arguments="${tmp#* }"
19762
19763      # Cannot rely on the command "which" here since it doesn't always work.
19764      is_absolute_path=`$ECHO "$path" | $GREP ^/`
19765      if test -z "$is_absolute_path"; then
19766        # Path to executable is not absolute. Find it.
19767        IFS_save="$IFS"
19768        IFS=:
19769        for p in $PATH; do
19770          if test -f "$p/$path" && test -x "$p/$path"; then
19771            new_path="$p/$path"
19772            break
19773          fi
19774        done
19775        IFS="$IFS_save"
19776      else
19777        # This is an absolute path, we can use it without further modifications.
19778        new_path="$path"
19779      fi
19780
19781      if test "x$new_path" = x; then
19782        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19783$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19784        has_space=`$ECHO "$complete" | $GREP " "`
19785        if test "x$has_space" != x; then
19786          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
19787$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
19788        fi
19789        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19790      fi
19791    fi
19792
19793    # Now join together the path and the arguments once again
19794    if test "x$arguments" != xEOL; then
19795      new_complete="$new_path ${arguments% *}"
19796    else
19797      new_complete="$new_path"
19798    fi
19799
19800    if test "x$complete" != "x$new_complete"; then
19801      FOUND_MAKE="$new_complete"
19802      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
19803$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
19804    fi
19805  fi
19806
19807        fi
19808      fi
19809    fi
19810  fi
19811
19812        if test "x$FOUND_MAKE" = x; then
19813          for ac_prog in make
19814do
19815  # Extract the first word of "$ac_prog", so it can be a program name with args.
19816set dummy $ac_prog; ac_word=$2
19817{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
19818$as_echo_n "checking for $ac_word... " >&6; }
19819if ${ac_cv_path_CHECK_TOOLSDIR_MAKE+:} false; then :
19820  $as_echo_n "(cached) " >&6
19821else
19822  case $CHECK_TOOLSDIR_MAKE in
19823  [\\/]* | ?:[\\/]*)
19824  ac_cv_path_CHECK_TOOLSDIR_MAKE="$CHECK_TOOLSDIR_MAKE" # Let the user override the test with a path.
19825  ;;
19826  *)
19827  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
19828for as_dir in $PATH
19829do
19830  IFS=$as_save_IFS
19831  test -z "$as_dir" && as_dir=.
19832    for ac_exec_ext in '' $ac_executable_extensions; do
19833  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
19834    ac_cv_path_CHECK_TOOLSDIR_MAKE="$as_dir/$ac_word$ac_exec_ext"
19835    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
19836    break 2
19837  fi
19838done
19839  done
19840IFS=$as_save_IFS
19841
19842  ;;
19843esac
19844fi
19845CHECK_TOOLSDIR_MAKE=$ac_cv_path_CHECK_TOOLSDIR_MAKE
19846if test -n "$CHECK_TOOLSDIR_MAKE"; then
19847  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CHECK_TOOLSDIR_MAKE" >&5
19848$as_echo "$CHECK_TOOLSDIR_MAKE" >&6; }
19849else
19850  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
19851$as_echo "no" >&6; }
19852fi
19853
19854
19855  test -n "$CHECK_TOOLSDIR_MAKE" && break
19856done
19857
19858
19859  MAKE_CANDIDATE=""$CHECK_TOOLSDIR_MAKE""
19860  DESCRIPTION="make in tools-dir"
19861
19862  # On Cygwin, we require a newer version of make than on other platforms
19863  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19864    MAKE_VERSION_EXPR="-e 4\."
19865    MAKE_REQUIRED_VERSION="4.0"
19866   else
19867    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
19868    MAKE_REQUIRED_VERSION="3.81"
19869  fi
19870
19871  if test "x$MAKE_CANDIDATE" != x; then
19872    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
19873$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
19874    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
19875    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
19876    if test "x$IS_GNU_MAKE" = x; then
19877      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
19878$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
19879    else
19880      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
19881      if test "x$IS_MODERN_MAKE" = x; then
19882        { $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
19883$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;}
19884      else
19885        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
19886          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19887            MAKE_EXPECTED_ENV='cygwin'
19888          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
19889            MAKE_EXPECTED_ENV='msys'
19890          else
19891            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
19892          fi
19893          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
19894          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
19895        else
19896          # Not relevant for non-Windows
19897          IS_MAKE_CORRECT_ENV=true
19898        fi
19899        if test "x$IS_MAKE_CORRECT_ENV" = x; then
19900          { $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
19901$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;}
19902        else
19903          FOUND_MAKE=$MAKE_CANDIDATE
19904
19905  # Only process if variable expands to non-empty
19906
19907  if test "x$FOUND_MAKE" != x; then
19908    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
19909
19910  # First separate the path from the arguments. This will split at the first
19911  # space.
19912  complete="$FOUND_MAKE"
19913  path="${complete%% *}"
19914  tmp="$complete EOL"
19915  arguments="${tmp#* }"
19916
19917  # Input might be given as Windows format, start by converting to
19918  # unix format.
19919  new_path=`$CYGPATH -u "$path"`
19920
19921  # Now try to locate executable using which
19922  new_path=`$WHICH "$new_path" 2> /dev/null`
19923  # bat and cmd files are not always considered executable in cygwin causing which
19924  # to not find them
19925  if test "x$new_path" = x \
19926      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19927      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19928    new_path=`$CYGPATH -u "$path"`
19929  fi
19930  if test "x$new_path" = x; then
19931    # Oops. Which didn't find the executable.
19932    # The splitting of arguments from the executable at a space might have been incorrect,
19933    # since paths with space are more likely in Windows. Give it another try with the whole
19934    # argument.
19935    path="$complete"
19936    arguments="EOL"
19937    new_path=`$CYGPATH -u "$path"`
19938    new_path=`$WHICH "$new_path" 2> /dev/null`
19939    # bat and cmd files are not always considered executable in cygwin causing which
19940    # to not find them
19941    if test "x$new_path" = x \
19942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
19943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
19944      new_path=`$CYGPATH -u "$path"`
19945    fi
19946    if test "x$new_path" = x; then
19947      # It's still not found. Now this is an unrecoverable error.
19948      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
19949$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
19950      has_space=`$ECHO "$complete" | $GREP " "`
19951      if test "x$has_space" != x; then
19952        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
19953$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
19954      fi
19955      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19956    fi
19957  fi
19958
19959  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
19960  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
19961  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
19962  # "foo.exe" is OK but "foo" is an error.
19963  #
19964  # This test is therefore slightly more accurate than "test -f" to check for file presence.
19965  # It is also a way to make sure we got the proper file name for the real test later on.
19966  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
19967  if test "x$test_shortpath" = x; then
19968    # Short path failed, file does not exist as specified.
19969    # Try adding .exe or .cmd
19970    if test -f "${new_path}.exe"; then
19971      input_to_shortpath="${new_path}.exe"
19972    elif test -f "${new_path}.cmd"; then
19973      input_to_shortpath="${new_path}.cmd"
19974    else
19975      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
19976$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
19977      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
19978$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
19979      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
19980    fi
19981  else
19982    input_to_shortpath="$new_path"
19983  fi
19984
19985  # Call helper function which possibly converts this using DOS-style short mode.
19986  # If so, the updated path is stored in $new_path.
19987  new_path="$input_to_shortpath"
19988
19989  input_path="$input_to_shortpath"
19990  # Check if we need to convert this using DOS-style short mode. If the path
19991  # contains just simple characters, use it. Otherwise (spaces, weird characters),
19992  # take no chances and rewrite it.
19993  # Note: m4 eats our [], so we need to use [ and ] instead.
19994  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
19995  if test "x$has_forbidden_chars" != x; then
19996    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
19997    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
19998    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
19999    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20000      # Going to short mode and back again did indeed matter. Since short mode is
20001      # case insensitive, let's make it lowercase to improve readability.
20002      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20003      # Now convert it back to Unix-style (cygpath)
20004      input_path=`$CYGPATH -u "$shortmode_path"`
20005      new_path="$input_path"
20006    fi
20007  fi
20008
20009  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20010  if test "x$test_cygdrive_prefix" = x; then
20011    # As a simple fix, exclude /usr/bin since it's not a real path.
20012    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20013      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20014      # a path prefixed by /cygdrive for fixpath to work.
20015      new_path="$CYGWIN_ROOT_PATH$input_path"
20016    fi
20017  fi
20018
20019  # remove trailing .exe if any
20020  new_path="${new_path/%.exe/}"
20021
20022    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20023
20024  # First separate the path from the arguments. This will split at the first
20025  # space.
20026  complete="$FOUND_MAKE"
20027  path="${complete%% *}"
20028  tmp="$complete EOL"
20029  arguments="${tmp#* }"
20030
20031  # Input might be given as Windows format, start by converting to
20032  # unix format.
20033  new_path="$path"
20034
20035  windows_path="$new_path"
20036  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20037    unix_path=`$CYGPATH -u "$windows_path"`
20038    new_path="$unix_path"
20039  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20040    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20041    new_path="$unix_path"
20042  fi
20043
20044
20045  # Now try to locate executable using which
20046  new_path=`$WHICH "$new_path" 2> /dev/null`
20047
20048  if test "x$new_path" = x; then
20049    # Oops. Which didn't find the executable.
20050    # The splitting of arguments from the executable at a space might have been incorrect,
20051    # since paths with space are more likely in Windows. Give it another try with the whole
20052    # argument.
20053    path="$complete"
20054    arguments="EOL"
20055    new_path="$path"
20056
20057  windows_path="$new_path"
20058  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20059    unix_path=`$CYGPATH -u "$windows_path"`
20060    new_path="$unix_path"
20061  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20062    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20063    new_path="$unix_path"
20064  fi
20065
20066
20067    new_path=`$WHICH "$new_path" 2> /dev/null`
20068    # bat and cmd files are not always considered executable in MSYS causing which
20069    # to not find them
20070    if test "x$new_path" = x \
20071        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20072        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20073      new_path="$path"
20074
20075  windows_path="$new_path"
20076  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20077    unix_path=`$CYGPATH -u "$windows_path"`
20078    new_path="$unix_path"
20079  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20080    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20081    new_path="$unix_path"
20082  fi
20083
20084    fi
20085
20086    if test "x$new_path" = x; then
20087      # It's still not found. Now this is an unrecoverable error.
20088      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20089$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20090      has_space=`$ECHO "$complete" | $GREP " "`
20091      if test "x$has_space" != x; then
20092        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20093$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20094      fi
20095      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20096    fi
20097  fi
20098
20099  # Now new_path has a complete unix path to the binary
20100  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20101    # Keep paths in /bin as-is, but remove trailing .exe if any
20102    new_path="${new_path/%.exe/}"
20103    # Do not save /bin paths to all_fixpath_prefixes!
20104  else
20105    # Not in mixed or Windows style, start by that.
20106    new_path=`cmd //c echo $new_path`
20107
20108  input_path="$new_path"
20109  # Check if we need to convert this using DOS-style short mode. If the path
20110  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20111  # take no chances and rewrite it.
20112  # Note: m4 eats our [], so we need to use [ and ] instead.
20113  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20114  if test "x$has_forbidden_chars" != x; then
20115    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20116    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20117  fi
20118
20119    # Output is in $new_path
20120
20121  windows_path="$new_path"
20122  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20123    unix_path=`$CYGPATH -u "$windows_path"`
20124    new_path="$unix_path"
20125  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20126    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20127    new_path="$unix_path"
20128  fi
20129
20130    # remove trailing .exe if any
20131    new_path="${new_path/%.exe/}"
20132
20133    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20134    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20135  fi
20136
20137    else
20138      # We're on a unix platform. Hooray! :)
20139      # First separate the path from the arguments. This will split at the first
20140      # space.
20141      complete="$FOUND_MAKE"
20142      path="${complete%% *}"
20143      tmp="$complete EOL"
20144      arguments="${tmp#* }"
20145
20146      # Cannot rely on the command "which" here since it doesn't always work.
20147      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20148      if test -z "$is_absolute_path"; then
20149        # Path to executable is not absolute. Find it.
20150        IFS_save="$IFS"
20151        IFS=:
20152        for p in $PATH; do
20153          if test -f "$p/$path" && test -x "$p/$path"; then
20154            new_path="$p/$path"
20155            break
20156          fi
20157        done
20158        IFS="$IFS_save"
20159      else
20160        # This is an absolute path, we can use it without further modifications.
20161        new_path="$path"
20162      fi
20163
20164      if test "x$new_path" = x; then
20165        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20166$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20167        has_space=`$ECHO "$complete" | $GREP " "`
20168        if test "x$has_space" != x; then
20169          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20170$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20171        fi
20172        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20173      fi
20174    fi
20175
20176    # Now join together the path and the arguments once again
20177    if test "x$arguments" != xEOL; then
20178      new_complete="$new_path ${arguments% *}"
20179    else
20180      new_complete="$new_path"
20181    fi
20182
20183    if test "x$complete" != "x$new_complete"; then
20184      FOUND_MAKE="$new_complete"
20185      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20186$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20187    fi
20188  fi
20189
20190        fi
20191      fi
20192    fi
20193  fi
20194
20195        fi
20196        PATH=$OLD_PATH
20197      fi
20198    fi
20199
20200    if test "x$FOUND_MAKE" = x; then
20201      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
20202    fi
20203
20204    else
20205      # If it succeeded, then it was overridden by the user. We will use it
20206      # for the tool.
20207
20208      # First remove it from the list of overridden variables, so we can test
20209      # for unknown variables in the end.
20210      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20211
20212      # Check if we try to supply an empty value
20213      if test "x$MAKE" = x; then
20214        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool MAKE= (no value)" >&5
20215$as_echo "$as_me: Setting user supplied tool MAKE= (no value)" >&6;}
20216        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20217$as_echo_n "checking for MAKE... " >&6; }
20218        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20219$as_echo "disabled" >&6; }
20220      else
20221        # Check if the provided tool contains a complete path.
20222        tool_specified="$MAKE"
20223        tool_basename="${tool_specified##*/}"
20224        if test "x$tool_basename" = "x$tool_specified"; then
20225          # A command without a complete path is provided, search $PATH.
20226          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool MAKE=$tool_basename" >&5
20227$as_echo "$as_me: Will search for user supplied tool MAKE=$tool_basename" >&6;}
20228          # Extract the first word of "$tool_basename", so it can be a program name with args.
20229set dummy $tool_basename; ac_word=$2
20230{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20231$as_echo_n "checking for $ac_word... " >&6; }
20232if ${ac_cv_path_MAKE+:} false; then :
20233  $as_echo_n "(cached) " >&6
20234else
20235  case $MAKE in
20236  [\\/]* | ?:[\\/]*)
20237  ac_cv_path_MAKE="$MAKE" # Let the user override the test with a path.
20238  ;;
20239  *)
20240  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20241for as_dir in $PATH
20242do
20243  IFS=$as_save_IFS
20244  test -z "$as_dir" && as_dir=.
20245    for ac_exec_ext in '' $ac_executable_extensions; do
20246  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20247    ac_cv_path_MAKE="$as_dir/$ac_word$ac_exec_ext"
20248    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20249    break 2
20250  fi
20251done
20252  done
20253IFS=$as_save_IFS
20254
20255  ;;
20256esac
20257fi
20258MAKE=$ac_cv_path_MAKE
20259if test -n "$MAKE"; then
20260  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAKE" >&5
20261$as_echo "$MAKE" >&6; }
20262else
20263  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20264$as_echo "no" >&6; }
20265fi
20266
20267
20268          if test "x$MAKE" = x; then
20269            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20270          fi
20271        else
20272          # Otherwise we believe it is a complete path. Use it as it is.
20273          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool MAKE=$tool_specified" >&5
20274$as_echo "$as_me: Will use user supplied tool MAKE=$tool_specified" >&6;}
20275          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for MAKE" >&5
20276$as_echo_n "checking for MAKE... " >&6; }
20277          if test ! -x "$tool_specified"; then
20278            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20279$as_echo "not found" >&6; }
20280            as_fn_error $? "User supplied tool MAKE=$tool_specified does not exist or is not executable" "$LINENO" 5
20281          fi
20282          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20283$as_echo "$tool_specified" >&6; }
20284        fi
20285      fi
20286    fi
20287
20288    # If MAKE was set by user, verify the version
20289
20290  MAKE_CANDIDATE=""$MAKE""
20291  DESCRIPTION="user supplied MAKE=$MAKE"
20292
20293  # On Cygwin, we require a newer version of make than on other platforms
20294  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20295    MAKE_VERSION_EXPR="-e 4\."
20296    MAKE_REQUIRED_VERSION="4.0"
20297   else
20298    MAKE_VERSION_EXPR="-e 3\.8[12] -e 4\."
20299    MAKE_REQUIRED_VERSION="3.81"
20300  fi
20301
20302  if test "x$MAKE_CANDIDATE" != x; then
20303    { $as_echo "$as_me:${as_lineno-$LINENO}: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&5
20304$as_echo "$as_me: Testing potential make at $MAKE_CANDIDATE, found using $DESCRIPTION" >&6;}
20305    MAKE_VERSION_STRING=`$MAKE_CANDIDATE --version | $HEAD -n 1`
20306    IS_GNU_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP 'GNU Make'`
20307    if test "x$IS_GNU_MAKE" = x; then
20308      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&5
20309$as_echo "$as_me: Found potential make at $MAKE_CANDIDATE, however, this is not GNU Make. Ignoring." >&6;}
20310    else
20311      IS_MODERN_MAKE=`$ECHO $MAKE_VERSION_STRING | $GREP $MAKE_VERSION_EXPR`
20312      if test "x$IS_MODERN_MAKE" = x; then
20313        { $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
20314$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;}
20315      else
20316        if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
20317          if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20318            MAKE_EXPECTED_ENV='cygwin'
20319          elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20320            MAKE_EXPECTED_ENV='msys'
20321          else
20322            as_fn_error $? "Unknown Windows environment" "$LINENO" 5
20323          fi
20324          MAKE_BUILT_FOR=`$MAKE_CANDIDATE --version | $GREP -i 'built for'`
20325          IS_MAKE_CORRECT_ENV=`$ECHO $MAKE_BUILT_FOR | $GREP $MAKE_EXPECTED_ENV`
20326        else
20327          # Not relevant for non-Windows
20328          IS_MAKE_CORRECT_ENV=true
20329        fi
20330        if test "x$IS_MAKE_CORRECT_ENV" = x; then
20331          { $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
20332$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;}
20333        else
20334          FOUND_MAKE=$MAKE_CANDIDATE
20335
20336  # Only process if variable expands to non-empty
20337
20338  if test "x$FOUND_MAKE" != x; then
20339    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20340
20341  # First separate the path from the arguments. This will split at the first
20342  # space.
20343  complete="$FOUND_MAKE"
20344  path="${complete%% *}"
20345  tmp="$complete EOL"
20346  arguments="${tmp#* }"
20347
20348  # Input might be given as Windows format, start by converting to
20349  # unix format.
20350  new_path=`$CYGPATH -u "$path"`
20351
20352  # Now try to locate executable using which
20353  new_path=`$WHICH "$new_path" 2> /dev/null`
20354  # bat and cmd files are not always considered executable in cygwin causing which
20355  # to not find them
20356  if test "x$new_path" = x \
20357      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20358      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20359    new_path=`$CYGPATH -u "$path"`
20360  fi
20361  if test "x$new_path" = x; then
20362    # Oops. Which didn't find the executable.
20363    # The splitting of arguments from the executable at a space might have been incorrect,
20364    # since paths with space are more likely in Windows. Give it another try with the whole
20365    # argument.
20366    path="$complete"
20367    arguments="EOL"
20368    new_path=`$CYGPATH -u "$path"`
20369    new_path=`$WHICH "$new_path" 2> /dev/null`
20370    # bat and cmd files are not always considered executable in cygwin causing which
20371    # to not find them
20372    if test "x$new_path" = x \
20373        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20374        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20375      new_path=`$CYGPATH -u "$path"`
20376    fi
20377    if test "x$new_path" = x; then
20378      # It's still not found. Now this is an unrecoverable error.
20379      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20380$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20381      has_space=`$ECHO "$complete" | $GREP " "`
20382      if test "x$has_space" != x; then
20383        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20384$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20385      fi
20386      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20387    fi
20388  fi
20389
20390  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
20391  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
20392  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
20393  # "foo.exe" is OK but "foo" is an error.
20394  #
20395  # This test is therefore slightly more accurate than "test -f" to check for file presence.
20396  # It is also a way to make sure we got the proper file name for the real test later on.
20397  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
20398  if test "x$test_shortpath" = x; then
20399    # Short path failed, file does not exist as specified.
20400    # Try adding .exe or .cmd
20401    if test -f "${new_path}.exe"; then
20402      input_to_shortpath="${new_path}.exe"
20403    elif test -f "${new_path}.cmd"; then
20404      input_to_shortpath="${new_path}.cmd"
20405    else
20406      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&5
20407$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$new_path\", is invalid." >&6;}
20408      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
20409$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
20410      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20411    fi
20412  else
20413    input_to_shortpath="$new_path"
20414  fi
20415
20416  # Call helper function which possibly converts this using DOS-style short mode.
20417  # If so, the updated path is stored in $new_path.
20418  new_path="$input_to_shortpath"
20419
20420  input_path="$input_to_shortpath"
20421  # Check if we need to convert this using DOS-style short mode. If the path
20422  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20423  # take no chances and rewrite it.
20424  # Note: m4 eats our [], so we need to use [ and ] instead.
20425  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
20426  if test "x$has_forbidden_chars" != x; then
20427    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20428    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
20429    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
20430    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
20431      # Going to short mode and back again did indeed matter. Since short mode is
20432      # case insensitive, let's make it lowercase to improve readability.
20433      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20434      # Now convert it back to Unix-style (cygpath)
20435      input_path=`$CYGPATH -u "$shortmode_path"`
20436      new_path="$input_path"
20437    fi
20438  fi
20439
20440  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
20441  if test "x$test_cygdrive_prefix" = x; then
20442    # As a simple fix, exclude /usr/bin since it's not a real path.
20443    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
20444      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
20445      # a path prefixed by /cygdrive for fixpath to work.
20446      new_path="$CYGWIN_ROOT_PATH$input_path"
20447    fi
20448  fi
20449
20450  # remove trailing .exe if any
20451  new_path="${new_path/%.exe/}"
20452
20453    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20454
20455  # First separate the path from the arguments. This will split at the first
20456  # space.
20457  complete="$FOUND_MAKE"
20458  path="${complete%% *}"
20459  tmp="$complete EOL"
20460  arguments="${tmp#* }"
20461
20462  # Input might be given as Windows format, start by converting to
20463  # unix format.
20464  new_path="$path"
20465
20466  windows_path="$new_path"
20467  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20468    unix_path=`$CYGPATH -u "$windows_path"`
20469    new_path="$unix_path"
20470  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20471    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20472    new_path="$unix_path"
20473  fi
20474
20475
20476  # Now try to locate executable using which
20477  new_path=`$WHICH "$new_path" 2> /dev/null`
20478
20479  if test "x$new_path" = x; then
20480    # Oops. Which didn't find the executable.
20481    # The splitting of arguments from the executable at a space might have been incorrect,
20482    # since paths with space are more likely in Windows. Give it another try with the whole
20483    # argument.
20484    path="$complete"
20485    arguments="EOL"
20486    new_path="$path"
20487
20488  windows_path="$new_path"
20489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20490    unix_path=`$CYGPATH -u "$windows_path"`
20491    new_path="$unix_path"
20492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20494    new_path="$unix_path"
20495  fi
20496
20497
20498    new_path=`$WHICH "$new_path" 2> /dev/null`
20499    # bat and cmd files are not always considered executable in MSYS causing which
20500    # to not find them
20501    if test "x$new_path" = x \
20502        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
20503        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
20504      new_path="$path"
20505
20506  windows_path="$new_path"
20507  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20508    unix_path=`$CYGPATH -u "$windows_path"`
20509    new_path="$unix_path"
20510  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20511    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20512    new_path="$unix_path"
20513  fi
20514
20515    fi
20516
20517    if test "x$new_path" = x; then
20518      # It's still not found. Now this is an unrecoverable error.
20519      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20520$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20521      has_space=`$ECHO "$complete" | $GREP " "`
20522      if test "x$has_space" != x; then
20523        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
20524$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
20525      fi
20526      as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20527    fi
20528  fi
20529
20530  # Now new_path has a complete unix path to the binary
20531  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
20532    # Keep paths in /bin as-is, but remove trailing .exe if any
20533    new_path="${new_path/%.exe/}"
20534    # Do not save /bin paths to all_fixpath_prefixes!
20535  else
20536    # Not in mixed or Windows style, start by that.
20537    new_path=`cmd //c echo $new_path`
20538
20539  input_path="$new_path"
20540  # Check if we need to convert this using DOS-style short mode. If the path
20541  # contains just simple characters, use it. Otherwise (spaces, weird characters),
20542  # take no chances and rewrite it.
20543  # Note: m4 eats our [], so we need to use [ and ] instead.
20544  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
20545  if test "x$has_forbidden_chars" != x; then
20546    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
20547    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
20548  fi
20549
20550    # Output is in $new_path
20551
20552  windows_path="$new_path"
20553  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
20554    unix_path=`$CYGPATH -u "$windows_path"`
20555    new_path="$unix_path"
20556  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
20557    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
20558    new_path="$unix_path"
20559  fi
20560
20561    # remove trailing .exe if any
20562    new_path="${new_path/%.exe/}"
20563
20564    # Save the first 10 bytes of this path to the storage, so fixpath can work.
20565    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
20566  fi
20567
20568    else
20569      # We're on a unix platform. Hooray! :)
20570      # First separate the path from the arguments. This will split at the first
20571      # space.
20572      complete="$FOUND_MAKE"
20573      path="${complete%% *}"
20574      tmp="$complete EOL"
20575      arguments="${tmp#* }"
20576
20577      # Cannot rely on the command "which" here since it doesn't always work.
20578      is_absolute_path=`$ECHO "$path" | $GREP ^/`
20579      if test -z "$is_absolute_path"; then
20580        # Path to executable is not absolute. Find it.
20581        IFS_save="$IFS"
20582        IFS=:
20583        for p in $PATH; do
20584          if test -f "$p/$path" && test -x "$p/$path"; then
20585            new_path="$p/$path"
20586            break
20587          fi
20588        done
20589        IFS="$IFS_save"
20590      else
20591        # This is an absolute path, we can use it without further modifications.
20592        new_path="$path"
20593      fi
20594
20595      if test "x$new_path" = x; then
20596        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&5
20597$as_echo "$as_me: The path of FOUND_MAKE, which resolves as \"$complete\", is not found." >&6;}
20598        has_space=`$ECHO "$complete" | $GREP " "`
20599        if test "x$has_space" != x; then
20600          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
20601$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
20602        fi
20603        as_fn_error $? "Cannot locate the the path of FOUND_MAKE" "$LINENO" 5
20604      fi
20605    fi
20606
20607    # Now join together the path and the arguments once again
20608    if test "x$arguments" != xEOL; then
20609      new_complete="$new_path ${arguments% *}"
20610    else
20611      new_complete="$new_path"
20612    fi
20613
20614    if test "x$complete" != "x$new_complete"; then
20615      FOUND_MAKE="$new_complete"
20616      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FOUND_MAKE to \"$new_complete\"" >&5
20617$as_echo "$as_me: Rewriting FOUND_MAKE to \"$new_complete\"" >&6;}
20618    fi
20619  fi
20620
20621        fi
20622      fi
20623    fi
20624  fi
20625
20626    if test "x$FOUND_MAKE" = x; then
20627      as_fn_error $? "The specified make (by MAKE=$MAKE) is not GNU make $MAKE_REQUIRED_VERSION or newer." "$LINENO" 5
20628    fi
20629
20630  fi
20631
20632
20633  MAKE=$FOUND_MAKE
20634
20635  { $as_echo "$as_me:${as_lineno-$LINENO}: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&5
20636$as_echo "$as_me: Using GNU make at $FOUND_MAKE (version: $MAKE_VERSION_STRING)" >&6;}
20637
20638
20639  # Check if make supports the output sync option and if so, setup using it.
20640  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if make --output-sync is supported" >&5
20641$as_echo_n "checking if make --output-sync is supported... " >&6; }
20642  if $MAKE --version -O > /dev/null 2>&1; then
20643    OUTPUT_SYNC_SUPPORTED=true
20644    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20645$as_echo "yes" >&6; }
20646    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for output-sync value" >&5
20647$as_echo_n "checking for output-sync value... " >&6; }
20648
20649# Check whether --with-output-sync was given.
20650if test "${with_output_sync+set}" = set; then :
20651  withval=$with_output_sync; OUTPUT_SYNC=$with_output_sync
20652fi
20653
20654    if test "x$OUTPUT_SYNC" = "x"; then
20655      OUTPUT_SYNC=none
20656    fi
20657    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_SYNC" >&5
20658$as_echo "$OUTPUT_SYNC" >&6; }
20659    if ! $MAKE --version -O$OUTPUT_SYNC > /dev/null 2>&1; then
20660      as_fn_error $? "Make did not the support the value $OUTPUT_SYNC as output sync type." "$LINENO" 5
20661    fi
20662  else
20663    OUTPUT_SYNC_SUPPORTED=false
20664    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20665$as_echo "no" >&6; }
20666  fi
20667
20668
20669
20670
20671
20672
20673  # Test if find supports -delete
20674  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if find supports -delete" >&5
20675$as_echo_n "checking if find supports -delete... " >&6; }
20676  FIND_DELETE="-delete"
20677
20678  DELETEDIR=`$MKTEMP -d tmp.XXXXXXXXXX` || (echo Could not create temporary directory!; exit $?)
20679
20680  echo Hejsan > $DELETEDIR/TestIfFindSupportsDelete
20681
20682  TEST_DELETE=`$FIND "$DELETEDIR" -name TestIfFindSupportsDelete $FIND_DELETE 2>&1`
20683  if test -f $DELETEDIR/TestIfFindSupportsDelete; then
20684    # No, it does not.
20685    rm $DELETEDIR/TestIfFindSupportsDelete
20686    if test "x$OPENJDK_TARGET_OS" = "xaix"; then
20687      # AIX 'find' is buggy if called with '-exec {} \+' and an empty file list
20688      FIND_DELETE="-print | xargs rm"
20689    else
20690      FIND_DELETE="-exec rm \{\} \+"
20691    fi
20692    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20693$as_echo "no" >&6; }
20694  else
20695    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
20696$as_echo "yes" >&6; }
20697  fi
20698  rmdir $DELETEDIR
20699
20700
20701
20702  # These tools might not be installed by default,
20703  # need hint on how to install them.
20704
20705
20706
20707  # Publish this variable in the help.
20708
20709
20710  if [ -z "${UNZIP+x}" ]; then
20711    # The variable is not set by user, try to locate tool using the code snippet
20712    for ac_prog in unzip
20713do
20714  # Extract the first word of "$ac_prog", so it can be a program name with args.
20715set dummy $ac_prog; ac_word=$2
20716{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20717$as_echo_n "checking for $ac_word... " >&6; }
20718if ${ac_cv_path_UNZIP+:} false; then :
20719  $as_echo_n "(cached) " >&6
20720else
20721  case $UNZIP in
20722  [\\/]* | ?:[\\/]*)
20723  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20724  ;;
20725  *)
20726  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20727for as_dir in $PATH
20728do
20729  IFS=$as_save_IFS
20730  test -z "$as_dir" && as_dir=.
20731    for ac_exec_ext in '' $ac_executable_extensions; do
20732  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20733    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20734    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20735    break 2
20736  fi
20737done
20738  done
20739IFS=$as_save_IFS
20740
20741  ;;
20742esac
20743fi
20744UNZIP=$ac_cv_path_UNZIP
20745if test -n "$UNZIP"; then
20746  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20747$as_echo "$UNZIP" >&6; }
20748else
20749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20750$as_echo "no" >&6; }
20751fi
20752
20753
20754  test -n "$UNZIP" && break
20755done
20756
20757  else
20758    # The variable is set, but is it from the command line or the environment?
20759
20760    # Try to remove the string !UNZIP! from our list.
20761    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!UNZIP!/}
20762    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20763      # If it failed, the variable was not from the command line. Ignore it,
20764      # but warn the user (except for BASH, which is always set by the calling BASH).
20765      if test "xUNZIP" != xBASH; then
20766        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&5
20767$as_echo "$as_me: WARNING: Ignoring value of UNZIP from the environment. Use command line variables instead." >&2;}
20768      fi
20769      # Try to locate tool using the code snippet
20770      for ac_prog in unzip
20771do
20772  # Extract the first word of "$ac_prog", so it can be a program name with args.
20773set dummy $ac_prog; ac_word=$2
20774{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20775$as_echo_n "checking for $ac_word... " >&6; }
20776if ${ac_cv_path_UNZIP+:} false; then :
20777  $as_echo_n "(cached) " >&6
20778else
20779  case $UNZIP in
20780  [\\/]* | ?:[\\/]*)
20781  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20782  ;;
20783  *)
20784  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20785for as_dir in $PATH
20786do
20787  IFS=$as_save_IFS
20788  test -z "$as_dir" && as_dir=.
20789    for ac_exec_ext in '' $ac_executable_extensions; do
20790  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20791    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20792    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20793    break 2
20794  fi
20795done
20796  done
20797IFS=$as_save_IFS
20798
20799  ;;
20800esac
20801fi
20802UNZIP=$ac_cv_path_UNZIP
20803if test -n "$UNZIP"; then
20804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20805$as_echo "$UNZIP" >&6; }
20806else
20807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20808$as_echo "no" >&6; }
20809fi
20810
20811
20812  test -n "$UNZIP" && break
20813done
20814
20815    else
20816      # If it succeeded, then it was overridden by the user. We will use it
20817      # for the tool.
20818
20819      # First remove it from the list of overridden variables, so we can test
20820      # for unknown variables in the end.
20821      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
20822
20823      # Check if we try to supply an empty value
20824      if test "x$UNZIP" = x; then
20825        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool UNZIP= (no value)" >&5
20826$as_echo "$as_me: Setting user supplied tool UNZIP= (no value)" >&6;}
20827        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20828$as_echo_n "checking for UNZIP... " >&6; }
20829        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
20830$as_echo "disabled" >&6; }
20831      else
20832        # Check if the provided tool contains a complete path.
20833        tool_specified="$UNZIP"
20834        tool_basename="${tool_specified##*/}"
20835        if test "x$tool_basename" = "x$tool_specified"; then
20836          # A command without a complete path is provided, search $PATH.
20837          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool UNZIP=$tool_basename" >&5
20838$as_echo "$as_me: Will search for user supplied tool UNZIP=$tool_basename" >&6;}
20839          # Extract the first word of "$tool_basename", so it can be a program name with args.
20840set dummy $tool_basename; ac_word=$2
20841{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20842$as_echo_n "checking for $ac_word... " >&6; }
20843if ${ac_cv_path_UNZIP+:} false; then :
20844  $as_echo_n "(cached) " >&6
20845else
20846  case $UNZIP in
20847  [\\/]* | ?:[\\/]*)
20848  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
20849  ;;
20850  *)
20851  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20852for as_dir in $PATH
20853do
20854  IFS=$as_save_IFS
20855  test -z "$as_dir" && as_dir=.
20856    for ac_exec_ext in '' $ac_executable_extensions; do
20857  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20858    ac_cv_path_UNZIP="$as_dir/$ac_word$ac_exec_ext"
20859    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20860    break 2
20861  fi
20862done
20863  done
20864IFS=$as_save_IFS
20865
20866  ;;
20867esac
20868fi
20869UNZIP=$ac_cv_path_UNZIP
20870if test -n "$UNZIP"; then
20871  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $UNZIP" >&5
20872$as_echo "$UNZIP" >&6; }
20873else
20874  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20875$as_echo "no" >&6; }
20876fi
20877
20878
20879          if test "x$UNZIP" = x; then
20880            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
20881          fi
20882        else
20883          # Otherwise we believe it is a complete path. Use it as it is.
20884          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool UNZIP=$tool_specified" >&5
20885$as_echo "$as_me: Will use user supplied tool UNZIP=$tool_specified" >&6;}
20886          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for UNZIP" >&5
20887$as_echo_n "checking for UNZIP... " >&6; }
20888          if test ! -x "$tool_specified"; then
20889            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
20890$as_echo "not found" >&6; }
20891            as_fn_error $? "User supplied tool UNZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
20892          fi
20893          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
20894$as_echo "$tool_specified" >&6; }
20895        fi
20896      fi
20897    fi
20898
20899  fi
20900
20901
20902
20903  if test "x$UNZIP" = x; then
20904    as_fn_error $? "Could not find required tool for UNZIP" "$LINENO" 5
20905  fi
20906
20907
20908
20909
20910
20911  # Publish this variable in the help.
20912
20913
20914  if [ -z "${ZIP+x}" ]; then
20915    # The variable is not set by user, try to locate tool using the code snippet
20916    for ac_prog in zip
20917do
20918  # Extract the first word of "$ac_prog", so it can be a program name with args.
20919set dummy $ac_prog; ac_word=$2
20920{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20921$as_echo_n "checking for $ac_word... " >&6; }
20922if ${ac_cv_path_ZIP+:} false; then :
20923  $as_echo_n "(cached) " >&6
20924else
20925  case $ZIP in
20926  [\\/]* | ?:[\\/]*)
20927  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20928  ;;
20929  *)
20930  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20931for as_dir in $PATH
20932do
20933  IFS=$as_save_IFS
20934  test -z "$as_dir" && as_dir=.
20935    for ac_exec_ext in '' $ac_executable_extensions; do
20936  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20937    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20938    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20939    break 2
20940  fi
20941done
20942  done
20943IFS=$as_save_IFS
20944
20945  ;;
20946esac
20947fi
20948ZIP=$ac_cv_path_ZIP
20949if test -n "$ZIP"; then
20950  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
20951$as_echo "$ZIP" >&6; }
20952else
20953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
20954$as_echo "no" >&6; }
20955fi
20956
20957
20958  test -n "$ZIP" && break
20959done
20960
20961  else
20962    # The variable is set, but is it from the command line or the environment?
20963
20964    # Try to remove the string !ZIP! from our list.
20965    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ZIP!/}
20966    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
20967      # If it failed, the variable was not from the command line. Ignore it,
20968      # but warn the user (except for BASH, which is always set by the calling BASH).
20969      if test "xZIP" != xBASH; then
20970        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&5
20971$as_echo "$as_me: WARNING: Ignoring value of ZIP from the environment. Use command line variables instead." >&2;}
20972      fi
20973      # Try to locate tool using the code snippet
20974      for ac_prog in zip
20975do
20976  # Extract the first word of "$ac_prog", so it can be a program name with args.
20977set dummy $ac_prog; ac_word=$2
20978{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
20979$as_echo_n "checking for $ac_word... " >&6; }
20980if ${ac_cv_path_ZIP+:} false; then :
20981  $as_echo_n "(cached) " >&6
20982else
20983  case $ZIP in
20984  [\\/]* | ?:[\\/]*)
20985  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
20986  ;;
20987  *)
20988  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
20989for as_dir in $PATH
20990do
20991  IFS=$as_save_IFS
20992  test -z "$as_dir" && as_dir=.
20993    for ac_exec_ext in '' $ac_executable_extensions; do
20994  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
20995    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
20996    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
20997    break 2
20998  fi
20999done
21000  done
21001IFS=$as_save_IFS
21002
21003  ;;
21004esac
21005fi
21006ZIP=$ac_cv_path_ZIP
21007if test -n "$ZIP"; then
21008  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21009$as_echo "$ZIP" >&6; }
21010else
21011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21012$as_echo "no" >&6; }
21013fi
21014
21015
21016  test -n "$ZIP" && break
21017done
21018
21019    else
21020      # If it succeeded, then it was overridden by the user. We will use it
21021      # for the tool.
21022
21023      # First remove it from the list of overridden variables, so we can test
21024      # for unknown variables in the end.
21025      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21026
21027      # Check if we try to supply an empty value
21028      if test "x$ZIP" = x; then
21029        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ZIP= (no value)" >&5
21030$as_echo "$as_me: Setting user supplied tool ZIP= (no value)" >&6;}
21031        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21032$as_echo_n "checking for ZIP... " >&6; }
21033        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21034$as_echo "disabled" >&6; }
21035      else
21036        # Check if the provided tool contains a complete path.
21037        tool_specified="$ZIP"
21038        tool_basename="${tool_specified##*/}"
21039        if test "x$tool_basename" = "x$tool_specified"; then
21040          # A command without a complete path is provided, search $PATH.
21041          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ZIP=$tool_basename" >&5
21042$as_echo "$as_me: Will search for user supplied tool ZIP=$tool_basename" >&6;}
21043          # Extract the first word of "$tool_basename", so it can be a program name with args.
21044set dummy $tool_basename; ac_word=$2
21045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21046$as_echo_n "checking for $ac_word... " >&6; }
21047if ${ac_cv_path_ZIP+:} false; then :
21048  $as_echo_n "(cached) " >&6
21049else
21050  case $ZIP in
21051  [\\/]* | ?:[\\/]*)
21052  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
21053  ;;
21054  *)
21055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21056for as_dir in $PATH
21057do
21058  IFS=$as_save_IFS
21059  test -z "$as_dir" && as_dir=.
21060    for ac_exec_ext in '' $ac_executable_extensions; do
21061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21062    ac_cv_path_ZIP="$as_dir/$ac_word$ac_exec_ext"
21063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21064    break 2
21065  fi
21066done
21067  done
21068IFS=$as_save_IFS
21069
21070  ;;
21071esac
21072fi
21073ZIP=$ac_cv_path_ZIP
21074if test -n "$ZIP"; then
21075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ZIP" >&5
21076$as_echo "$ZIP" >&6; }
21077else
21078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21079$as_echo "no" >&6; }
21080fi
21081
21082
21083          if test "x$ZIP" = x; then
21084            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21085          fi
21086        else
21087          # Otherwise we believe it is a complete path. Use it as it is.
21088          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ZIP=$tool_specified" >&5
21089$as_echo "$as_me: Will use user supplied tool ZIP=$tool_specified" >&6;}
21090          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ZIP" >&5
21091$as_echo_n "checking for ZIP... " >&6; }
21092          if test ! -x "$tool_specified"; then
21093            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21094$as_echo "not found" >&6; }
21095            as_fn_error $? "User supplied tool ZIP=$tool_specified does not exist or is not executable" "$LINENO" 5
21096          fi
21097          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21098$as_echo "$tool_specified" >&6; }
21099        fi
21100      fi
21101    fi
21102
21103  fi
21104
21105
21106
21107  if test "x$ZIP" = x; then
21108    as_fn_error $? "Could not find required tool for ZIP" "$LINENO" 5
21109  fi
21110
21111
21112
21113  # Non-required basic tools
21114
21115
21116
21117  # Publish this variable in the help.
21118
21119
21120  if [ -z "${LDD+x}" ]; then
21121    # The variable is not set by user, try to locate tool using the code snippet
21122    for ac_prog in ldd
21123do
21124  # Extract the first word of "$ac_prog", so it can be a program name with args.
21125set dummy $ac_prog; ac_word=$2
21126{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21127$as_echo_n "checking for $ac_word... " >&6; }
21128if ${ac_cv_path_LDD+:} false; then :
21129  $as_echo_n "(cached) " >&6
21130else
21131  case $LDD in
21132  [\\/]* | ?:[\\/]*)
21133  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21134  ;;
21135  *)
21136  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21137for as_dir in $PATH
21138do
21139  IFS=$as_save_IFS
21140  test -z "$as_dir" && as_dir=.
21141    for ac_exec_ext in '' $ac_executable_extensions; do
21142  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21143    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21144    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21145    break 2
21146  fi
21147done
21148  done
21149IFS=$as_save_IFS
21150
21151  ;;
21152esac
21153fi
21154LDD=$ac_cv_path_LDD
21155if test -n "$LDD"; then
21156  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21157$as_echo "$LDD" >&6; }
21158else
21159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21160$as_echo "no" >&6; }
21161fi
21162
21163
21164  test -n "$LDD" && break
21165done
21166
21167  else
21168    # The variable is set, but is it from the command line or the environment?
21169
21170    # Try to remove the string !LDD! from our list.
21171    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LDD!/}
21172    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21173      # If it failed, the variable was not from the command line. Ignore it,
21174      # but warn the user (except for BASH, which is always set by the calling BASH).
21175      if test "xLDD" != xBASH; then
21176        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&5
21177$as_echo "$as_me: WARNING: Ignoring value of LDD from the environment. Use command line variables instead." >&2;}
21178      fi
21179      # Try to locate tool using the code snippet
21180      for ac_prog in ldd
21181do
21182  # Extract the first word of "$ac_prog", so it can be a program name with args.
21183set dummy $ac_prog; ac_word=$2
21184{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21185$as_echo_n "checking for $ac_word... " >&6; }
21186if ${ac_cv_path_LDD+:} false; then :
21187  $as_echo_n "(cached) " >&6
21188else
21189  case $LDD in
21190  [\\/]* | ?:[\\/]*)
21191  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21192  ;;
21193  *)
21194  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21195for as_dir in $PATH
21196do
21197  IFS=$as_save_IFS
21198  test -z "$as_dir" && as_dir=.
21199    for ac_exec_ext in '' $ac_executable_extensions; do
21200  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21201    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21202    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21203    break 2
21204  fi
21205done
21206  done
21207IFS=$as_save_IFS
21208
21209  ;;
21210esac
21211fi
21212LDD=$ac_cv_path_LDD
21213if test -n "$LDD"; then
21214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21215$as_echo "$LDD" >&6; }
21216else
21217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21218$as_echo "no" >&6; }
21219fi
21220
21221
21222  test -n "$LDD" && break
21223done
21224
21225    else
21226      # If it succeeded, then it was overridden by the user. We will use it
21227      # for the tool.
21228
21229      # First remove it from the list of overridden variables, so we can test
21230      # for unknown variables in the end.
21231      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21232
21233      # Check if we try to supply an empty value
21234      if test "x$LDD" = x; then
21235        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LDD= (no value)" >&5
21236$as_echo "$as_me: Setting user supplied tool LDD= (no value)" >&6;}
21237        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21238$as_echo_n "checking for LDD... " >&6; }
21239        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21240$as_echo "disabled" >&6; }
21241      else
21242        # Check if the provided tool contains a complete path.
21243        tool_specified="$LDD"
21244        tool_basename="${tool_specified##*/}"
21245        if test "x$tool_basename" = "x$tool_specified"; then
21246          # A command without a complete path is provided, search $PATH.
21247          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LDD=$tool_basename" >&5
21248$as_echo "$as_me: Will search for user supplied tool LDD=$tool_basename" >&6;}
21249          # Extract the first word of "$tool_basename", so it can be a program name with args.
21250set dummy $tool_basename; ac_word=$2
21251{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21252$as_echo_n "checking for $ac_word... " >&6; }
21253if ${ac_cv_path_LDD+:} false; then :
21254  $as_echo_n "(cached) " >&6
21255else
21256  case $LDD in
21257  [\\/]* | ?:[\\/]*)
21258  ac_cv_path_LDD="$LDD" # Let the user override the test with a path.
21259  ;;
21260  *)
21261  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21262for as_dir in $PATH
21263do
21264  IFS=$as_save_IFS
21265  test -z "$as_dir" && as_dir=.
21266    for ac_exec_ext in '' $ac_executable_extensions; do
21267  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21268    ac_cv_path_LDD="$as_dir/$ac_word$ac_exec_ext"
21269    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21270    break 2
21271  fi
21272done
21273  done
21274IFS=$as_save_IFS
21275
21276  ;;
21277esac
21278fi
21279LDD=$ac_cv_path_LDD
21280if test -n "$LDD"; then
21281  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LDD" >&5
21282$as_echo "$LDD" >&6; }
21283else
21284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21285$as_echo "no" >&6; }
21286fi
21287
21288
21289          if test "x$LDD" = x; then
21290            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21291          fi
21292        else
21293          # Otherwise we believe it is a complete path. Use it as it is.
21294          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LDD=$tool_specified" >&5
21295$as_echo "$as_me: Will use user supplied tool LDD=$tool_specified" >&6;}
21296          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LDD" >&5
21297$as_echo_n "checking for LDD... " >&6; }
21298          if test ! -x "$tool_specified"; then
21299            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21300$as_echo "not found" >&6; }
21301            as_fn_error $? "User supplied tool LDD=$tool_specified does not exist or is not executable" "$LINENO" 5
21302          fi
21303          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21304$as_echo "$tool_specified" >&6; }
21305        fi
21306      fi
21307    fi
21308
21309  fi
21310
21311
21312  if test "x$LDD" = "x"; then
21313    # List shared lib dependencies is used for
21314    # debug output and checking for forbidden dependencies.
21315    # We can build without it.
21316    LDD="true"
21317  fi
21318
21319
21320  # Publish this variable in the help.
21321
21322
21323  if [ -z "${OTOOL+x}" ]; then
21324    # The variable is not set by user, try to locate tool using the code snippet
21325    for ac_prog in otool
21326do
21327  # Extract the first word of "$ac_prog", so it can be a program name with args.
21328set dummy $ac_prog; ac_word=$2
21329{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21330$as_echo_n "checking for $ac_word... " >&6; }
21331if ${ac_cv_path_OTOOL+:} false; then :
21332  $as_echo_n "(cached) " >&6
21333else
21334  case $OTOOL in
21335  [\\/]* | ?:[\\/]*)
21336  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21337  ;;
21338  *)
21339  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21340for as_dir in $PATH
21341do
21342  IFS=$as_save_IFS
21343  test -z "$as_dir" && as_dir=.
21344    for ac_exec_ext in '' $ac_executable_extensions; do
21345  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21346    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21347    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21348    break 2
21349  fi
21350done
21351  done
21352IFS=$as_save_IFS
21353
21354  ;;
21355esac
21356fi
21357OTOOL=$ac_cv_path_OTOOL
21358if test -n "$OTOOL"; then
21359  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21360$as_echo "$OTOOL" >&6; }
21361else
21362  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21363$as_echo "no" >&6; }
21364fi
21365
21366
21367  test -n "$OTOOL" && break
21368done
21369
21370  else
21371    # The variable is set, but is it from the command line or the environment?
21372
21373    # Try to remove the string !OTOOL! from our list.
21374    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OTOOL!/}
21375    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21376      # If it failed, the variable was not from the command line. Ignore it,
21377      # but warn the user (except for BASH, which is always set by the calling BASH).
21378      if test "xOTOOL" != xBASH; then
21379        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&5
21380$as_echo "$as_me: WARNING: Ignoring value of OTOOL from the environment. Use command line variables instead." >&2;}
21381      fi
21382      # Try to locate tool using the code snippet
21383      for ac_prog in otool
21384do
21385  # Extract the first word of "$ac_prog", so it can be a program name with args.
21386set dummy $ac_prog; ac_word=$2
21387{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21388$as_echo_n "checking for $ac_word... " >&6; }
21389if ${ac_cv_path_OTOOL+:} false; then :
21390  $as_echo_n "(cached) " >&6
21391else
21392  case $OTOOL in
21393  [\\/]* | ?:[\\/]*)
21394  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21395  ;;
21396  *)
21397  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21398for as_dir in $PATH
21399do
21400  IFS=$as_save_IFS
21401  test -z "$as_dir" && as_dir=.
21402    for ac_exec_ext in '' $ac_executable_extensions; do
21403  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21404    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21405    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21406    break 2
21407  fi
21408done
21409  done
21410IFS=$as_save_IFS
21411
21412  ;;
21413esac
21414fi
21415OTOOL=$ac_cv_path_OTOOL
21416if test -n "$OTOOL"; then
21417  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21418$as_echo "$OTOOL" >&6; }
21419else
21420  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21421$as_echo "no" >&6; }
21422fi
21423
21424
21425  test -n "$OTOOL" && break
21426done
21427
21428    else
21429      # If it succeeded, then it was overridden by the user. We will use it
21430      # for the tool.
21431
21432      # First remove it from the list of overridden variables, so we can test
21433      # for unknown variables in the end.
21434      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21435
21436      # Check if we try to supply an empty value
21437      if test "x$OTOOL" = x; then
21438        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OTOOL= (no value)" >&5
21439$as_echo "$as_me: Setting user supplied tool OTOOL= (no value)" >&6;}
21440        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21441$as_echo_n "checking for OTOOL... " >&6; }
21442        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21443$as_echo "disabled" >&6; }
21444      else
21445        # Check if the provided tool contains a complete path.
21446        tool_specified="$OTOOL"
21447        tool_basename="${tool_specified##*/}"
21448        if test "x$tool_basename" = "x$tool_specified"; then
21449          # A command without a complete path is provided, search $PATH.
21450          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OTOOL=$tool_basename" >&5
21451$as_echo "$as_me: Will search for user supplied tool OTOOL=$tool_basename" >&6;}
21452          # Extract the first word of "$tool_basename", so it can be a program name with args.
21453set dummy $tool_basename; ac_word=$2
21454{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21455$as_echo_n "checking for $ac_word... " >&6; }
21456if ${ac_cv_path_OTOOL+:} false; then :
21457  $as_echo_n "(cached) " >&6
21458else
21459  case $OTOOL in
21460  [\\/]* | ?:[\\/]*)
21461  ac_cv_path_OTOOL="$OTOOL" # Let the user override the test with a path.
21462  ;;
21463  *)
21464  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21465for as_dir in $PATH
21466do
21467  IFS=$as_save_IFS
21468  test -z "$as_dir" && as_dir=.
21469    for ac_exec_ext in '' $ac_executable_extensions; do
21470  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21471    ac_cv_path_OTOOL="$as_dir/$ac_word$ac_exec_ext"
21472    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21473    break 2
21474  fi
21475done
21476  done
21477IFS=$as_save_IFS
21478
21479  ;;
21480esac
21481fi
21482OTOOL=$ac_cv_path_OTOOL
21483if test -n "$OTOOL"; then
21484  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5
21485$as_echo "$OTOOL" >&6; }
21486else
21487  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21488$as_echo "no" >&6; }
21489fi
21490
21491
21492          if test "x$OTOOL" = x; then
21493            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21494          fi
21495        else
21496          # Otherwise we believe it is a complete path. Use it as it is.
21497          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OTOOL=$tool_specified" >&5
21498$as_echo "$as_me: Will use user supplied tool OTOOL=$tool_specified" >&6;}
21499          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OTOOL" >&5
21500$as_echo_n "checking for OTOOL... " >&6; }
21501          if test ! -x "$tool_specified"; then
21502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21503$as_echo "not found" >&6; }
21504            as_fn_error $? "User supplied tool OTOOL=$tool_specified does not exist or is not executable" "$LINENO" 5
21505          fi
21506          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21507$as_echo "$tool_specified" >&6; }
21508        fi
21509      fi
21510    fi
21511
21512  fi
21513
21514
21515  if test "x$OTOOL" = "x"; then
21516    OTOOL="true"
21517  fi
21518
21519
21520  # Publish this variable in the help.
21521
21522
21523  if [ -z "${READELF+x}" ]; then
21524    # The variable is not set by user, try to locate tool using the code snippet
21525    for ac_prog in greadelf readelf
21526do
21527  # Extract the first word of "$ac_prog", so it can be a program name with args.
21528set dummy $ac_prog; ac_word=$2
21529{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21530$as_echo_n "checking for $ac_word... " >&6; }
21531if ${ac_cv_path_READELF+:} false; then :
21532  $as_echo_n "(cached) " >&6
21533else
21534  case $READELF in
21535  [\\/]* | ?:[\\/]*)
21536  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21537  ;;
21538  *)
21539  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21540for as_dir in $PATH
21541do
21542  IFS=$as_save_IFS
21543  test -z "$as_dir" && as_dir=.
21544    for ac_exec_ext in '' $ac_executable_extensions; do
21545  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21546    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21547    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21548    break 2
21549  fi
21550done
21551  done
21552IFS=$as_save_IFS
21553
21554  ;;
21555esac
21556fi
21557READELF=$ac_cv_path_READELF
21558if test -n "$READELF"; then
21559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21560$as_echo "$READELF" >&6; }
21561else
21562  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21563$as_echo "no" >&6; }
21564fi
21565
21566
21567  test -n "$READELF" && break
21568done
21569
21570  else
21571    # The variable is set, but is it from the command line or the environment?
21572
21573    # Try to remove the string !READELF! from our list.
21574    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!READELF!/}
21575    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21576      # If it failed, the variable was not from the command line. Ignore it,
21577      # but warn the user (except for BASH, which is always set by the calling BASH).
21578      if test "xREADELF" != xBASH; then
21579        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&5
21580$as_echo "$as_me: WARNING: Ignoring value of READELF from the environment. Use command line variables instead." >&2;}
21581      fi
21582      # Try to locate tool using the code snippet
21583      for ac_prog in greadelf readelf
21584do
21585  # Extract the first word of "$ac_prog", so it can be a program name with args.
21586set dummy $ac_prog; ac_word=$2
21587{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21588$as_echo_n "checking for $ac_word... " >&6; }
21589if ${ac_cv_path_READELF+:} false; then :
21590  $as_echo_n "(cached) " >&6
21591else
21592  case $READELF in
21593  [\\/]* | ?:[\\/]*)
21594  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21595  ;;
21596  *)
21597  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21598for as_dir in $PATH
21599do
21600  IFS=$as_save_IFS
21601  test -z "$as_dir" && as_dir=.
21602    for ac_exec_ext in '' $ac_executable_extensions; do
21603  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21604    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21605    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21606    break 2
21607  fi
21608done
21609  done
21610IFS=$as_save_IFS
21611
21612  ;;
21613esac
21614fi
21615READELF=$ac_cv_path_READELF
21616if test -n "$READELF"; then
21617  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21618$as_echo "$READELF" >&6; }
21619else
21620  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21621$as_echo "no" >&6; }
21622fi
21623
21624
21625  test -n "$READELF" && break
21626done
21627
21628    else
21629      # If it succeeded, then it was overridden by the user. We will use it
21630      # for the tool.
21631
21632      # First remove it from the list of overridden variables, so we can test
21633      # for unknown variables in the end.
21634      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21635
21636      # Check if we try to supply an empty value
21637      if test "x$READELF" = x; then
21638        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool READELF= (no value)" >&5
21639$as_echo "$as_me: Setting user supplied tool READELF= (no value)" >&6;}
21640        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21641$as_echo_n "checking for READELF... " >&6; }
21642        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21643$as_echo "disabled" >&6; }
21644      else
21645        # Check if the provided tool contains a complete path.
21646        tool_specified="$READELF"
21647        tool_basename="${tool_specified##*/}"
21648        if test "x$tool_basename" = "x$tool_specified"; then
21649          # A command without a complete path is provided, search $PATH.
21650          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool READELF=$tool_basename" >&5
21651$as_echo "$as_me: Will search for user supplied tool READELF=$tool_basename" >&6;}
21652          # Extract the first word of "$tool_basename", so it can be a program name with args.
21653set dummy $tool_basename; ac_word=$2
21654{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21655$as_echo_n "checking for $ac_word... " >&6; }
21656if ${ac_cv_path_READELF+:} false; then :
21657  $as_echo_n "(cached) " >&6
21658else
21659  case $READELF in
21660  [\\/]* | ?:[\\/]*)
21661  ac_cv_path_READELF="$READELF" # Let the user override the test with a path.
21662  ;;
21663  *)
21664  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21665for as_dir in $PATH
21666do
21667  IFS=$as_save_IFS
21668  test -z "$as_dir" && as_dir=.
21669    for ac_exec_ext in '' $ac_executable_extensions; do
21670  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21671    ac_cv_path_READELF="$as_dir/$ac_word$ac_exec_ext"
21672    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21673    break 2
21674  fi
21675done
21676  done
21677IFS=$as_save_IFS
21678
21679  ;;
21680esac
21681fi
21682READELF=$ac_cv_path_READELF
21683if test -n "$READELF"; then
21684  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $READELF" >&5
21685$as_echo "$READELF" >&6; }
21686else
21687  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21688$as_echo "no" >&6; }
21689fi
21690
21691
21692          if test "x$READELF" = x; then
21693            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21694          fi
21695        else
21696          # Otherwise we believe it is a complete path. Use it as it is.
21697          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool READELF=$tool_specified" >&5
21698$as_echo "$as_me: Will use user supplied tool READELF=$tool_specified" >&6;}
21699          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for READELF" >&5
21700$as_echo_n "checking for READELF... " >&6; }
21701          if test ! -x "$tool_specified"; then
21702            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21703$as_echo "not found" >&6; }
21704            as_fn_error $? "User supplied tool READELF=$tool_specified does not exist or is not executable" "$LINENO" 5
21705          fi
21706          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21707$as_echo "$tool_specified" >&6; }
21708        fi
21709      fi
21710    fi
21711
21712  fi
21713
21714
21715
21716
21717  # Publish this variable in the help.
21718
21719
21720  if [ -z "${HG+x}" ]; then
21721    # The variable is not set by user, try to locate tool using the code snippet
21722    for ac_prog in hg
21723do
21724  # Extract the first word of "$ac_prog", so it can be a program name with args.
21725set dummy $ac_prog; ac_word=$2
21726{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21727$as_echo_n "checking for $ac_word... " >&6; }
21728if ${ac_cv_path_HG+:} false; then :
21729  $as_echo_n "(cached) " >&6
21730else
21731  case $HG in
21732  [\\/]* | ?:[\\/]*)
21733  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21734  ;;
21735  *)
21736  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21737for as_dir in $PATH
21738do
21739  IFS=$as_save_IFS
21740  test -z "$as_dir" && as_dir=.
21741    for ac_exec_ext in '' $ac_executable_extensions; do
21742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21743    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21745    break 2
21746  fi
21747done
21748  done
21749IFS=$as_save_IFS
21750
21751  ;;
21752esac
21753fi
21754HG=$ac_cv_path_HG
21755if test -n "$HG"; then
21756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21757$as_echo "$HG" >&6; }
21758else
21759  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21760$as_echo "no" >&6; }
21761fi
21762
21763
21764  test -n "$HG" && break
21765done
21766
21767  else
21768    # The variable is set, but is it from the command line or the environment?
21769
21770    # Try to remove the string !HG! from our list.
21771    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!HG!/}
21772    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21773      # If it failed, the variable was not from the command line. Ignore it,
21774      # but warn the user (except for BASH, which is always set by the calling BASH).
21775      if test "xHG" != xBASH; then
21776        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&5
21777$as_echo "$as_me: WARNING: Ignoring value of HG from the environment. Use command line variables instead." >&2;}
21778      fi
21779      # Try to locate tool using the code snippet
21780      for ac_prog in hg
21781do
21782  # Extract the first word of "$ac_prog", so it can be a program name with args.
21783set dummy $ac_prog; ac_word=$2
21784{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21785$as_echo_n "checking for $ac_word... " >&6; }
21786if ${ac_cv_path_HG+:} false; then :
21787  $as_echo_n "(cached) " >&6
21788else
21789  case $HG in
21790  [\\/]* | ?:[\\/]*)
21791  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21792  ;;
21793  *)
21794  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21795for as_dir in $PATH
21796do
21797  IFS=$as_save_IFS
21798  test -z "$as_dir" && as_dir=.
21799    for ac_exec_ext in '' $ac_executable_extensions; do
21800  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21801    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21802    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21803    break 2
21804  fi
21805done
21806  done
21807IFS=$as_save_IFS
21808
21809  ;;
21810esac
21811fi
21812HG=$ac_cv_path_HG
21813if test -n "$HG"; then
21814  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21815$as_echo "$HG" >&6; }
21816else
21817  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21818$as_echo "no" >&6; }
21819fi
21820
21821
21822  test -n "$HG" && break
21823done
21824
21825    else
21826      # If it succeeded, then it was overridden by the user. We will use it
21827      # for the tool.
21828
21829      # First remove it from the list of overridden variables, so we can test
21830      # for unknown variables in the end.
21831      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
21832
21833      # Check if we try to supply an empty value
21834      if test "x$HG" = x; then
21835        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool HG= (no value)" >&5
21836$as_echo "$as_me: Setting user supplied tool HG= (no value)" >&6;}
21837        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21838$as_echo_n "checking for HG... " >&6; }
21839        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
21840$as_echo "disabled" >&6; }
21841      else
21842        # Check if the provided tool contains a complete path.
21843        tool_specified="$HG"
21844        tool_basename="${tool_specified##*/}"
21845        if test "x$tool_basename" = "x$tool_specified"; then
21846          # A command without a complete path is provided, search $PATH.
21847          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool HG=$tool_basename" >&5
21848$as_echo "$as_me: Will search for user supplied tool HG=$tool_basename" >&6;}
21849          # Extract the first word of "$tool_basename", so it can be a program name with args.
21850set dummy $tool_basename; ac_word=$2
21851{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21852$as_echo_n "checking for $ac_word... " >&6; }
21853if ${ac_cv_path_HG+:} false; then :
21854  $as_echo_n "(cached) " >&6
21855else
21856  case $HG in
21857  [\\/]* | ?:[\\/]*)
21858  ac_cv_path_HG="$HG" # Let the user override the test with a path.
21859  ;;
21860  *)
21861  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21862for as_dir in $PATH
21863do
21864  IFS=$as_save_IFS
21865  test -z "$as_dir" && as_dir=.
21866    for ac_exec_ext in '' $ac_executable_extensions; do
21867  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21868    ac_cv_path_HG="$as_dir/$ac_word$ac_exec_ext"
21869    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21870    break 2
21871  fi
21872done
21873  done
21874IFS=$as_save_IFS
21875
21876  ;;
21877esac
21878fi
21879HG=$ac_cv_path_HG
21880if test -n "$HG"; then
21881  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $HG" >&5
21882$as_echo "$HG" >&6; }
21883else
21884  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21885$as_echo "no" >&6; }
21886fi
21887
21888
21889          if test "x$HG" = x; then
21890            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
21891          fi
21892        else
21893          # Otherwise we believe it is a complete path. Use it as it is.
21894          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool HG=$tool_specified" >&5
21895$as_echo "$as_me: Will use user supplied tool HG=$tool_specified" >&6;}
21896          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for HG" >&5
21897$as_echo_n "checking for HG... " >&6; }
21898          if test ! -x "$tool_specified"; then
21899            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
21900$as_echo "not found" >&6; }
21901            as_fn_error $? "User supplied tool HG=$tool_specified does not exist or is not executable" "$LINENO" 5
21902          fi
21903          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
21904$as_echo "$tool_specified" >&6; }
21905        fi
21906      fi
21907    fi
21908
21909  fi
21910
21911
21912
21913
21914  # Publish this variable in the help.
21915
21916
21917  if [ -z "${STAT+x}" ]; then
21918    # The variable is not set by user, try to locate tool using the code snippet
21919    for ac_prog in stat
21920do
21921  # Extract the first word of "$ac_prog", so it can be a program name with args.
21922set dummy $ac_prog; ac_word=$2
21923{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21924$as_echo_n "checking for $ac_word... " >&6; }
21925if ${ac_cv_path_STAT+:} false; then :
21926  $as_echo_n "(cached) " >&6
21927else
21928  case $STAT in
21929  [\\/]* | ?:[\\/]*)
21930  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21931  ;;
21932  *)
21933  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21934for as_dir in $PATH
21935do
21936  IFS=$as_save_IFS
21937  test -z "$as_dir" && as_dir=.
21938    for ac_exec_ext in '' $ac_executable_extensions; do
21939  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21940    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21941    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
21942    break 2
21943  fi
21944done
21945  done
21946IFS=$as_save_IFS
21947
21948  ;;
21949esac
21950fi
21951STAT=$ac_cv_path_STAT
21952if test -n "$STAT"; then
21953  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
21954$as_echo "$STAT" >&6; }
21955else
21956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
21957$as_echo "no" >&6; }
21958fi
21959
21960
21961  test -n "$STAT" && break
21962done
21963
21964  else
21965    # The variable is set, but is it from the command line or the environment?
21966
21967    # Try to remove the string !STAT! from our list.
21968    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STAT!/}
21969    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
21970      # If it failed, the variable was not from the command line. Ignore it,
21971      # but warn the user (except for BASH, which is always set by the calling BASH).
21972      if test "xSTAT" != xBASH; then
21973        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&5
21974$as_echo "$as_me: WARNING: Ignoring value of STAT from the environment. Use command line variables instead." >&2;}
21975      fi
21976      # Try to locate tool using the code snippet
21977      for ac_prog in stat
21978do
21979  # Extract the first word of "$ac_prog", so it can be a program name with args.
21980set dummy $ac_prog; ac_word=$2
21981{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
21982$as_echo_n "checking for $ac_word... " >&6; }
21983if ${ac_cv_path_STAT+:} false; then :
21984  $as_echo_n "(cached) " >&6
21985else
21986  case $STAT in
21987  [\\/]* | ?:[\\/]*)
21988  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
21989  ;;
21990  *)
21991  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
21992for as_dir in $PATH
21993do
21994  IFS=$as_save_IFS
21995  test -z "$as_dir" && as_dir=.
21996    for ac_exec_ext in '' $ac_executable_extensions; do
21997  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
21998    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
21999    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22000    break 2
22001  fi
22002done
22003  done
22004IFS=$as_save_IFS
22005
22006  ;;
22007esac
22008fi
22009STAT=$ac_cv_path_STAT
22010if test -n "$STAT"; then
22011  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22012$as_echo "$STAT" >&6; }
22013else
22014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22015$as_echo "no" >&6; }
22016fi
22017
22018
22019  test -n "$STAT" && break
22020done
22021
22022    else
22023      # If it succeeded, then it was overridden by the user. We will use it
22024      # for the tool.
22025
22026      # First remove it from the list of overridden variables, so we can test
22027      # for unknown variables in the end.
22028      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22029
22030      # Check if we try to supply an empty value
22031      if test "x$STAT" = x; then
22032        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STAT= (no value)" >&5
22033$as_echo "$as_me: Setting user supplied tool STAT= (no value)" >&6;}
22034        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22035$as_echo_n "checking for STAT... " >&6; }
22036        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22037$as_echo "disabled" >&6; }
22038      else
22039        # Check if the provided tool contains a complete path.
22040        tool_specified="$STAT"
22041        tool_basename="${tool_specified##*/}"
22042        if test "x$tool_basename" = "x$tool_specified"; then
22043          # A command without a complete path is provided, search $PATH.
22044          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STAT=$tool_basename" >&5
22045$as_echo "$as_me: Will search for user supplied tool STAT=$tool_basename" >&6;}
22046          # Extract the first word of "$tool_basename", so it can be a program name with args.
22047set dummy $tool_basename; ac_word=$2
22048{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22049$as_echo_n "checking for $ac_word... " >&6; }
22050if ${ac_cv_path_STAT+:} false; then :
22051  $as_echo_n "(cached) " >&6
22052else
22053  case $STAT in
22054  [\\/]* | ?:[\\/]*)
22055  ac_cv_path_STAT="$STAT" # Let the user override the test with a path.
22056  ;;
22057  *)
22058  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22059for as_dir in $PATH
22060do
22061  IFS=$as_save_IFS
22062  test -z "$as_dir" && as_dir=.
22063    for ac_exec_ext in '' $ac_executable_extensions; do
22064  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22065    ac_cv_path_STAT="$as_dir/$ac_word$ac_exec_ext"
22066    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22067    break 2
22068  fi
22069done
22070  done
22071IFS=$as_save_IFS
22072
22073  ;;
22074esac
22075fi
22076STAT=$ac_cv_path_STAT
22077if test -n "$STAT"; then
22078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STAT" >&5
22079$as_echo "$STAT" >&6; }
22080else
22081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22082$as_echo "no" >&6; }
22083fi
22084
22085
22086          if test "x$STAT" = x; then
22087            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22088          fi
22089        else
22090          # Otherwise we believe it is a complete path. Use it as it is.
22091          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STAT=$tool_specified" >&5
22092$as_echo "$as_me: Will use user supplied tool STAT=$tool_specified" >&6;}
22093          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STAT" >&5
22094$as_echo_n "checking for STAT... " >&6; }
22095          if test ! -x "$tool_specified"; then
22096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22097$as_echo "not found" >&6; }
22098            as_fn_error $? "User supplied tool STAT=$tool_specified does not exist or is not executable" "$LINENO" 5
22099          fi
22100          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22101$as_echo "$tool_specified" >&6; }
22102        fi
22103      fi
22104    fi
22105
22106  fi
22107
22108
22109
22110
22111  # Publish this variable in the help.
22112
22113
22114  if [ -z "${TIME+x}" ]; then
22115    # The variable is not set by user, try to locate tool using the code snippet
22116    for ac_prog in time
22117do
22118  # Extract the first word of "$ac_prog", so it can be a program name with args.
22119set dummy $ac_prog; ac_word=$2
22120{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22121$as_echo_n "checking for $ac_word... " >&6; }
22122if ${ac_cv_path_TIME+:} false; then :
22123  $as_echo_n "(cached) " >&6
22124else
22125  case $TIME in
22126  [\\/]* | ?:[\\/]*)
22127  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22128  ;;
22129  *)
22130  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22131for as_dir in $PATH
22132do
22133  IFS=$as_save_IFS
22134  test -z "$as_dir" && as_dir=.
22135    for ac_exec_ext in '' $ac_executable_extensions; do
22136  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22137    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22138    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22139    break 2
22140  fi
22141done
22142  done
22143IFS=$as_save_IFS
22144
22145  ;;
22146esac
22147fi
22148TIME=$ac_cv_path_TIME
22149if test -n "$TIME"; then
22150  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22151$as_echo "$TIME" >&6; }
22152else
22153  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22154$as_echo "no" >&6; }
22155fi
22156
22157
22158  test -n "$TIME" && break
22159done
22160
22161  else
22162    # The variable is set, but is it from the command line or the environment?
22163
22164    # Try to remove the string !TIME! from our list.
22165    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!TIME!/}
22166    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22167      # If it failed, the variable was not from the command line. Ignore it,
22168      # but warn the user (except for BASH, which is always set by the calling BASH).
22169      if test "xTIME" != xBASH; then
22170        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&5
22171$as_echo "$as_me: WARNING: Ignoring value of TIME from the environment. Use command line variables instead." >&2;}
22172      fi
22173      # Try to locate tool using the code snippet
22174      for ac_prog in time
22175do
22176  # Extract the first word of "$ac_prog", so it can be a program name with args.
22177set dummy $ac_prog; ac_word=$2
22178{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22179$as_echo_n "checking for $ac_word... " >&6; }
22180if ${ac_cv_path_TIME+:} false; then :
22181  $as_echo_n "(cached) " >&6
22182else
22183  case $TIME in
22184  [\\/]* | ?:[\\/]*)
22185  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22186  ;;
22187  *)
22188  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22189for as_dir in $PATH
22190do
22191  IFS=$as_save_IFS
22192  test -z "$as_dir" && as_dir=.
22193    for ac_exec_ext in '' $ac_executable_extensions; do
22194  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22195    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22196    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22197    break 2
22198  fi
22199done
22200  done
22201IFS=$as_save_IFS
22202
22203  ;;
22204esac
22205fi
22206TIME=$ac_cv_path_TIME
22207if test -n "$TIME"; then
22208  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22209$as_echo "$TIME" >&6; }
22210else
22211  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22212$as_echo "no" >&6; }
22213fi
22214
22215
22216  test -n "$TIME" && break
22217done
22218
22219    else
22220      # If it succeeded, then it was overridden by the user. We will use it
22221      # for the tool.
22222
22223      # First remove it from the list of overridden variables, so we can test
22224      # for unknown variables in the end.
22225      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22226
22227      # Check if we try to supply an empty value
22228      if test "x$TIME" = x; then
22229        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool TIME= (no value)" >&5
22230$as_echo "$as_me: Setting user supplied tool TIME= (no value)" >&6;}
22231        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22232$as_echo_n "checking for TIME... " >&6; }
22233        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22234$as_echo "disabled" >&6; }
22235      else
22236        # Check if the provided tool contains a complete path.
22237        tool_specified="$TIME"
22238        tool_basename="${tool_specified##*/}"
22239        if test "x$tool_basename" = "x$tool_specified"; then
22240          # A command without a complete path is provided, search $PATH.
22241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool TIME=$tool_basename" >&5
22242$as_echo "$as_me: Will search for user supplied tool TIME=$tool_basename" >&6;}
22243          # Extract the first word of "$tool_basename", so it can be a program name with args.
22244set dummy $tool_basename; ac_word=$2
22245{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22246$as_echo_n "checking for $ac_word... " >&6; }
22247if ${ac_cv_path_TIME+:} false; then :
22248  $as_echo_n "(cached) " >&6
22249else
22250  case $TIME in
22251  [\\/]* | ?:[\\/]*)
22252  ac_cv_path_TIME="$TIME" # Let the user override the test with a path.
22253  ;;
22254  *)
22255  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22256for as_dir in $PATH
22257do
22258  IFS=$as_save_IFS
22259  test -z "$as_dir" && as_dir=.
22260    for ac_exec_ext in '' $ac_executable_extensions; do
22261  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22262    ac_cv_path_TIME="$as_dir/$ac_word$ac_exec_ext"
22263    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22264    break 2
22265  fi
22266done
22267  done
22268IFS=$as_save_IFS
22269
22270  ;;
22271esac
22272fi
22273TIME=$ac_cv_path_TIME
22274if test -n "$TIME"; then
22275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TIME" >&5
22276$as_echo "$TIME" >&6; }
22277else
22278  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22279$as_echo "no" >&6; }
22280fi
22281
22282
22283          if test "x$TIME" = x; then
22284            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22285          fi
22286        else
22287          # Otherwise we believe it is a complete path. Use it as it is.
22288          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool TIME=$tool_specified" >&5
22289$as_echo "$as_me: Will use user supplied tool TIME=$tool_specified" >&6;}
22290          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for TIME" >&5
22291$as_echo_n "checking for TIME... " >&6; }
22292          if test ! -x "$tool_specified"; then
22293            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22294$as_echo "not found" >&6; }
22295            as_fn_error $? "User supplied tool TIME=$tool_specified does not exist or is not executable" "$LINENO" 5
22296          fi
22297          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22298$as_echo "$tool_specified" >&6; }
22299        fi
22300      fi
22301    fi
22302
22303  fi
22304
22305
22306
22307
22308  # Publish this variable in the help.
22309
22310
22311  if [ -z "${DTRACE+x}" ]; then
22312    # The variable is not set by user, try to locate tool using the code snippet
22313    for ac_prog in dtrace
22314do
22315  # Extract the first word of "$ac_prog", so it can be a program name with args.
22316set dummy $ac_prog; ac_word=$2
22317{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22318$as_echo_n "checking for $ac_word... " >&6; }
22319if ${ac_cv_path_DTRACE+:} false; then :
22320  $as_echo_n "(cached) " >&6
22321else
22322  case $DTRACE in
22323  [\\/]* | ?:[\\/]*)
22324  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22325  ;;
22326  *)
22327  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22328for as_dir in $PATH
22329do
22330  IFS=$as_save_IFS
22331  test -z "$as_dir" && as_dir=.
22332    for ac_exec_ext in '' $ac_executable_extensions; do
22333  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22334    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22335    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22336    break 2
22337  fi
22338done
22339  done
22340IFS=$as_save_IFS
22341
22342  ;;
22343esac
22344fi
22345DTRACE=$ac_cv_path_DTRACE
22346if test -n "$DTRACE"; then
22347  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22348$as_echo "$DTRACE" >&6; }
22349else
22350  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22351$as_echo "no" >&6; }
22352fi
22353
22354
22355  test -n "$DTRACE" && break
22356done
22357
22358  else
22359    # The variable is set, but is it from the command line or the environment?
22360
22361    # Try to remove the string !DTRACE! from our list.
22362    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DTRACE!/}
22363    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22364      # If it failed, the variable was not from the command line. Ignore it,
22365      # but warn the user (except for BASH, which is always set by the calling BASH).
22366      if test "xDTRACE" != xBASH; then
22367        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&5
22368$as_echo "$as_me: WARNING: Ignoring value of DTRACE from the environment. Use command line variables instead." >&2;}
22369      fi
22370      # Try to locate tool using the code snippet
22371      for ac_prog in dtrace
22372do
22373  # Extract the first word of "$ac_prog", so it can be a program name with args.
22374set dummy $ac_prog; ac_word=$2
22375{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22376$as_echo_n "checking for $ac_word... " >&6; }
22377if ${ac_cv_path_DTRACE+:} false; then :
22378  $as_echo_n "(cached) " >&6
22379else
22380  case $DTRACE in
22381  [\\/]* | ?:[\\/]*)
22382  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22383  ;;
22384  *)
22385  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22386for as_dir in $PATH
22387do
22388  IFS=$as_save_IFS
22389  test -z "$as_dir" && as_dir=.
22390    for ac_exec_ext in '' $ac_executable_extensions; do
22391  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22392    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22393    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22394    break 2
22395  fi
22396done
22397  done
22398IFS=$as_save_IFS
22399
22400  ;;
22401esac
22402fi
22403DTRACE=$ac_cv_path_DTRACE
22404if test -n "$DTRACE"; then
22405  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22406$as_echo "$DTRACE" >&6; }
22407else
22408  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22409$as_echo "no" >&6; }
22410fi
22411
22412
22413  test -n "$DTRACE" && break
22414done
22415
22416    else
22417      # If it succeeded, then it was overridden by the user. We will use it
22418      # for the tool.
22419
22420      # First remove it from the list of overridden variables, so we can test
22421      # for unknown variables in the end.
22422      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22423
22424      # Check if we try to supply an empty value
22425      if test "x$DTRACE" = x; then
22426        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DTRACE= (no value)" >&5
22427$as_echo "$as_me: Setting user supplied tool DTRACE= (no value)" >&6;}
22428        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22429$as_echo_n "checking for DTRACE... " >&6; }
22430        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22431$as_echo "disabled" >&6; }
22432      else
22433        # Check if the provided tool contains a complete path.
22434        tool_specified="$DTRACE"
22435        tool_basename="${tool_specified##*/}"
22436        if test "x$tool_basename" = "x$tool_specified"; then
22437          # A command without a complete path is provided, search $PATH.
22438          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DTRACE=$tool_basename" >&5
22439$as_echo "$as_me: Will search for user supplied tool DTRACE=$tool_basename" >&6;}
22440          # Extract the first word of "$tool_basename", so it can be a program name with args.
22441set dummy $tool_basename; ac_word=$2
22442{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22443$as_echo_n "checking for $ac_word... " >&6; }
22444if ${ac_cv_path_DTRACE+:} false; then :
22445  $as_echo_n "(cached) " >&6
22446else
22447  case $DTRACE in
22448  [\\/]* | ?:[\\/]*)
22449  ac_cv_path_DTRACE="$DTRACE" # Let the user override the test with a path.
22450  ;;
22451  *)
22452  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22453for as_dir in $PATH
22454do
22455  IFS=$as_save_IFS
22456  test -z "$as_dir" && as_dir=.
22457    for ac_exec_ext in '' $ac_executable_extensions; do
22458  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22459    ac_cv_path_DTRACE="$as_dir/$ac_word$ac_exec_ext"
22460    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22461    break 2
22462  fi
22463done
22464  done
22465IFS=$as_save_IFS
22466
22467  ;;
22468esac
22469fi
22470DTRACE=$ac_cv_path_DTRACE
22471if test -n "$DTRACE"; then
22472  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
22473$as_echo "$DTRACE" >&6; }
22474else
22475  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22476$as_echo "no" >&6; }
22477fi
22478
22479
22480          if test "x$DTRACE" = x; then
22481            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22482          fi
22483        else
22484          # Otherwise we believe it is a complete path. Use it as it is.
22485          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DTRACE=$tool_specified" >&5
22486$as_echo "$as_me: Will use user supplied tool DTRACE=$tool_specified" >&6;}
22487          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DTRACE" >&5
22488$as_echo_n "checking for DTRACE... " >&6; }
22489          if test ! -x "$tool_specified"; then
22490            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22491$as_echo "not found" >&6; }
22492            as_fn_error $? "User supplied tool DTRACE=$tool_specified does not exist or is not executable" "$LINENO" 5
22493          fi
22494          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22495$as_echo "$tool_specified" >&6; }
22496        fi
22497      fi
22498    fi
22499
22500  fi
22501
22502
22503
22504
22505  # Publish this variable in the help.
22506
22507
22508  if [ -z "${PATCH+x}" ]; then
22509    # The variable is not set by user, try to locate tool using the code snippet
22510    for ac_prog in gpatch patch
22511do
22512  # Extract the first word of "$ac_prog", so it can be a program name with args.
22513set dummy $ac_prog; ac_word=$2
22514{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22515$as_echo_n "checking for $ac_word... " >&6; }
22516if ${ac_cv_path_PATCH+:} false; then :
22517  $as_echo_n "(cached) " >&6
22518else
22519  case $PATCH in
22520  [\\/]* | ?:[\\/]*)
22521  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22522  ;;
22523  *)
22524  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22525for as_dir in $PATH
22526do
22527  IFS=$as_save_IFS
22528  test -z "$as_dir" && as_dir=.
22529    for ac_exec_ext in '' $ac_executable_extensions; do
22530  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22531    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22532    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22533    break 2
22534  fi
22535done
22536  done
22537IFS=$as_save_IFS
22538
22539  ;;
22540esac
22541fi
22542PATCH=$ac_cv_path_PATCH
22543if test -n "$PATCH"; then
22544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22545$as_echo "$PATCH" >&6; }
22546else
22547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22548$as_echo "no" >&6; }
22549fi
22550
22551
22552  test -n "$PATCH" && break
22553done
22554
22555  else
22556    # The variable is set, but is it from the command line or the environment?
22557
22558    # Try to remove the string !PATCH! from our list.
22559    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!PATCH!/}
22560    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22561      # If it failed, the variable was not from the command line. Ignore it,
22562      # but warn the user (except for BASH, which is always set by the calling BASH).
22563      if test "xPATCH" != xBASH; then
22564        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&5
22565$as_echo "$as_me: WARNING: Ignoring value of PATCH from the environment. Use command line variables instead." >&2;}
22566      fi
22567      # Try to locate tool using the code snippet
22568      for ac_prog in gpatch patch
22569do
22570  # Extract the first word of "$ac_prog", so it can be a program name with args.
22571set dummy $ac_prog; ac_word=$2
22572{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22573$as_echo_n "checking for $ac_word... " >&6; }
22574if ${ac_cv_path_PATCH+:} false; then :
22575  $as_echo_n "(cached) " >&6
22576else
22577  case $PATCH in
22578  [\\/]* | ?:[\\/]*)
22579  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22580  ;;
22581  *)
22582  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22583for as_dir in $PATH
22584do
22585  IFS=$as_save_IFS
22586  test -z "$as_dir" && as_dir=.
22587    for ac_exec_ext in '' $ac_executable_extensions; do
22588  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22589    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22590    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22591    break 2
22592  fi
22593done
22594  done
22595IFS=$as_save_IFS
22596
22597  ;;
22598esac
22599fi
22600PATCH=$ac_cv_path_PATCH
22601if test -n "$PATCH"; then
22602  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22603$as_echo "$PATCH" >&6; }
22604else
22605  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22606$as_echo "no" >&6; }
22607fi
22608
22609
22610  test -n "$PATCH" && break
22611done
22612
22613    else
22614      # If it succeeded, then it was overridden by the user. We will use it
22615      # for the tool.
22616
22617      # First remove it from the list of overridden variables, so we can test
22618      # for unknown variables in the end.
22619      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22620
22621      # Check if we try to supply an empty value
22622      if test "x$PATCH" = x; then
22623        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool PATCH= (no value)" >&5
22624$as_echo "$as_me: Setting user supplied tool PATCH= (no value)" >&6;}
22625        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22626$as_echo_n "checking for PATCH... " >&6; }
22627        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22628$as_echo "disabled" >&6; }
22629      else
22630        # Check if the provided tool contains a complete path.
22631        tool_specified="$PATCH"
22632        tool_basename="${tool_specified##*/}"
22633        if test "x$tool_basename" = "x$tool_specified"; then
22634          # A command without a complete path is provided, search $PATH.
22635          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool PATCH=$tool_basename" >&5
22636$as_echo "$as_me: Will search for user supplied tool PATCH=$tool_basename" >&6;}
22637          # Extract the first word of "$tool_basename", so it can be a program name with args.
22638set dummy $tool_basename; ac_word=$2
22639{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22640$as_echo_n "checking for $ac_word... " >&6; }
22641if ${ac_cv_path_PATCH+:} false; then :
22642  $as_echo_n "(cached) " >&6
22643else
22644  case $PATCH in
22645  [\\/]* | ?:[\\/]*)
22646  ac_cv_path_PATCH="$PATCH" # Let the user override the test with a path.
22647  ;;
22648  *)
22649  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22650for as_dir in $PATH
22651do
22652  IFS=$as_save_IFS
22653  test -z "$as_dir" && as_dir=.
22654    for ac_exec_ext in '' $ac_executable_extensions; do
22655  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22656    ac_cv_path_PATCH="$as_dir/$ac_word$ac_exec_ext"
22657    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22658    break 2
22659  fi
22660done
22661  done
22662IFS=$as_save_IFS
22663
22664  ;;
22665esac
22666fi
22667PATCH=$ac_cv_path_PATCH
22668if test -n "$PATCH"; then
22669  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PATCH" >&5
22670$as_echo "$PATCH" >&6; }
22671else
22672  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22673$as_echo "no" >&6; }
22674fi
22675
22676
22677          if test "x$PATCH" = x; then
22678            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22679          fi
22680        else
22681          # Otherwise we believe it is a complete path. Use it as it is.
22682          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool PATCH=$tool_specified" >&5
22683$as_echo "$as_me: Will use user supplied tool PATCH=$tool_specified" >&6;}
22684          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for PATCH" >&5
22685$as_echo_n "checking for PATCH... " >&6; }
22686          if test ! -x "$tool_specified"; then
22687            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22688$as_echo "not found" >&6; }
22689            as_fn_error $? "User supplied tool PATCH=$tool_specified does not exist or is not executable" "$LINENO" 5
22690          fi
22691          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22692$as_echo "$tool_specified" >&6; }
22693        fi
22694      fi
22695    fi
22696
22697  fi
22698
22699
22700  # Check if it's GNU time
22701  IS_GNU_TIME=`$TIME --version 2>&1 | $GREP 'GNU time'`
22702  if test "x$IS_GNU_TIME" != x; then
22703    IS_GNU_TIME=yes
22704  else
22705    IS_GNU_TIME=no
22706  fi
22707
22708
22709  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
22710
22711
22712
22713  # Publish this variable in the help.
22714
22715
22716  if [ -z "${DSYMUTIL+x}" ]; then
22717    # The variable is not set by user, try to locate tool using the code snippet
22718    for ac_prog in dsymutil
22719do
22720  # Extract the first word of "$ac_prog", so it can be a program name with args.
22721set dummy $ac_prog; ac_word=$2
22722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22723$as_echo_n "checking for $ac_word... " >&6; }
22724if ${ac_cv_path_DSYMUTIL+:} false; then :
22725  $as_echo_n "(cached) " >&6
22726else
22727  case $DSYMUTIL in
22728  [\\/]* | ?:[\\/]*)
22729  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22730  ;;
22731  *)
22732  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22733for as_dir in $PATH
22734do
22735  IFS=$as_save_IFS
22736  test -z "$as_dir" && as_dir=.
22737    for ac_exec_ext in '' $ac_executable_extensions; do
22738  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22739    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22740    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22741    break 2
22742  fi
22743done
22744  done
22745IFS=$as_save_IFS
22746
22747  ;;
22748esac
22749fi
22750DSYMUTIL=$ac_cv_path_DSYMUTIL
22751if test -n "$DSYMUTIL"; then
22752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22753$as_echo "$DSYMUTIL" >&6; }
22754else
22755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22756$as_echo "no" >&6; }
22757fi
22758
22759
22760  test -n "$DSYMUTIL" && break
22761done
22762
22763  else
22764    # The variable is set, but is it from the command line or the environment?
22765
22766    # Try to remove the string !DSYMUTIL! from our list.
22767    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!DSYMUTIL!/}
22768    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22769      # If it failed, the variable was not from the command line. Ignore it,
22770      # but warn the user (except for BASH, which is always set by the calling BASH).
22771      if test "xDSYMUTIL" != xBASH; then
22772        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&5
22773$as_echo "$as_me: WARNING: Ignoring value of DSYMUTIL from the environment. Use command line variables instead." >&2;}
22774      fi
22775      # Try to locate tool using the code snippet
22776      for ac_prog in dsymutil
22777do
22778  # Extract the first word of "$ac_prog", so it can be a program name with args.
22779set dummy $ac_prog; ac_word=$2
22780{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22781$as_echo_n "checking for $ac_word... " >&6; }
22782if ${ac_cv_path_DSYMUTIL+:} false; then :
22783  $as_echo_n "(cached) " >&6
22784else
22785  case $DSYMUTIL in
22786  [\\/]* | ?:[\\/]*)
22787  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22788  ;;
22789  *)
22790  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22791for as_dir in $PATH
22792do
22793  IFS=$as_save_IFS
22794  test -z "$as_dir" && as_dir=.
22795    for ac_exec_ext in '' $ac_executable_extensions; do
22796  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22797    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22798    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22799    break 2
22800  fi
22801done
22802  done
22803IFS=$as_save_IFS
22804
22805  ;;
22806esac
22807fi
22808DSYMUTIL=$ac_cv_path_DSYMUTIL
22809if test -n "$DSYMUTIL"; then
22810  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22811$as_echo "$DSYMUTIL" >&6; }
22812else
22813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22814$as_echo "no" >&6; }
22815fi
22816
22817
22818  test -n "$DSYMUTIL" && break
22819done
22820
22821    else
22822      # If it succeeded, then it was overridden by the user. We will use it
22823      # for the tool.
22824
22825      # First remove it from the list of overridden variables, so we can test
22826      # for unknown variables in the end.
22827      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
22828
22829      # Check if we try to supply an empty value
22830      if test "x$DSYMUTIL" = x; then
22831        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool DSYMUTIL= (no value)" >&5
22832$as_echo "$as_me: Setting user supplied tool DSYMUTIL= (no value)" >&6;}
22833        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22834$as_echo_n "checking for DSYMUTIL... " >&6; }
22835        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
22836$as_echo "disabled" >&6; }
22837      else
22838        # Check if the provided tool contains a complete path.
22839        tool_specified="$DSYMUTIL"
22840        tool_basename="${tool_specified##*/}"
22841        if test "x$tool_basename" = "x$tool_specified"; then
22842          # A command without a complete path is provided, search $PATH.
22843          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool DSYMUTIL=$tool_basename" >&5
22844$as_echo "$as_me: Will search for user supplied tool DSYMUTIL=$tool_basename" >&6;}
22845          # Extract the first word of "$tool_basename", so it can be a program name with args.
22846set dummy $tool_basename; ac_word=$2
22847{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22848$as_echo_n "checking for $ac_word... " >&6; }
22849if ${ac_cv_path_DSYMUTIL+:} false; then :
22850  $as_echo_n "(cached) " >&6
22851else
22852  case $DSYMUTIL in
22853  [\\/]* | ?:[\\/]*)
22854  ac_cv_path_DSYMUTIL="$DSYMUTIL" # Let the user override the test with a path.
22855  ;;
22856  *)
22857  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22858for as_dir in $PATH
22859do
22860  IFS=$as_save_IFS
22861  test -z "$as_dir" && as_dir=.
22862    for ac_exec_ext in '' $ac_executable_extensions; do
22863  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22864    ac_cv_path_DSYMUTIL="$as_dir/$ac_word$ac_exec_ext"
22865    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22866    break 2
22867  fi
22868done
22869  done
22870IFS=$as_save_IFS
22871
22872  ;;
22873esac
22874fi
22875DSYMUTIL=$ac_cv_path_DSYMUTIL
22876if test -n "$DSYMUTIL"; then
22877  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5
22878$as_echo "$DSYMUTIL" >&6; }
22879else
22880  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22881$as_echo "no" >&6; }
22882fi
22883
22884
22885          if test "x$DSYMUTIL" = x; then
22886            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
22887          fi
22888        else
22889          # Otherwise we believe it is a complete path. Use it as it is.
22890          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool DSYMUTIL=$tool_specified" >&5
22891$as_echo "$as_me: Will use user supplied tool DSYMUTIL=$tool_specified" >&6;}
22892          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DSYMUTIL" >&5
22893$as_echo_n "checking for DSYMUTIL... " >&6; }
22894          if test ! -x "$tool_specified"; then
22895            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
22896$as_echo "not found" >&6; }
22897            as_fn_error $? "User supplied tool DSYMUTIL=$tool_specified does not exist or is not executable" "$LINENO" 5
22898          fi
22899          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
22900$as_echo "$tool_specified" >&6; }
22901        fi
22902      fi
22903    fi
22904
22905  fi
22906
22907
22908
22909  if test "x$DSYMUTIL" = x; then
22910    as_fn_error $? "Could not find required tool for DSYMUTIL" "$LINENO" 5
22911  fi
22912
22913
22914
22915
22916
22917  # Publish this variable in the help.
22918
22919
22920  if [ -z "${XATTR+x}" ]; then
22921    # The variable is not set by user, try to locate tool using the code snippet
22922    for ac_prog in xattr
22923do
22924  # Extract the first word of "$ac_prog", so it can be a program name with args.
22925set dummy $ac_prog; ac_word=$2
22926{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22927$as_echo_n "checking for $ac_word... " >&6; }
22928if ${ac_cv_path_XATTR+:} false; then :
22929  $as_echo_n "(cached) " >&6
22930else
22931  case $XATTR in
22932  [\\/]* | ?:[\\/]*)
22933  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22934  ;;
22935  *)
22936  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22937for as_dir in $PATH
22938do
22939  IFS=$as_save_IFS
22940  test -z "$as_dir" && as_dir=.
22941    for ac_exec_ext in '' $ac_executable_extensions; do
22942  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
22943    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
22944    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
22945    break 2
22946  fi
22947done
22948  done
22949IFS=$as_save_IFS
22950
22951  ;;
22952esac
22953fi
22954XATTR=$ac_cv_path_XATTR
22955if test -n "$XATTR"; then
22956  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
22957$as_echo "$XATTR" >&6; }
22958else
22959  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
22960$as_echo "no" >&6; }
22961fi
22962
22963
22964  test -n "$XATTR" && break
22965done
22966
22967  else
22968    # The variable is set, but is it from the command line or the environment?
22969
22970    # Try to remove the string !XATTR! from our list.
22971    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!XATTR!/}
22972    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
22973      # If it failed, the variable was not from the command line. Ignore it,
22974      # but warn the user (except for BASH, which is always set by the calling BASH).
22975      if test "xXATTR" != xBASH; then
22976        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&5
22977$as_echo "$as_me: WARNING: Ignoring value of XATTR from the environment. Use command line variables instead." >&2;}
22978      fi
22979      # Try to locate tool using the code snippet
22980      for ac_prog in xattr
22981do
22982  # Extract the first word of "$ac_prog", so it can be a program name with args.
22983set dummy $ac_prog; ac_word=$2
22984{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
22985$as_echo_n "checking for $ac_word... " >&6; }
22986if ${ac_cv_path_XATTR+:} false; then :
22987  $as_echo_n "(cached) " >&6
22988else
22989  case $XATTR in
22990  [\\/]* | ?:[\\/]*)
22991  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
22992  ;;
22993  *)
22994  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
22995for as_dir in $PATH
22996do
22997  IFS=$as_save_IFS
22998  test -z "$as_dir" && as_dir=.
22999    for ac_exec_ext in '' $ac_executable_extensions; do
23000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23001    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23003    break 2
23004  fi
23005done
23006  done
23007IFS=$as_save_IFS
23008
23009  ;;
23010esac
23011fi
23012XATTR=$ac_cv_path_XATTR
23013if test -n "$XATTR"; then
23014  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23015$as_echo "$XATTR" >&6; }
23016else
23017  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23018$as_echo "no" >&6; }
23019fi
23020
23021
23022  test -n "$XATTR" && break
23023done
23024
23025    else
23026      # If it succeeded, then it was overridden by the user. We will use it
23027      # for the tool.
23028
23029      # First remove it from the list of overridden variables, so we can test
23030      # for unknown variables in the end.
23031      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23032
23033      # Check if we try to supply an empty value
23034      if test "x$XATTR" = x; then
23035        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool XATTR= (no value)" >&5
23036$as_echo "$as_me: Setting user supplied tool XATTR= (no value)" >&6;}
23037        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23038$as_echo_n "checking for XATTR... " >&6; }
23039        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23040$as_echo "disabled" >&6; }
23041      else
23042        # Check if the provided tool contains a complete path.
23043        tool_specified="$XATTR"
23044        tool_basename="${tool_specified##*/}"
23045        if test "x$tool_basename" = "x$tool_specified"; then
23046          # A command without a complete path is provided, search $PATH.
23047          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool XATTR=$tool_basename" >&5
23048$as_echo "$as_me: Will search for user supplied tool XATTR=$tool_basename" >&6;}
23049          # Extract the first word of "$tool_basename", so it can be a program name with args.
23050set dummy $tool_basename; ac_word=$2
23051{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23052$as_echo_n "checking for $ac_word... " >&6; }
23053if ${ac_cv_path_XATTR+:} false; then :
23054  $as_echo_n "(cached) " >&6
23055else
23056  case $XATTR in
23057  [\\/]* | ?:[\\/]*)
23058  ac_cv_path_XATTR="$XATTR" # Let the user override the test with a path.
23059  ;;
23060  *)
23061  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23062for as_dir in $PATH
23063do
23064  IFS=$as_save_IFS
23065  test -z "$as_dir" && as_dir=.
23066    for ac_exec_ext in '' $ac_executable_extensions; do
23067  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23068    ac_cv_path_XATTR="$as_dir/$ac_word$ac_exec_ext"
23069    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23070    break 2
23071  fi
23072done
23073  done
23074IFS=$as_save_IFS
23075
23076  ;;
23077esac
23078fi
23079XATTR=$ac_cv_path_XATTR
23080if test -n "$XATTR"; then
23081  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $XATTR" >&5
23082$as_echo "$XATTR" >&6; }
23083else
23084  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23085$as_echo "no" >&6; }
23086fi
23087
23088
23089          if test "x$XATTR" = x; then
23090            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23091          fi
23092        else
23093          # Otherwise we believe it is a complete path. Use it as it is.
23094          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool XATTR=$tool_specified" >&5
23095$as_echo "$as_me: Will use user supplied tool XATTR=$tool_specified" >&6;}
23096          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for XATTR" >&5
23097$as_echo_n "checking for XATTR... " >&6; }
23098          if test ! -x "$tool_specified"; then
23099            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23100$as_echo "not found" >&6; }
23101            as_fn_error $? "User supplied tool XATTR=$tool_specified does not exist or is not executable" "$LINENO" 5
23102          fi
23103          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23104$as_echo "$tool_specified" >&6; }
23105        fi
23106      fi
23107    fi
23108
23109  fi
23110
23111
23112
23113  if test "x$XATTR" = x; then
23114    as_fn_error $? "Could not find required tool for XATTR" "$LINENO" 5
23115  fi
23116
23117
23118
23119
23120  # Publish this variable in the help.
23121
23122
23123  if [ -z "${CODESIGN+x}" ]; then
23124    # The variable is not set by user, try to locate tool using the code snippet
23125    for ac_prog in codesign
23126do
23127  # Extract the first word of "$ac_prog", so it can be a program name with args.
23128set dummy $ac_prog; ac_word=$2
23129{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23130$as_echo_n "checking for $ac_word... " >&6; }
23131if ${ac_cv_path_CODESIGN+:} false; then :
23132  $as_echo_n "(cached) " >&6
23133else
23134  case $CODESIGN in
23135  [\\/]* | ?:[\\/]*)
23136  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23137  ;;
23138  *)
23139  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23140for as_dir in $PATH
23141do
23142  IFS=$as_save_IFS
23143  test -z "$as_dir" && as_dir=.
23144    for ac_exec_ext in '' $ac_executable_extensions; do
23145  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23146    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23147    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23148    break 2
23149  fi
23150done
23151  done
23152IFS=$as_save_IFS
23153
23154  ;;
23155esac
23156fi
23157CODESIGN=$ac_cv_path_CODESIGN
23158if test -n "$CODESIGN"; then
23159  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23160$as_echo "$CODESIGN" >&6; }
23161else
23162  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23163$as_echo "no" >&6; }
23164fi
23165
23166
23167  test -n "$CODESIGN" && break
23168done
23169
23170  else
23171    # The variable is set, but is it from the command line or the environment?
23172
23173    # Try to remove the string !CODESIGN! from our list.
23174    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CODESIGN!/}
23175    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23176      # If it failed, the variable was not from the command line. Ignore it,
23177      # but warn the user (except for BASH, which is always set by the calling BASH).
23178      if test "xCODESIGN" != xBASH; then
23179        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&5
23180$as_echo "$as_me: WARNING: Ignoring value of CODESIGN from the environment. Use command line variables instead." >&2;}
23181      fi
23182      # Try to locate tool using the code snippet
23183      for ac_prog in codesign
23184do
23185  # Extract the first word of "$ac_prog", so it can be a program name with args.
23186set dummy $ac_prog; ac_word=$2
23187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23188$as_echo_n "checking for $ac_word... " >&6; }
23189if ${ac_cv_path_CODESIGN+:} false; then :
23190  $as_echo_n "(cached) " >&6
23191else
23192  case $CODESIGN in
23193  [\\/]* | ?:[\\/]*)
23194  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23195  ;;
23196  *)
23197  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23198for as_dir in $PATH
23199do
23200  IFS=$as_save_IFS
23201  test -z "$as_dir" && as_dir=.
23202    for ac_exec_ext in '' $ac_executable_extensions; do
23203  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23204    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23205    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23206    break 2
23207  fi
23208done
23209  done
23210IFS=$as_save_IFS
23211
23212  ;;
23213esac
23214fi
23215CODESIGN=$ac_cv_path_CODESIGN
23216if test -n "$CODESIGN"; then
23217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23218$as_echo "$CODESIGN" >&6; }
23219else
23220  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23221$as_echo "no" >&6; }
23222fi
23223
23224
23225  test -n "$CODESIGN" && break
23226done
23227
23228    else
23229      # If it succeeded, then it was overridden by the user. We will use it
23230      # for the tool.
23231
23232      # First remove it from the list of overridden variables, so we can test
23233      # for unknown variables in the end.
23234      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23235
23236      # Check if we try to supply an empty value
23237      if test "x$CODESIGN" = x; then
23238        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CODESIGN= (no value)" >&5
23239$as_echo "$as_me: Setting user supplied tool CODESIGN= (no value)" >&6;}
23240        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23241$as_echo_n "checking for CODESIGN... " >&6; }
23242        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23243$as_echo "disabled" >&6; }
23244      else
23245        # Check if the provided tool contains a complete path.
23246        tool_specified="$CODESIGN"
23247        tool_basename="${tool_specified##*/}"
23248        if test "x$tool_basename" = "x$tool_specified"; then
23249          # A command without a complete path is provided, search $PATH.
23250          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CODESIGN=$tool_basename" >&5
23251$as_echo "$as_me: Will search for user supplied tool CODESIGN=$tool_basename" >&6;}
23252          # Extract the first word of "$tool_basename", so it can be a program name with args.
23253set dummy $tool_basename; ac_word=$2
23254{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23255$as_echo_n "checking for $ac_word... " >&6; }
23256if ${ac_cv_path_CODESIGN+:} false; then :
23257  $as_echo_n "(cached) " >&6
23258else
23259  case $CODESIGN in
23260  [\\/]* | ?:[\\/]*)
23261  ac_cv_path_CODESIGN="$CODESIGN" # Let the user override the test with a path.
23262  ;;
23263  *)
23264  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23265for as_dir in $PATH
23266do
23267  IFS=$as_save_IFS
23268  test -z "$as_dir" && as_dir=.
23269    for ac_exec_ext in '' $ac_executable_extensions; do
23270  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23271    ac_cv_path_CODESIGN="$as_dir/$ac_word$ac_exec_ext"
23272    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23273    break 2
23274  fi
23275done
23276  done
23277IFS=$as_save_IFS
23278
23279  ;;
23280esac
23281fi
23282CODESIGN=$ac_cv_path_CODESIGN
23283if test -n "$CODESIGN"; then
23284  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CODESIGN" >&5
23285$as_echo "$CODESIGN" >&6; }
23286else
23287  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23288$as_echo "no" >&6; }
23289fi
23290
23291
23292          if test "x$CODESIGN" = x; then
23293            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23294          fi
23295        else
23296          # Otherwise we believe it is a complete path. Use it as it is.
23297          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CODESIGN=$tool_specified" >&5
23298$as_echo "$as_me: Will use user supplied tool CODESIGN=$tool_specified" >&6;}
23299          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CODESIGN" >&5
23300$as_echo_n "checking for CODESIGN... " >&6; }
23301          if test ! -x "$tool_specified"; then
23302            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23303$as_echo "not found" >&6; }
23304            as_fn_error $? "User supplied tool CODESIGN=$tool_specified does not exist or is not executable" "$LINENO" 5
23305          fi
23306          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23307$as_echo "$tool_specified" >&6; }
23308        fi
23309      fi
23310    fi
23311
23312  fi
23313
23314
23315    if test "x$CODESIGN" != "x"; then
23316      # Verify that the openjdk_codesign certificate is present
23317      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if openjdk_codesign certificate is present" >&5
23318$as_echo_n "checking if openjdk_codesign certificate is present... " >&6; }
23319      rm -f codesign-testfile
23320      touch codesign-testfile
23321      codesign -s openjdk_codesign codesign-testfile 2>&5 >&5 || CODESIGN=
23322      rm -f codesign-testfile
23323      if test "x$CODESIGN" = x; then
23324        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23325$as_echo "no" >&6; }
23326      else
23327        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23328$as_echo "yes" >&6; }
23329      fi
23330    fi
23331
23332
23333
23334  # Publish this variable in the help.
23335
23336
23337  if [ -z "${SETFILE+x}" ]; then
23338    # The variable is not set by user, try to locate tool using the code snippet
23339    for ac_prog in SetFile
23340do
23341  # Extract the first word of "$ac_prog", so it can be a program name with args.
23342set dummy $ac_prog; ac_word=$2
23343{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23344$as_echo_n "checking for $ac_word... " >&6; }
23345if ${ac_cv_path_SETFILE+:} false; then :
23346  $as_echo_n "(cached) " >&6
23347else
23348  case $SETFILE in
23349  [\\/]* | ?:[\\/]*)
23350  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23351  ;;
23352  *)
23353  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23354for as_dir in $PATH
23355do
23356  IFS=$as_save_IFS
23357  test -z "$as_dir" && as_dir=.
23358    for ac_exec_ext in '' $ac_executable_extensions; do
23359  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23360    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23361    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23362    break 2
23363  fi
23364done
23365  done
23366IFS=$as_save_IFS
23367
23368  ;;
23369esac
23370fi
23371SETFILE=$ac_cv_path_SETFILE
23372if test -n "$SETFILE"; then
23373  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23374$as_echo "$SETFILE" >&6; }
23375else
23376  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23377$as_echo "no" >&6; }
23378fi
23379
23380
23381  test -n "$SETFILE" && break
23382done
23383
23384  else
23385    # The variable is set, but is it from the command line or the environment?
23386
23387    # Try to remove the string !SETFILE! from our list.
23388    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!SETFILE!/}
23389    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
23390      # If it failed, the variable was not from the command line. Ignore it,
23391      # but warn the user (except for BASH, which is always set by the calling BASH).
23392      if test "xSETFILE" != xBASH; then
23393        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&5
23394$as_echo "$as_me: WARNING: Ignoring value of SETFILE from the environment. Use command line variables instead." >&2;}
23395      fi
23396      # Try to locate tool using the code snippet
23397      for ac_prog in SetFile
23398do
23399  # Extract the first word of "$ac_prog", so it can be a program name with args.
23400set dummy $ac_prog; ac_word=$2
23401{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23402$as_echo_n "checking for $ac_word... " >&6; }
23403if ${ac_cv_path_SETFILE+:} false; then :
23404  $as_echo_n "(cached) " >&6
23405else
23406  case $SETFILE in
23407  [\\/]* | ?:[\\/]*)
23408  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23409  ;;
23410  *)
23411  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23412for as_dir in $PATH
23413do
23414  IFS=$as_save_IFS
23415  test -z "$as_dir" && as_dir=.
23416    for ac_exec_ext in '' $ac_executable_extensions; do
23417  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23418    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23419    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23420    break 2
23421  fi
23422done
23423  done
23424IFS=$as_save_IFS
23425
23426  ;;
23427esac
23428fi
23429SETFILE=$ac_cv_path_SETFILE
23430if test -n "$SETFILE"; then
23431  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23432$as_echo "$SETFILE" >&6; }
23433else
23434  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23435$as_echo "no" >&6; }
23436fi
23437
23438
23439  test -n "$SETFILE" && break
23440done
23441
23442    else
23443      # If it succeeded, then it was overridden by the user. We will use it
23444      # for the tool.
23445
23446      # First remove it from the list of overridden variables, so we can test
23447      # for unknown variables in the end.
23448      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
23449
23450      # Check if we try to supply an empty value
23451      if test "x$SETFILE" = x; then
23452        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool SETFILE= (no value)" >&5
23453$as_echo "$as_me: Setting user supplied tool SETFILE= (no value)" >&6;}
23454        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23455$as_echo_n "checking for SETFILE... " >&6; }
23456        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
23457$as_echo "disabled" >&6; }
23458      else
23459        # Check if the provided tool contains a complete path.
23460        tool_specified="$SETFILE"
23461        tool_basename="${tool_specified##*/}"
23462        if test "x$tool_basename" = "x$tool_specified"; then
23463          # A command without a complete path is provided, search $PATH.
23464          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool SETFILE=$tool_basename" >&5
23465$as_echo "$as_me: Will search for user supplied tool SETFILE=$tool_basename" >&6;}
23466          # Extract the first word of "$tool_basename", so it can be a program name with args.
23467set dummy $tool_basename; ac_word=$2
23468{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23469$as_echo_n "checking for $ac_word... " >&6; }
23470if ${ac_cv_path_SETFILE+:} false; then :
23471  $as_echo_n "(cached) " >&6
23472else
23473  case $SETFILE in
23474  [\\/]* | ?:[\\/]*)
23475  ac_cv_path_SETFILE="$SETFILE" # Let the user override the test with a path.
23476  ;;
23477  *)
23478  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23479for as_dir in $PATH
23480do
23481  IFS=$as_save_IFS
23482  test -z "$as_dir" && as_dir=.
23483    for ac_exec_ext in '' $ac_executable_extensions; do
23484  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23485    ac_cv_path_SETFILE="$as_dir/$ac_word$ac_exec_ext"
23486    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23487    break 2
23488  fi
23489done
23490  done
23491IFS=$as_save_IFS
23492
23493  ;;
23494esac
23495fi
23496SETFILE=$ac_cv_path_SETFILE
23497if test -n "$SETFILE"; then
23498  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SETFILE" >&5
23499$as_echo "$SETFILE" >&6; }
23500else
23501  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23502$as_echo "no" >&6; }
23503fi
23504
23505
23506          if test "x$SETFILE" = x; then
23507            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
23508          fi
23509        else
23510          # Otherwise we believe it is a complete path. Use it as it is.
23511          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool SETFILE=$tool_specified" >&5
23512$as_echo "$as_me: Will use user supplied tool SETFILE=$tool_specified" >&6;}
23513          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for SETFILE" >&5
23514$as_echo_n "checking for SETFILE... " >&6; }
23515          if test ! -x "$tool_specified"; then
23516            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
23517$as_echo "not found" >&6; }
23518            as_fn_error $? "User supplied tool SETFILE=$tool_specified does not exist or is not executable" "$LINENO" 5
23519          fi
23520          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
23521$as_echo "$tool_specified" >&6; }
23522        fi
23523      fi
23524    fi
23525
23526  fi
23527
23528
23529
23530  if test "x$SETFILE" = x; then
23531    as_fn_error $? "Could not find required tool for SETFILE" "$LINENO" 5
23532  fi
23533
23534
23535  fi
23536
23537
23538  # Test if bash supports pipefail.
23539  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports pipefail" >&5
23540$as_echo_n "checking if bash supports pipefail... " >&6; }
23541  if ${BASH} -c 'set -o pipefail'; then
23542    BASH_ARGS="$BASH_ARGS -o pipefail"
23543    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23544$as_echo "yes" >&6; }
23545  else
23546    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23547$as_echo "no" >&6; }
23548  fi
23549
23550  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if bash supports errexit (-e)" >&5
23551$as_echo_n "checking if bash supports errexit (-e)... " >&6; }
23552  if ${BASH} -e -c 'true'; then
23553    BASH_ARGS="$BASH_ARGS -e"
23554    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23555$as_echo "yes" >&6; }
23556  else
23557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23558$as_echo "no" >&6; }
23559  fi
23560
23561
23562
23563
23564# Check if pkg-config is available.
23565
23566
23567if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then
23568	if test -n "$ac_tool_prefix"; then
23569  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
23570set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
23571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23572$as_echo_n "checking for $ac_word... " >&6; }
23573if ${ac_cv_path_PKG_CONFIG+:} false; then :
23574  $as_echo_n "(cached) " >&6
23575else
23576  case $PKG_CONFIG in
23577  [\\/]* | ?:[\\/]*)
23578  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
23579  ;;
23580  *)
23581  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23582for as_dir in $PATH
23583do
23584  IFS=$as_save_IFS
23585  test -z "$as_dir" && as_dir=.
23586    for ac_exec_ext in '' $ac_executable_extensions; do
23587  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23588    ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23589    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23590    break 2
23591  fi
23592done
23593  done
23594IFS=$as_save_IFS
23595
23596  ;;
23597esac
23598fi
23599PKG_CONFIG=$ac_cv_path_PKG_CONFIG
23600if test -n "$PKG_CONFIG"; then
23601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5
23602$as_echo "$PKG_CONFIG" >&6; }
23603else
23604  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23605$as_echo "no" >&6; }
23606fi
23607
23608
23609fi
23610if test -z "$ac_cv_path_PKG_CONFIG"; then
23611  ac_pt_PKG_CONFIG=$PKG_CONFIG
23612  # Extract the first word of "pkg-config", so it can be a program name with args.
23613set dummy pkg-config; ac_word=$2
23614{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
23615$as_echo_n "checking for $ac_word... " >&6; }
23616if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then :
23617  $as_echo_n "(cached) " >&6
23618else
23619  case $ac_pt_PKG_CONFIG in
23620  [\\/]* | ?:[\\/]*)
23621  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
23622  ;;
23623  *)
23624  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
23625for as_dir in $PATH
23626do
23627  IFS=$as_save_IFS
23628  test -z "$as_dir" && as_dir=.
23629    for ac_exec_ext in '' $ac_executable_extensions; do
23630  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
23631    ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext"
23632    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
23633    break 2
23634  fi
23635done
23636  done
23637IFS=$as_save_IFS
23638
23639  ;;
23640esac
23641fi
23642ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
23643if test -n "$ac_pt_PKG_CONFIG"; then
23644  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5
23645$as_echo "$ac_pt_PKG_CONFIG" >&6; }
23646else
23647  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23648$as_echo "no" >&6; }
23649fi
23650
23651  if test "x$ac_pt_PKG_CONFIG" = x; then
23652    PKG_CONFIG=""
23653  else
23654    case $cross_compiling:$ac_tool_warned in
23655yes:)
23656{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
23657$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
23658ac_tool_warned=yes ;;
23659esac
23660    PKG_CONFIG=$ac_pt_PKG_CONFIG
23661  fi
23662else
23663  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
23664fi
23665
23666fi
23667if test -n "$PKG_CONFIG"; then
23668	_pkg_min_version=0.9.0
23669	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5
23670$as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; }
23671	if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then
23672		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23673$as_echo "yes" >&6; }
23674	else
23675		{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23676$as_echo "no" >&6; }
23677		PKG_CONFIG=""
23678	fi
23679
23680fi
23681
23682# After basic tools have been setup, we can check build os specific details.
23683
23684  ###############################################################################
23685
23686  # Note that this is the build platform OS version!
23687
23688  OS_VERSION="`uname -r | ${SED} 's!\.! !g' | ${SED} 's!-! !g'`"
23689  OS_VERSION_MAJOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 1 -d ' '`"
23690  OS_VERSION_MINOR="`${ECHO} ${OS_VERSION} | ${CUT} -f 2 -d ' '`"
23691  OS_VERSION_MICRO="`${ECHO} ${OS_VERSION} | ${CUT} -f 3 -d ' '`"
23692
23693
23694
23695
23696
23697# Misc basic settings
23698
23699
23700# Check whether --with-default-make-target was given.
23701if test "${with_default_make_target+set}" = set; then :
23702  withval=$with_default_make_target;
23703fi
23704
23705  if test "x$with_default_make_target" = "x" \
23706      || test "x$with_default_make_target" = "xyes"; then
23707    DEFAULT_MAKE_TARGET="exploded-image"
23708  elif test "x$with_default_make_target" = "xno"; then
23709    as_fn_error $? "--without-default-make-target is not a valid option" "$LINENO" 5
23710  else
23711    DEFAULT_MAKE_TARGET="$with_default_make_target"
23712  fi
23713
23714
23715
23716
23717###############################################################################
23718#
23719# Determine OpenJDK variants, options and version numbers.
23720#
23721###############################################################################
23722
23723# We need build & target for this.
23724
23725  # Should we build a JDK/JVM with headful support (ie a graphical ui)?
23726  # We always build headless support.
23727  { $as_echo "$as_me:${as_lineno-$LINENO}: checking headful support" >&5
23728$as_echo_n "checking headful support... " >&6; }
23729  # Check whether --enable-headful was given.
23730if test "${enable_headful+set}" = set; then :
23731  enableval=$enable_headful; SUPPORT_HEADFUL=${enable_headful}
23732else
23733  SUPPORT_HEADFUL=yes
23734fi
23735
23736
23737  SUPPORT_HEADLESS=yes
23738  BUILD_HEADLESS="BUILD_HEADLESS:=true"
23739
23740  if test "x$SUPPORT_HEADFUL" = xyes; then
23741    # We are building both headful and headless.
23742    headful_msg="include support for both headful and headless"
23743  fi
23744
23745  if test "x$SUPPORT_HEADFUL" = xno; then
23746    # Thus we are building headless only.
23747    BUILD_HEADLESS="BUILD_HEADLESS:=true"
23748    headful_msg="headless only"
23749  fi
23750
23751  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $headful_msg" >&5
23752$as_echo "$headful_msg" >&6; }
23753
23754
23755
23756
23757
23758  # Choose cacerts source file
23759
23760# Check whether --with-cacerts-file was given.
23761if test "${with_cacerts_file+set}" = set; then :
23762  withval=$with_cacerts_file;
23763fi
23764
23765  if test "x$with_cacerts_file" != x; then
23766    CACERTS_FILE=$with_cacerts_file
23767  fi
23768
23769
23770  # Enable or disable unlimited crypto
23771  # Check whether --enable-unlimited-crypto was given.
23772if test "${enable_unlimited_crypto+set}" = set; then :
23773  enableval=$enable_unlimited_crypto;
23774else
23775  enable_unlimited_crypto=no
23776fi
23777
23778  if test "x$enable_unlimited_crypto" = "xyes"; then
23779    UNLIMITED_CRYPTO=true
23780  else
23781    UNLIMITED_CRYPTO=false
23782  fi
23783
23784
23785  # Should we build the serviceability agent (SA)?
23786  INCLUDE_SA=true
23787  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
23788    INCLUDE_SA=false
23789  fi
23790  if test "x$OPENJDK_TARGET_OS" = xaix ; then
23791    INCLUDE_SA=false
23792  fi
23793  if test "x$OPENJDK_TARGET_CPU" = xaarch64; then
23794    INCLUDE_SA=false
23795  fi
23796
23797
23798  # Compress jars
23799  COMPRESS_JARS=false
23800
23801
23802
23803  # Setup default copyright year. Mostly overridden when building close to a new year.
23804
23805# Check whether --with-copyright-year was given.
23806if test "${with_copyright_year+set}" = set; then :
23807  withval=$with_copyright_year;
23808fi
23809
23810  if test "x$with_copyright_year" = xyes; then
23811    as_fn_error $? "Copyright year must have a value" "$LINENO" 5
23812  elif test "x$with_copyright_year" != x; then
23813    COPYRIGHT_YEAR="$with_copyright_year"
23814  else
23815    COPYRIGHT_YEAR=`date +'%Y'`
23816  fi
23817
23818
23819
23820  # Check whether --enable-keep-packaged-modules was given.
23821if test "${enable_keep_packaged_modules+set}" = set; then :
23822  enableval=$enable_keep_packaged_modules;
23823fi
23824
23825
23826  if test "x$enable_keep_packaged_modules" = "xyes"; then
23827    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23828$as_echo_n "checking if packaged modules are kept... " >&6; }
23829    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
23830$as_echo "yes" >&6; }
23831    JLINK_KEEP_PACKAGED_MODULES=true
23832  elif test "x$enable_keep_packaged_modules" = "xno"; then
23833    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if packaged modules are kept" >&5
23834$as_echo_n "checking if packaged modules are kept... " >&6; }
23835    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
23836$as_echo "no" >&6; }
23837    JLINK_KEEP_PACKAGED_MODULES=false
23838  elif test "x$enable_keep_packaged_modules" = "x"; then
23839    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
23840$as_echo "yes (default)" >&6; }
23841    JLINK_KEEP_PACKAGED_MODULES=true
23842  else
23843    as_fn_error $? "--enable-keep-packaged-modules accepts no argument" "$LINENO" 5
23844  fi
23845
23846
23847
23848
23849  # Warn user that old version arguments are deprecated.
23850
23851
23852# Check whether --with-milestone was given.
23853if test "${with_milestone+set}" = set; then :
23854  withval=$with_milestone; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-milestone is deprecated and will be ignored." >&5
23855$as_echo "$as_me: WARNING: Option --with-milestone is deprecated and will be ignored." >&2;}
23856fi
23857
23858
23859
23860
23861# Check whether --with-update-version was given.
23862if test "${with_update_version+set}" = set; then :
23863  withval=$with_update_version; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-update-version is deprecated and will be ignored." >&5
23864$as_echo "$as_me: WARNING: Option --with-update-version is deprecated and will be ignored." >&2;}
23865fi
23866
23867
23868
23869
23870# Check whether --with-user-release-suffix was given.
23871if test "${with_user_release_suffix+set}" = set; then :
23872  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
23873$as_echo "$as_me: WARNING: Option --with-user-release-suffix is deprecated and will be ignored." >&2;}
23874fi
23875
23876
23877
23878
23879# Check whether --with-build-number was given.
23880if test "${with_build_number+set}" = set; then :
23881  withval=$with_build_number; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-build-number is deprecated and will be ignored." >&5
23882$as_echo "$as_me: WARNING: Option --with-build-number is deprecated and will be ignored." >&2;}
23883fi
23884
23885
23886
23887  # Source the version numbers file
23888  . $AUTOCONF_DIR/version-numbers
23889
23890  # Some non-version number information is set in that file
23891
23892
23893
23894
23895
23896
23897
23898
23899
23900  # Override version from arguments
23901
23902  # If --with-version-string is set, process it first. It is possible to
23903  # override parts with more specific flags, since these are processed later.
23904
23905# Check whether --with-version-string was given.
23906if test "${with_version_string+set}" = set; then :
23907  withval=$with_version_string;
23908fi
23909
23910  if test "x$with_version_string" = xyes; then
23911    as_fn_error $? "--with-version-string must have a value" "$LINENO" 5
23912  elif test "x$with_version_string" != x; then
23913    # Additional [] needed to keep m4 from mangling shell constructs.
23914    if  [[ $with_version_string =~ ^([0-9]+)(\.([0-9]+))?(\.([0-9]+))?(\.([0-9]+))?(-([a-zA-Z]+))?((\+)([0-9]+)?(-([-a-zA-Z0-9.]+))?)?$ ]] ; then
23915      VERSION_MAJOR=${BASH_REMATCH[1]}
23916      VERSION_MINOR=${BASH_REMATCH[3]}
23917      VERSION_SECURITY=${BASH_REMATCH[5]}
23918      VERSION_PATCH=${BASH_REMATCH[7]}
23919      VERSION_PRE=${BASH_REMATCH[9]}
23920      version_plus_separator=${BASH_REMATCH[11]}
23921      VERSION_BUILD=${BASH_REMATCH[12]}
23922      VERSION_OPT=${BASH_REMATCH[14]}
23923      # Unspecified numerical fields are interpreted as 0.
23924      if test "x$VERSION_MINOR" = x; then
23925        VERSION_MINOR=0
23926      fi
23927      if test "x$VERSION_SECURITY" = x; then
23928        VERSION_SECURITY=0
23929      fi
23930      if test "x$VERSION_PATCH" = x; then
23931        VERSION_PATCH=0
23932      fi
23933      if test "x$version_plus_separator" != x \
23934          && test "x$VERSION_BUILD$VERSION_OPT" = x; then
23935        as_fn_error $? "Version string contains + but both 'BUILD' and 'OPT' are missing" "$LINENO" 5
23936      fi
23937      # Stop the version part process from setting default values.
23938      # We still allow them to explicitely override though.
23939      NO_DEFAULT_VERSION_PARTS=true
23940    else
23941      as_fn_error $? "--with-version-string fails to parse as a valid version string: $with_version_string" "$LINENO" 5
23942    fi
23943  fi
23944
23945
23946# Check whether --with-version-pre was given.
23947if test "${with_version_pre+set}" = set; then :
23948  withval=$with_version_pre; with_version_pre_present=true
23949else
23950  with_version_pre_present=false
23951fi
23952
23953
23954  if test "x$with_version_pre_present" = xtrue; then
23955    if test "x$with_version_pre" = xyes; then
23956      as_fn_error $? "--with-version-pre must have a value" "$LINENO" 5
23957    elif test "x$with_version_pre" = xno; then
23958      # Interpret --without-* as empty string instead of the literal "no"
23959      VERSION_PRE=
23960    else
23961      # Only [a-zA-Z] is allowed in the VERSION_PRE. Outer [ ] to quote m4.
23962       VERSION_PRE=`$ECHO "$with_version_pre" | $TR -c -d '[a-z][A-Z]'`
23963      if test "x$VERSION_PRE" != "x$with_version_pre"; then
23964        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&5
23965$as_echo "$as_me: WARNING: --with-version-pre value has been sanitized from '$with_version_pre' to '$VERSION_PRE'" >&2;}
23966      fi
23967    fi
23968  else
23969    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
23970      # Default is to use "internal" as pre
23971      VERSION_PRE="internal"
23972    fi
23973  fi
23974
23975
23976# Check whether --with-version-opt was given.
23977if test "${with_version_opt+set}" = set; then :
23978  withval=$with_version_opt; with_version_opt_present=true
23979else
23980  with_version_opt_present=false
23981fi
23982
23983
23984  if test "x$with_version_opt_present" = xtrue; then
23985    if test "x$with_version_opt" = xyes; then
23986      as_fn_error $? "--with-version-opt must have a value" "$LINENO" 5
23987    elif test "x$with_version_opt" = xno; then
23988      # Interpret --without-* as empty string instead of the literal "no"
23989      VERSION_OPT=
23990    else
23991      # Only [-.a-zA-Z0-9] is allowed in the VERSION_OPT. Outer [ ] to quote m4.
23992       VERSION_OPT=`$ECHO "$with_version_opt" | $TR -c -d '[a-z][A-Z][0-9].-'`
23993      if test "x$VERSION_OPT" != "x$with_version_opt"; then
23994        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&5
23995$as_echo "$as_me: WARNING: --with-version-opt value has been sanitized from '$with_version_opt' to '$VERSION_OPT'" >&2;}
23996      fi
23997    fi
23998  else
23999    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24000      # Default is to calculate a string like this <timestamp>.<username>.<base dir name>
24001      timestamp=`$DATE '+%Y-%m-%d-%H%M%S'`
24002      # Outer [ ] to quote m4.
24003       basedirname=`$BASENAME "$TOPDIR" | $TR -d -c '[a-z][A-Z][0-9].-'`
24004      VERSION_OPT="$timestamp.$USERNAME.$basedirname"
24005    fi
24006  fi
24007
24008
24009# Check whether --with-version-build was given.
24010if test "${with_version_build+set}" = set; then :
24011  withval=$with_version_build; with_version_build_present=true
24012else
24013  with_version_build_present=false
24014fi
24015
24016
24017  if test "x$with_version_build_present" = xtrue; then
24018    if test "x$with_version_build" = xyes; then
24019      as_fn_error $? "--with-version-build must have a value" "$LINENO" 5
24020    elif test "x$with_version_build" = xno; then
24021      # Interpret --without-* as empty string instead of the literal "no"
24022      VERSION_BUILD=
24023    elif test "x$with_version_build" = x; then
24024      VERSION_BUILD=
24025    else
24026
24027  # Additional [] needed to keep m4 from mangling shell constructs.
24028  if  ! [[ "$with_version_build" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24029    as_fn_error $? "\"$with_version_build\" is not a valid numerical value for VERSION_BUILD" "$LINENO" 5
24030  fi
24031  # Extract the version number without leading zeros.
24032  cleaned_value=${BASH_REMATCH[1]}
24033  if test "x$cleaned_value" = x; then
24034    # Special case for zero
24035    cleaned_value=${BASH_REMATCH[2]}
24036  fi
24037
24038  if test $cleaned_value -gt 255; then
24039    as_fn_error $? "VERSION_BUILD is given as $with_version_build. This is greater than 255 which is not allowed." "$LINENO" 5
24040  fi
24041  if test "x$cleaned_value" != "x$with_version_build"; then
24042    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&5
24043$as_echo "$as_me: WARNING: Value for VERSION_BUILD has been sanitized from '$with_version_build' to '$cleaned_value'" >&2;}
24044  fi
24045  VERSION_BUILD=$cleaned_value
24046
24047    fi
24048  else
24049    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24050      # Default is to not have a build number.
24051      VERSION_BUILD=""
24052      # FIXME: Until all code can cope with an empty VERSION_BUILD, set it to 0.
24053      VERSION_BUILD=0
24054    fi
24055  fi
24056
24057
24058# Check whether --with-version-major was given.
24059if test "${with_version_major+set}" = set; then :
24060  withval=$with_version_major; with_version_major_present=true
24061else
24062  with_version_major_present=false
24063fi
24064
24065
24066  if test "x$with_version_major_present" = xtrue; then
24067    if test "x$with_version_major" = xyes; then
24068      as_fn_error $? "--with-version-major must have a value" "$LINENO" 5
24069    else
24070
24071  # Additional [] needed to keep m4 from mangling shell constructs.
24072  if  ! [[ "$with_version_major" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24073    as_fn_error $? "\"$with_version_major\" is not a valid numerical value for VERSION_MAJOR" "$LINENO" 5
24074  fi
24075  # Extract the version number without leading zeros.
24076  cleaned_value=${BASH_REMATCH[1]}
24077  if test "x$cleaned_value" = x; then
24078    # Special case for zero
24079    cleaned_value=${BASH_REMATCH[2]}
24080  fi
24081
24082  if test $cleaned_value -gt 255; then
24083    as_fn_error $? "VERSION_MAJOR is given as $with_version_major. This is greater than 255 which is not allowed." "$LINENO" 5
24084  fi
24085  if test "x$cleaned_value" != "x$with_version_major"; then
24086    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&5
24087$as_echo "$as_me: WARNING: Value for VERSION_MAJOR has been sanitized from '$with_version_major' to '$cleaned_value'" >&2;}
24088  fi
24089  VERSION_MAJOR=$cleaned_value
24090
24091    fi
24092  else
24093    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24094      # Default is to get value from version-numbers
24095      VERSION_MAJOR="$DEFAULT_VERSION_MAJOR"
24096    fi
24097  fi
24098
24099
24100# Check whether --with-version-minor was given.
24101if test "${with_version_minor+set}" = set; then :
24102  withval=$with_version_minor; with_version_minor_present=true
24103else
24104  with_version_minor_present=false
24105fi
24106
24107
24108  if test "x$with_version_minor_present" = xtrue; then
24109    if test "x$with_version_minor" = xyes; then
24110      as_fn_error $? "--with-version-minor must have a value" "$LINENO" 5
24111    elif test "x$with_version_minor" = xno; then
24112      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24113      VERSION_MINOR=0
24114    elif test "x$with_version_minor" = x; then
24115      VERSION_MINOR=0
24116    else
24117
24118  # Additional [] needed to keep m4 from mangling shell constructs.
24119  if  ! [[ "$with_version_minor" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24120    as_fn_error $? "\"$with_version_minor\" is not a valid numerical value for VERSION_MINOR" "$LINENO" 5
24121  fi
24122  # Extract the version number without leading zeros.
24123  cleaned_value=${BASH_REMATCH[1]}
24124  if test "x$cleaned_value" = x; then
24125    # Special case for zero
24126    cleaned_value=${BASH_REMATCH[2]}
24127  fi
24128
24129  if test $cleaned_value -gt 255; then
24130    as_fn_error $? "VERSION_MINOR is given as $with_version_minor. This is greater than 255 which is not allowed." "$LINENO" 5
24131  fi
24132  if test "x$cleaned_value" != "x$with_version_minor"; then
24133    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&5
24134$as_echo "$as_me: WARNING: Value for VERSION_MINOR has been sanitized from '$with_version_minor' to '$cleaned_value'" >&2;}
24135  fi
24136  VERSION_MINOR=$cleaned_value
24137
24138    fi
24139  else
24140    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24141      # Default is 0, if unspecified
24142      VERSION_MINOR=0
24143    fi
24144  fi
24145
24146
24147# Check whether --with-version-security was given.
24148if test "${with_version_security+set}" = set; then :
24149  withval=$with_version_security; with_version_security_present=true
24150else
24151  with_version_security_present=false
24152fi
24153
24154
24155  if test "x$with_version_security_present" = xtrue; then
24156    if test "x$with_version_security" = xyes; then
24157      as_fn_error $? "--with-version-security must have a value" "$LINENO" 5
24158    elif test "x$with_version_security" = xno; then
24159      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24160      VERSION_SECURITY=0
24161    elif test "x$with_version_security" = x; then
24162      VERSION_SECURITY=0
24163    else
24164
24165  # Additional [] needed to keep m4 from mangling shell constructs.
24166  if  ! [[ "$with_version_security" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24167    as_fn_error $? "\"$with_version_security\" is not a valid numerical value for VERSION_SECURITY" "$LINENO" 5
24168  fi
24169  # Extract the version number without leading zeros.
24170  cleaned_value=${BASH_REMATCH[1]}
24171  if test "x$cleaned_value" = x; then
24172    # Special case for zero
24173    cleaned_value=${BASH_REMATCH[2]}
24174  fi
24175
24176  if test $cleaned_value -gt 255; then
24177    as_fn_error $? "VERSION_SECURITY is given as $with_version_security. This is greater than 255 which is not allowed." "$LINENO" 5
24178  fi
24179  if test "x$cleaned_value" != "x$with_version_security"; then
24180    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&5
24181$as_echo "$as_me: WARNING: Value for VERSION_SECURITY has been sanitized from '$with_version_security' to '$cleaned_value'" >&2;}
24182  fi
24183  VERSION_SECURITY=$cleaned_value
24184
24185    fi
24186  else
24187    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24188      # Default is 0, if unspecified
24189      VERSION_SECURITY=0
24190    fi
24191  fi
24192
24193
24194# Check whether --with-version-patch was given.
24195if test "${with_version_patch+set}" = set; then :
24196  withval=$with_version_patch; with_version_patch_present=true
24197else
24198  with_version_patch_present=false
24199fi
24200
24201
24202  if test "x$with_version_patch_present" = xtrue; then
24203    if test "x$with_version_patch" = xyes; then
24204      as_fn_error $? "--with-version-patch must have a value" "$LINENO" 5
24205    elif test "x$with_version_patch" = xno; then
24206      # Interpret --without-* as empty string (i.e. 0) instead of the literal "no"
24207      VERSION_PATCH=0
24208    elif test "x$with_version_patch" = x; then
24209      VERSION_PATCH=0
24210    else
24211
24212  # Additional [] needed to keep m4 from mangling shell constructs.
24213  if  ! [[ "$with_version_patch" =~ ^0*([1-9][0-9]*)|(0)$ ]]  ; then
24214    as_fn_error $? "\"$with_version_patch\" is not a valid numerical value for VERSION_PATCH" "$LINENO" 5
24215  fi
24216  # Extract the version number without leading zeros.
24217  cleaned_value=${BASH_REMATCH[1]}
24218  if test "x$cleaned_value" = x; then
24219    # Special case for zero
24220    cleaned_value=${BASH_REMATCH[2]}
24221  fi
24222
24223  if test $cleaned_value -gt 255; then
24224    as_fn_error $? "VERSION_PATCH is given as $with_version_patch. This is greater than 255 which is not allowed." "$LINENO" 5
24225  fi
24226  if test "x$cleaned_value" != "x$with_version_patch"; then
24227    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&5
24228$as_echo "$as_me: WARNING: Value for VERSION_PATCH has been sanitized from '$with_version_patch' to '$cleaned_value'" >&2;}
24229  fi
24230  VERSION_PATCH=$cleaned_value
24231
24232    fi
24233  else
24234    if test "x$NO_DEFAULT_VERSION_PARTS" != xtrue; then
24235      # Default is 0, if unspecified
24236      VERSION_PATCH=0
24237    fi
24238  fi
24239
24240  # Calculate derived version properties
24241
24242  # Set VERSION_IS_GA based on if VERSION_PRE has a value
24243  if test "x$VERSION_PRE" = x; then
24244    VERSION_IS_GA=true
24245  else
24246    VERSION_IS_GA=false
24247  fi
24248
24249  # VERSION_NUMBER but always with exactly 4 positions, with 0 for empty positions.
24250  VERSION_NUMBER_FOUR_POSITIONS=$VERSION_MAJOR.$VERSION_MINOR.$VERSION_SECURITY.$VERSION_PATCH
24251
24252  stripped_version_number=$VERSION_NUMBER_FOUR_POSITIONS
24253  # Strip trailing zeroes from stripped_version_number
24254  for i in 1 2 3 ; do stripped_version_number=${stripped_version_number%.0} ; done
24255  VERSION_NUMBER=$stripped_version_number
24256
24257  # The complete version string, with additional build information
24258  if test "x$VERSION_BUILD$VERSION_OPT" = x; then
24259    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24260  else
24261    # If either build or opt is set, we need a + separator
24262    VERSION_STRING=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}+$VERSION_BUILD${VERSION_OPT:+-$VERSION_OPT}
24263  fi
24264
24265  # The short version string, just VERSION_NUMBER and PRE, if present.
24266  VERSION_SHORT=$VERSION_NUMBER${VERSION_PRE:+-$VERSION_PRE}
24267
24268  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for version string" >&5
24269$as_echo_n "checking for version string... " >&6; }
24270  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $VERSION_STRING" >&5
24271$as_echo "$VERSION_STRING" >&6; }
24272
24273
24274
24275
24276
24277
24278
24279
24280
24281
24282
24283
24284
24285
24286
24287###############################################################################
24288#
24289# Setup BootJDK, used to bootstrap the build.
24290#
24291###############################################################################
24292
24293
24294  BOOT_JDK_FOUND=no
24295
24296# Check whether --with-boot-jdk was given.
24297if test "${with_boot_jdk+set}" = set; then :
24298  withval=$with_boot_jdk;
24299fi
24300
24301
24302  # We look for the Boot JDK through various means, going from more certain to
24303  # more of a guess-work. After each test, BOOT_JDK_FOUND is set to "yes" if
24304  # we detected something (if so, the path to the jdk is in BOOT_JDK). But we
24305  # must check if this is indeed valid; otherwise we'll continue looking.
24306
24307  # Test: Is bootjdk explicitely set by command line arguments?
24308
24309  if test "x$BOOT_JDK_FOUND" = xno; then
24310    # Now execute the test
24311
24312  if test "x$with_boot_jdk" != x; then
24313    BOOT_JDK=$with_boot_jdk
24314    BOOT_JDK_FOUND=maybe
24315    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using configure arguments" >&5
24316$as_echo "$as_me: Found potential Boot JDK using configure arguments" >&6;}
24317  fi
24318
24319
24320    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24321    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24322      # Do we have a bin/java?
24323      if test ! -x "$BOOT_JDK/bin/java"; then
24324        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24325$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24326        BOOT_JDK_FOUND=no
24327      else
24328        # Do we have a bin/javac?
24329        if test ! -x "$BOOT_JDK/bin/javac"; then
24330          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24331$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24332          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24333$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24334          BOOT_JDK_FOUND=no
24335        else
24336          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24337          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24338
24339          # Extra M4 quote needed to protect [] in grep expression.
24340          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24341          if test "x$FOUND_CORRECT_VERSION" = x; then
24342            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24344            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24345$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24346            BOOT_JDK_FOUND=no
24347          else
24348            # We're done! :-)
24349            BOOT_JDK_FOUND=yes
24350
24351  # Only process if variable expands to non-empty
24352
24353  if test "x$BOOT_JDK" != x; then
24354    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24355
24356  # Input might be given as Windows format, start by converting to
24357  # unix format.
24358  path="$BOOT_JDK"
24359  new_path=`$CYGPATH -u "$path"`
24360
24361  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24362  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24363  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24364  # "foo.exe" is OK but "foo" is an error.
24365  #
24366  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24367  # It is also a way to make sure we got the proper file name for the real test later on.
24368  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24369  if test "x$test_shortpath" = x; then
24370    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24371$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24372    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24373  fi
24374
24375  # Call helper function which possibly converts this using DOS-style short mode.
24376  # If so, the updated path is stored in $new_path.
24377
24378  input_path="$new_path"
24379  # Check if we need to convert this using DOS-style short mode. If the path
24380  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24381  # take no chances and rewrite it.
24382  # Note: m4 eats our [], so we need to use [ and ] instead.
24383  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24384  if test "x$has_forbidden_chars" != x; then
24385    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24386    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24387    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24388    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24389      # Going to short mode and back again did indeed matter. Since short mode is
24390      # case insensitive, let's make it lowercase to improve readability.
24391      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24392      # Now convert it back to Unix-style (cygpath)
24393      input_path=`$CYGPATH -u "$shortmode_path"`
24394      new_path="$input_path"
24395    fi
24396  fi
24397
24398  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24399  if test "x$test_cygdrive_prefix" = x; then
24400    # As a simple fix, exclude /usr/bin since it's not a real path.
24401    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24402      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24403      # a path prefixed by /cygdrive for fixpath to work.
24404      new_path="$CYGWIN_ROOT_PATH$input_path"
24405    fi
24406  fi
24407
24408
24409  if test "x$path" != "x$new_path"; then
24410    BOOT_JDK="$new_path"
24411    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24412$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24413  fi
24414
24415    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24416
24417  path="$BOOT_JDK"
24418  has_colon=`$ECHO $path | $GREP ^.:`
24419  new_path="$path"
24420  if test "x$has_colon" = x; then
24421    # Not in mixed or Windows style, start by that.
24422    new_path=`cmd //c echo $path`
24423  fi
24424
24425
24426  input_path="$new_path"
24427  # Check if we need to convert this using DOS-style short mode. If the path
24428  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24429  # take no chances and rewrite it.
24430  # Note: m4 eats our [], so we need to use [ and ] instead.
24431  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24432  if test "x$has_forbidden_chars" != x; then
24433    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24434    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24435  fi
24436
24437
24438  windows_path="$new_path"
24439  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24440    unix_path=`$CYGPATH -u "$windows_path"`
24441    new_path="$unix_path"
24442  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24443    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24444    new_path="$unix_path"
24445  fi
24446
24447  if test "x$path" != "x$new_path"; then
24448    BOOT_JDK="$new_path"
24449    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24450$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24451  fi
24452
24453  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24454  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24455
24456    else
24457      # We're on a unix platform. Hooray! :)
24458      path="$BOOT_JDK"
24459      has_space=`$ECHO "$path" | $GREP " "`
24460      if test "x$has_space" != x; then
24461        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24462$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24463        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24464      fi
24465
24466      # Use eval to expand a potential ~
24467      eval path="$path"
24468      if test ! -f "$path" && test ! -d "$path"; then
24469        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24470      fi
24471
24472      if test -d "$path"; then
24473        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24474      else
24475        dir="`$DIRNAME "$path"`"
24476        base="`$BASENAME "$path"`"
24477        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24478      fi
24479    fi
24480  fi
24481
24482            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24483$as_echo_n "checking for Boot JDK... " >&6; }
24484            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24485$as_echo "$BOOT_JDK" >&6; }
24486            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24487$as_echo_n "checking Boot JDK version... " >&6; }
24488            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24489            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24490$as_echo "$BOOT_JDK_VERSION" >&6; }
24491          fi # end check jdk version
24492        fi # end check javac
24493      fi # end check java
24494    fi # end check boot jdk found
24495  fi
24496
24497  if test "x$with_boot_jdk" != x && test "x$BOOT_JDK_FOUND" = xno; then
24498    # Having specified an argument which is incorrect will produce an instant failure;
24499    # we should not go on looking
24500    as_fn_error $? "The path given by --with-boot-jdk does not contain a valid Boot JDK" "$LINENO" 5
24501  fi
24502
24503  # Test: On MacOS X, can we find a boot jdk using /usr/libexec/java_home?
24504
24505  if test "x$BOOT_JDK_FOUND" = xno; then
24506    # Now execute the test
24507
24508  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
24509    # First check at user selected default
24510
24511  if test "x$BOOT_JDK_FOUND" = xno; then
24512    # Now execute the test
24513
24514  if test -x /usr/libexec/java_home; then
24515    BOOT_JDK=`/usr/libexec/java_home `
24516    BOOT_JDK_FOUND=maybe
24517    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home " >&5
24518$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home " >&6;}
24519  fi
24520
24521
24522    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24523    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24524      # Do we have a bin/java?
24525      if test ! -x "$BOOT_JDK/bin/java"; then
24526        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24527$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24528        BOOT_JDK_FOUND=no
24529      else
24530        # Do we have a bin/javac?
24531        if test ! -x "$BOOT_JDK/bin/javac"; then
24532          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24533$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24534          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24535$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24536          BOOT_JDK_FOUND=no
24537        else
24538          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24539          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24540
24541          # Extra M4 quote needed to protect [] in grep expression.
24542          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24543          if test "x$FOUND_CORRECT_VERSION" = x; then
24544            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24545$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24546            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24547$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24548            BOOT_JDK_FOUND=no
24549          else
24550            # We're done! :-)
24551            BOOT_JDK_FOUND=yes
24552
24553  # Only process if variable expands to non-empty
24554
24555  if test "x$BOOT_JDK" != x; then
24556    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24557
24558  # Input might be given as Windows format, start by converting to
24559  # unix format.
24560  path="$BOOT_JDK"
24561  new_path=`$CYGPATH -u "$path"`
24562
24563  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24564  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24565  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24566  # "foo.exe" is OK but "foo" is an error.
24567  #
24568  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24569  # It is also a way to make sure we got the proper file name for the real test later on.
24570  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24571  if test "x$test_shortpath" = x; then
24572    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24573$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24574    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24575  fi
24576
24577  # Call helper function which possibly converts this using DOS-style short mode.
24578  # If so, the updated path is stored in $new_path.
24579
24580  input_path="$new_path"
24581  # Check if we need to convert this using DOS-style short mode. If the path
24582  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24583  # take no chances and rewrite it.
24584  # Note: m4 eats our [], so we need to use [ and ] instead.
24585  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24586  if test "x$has_forbidden_chars" != x; then
24587    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24588    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24589    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24590    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24591      # Going to short mode and back again did indeed matter. Since short mode is
24592      # case insensitive, let's make it lowercase to improve readability.
24593      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24594      # Now convert it back to Unix-style (cygpath)
24595      input_path=`$CYGPATH -u "$shortmode_path"`
24596      new_path="$input_path"
24597    fi
24598  fi
24599
24600  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24601  if test "x$test_cygdrive_prefix" = x; then
24602    # As a simple fix, exclude /usr/bin since it's not a real path.
24603    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24604      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24605      # a path prefixed by /cygdrive for fixpath to work.
24606      new_path="$CYGWIN_ROOT_PATH$input_path"
24607    fi
24608  fi
24609
24610
24611  if test "x$path" != "x$new_path"; then
24612    BOOT_JDK="$new_path"
24613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24614$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24615  fi
24616
24617    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24618
24619  path="$BOOT_JDK"
24620  has_colon=`$ECHO $path | $GREP ^.:`
24621  new_path="$path"
24622  if test "x$has_colon" = x; then
24623    # Not in mixed or Windows style, start by that.
24624    new_path=`cmd //c echo $path`
24625  fi
24626
24627
24628  input_path="$new_path"
24629  # Check if we need to convert this using DOS-style short mode. If the path
24630  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24631  # take no chances and rewrite it.
24632  # Note: m4 eats our [], so we need to use [ and ] instead.
24633  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24634  if test "x$has_forbidden_chars" != x; then
24635    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24636    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24637  fi
24638
24639
24640  windows_path="$new_path"
24641  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24642    unix_path=`$CYGPATH -u "$windows_path"`
24643    new_path="$unix_path"
24644  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24645    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24646    new_path="$unix_path"
24647  fi
24648
24649  if test "x$path" != "x$new_path"; then
24650    BOOT_JDK="$new_path"
24651    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24652$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24653  fi
24654
24655  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24656  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24657
24658    else
24659      # We're on a unix platform. Hooray! :)
24660      path="$BOOT_JDK"
24661      has_space=`$ECHO "$path" | $GREP " "`
24662      if test "x$has_space" != x; then
24663        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24664$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24665        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24666      fi
24667
24668      # Use eval to expand a potential ~
24669      eval path="$path"
24670      if test ! -f "$path" && test ! -d "$path"; then
24671        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24672      fi
24673
24674      if test -d "$path"; then
24675        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24676      else
24677        dir="`$DIRNAME "$path"`"
24678        base="`$BASENAME "$path"`"
24679        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24680      fi
24681    fi
24682  fi
24683
24684            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24685$as_echo_n "checking for Boot JDK... " >&6; }
24686            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24687$as_echo "$BOOT_JDK" >&6; }
24688            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24689$as_echo_n "checking Boot JDK version... " >&6; }
24690            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24691            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24692$as_echo "$BOOT_JDK_VERSION" >&6; }
24693          fi # end check jdk version
24694        fi # end check javac
24695      fi # end check java
24696    fi # end check boot jdk found
24697  fi
24698
24699    # If that did not work out (e.g. too old), try explicit versions instead
24700
24701  if test "x$BOOT_JDK_FOUND" = xno; then
24702    # Now execute the test
24703
24704  if test -x /usr/libexec/java_home; then
24705    BOOT_JDK=`/usr/libexec/java_home -v 1.9`
24706    BOOT_JDK_FOUND=maybe
24707    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&5
24708$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.9" >&6;}
24709  fi
24710
24711
24712    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24713    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24714      # Do we have a bin/java?
24715      if test ! -x "$BOOT_JDK/bin/java"; then
24716        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24717$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24718        BOOT_JDK_FOUND=no
24719      else
24720        # Do we have a bin/javac?
24721        if test ! -x "$BOOT_JDK/bin/javac"; then
24722          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24723$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24724          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24725$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24726          BOOT_JDK_FOUND=no
24727        else
24728          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24729          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24730
24731          # Extra M4 quote needed to protect [] in grep expression.
24732          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24733          if test "x$FOUND_CORRECT_VERSION" = x; then
24734            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24735$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24736            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24737$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24738            BOOT_JDK_FOUND=no
24739          else
24740            # We're done! :-)
24741            BOOT_JDK_FOUND=yes
24742
24743  # Only process if variable expands to non-empty
24744
24745  if test "x$BOOT_JDK" != x; then
24746    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24747
24748  # Input might be given as Windows format, start by converting to
24749  # unix format.
24750  path="$BOOT_JDK"
24751  new_path=`$CYGPATH -u "$path"`
24752
24753  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24754  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24755  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24756  # "foo.exe" is OK but "foo" is an error.
24757  #
24758  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24759  # It is also a way to make sure we got the proper file name for the real test later on.
24760  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24761  if test "x$test_shortpath" = x; then
24762    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24763$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24764    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24765  fi
24766
24767  # Call helper function which possibly converts this using DOS-style short mode.
24768  # If so, the updated path is stored in $new_path.
24769
24770  input_path="$new_path"
24771  # Check if we need to convert this using DOS-style short mode. If the path
24772  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24773  # take no chances and rewrite it.
24774  # Note: m4 eats our [], so we need to use [ and ] instead.
24775  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24776  if test "x$has_forbidden_chars" != x; then
24777    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24778    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24779    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24780    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24781      # Going to short mode and back again did indeed matter. Since short mode is
24782      # case insensitive, let's make it lowercase to improve readability.
24783      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24784      # Now convert it back to Unix-style (cygpath)
24785      input_path=`$CYGPATH -u "$shortmode_path"`
24786      new_path="$input_path"
24787    fi
24788  fi
24789
24790  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24791  if test "x$test_cygdrive_prefix" = x; then
24792    # As a simple fix, exclude /usr/bin since it's not a real path.
24793    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24794      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24795      # a path prefixed by /cygdrive for fixpath to work.
24796      new_path="$CYGWIN_ROOT_PATH$input_path"
24797    fi
24798  fi
24799
24800
24801  if test "x$path" != "x$new_path"; then
24802    BOOT_JDK="$new_path"
24803    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24804$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24805  fi
24806
24807    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24808
24809  path="$BOOT_JDK"
24810  has_colon=`$ECHO $path | $GREP ^.:`
24811  new_path="$path"
24812  if test "x$has_colon" = x; then
24813    # Not in mixed or Windows style, start by that.
24814    new_path=`cmd //c echo $path`
24815  fi
24816
24817
24818  input_path="$new_path"
24819  # Check if we need to convert this using DOS-style short mode. If the path
24820  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24821  # take no chances and rewrite it.
24822  # Note: m4 eats our [], so we need to use [ and ] instead.
24823  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
24824  if test "x$has_forbidden_chars" != x; then
24825    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24826    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24827  fi
24828
24829
24830  windows_path="$new_path"
24831  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24832    unix_path=`$CYGPATH -u "$windows_path"`
24833    new_path="$unix_path"
24834  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24835    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
24836    new_path="$unix_path"
24837  fi
24838
24839  if test "x$path" != "x$new_path"; then
24840    BOOT_JDK="$new_path"
24841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24842$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24843  fi
24844
24845  # Save the first 10 bytes of this path to the storage, so fixpath can work.
24846  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
24847
24848    else
24849      # We're on a unix platform. Hooray! :)
24850      path="$BOOT_JDK"
24851      has_space=`$ECHO "$path" | $GREP " "`
24852      if test "x$has_space" != x; then
24853        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24854$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24855        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
24856      fi
24857
24858      # Use eval to expand a potential ~
24859      eval path="$path"
24860      if test ! -f "$path" && test ! -d "$path"; then
24861        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
24862      fi
24863
24864      if test -d "$path"; then
24865        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
24866      else
24867        dir="`$DIRNAME "$path"`"
24868        base="`$BASENAME "$path"`"
24869        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
24870      fi
24871    fi
24872  fi
24873
24874            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
24875$as_echo_n "checking for Boot JDK... " >&6; }
24876            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
24877$as_echo "$BOOT_JDK" >&6; }
24878            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
24879$as_echo_n "checking Boot JDK version... " >&6; }
24880            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
24881            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
24882$as_echo "$BOOT_JDK_VERSION" >&6; }
24883          fi # end check jdk version
24884        fi # end check javac
24885      fi # end check java
24886    fi # end check boot jdk found
24887  fi
24888
24889
24890  if test "x$BOOT_JDK_FOUND" = xno; then
24891    # Now execute the test
24892
24893  if test -x /usr/libexec/java_home; then
24894    BOOT_JDK=`/usr/libexec/java_home -v 1.8`
24895    BOOT_JDK_FOUND=maybe
24896    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&5
24897$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.8" >&6;}
24898  fi
24899
24900
24901    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
24902    if test "x$BOOT_JDK_FOUND" = xmaybe; then
24903      # Do we have a bin/java?
24904      if test ! -x "$BOOT_JDK/bin/java"; then
24905        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
24906$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
24907        BOOT_JDK_FOUND=no
24908      else
24909        # Do we have a bin/javac?
24910        if test ! -x "$BOOT_JDK/bin/javac"; then
24911          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
24912$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
24913          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
24914$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
24915          BOOT_JDK_FOUND=no
24916        else
24917          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
24918          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
24919
24920          # Extra M4 quote needed to protect [] in grep expression.
24921          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
24922          if test "x$FOUND_CORRECT_VERSION" = x; then
24923            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
24924$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
24925            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
24926$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
24927            BOOT_JDK_FOUND=no
24928          else
24929            # We're done! :-)
24930            BOOT_JDK_FOUND=yes
24931
24932  # Only process if variable expands to non-empty
24933
24934  if test "x$BOOT_JDK" != x; then
24935    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
24936
24937  # Input might be given as Windows format, start by converting to
24938  # unix format.
24939  path="$BOOT_JDK"
24940  new_path=`$CYGPATH -u "$path"`
24941
24942  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
24943  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
24944  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
24945  # "foo.exe" is OK but "foo" is an error.
24946  #
24947  # This test is therefore slightly more accurate than "test -f" to check for file precense.
24948  # It is also a way to make sure we got the proper file name for the real test later on.
24949  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
24950  if test "x$test_shortpath" = x; then
24951    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
24952$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
24953    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
24954  fi
24955
24956  # Call helper function which possibly converts this using DOS-style short mode.
24957  # If so, the updated path is stored in $new_path.
24958
24959  input_path="$new_path"
24960  # Check if we need to convert this using DOS-style short mode. If the path
24961  # contains just simple characters, use it. Otherwise (spaces, weird characters),
24962  # take no chances and rewrite it.
24963  # Note: m4 eats our [], so we need to use [ and ] instead.
24964  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
24965  if test "x$has_forbidden_chars" != x; then
24966    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
24967    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
24968    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
24969    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
24970      # Going to short mode and back again did indeed matter. Since short mode is
24971      # case insensitive, let's make it lowercase to improve readability.
24972      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
24973      # Now convert it back to Unix-style (cygpath)
24974      input_path=`$CYGPATH -u "$shortmode_path"`
24975      new_path="$input_path"
24976    fi
24977  fi
24978
24979  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
24980  if test "x$test_cygdrive_prefix" = x; then
24981    # As a simple fix, exclude /usr/bin since it's not a real path.
24982    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
24983      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
24984      # a path prefixed by /cygdrive for fixpath to work.
24985      new_path="$CYGWIN_ROOT_PATH$input_path"
24986    fi
24987  fi
24988
24989
24990  if test "x$path" != "x$new_path"; then
24991    BOOT_JDK="$new_path"
24992    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
24993$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
24994  fi
24995
24996    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
24997
24998  path="$BOOT_JDK"
24999  has_colon=`$ECHO $path | $GREP ^.:`
25000  new_path="$path"
25001  if test "x$has_colon" = x; then
25002    # Not in mixed or Windows style, start by that.
25003    new_path=`cmd //c echo $path`
25004  fi
25005
25006
25007  input_path="$new_path"
25008  # Check if we need to convert this using DOS-style short mode. If the path
25009  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25010  # take no chances and rewrite it.
25011  # Note: m4 eats our [], so we need to use [ and ] instead.
25012  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25013  if test "x$has_forbidden_chars" != x; then
25014    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25015    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25016  fi
25017
25018
25019  windows_path="$new_path"
25020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25021    unix_path=`$CYGPATH -u "$windows_path"`
25022    new_path="$unix_path"
25023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25025    new_path="$unix_path"
25026  fi
25027
25028  if test "x$path" != "x$new_path"; then
25029    BOOT_JDK="$new_path"
25030    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25031$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25032  fi
25033
25034  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25035  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25036
25037    else
25038      # We're on a unix platform. Hooray! :)
25039      path="$BOOT_JDK"
25040      has_space=`$ECHO "$path" | $GREP " "`
25041      if test "x$has_space" != x; then
25042        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25043$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25044        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25045      fi
25046
25047      # Use eval to expand a potential ~
25048      eval path="$path"
25049      if test ! -f "$path" && test ! -d "$path"; then
25050        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25051      fi
25052
25053      if test -d "$path"; then
25054        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25055      else
25056        dir="`$DIRNAME "$path"`"
25057        base="`$BASENAME "$path"`"
25058        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25059      fi
25060    fi
25061  fi
25062
25063            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25064$as_echo_n "checking for Boot JDK... " >&6; }
25065            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25066$as_echo "$BOOT_JDK" >&6; }
25067            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25068$as_echo_n "checking Boot JDK version... " >&6; }
25069            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25070            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25071$as_echo "$BOOT_JDK_VERSION" >&6; }
25072          fi # end check jdk version
25073        fi # end check javac
25074      fi # end check java
25075    fi # end check boot jdk found
25076  fi
25077
25078
25079  if test "x$BOOT_JDK_FOUND" = xno; then
25080    # Now execute the test
25081
25082  if test -x /usr/libexec/java_home; then
25083    BOOT_JDK=`/usr/libexec/java_home -v 1.7`
25084    BOOT_JDK_FOUND=maybe
25085    { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&5
25086$as_echo "$as_me: Found potential Boot JDK using /usr/libexec/java_home -v 1.7" >&6;}
25087  fi
25088
25089
25090    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25091    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25092      # Do we have a bin/java?
25093      if test ! -x "$BOOT_JDK/bin/java"; then
25094        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25095$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25096        BOOT_JDK_FOUND=no
25097      else
25098        # Do we have a bin/javac?
25099        if test ! -x "$BOOT_JDK/bin/javac"; then
25100          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25101$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25102          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25103$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25104          BOOT_JDK_FOUND=no
25105        else
25106          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25107          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25108
25109          # Extra M4 quote needed to protect [] in grep expression.
25110          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25111          if test "x$FOUND_CORRECT_VERSION" = x; then
25112            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25113$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25114            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25115$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25116            BOOT_JDK_FOUND=no
25117          else
25118            # We're done! :-)
25119            BOOT_JDK_FOUND=yes
25120
25121  # Only process if variable expands to non-empty
25122
25123  if test "x$BOOT_JDK" != x; then
25124    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25125
25126  # Input might be given as Windows format, start by converting to
25127  # unix format.
25128  path="$BOOT_JDK"
25129  new_path=`$CYGPATH -u "$path"`
25130
25131  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25132  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25133  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25134  # "foo.exe" is OK but "foo" is an error.
25135  #
25136  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25137  # It is also a way to make sure we got the proper file name for the real test later on.
25138  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25139  if test "x$test_shortpath" = x; then
25140    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25141$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25142    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25143  fi
25144
25145  # Call helper function which possibly converts this using DOS-style short mode.
25146  # If so, the updated path is stored in $new_path.
25147
25148  input_path="$new_path"
25149  # Check if we need to convert this using DOS-style short mode. If the path
25150  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25151  # take no chances and rewrite it.
25152  # Note: m4 eats our [], so we need to use [ and ] instead.
25153  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25154  if test "x$has_forbidden_chars" != x; then
25155    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25156    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25157    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25158    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25159      # Going to short mode and back again did indeed matter. Since short mode is
25160      # case insensitive, let's make it lowercase to improve readability.
25161      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25162      # Now convert it back to Unix-style (cygpath)
25163      input_path=`$CYGPATH -u "$shortmode_path"`
25164      new_path="$input_path"
25165    fi
25166  fi
25167
25168  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25169  if test "x$test_cygdrive_prefix" = x; then
25170    # As a simple fix, exclude /usr/bin since it's not a real path.
25171    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25172      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25173      # a path prefixed by /cygdrive for fixpath to work.
25174      new_path="$CYGWIN_ROOT_PATH$input_path"
25175    fi
25176  fi
25177
25178
25179  if test "x$path" != "x$new_path"; then
25180    BOOT_JDK="$new_path"
25181    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25182$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25183  fi
25184
25185    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25186
25187  path="$BOOT_JDK"
25188  has_colon=`$ECHO $path | $GREP ^.:`
25189  new_path="$path"
25190  if test "x$has_colon" = x; then
25191    # Not in mixed or Windows style, start by that.
25192    new_path=`cmd //c echo $path`
25193  fi
25194
25195
25196  input_path="$new_path"
25197  # Check if we need to convert this using DOS-style short mode. If the path
25198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25199  # take no chances and rewrite it.
25200  # Note: m4 eats our [], so we need to use [ and ] instead.
25201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25202  if test "x$has_forbidden_chars" != x; then
25203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25204    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25205  fi
25206
25207
25208  windows_path="$new_path"
25209  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25210    unix_path=`$CYGPATH -u "$windows_path"`
25211    new_path="$unix_path"
25212  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25213    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25214    new_path="$unix_path"
25215  fi
25216
25217  if test "x$path" != "x$new_path"; then
25218    BOOT_JDK="$new_path"
25219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25220$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25221  fi
25222
25223  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25224  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25225
25226    else
25227      # We're on a unix platform. Hooray! :)
25228      path="$BOOT_JDK"
25229      has_space=`$ECHO "$path" | $GREP " "`
25230      if test "x$has_space" != x; then
25231        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25232$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25233        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25234      fi
25235
25236      # Use eval to expand a potential ~
25237      eval path="$path"
25238      if test ! -f "$path" && test ! -d "$path"; then
25239        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25240      fi
25241
25242      if test -d "$path"; then
25243        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25244      else
25245        dir="`$DIRNAME "$path"`"
25246        base="`$BASENAME "$path"`"
25247        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25248      fi
25249    fi
25250  fi
25251
25252            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25253$as_echo_n "checking for Boot JDK... " >&6; }
25254            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25255$as_echo "$BOOT_JDK" >&6; }
25256            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25257$as_echo_n "checking Boot JDK version... " >&6; }
25258            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25259            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25260$as_echo "$BOOT_JDK_VERSION" >&6; }
25261          fi # end check jdk version
25262        fi # end check javac
25263      fi # end check java
25264    fi # end check boot jdk found
25265  fi
25266
25267  fi
25268
25269
25270    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25271    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25272      # Do we have a bin/java?
25273      if test ! -x "$BOOT_JDK/bin/java"; then
25274        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25275$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25276        BOOT_JDK_FOUND=no
25277      else
25278        # Do we have a bin/javac?
25279        if test ! -x "$BOOT_JDK/bin/javac"; then
25280          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25281$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25282          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25283$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25284          BOOT_JDK_FOUND=no
25285        else
25286          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25287          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25288
25289          # Extra M4 quote needed to protect [] in grep expression.
25290          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25291          if test "x$FOUND_CORRECT_VERSION" = x; then
25292            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25293$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25294            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25295$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25296            BOOT_JDK_FOUND=no
25297          else
25298            # We're done! :-)
25299            BOOT_JDK_FOUND=yes
25300
25301  # Only process if variable expands to non-empty
25302
25303  if test "x$BOOT_JDK" != x; then
25304    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25305
25306  # Input might be given as Windows format, start by converting to
25307  # unix format.
25308  path="$BOOT_JDK"
25309  new_path=`$CYGPATH -u "$path"`
25310
25311  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25312  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25313  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25314  # "foo.exe" is OK but "foo" is an error.
25315  #
25316  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25317  # It is also a way to make sure we got the proper file name for the real test later on.
25318  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25319  if test "x$test_shortpath" = x; then
25320    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25321$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25322    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25323  fi
25324
25325  # Call helper function which possibly converts this using DOS-style short mode.
25326  # If so, the updated path is stored in $new_path.
25327
25328  input_path="$new_path"
25329  # Check if we need to convert this using DOS-style short mode. If the path
25330  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25331  # take no chances and rewrite it.
25332  # Note: m4 eats our [], so we need to use [ and ] instead.
25333  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25334  if test "x$has_forbidden_chars" != x; then
25335    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25336    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25337    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25338    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25339      # Going to short mode and back again did indeed matter. Since short mode is
25340      # case insensitive, let's make it lowercase to improve readability.
25341      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25342      # Now convert it back to Unix-style (cygpath)
25343      input_path=`$CYGPATH -u "$shortmode_path"`
25344      new_path="$input_path"
25345    fi
25346  fi
25347
25348  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25349  if test "x$test_cygdrive_prefix" = x; then
25350    # As a simple fix, exclude /usr/bin since it's not a real path.
25351    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25352      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25353      # a path prefixed by /cygdrive for fixpath to work.
25354      new_path="$CYGWIN_ROOT_PATH$input_path"
25355    fi
25356  fi
25357
25358
25359  if test "x$path" != "x$new_path"; then
25360    BOOT_JDK="$new_path"
25361    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25362$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25363  fi
25364
25365    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25366
25367  path="$BOOT_JDK"
25368  has_colon=`$ECHO $path | $GREP ^.:`
25369  new_path="$path"
25370  if test "x$has_colon" = x; then
25371    # Not in mixed or Windows style, start by that.
25372    new_path=`cmd //c echo $path`
25373  fi
25374
25375
25376  input_path="$new_path"
25377  # Check if we need to convert this using DOS-style short mode. If the path
25378  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25379  # take no chances and rewrite it.
25380  # Note: m4 eats our [], so we need to use [ and ] instead.
25381  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25382  if test "x$has_forbidden_chars" != x; then
25383    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25384    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25385  fi
25386
25387
25388  windows_path="$new_path"
25389  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25390    unix_path=`$CYGPATH -u "$windows_path"`
25391    new_path="$unix_path"
25392  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25393    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25394    new_path="$unix_path"
25395  fi
25396
25397  if test "x$path" != "x$new_path"; then
25398    BOOT_JDK="$new_path"
25399    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25400$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25401  fi
25402
25403  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25404  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25405
25406    else
25407      # We're on a unix platform. Hooray! :)
25408      path="$BOOT_JDK"
25409      has_space=`$ECHO "$path" | $GREP " "`
25410      if test "x$has_space" != x; then
25411        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25412$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25413        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25414      fi
25415
25416      # Use eval to expand a potential ~
25417      eval path="$path"
25418      if test ! -f "$path" && test ! -d "$path"; then
25419        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25420      fi
25421
25422      if test -d "$path"; then
25423        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25424      else
25425        dir="`$DIRNAME "$path"`"
25426        base="`$BASENAME "$path"`"
25427        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25428      fi
25429    fi
25430  fi
25431
25432            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25433$as_echo_n "checking for Boot JDK... " >&6; }
25434            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25435$as_echo "$BOOT_JDK" >&6; }
25436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25437$as_echo_n "checking Boot JDK version... " >&6; }
25438            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25439            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25440$as_echo "$BOOT_JDK_VERSION" >&6; }
25441          fi # end check jdk version
25442        fi # end check javac
25443      fi # end check java
25444    fi # end check boot jdk found
25445  fi
25446
25447
25448  # Test: Is $JAVA_HOME set?
25449
25450  if test "x$BOOT_JDK_FOUND" = xno; then
25451    # Now execute the test
25452
25453  if test "x$JAVA_HOME" != x; then
25454    JAVA_HOME_PROCESSED="$JAVA_HOME"
25455
25456  # Only process if variable expands to non-empty
25457
25458  if test "x$JAVA_HOME_PROCESSED" != x; then
25459    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25460
25461  # Input might be given as Windows format, start by converting to
25462  # unix format.
25463  path="$JAVA_HOME_PROCESSED"
25464  new_path=`$CYGPATH -u "$path"`
25465
25466  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25467  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25468  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25469  # "foo.exe" is OK but "foo" is an error.
25470  #
25471  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25472  # It is also a way to make sure we got the proper file name for the real test later on.
25473  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25474  if test "x$test_shortpath" = x; then
25475    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25476$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25477    as_fn_error $? "Cannot locate the the path of JAVA_HOME_PROCESSED" "$LINENO" 5
25478  fi
25479
25480  # Call helper function which possibly converts this using DOS-style short mode.
25481  # If so, the updated path is stored in $new_path.
25482
25483  input_path="$new_path"
25484  # Check if we need to convert this using DOS-style short mode. If the path
25485  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25486  # take no chances and rewrite it.
25487  # Note: m4 eats our [], so we need to use [ and ] instead.
25488  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25489  if test "x$has_forbidden_chars" != x; then
25490    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25491    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25492    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25493    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25494      # Going to short mode and back again did indeed matter. Since short mode is
25495      # case insensitive, let's make it lowercase to improve readability.
25496      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25497      # Now convert it back to Unix-style (cygpath)
25498      input_path=`$CYGPATH -u "$shortmode_path"`
25499      new_path="$input_path"
25500    fi
25501  fi
25502
25503  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25504  if test "x$test_cygdrive_prefix" = x; then
25505    # As a simple fix, exclude /usr/bin since it's not a real path.
25506    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25507      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25508      # a path prefixed by /cygdrive for fixpath to work.
25509      new_path="$CYGWIN_ROOT_PATH$input_path"
25510    fi
25511  fi
25512
25513
25514  if test "x$path" != "x$new_path"; then
25515    JAVA_HOME_PROCESSED="$new_path"
25516    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25517$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25518  fi
25519
25520    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25521
25522  path="$JAVA_HOME_PROCESSED"
25523  has_colon=`$ECHO $path | $GREP ^.:`
25524  new_path="$path"
25525  if test "x$has_colon" = x; then
25526    # Not in mixed or Windows style, start by that.
25527    new_path=`cmd //c echo $path`
25528  fi
25529
25530
25531  input_path="$new_path"
25532  # Check if we need to convert this using DOS-style short mode. If the path
25533  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25534  # take no chances and rewrite it.
25535  # Note: m4 eats our [], so we need to use [ and ] instead.
25536  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25537  if test "x$has_forbidden_chars" != x; then
25538    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25539    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25540  fi
25541
25542
25543  windows_path="$new_path"
25544  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25545    unix_path=`$CYGPATH -u "$windows_path"`
25546    new_path="$unix_path"
25547  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25548    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25549    new_path="$unix_path"
25550  fi
25551
25552  if test "x$path" != "x$new_path"; then
25553    JAVA_HOME_PROCESSED="$new_path"
25554    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&5
25555$as_echo "$as_me: Rewriting JAVA_HOME_PROCESSED to \"$new_path\"" >&6;}
25556  fi
25557
25558  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25559  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25560
25561    else
25562      # We're on a unix platform. Hooray! :)
25563      path="$JAVA_HOME_PROCESSED"
25564      has_space=`$ECHO "$path" | $GREP " "`
25565      if test "x$has_space" != x; then
25566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&5
25567$as_echo "$as_me: The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is invalid." >&6;}
25568        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25569      fi
25570
25571      # Use eval to expand a potential ~
25572      eval path="$path"
25573      if test ! -f "$path" && test ! -d "$path"; then
25574        as_fn_error $? "The path of JAVA_HOME_PROCESSED, which resolves as \"$path\", is not found." "$LINENO" 5
25575      fi
25576
25577      if test -d "$path"; then
25578        JAVA_HOME_PROCESSED="`cd "$path"; $THEPWDCMD -L`"
25579      else
25580        dir="`$DIRNAME "$path"`"
25581        base="`$BASENAME "$path"`"
25582        JAVA_HOME_PROCESSED="`cd "$dir"; $THEPWDCMD -L`/$base"
25583      fi
25584    fi
25585  fi
25586
25587    if test ! -d "$JAVA_HOME_PROCESSED"; then
25588      { $as_echo "$as_me:${as_lineno-$LINENO}: Your JAVA_HOME points to a non-existing directory!" >&5
25589$as_echo "$as_me: Your JAVA_HOME points to a non-existing directory!" >&6;}
25590    else
25591      # Aha, the user has set a JAVA_HOME
25592      # let us use that as the Boot JDK.
25593      BOOT_JDK="$JAVA_HOME_PROCESSED"
25594      BOOT_JDK_FOUND=maybe
25595      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using JAVA_HOME" >&5
25596$as_echo "$as_me: Found potential Boot JDK using JAVA_HOME" >&6;}
25597    fi
25598  fi
25599
25600
25601    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25602    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25603      # Do we have a bin/java?
25604      if test ! -x "$BOOT_JDK/bin/java"; then
25605        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25606$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25607        BOOT_JDK_FOUND=no
25608      else
25609        # Do we have a bin/javac?
25610        if test ! -x "$BOOT_JDK/bin/javac"; then
25611          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25612$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25613          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25614$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25615          BOOT_JDK_FOUND=no
25616        else
25617          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25618          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25619
25620          # Extra M4 quote needed to protect [] in grep expression.
25621          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25622          if test "x$FOUND_CORRECT_VERSION" = x; then
25623            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25624$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25625            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25626$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25627            BOOT_JDK_FOUND=no
25628          else
25629            # We're done! :-)
25630            BOOT_JDK_FOUND=yes
25631
25632  # Only process if variable expands to non-empty
25633
25634  if test "x$BOOT_JDK" != x; then
25635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25636
25637  # Input might be given as Windows format, start by converting to
25638  # unix format.
25639  path="$BOOT_JDK"
25640  new_path=`$CYGPATH -u "$path"`
25641
25642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25645  # "foo.exe" is OK but "foo" is an error.
25646  #
25647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25648  # It is also a way to make sure we got the proper file name for the real test later on.
25649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25650  if test "x$test_shortpath" = x; then
25651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25652$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25653    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25654  fi
25655
25656  # Call helper function which possibly converts this using DOS-style short mode.
25657  # If so, the updated path is stored in $new_path.
25658
25659  input_path="$new_path"
25660  # Check if we need to convert this using DOS-style short mode. If the path
25661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25662  # take no chances and rewrite it.
25663  # Note: m4 eats our [], so we need to use [ and ] instead.
25664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25665  if test "x$has_forbidden_chars" != x; then
25666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
25669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
25670      # Going to short mode and back again did indeed matter. Since short mode is
25671      # case insensitive, let's make it lowercase to improve readability.
25672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25673      # Now convert it back to Unix-style (cygpath)
25674      input_path=`$CYGPATH -u "$shortmode_path"`
25675      new_path="$input_path"
25676    fi
25677  fi
25678
25679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
25680  if test "x$test_cygdrive_prefix" = x; then
25681    # As a simple fix, exclude /usr/bin since it's not a real path.
25682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
25683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
25684      # a path prefixed by /cygdrive for fixpath to work.
25685      new_path="$CYGWIN_ROOT_PATH$input_path"
25686    fi
25687  fi
25688
25689
25690  if test "x$path" != "x$new_path"; then
25691    BOOT_JDK="$new_path"
25692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25693$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25694  fi
25695
25696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25697
25698  path="$BOOT_JDK"
25699  has_colon=`$ECHO $path | $GREP ^.:`
25700  new_path="$path"
25701  if test "x$has_colon" = x; then
25702    # Not in mixed or Windows style, start by that.
25703    new_path=`cmd //c echo $path`
25704  fi
25705
25706
25707  input_path="$new_path"
25708  # Check if we need to convert this using DOS-style short mode. If the path
25709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25710  # take no chances and rewrite it.
25711  # Note: m4 eats our [], so we need to use [ and ] instead.
25712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
25713  if test "x$has_forbidden_chars" != x; then
25714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
25716  fi
25717
25718
25719  windows_path="$new_path"
25720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25721    unix_path=`$CYGPATH -u "$windows_path"`
25722    new_path="$unix_path"
25723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
25724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
25725    new_path="$unix_path"
25726  fi
25727
25728  if test "x$path" != "x$new_path"; then
25729    BOOT_JDK="$new_path"
25730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
25731$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
25732  fi
25733
25734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
25735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
25736
25737    else
25738      # We're on a unix platform. Hooray! :)
25739      path="$BOOT_JDK"
25740      has_space=`$ECHO "$path" | $GREP " "`
25741      if test "x$has_space" != x; then
25742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25743$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
25745      fi
25746
25747      # Use eval to expand a potential ~
25748      eval path="$path"
25749      if test ! -f "$path" && test ! -d "$path"; then
25750        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
25751      fi
25752
25753      if test -d "$path"; then
25754        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
25755      else
25756        dir="`$DIRNAME "$path"`"
25757        base="`$BASENAME "$path"`"
25758        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
25759      fi
25760    fi
25761  fi
25762
25763            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
25764$as_echo_n "checking for Boot JDK... " >&6; }
25765            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
25766$as_echo "$BOOT_JDK" >&6; }
25767            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
25768$as_echo_n "checking Boot JDK version... " >&6; }
25769            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
25770            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
25771$as_echo "$BOOT_JDK_VERSION" >&6; }
25772          fi # end check jdk version
25773        fi # end check javac
25774      fi # end check java
25775    fi # end check boot jdk found
25776  fi
25777
25778
25779  # Test: Is there a java or javac in the PATH, which is a symlink to the JDK?
25780
25781  if test "x$BOOT_JDK_FOUND" = xno; then
25782    # Now execute the test
25783
25784  # Extract the first word of "javac", so it can be a program name with args.
25785set dummy javac; ac_word=$2
25786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25787$as_echo_n "checking for $ac_word... " >&6; }
25788if ${ac_cv_path_JAVAC_CHECK+:} false; then :
25789  $as_echo_n "(cached) " >&6
25790else
25791  case $JAVAC_CHECK in
25792  [\\/]* | ?:[\\/]*)
25793  ac_cv_path_JAVAC_CHECK="$JAVAC_CHECK" # Let the user override the test with a path.
25794  ;;
25795  *)
25796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25797for as_dir in $PATH
25798do
25799  IFS=$as_save_IFS
25800  test -z "$as_dir" && as_dir=.
25801    for ac_exec_ext in '' $ac_executable_extensions; do
25802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25803    ac_cv_path_JAVAC_CHECK="$as_dir/$ac_word$ac_exec_ext"
25804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25805    break 2
25806  fi
25807done
25808  done
25809IFS=$as_save_IFS
25810
25811  ;;
25812esac
25813fi
25814JAVAC_CHECK=$ac_cv_path_JAVAC_CHECK
25815if test -n "$JAVAC_CHECK"; then
25816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC_CHECK" >&5
25817$as_echo "$JAVAC_CHECK" >&6; }
25818else
25819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25820$as_echo "no" >&6; }
25821fi
25822
25823
25824  # Extract the first word of "java", so it can be a program name with args.
25825set dummy java; ac_word=$2
25826{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
25827$as_echo_n "checking for $ac_word... " >&6; }
25828if ${ac_cv_path_JAVA_CHECK+:} false; then :
25829  $as_echo_n "(cached) " >&6
25830else
25831  case $JAVA_CHECK in
25832  [\\/]* | ?:[\\/]*)
25833  ac_cv_path_JAVA_CHECK="$JAVA_CHECK" # Let the user override the test with a path.
25834  ;;
25835  *)
25836  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
25837for as_dir in $PATH
25838do
25839  IFS=$as_save_IFS
25840  test -z "$as_dir" && as_dir=.
25841    for ac_exec_ext in '' $ac_executable_extensions; do
25842  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
25843    ac_cv_path_JAVA_CHECK="$as_dir/$ac_word$ac_exec_ext"
25844    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
25845    break 2
25846  fi
25847done
25848  done
25849IFS=$as_save_IFS
25850
25851  ;;
25852esac
25853fi
25854JAVA_CHECK=$ac_cv_path_JAVA_CHECK
25855if test -n "$JAVA_CHECK"; then
25856  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA_CHECK" >&5
25857$as_echo "$JAVA_CHECK" >&6; }
25858else
25859  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
25860$as_echo "no" >&6; }
25861fi
25862
25863
25864  BINARY="$JAVAC_CHECK"
25865  if test "x$JAVAC_CHECK" = x; then
25866    BINARY="$JAVA_CHECK"
25867  fi
25868  if test "x$BINARY" != x; then
25869    # So there is a java(c) binary, it might be part of a JDK.
25870    # Lets find the JDK/JRE directory by following symbolic links.
25871    # Linux/GNU systems often have links from /usr/bin/java to
25872    # /etc/alternatives/java to the real JDK binary.
25873
25874  if test "x$OPENJDK_BUILD_OS" != xwindows; then
25875    # Follow a chain of symbolic links. Use readlink
25876    # where it exists, else fall back to horribly
25877    # complicated shell code.
25878    if test "x$READLINK_TESTED" != yes; then
25879      # On MacOSX there is a readlink tool with a different
25880      # purpose than the GNU readlink tool. Check the found readlink.
25881      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
25882      if test "x$ISGNU" = x; then
25883        # A readlink that we do not know how to use.
25884        # Are there other non-GNU readlinks out there?
25885        READLINK_TESTED=yes
25886        READLINK=
25887      fi
25888    fi
25889
25890    if test "x$READLINK" != x; then
25891      BINARY=`$READLINK -f $BINARY`
25892    else
25893      # Save the current directory for restoring afterwards
25894      STARTDIR=$PWD
25895      COUNTER=0
25896      sym_link_dir=`$DIRNAME $BINARY`
25897      sym_link_file=`$BASENAME $BINARY`
25898      cd $sym_link_dir
25899      # Use -P flag to resolve symlinks in directories.
25900      cd `$THEPWDCMD -P`
25901      sym_link_dir=`$THEPWDCMD -P`
25902      # Resolve file symlinks
25903      while test $COUNTER -lt 20; do
25904        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
25905        if test "x$ISLINK" == x; then
25906          # This is not a symbolic link! We are done!
25907          break
25908        fi
25909        # Again resolve directory symlinks since the target of the just found
25910        # link could be in a different directory
25911        cd `$DIRNAME $ISLINK`
25912        sym_link_dir=`$THEPWDCMD -P`
25913        sym_link_file=`$BASENAME $ISLINK`
25914        let COUNTER=COUNTER+1
25915      done
25916      cd $STARTDIR
25917      BINARY=$sym_link_dir/$sym_link_file
25918    fi
25919  fi
25920
25921    BOOT_JDK=`dirname "$BINARY"`
25922    BOOT_JDK=`cd "$BOOT_JDK/.."; pwd`
25923    if test -x "$BOOT_JDK/bin/javac" && test -x "$BOOT_JDK/bin/java"; then
25924      # Looks like we found ourselves an JDK
25925      BOOT_JDK_FOUND=maybe
25926      { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using java(c) in PATH" >&5
25927$as_echo "$as_me: Found potential Boot JDK using java(c) in PATH" >&6;}
25928    fi
25929  fi
25930
25931
25932    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
25933    if test "x$BOOT_JDK_FOUND" = xmaybe; then
25934      # Do we have a bin/java?
25935      if test ! -x "$BOOT_JDK/bin/java"; then
25936        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
25937$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
25938        BOOT_JDK_FOUND=no
25939      else
25940        # Do we have a bin/javac?
25941        if test ! -x "$BOOT_JDK/bin/javac"; then
25942          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
25943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
25944          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
25945$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
25946          BOOT_JDK_FOUND=no
25947        else
25948          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
25949          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
25950
25951          # Extra M4 quote needed to protect [] in grep expression.
25952          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
25953          if test "x$FOUND_CORRECT_VERSION" = x; then
25954            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
25955$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
25956            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
25957$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
25958            BOOT_JDK_FOUND=no
25959          else
25960            # We're done! :-)
25961            BOOT_JDK_FOUND=yes
25962
25963  # Only process if variable expands to non-empty
25964
25965  if test "x$BOOT_JDK" != x; then
25966    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
25967
25968  # Input might be given as Windows format, start by converting to
25969  # unix format.
25970  path="$BOOT_JDK"
25971  new_path=`$CYGPATH -u "$path"`
25972
25973  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
25974  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
25975  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
25976  # "foo.exe" is OK but "foo" is an error.
25977  #
25978  # This test is therefore slightly more accurate than "test -f" to check for file precense.
25979  # It is also a way to make sure we got the proper file name for the real test later on.
25980  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
25981  if test "x$test_shortpath" = x; then
25982    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
25983$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
25984    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
25985  fi
25986
25987  # Call helper function which possibly converts this using DOS-style short mode.
25988  # If so, the updated path is stored in $new_path.
25989
25990  input_path="$new_path"
25991  # Check if we need to convert this using DOS-style short mode. If the path
25992  # contains just simple characters, use it. Otherwise (spaces, weird characters),
25993  # take no chances and rewrite it.
25994  # Note: m4 eats our [], so we need to use [ and ] instead.
25995  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
25996  if test "x$has_forbidden_chars" != x; then
25997    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
25998    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
25999    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26000    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26001      # Going to short mode and back again did indeed matter. Since short mode is
26002      # case insensitive, let's make it lowercase to improve readability.
26003      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26004      # Now convert it back to Unix-style (cygpath)
26005      input_path=`$CYGPATH -u "$shortmode_path"`
26006      new_path="$input_path"
26007    fi
26008  fi
26009
26010  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26011  if test "x$test_cygdrive_prefix" = x; then
26012    # As a simple fix, exclude /usr/bin since it's not a real path.
26013    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26014      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26015      # a path prefixed by /cygdrive for fixpath to work.
26016      new_path="$CYGWIN_ROOT_PATH$input_path"
26017    fi
26018  fi
26019
26020
26021  if test "x$path" != "x$new_path"; then
26022    BOOT_JDK="$new_path"
26023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26025  fi
26026
26027    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26028
26029  path="$BOOT_JDK"
26030  has_colon=`$ECHO $path | $GREP ^.:`
26031  new_path="$path"
26032  if test "x$has_colon" = x; then
26033    # Not in mixed or Windows style, start by that.
26034    new_path=`cmd //c echo $path`
26035  fi
26036
26037
26038  input_path="$new_path"
26039  # Check if we need to convert this using DOS-style short mode. If the path
26040  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26041  # take no chances and rewrite it.
26042  # Note: m4 eats our [], so we need to use [ and ] instead.
26043  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26044  if test "x$has_forbidden_chars" != x; then
26045    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26046    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26047  fi
26048
26049
26050  windows_path="$new_path"
26051  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26052    unix_path=`$CYGPATH -u "$windows_path"`
26053    new_path="$unix_path"
26054  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26055    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26056    new_path="$unix_path"
26057  fi
26058
26059  if test "x$path" != "x$new_path"; then
26060    BOOT_JDK="$new_path"
26061    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26062$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26063  fi
26064
26065  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26066  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26067
26068    else
26069      # We're on a unix platform. Hooray! :)
26070      path="$BOOT_JDK"
26071      has_space=`$ECHO "$path" | $GREP " "`
26072      if test "x$has_space" != x; then
26073        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26074$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26075        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26076      fi
26077
26078      # Use eval to expand a potential ~
26079      eval path="$path"
26080      if test ! -f "$path" && test ! -d "$path"; then
26081        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26082      fi
26083
26084      if test -d "$path"; then
26085        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26086      else
26087        dir="`$DIRNAME "$path"`"
26088        base="`$BASENAME "$path"`"
26089        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26090      fi
26091    fi
26092  fi
26093
26094            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26095$as_echo_n "checking for Boot JDK... " >&6; }
26096            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26097$as_echo "$BOOT_JDK" >&6; }
26098            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26099$as_echo_n "checking Boot JDK version... " >&6; }
26100            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26101            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26102$as_echo "$BOOT_JDK_VERSION" >&6; }
26103          fi # end check jdk version
26104        fi # end check javac
26105      fi # end check java
26106    fi # end check boot jdk found
26107  fi
26108
26109
26110  # Test: Is there a JDK installed in default, well-known locations?
26111
26112  if test "x$BOOT_JDK_FOUND" = xno; then
26113    # Now execute the test
26114
26115  if test "x$OPENJDK_TARGET_OS" = xwindows; then
26116
26117  if test "x$BOOT_JDK_FOUND" = xno; then
26118    # Now execute the test
26119
26120  if test "x$ProgramW6432" != x; then
26121    VIRTUAL_DIR="$ProgramW6432/Java"
26122
26123  windows_path="$VIRTUAL_DIR"
26124  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26125    unix_path=`$CYGPATH -u "$windows_path"`
26126    VIRTUAL_DIR="$unix_path"
26127  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26128    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26129    VIRTUAL_DIR="$unix_path"
26130  fi
26131
26132
26133  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26134  BOOT_JDK_SUFFIX=""
26135  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26136  if test "x$ALL_JDKS_FOUND" != x; then
26137    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26138
26139  if test "x$BOOT_JDK_FOUND" = xno; then
26140    # Now execute the test
26141
26142        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26143        if test -d "$BOOT_JDK"; then
26144          BOOT_JDK_FOUND=maybe
26145          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26146$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26147        fi
26148
26149
26150    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26151    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26152      # Do we have a bin/java?
26153      if test ! -x "$BOOT_JDK/bin/java"; then
26154        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26155$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26156        BOOT_JDK_FOUND=no
26157      else
26158        # Do we have a bin/javac?
26159        if test ! -x "$BOOT_JDK/bin/javac"; then
26160          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26161$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26162          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26163$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26164          BOOT_JDK_FOUND=no
26165        else
26166          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26167          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26168
26169          # Extra M4 quote needed to protect [] in grep expression.
26170          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26171          if test "x$FOUND_CORRECT_VERSION" = x; then
26172            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26173$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26174            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26175$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26176            BOOT_JDK_FOUND=no
26177          else
26178            # We're done! :-)
26179            BOOT_JDK_FOUND=yes
26180
26181  # Only process if variable expands to non-empty
26182
26183  if test "x$BOOT_JDK" != x; then
26184    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26185
26186  # Input might be given as Windows format, start by converting to
26187  # unix format.
26188  path="$BOOT_JDK"
26189  new_path=`$CYGPATH -u "$path"`
26190
26191  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26192  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26193  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26194  # "foo.exe" is OK but "foo" is an error.
26195  #
26196  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26197  # It is also a way to make sure we got the proper file name for the real test later on.
26198  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26199  if test "x$test_shortpath" = x; then
26200    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26201$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26202    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26203  fi
26204
26205  # Call helper function which possibly converts this using DOS-style short mode.
26206  # If so, the updated path is stored in $new_path.
26207
26208  input_path="$new_path"
26209  # Check if we need to convert this using DOS-style short mode. If the path
26210  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26211  # take no chances and rewrite it.
26212  # Note: m4 eats our [], so we need to use [ and ] instead.
26213  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26214  if test "x$has_forbidden_chars" != x; then
26215    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26216    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26217    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26218    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26219      # Going to short mode and back again did indeed matter. Since short mode is
26220      # case insensitive, let's make it lowercase to improve readability.
26221      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26222      # Now convert it back to Unix-style (cygpath)
26223      input_path=`$CYGPATH -u "$shortmode_path"`
26224      new_path="$input_path"
26225    fi
26226  fi
26227
26228  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26229  if test "x$test_cygdrive_prefix" = x; then
26230    # As a simple fix, exclude /usr/bin since it's not a real path.
26231    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26232      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26233      # a path prefixed by /cygdrive for fixpath to work.
26234      new_path="$CYGWIN_ROOT_PATH$input_path"
26235    fi
26236  fi
26237
26238
26239  if test "x$path" != "x$new_path"; then
26240    BOOT_JDK="$new_path"
26241    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26242$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26243  fi
26244
26245    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26246
26247  path="$BOOT_JDK"
26248  has_colon=`$ECHO $path | $GREP ^.:`
26249  new_path="$path"
26250  if test "x$has_colon" = x; then
26251    # Not in mixed or Windows style, start by that.
26252    new_path=`cmd //c echo $path`
26253  fi
26254
26255
26256  input_path="$new_path"
26257  # Check if we need to convert this using DOS-style short mode. If the path
26258  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26259  # take no chances and rewrite it.
26260  # Note: m4 eats our [], so we need to use [ and ] instead.
26261  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26262  if test "x$has_forbidden_chars" != x; then
26263    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26264    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26265  fi
26266
26267
26268  windows_path="$new_path"
26269  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26270    unix_path=`$CYGPATH -u "$windows_path"`
26271    new_path="$unix_path"
26272  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26273    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26274    new_path="$unix_path"
26275  fi
26276
26277  if test "x$path" != "x$new_path"; then
26278    BOOT_JDK="$new_path"
26279    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26280$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26281  fi
26282
26283  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26284  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26285
26286    else
26287      # We're on a unix platform. Hooray! :)
26288      path="$BOOT_JDK"
26289      has_space=`$ECHO "$path" | $GREP " "`
26290      if test "x$has_space" != x; then
26291        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26292$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26293        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26294      fi
26295
26296      # Use eval to expand a potential ~
26297      eval path="$path"
26298      if test ! -f "$path" && test ! -d "$path"; then
26299        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26300      fi
26301
26302      if test -d "$path"; then
26303        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26304      else
26305        dir="`$DIRNAME "$path"`"
26306        base="`$BASENAME "$path"`"
26307        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26308      fi
26309    fi
26310  fi
26311
26312            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26313$as_echo_n "checking for Boot JDK... " >&6; }
26314            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26315$as_echo "$BOOT_JDK" >&6; }
26316            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26317$as_echo_n "checking Boot JDK version... " >&6; }
26318            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26319            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26320$as_echo "$BOOT_JDK_VERSION" >&6; }
26321          fi # end check jdk version
26322        fi # end check javac
26323      fi # end check java
26324    fi # end check boot jdk found
26325  fi
26326
26327    done
26328  fi
26329
26330  fi
26331
26332
26333    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26334    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26335      # Do we have a bin/java?
26336      if test ! -x "$BOOT_JDK/bin/java"; then
26337        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26338$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26339        BOOT_JDK_FOUND=no
26340      else
26341        # Do we have a bin/javac?
26342        if test ! -x "$BOOT_JDK/bin/javac"; then
26343          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26344$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26345          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26346$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26347          BOOT_JDK_FOUND=no
26348        else
26349          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26350          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26351
26352          # Extra M4 quote needed to protect [] in grep expression.
26353          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26354          if test "x$FOUND_CORRECT_VERSION" = x; then
26355            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26356$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26357            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26358$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26359            BOOT_JDK_FOUND=no
26360          else
26361            # We're done! :-)
26362            BOOT_JDK_FOUND=yes
26363
26364  # Only process if variable expands to non-empty
26365
26366  if test "x$BOOT_JDK" != x; then
26367    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26368
26369  # Input might be given as Windows format, start by converting to
26370  # unix format.
26371  path="$BOOT_JDK"
26372  new_path=`$CYGPATH -u "$path"`
26373
26374  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26375  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26376  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26377  # "foo.exe" is OK but "foo" is an error.
26378  #
26379  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26380  # It is also a way to make sure we got the proper file name for the real test later on.
26381  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26382  if test "x$test_shortpath" = x; then
26383    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26384$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26385    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26386  fi
26387
26388  # Call helper function which possibly converts this using DOS-style short mode.
26389  # If so, the updated path is stored in $new_path.
26390
26391  input_path="$new_path"
26392  # Check if we need to convert this using DOS-style short mode. If the path
26393  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26394  # take no chances and rewrite it.
26395  # Note: m4 eats our [], so we need to use [ and ] instead.
26396  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26397  if test "x$has_forbidden_chars" != x; then
26398    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26399    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26400    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26401    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26402      # Going to short mode and back again did indeed matter. Since short mode is
26403      # case insensitive, let's make it lowercase to improve readability.
26404      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26405      # Now convert it back to Unix-style (cygpath)
26406      input_path=`$CYGPATH -u "$shortmode_path"`
26407      new_path="$input_path"
26408    fi
26409  fi
26410
26411  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26412  if test "x$test_cygdrive_prefix" = x; then
26413    # As a simple fix, exclude /usr/bin since it's not a real path.
26414    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26415      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26416      # a path prefixed by /cygdrive for fixpath to work.
26417      new_path="$CYGWIN_ROOT_PATH$input_path"
26418    fi
26419  fi
26420
26421
26422  if test "x$path" != "x$new_path"; then
26423    BOOT_JDK="$new_path"
26424    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26425$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26426  fi
26427
26428    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26429
26430  path="$BOOT_JDK"
26431  has_colon=`$ECHO $path | $GREP ^.:`
26432  new_path="$path"
26433  if test "x$has_colon" = x; then
26434    # Not in mixed or Windows style, start by that.
26435    new_path=`cmd //c echo $path`
26436  fi
26437
26438
26439  input_path="$new_path"
26440  # Check if we need to convert this using DOS-style short mode. If the path
26441  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26442  # take no chances and rewrite it.
26443  # Note: m4 eats our [], so we need to use [ and ] instead.
26444  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26445  if test "x$has_forbidden_chars" != x; then
26446    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26447    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26448  fi
26449
26450
26451  windows_path="$new_path"
26452  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26453    unix_path=`$CYGPATH -u "$windows_path"`
26454    new_path="$unix_path"
26455  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26456    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26457    new_path="$unix_path"
26458  fi
26459
26460  if test "x$path" != "x$new_path"; then
26461    BOOT_JDK="$new_path"
26462    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26463$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26464  fi
26465
26466  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26467  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26468
26469    else
26470      # We're on a unix platform. Hooray! :)
26471      path="$BOOT_JDK"
26472      has_space=`$ECHO "$path" | $GREP " "`
26473      if test "x$has_space" != x; then
26474        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26475$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26476        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26477      fi
26478
26479      # Use eval to expand a potential ~
26480      eval path="$path"
26481      if test ! -f "$path" && test ! -d "$path"; then
26482        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26483      fi
26484
26485      if test -d "$path"; then
26486        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26487      else
26488        dir="`$DIRNAME "$path"`"
26489        base="`$BASENAME "$path"`"
26490        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26491      fi
26492    fi
26493  fi
26494
26495            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26496$as_echo_n "checking for Boot JDK... " >&6; }
26497            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26498$as_echo "$BOOT_JDK" >&6; }
26499            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26500$as_echo_n "checking Boot JDK version... " >&6; }
26501            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26502            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26503$as_echo "$BOOT_JDK_VERSION" >&6; }
26504          fi # end check jdk version
26505        fi # end check javac
26506      fi # end check java
26507    fi # end check boot jdk found
26508  fi
26509
26510
26511  if test "x$BOOT_JDK_FOUND" = xno; then
26512    # Now execute the test
26513
26514  if test "x$PROGRAMW6432" != x; then
26515    VIRTUAL_DIR="$PROGRAMW6432/Java"
26516
26517  windows_path="$VIRTUAL_DIR"
26518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26519    unix_path=`$CYGPATH -u "$windows_path"`
26520    VIRTUAL_DIR="$unix_path"
26521  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26522    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26523    VIRTUAL_DIR="$unix_path"
26524  fi
26525
26526
26527  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26528  BOOT_JDK_SUFFIX=""
26529  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26530  if test "x$ALL_JDKS_FOUND" != x; then
26531    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26532
26533  if test "x$BOOT_JDK_FOUND" = xno; then
26534    # Now execute the test
26535
26536        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26537        if test -d "$BOOT_JDK"; then
26538          BOOT_JDK_FOUND=maybe
26539          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26540$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26541        fi
26542
26543
26544    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26545    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26546      # Do we have a bin/java?
26547      if test ! -x "$BOOT_JDK/bin/java"; then
26548        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26549$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26550        BOOT_JDK_FOUND=no
26551      else
26552        # Do we have a bin/javac?
26553        if test ! -x "$BOOT_JDK/bin/javac"; then
26554          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26555$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26556          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26557$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26558          BOOT_JDK_FOUND=no
26559        else
26560          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26561          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26562
26563          # Extra M4 quote needed to protect [] in grep expression.
26564          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26565          if test "x$FOUND_CORRECT_VERSION" = x; then
26566            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26567$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26568            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26569$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26570            BOOT_JDK_FOUND=no
26571          else
26572            # We're done! :-)
26573            BOOT_JDK_FOUND=yes
26574
26575  # Only process if variable expands to non-empty
26576
26577  if test "x$BOOT_JDK" != x; then
26578    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26579
26580  # Input might be given as Windows format, start by converting to
26581  # unix format.
26582  path="$BOOT_JDK"
26583  new_path=`$CYGPATH -u "$path"`
26584
26585  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26586  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26587  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26588  # "foo.exe" is OK but "foo" is an error.
26589  #
26590  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26591  # It is also a way to make sure we got the proper file name for the real test later on.
26592  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26593  if test "x$test_shortpath" = x; then
26594    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26595$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26596    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26597  fi
26598
26599  # Call helper function which possibly converts this using DOS-style short mode.
26600  # If so, the updated path is stored in $new_path.
26601
26602  input_path="$new_path"
26603  # Check if we need to convert this using DOS-style short mode. If the path
26604  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26605  # take no chances and rewrite it.
26606  # Note: m4 eats our [], so we need to use [ and ] instead.
26607  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26608  if test "x$has_forbidden_chars" != x; then
26609    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26610    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26611    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26612    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26613      # Going to short mode and back again did indeed matter. Since short mode is
26614      # case insensitive, let's make it lowercase to improve readability.
26615      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26616      # Now convert it back to Unix-style (cygpath)
26617      input_path=`$CYGPATH -u "$shortmode_path"`
26618      new_path="$input_path"
26619    fi
26620  fi
26621
26622  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26623  if test "x$test_cygdrive_prefix" = x; then
26624    # As a simple fix, exclude /usr/bin since it's not a real path.
26625    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26626      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26627      # a path prefixed by /cygdrive for fixpath to work.
26628      new_path="$CYGWIN_ROOT_PATH$input_path"
26629    fi
26630  fi
26631
26632
26633  if test "x$path" != "x$new_path"; then
26634    BOOT_JDK="$new_path"
26635    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26636$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26637  fi
26638
26639    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26640
26641  path="$BOOT_JDK"
26642  has_colon=`$ECHO $path | $GREP ^.:`
26643  new_path="$path"
26644  if test "x$has_colon" = x; then
26645    # Not in mixed or Windows style, start by that.
26646    new_path=`cmd //c echo $path`
26647  fi
26648
26649
26650  input_path="$new_path"
26651  # Check if we need to convert this using DOS-style short mode. If the path
26652  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26653  # take no chances and rewrite it.
26654  # Note: m4 eats our [], so we need to use [ and ] instead.
26655  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26656  if test "x$has_forbidden_chars" != x; then
26657    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26658    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26659  fi
26660
26661
26662  windows_path="$new_path"
26663  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26664    unix_path=`$CYGPATH -u "$windows_path"`
26665    new_path="$unix_path"
26666  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26667    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26668    new_path="$unix_path"
26669  fi
26670
26671  if test "x$path" != "x$new_path"; then
26672    BOOT_JDK="$new_path"
26673    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26674$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26675  fi
26676
26677  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26678  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26679
26680    else
26681      # We're on a unix platform. Hooray! :)
26682      path="$BOOT_JDK"
26683      has_space=`$ECHO "$path" | $GREP " "`
26684      if test "x$has_space" != x; then
26685        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26686$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26687        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26688      fi
26689
26690      # Use eval to expand a potential ~
26691      eval path="$path"
26692      if test ! -f "$path" && test ! -d "$path"; then
26693        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26694      fi
26695
26696      if test -d "$path"; then
26697        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26698      else
26699        dir="`$DIRNAME "$path"`"
26700        base="`$BASENAME "$path"`"
26701        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26702      fi
26703    fi
26704  fi
26705
26706            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26707$as_echo_n "checking for Boot JDK... " >&6; }
26708            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26709$as_echo "$BOOT_JDK" >&6; }
26710            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26711$as_echo_n "checking Boot JDK version... " >&6; }
26712            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26713            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26714$as_echo "$BOOT_JDK_VERSION" >&6; }
26715          fi # end check jdk version
26716        fi # end check javac
26717      fi # end check java
26718    fi # end check boot jdk found
26719  fi
26720
26721    done
26722  fi
26723
26724  fi
26725
26726
26727    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26728    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26729      # Do we have a bin/java?
26730      if test ! -x "$BOOT_JDK/bin/java"; then
26731        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26732$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26733        BOOT_JDK_FOUND=no
26734      else
26735        # Do we have a bin/javac?
26736        if test ! -x "$BOOT_JDK/bin/javac"; then
26737          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26738$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26739          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26740$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26741          BOOT_JDK_FOUND=no
26742        else
26743          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26744          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26745
26746          # Extra M4 quote needed to protect [] in grep expression.
26747          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26748          if test "x$FOUND_CORRECT_VERSION" = x; then
26749            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26750$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26751            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26752$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26753            BOOT_JDK_FOUND=no
26754          else
26755            # We're done! :-)
26756            BOOT_JDK_FOUND=yes
26757
26758  # Only process if variable expands to non-empty
26759
26760  if test "x$BOOT_JDK" != x; then
26761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26762
26763  # Input might be given as Windows format, start by converting to
26764  # unix format.
26765  path="$BOOT_JDK"
26766  new_path=`$CYGPATH -u "$path"`
26767
26768  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26769  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26770  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26771  # "foo.exe" is OK but "foo" is an error.
26772  #
26773  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26774  # It is also a way to make sure we got the proper file name for the real test later on.
26775  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26776  if test "x$test_shortpath" = x; then
26777    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26778$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26779    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26780  fi
26781
26782  # Call helper function which possibly converts this using DOS-style short mode.
26783  # If so, the updated path is stored in $new_path.
26784
26785  input_path="$new_path"
26786  # Check if we need to convert this using DOS-style short mode. If the path
26787  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26788  # take no chances and rewrite it.
26789  # Note: m4 eats our [], so we need to use [ and ] instead.
26790  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
26791  if test "x$has_forbidden_chars" != x; then
26792    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26793    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
26794    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
26795    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
26796      # Going to short mode and back again did indeed matter. Since short mode is
26797      # case insensitive, let's make it lowercase to improve readability.
26798      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26799      # Now convert it back to Unix-style (cygpath)
26800      input_path=`$CYGPATH -u "$shortmode_path"`
26801      new_path="$input_path"
26802    fi
26803  fi
26804
26805  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
26806  if test "x$test_cygdrive_prefix" = x; then
26807    # As a simple fix, exclude /usr/bin since it's not a real path.
26808    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
26809      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
26810      # a path prefixed by /cygdrive for fixpath to work.
26811      new_path="$CYGWIN_ROOT_PATH$input_path"
26812    fi
26813  fi
26814
26815
26816  if test "x$path" != "x$new_path"; then
26817    BOOT_JDK="$new_path"
26818    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26819$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26820  fi
26821
26822    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26823
26824  path="$BOOT_JDK"
26825  has_colon=`$ECHO $path | $GREP ^.:`
26826  new_path="$path"
26827  if test "x$has_colon" = x; then
26828    # Not in mixed or Windows style, start by that.
26829    new_path=`cmd //c echo $path`
26830  fi
26831
26832
26833  input_path="$new_path"
26834  # Check if we need to convert this using DOS-style short mode. If the path
26835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26836  # take no chances and rewrite it.
26837  # Note: m4 eats our [], so we need to use [ and ] instead.
26838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
26839  if test "x$has_forbidden_chars" != x; then
26840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
26841    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
26842  fi
26843
26844
26845  windows_path="$new_path"
26846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26847    unix_path=`$CYGPATH -u "$windows_path"`
26848    new_path="$unix_path"
26849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26851    new_path="$unix_path"
26852  fi
26853
26854  if test "x$path" != "x$new_path"; then
26855    BOOT_JDK="$new_path"
26856    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
26857$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
26858  fi
26859
26860  # Save the first 10 bytes of this path to the storage, so fixpath can work.
26861  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
26862
26863    else
26864      # We're on a unix platform. Hooray! :)
26865      path="$BOOT_JDK"
26866      has_space=`$ECHO "$path" | $GREP " "`
26867      if test "x$has_space" != x; then
26868        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26869$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26870        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
26871      fi
26872
26873      # Use eval to expand a potential ~
26874      eval path="$path"
26875      if test ! -f "$path" && test ! -d "$path"; then
26876        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
26877      fi
26878
26879      if test -d "$path"; then
26880        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
26881      else
26882        dir="`$DIRNAME "$path"`"
26883        base="`$BASENAME "$path"`"
26884        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
26885      fi
26886    fi
26887  fi
26888
26889            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
26890$as_echo_n "checking for Boot JDK... " >&6; }
26891            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
26892$as_echo "$BOOT_JDK" >&6; }
26893            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
26894$as_echo_n "checking Boot JDK version... " >&6; }
26895            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
26896            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
26897$as_echo "$BOOT_JDK_VERSION" >&6; }
26898          fi # end check jdk version
26899        fi # end check javac
26900      fi # end check java
26901    fi # end check boot jdk found
26902  fi
26903
26904
26905  if test "x$BOOT_JDK_FOUND" = xno; then
26906    # Now execute the test
26907
26908  if test "x$PROGRAMFILES" != x; then
26909    VIRTUAL_DIR="$PROGRAMFILES/Java"
26910
26911  windows_path="$VIRTUAL_DIR"
26912  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26913    unix_path=`$CYGPATH -u "$windows_path"`
26914    VIRTUAL_DIR="$unix_path"
26915  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
26916    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
26917    VIRTUAL_DIR="$unix_path"
26918  fi
26919
26920
26921  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
26922  BOOT_JDK_SUFFIX=""
26923  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
26924  if test "x$ALL_JDKS_FOUND" != x; then
26925    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
26926
26927  if test "x$BOOT_JDK_FOUND" = xno; then
26928    # Now execute the test
26929
26930        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
26931        if test -d "$BOOT_JDK"; then
26932          BOOT_JDK_FOUND=maybe
26933          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
26934$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
26935        fi
26936
26937
26938    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
26939    if test "x$BOOT_JDK_FOUND" = xmaybe; then
26940      # Do we have a bin/java?
26941      if test ! -x "$BOOT_JDK/bin/java"; then
26942        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
26943$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
26944        BOOT_JDK_FOUND=no
26945      else
26946        # Do we have a bin/javac?
26947        if test ! -x "$BOOT_JDK/bin/javac"; then
26948          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
26949$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
26950          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
26951$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
26952          BOOT_JDK_FOUND=no
26953        else
26954          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
26955          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
26956
26957          # Extra M4 quote needed to protect [] in grep expression.
26958          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
26959          if test "x$FOUND_CORRECT_VERSION" = x; then
26960            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
26961$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
26962            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
26963$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
26964            BOOT_JDK_FOUND=no
26965          else
26966            # We're done! :-)
26967            BOOT_JDK_FOUND=yes
26968
26969  # Only process if variable expands to non-empty
26970
26971  if test "x$BOOT_JDK" != x; then
26972    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
26973
26974  # Input might be given as Windows format, start by converting to
26975  # unix format.
26976  path="$BOOT_JDK"
26977  new_path=`$CYGPATH -u "$path"`
26978
26979  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
26980  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
26981  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
26982  # "foo.exe" is OK but "foo" is an error.
26983  #
26984  # This test is therefore slightly more accurate than "test -f" to check for file precense.
26985  # It is also a way to make sure we got the proper file name for the real test later on.
26986  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
26987  if test "x$test_shortpath" = x; then
26988    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
26989$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
26990    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
26991  fi
26992
26993  # Call helper function which possibly converts this using DOS-style short mode.
26994  # If so, the updated path is stored in $new_path.
26995
26996  input_path="$new_path"
26997  # Check if we need to convert this using DOS-style short mode. If the path
26998  # contains just simple characters, use it. Otherwise (spaces, weird characters),
26999  # take no chances and rewrite it.
27000  # Note: m4 eats our [], so we need to use [ and ] instead.
27001  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27002  if test "x$has_forbidden_chars" != x; then
27003    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27004    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27005    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27006    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27007      # Going to short mode and back again did indeed matter. Since short mode is
27008      # case insensitive, let's make it lowercase to improve readability.
27009      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27010      # Now convert it back to Unix-style (cygpath)
27011      input_path=`$CYGPATH -u "$shortmode_path"`
27012      new_path="$input_path"
27013    fi
27014  fi
27015
27016  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27017  if test "x$test_cygdrive_prefix" = x; then
27018    # As a simple fix, exclude /usr/bin since it's not a real path.
27019    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27020      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27021      # a path prefixed by /cygdrive for fixpath to work.
27022      new_path="$CYGWIN_ROOT_PATH$input_path"
27023    fi
27024  fi
27025
27026
27027  if test "x$path" != "x$new_path"; then
27028    BOOT_JDK="$new_path"
27029    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27030$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27031  fi
27032
27033    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27034
27035  path="$BOOT_JDK"
27036  has_colon=`$ECHO $path | $GREP ^.:`
27037  new_path="$path"
27038  if test "x$has_colon" = x; then
27039    # Not in mixed or Windows style, start by that.
27040    new_path=`cmd //c echo $path`
27041  fi
27042
27043
27044  input_path="$new_path"
27045  # Check if we need to convert this using DOS-style short mode. If the path
27046  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27047  # take no chances and rewrite it.
27048  # Note: m4 eats our [], so we need to use [ and ] instead.
27049  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27050  if test "x$has_forbidden_chars" != x; then
27051    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27052    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27053  fi
27054
27055
27056  windows_path="$new_path"
27057  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27058    unix_path=`$CYGPATH -u "$windows_path"`
27059    new_path="$unix_path"
27060  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27061    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27062    new_path="$unix_path"
27063  fi
27064
27065  if test "x$path" != "x$new_path"; then
27066    BOOT_JDK="$new_path"
27067    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27068$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27069  fi
27070
27071  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27072  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27073
27074    else
27075      # We're on a unix platform. Hooray! :)
27076      path="$BOOT_JDK"
27077      has_space=`$ECHO "$path" | $GREP " "`
27078      if test "x$has_space" != x; then
27079        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27080$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27081        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27082      fi
27083
27084      # Use eval to expand a potential ~
27085      eval path="$path"
27086      if test ! -f "$path" && test ! -d "$path"; then
27087        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27088      fi
27089
27090      if test -d "$path"; then
27091        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27092      else
27093        dir="`$DIRNAME "$path"`"
27094        base="`$BASENAME "$path"`"
27095        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27096      fi
27097    fi
27098  fi
27099
27100            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27101$as_echo_n "checking for Boot JDK... " >&6; }
27102            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27103$as_echo "$BOOT_JDK" >&6; }
27104            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27105$as_echo_n "checking Boot JDK version... " >&6; }
27106            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27107            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27108$as_echo "$BOOT_JDK_VERSION" >&6; }
27109          fi # end check jdk version
27110        fi # end check javac
27111      fi # end check java
27112    fi # end check boot jdk found
27113  fi
27114
27115    done
27116  fi
27117
27118  fi
27119
27120
27121    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27122    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27123      # Do we have a bin/java?
27124      if test ! -x "$BOOT_JDK/bin/java"; then
27125        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27126$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27127        BOOT_JDK_FOUND=no
27128      else
27129        # Do we have a bin/javac?
27130        if test ! -x "$BOOT_JDK/bin/javac"; then
27131          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27132$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27133          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27134$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27135          BOOT_JDK_FOUND=no
27136        else
27137          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27138          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27139
27140          # Extra M4 quote needed to protect [] in grep expression.
27141          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27142          if test "x$FOUND_CORRECT_VERSION" = x; then
27143            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27144$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27145            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27146$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27147            BOOT_JDK_FOUND=no
27148          else
27149            # We're done! :-)
27150            BOOT_JDK_FOUND=yes
27151
27152  # Only process if variable expands to non-empty
27153
27154  if test "x$BOOT_JDK" != x; then
27155    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27156
27157  # Input might be given as Windows format, start by converting to
27158  # unix format.
27159  path="$BOOT_JDK"
27160  new_path=`$CYGPATH -u "$path"`
27161
27162  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27163  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27164  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27165  # "foo.exe" is OK but "foo" is an error.
27166  #
27167  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27168  # It is also a way to make sure we got the proper file name for the real test later on.
27169  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27170  if test "x$test_shortpath" = x; then
27171    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27172$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27173    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27174  fi
27175
27176  # Call helper function which possibly converts this using DOS-style short mode.
27177  # If so, the updated path is stored in $new_path.
27178
27179  input_path="$new_path"
27180  # Check if we need to convert this using DOS-style short mode. If the path
27181  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27182  # take no chances and rewrite it.
27183  # Note: m4 eats our [], so we need to use [ and ] instead.
27184  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27185  if test "x$has_forbidden_chars" != x; then
27186    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27187    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27188    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27189    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27190      # Going to short mode and back again did indeed matter. Since short mode is
27191      # case insensitive, let's make it lowercase to improve readability.
27192      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27193      # Now convert it back to Unix-style (cygpath)
27194      input_path=`$CYGPATH -u "$shortmode_path"`
27195      new_path="$input_path"
27196    fi
27197  fi
27198
27199  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27200  if test "x$test_cygdrive_prefix" = x; then
27201    # As a simple fix, exclude /usr/bin since it's not a real path.
27202    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27203      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27204      # a path prefixed by /cygdrive for fixpath to work.
27205      new_path="$CYGWIN_ROOT_PATH$input_path"
27206    fi
27207  fi
27208
27209
27210  if test "x$path" != "x$new_path"; then
27211    BOOT_JDK="$new_path"
27212    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27213$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27214  fi
27215
27216    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27217
27218  path="$BOOT_JDK"
27219  has_colon=`$ECHO $path | $GREP ^.:`
27220  new_path="$path"
27221  if test "x$has_colon" = x; then
27222    # Not in mixed or Windows style, start by that.
27223    new_path=`cmd //c echo $path`
27224  fi
27225
27226
27227  input_path="$new_path"
27228  # Check if we need to convert this using DOS-style short mode. If the path
27229  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27230  # take no chances and rewrite it.
27231  # Note: m4 eats our [], so we need to use [ and ] instead.
27232  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27233  if test "x$has_forbidden_chars" != x; then
27234    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27235    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27236  fi
27237
27238
27239  windows_path="$new_path"
27240  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27241    unix_path=`$CYGPATH -u "$windows_path"`
27242    new_path="$unix_path"
27243  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27244    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27245    new_path="$unix_path"
27246  fi
27247
27248  if test "x$path" != "x$new_path"; then
27249    BOOT_JDK="$new_path"
27250    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27251$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27252  fi
27253
27254  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27255  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27256
27257    else
27258      # We're on a unix platform. Hooray! :)
27259      path="$BOOT_JDK"
27260      has_space=`$ECHO "$path" | $GREP " "`
27261      if test "x$has_space" != x; then
27262        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27263$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27264        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27265      fi
27266
27267      # Use eval to expand a potential ~
27268      eval path="$path"
27269      if test ! -f "$path" && test ! -d "$path"; then
27270        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27271      fi
27272
27273      if test -d "$path"; then
27274        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27275      else
27276        dir="`$DIRNAME "$path"`"
27277        base="`$BASENAME "$path"`"
27278        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27279      fi
27280    fi
27281  fi
27282
27283            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27284$as_echo_n "checking for Boot JDK... " >&6; }
27285            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27286$as_echo "$BOOT_JDK" >&6; }
27287            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27288$as_echo_n "checking Boot JDK version... " >&6; }
27289            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27290            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27291$as_echo "$BOOT_JDK_VERSION" >&6; }
27292          fi # end check jdk version
27293        fi # end check javac
27294      fi # end check java
27295    fi # end check boot jdk found
27296  fi
27297
27298
27299  if test "x$BOOT_JDK_FOUND" = xno; then
27300    # Now execute the test
27301
27302  if test "x$ProgramFiles" != x; then
27303    VIRTUAL_DIR="$ProgramFiles/Java"
27304
27305  windows_path="$VIRTUAL_DIR"
27306  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27307    unix_path=`$CYGPATH -u "$windows_path"`
27308    VIRTUAL_DIR="$unix_path"
27309  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27310    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27311    VIRTUAL_DIR="$unix_path"
27312  fi
27313
27314
27315  BOOT_JDK_PREFIX="$VIRTUAL_DIR"
27316  BOOT_JDK_SUFFIX=""
27317  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27318  if test "x$ALL_JDKS_FOUND" != x; then
27319    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27320
27321  if test "x$BOOT_JDK_FOUND" = xno; then
27322    # Now execute the test
27323
27324        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27325        if test -d "$BOOT_JDK"; then
27326          BOOT_JDK_FOUND=maybe
27327          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27328$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27329        fi
27330
27331
27332    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27333    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27334      # Do we have a bin/java?
27335      if test ! -x "$BOOT_JDK/bin/java"; then
27336        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27337$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27338        BOOT_JDK_FOUND=no
27339      else
27340        # Do we have a bin/javac?
27341        if test ! -x "$BOOT_JDK/bin/javac"; then
27342          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27343$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27344          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27345$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27346          BOOT_JDK_FOUND=no
27347        else
27348          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27349          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27350
27351          # Extra M4 quote needed to protect [] in grep expression.
27352          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27353          if test "x$FOUND_CORRECT_VERSION" = x; then
27354            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27355$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27356            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27357$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27358            BOOT_JDK_FOUND=no
27359          else
27360            # We're done! :-)
27361            BOOT_JDK_FOUND=yes
27362
27363  # Only process if variable expands to non-empty
27364
27365  if test "x$BOOT_JDK" != x; then
27366    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27367
27368  # Input might be given as Windows format, start by converting to
27369  # unix format.
27370  path="$BOOT_JDK"
27371  new_path=`$CYGPATH -u "$path"`
27372
27373  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27374  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27375  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27376  # "foo.exe" is OK but "foo" is an error.
27377  #
27378  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27379  # It is also a way to make sure we got the proper file name for the real test later on.
27380  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27381  if test "x$test_shortpath" = x; then
27382    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27383$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27384    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27385  fi
27386
27387  # Call helper function which possibly converts this using DOS-style short mode.
27388  # If so, the updated path is stored in $new_path.
27389
27390  input_path="$new_path"
27391  # Check if we need to convert this using DOS-style short mode. If the path
27392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27393  # take no chances and rewrite it.
27394  # Note: m4 eats our [], so we need to use [ and ] instead.
27395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27396  if test "x$has_forbidden_chars" != x; then
27397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27401      # Going to short mode and back again did indeed matter. Since short mode is
27402      # case insensitive, let's make it lowercase to improve readability.
27403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27404      # Now convert it back to Unix-style (cygpath)
27405      input_path=`$CYGPATH -u "$shortmode_path"`
27406      new_path="$input_path"
27407    fi
27408  fi
27409
27410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27411  if test "x$test_cygdrive_prefix" = x; then
27412    # As a simple fix, exclude /usr/bin since it's not a real path.
27413    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27415      # a path prefixed by /cygdrive for fixpath to work.
27416      new_path="$CYGWIN_ROOT_PATH$input_path"
27417    fi
27418  fi
27419
27420
27421  if test "x$path" != "x$new_path"; then
27422    BOOT_JDK="$new_path"
27423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27424$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27425  fi
27426
27427    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27428
27429  path="$BOOT_JDK"
27430  has_colon=`$ECHO $path | $GREP ^.:`
27431  new_path="$path"
27432  if test "x$has_colon" = x; then
27433    # Not in mixed or Windows style, start by that.
27434    new_path=`cmd //c echo $path`
27435  fi
27436
27437
27438  input_path="$new_path"
27439  # Check if we need to convert this using DOS-style short mode. If the path
27440  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27441  # take no chances and rewrite it.
27442  # Note: m4 eats our [], so we need to use [ and ] instead.
27443  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27444  if test "x$has_forbidden_chars" != x; then
27445    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27446    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27447  fi
27448
27449
27450  windows_path="$new_path"
27451  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27452    unix_path=`$CYGPATH -u "$windows_path"`
27453    new_path="$unix_path"
27454  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27455    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27456    new_path="$unix_path"
27457  fi
27458
27459  if test "x$path" != "x$new_path"; then
27460    BOOT_JDK="$new_path"
27461    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27462$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27463  fi
27464
27465  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27466  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27467
27468    else
27469      # We're on a unix platform. Hooray! :)
27470      path="$BOOT_JDK"
27471      has_space=`$ECHO "$path" | $GREP " "`
27472      if test "x$has_space" != x; then
27473        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27474$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27475        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27476      fi
27477
27478      # Use eval to expand a potential ~
27479      eval path="$path"
27480      if test ! -f "$path" && test ! -d "$path"; then
27481        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27482      fi
27483
27484      if test -d "$path"; then
27485        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27486      else
27487        dir="`$DIRNAME "$path"`"
27488        base="`$BASENAME "$path"`"
27489        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27490      fi
27491    fi
27492  fi
27493
27494            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27495$as_echo_n "checking for Boot JDK... " >&6; }
27496            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27497$as_echo "$BOOT_JDK" >&6; }
27498            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27499$as_echo_n "checking Boot JDK version... " >&6; }
27500            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27501            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27502$as_echo "$BOOT_JDK_VERSION" >&6; }
27503          fi # end check jdk version
27504        fi # end check javac
27505      fi # end check java
27506    fi # end check boot jdk found
27507  fi
27508
27509    done
27510  fi
27511
27512  fi
27513
27514
27515    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27516    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27517      # Do we have a bin/java?
27518      if test ! -x "$BOOT_JDK/bin/java"; then
27519        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27520$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27521        BOOT_JDK_FOUND=no
27522      else
27523        # Do we have a bin/javac?
27524        if test ! -x "$BOOT_JDK/bin/javac"; then
27525          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27526$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27527          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27528$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27529          BOOT_JDK_FOUND=no
27530        else
27531          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27532          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27533
27534          # Extra M4 quote needed to protect [] in grep expression.
27535          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27536          if test "x$FOUND_CORRECT_VERSION" = x; then
27537            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27538$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27539            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27540$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27541            BOOT_JDK_FOUND=no
27542          else
27543            # We're done! :-)
27544            BOOT_JDK_FOUND=yes
27545
27546  # Only process if variable expands to non-empty
27547
27548  if test "x$BOOT_JDK" != x; then
27549    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27550
27551  # Input might be given as Windows format, start by converting to
27552  # unix format.
27553  path="$BOOT_JDK"
27554  new_path=`$CYGPATH -u "$path"`
27555
27556  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27557  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27558  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27559  # "foo.exe" is OK but "foo" is an error.
27560  #
27561  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27562  # It is also a way to make sure we got the proper file name for the real test later on.
27563  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27564  if test "x$test_shortpath" = x; then
27565    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27566$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27567    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27568  fi
27569
27570  # Call helper function which possibly converts this using DOS-style short mode.
27571  # If so, the updated path is stored in $new_path.
27572
27573  input_path="$new_path"
27574  # Check if we need to convert this using DOS-style short mode. If the path
27575  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27576  # take no chances and rewrite it.
27577  # Note: m4 eats our [], so we need to use [ and ] instead.
27578  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27579  if test "x$has_forbidden_chars" != x; then
27580    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27581    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27582    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27583    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27584      # Going to short mode and back again did indeed matter. Since short mode is
27585      # case insensitive, let's make it lowercase to improve readability.
27586      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27587      # Now convert it back to Unix-style (cygpath)
27588      input_path=`$CYGPATH -u "$shortmode_path"`
27589      new_path="$input_path"
27590    fi
27591  fi
27592
27593  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27594  if test "x$test_cygdrive_prefix" = x; then
27595    # As a simple fix, exclude /usr/bin since it's not a real path.
27596    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27597      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27598      # a path prefixed by /cygdrive for fixpath to work.
27599      new_path="$CYGWIN_ROOT_PATH$input_path"
27600    fi
27601  fi
27602
27603
27604  if test "x$path" != "x$new_path"; then
27605    BOOT_JDK="$new_path"
27606    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27607$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27608  fi
27609
27610    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27611
27612  path="$BOOT_JDK"
27613  has_colon=`$ECHO $path | $GREP ^.:`
27614  new_path="$path"
27615  if test "x$has_colon" = x; then
27616    # Not in mixed or Windows style, start by that.
27617    new_path=`cmd //c echo $path`
27618  fi
27619
27620
27621  input_path="$new_path"
27622  # Check if we need to convert this using DOS-style short mode. If the path
27623  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27624  # take no chances and rewrite it.
27625  # Note: m4 eats our [], so we need to use [ and ] instead.
27626  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27627  if test "x$has_forbidden_chars" != x; then
27628    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27629    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27630  fi
27631
27632
27633  windows_path="$new_path"
27634  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27635    unix_path=`$CYGPATH -u "$windows_path"`
27636    new_path="$unix_path"
27637  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27638    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27639    new_path="$unix_path"
27640  fi
27641
27642  if test "x$path" != "x$new_path"; then
27643    BOOT_JDK="$new_path"
27644    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27645$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27646  fi
27647
27648  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27649  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27650
27651    else
27652      # We're on a unix platform. Hooray! :)
27653      path="$BOOT_JDK"
27654      has_space=`$ECHO "$path" | $GREP " "`
27655      if test "x$has_space" != x; then
27656        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27657$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27658        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27659      fi
27660
27661      # Use eval to expand a potential ~
27662      eval path="$path"
27663      if test ! -f "$path" && test ! -d "$path"; then
27664        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27665      fi
27666
27667      if test -d "$path"; then
27668        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27669      else
27670        dir="`$DIRNAME "$path"`"
27671        base="`$BASENAME "$path"`"
27672        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27673      fi
27674    fi
27675  fi
27676
27677            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27678$as_echo_n "checking for Boot JDK... " >&6; }
27679            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27680$as_echo "$BOOT_JDK" >&6; }
27681            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27682$as_echo_n "checking Boot JDK version... " >&6; }
27683            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27684            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27685$as_echo "$BOOT_JDK_VERSION" >&6; }
27686          fi # end check jdk version
27687        fi # end check javac
27688      fi # end check java
27689    fi # end check boot jdk found
27690  fi
27691
27692
27693  if test "x$BOOT_JDK_FOUND" = xno; then
27694    # Now execute the test
27695
27696  BOOT_JDK_PREFIX="/cygdrive/c/Program Files/Java"
27697  BOOT_JDK_SUFFIX=""
27698  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
27699  if test "x$ALL_JDKS_FOUND" != x; then
27700    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
27701
27702  if test "x$BOOT_JDK_FOUND" = xno; then
27703    # Now execute the test
27704
27705        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
27706        if test -d "$BOOT_JDK"; then
27707          BOOT_JDK_FOUND=maybe
27708          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
27709$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
27710        fi
27711
27712
27713    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27714    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27715      # Do we have a bin/java?
27716      if test ! -x "$BOOT_JDK/bin/java"; then
27717        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27718$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27719        BOOT_JDK_FOUND=no
27720      else
27721        # Do we have a bin/javac?
27722        if test ! -x "$BOOT_JDK/bin/javac"; then
27723          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27724$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27725          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27726$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27727          BOOT_JDK_FOUND=no
27728        else
27729          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27730          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27731
27732          # Extra M4 quote needed to protect [] in grep expression.
27733          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27734          if test "x$FOUND_CORRECT_VERSION" = x; then
27735            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27736$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27737            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27738$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27739            BOOT_JDK_FOUND=no
27740          else
27741            # We're done! :-)
27742            BOOT_JDK_FOUND=yes
27743
27744  # Only process if variable expands to non-empty
27745
27746  if test "x$BOOT_JDK" != x; then
27747    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27748
27749  # Input might be given as Windows format, start by converting to
27750  # unix format.
27751  path="$BOOT_JDK"
27752  new_path=`$CYGPATH -u "$path"`
27753
27754  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27755  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27756  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27757  # "foo.exe" is OK but "foo" is an error.
27758  #
27759  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27760  # It is also a way to make sure we got the proper file name for the real test later on.
27761  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27762  if test "x$test_shortpath" = x; then
27763    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27764$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27765    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27766  fi
27767
27768  # Call helper function which possibly converts this using DOS-style short mode.
27769  # If so, the updated path is stored in $new_path.
27770
27771  input_path="$new_path"
27772  # Check if we need to convert this using DOS-style short mode. If the path
27773  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27774  # take no chances and rewrite it.
27775  # Note: m4 eats our [], so we need to use [ and ] instead.
27776  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27777  if test "x$has_forbidden_chars" != x; then
27778    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27779    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27780    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27781    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27782      # Going to short mode and back again did indeed matter. Since short mode is
27783      # case insensitive, let's make it lowercase to improve readability.
27784      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27785      # Now convert it back to Unix-style (cygpath)
27786      input_path=`$CYGPATH -u "$shortmode_path"`
27787      new_path="$input_path"
27788    fi
27789  fi
27790
27791  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27792  if test "x$test_cygdrive_prefix" = x; then
27793    # As a simple fix, exclude /usr/bin since it's not a real path.
27794    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27795      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27796      # a path prefixed by /cygdrive for fixpath to work.
27797      new_path="$CYGWIN_ROOT_PATH$input_path"
27798    fi
27799  fi
27800
27801
27802  if test "x$path" != "x$new_path"; then
27803    BOOT_JDK="$new_path"
27804    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27805$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27806  fi
27807
27808    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27809
27810  path="$BOOT_JDK"
27811  has_colon=`$ECHO $path | $GREP ^.:`
27812  new_path="$path"
27813  if test "x$has_colon" = x; then
27814    # Not in mixed or Windows style, start by that.
27815    new_path=`cmd //c echo $path`
27816  fi
27817
27818
27819  input_path="$new_path"
27820  # Check if we need to convert this using DOS-style short mode. If the path
27821  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27822  # take no chances and rewrite it.
27823  # Note: m4 eats our [], so we need to use [ and ] instead.
27824  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
27825  if test "x$has_forbidden_chars" != x; then
27826    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27827    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27828  fi
27829
27830
27831  windows_path="$new_path"
27832  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27833    unix_path=`$CYGPATH -u "$windows_path"`
27834    new_path="$unix_path"
27835  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27836    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
27837    new_path="$unix_path"
27838  fi
27839
27840  if test "x$path" != "x$new_path"; then
27841    BOOT_JDK="$new_path"
27842    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27843$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27844  fi
27845
27846  # Save the first 10 bytes of this path to the storage, so fixpath can work.
27847  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
27848
27849    else
27850      # We're on a unix platform. Hooray! :)
27851      path="$BOOT_JDK"
27852      has_space=`$ECHO "$path" | $GREP " "`
27853      if test "x$has_space" != x; then
27854        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27855$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27856        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
27857      fi
27858
27859      # Use eval to expand a potential ~
27860      eval path="$path"
27861      if test ! -f "$path" && test ! -d "$path"; then
27862        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
27863      fi
27864
27865      if test -d "$path"; then
27866        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
27867      else
27868        dir="`$DIRNAME "$path"`"
27869        base="`$BASENAME "$path"`"
27870        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
27871      fi
27872    fi
27873  fi
27874
27875            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
27876$as_echo_n "checking for Boot JDK... " >&6; }
27877            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
27878$as_echo "$BOOT_JDK" >&6; }
27879            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
27880$as_echo_n "checking Boot JDK version... " >&6; }
27881            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
27882            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
27883$as_echo "$BOOT_JDK_VERSION" >&6; }
27884          fi # end check jdk version
27885        fi # end check javac
27886      fi # end check java
27887    fi # end check boot jdk found
27888  fi
27889
27890    done
27891  fi
27892
27893
27894    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
27895    if test "x$BOOT_JDK_FOUND" = xmaybe; then
27896      # Do we have a bin/java?
27897      if test ! -x "$BOOT_JDK/bin/java"; then
27898        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
27899$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
27900        BOOT_JDK_FOUND=no
27901      else
27902        # Do we have a bin/javac?
27903        if test ! -x "$BOOT_JDK/bin/javac"; then
27904          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
27905$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
27906          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
27907$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
27908          BOOT_JDK_FOUND=no
27909        else
27910          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
27911          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
27912
27913          # Extra M4 quote needed to protect [] in grep expression.
27914          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
27915          if test "x$FOUND_CORRECT_VERSION" = x; then
27916            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
27917$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
27918            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
27919$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
27920            BOOT_JDK_FOUND=no
27921          else
27922            # We're done! :-)
27923            BOOT_JDK_FOUND=yes
27924
27925  # Only process if variable expands to non-empty
27926
27927  if test "x$BOOT_JDK" != x; then
27928    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
27929
27930  # Input might be given as Windows format, start by converting to
27931  # unix format.
27932  path="$BOOT_JDK"
27933  new_path=`$CYGPATH -u "$path"`
27934
27935  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
27936  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
27937  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
27938  # "foo.exe" is OK but "foo" is an error.
27939  #
27940  # This test is therefore slightly more accurate than "test -f" to check for file precense.
27941  # It is also a way to make sure we got the proper file name for the real test later on.
27942  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
27943  if test "x$test_shortpath" = x; then
27944    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
27945$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
27946    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
27947  fi
27948
27949  # Call helper function which possibly converts this using DOS-style short mode.
27950  # If so, the updated path is stored in $new_path.
27951
27952  input_path="$new_path"
27953  # Check if we need to convert this using DOS-style short mode. If the path
27954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
27955  # take no chances and rewrite it.
27956  # Note: m4 eats our [], so we need to use [ and ] instead.
27957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
27958  if test "x$has_forbidden_chars" != x; then
27959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
27960    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
27961    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
27962    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
27963      # Going to short mode and back again did indeed matter. Since short mode is
27964      # case insensitive, let's make it lowercase to improve readability.
27965      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
27966      # Now convert it back to Unix-style (cygpath)
27967      input_path=`$CYGPATH -u "$shortmode_path"`
27968      new_path="$input_path"
27969    fi
27970  fi
27971
27972  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
27973  if test "x$test_cygdrive_prefix" = x; then
27974    # As a simple fix, exclude /usr/bin since it's not a real path.
27975    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
27976      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
27977      # a path prefixed by /cygdrive for fixpath to work.
27978      new_path="$CYGWIN_ROOT_PATH$input_path"
27979    fi
27980  fi
27981
27982
27983  if test "x$path" != "x$new_path"; then
27984    BOOT_JDK="$new_path"
27985    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
27986$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
27987  fi
27988
27989    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
27990
27991  path="$BOOT_JDK"
27992  has_colon=`$ECHO $path | $GREP ^.:`
27993  new_path="$path"
27994  if test "x$has_colon" = x; then
27995    # Not in mixed or Windows style, start by that.
27996    new_path=`cmd //c echo $path`
27997  fi
27998
27999
28000  input_path="$new_path"
28001  # Check if we need to convert this using DOS-style short mode. If the path
28002  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28003  # take no chances and rewrite it.
28004  # Note: m4 eats our [], so we need to use [ and ] instead.
28005  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28006  if test "x$has_forbidden_chars" != x; then
28007    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28008    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28009  fi
28010
28011
28012  windows_path="$new_path"
28013  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28014    unix_path=`$CYGPATH -u "$windows_path"`
28015    new_path="$unix_path"
28016  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28017    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28018    new_path="$unix_path"
28019  fi
28020
28021  if test "x$path" != "x$new_path"; then
28022    BOOT_JDK="$new_path"
28023    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28024$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28025  fi
28026
28027  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28028  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28029
28030    else
28031      # We're on a unix platform. Hooray! :)
28032      path="$BOOT_JDK"
28033      has_space=`$ECHO "$path" | $GREP " "`
28034      if test "x$has_space" != x; then
28035        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28036$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28037        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28038      fi
28039
28040      # Use eval to expand a potential ~
28041      eval path="$path"
28042      if test ! -f "$path" && test ! -d "$path"; then
28043        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28044      fi
28045
28046      if test -d "$path"; then
28047        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28048      else
28049        dir="`$DIRNAME "$path"`"
28050        base="`$BASENAME "$path"`"
28051        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28052      fi
28053    fi
28054  fi
28055
28056            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28057$as_echo_n "checking for Boot JDK... " >&6; }
28058            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28059$as_echo "$BOOT_JDK" >&6; }
28060            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28061$as_echo_n "checking Boot JDK version... " >&6; }
28062            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28063            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28064$as_echo "$BOOT_JDK_VERSION" >&6; }
28065          fi # end check jdk version
28066        fi # end check javac
28067      fi # end check java
28068    fi # end check boot jdk found
28069  fi
28070
28071  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
28072
28073  if test "x$BOOT_JDK_FOUND" = xno; then
28074    # Now execute the test
28075
28076  BOOT_JDK_PREFIX="/Library/Java/JavaVirtualMachines"
28077  BOOT_JDK_SUFFIX="/Contents/Home"
28078  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28079  if test "x$ALL_JDKS_FOUND" != x; then
28080    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28081
28082  if test "x$BOOT_JDK_FOUND" = xno; then
28083    # Now execute the test
28084
28085        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28086        if test -d "$BOOT_JDK"; then
28087          BOOT_JDK_FOUND=maybe
28088          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28089$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28090        fi
28091
28092
28093    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28094    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28095      # Do we have a bin/java?
28096      if test ! -x "$BOOT_JDK/bin/java"; then
28097        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28098$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28099        BOOT_JDK_FOUND=no
28100      else
28101        # Do we have a bin/javac?
28102        if test ! -x "$BOOT_JDK/bin/javac"; then
28103          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28104$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28105          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28106$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28107          BOOT_JDK_FOUND=no
28108        else
28109          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28110          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28111
28112          # Extra M4 quote needed to protect [] in grep expression.
28113          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28114          if test "x$FOUND_CORRECT_VERSION" = x; then
28115            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28116$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28117            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28118$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28119            BOOT_JDK_FOUND=no
28120          else
28121            # We're done! :-)
28122            BOOT_JDK_FOUND=yes
28123
28124  # Only process if variable expands to non-empty
28125
28126  if test "x$BOOT_JDK" != x; then
28127    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28128
28129  # Input might be given as Windows format, start by converting to
28130  # unix format.
28131  path="$BOOT_JDK"
28132  new_path=`$CYGPATH -u "$path"`
28133
28134  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28135  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28136  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28137  # "foo.exe" is OK but "foo" is an error.
28138  #
28139  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28140  # It is also a way to make sure we got the proper file name for the real test later on.
28141  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28142  if test "x$test_shortpath" = x; then
28143    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28144$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28145    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28146  fi
28147
28148  # Call helper function which possibly converts this using DOS-style short mode.
28149  # If so, the updated path is stored in $new_path.
28150
28151  input_path="$new_path"
28152  # Check if we need to convert this using DOS-style short mode. If the path
28153  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28154  # take no chances and rewrite it.
28155  # Note: m4 eats our [], so we need to use [ and ] instead.
28156  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28157  if test "x$has_forbidden_chars" != x; then
28158    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28159    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28160    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28161    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28162      # Going to short mode and back again did indeed matter. Since short mode is
28163      # case insensitive, let's make it lowercase to improve readability.
28164      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28165      # Now convert it back to Unix-style (cygpath)
28166      input_path=`$CYGPATH -u "$shortmode_path"`
28167      new_path="$input_path"
28168    fi
28169  fi
28170
28171  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28172  if test "x$test_cygdrive_prefix" = x; then
28173    # As a simple fix, exclude /usr/bin since it's not a real path.
28174    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28175      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28176      # a path prefixed by /cygdrive for fixpath to work.
28177      new_path="$CYGWIN_ROOT_PATH$input_path"
28178    fi
28179  fi
28180
28181
28182  if test "x$path" != "x$new_path"; then
28183    BOOT_JDK="$new_path"
28184    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28185$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28186  fi
28187
28188    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28189
28190  path="$BOOT_JDK"
28191  has_colon=`$ECHO $path | $GREP ^.:`
28192  new_path="$path"
28193  if test "x$has_colon" = x; then
28194    # Not in mixed or Windows style, start by that.
28195    new_path=`cmd //c echo $path`
28196  fi
28197
28198
28199  input_path="$new_path"
28200  # Check if we need to convert this using DOS-style short mode. If the path
28201  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28202  # take no chances and rewrite it.
28203  # Note: m4 eats our [], so we need to use [ and ] instead.
28204  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28205  if test "x$has_forbidden_chars" != x; then
28206    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28207    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28208  fi
28209
28210
28211  windows_path="$new_path"
28212  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28213    unix_path=`$CYGPATH -u "$windows_path"`
28214    new_path="$unix_path"
28215  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28216    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28217    new_path="$unix_path"
28218  fi
28219
28220  if test "x$path" != "x$new_path"; then
28221    BOOT_JDK="$new_path"
28222    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28223$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28224  fi
28225
28226  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28227  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28228
28229    else
28230      # We're on a unix platform. Hooray! :)
28231      path="$BOOT_JDK"
28232      has_space=`$ECHO "$path" | $GREP " "`
28233      if test "x$has_space" != x; then
28234        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28235$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28236        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28237      fi
28238
28239      # Use eval to expand a potential ~
28240      eval path="$path"
28241      if test ! -f "$path" && test ! -d "$path"; then
28242        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28243      fi
28244
28245      if test -d "$path"; then
28246        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28247      else
28248        dir="`$DIRNAME "$path"`"
28249        base="`$BASENAME "$path"`"
28250        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28251      fi
28252    fi
28253  fi
28254
28255            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28256$as_echo_n "checking for Boot JDK... " >&6; }
28257            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28258$as_echo "$BOOT_JDK" >&6; }
28259            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28260$as_echo_n "checking Boot JDK version... " >&6; }
28261            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28262            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28263$as_echo "$BOOT_JDK_VERSION" >&6; }
28264          fi # end check jdk version
28265        fi # end check javac
28266      fi # end check java
28267    fi # end check boot jdk found
28268  fi
28269
28270    done
28271  fi
28272
28273
28274    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28275    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28276      # Do we have a bin/java?
28277      if test ! -x "$BOOT_JDK/bin/java"; then
28278        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28279$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28280        BOOT_JDK_FOUND=no
28281      else
28282        # Do we have a bin/javac?
28283        if test ! -x "$BOOT_JDK/bin/javac"; then
28284          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28285$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28286          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28287$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28288          BOOT_JDK_FOUND=no
28289        else
28290          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28291          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28292
28293          # Extra M4 quote needed to protect [] in grep expression.
28294          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28295          if test "x$FOUND_CORRECT_VERSION" = x; then
28296            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28297$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28298            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28299$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28300            BOOT_JDK_FOUND=no
28301          else
28302            # We're done! :-)
28303            BOOT_JDK_FOUND=yes
28304
28305  # Only process if variable expands to non-empty
28306
28307  if test "x$BOOT_JDK" != x; then
28308    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28309
28310  # Input might be given as Windows format, start by converting to
28311  # unix format.
28312  path="$BOOT_JDK"
28313  new_path=`$CYGPATH -u "$path"`
28314
28315  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28316  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28317  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28318  # "foo.exe" is OK but "foo" is an error.
28319  #
28320  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28321  # It is also a way to make sure we got the proper file name for the real test later on.
28322  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28323  if test "x$test_shortpath" = x; then
28324    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28325$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28326    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28327  fi
28328
28329  # Call helper function which possibly converts this using DOS-style short mode.
28330  # If so, the updated path is stored in $new_path.
28331
28332  input_path="$new_path"
28333  # Check if we need to convert this using DOS-style short mode. If the path
28334  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28335  # take no chances and rewrite it.
28336  # Note: m4 eats our [], so we need to use [ and ] instead.
28337  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28338  if test "x$has_forbidden_chars" != x; then
28339    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28340    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28341    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28342    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28343      # Going to short mode and back again did indeed matter. Since short mode is
28344      # case insensitive, let's make it lowercase to improve readability.
28345      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28346      # Now convert it back to Unix-style (cygpath)
28347      input_path=`$CYGPATH -u "$shortmode_path"`
28348      new_path="$input_path"
28349    fi
28350  fi
28351
28352  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28353  if test "x$test_cygdrive_prefix" = x; then
28354    # As a simple fix, exclude /usr/bin since it's not a real path.
28355    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28356      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28357      # a path prefixed by /cygdrive for fixpath to work.
28358      new_path="$CYGWIN_ROOT_PATH$input_path"
28359    fi
28360  fi
28361
28362
28363  if test "x$path" != "x$new_path"; then
28364    BOOT_JDK="$new_path"
28365    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28366$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28367  fi
28368
28369    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28370
28371  path="$BOOT_JDK"
28372  has_colon=`$ECHO $path | $GREP ^.:`
28373  new_path="$path"
28374  if test "x$has_colon" = x; then
28375    # Not in mixed or Windows style, start by that.
28376    new_path=`cmd //c echo $path`
28377  fi
28378
28379
28380  input_path="$new_path"
28381  # Check if we need to convert this using DOS-style short mode. If the path
28382  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28383  # take no chances and rewrite it.
28384  # Note: m4 eats our [], so we need to use [ and ] instead.
28385  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28386  if test "x$has_forbidden_chars" != x; then
28387    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28388    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28389  fi
28390
28391
28392  windows_path="$new_path"
28393  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28394    unix_path=`$CYGPATH -u "$windows_path"`
28395    new_path="$unix_path"
28396  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28397    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28398    new_path="$unix_path"
28399  fi
28400
28401  if test "x$path" != "x$new_path"; then
28402    BOOT_JDK="$new_path"
28403    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28404$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28405  fi
28406
28407  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28408  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28409
28410    else
28411      # We're on a unix platform. Hooray! :)
28412      path="$BOOT_JDK"
28413      has_space=`$ECHO "$path" | $GREP " "`
28414      if test "x$has_space" != x; then
28415        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28416$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28417        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28418      fi
28419
28420      # Use eval to expand a potential ~
28421      eval path="$path"
28422      if test ! -f "$path" && test ! -d "$path"; then
28423        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28424      fi
28425
28426      if test -d "$path"; then
28427        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28428      else
28429        dir="`$DIRNAME "$path"`"
28430        base="`$BASENAME "$path"`"
28431        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28432      fi
28433    fi
28434  fi
28435
28436            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28437$as_echo_n "checking for Boot JDK... " >&6; }
28438            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28439$as_echo "$BOOT_JDK" >&6; }
28440            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28441$as_echo_n "checking Boot JDK version... " >&6; }
28442            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28443            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28444$as_echo "$BOOT_JDK_VERSION" >&6; }
28445          fi # end check jdk version
28446        fi # end check javac
28447      fi # end check java
28448    fi # end check boot jdk found
28449  fi
28450
28451
28452  if test "x$BOOT_JDK_FOUND" = xno; then
28453    # Now execute the test
28454
28455  BOOT_JDK_PREFIX="/System/Library/Java/JavaVirtualMachines"
28456  BOOT_JDK_SUFFIX="/Contents/Home"
28457  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28458  if test "x$ALL_JDKS_FOUND" != x; then
28459    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28460
28461  if test "x$BOOT_JDK_FOUND" = xno; then
28462    # Now execute the test
28463
28464        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28465        if test -d "$BOOT_JDK"; then
28466          BOOT_JDK_FOUND=maybe
28467          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28468$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28469        fi
28470
28471
28472    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28473    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28474      # Do we have a bin/java?
28475      if test ! -x "$BOOT_JDK/bin/java"; then
28476        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28477$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28478        BOOT_JDK_FOUND=no
28479      else
28480        # Do we have a bin/javac?
28481        if test ! -x "$BOOT_JDK/bin/javac"; then
28482          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28483$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28484          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28485$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28486          BOOT_JDK_FOUND=no
28487        else
28488          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28489          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28490
28491          # Extra M4 quote needed to protect [] in grep expression.
28492          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28493          if test "x$FOUND_CORRECT_VERSION" = x; then
28494            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28495$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28496            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28497$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28498            BOOT_JDK_FOUND=no
28499          else
28500            # We're done! :-)
28501            BOOT_JDK_FOUND=yes
28502
28503  # Only process if variable expands to non-empty
28504
28505  if test "x$BOOT_JDK" != x; then
28506    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28507
28508  # Input might be given as Windows format, start by converting to
28509  # unix format.
28510  path="$BOOT_JDK"
28511  new_path=`$CYGPATH -u "$path"`
28512
28513  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28514  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28515  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28516  # "foo.exe" is OK but "foo" is an error.
28517  #
28518  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28519  # It is also a way to make sure we got the proper file name for the real test later on.
28520  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28521  if test "x$test_shortpath" = x; then
28522    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28523$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28524    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28525  fi
28526
28527  # Call helper function which possibly converts this using DOS-style short mode.
28528  # If so, the updated path is stored in $new_path.
28529
28530  input_path="$new_path"
28531  # Check if we need to convert this using DOS-style short mode. If the path
28532  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28533  # take no chances and rewrite it.
28534  # Note: m4 eats our [], so we need to use [ and ] instead.
28535  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28536  if test "x$has_forbidden_chars" != x; then
28537    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28538    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28539    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28540    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28541      # Going to short mode and back again did indeed matter. Since short mode is
28542      # case insensitive, let's make it lowercase to improve readability.
28543      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28544      # Now convert it back to Unix-style (cygpath)
28545      input_path=`$CYGPATH -u "$shortmode_path"`
28546      new_path="$input_path"
28547    fi
28548  fi
28549
28550  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28551  if test "x$test_cygdrive_prefix" = x; then
28552    # As a simple fix, exclude /usr/bin since it's not a real path.
28553    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28554      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28555      # a path prefixed by /cygdrive for fixpath to work.
28556      new_path="$CYGWIN_ROOT_PATH$input_path"
28557    fi
28558  fi
28559
28560
28561  if test "x$path" != "x$new_path"; then
28562    BOOT_JDK="$new_path"
28563    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28564$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28565  fi
28566
28567    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28568
28569  path="$BOOT_JDK"
28570  has_colon=`$ECHO $path | $GREP ^.:`
28571  new_path="$path"
28572  if test "x$has_colon" = x; then
28573    # Not in mixed or Windows style, start by that.
28574    new_path=`cmd //c echo $path`
28575  fi
28576
28577
28578  input_path="$new_path"
28579  # Check if we need to convert this using DOS-style short mode. If the path
28580  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28581  # take no chances and rewrite it.
28582  # Note: m4 eats our [], so we need to use [ and ] instead.
28583  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28584  if test "x$has_forbidden_chars" != x; then
28585    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28586    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28587  fi
28588
28589
28590  windows_path="$new_path"
28591  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28592    unix_path=`$CYGPATH -u "$windows_path"`
28593    new_path="$unix_path"
28594  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28595    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28596    new_path="$unix_path"
28597  fi
28598
28599  if test "x$path" != "x$new_path"; then
28600    BOOT_JDK="$new_path"
28601    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28602$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28603  fi
28604
28605  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28606  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28607
28608    else
28609      # We're on a unix platform. Hooray! :)
28610      path="$BOOT_JDK"
28611      has_space=`$ECHO "$path" | $GREP " "`
28612      if test "x$has_space" != x; then
28613        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28614$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28615        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28616      fi
28617
28618      # Use eval to expand a potential ~
28619      eval path="$path"
28620      if test ! -f "$path" && test ! -d "$path"; then
28621        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28622      fi
28623
28624      if test -d "$path"; then
28625        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28626      else
28627        dir="`$DIRNAME "$path"`"
28628        base="`$BASENAME "$path"`"
28629        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28630      fi
28631    fi
28632  fi
28633
28634            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28635$as_echo_n "checking for Boot JDK... " >&6; }
28636            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28637$as_echo "$BOOT_JDK" >&6; }
28638            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28639$as_echo_n "checking Boot JDK version... " >&6; }
28640            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28641            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28642$as_echo "$BOOT_JDK_VERSION" >&6; }
28643          fi # end check jdk version
28644        fi # end check javac
28645      fi # end check java
28646    fi # end check boot jdk found
28647  fi
28648
28649    done
28650  fi
28651
28652
28653    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28654    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28655      # Do we have a bin/java?
28656      if test ! -x "$BOOT_JDK/bin/java"; then
28657        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28658$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28659        BOOT_JDK_FOUND=no
28660      else
28661        # Do we have a bin/javac?
28662        if test ! -x "$BOOT_JDK/bin/javac"; then
28663          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28664$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28665          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28666$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28667          BOOT_JDK_FOUND=no
28668        else
28669          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28670          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28671
28672          # Extra M4 quote needed to protect [] in grep expression.
28673          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28674          if test "x$FOUND_CORRECT_VERSION" = x; then
28675            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28676$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28677            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28678$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28679            BOOT_JDK_FOUND=no
28680          else
28681            # We're done! :-)
28682            BOOT_JDK_FOUND=yes
28683
28684  # Only process if variable expands to non-empty
28685
28686  if test "x$BOOT_JDK" != x; then
28687    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28688
28689  # Input might be given as Windows format, start by converting to
28690  # unix format.
28691  path="$BOOT_JDK"
28692  new_path=`$CYGPATH -u "$path"`
28693
28694  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28695  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28696  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28697  # "foo.exe" is OK but "foo" is an error.
28698  #
28699  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28700  # It is also a way to make sure we got the proper file name for the real test later on.
28701  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28702  if test "x$test_shortpath" = x; then
28703    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28704$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28705    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28706  fi
28707
28708  # Call helper function which possibly converts this using DOS-style short mode.
28709  # If so, the updated path is stored in $new_path.
28710
28711  input_path="$new_path"
28712  # Check if we need to convert this using DOS-style short mode. If the path
28713  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28714  # take no chances and rewrite it.
28715  # Note: m4 eats our [], so we need to use [ and ] instead.
28716  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28717  if test "x$has_forbidden_chars" != x; then
28718    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28719    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28720    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28721    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28722      # Going to short mode and back again did indeed matter. Since short mode is
28723      # case insensitive, let's make it lowercase to improve readability.
28724      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28725      # Now convert it back to Unix-style (cygpath)
28726      input_path=`$CYGPATH -u "$shortmode_path"`
28727      new_path="$input_path"
28728    fi
28729  fi
28730
28731  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28732  if test "x$test_cygdrive_prefix" = x; then
28733    # As a simple fix, exclude /usr/bin since it's not a real path.
28734    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28735      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28736      # a path prefixed by /cygdrive for fixpath to work.
28737      new_path="$CYGWIN_ROOT_PATH$input_path"
28738    fi
28739  fi
28740
28741
28742  if test "x$path" != "x$new_path"; then
28743    BOOT_JDK="$new_path"
28744    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28745$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28746  fi
28747
28748    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28749
28750  path="$BOOT_JDK"
28751  has_colon=`$ECHO $path | $GREP ^.:`
28752  new_path="$path"
28753  if test "x$has_colon" = x; then
28754    # Not in mixed or Windows style, start by that.
28755    new_path=`cmd //c echo $path`
28756  fi
28757
28758
28759  input_path="$new_path"
28760  # Check if we need to convert this using DOS-style short mode. If the path
28761  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28762  # take no chances and rewrite it.
28763  # Note: m4 eats our [], so we need to use [ and ] instead.
28764  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28765  if test "x$has_forbidden_chars" != x; then
28766    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28767    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28768  fi
28769
28770
28771  windows_path="$new_path"
28772  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28773    unix_path=`$CYGPATH -u "$windows_path"`
28774    new_path="$unix_path"
28775  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28776    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28777    new_path="$unix_path"
28778  fi
28779
28780  if test "x$path" != "x$new_path"; then
28781    BOOT_JDK="$new_path"
28782    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28783$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28784  fi
28785
28786  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28787  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28788
28789    else
28790      # We're on a unix platform. Hooray! :)
28791      path="$BOOT_JDK"
28792      has_space=`$ECHO "$path" | $GREP " "`
28793      if test "x$has_space" != x; then
28794        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28795$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28796        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28797      fi
28798
28799      # Use eval to expand a potential ~
28800      eval path="$path"
28801      if test ! -f "$path" && test ! -d "$path"; then
28802        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
28803      fi
28804
28805      if test -d "$path"; then
28806        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
28807      else
28808        dir="`$DIRNAME "$path"`"
28809        base="`$BASENAME "$path"`"
28810        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
28811      fi
28812    fi
28813  fi
28814
28815            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
28816$as_echo_n "checking for Boot JDK... " >&6; }
28817            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
28818$as_echo "$BOOT_JDK" >&6; }
28819            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
28820$as_echo_n "checking Boot JDK version... " >&6; }
28821            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
28822            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
28823$as_echo "$BOOT_JDK_VERSION" >&6; }
28824          fi # end check jdk version
28825        fi # end check javac
28826      fi # end check java
28827    fi # end check boot jdk found
28828  fi
28829
28830  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
28831
28832  if test "x$BOOT_JDK_FOUND" = xno; then
28833    # Now execute the test
28834
28835  BOOT_JDK_PREFIX="/usr/lib/jvm"
28836  BOOT_JDK_SUFFIX=""
28837  ALL_JDKS_FOUND=`$LS "$BOOT_JDK_PREFIX" 2> /dev/null | $SORT -r`
28838  if test "x$ALL_JDKS_FOUND" != x; then
28839    for JDK_TO_TRY in $ALL_JDKS_FOUND ; do
28840
28841  if test "x$BOOT_JDK_FOUND" = xno; then
28842    # Now execute the test
28843
28844        BOOT_JDK="${BOOT_JDK_PREFIX}/${JDK_TO_TRY}${BOOT_JDK_SUFFIX}"
28845        if test -d "$BOOT_JDK"; then
28846          BOOT_JDK_FOUND=maybe
28847          { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&5
28848$as_echo "$as_me: Found potential Boot JDK using well-known locations (in $BOOT_JDK_PREFIX/$JDK_TO_TRY)" >&6;}
28849        fi
28850
28851
28852    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
28853    if test "x$BOOT_JDK_FOUND" = xmaybe; then
28854      # Do we have a bin/java?
28855      if test ! -x "$BOOT_JDK/bin/java"; then
28856        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
28857$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
28858        BOOT_JDK_FOUND=no
28859      else
28860        # Do we have a bin/javac?
28861        if test ! -x "$BOOT_JDK/bin/javac"; then
28862          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
28863$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
28864          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
28865$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
28866          BOOT_JDK_FOUND=no
28867        else
28868          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
28869          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
28870
28871          # Extra M4 quote needed to protect [] in grep expression.
28872          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
28873          if test "x$FOUND_CORRECT_VERSION" = x; then
28874            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
28875$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
28876            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
28877$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
28878            BOOT_JDK_FOUND=no
28879          else
28880            # We're done! :-)
28881            BOOT_JDK_FOUND=yes
28882
28883  # Only process if variable expands to non-empty
28884
28885  if test "x$BOOT_JDK" != x; then
28886    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28887
28888  # Input might be given as Windows format, start by converting to
28889  # unix format.
28890  path="$BOOT_JDK"
28891  new_path=`$CYGPATH -u "$path"`
28892
28893  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
28894  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
28895  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
28896  # "foo.exe" is OK but "foo" is an error.
28897  #
28898  # This test is therefore slightly more accurate than "test -f" to check for file precense.
28899  # It is also a way to make sure we got the proper file name for the real test later on.
28900  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
28901  if test "x$test_shortpath" = x; then
28902    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28903$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28904    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
28905  fi
28906
28907  # Call helper function which possibly converts this using DOS-style short mode.
28908  # If so, the updated path is stored in $new_path.
28909
28910  input_path="$new_path"
28911  # Check if we need to convert this using DOS-style short mode. If the path
28912  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28913  # take no chances and rewrite it.
28914  # Note: m4 eats our [], so we need to use [ and ] instead.
28915  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
28916  if test "x$has_forbidden_chars" != x; then
28917    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28918    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
28919    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
28920    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
28921      # Going to short mode and back again did indeed matter. Since short mode is
28922      # case insensitive, let's make it lowercase to improve readability.
28923      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28924      # Now convert it back to Unix-style (cygpath)
28925      input_path=`$CYGPATH -u "$shortmode_path"`
28926      new_path="$input_path"
28927    fi
28928  fi
28929
28930  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
28931  if test "x$test_cygdrive_prefix" = x; then
28932    # As a simple fix, exclude /usr/bin since it's not a real path.
28933    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
28934      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
28935      # a path prefixed by /cygdrive for fixpath to work.
28936      new_path="$CYGWIN_ROOT_PATH$input_path"
28937    fi
28938  fi
28939
28940
28941  if test "x$path" != "x$new_path"; then
28942    BOOT_JDK="$new_path"
28943    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28944$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28945  fi
28946
28947    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28948
28949  path="$BOOT_JDK"
28950  has_colon=`$ECHO $path | $GREP ^.:`
28951  new_path="$path"
28952  if test "x$has_colon" = x; then
28953    # Not in mixed or Windows style, start by that.
28954    new_path=`cmd //c echo $path`
28955  fi
28956
28957
28958  input_path="$new_path"
28959  # Check if we need to convert this using DOS-style short mode. If the path
28960  # contains just simple characters, use it. Otherwise (spaces, weird characters),
28961  # take no chances and rewrite it.
28962  # Note: m4 eats our [], so we need to use [ and ] instead.
28963  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
28964  if test "x$has_forbidden_chars" != x; then
28965    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
28966    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
28967  fi
28968
28969
28970  windows_path="$new_path"
28971  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
28972    unix_path=`$CYGPATH -u "$windows_path"`
28973    new_path="$unix_path"
28974  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
28975    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
28976    new_path="$unix_path"
28977  fi
28978
28979  if test "x$path" != "x$new_path"; then
28980    BOOT_JDK="$new_path"
28981    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
28982$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
28983  fi
28984
28985  # Save the first 10 bytes of this path to the storage, so fixpath can work.
28986  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
28987
28988    else
28989      # We're on a unix platform. Hooray! :)
28990      path="$BOOT_JDK"
28991      has_space=`$ECHO "$path" | $GREP " "`
28992      if test "x$has_space" != x; then
28993        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
28994$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
28995        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
28996      fi
28997
28998      # Use eval to expand a potential ~
28999      eval path="$path"
29000      if test ! -f "$path" && test ! -d "$path"; then
29001        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29002      fi
29003
29004      if test -d "$path"; then
29005        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29006      else
29007        dir="`$DIRNAME "$path"`"
29008        base="`$BASENAME "$path"`"
29009        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29010      fi
29011    fi
29012  fi
29013
29014            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29015$as_echo_n "checking for Boot JDK... " >&6; }
29016            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29017$as_echo "$BOOT_JDK" >&6; }
29018            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29019$as_echo_n "checking Boot JDK version... " >&6; }
29020            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29021            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29022$as_echo "$BOOT_JDK_VERSION" >&6; }
29023          fi # end check jdk version
29024        fi # end check javac
29025      fi # end check java
29026    fi # end check boot jdk found
29027  fi
29028
29029    done
29030  fi
29031
29032
29033    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29034    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29035      # Do we have a bin/java?
29036      if test ! -x "$BOOT_JDK/bin/java"; then
29037        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29038$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29039        BOOT_JDK_FOUND=no
29040      else
29041        # Do we have a bin/javac?
29042        if test ! -x "$BOOT_JDK/bin/javac"; then
29043          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29044$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29045          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29046$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29047          BOOT_JDK_FOUND=no
29048        else
29049          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29050          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29051
29052          # Extra M4 quote needed to protect [] in grep expression.
29053          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29054          if test "x$FOUND_CORRECT_VERSION" = x; then
29055            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29056$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29057            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29058$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29059            BOOT_JDK_FOUND=no
29060          else
29061            # We're done! :-)
29062            BOOT_JDK_FOUND=yes
29063
29064  # Only process if variable expands to non-empty
29065
29066  if test "x$BOOT_JDK" != x; then
29067    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29068
29069  # Input might be given as Windows format, start by converting to
29070  # unix format.
29071  path="$BOOT_JDK"
29072  new_path=`$CYGPATH -u "$path"`
29073
29074  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29075  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29076  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29077  # "foo.exe" is OK but "foo" is an error.
29078  #
29079  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29080  # It is also a way to make sure we got the proper file name for the real test later on.
29081  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29082  if test "x$test_shortpath" = x; then
29083    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29084$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29085    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29086  fi
29087
29088  # Call helper function which possibly converts this using DOS-style short mode.
29089  # If so, the updated path is stored in $new_path.
29090
29091  input_path="$new_path"
29092  # Check if we need to convert this using DOS-style short mode. If the path
29093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29094  # take no chances and rewrite it.
29095  # Note: m4 eats our [], so we need to use [ and ] instead.
29096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29097  if test "x$has_forbidden_chars" != x; then
29098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29099    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29100    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29101    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29102      # Going to short mode and back again did indeed matter. Since short mode is
29103      # case insensitive, let's make it lowercase to improve readability.
29104      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29105      # Now convert it back to Unix-style (cygpath)
29106      input_path=`$CYGPATH -u "$shortmode_path"`
29107      new_path="$input_path"
29108    fi
29109  fi
29110
29111  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29112  if test "x$test_cygdrive_prefix" = x; then
29113    # As a simple fix, exclude /usr/bin since it's not a real path.
29114    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29115      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29116      # a path prefixed by /cygdrive for fixpath to work.
29117      new_path="$CYGWIN_ROOT_PATH$input_path"
29118    fi
29119  fi
29120
29121
29122  if test "x$path" != "x$new_path"; then
29123    BOOT_JDK="$new_path"
29124    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29125$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29126  fi
29127
29128    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29129
29130  path="$BOOT_JDK"
29131  has_colon=`$ECHO $path | $GREP ^.:`
29132  new_path="$path"
29133  if test "x$has_colon" = x; then
29134    # Not in mixed or Windows style, start by that.
29135    new_path=`cmd //c echo $path`
29136  fi
29137
29138
29139  input_path="$new_path"
29140  # Check if we need to convert this using DOS-style short mode. If the path
29141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29142  # take no chances and rewrite it.
29143  # Note: m4 eats our [], so we need to use [ and ] instead.
29144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29145  if test "x$has_forbidden_chars" != x; then
29146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29147    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29148  fi
29149
29150
29151  windows_path="$new_path"
29152  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29153    unix_path=`$CYGPATH -u "$windows_path"`
29154    new_path="$unix_path"
29155  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29156    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29157    new_path="$unix_path"
29158  fi
29159
29160  if test "x$path" != "x$new_path"; then
29161    BOOT_JDK="$new_path"
29162    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29163$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29164  fi
29165
29166  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29167  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29168
29169    else
29170      # We're on a unix platform. Hooray! :)
29171      path="$BOOT_JDK"
29172      has_space=`$ECHO "$path" | $GREP " "`
29173      if test "x$has_space" != x; then
29174        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29175$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29176        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29177      fi
29178
29179      # Use eval to expand a potential ~
29180      eval path="$path"
29181      if test ! -f "$path" && test ! -d "$path"; then
29182        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29183      fi
29184
29185      if test -d "$path"; then
29186        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29187      else
29188        dir="`$DIRNAME "$path"`"
29189        base="`$BASENAME "$path"`"
29190        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29191      fi
29192    fi
29193  fi
29194
29195            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29196$as_echo_n "checking for Boot JDK... " >&6; }
29197            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29198$as_echo "$BOOT_JDK" >&6; }
29199            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29200$as_echo_n "checking Boot JDK version... " >&6; }
29201            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29202            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29203$as_echo "$BOOT_JDK_VERSION" >&6; }
29204          fi # end check jdk version
29205        fi # end check javac
29206      fi # end check java
29207    fi # end check boot jdk found
29208  fi
29209
29210  fi
29211
29212
29213    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
29214    if test "x$BOOT_JDK_FOUND" = xmaybe; then
29215      # Do we have a bin/java?
29216      if test ! -x "$BOOT_JDK/bin/java"; then
29217        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&5
29218$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/java; ignoring" >&6;}
29219        BOOT_JDK_FOUND=no
29220      else
29221        # Do we have a bin/javac?
29222        if test ! -x "$BOOT_JDK/bin/javac"; then
29223          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&5
29224$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK did not contain bin/javac; ignoring" >&6;}
29225          { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be an JRE instead of an JDK)" >&5
29226$as_echo "$as_me: (This might be an JRE instead of an JDK)" >&6;}
29227          BOOT_JDK_FOUND=no
29228        else
29229          # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
29230          BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | head -n 1`
29231
29232          # Extra M4 quote needed to protect [] in grep expression.
29233          FOUND_CORRECT_VERSION=`$ECHO $BOOT_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"|(1\.[89]\.)'`
29234          if test "x$FOUND_CORRECT_VERSION" = x; then
29235            { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&5
29236$as_echo "$as_me: Potential Boot JDK found at $BOOT_JDK is incorrect JDK version ($BOOT_JDK_VERSION); ignoring" >&6;}
29237            { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Boot JDK must be version 8 or 9)" >&5
29238$as_echo "$as_me: (Your Boot JDK must be version 8 or 9)" >&6;}
29239            BOOT_JDK_FOUND=no
29240          else
29241            # We're done! :-)
29242            BOOT_JDK_FOUND=yes
29243
29244  # Only process if variable expands to non-empty
29245
29246  if test "x$BOOT_JDK" != x; then
29247    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29248
29249  # Input might be given as Windows format, start by converting to
29250  # unix format.
29251  path="$BOOT_JDK"
29252  new_path=`$CYGPATH -u "$path"`
29253
29254  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
29255  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
29256  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
29257  # "foo.exe" is OK but "foo" is an error.
29258  #
29259  # This test is therefore slightly more accurate than "test -f" to check for file precense.
29260  # It is also a way to make sure we got the proper file name for the real test later on.
29261  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
29262  if test "x$test_shortpath" = x; then
29263    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29264$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29265    as_fn_error $? "Cannot locate the the path of BOOT_JDK" "$LINENO" 5
29266  fi
29267
29268  # Call helper function which possibly converts this using DOS-style short mode.
29269  # If so, the updated path is stored in $new_path.
29270
29271  input_path="$new_path"
29272  # Check if we need to convert this using DOS-style short mode. If the path
29273  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29274  # take no chances and rewrite it.
29275  # Note: m4 eats our [], so we need to use [ and ] instead.
29276  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
29277  if test "x$has_forbidden_chars" != x; then
29278    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29279    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
29280    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
29281    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
29282      # Going to short mode and back again did indeed matter. Since short mode is
29283      # case insensitive, let's make it lowercase to improve readability.
29284      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29285      # Now convert it back to Unix-style (cygpath)
29286      input_path=`$CYGPATH -u "$shortmode_path"`
29287      new_path="$input_path"
29288    fi
29289  fi
29290
29291  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
29292  if test "x$test_cygdrive_prefix" = x; then
29293    # As a simple fix, exclude /usr/bin since it's not a real path.
29294    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
29295      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
29296      # a path prefixed by /cygdrive for fixpath to work.
29297      new_path="$CYGWIN_ROOT_PATH$input_path"
29298    fi
29299  fi
29300
29301
29302  if test "x$path" != "x$new_path"; then
29303    BOOT_JDK="$new_path"
29304    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29305$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29306  fi
29307
29308    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29309
29310  path="$BOOT_JDK"
29311  has_colon=`$ECHO $path | $GREP ^.:`
29312  new_path="$path"
29313  if test "x$has_colon" = x; then
29314    # Not in mixed or Windows style, start by that.
29315    new_path=`cmd //c echo $path`
29316  fi
29317
29318
29319  input_path="$new_path"
29320  # Check if we need to convert this using DOS-style short mode. If the path
29321  # contains just simple characters, use it. Otherwise (spaces, weird characters),
29322  # take no chances and rewrite it.
29323  # Note: m4 eats our [], so we need to use [ and ] instead.
29324  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
29325  if test "x$has_forbidden_chars" != x; then
29326    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
29327    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
29328  fi
29329
29330
29331  windows_path="$new_path"
29332  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29333    unix_path=`$CYGPATH -u "$windows_path"`
29334    new_path="$unix_path"
29335  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29336    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
29337    new_path="$unix_path"
29338  fi
29339
29340  if test "x$path" != "x$new_path"; then
29341    BOOT_JDK="$new_path"
29342    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BOOT_JDK to \"$new_path\"" >&5
29343$as_echo "$as_me: Rewriting BOOT_JDK to \"$new_path\"" >&6;}
29344  fi
29345
29346  # Save the first 10 bytes of this path to the storage, so fixpath can work.
29347  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
29348
29349    else
29350      # We're on a unix platform. Hooray! :)
29351      path="$BOOT_JDK"
29352      has_space=`$ECHO "$path" | $GREP " "`
29353      if test "x$has_space" != x; then
29354        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&5
29355$as_echo "$as_me: The path of BOOT_JDK, which resolves as \"$path\", is invalid." >&6;}
29356        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
29357      fi
29358
29359      # Use eval to expand a potential ~
29360      eval path="$path"
29361      if test ! -f "$path" && test ! -d "$path"; then
29362        as_fn_error $? "The path of BOOT_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
29363      fi
29364
29365      if test -d "$path"; then
29366        BOOT_JDK="`cd "$path"; $THEPWDCMD -L`"
29367      else
29368        dir="`$DIRNAME "$path"`"
29369        base="`$BASENAME "$path"`"
29370        BOOT_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
29371      fi
29372    fi
29373  fi
29374
29375            { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Boot JDK" >&5
29376$as_echo_n "checking for Boot JDK... " >&6; }
29377            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK" >&5
29378$as_echo "$BOOT_JDK" >&6; }
29379            { $as_echo "$as_me:${as_lineno-$LINENO}: checking Boot JDK version" >&5
29380$as_echo_n "checking Boot JDK version... " >&6; }
29381            BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
29382            { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_VERSION" >&5
29383$as_echo "$BOOT_JDK_VERSION" >&6; }
29384          fi # end check jdk version
29385        fi # end check javac
29386      fi # end check java
29387    fi # end check boot jdk found
29388  fi
29389
29390
29391  # If we haven't found anything yet, we've truly lost. Give up.
29392  if test "x$BOOT_JDK_FOUND" = xno; then
29393
29394  # Print a helpful message on how to acquire the necessary build dependency.
29395  # openjdk is the help tag: freetype, cups, alsa etc
29396  MISSING_DEPENDENCY=openjdk
29397
29398  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
29399    cygwin_help $MISSING_DEPENDENCY
29400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
29401    msys_help $MISSING_DEPENDENCY
29402  else
29403    PKGHANDLER_COMMAND=
29404
29405    case $PKGHANDLER in
29406      apt-get)
29407        apt_help     $MISSING_DEPENDENCY ;;
29408      yum)
29409        yum_help     $MISSING_DEPENDENCY ;;
29410      port)
29411        port_help    $MISSING_DEPENDENCY ;;
29412      pkgutil)
29413        pkgutil_help $MISSING_DEPENDENCY ;;
29414      pkgadd)
29415        pkgadd_help  $MISSING_DEPENDENCY ;;
29416    esac
29417
29418    if test "x$PKGHANDLER_COMMAND" != x; then
29419      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
29420    fi
29421  fi
29422
29423    { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find a valid Boot JDK. $HELP_MSG" >&5
29424$as_echo "$as_me: Could not find a valid Boot JDK. $HELP_MSG" >&6;}
29425    { $as_echo "$as_me:${as_lineno-$LINENO}: This might be fixed by explicitely setting --with-boot-jdk" >&5
29426$as_echo "$as_me: This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29427    as_fn_error $? "Cannot continue" "$LINENO" 5
29428  fi
29429
29430
29431
29432  # Setup tools from the Boot JDK.
29433
29434  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29435
29436  # Publish this variable in the help.
29437
29438
29439  if [ -z "${JAVA+x}" ]; then
29440    # The variable is not set by user, try to locate tool using the code snippet
29441
29442      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29443$as_echo_n "checking for java in Boot JDK... " >&6; }
29444      JAVA=$BOOT_JDK/bin/java
29445      if test ! -x $JAVA; then
29446        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29447$as_echo "not found" >&6; }
29448        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29449$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29450        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29451      fi
29452      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29453$as_echo "ok" >&6; }
29454
29455
29456  else
29457    # The variable is set, but is it from the command line or the environment?
29458
29459    # Try to remove the string !JAVA! from our list.
29460    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVA!/}
29461    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29462      # If it failed, the variable was not from the command line. Ignore it,
29463      # but warn the user (except for BASH, which is always set by the calling BASH).
29464      if test "xJAVA" != xBASH; then
29465        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&5
29466$as_echo "$as_me: WARNING: Ignoring value of JAVA from the environment. Use command line variables instead." >&2;}
29467      fi
29468      # Try to locate tool using the code snippet
29469
29470      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for java in Boot JDK" >&5
29471$as_echo_n "checking for java in Boot JDK... " >&6; }
29472      JAVA=$BOOT_JDK/bin/java
29473      if test ! -x $JAVA; then
29474        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29475$as_echo "not found" >&6; }
29476        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29477$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29478        as_fn_error $? "Could not find java in the Boot JDK" "$LINENO" 5
29479      fi
29480      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29481$as_echo "ok" >&6; }
29482
29483
29484    else
29485      # If it succeeded, then it was overridden by the user. We will use it
29486      # for the tool.
29487
29488      # First remove it from the list of overridden variables, so we can test
29489      # for unknown variables in the end.
29490      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29491
29492      # Check if we try to supply an empty value
29493      if test "x$JAVA" = x; then
29494        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVA= (no value)" >&5
29495$as_echo "$as_me: Setting user supplied tool JAVA= (no value)" >&6;}
29496        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29497$as_echo_n "checking for JAVA... " >&6; }
29498        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29499$as_echo "disabled" >&6; }
29500      else
29501        # Check if the provided tool contains a complete path.
29502        tool_specified="$JAVA"
29503        tool_basename="${tool_specified##*/}"
29504        if test "x$tool_basename" = "x$tool_specified"; then
29505          # A command without a complete path is provided, search $PATH.
29506          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVA=$tool_basename" >&5
29507$as_echo "$as_me: Will search for user supplied tool JAVA=$tool_basename" >&6;}
29508          # Extract the first word of "$tool_basename", so it can be a program name with args.
29509set dummy $tool_basename; ac_word=$2
29510{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29511$as_echo_n "checking for $ac_word... " >&6; }
29512if ${ac_cv_path_JAVA+:} false; then :
29513  $as_echo_n "(cached) " >&6
29514else
29515  case $JAVA in
29516  [\\/]* | ?:[\\/]*)
29517  ac_cv_path_JAVA="$JAVA" # Let the user override the test with a path.
29518  ;;
29519  *)
29520  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29521for as_dir in $PATH
29522do
29523  IFS=$as_save_IFS
29524  test -z "$as_dir" && as_dir=.
29525    for ac_exec_ext in '' $ac_executable_extensions; do
29526  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29527    ac_cv_path_JAVA="$as_dir/$ac_word$ac_exec_ext"
29528    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29529    break 2
29530  fi
29531done
29532  done
29533IFS=$as_save_IFS
29534
29535  ;;
29536esac
29537fi
29538JAVA=$ac_cv_path_JAVA
29539if test -n "$JAVA"; then
29540  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVA" >&5
29541$as_echo "$JAVA" >&6; }
29542else
29543  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29544$as_echo "no" >&6; }
29545fi
29546
29547
29548          if test "x$JAVA" = x; then
29549            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29550          fi
29551        else
29552          # Otherwise we believe it is a complete path. Use it as it is.
29553          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVA=$tool_specified" >&5
29554$as_echo "$as_me: Will use user supplied tool JAVA=$tool_specified" >&6;}
29555          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVA" >&5
29556$as_echo_n "checking for JAVA... " >&6; }
29557          if test ! -x "$tool_specified"; then
29558            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29559$as_echo "not found" >&6; }
29560            as_fn_error $? "User supplied tool JAVA=$tool_specified does not exist or is not executable" "$LINENO" 5
29561          fi
29562          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29563$as_echo "$tool_specified" >&6; }
29564        fi
29565      fi
29566    fi
29567
29568  fi
29569
29570
29571
29572  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29573
29574  # Publish this variable in the help.
29575
29576
29577  if [ -z "${JAVAC+x}" ]; then
29578    # The variable is not set by user, try to locate tool using the code snippet
29579
29580      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29581$as_echo_n "checking for javac in Boot JDK... " >&6; }
29582      JAVAC=$BOOT_JDK/bin/javac
29583      if test ! -x $JAVAC; then
29584        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29585$as_echo "not found" >&6; }
29586        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29587$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29588        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29589      fi
29590      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29591$as_echo "ok" >&6; }
29592
29593
29594  else
29595    # The variable is set, but is it from the command line or the environment?
29596
29597    # Try to remove the string !JAVAC! from our list.
29598    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAC!/}
29599    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29600      # If it failed, the variable was not from the command line. Ignore it,
29601      # but warn the user (except for BASH, which is always set by the calling BASH).
29602      if test "xJAVAC" != xBASH; then
29603        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&5
29604$as_echo "$as_me: WARNING: Ignoring value of JAVAC from the environment. Use command line variables instead." >&2;}
29605      fi
29606      # Try to locate tool using the code snippet
29607
29608      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javac in Boot JDK" >&5
29609$as_echo_n "checking for javac in Boot JDK... " >&6; }
29610      JAVAC=$BOOT_JDK/bin/javac
29611      if test ! -x $JAVAC; then
29612        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29613$as_echo "not found" >&6; }
29614        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29615$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29616        as_fn_error $? "Could not find javac in the Boot JDK" "$LINENO" 5
29617      fi
29618      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29619$as_echo "ok" >&6; }
29620
29621
29622    else
29623      # If it succeeded, then it was overridden by the user. We will use it
29624      # for the tool.
29625
29626      # First remove it from the list of overridden variables, so we can test
29627      # for unknown variables in the end.
29628      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29629
29630      # Check if we try to supply an empty value
29631      if test "x$JAVAC" = x; then
29632        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAC= (no value)" >&5
29633$as_echo "$as_me: Setting user supplied tool JAVAC= (no value)" >&6;}
29634        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29635$as_echo_n "checking for JAVAC... " >&6; }
29636        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29637$as_echo "disabled" >&6; }
29638      else
29639        # Check if the provided tool contains a complete path.
29640        tool_specified="$JAVAC"
29641        tool_basename="${tool_specified##*/}"
29642        if test "x$tool_basename" = "x$tool_specified"; then
29643          # A command without a complete path is provided, search $PATH.
29644          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAC=$tool_basename" >&5
29645$as_echo "$as_me: Will search for user supplied tool JAVAC=$tool_basename" >&6;}
29646          # Extract the first word of "$tool_basename", so it can be a program name with args.
29647set dummy $tool_basename; ac_word=$2
29648{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29649$as_echo_n "checking for $ac_word... " >&6; }
29650if ${ac_cv_path_JAVAC+:} false; then :
29651  $as_echo_n "(cached) " >&6
29652else
29653  case $JAVAC in
29654  [\\/]* | ?:[\\/]*)
29655  ac_cv_path_JAVAC="$JAVAC" # Let the user override the test with a path.
29656  ;;
29657  *)
29658  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29659for as_dir in $PATH
29660do
29661  IFS=$as_save_IFS
29662  test -z "$as_dir" && as_dir=.
29663    for ac_exec_ext in '' $ac_executable_extensions; do
29664  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29665    ac_cv_path_JAVAC="$as_dir/$ac_word$ac_exec_ext"
29666    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29667    break 2
29668  fi
29669done
29670  done
29671IFS=$as_save_IFS
29672
29673  ;;
29674esac
29675fi
29676JAVAC=$ac_cv_path_JAVAC
29677if test -n "$JAVAC"; then
29678  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAC" >&5
29679$as_echo "$JAVAC" >&6; }
29680else
29681  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29682$as_echo "no" >&6; }
29683fi
29684
29685
29686          if test "x$JAVAC" = x; then
29687            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29688          fi
29689        else
29690          # Otherwise we believe it is a complete path. Use it as it is.
29691          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAC=$tool_specified" >&5
29692$as_echo "$as_me: Will use user supplied tool JAVAC=$tool_specified" >&6;}
29693          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAC" >&5
29694$as_echo_n "checking for JAVAC... " >&6; }
29695          if test ! -x "$tool_specified"; then
29696            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29697$as_echo "not found" >&6; }
29698            as_fn_error $? "User supplied tool JAVAC=$tool_specified does not exist or is not executable" "$LINENO" 5
29699          fi
29700          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29701$as_echo "$tool_specified" >&6; }
29702        fi
29703      fi
29704    fi
29705
29706  fi
29707
29708
29709
29710  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29711
29712  # Publish this variable in the help.
29713
29714
29715  if [ -z "${JAVAH+x}" ]; then
29716    # The variable is not set by user, try to locate tool using the code snippet
29717
29718      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29719$as_echo_n "checking for javah in Boot JDK... " >&6; }
29720      JAVAH=$BOOT_JDK/bin/javah
29721      if test ! -x $JAVAH; then
29722        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29723$as_echo "not found" >&6; }
29724        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29725$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29726        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29727      fi
29728      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29729$as_echo "ok" >&6; }
29730
29731
29732  else
29733    # The variable is set, but is it from the command line or the environment?
29734
29735    # Try to remove the string !JAVAH! from our list.
29736    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAVAH!/}
29737    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29738      # If it failed, the variable was not from the command line. Ignore it,
29739      # but warn the user (except for BASH, which is always set by the calling BASH).
29740      if test "xJAVAH" != xBASH; then
29741        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&5
29742$as_echo "$as_me: WARNING: Ignoring value of JAVAH from the environment. Use command line variables instead." >&2;}
29743      fi
29744      # Try to locate tool using the code snippet
29745
29746      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for javah in Boot JDK" >&5
29747$as_echo_n "checking for javah in Boot JDK... " >&6; }
29748      JAVAH=$BOOT_JDK/bin/javah
29749      if test ! -x $JAVAH; then
29750        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29751$as_echo "not found" >&6; }
29752        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29753$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29754        as_fn_error $? "Could not find javah in the Boot JDK" "$LINENO" 5
29755      fi
29756      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29757$as_echo "ok" >&6; }
29758
29759
29760    else
29761      # If it succeeded, then it was overridden by the user. We will use it
29762      # for the tool.
29763
29764      # First remove it from the list of overridden variables, so we can test
29765      # for unknown variables in the end.
29766      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29767
29768      # Check if we try to supply an empty value
29769      if test "x$JAVAH" = x; then
29770        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAVAH= (no value)" >&5
29771$as_echo "$as_me: Setting user supplied tool JAVAH= (no value)" >&6;}
29772        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29773$as_echo_n "checking for JAVAH... " >&6; }
29774        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29775$as_echo "disabled" >&6; }
29776      else
29777        # Check if the provided tool contains a complete path.
29778        tool_specified="$JAVAH"
29779        tool_basename="${tool_specified##*/}"
29780        if test "x$tool_basename" = "x$tool_specified"; then
29781          # A command without a complete path is provided, search $PATH.
29782          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAVAH=$tool_basename" >&5
29783$as_echo "$as_me: Will search for user supplied tool JAVAH=$tool_basename" >&6;}
29784          # Extract the first word of "$tool_basename", so it can be a program name with args.
29785set dummy $tool_basename; ac_word=$2
29786{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29787$as_echo_n "checking for $ac_word... " >&6; }
29788if ${ac_cv_path_JAVAH+:} false; then :
29789  $as_echo_n "(cached) " >&6
29790else
29791  case $JAVAH in
29792  [\\/]* | ?:[\\/]*)
29793  ac_cv_path_JAVAH="$JAVAH" # Let the user override the test with a path.
29794  ;;
29795  *)
29796  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29797for as_dir in $PATH
29798do
29799  IFS=$as_save_IFS
29800  test -z "$as_dir" && as_dir=.
29801    for ac_exec_ext in '' $ac_executable_extensions; do
29802  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29803    ac_cv_path_JAVAH="$as_dir/$ac_word$ac_exec_ext"
29804    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29805    break 2
29806  fi
29807done
29808  done
29809IFS=$as_save_IFS
29810
29811  ;;
29812esac
29813fi
29814JAVAH=$ac_cv_path_JAVAH
29815if test -n "$JAVAH"; then
29816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAVAH" >&5
29817$as_echo "$JAVAH" >&6; }
29818else
29819  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29820$as_echo "no" >&6; }
29821fi
29822
29823
29824          if test "x$JAVAH" = x; then
29825            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29826          fi
29827        else
29828          # Otherwise we believe it is a complete path. Use it as it is.
29829          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAVAH=$tool_specified" >&5
29830$as_echo "$as_me: Will use user supplied tool JAVAH=$tool_specified" >&6;}
29831          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAVAH" >&5
29832$as_echo_n "checking for JAVAH... " >&6; }
29833          if test ! -x "$tool_specified"; then
29834            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29835$as_echo "not found" >&6; }
29836            as_fn_error $? "User supplied tool JAVAH=$tool_specified does not exist or is not executable" "$LINENO" 5
29837          fi
29838          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29839$as_echo "$tool_specified" >&6; }
29840        fi
29841      fi
29842    fi
29843
29844  fi
29845
29846
29847
29848  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29849
29850  # Publish this variable in the help.
29851
29852
29853  if [ -z "${JAR+x}" ]; then
29854    # The variable is not set by user, try to locate tool using the code snippet
29855
29856      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29857$as_echo_n "checking for jar in Boot JDK... " >&6; }
29858      JAR=$BOOT_JDK/bin/jar
29859      if test ! -x $JAR; then
29860        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29861$as_echo "not found" >&6; }
29862        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29863$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29864        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29865      fi
29866      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29867$as_echo "ok" >&6; }
29868
29869
29870  else
29871    # The variable is set, but is it from the command line or the environment?
29872
29873    # Try to remove the string !JAR! from our list.
29874    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JAR!/}
29875    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
29876      # If it failed, the variable was not from the command line. Ignore it,
29877      # but warn the user (except for BASH, which is always set by the calling BASH).
29878      if test "xJAR" != xBASH; then
29879        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&5
29880$as_echo "$as_me: WARNING: Ignoring value of JAR from the environment. Use command line variables instead." >&2;}
29881      fi
29882      # Try to locate tool using the code snippet
29883
29884      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jar in Boot JDK" >&5
29885$as_echo_n "checking for jar in Boot JDK... " >&6; }
29886      JAR=$BOOT_JDK/bin/jar
29887      if test ! -x $JAR; then
29888        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29889$as_echo "not found" >&6; }
29890        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
29891$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
29892        as_fn_error $? "Could not find jar in the Boot JDK" "$LINENO" 5
29893      fi
29894      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
29895$as_echo "ok" >&6; }
29896
29897
29898    else
29899      # If it succeeded, then it was overridden by the user. We will use it
29900      # for the tool.
29901
29902      # First remove it from the list of overridden variables, so we can test
29903      # for unknown variables in the end.
29904      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
29905
29906      # Check if we try to supply an empty value
29907      if test "x$JAR" = x; then
29908        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JAR= (no value)" >&5
29909$as_echo "$as_me: Setting user supplied tool JAR= (no value)" >&6;}
29910        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29911$as_echo_n "checking for JAR... " >&6; }
29912        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
29913$as_echo "disabled" >&6; }
29914      else
29915        # Check if the provided tool contains a complete path.
29916        tool_specified="$JAR"
29917        tool_basename="${tool_specified##*/}"
29918        if test "x$tool_basename" = "x$tool_specified"; then
29919          # A command without a complete path is provided, search $PATH.
29920          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JAR=$tool_basename" >&5
29921$as_echo "$as_me: Will search for user supplied tool JAR=$tool_basename" >&6;}
29922          # Extract the first word of "$tool_basename", so it can be a program name with args.
29923set dummy $tool_basename; ac_word=$2
29924{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
29925$as_echo_n "checking for $ac_word... " >&6; }
29926if ${ac_cv_path_JAR+:} false; then :
29927  $as_echo_n "(cached) " >&6
29928else
29929  case $JAR in
29930  [\\/]* | ?:[\\/]*)
29931  ac_cv_path_JAR="$JAR" # Let the user override the test with a path.
29932  ;;
29933  *)
29934  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
29935for as_dir in $PATH
29936do
29937  IFS=$as_save_IFS
29938  test -z "$as_dir" && as_dir=.
29939    for ac_exec_ext in '' $ac_executable_extensions; do
29940  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
29941    ac_cv_path_JAR="$as_dir/$ac_word$ac_exec_ext"
29942    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
29943    break 2
29944  fi
29945done
29946  done
29947IFS=$as_save_IFS
29948
29949  ;;
29950esac
29951fi
29952JAR=$ac_cv_path_JAR
29953if test -n "$JAR"; then
29954  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JAR" >&5
29955$as_echo "$JAR" >&6; }
29956else
29957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
29958$as_echo "no" >&6; }
29959fi
29960
29961
29962          if test "x$JAR" = x; then
29963            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
29964          fi
29965        else
29966          # Otherwise we believe it is a complete path. Use it as it is.
29967          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JAR=$tool_specified" >&5
29968$as_echo "$as_me: Will use user supplied tool JAR=$tool_specified" >&6;}
29969          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JAR" >&5
29970$as_echo_n "checking for JAR... " >&6; }
29971          if test ! -x "$tool_specified"; then
29972            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29973$as_echo "not found" >&6; }
29974            as_fn_error $? "User supplied tool JAR=$tool_specified does not exist or is not executable" "$LINENO" 5
29975          fi
29976          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
29977$as_echo "$tool_specified" >&6; }
29978        fi
29979      fi
29980    fi
29981
29982  fi
29983
29984
29985
29986  # Use user overridden value if available, otherwise locate tool in the Boot JDK.
29987
29988  # Publish this variable in the help.
29989
29990
29991  if [ -z "${JARSIGNER+x}" ]; then
29992    # The variable is not set by user, try to locate tool using the code snippet
29993
29994      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
29995$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
29996      JARSIGNER=$BOOT_JDK/bin/jarsigner
29997      if test ! -x $JARSIGNER; then
29998        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
29999$as_echo "not found" >&6; }
30000        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30001$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30002        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30003      fi
30004      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30005$as_echo "ok" >&6; }
30006
30007
30008  else
30009    # The variable is set, but is it from the command line or the environment?
30010
30011    # Try to remove the string !JARSIGNER! from our list.
30012    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JARSIGNER!/}
30013    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
30014      # If it failed, the variable was not from the command line. Ignore it,
30015      # but warn the user (except for BASH, which is always set by the calling BASH).
30016      if test "xJARSIGNER" != xBASH; then
30017        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&5
30018$as_echo "$as_me: WARNING: Ignoring value of JARSIGNER from the environment. Use command line variables instead." >&2;}
30019      fi
30020      # Try to locate tool using the code snippet
30021
30022      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jarsigner in Boot JDK" >&5
30023$as_echo_n "checking for jarsigner in Boot JDK... " >&6; }
30024      JARSIGNER=$BOOT_JDK/bin/jarsigner
30025      if test ! -x $JARSIGNER; then
30026        { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30027$as_echo "not found" >&6; }
30028        { $as_echo "$as_me:${as_lineno-$LINENO}: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&5
30029$as_echo "$as_me: Your Boot JDK seems broken. This might be fixed by explicitely setting --with-boot-jdk" >&6;}
30030        as_fn_error $? "Could not find jarsigner in the Boot JDK" "$LINENO" 5
30031      fi
30032      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
30033$as_echo "ok" >&6; }
30034
30035
30036    else
30037      # If it succeeded, then it was overridden by the user. We will use it
30038      # for the tool.
30039
30040      # First remove it from the list of overridden variables, so we can test
30041      # for unknown variables in the end.
30042      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
30043
30044      # Check if we try to supply an empty value
30045      if test "x$JARSIGNER" = x; then
30046        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JARSIGNER= (no value)" >&5
30047$as_echo "$as_me: Setting user supplied tool JARSIGNER= (no value)" >&6;}
30048        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30049$as_echo_n "checking for JARSIGNER... " >&6; }
30050        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
30051$as_echo "disabled" >&6; }
30052      else
30053        # Check if the provided tool contains a complete path.
30054        tool_specified="$JARSIGNER"
30055        tool_basename="${tool_specified##*/}"
30056        if test "x$tool_basename" = "x$tool_specified"; then
30057          # A command without a complete path is provided, search $PATH.
30058          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JARSIGNER=$tool_basename" >&5
30059$as_echo "$as_me: Will search for user supplied tool JARSIGNER=$tool_basename" >&6;}
30060          # Extract the first word of "$tool_basename", so it can be a program name with args.
30061set dummy $tool_basename; ac_word=$2
30062{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
30063$as_echo_n "checking for $ac_word... " >&6; }
30064if ${ac_cv_path_JARSIGNER+:} false; then :
30065  $as_echo_n "(cached) " >&6
30066else
30067  case $JARSIGNER in
30068  [\\/]* | ?:[\\/]*)
30069  ac_cv_path_JARSIGNER="$JARSIGNER" # Let the user override the test with a path.
30070  ;;
30071  *)
30072  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
30073for as_dir in $PATH
30074do
30075  IFS=$as_save_IFS
30076  test -z "$as_dir" && as_dir=.
30077    for ac_exec_ext in '' $ac_executable_extensions; do
30078  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
30079    ac_cv_path_JARSIGNER="$as_dir/$ac_word$ac_exec_ext"
30080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
30081    break 2
30082  fi
30083done
30084  done
30085IFS=$as_save_IFS
30086
30087  ;;
30088esac
30089fi
30090JARSIGNER=$ac_cv_path_JARSIGNER
30091if test -n "$JARSIGNER"; then
30092  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JARSIGNER" >&5
30093$as_echo "$JARSIGNER" >&6; }
30094else
30095  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30096$as_echo "no" >&6; }
30097fi
30098
30099
30100          if test "x$JARSIGNER" = x; then
30101            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
30102          fi
30103        else
30104          # Otherwise we believe it is a complete path. Use it as it is.
30105          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JARSIGNER=$tool_specified" >&5
30106$as_echo "$as_me: Will use user supplied tool JARSIGNER=$tool_specified" >&6;}
30107          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JARSIGNER" >&5
30108$as_echo_n "checking for JARSIGNER... " >&6; }
30109          if test ! -x "$tool_specified"; then
30110            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
30111$as_echo "not found" >&6; }
30112            as_fn_error $? "User supplied tool JARSIGNER=$tool_specified does not exist or is not executable" "$LINENO" 5
30113          fi
30114          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
30115$as_echo "$tool_specified" >&6; }
30116        fi
30117      fi
30118    fi
30119
30120  fi
30121
30122
30123
30124  # Finally, set some other options...
30125
30126  # When compiling code to be executed by the Boot JDK, force jdk8 compatibility.
30127  BOOT_JDK_SOURCETARGET="-source 8 -target 8"
30128
30129
30130
30131  $ECHO "Check if jvm arg is ok: -Xpatch:foo=bar" >&5
30132  $ECHO "Command: $JAVA -Xpatch:foo=bar -version" >&5
30133  OUTPUT=`$JAVA -Xpatch:foo=bar -version 2>&1`
30134  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
30135  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
30136  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
30137    dummy="$dummy -Xpatch:foo=bar"
30138    JVM_ARG_OK=true
30139  else
30140    $ECHO "Arg failed:" >&5
30141    $ECHO "$OUTPUT" >&5
30142    JVM_ARG_OK=false
30143  fi
30144
30145  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK supports modules" >&5
30146$as_echo_n "checking if Boot JDK supports modules... " >&6; }
30147  if test "x$JVM_ARG_OK" = "xtrue"; then
30148    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30149$as_echo "yes" >&6; }
30150    BOOT_JDK_MODULAR="true"
30151  else
30152    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30153$as_echo "no" >&6; }
30154    BOOT_JDK_MODULAR="false"
30155  fi
30156
30157
30158
30159
30160  # Check if the boot jdk is 32 or 64 bit
30161  if "$JAVA" -d64 -version > /dev/null 2>&1; then
30162    BOOT_JDK_BITS="64"
30163  else
30164    BOOT_JDK_BITS="32"
30165  fi
30166  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if Boot JDK is 32 or 64 bits" >&5
30167$as_echo_n "checking if Boot JDK is 32 or 64 bits... " >&6; }
30168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BOOT_JDK_BITS" >&5
30169$as_echo "$BOOT_JDK_BITS" >&6; }
30170
30171
30172
30173
30174# Check whether --with-build-jdk was given.
30175if test "${with_build_jdk+set}" = set; then :
30176  withval=$with_build_jdk;
30177fi
30178
30179
30180  CREATE_BUILDJDK=false
30181  EXTERNAL_BUILDJDK=false
30182  BUILD_JDK_FOUND="no"
30183  if test "x$with_build_jdk" != "x"; then
30184
30185  if test "x$BUILD_JDK_FOUND" = xno; then
30186    # Execute the test
30187
30188       if test "x$with_build_jdk" != x; then
30189         BUILD_JDK=$with_build_jdk
30190         BUILD_JDK_FOUND=maybe
30191         { $as_echo "$as_me:${as_lineno-$LINENO}: Found potential Build JDK using configure arguments" >&5
30192$as_echo "$as_me: Found potential Build JDK using configure arguments" >&6;}
30193       fi
30194
30195    # If previous step claimed to have found a JDK, check it to see if it seems to be valid.
30196    if test "x$BUILD_JDK_FOUND" = xmaybe; then
30197      # Do we have a bin/java?
30198      if test ! -x "$BUILD_JDK/bin/java"; then
30199        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&5
30200$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/java; ignoring" >&6;}
30201        BUILD_JDK_FOUND=no
30202      elif test ! -x "$BUILD_JDK/bin/jlink"; then
30203        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&5
30204$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jlink; ignoring" >&6;}
30205        BUILD_JDK_FOUND=no
30206      elif test ! -x "$BUILD_JDK/bin/jmod"; then
30207        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&5
30208$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/jmod; ignoring" >&6;}
30209        BUILD_JDK_FOUND=no
30210      elif test ! -x "$BUILD_JDK/bin/javac"; then
30211        # Do we have a bin/javac?
30212        { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&5
30213$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK did not contain bin/javac; ignoring" >&6;}
30214        { $as_echo "$as_me:${as_lineno-$LINENO}: (This might be a JRE instead of an JDK)" >&5
30215$as_echo "$as_me: (This might be a JRE instead of an JDK)" >&6;}
30216        BUILD_JDK_FOUND=no
30217      else
30218        # Oh, this is looking good! We probably have found a proper JDK. Is it the correct version?
30219        BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | head -n 1`
30220
30221        # Extra M4 quote needed to protect [] in grep expression.
30222        FOUND_CORRECT_VERSION=`echo $BUILD_JDK_VERSION | $EGREP '\"9([\.+-].*)?\"'`
30223        if test "x$FOUND_CORRECT_VERSION" = x; then
30224          { $as_echo "$as_me:${as_lineno-$LINENO}: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&5
30225$as_echo "$as_me: Potential Build JDK found at $BUILD_JDK is incorrect JDK version ($BUILD_JDK_VERSION); ignoring" >&6;}
30226          { $as_echo "$as_me:${as_lineno-$LINENO}: (Your Build JDK must be version 9)" >&5
30227$as_echo "$as_me: (Your Build JDK must be version 9)" >&6;}
30228          BUILD_JDK_FOUND=no
30229        else
30230          # We're done!
30231          BUILD_JDK_FOUND=yes
30232
30233  # Only process if variable expands to non-empty
30234
30235  if test "x$BUILD_JDK" != x; then
30236    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30237
30238  # Input might be given as Windows format, start by converting to
30239  # unix format.
30240  path="$BUILD_JDK"
30241  new_path=`$CYGPATH -u "$path"`
30242
30243  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30244  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30245  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30246  # "foo.exe" is OK but "foo" is an error.
30247  #
30248  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30249  # It is also a way to make sure we got the proper file name for the real test later on.
30250  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30251  if test "x$test_shortpath" = x; then
30252    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30253$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30254    as_fn_error $? "Cannot locate the the path of BUILD_JDK" "$LINENO" 5
30255  fi
30256
30257  # Call helper function which possibly converts this using DOS-style short mode.
30258  # If so, the updated path is stored in $new_path.
30259
30260  input_path="$new_path"
30261  # Check if we need to convert this using DOS-style short mode. If the path
30262  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30263  # take no chances and rewrite it.
30264  # Note: m4 eats our [], so we need to use [ and ] instead.
30265  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30266  if test "x$has_forbidden_chars" != x; then
30267    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30268    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30269    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30270    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30271      # Going to short mode and back again did indeed matter. Since short mode is
30272      # case insensitive, let's make it lowercase to improve readability.
30273      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30274      # Now convert it back to Unix-style (cygpath)
30275      input_path=`$CYGPATH -u "$shortmode_path"`
30276      new_path="$input_path"
30277    fi
30278  fi
30279
30280  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30281  if test "x$test_cygdrive_prefix" = x; then
30282    # As a simple fix, exclude /usr/bin since it's not a real path.
30283    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30284      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30285      # a path prefixed by /cygdrive for fixpath to work.
30286      new_path="$CYGWIN_ROOT_PATH$input_path"
30287    fi
30288  fi
30289
30290
30291  if test "x$path" != "x$new_path"; then
30292    BUILD_JDK="$new_path"
30293    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30294$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30295  fi
30296
30297    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30298
30299  path="$BUILD_JDK"
30300  has_colon=`$ECHO $path | $GREP ^.:`
30301  new_path="$path"
30302  if test "x$has_colon" = x; then
30303    # Not in mixed or Windows style, start by that.
30304    new_path=`cmd //c echo $path`
30305  fi
30306
30307
30308  input_path="$new_path"
30309  # Check if we need to convert this using DOS-style short mode. If the path
30310  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30311  # take no chances and rewrite it.
30312  # Note: m4 eats our [], so we need to use [ and ] instead.
30313  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30314  if test "x$has_forbidden_chars" != x; then
30315    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30316    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30317  fi
30318
30319
30320  windows_path="$new_path"
30321  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30322    unix_path=`$CYGPATH -u "$windows_path"`
30323    new_path="$unix_path"
30324  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30325    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30326    new_path="$unix_path"
30327  fi
30328
30329  if test "x$path" != "x$new_path"; then
30330    BUILD_JDK="$new_path"
30331    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_JDK to \"$new_path\"" >&5
30332$as_echo "$as_me: Rewriting BUILD_JDK to \"$new_path\"" >&6;}
30333  fi
30334
30335  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30336  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30337
30338    else
30339      # We're on a unix platform. Hooray! :)
30340      path="$BUILD_JDK"
30341      has_space=`$ECHO "$path" | $GREP " "`
30342      if test "x$has_space" != x; then
30343        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&5
30344$as_echo "$as_me: The path of BUILD_JDK, which resolves as \"$path\", is invalid." >&6;}
30345        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30346      fi
30347
30348      # Use eval to expand a potential ~
30349      eval path="$path"
30350      if test ! -f "$path" && test ! -d "$path"; then
30351        as_fn_error $? "The path of BUILD_JDK, which resolves as \"$path\", is not found." "$LINENO" 5
30352      fi
30353
30354      if test -d "$path"; then
30355        BUILD_JDK="`cd "$path"; $THEPWDCMD -L`"
30356      else
30357        dir="`$DIRNAME "$path"`"
30358        base="`$BASENAME "$path"`"
30359        BUILD_JDK="`cd "$dir"; $THEPWDCMD -L`/$base"
30360      fi
30361    fi
30362  fi
30363
30364          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30365$as_echo_n "checking for Build JDK... " >&6; }
30366          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK" >&5
30367$as_echo "$BUILD_JDK" >&6; }
30368          { $as_echo "$as_me:${as_lineno-$LINENO}: checking Build JDK version" >&5
30369$as_echo_n "checking Build JDK version... " >&6; }
30370          BUILD_JDK_VERSION=`"$BUILD_JDK/bin/java" -version 2>&1 | $TR '\n\r' '  '`
30371          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_JDK_VERSION" >&5
30372$as_echo "$BUILD_JDK_VERSION" >&6; }
30373        fi # end check jdk version
30374      fi # end check java
30375    fi # end check build jdk found
30376  fi
30377
30378    EXTERNAL_BUILDJDK=true
30379  else
30380    if test "x$COMPILE_TYPE" = "xcross"; then
30381      BUILD_JDK="\$(BUILDJDK_OUTPUTDIR)/jdk"
30382      BUILD_JDK_FOUND=yes
30383      CREATE_BUILDJDK=true
30384      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30385$as_echo_n "checking for Build JDK... " >&6; }
30386      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will build it for the host platform" >&5
30387$as_echo "yes, will build it for the host platform" >&6; }
30388    else
30389      BUILD_JDK="\$(JDK_OUTPUTDIR)"
30390      BUILD_JDK_FOUND=yes
30391      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30392$as_echo_n "checking for Build JDK... " >&6; }
30393      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, will use output dir" >&5
30394$as_echo "yes, will use output dir" >&6; }
30395    fi
30396  fi
30397
30398  JMOD="$BUILD_JDK/bin/jmod"
30399  JLINK="$BUILD_JDK/bin/jlink"
30400
30401
30402
30403  if test "x$BUILD_JDK_FOUND" != "xyes"; then
30404    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Build JDK" >&5
30405$as_echo_n "checking for Build JDK... " >&6; }
30406    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30407$as_echo "no" >&6; }
30408    as_fn_error $? "Could not find a suitable Build JDK" "$LINENO" 5
30409  fi
30410
30411
30412
30413
30414
30415
30416###############################################################################
30417#
30418# Configure the sources to use. We can add or override individual directories.
30419#
30420###############################################################################
30421
30422
30423  # Where are the sources.
30424  LANGTOOLS_TOPDIR="$SRC_ROOT/langtools"
30425  CORBA_TOPDIR="$SRC_ROOT/corba"
30426  JAXP_TOPDIR="$SRC_ROOT/jaxp"
30427  JAXWS_TOPDIR="$SRC_ROOT/jaxws"
30428  HOTSPOT_TOPDIR="$SRC_ROOT/hotspot"
30429  NASHORN_TOPDIR="$SRC_ROOT/nashorn"
30430  JDK_TOPDIR="$SRC_ROOT/jdk"
30431
30432
30433
30434
30435
30436
30437
30438
30439
30440  # This feature is no longer supported.
30441
30442
30443
30444# Check whether --with-add-source-root was given.
30445if test "${with_add_source_root+set}" = set; then :
30446  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
30447$as_echo "$as_me: WARNING: Option --with-add-source-root is deprecated and will be ignored." >&2;}
30448fi
30449
30450
30451
30452
30453# Check whether --with-override-source-root was given.
30454if test "${with_override_source_root+set}" = set; then :
30455  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
30456$as_echo "$as_me: WARNING: Option --with-override-source-root is deprecated and will be ignored." >&2;}
30457fi
30458
30459
30460
30461
30462# Check whether --with-adds-and-overrides was given.
30463if test "${with_adds_and_overrides+set}" = set; then :
30464  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
30465$as_echo "$as_me: WARNING: Option --with-adds-and-overrides is deprecated and will be ignored." >&2;}
30466fi
30467
30468
30469
30470
30471# Check whether --with-override-langtools was given.
30472if test "${with_override_langtools+set}" = set; then :
30473  withval=$with_override_langtools; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&5
30474$as_echo "$as_me: WARNING: Option --with-override-langtools is deprecated and will be ignored." >&2;}
30475fi
30476
30477
30478
30479
30480# Check whether --with-override-corba was given.
30481if test "${with_override_corba+set}" = set; then :
30482  withval=$with_override_corba; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-corba is deprecated and will be ignored." >&5
30483$as_echo "$as_me: WARNING: Option --with-override-corba is deprecated and will be ignored." >&2;}
30484fi
30485
30486
30487
30488
30489# Check whether --with-override-jaxp was given.
30490if test "${with_override_jaxp+set}" = set; then :
30491  withval=$with_override_jaxp; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&5
30492$as_echo "$as_me: WARNING: Option --with-override-jaxp is deprecated and will be ignored." >&2;}
30493fi
30494
30495
30496
30497
30498# Check whether --with-override-jaxws was given.
30499if test "${with_override_jaxws+set}" = set; then :
30500  withval=$with_override_jaxws; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&5
30501$as_echo "$as_me: WARNING: Option --with-override-jaxws is deprecated and will be ignored." >&2;}
30502fi
30503
30504
30505
30506
30507# Check whether --with-override-hotspot was given.
30508if test "${with_override_hotspot+set}" = set; then :
30509  withval=$with_override_hotspot; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&5
30510$as_echo "$as_me: WARNING: Option --with-override-hotspot is deprecated and will be ignored." >&2;}
30511fi
30512
30513
30514
30515
30516# Check whether --with-override-nashorn was given.
30517if test "${with_override_nashorn+set}" = set; then :
30518  withval=$with_override_nashorn; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&5
30519$as_echo "$as_me: WARNING: Option --with-override-nashorn is deprecated and will be ignored." >&2;}
30520fi
30521
30522
30523
30524
30525# Check whether --with-override-jdk was given.
30526if test "${with_override_jdk+set}" = set; then :
30527  withval=$with_override_jdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&5
30528$as_echo "$as_me: WARNING: Option --with-override-jdk is deprecated and will be ignored." >&2;}
30529fi
30530
30531
30532
30533
30534  BUILD_OUTPUT="$OUTPUT_ROOT"
30535
30536
30537  HOTSPOT_DIST="$OUTPUT_ROOT/hotspot/dist"
30538  BUILD_HOTSPOT=true
30539
30540
30541
30542# Check whether --with-import-hotspot was given.
30543if test "${with_import_hotspot+set}" = set; then :
30544  withval=$with_import_hotspot;
30545fi
30546
30547  if test "x$with_import_hotspot" != x; then
30548    CURDIR="$PWD"
30549    cd "$with_import_hotspot"
30550    HOTSPOT_DIST="`pwd`"
30551    cd "$CURDIR"
30552    if ! (test -d $HOTSPOT_DIST/lib && test -d $HOTSPOT_DIST/jre/lib); then
30553      as_fn_error $? "You have to import hotspot from a full jdk image or hotspot build dist dir!" "$LINENO" 5
30554    fi
30555    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if hotspot should be imported" >&5
30556$as_echo_n "checking if hotspot should be imported... " >&6; }
30557    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes from $HOTSPOT_DIST" >&5
30558$as_echo "yes from $HOTSPOT_DIST" >&6; }
30559    BUILD_HOTSPOT=false
30560  fi
30561
30562  JDK_OUTPUTDIR="$OUTPUT_ROOT/jdk"
30563
30564
30565
30566
30567# Check whether --with-import-modules was given.
30568if test "${with_import_modules+set}" = set; then :
30569  withval=$with_import_modules;
30570fi
30571
30572
30573  if test "x$with_import_modules" != x \
30574      && test "x$with_import_modules" != "xno"; then
30575    if test -d "$with_import_modules"; then
30576      IMPORT_MODULES_TOPDIR="$with_import_modules"
30577
30578  # Only process if variable expands to non-empty
30579
30580  if test "x$IMPORT_MODULES_TOPDIR" != x; then
30581    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30582
30583  # Input might be given as Windows format, start by converting to
30584  # unix format.
30585  path="$IMPORT_MODULES_TOPDIR"
30586  new_path=`$CYGPATH -u "$path"`
30587
30588  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
30589  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
30590  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
30591  # "foo.exe" is OK but "foo" is an error.
30592  #
30593  # This test is therefore slightly more accurate than "test -f" to check for file precense.
30594  # It is also a way to make sure we got the proper file name for the real test later on.
30595  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
30596  if test "x$test_shortpath" = x; then
30597    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30598$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30599    as_fn_error $? "Cannot locate the the path of IMPORT_MODULES_TOPDIR" "$LINENO" 5
30600  fi
30601
30602  # Call helper function which possibly converts this using DOS-style short mode.
30603  # If so, the updated path is stored in $new_path.
30604
30605  input_path="$new_path"
30606  # Check if we need to convert this using DOS-style short mode. If the path
30607  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30608  # take no chances and rewrite it.
30609  # Note: m4 eats our [], so we need to use [ and ] instead.
30610  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
30611  if test "x$has_forbidden_chars" != x; then
30612    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30613    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
30614    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
30615    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
30616      # Going to short mode and back again did indeed matter. Since short mode is
30617      # case insensitive, let's make it lowercase to improve readability.
30618      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30619      # Now convert it back to Unix-style (cygpath)
30620      input_path=`$CYGPATH -u "$shortmode_path"`
30621      new_path="$input_path"
30622    fi
30623  fi
30624
30625  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
30626  if test "x$test_cygdrive_prefix" = x; then
30627    # As a simple fix, exclude /usr/bin since it's not a real path.
30628    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
30629      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
30630      # a path prefixed by /cygdrive for fixpath to work.
30631      new_path="$CYGWIN_ROOT_PATH$input_path"
30632    fi
30633  fi
30634
30635
30636  if test "x$path" != "x$new_path"; then
30637    IMPORT_MODULES_TOPDIR="$new_path"
30638    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30639$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30640  fi
30641
30642    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30643
30644  path="$IMPORT_MODULES_TOPDIR"
30645  has_colon=`$ECHO $path | $GREP ^.:`
30646  new_path="$path"
30647  if test "x$has_colon" = x; then
30648    # Not in mixed or Windows style, start by that.
30649    new_path=`cmd //c echo $path`
30650  fi
30651
30652
30653  input_path="$new_path"
30654  # Check if we need to convert this using DOS-style short mode. If the path
30655  # contains just simple characters, use it. Otherwise (spaces, weird characters),
30656  # take no chances and rewrite it.
30657  # Note: m4 eats our [], so we need to use [ and ] instead.
30658  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
30659  if test "x$has_forbidden_chars" != x; then
30660    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
30661    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
30662  fi
30663
30664
30665  windows_path="$new_path"
30666  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
30667    unix_path=`$CYGPATH -u "$windows_path"`
30668    new_path="$unix_path"
30669  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
30670    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
30671    new_path="$unix_path"
30672  fi
30673
30674  if test "x$path" != "x$new_path"; then
30675    IMPORT_MODULES_TOPDIR="$new_path"
30676    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&5
30677$as_echo "$as_me: Rewriting IMPORT_MODULES_TOPDIR to \"$new_path\"" >&6;}
30678  fi
30679
30680  # Save the first 10 bytes of this path to the storage, so fixpath can work.
30681  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
30682
30683    else
30684      # We're on a unix platform. Hooray! :)
30685      path="$IMPORT_MODULES_TOPDIR"
30686      has_space=`$ECHO "$path" | $GREP " "`
30687      if test "x$has_space" != x; then
30688        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&5
30689$as_echo "$as_me: The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is invalid." >&6;}
30690        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
30691      fi
30692
30693      # Use eval to expand a potential ~
30694      eval path="$path"
30695      if test ! -f "$path" && test ! -d "$path"; then
30696        as_fn_error $? "The path of IMPORT_MODULES_TOPDIR, which resolves as \"$path\", is not found." "$LINENO" 5
30697      fi
30698
30699      if test -d "$path"; then
30700        IMPORT_MODULES_TOPDIR="`cd "$path"; $THEPWDCMD -L`"
30701      else
30702        dir="`$DIRNAME "$path"`"
30703        base="`$BASENAME "$path"`"
30704        IMPORT_MODULES_TOPDIR="`cd "$dir"; $THEPWDCMD -L`/$base"
30705      fi
30706    fi
30707  fi
30708
30709    elif test -e "$with_import_modules"; then
30710      IMPORT_MODULES_TOPDIR="$CONFIGURESUPPORT_OUTPUTDIR/import-modules"
30711      $RM -rf "$IMPORT_MODULES_TOPDIR"
30712      $MKDIR -p "$IMPORT_MODULES_TOPDIR"
30713      if ! $UNZIP -q "$with_import_modules" -d "$IMPORT_MODULES_TOPDIR"; then
30714        as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30715      fi
30716    else
30717      as_fn_error $? "--with-import-modules=\"$with_import_modules\" must point to a dir or a zip file" "$LINENO" 5
30718    fi
30719  fi
30720
30721  if test -d "$IMPORT_MODULES_TOPDIR/modules"; then
30722    IMPORT_MODULES_CLASSES="$IMPORT_MODULES_TOPDIR/modules"
30723  fi
30724  if test -d "$IMPORT_MODULES_TOPDIR/modules_cmds"; then
30725    IMPORT_MODULES_CMDS="$IMPORT_MODULES_TOPDIR/modules_cmds"
30726  fi
30727  if test -d "$IMPORT_MODULES_TOPDIR/modules_libs"; then
30728    IMPORT_MODULES_LIBS="$IMPORT_MODULES_TOPDIR/modules_libs"
30729  fi
30730  if test -d "$IMPORT_MODULES_TOPDIR/modules_conf"; then
30731    IMPORT_MODULES_CONF="$IMPORT_MODULES_TOPDIR/modules_conf"
30732  fi
30733  if test -d "$IMPORT_MODULES_TOPDIR/modules_src"; then
30734    IMPORT_MODULES_SRC="$IMPORT_MODULES_TOPDIR/modules_src"
30735  fi
30736  if test -d "$IMPORT_MODULES_TOPDIR/make"; then
30737    IMPORT_MODULES_MAKE="$IMPORT_MODULES_TOPDIR/make"
30738  fi
30739
30740
30741
30742
30743
30744
30745
30746
30747
30748###############################################################################
30749#
30750# Setup the toolchain (compilers etc), i.e. tools used to compile and process
30751# native code.
30752#
30753###############################################################################
30754
30755# See if we are doing a complete static build or not
30756
30757  # Check whether --enable-static-build was given.
30758if test "${enable_static_build+set}" = set; then :
30759  enableval=$enable_static_build;
30760fi
30761
30762  STATIC_BUILD=false
30763  if test "x$enable_static_build" = "xyes"; then
30764    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30765$as_echo_n "checking if static build is enabled... " >&6; }
30766    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
30767$as_echo "yes" >&6; }
30768    if test "x$OPENJDK_TARGET_OS" != "xmacosx"; then
30769      as_fn_error $? "--enable-static-build is only supported for macosx builds" "$LINENO" 5
30770    fi
30771    STATIC_BUILD_CFLAGS="-DSTATIC_BUILD=1"
30772    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $STATIC_BUILD_CFLAGS"
30773    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $STATIC_BUILD_CFLAGS"
30774    CFLAGS_JDKLIB_EXTRA="$CFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30775    CXXFLAGS_JDKLIB_EXTRA="$CXXFLAGS_JDKLIB_EXTRA $STATIC_BUILD_CFLAGS"
30776    STATIC_BUILD=true
30777  elif test "x$enable_static_build" = "xno"; then
30778    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static build is enabled" >&5
30779$as_echo_n "checking if static build is enabled... " >&6; }
30780    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
30781$as_echo "no" >&6; }
30782  elif test "x$enable_static_build" != "x"; then
30783    as_fn_error $? "--enable-static-build can only be assigned \"yes\" or \"no\"" "$LINENO" 5
30784  fi
30785
30786
30787
30788
30789# First determine the toolchain type (compiler family)
30790
30791
30792# Check whether --with-toolchain-type was given.
30793if test "${with_toolchain_type+set}" = set; then :
30794  withval=$with_toolchain_type;
30795fi
30796
30797
30798  # Use indirect variable referencing
30799  toolchain_var_name=VALID_TOOLCHAINS_$OPENJDK_BUILD_OS
30800  VALID_TOOLCHAINS=${!toolchain_var_name}
30801
30802  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30803    if test -n "$XCODEBUILD"; then
30804      # On Mac OS X, default toolchain to clang after Xcode 5
30805      XCODE_VERSION_OUTPUT=`"$XCODEBUILD" -version 2>&1 | $HEAD -n 1`
30806      $ECHO "$XCODE_VERSION_OUTPUT" | $GREP "Xcode " > /dev/null
30807      if test $? -ne 0; then
30808        as_fn_error $? "Failed to determine Xcode version." "$LINENO" 5
30809      fi
30810      XCODE_MAJOR_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | \
30811          $SED -e 's/^Xcode \([1-9][0-9.]*\)/\1/' | \
30812          $CUT -f 1 -d .`
30813      { $as_echo "$as_me:${as_lineno-$LINENO}: Xcode major version: $XCODE_MAJOR_VERSION" >&5
30814$as_echo "$as_me: Xcode major version: $XCODE_MAJOR_VERSION" >&6;}
30815      if test $XCODE_MAJOR_VERSION -ge 5; then
30816          DEFAULT_TOOLCHAIN="clang"
30817      else
30818          DEFAULT_TOOLCHAIN="gcc"
30819      fi
30820    else
30821      # If Xcode is not installed, but the command line tools are
30822      # then we can't run xcodebuild. On these systems we should
30823      # default to clang
30824      DEFAULT_TOOLCHAIN="clang"
30825    fi
30826  else
30827    # First toolchain type in the list is the default
30828    DEFAULT_TOOLCHAIN=${VALID_TOOLCHAINS%% *}
30829  fi
30830
30831  if test "x$with_toolchain_type" = xlist; then
30832    # List all toolchains
30833    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchains are valid on this platform:" >&5
30834$as_echo "$as_me: The following toolchains are valid on this platform:" >&6;}
30835    for toolchain in $VALID_TOOLCHAINS; do
30836      toolchain_var_name=TOOLCHAIN_DESCRIPTION_$toolchain
30837      TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30838      $PRINTF "  %-10s  %s\n" $toolchain "$TOOLCHAIN_DESCRIPTION"
30839    done
30840
30841    exit 0
30842  elif test "x$with_toolchain_type" != x; then
30843    # User override; check that it is valid
30844    if test "x${VALID_TOOLCHAINS/$with_toolchain_type/}" = "x${VALID_TOOLCHAINS}"; then
30845      { $as_echo "$as_me:${as_lineno-$LINENO}: Toolchain type $with_toolchain_type is not valid on this platform." >&5
30846$as_echo "$as_me: Toolchain type $with_toolchain_type is not valid on this platform." >&6;}
30847      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid toolchains: $VALID_TOOLCHAINS." >&5
30848$as_echo "$as_me: Valid toolchains: $VALID_TOOLCHAINS." >&6;}
30849      as_fn_error $? "Cannot continue." "$LINENO" 5
30850    fi
30851    TOOLCHAIN_TYPE=$with_toolchain_type
30852  else
30853    # No flag given, use default
30854    TOOLCHAIN_TYPE=$DEFAULT_TOOLCHAIN
30855  fi
30856
30857
30858  TOOLCHAIN_CC_BINARY_clang="clang"
30859  TOOLCHAIN_CC_BINARY_gcc="gcc"
30860  TOOLCHAIN_CC_BINARY_microsoft="cl"
30861  TOOLCHAIN_CC_BINARY_solstudio="cc"
30862  TOOLCHAIN_CC_BINARY_xlc="xlc_r"
30863
30864  TOOLCHAIN_CXX_BINARY_clang="clang++"
30865  TOOLCHAIN_CXX_BINARY_gcc="g++"
30866  TOOLCHAIN_CXX_BINARY_microsoft="cl"
30867  TOOLCHAIN_CXX_BINARY_solstudio="CC"
30868  TOOLCHAIN_CXX_BINARY_xlc="xlC_r"
30869
30870  # Use indirect variable referencing
30871  toolchain_var_name=TOOLCHAIN_DESCRIPTION_$TOOLCHAIN_TYPE
30872  TOOLCHAIN_DESCRIPTION=${!toolchain_var_name}
30873  toolchain_var_name=TOOLCHAIN_MINIMUM_VERSION_$TOOLCHAIN_TYPE
30874  TOOLCHAIN_MINIMUM_VERSION=${!toolchain_var_name}
30875  toolchain_var_name=TOOLCHAIN_CC_BINARY_$TOOLCHAIN_TYPE
30876  TOOLCHAIN_CC_BINARY=${!toolchain_var_name}
30877  toolchain_var_name=TOOLCHAIN_CXX_BINARY_$TOOLCHAIN_TYPE
30878  TOOLCHAIN_CXX_BINARY=${!toolchain_var_name}
30879
30880
30881  # Define filename patterns
30882  if test "x$OPENJDK_TARGET_OS" = xwindows; then
30883    LIBRARY_PREFIX=
30884    SHARED_LIBRARY_SUFFIX='.dll'
30885    STATIC_LIBRARY_SUFFIX='.lib'
30886    SHARED_LIBRARY='$1.dll'
30887    STATIC_LIBRARY='$1.lib'
30888    OBJ_SUFFIX='.obj'
30889    EXE_SUFFIX='.exe'
30890  else
30891    LIBRARY_PREFIX=lib
30892    SHARED_LIBRARY_SUFFIX='.so'
30893    STATIC_LIBRARY_SUFFIX='.a'
30894    SHARED_LIBRARY='lib$1.so'
30895    STATIC_LIBRARY='lib$1.a'
30896    OBJ_SUFFIX='.o'
30897    EXE_SUFFIX=''
30898    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
30899      # For full static builds, we're overloading the SHARED_LIBRARY
30900      # variables in order to limit the amount of changes required.
30901      # It would be better to remove SHARED and just use LIBRARY and
30902      # LIBRARY_SUFFIX for libraries that can be built either
30903      # shared or static and use STATIC_* for libraries that are
30904      # always built statically.
30905      if test "x$STATIC_BUILD" = xtrue; then
30906        SHARED_LIBRARY='lib$1.a'
30907        SHARED_LIBRARY_SUFFIX='.a'
30908      else
30909        SHARED_LIBRARY='lib$1.dylib'
30910        SHARED_LIBRARY_SUFFIX='.dylib'
30911      fi
30912    fi
30913  fi
30914
30915
30916
30917
30918
30919
30920
30921
30922
30923
30924  if test "x$TOOLCHAIN_TYPE" = "x$DEFAULT_TOOLCHAIN"; then
30925    { $as_echo "$as_me:${as_lineno-$LINENO}: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&5
30926$as_echo "$as_me: Using default toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION)" >&6;}
30927  else
30928    { $as_echo "$as_me:${as_lineno-$LINENO}: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&5
30929$as_echo "$as_me: Using user selected toolchain $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION). Default toolchain is $DEFAULT_TOOLCHAIN." >&6;}
30930  fi
30931
30932
30933# User supplied flags should be used when configure detects compilers
30934
30935  if test "x$CFLAGS" != "x${ADDED_CFLAGS}"; then
30936    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&5
30937$as_echo "$as_me: WARNING: Ignoring CFLAGS($CFLAGS) found in environment. Use --with-extra-cflags" >&2;}
30938  fi
30939
30940  if test "x$CXXFLAGS" != "x${ADDED_CXXFLAGS}"; then
30941    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&5
30942$as_echo "$as_me: WARNING: Ignoring CXXFLAGS($CXXFLAGS) found in environment. Use --with-extra-cxxflags" >&2;}
30943  fi
30944
30945  if test "x$LDFLAGS" != "x${ADDED_LDFLAGS}"; then
30946    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&5
30947$as_echo "$as_me: WARNING: Ignoring LDFLAGS($LDFLAGS) found in environment. Use --with-extra-ldflags" >&2;}
30948  fi
30949
30950
30951# Check whether --with-extra-cflags was given.
30952if test "${with_extra_cflags+set}" = set; then :
30953  withval=$with_extra_cflags;
30954fi
30955
30956
30957
30958# Check whether --with-extra-cxxflags was given.
30959if test "${with_extra_cxxflags+set}" = set; then :
30960  withval=$with_extra_cxxflags;
30961fi
30962
30963
30964
30965# Check whether --with-extra-ldflags was given.
30966if test "${with_extra_ldflags+set}" = set; then :
30967  withval=$with_extra_ldflags;
30968fi
30969
30970
30971  EXTRA_CFLAGS="$with_extra_cflags"
30972  EXTRA_CXXFLAGS="$with_extra_cxxflags"
30973  EXTRA_LDFLAGS="$with_extra_ldflags"
30974
30975  # Hotspot needs these set in their legacy form
30976  LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $EXTRA_CFLAGS"
30977  LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $EXTRA_CXXFLAGS"
30978  LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $EXTRA_LDFLAGS"
30979
30980
30981
30982
30983
30984
30985
30986
30987
30988  # The global CFLAGS and LDLAGS variables are used by configure tests and
30989  # should include the extra parameters
30990  CFLAGS="$EXTRA_CFLAGS"
30991  CXXFLAGS="$EXTRA_CXXFLAGS"
30992  LDFLAGS="$EXTRA_LDFLAGS"
30993  CPPFLAGS=""
30994
30995# The sysroot cflags are needed for configure to be able to run the compilers
30996
30997  if test "x$SYSROOT" != "x"; then
30998    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
30999      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
31000        # Solaris Studio does not have a concept of sysroot. Instead we must
31001        # make sure the default include and lib dirs are appended to each
31002        # compile and link command line. Must also add -I-xbuiltin to enable
31003        # inlining of system functions and intrinsics.
31004        SYSROOT_CFLAGS="-I-xbuiltin -I$SYSROOT/usr/include"
31005        SYSROOT_LDFLAGS="-L$SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
31006            -L$SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
31007            -L$SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
31008      fi
31009    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
31010      SYSROOT_CFLAGS="--sysroot=$SYSROOT"
31011      SYSROOT_LDFLAGS="--sysroot=$SYSROOT"
31012    elif test "x$TOOLCHAIN_TYPE" = xclang; then
31013      SYSROOT_CFLAGS="-isysroot $SYSROOT"
31014      SYSROOT_LDFLAGS="-isysroot $SYSROOT"
31015    fi
31016    # Propagate the sysroot args to hotspot
31017    LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $SYSROOT_CFLAGS"
31018    LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $SYSROOT_CFLAGS"
31019    LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $SYSROOT_LDFLAGS"
31020    # The global CFLAGS and LDFLAGS variables need these for configure to function
31021    CFLAGS="$CFLAGS $SYSROOT_CFLAGS"
31022    CPPFLAGS="$CPPFLAGS $SYSROOT_CFLAGS"
31023    CXXFLAGS="$CXXFLAGS $SYSROOT_CFLAGS"
31024    LDFLAGS="$LDFLAGS $SYSROOT_LDFLAGS"
31025  fi
31026
31027  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
31028    # We also need -iframework<path>/System/Library/Frameworks
31029    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31030    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -iframework $SYSROOT/System/Library/Frameworks"
31031    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
31032    # set this here so it doesn't have to be peppered throughout the forest
31033    SYSROOT_CFLAGS="$SYSROOT_CFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31034    SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -F $SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
31035  fi
31036
31037
31038
31039
31040
31041# Then detect the actual binaries needed
31042
31043  # FIXME: Is this needed?
31044  ac_ext=cpp
31045ac_cpp='$CXXCPP $CPPFLAGS'
31046ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
31047ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
31048ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
31049
31050
31051  # Store the CFLAGS etc passed to the configure script.
31052  ORG_CFLAGS="$CFLAGS"
31053  ORG_CXXFLAGS="$CXXFLAGS"
31054
31055  # autoconf magic only relies on PATH, so update it if tools dir is specified
31056  OLD_PATH="$PATH"
31057
31058  # On Windows, we need to detect the visual studio installation first.
31059  # This will change the PATH, but we need to keep that new PATH even
31060  # after toolchain detection is done, since the compiler (on x86) uses
31061  # it for DLL resolution in runtime.
31062  if test "x$OPENJDK_BUILD_OS" = "xwindows" \
31063      && test "x$TOOLCHAIN_TYPE" = "xmicrosoft"; then
31064
31065  # Store path to cygwin link.exe to help excluding it when searching for
31066  # VS linker. This must be done before changing the PATH when looking for VS.
31067  # Extract the first word of "link", so it can be a program name with args.
31068set dummy link; ac_word=$2
31069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
31070$as_echo_n "checking for $ac_word... " >&6; }
31071if ${ac_cv_path_CYGWIN_LINK+:} false; then :
31072  $as_echo_n "(cached) " >&6
31073else
31074  case $CYGWIN_LINK in
31075  [\\/]* | ?:[\\/]*)
31076  ac_cv_path_CYGWIN_LINK="$CYGWIN_LINK" # Let the user override the test with a path.
31077  ;;
31078  *)
31079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
31080for as_dir in $PATH
31081do
31082  IFS=$as_save_IFS
31083  test -z "$as_dir" && as_dir=.
31084    for ac_exec_ext in '' $ac_executable_extensions; do
31085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
31086    ac_cv_path_CYGWIN_LINK="$as_dir/$ac_word$ac_exec_ext"
31087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
31088    break 2
31089  fi
31090done
31091  done
31092IFS=$as_save_IFS
31093
31094  ;;
31095esac
31096fi
31097CYGWIN_LINK=$ac_cv_path_CYGWIN_LINK
31098if test -n "$CYGWIN_LINK"; then
31099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_LINK" >&5
31100$as_echo "$CYGWIN_LINK" >&6; }
31101else
31102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31103$as_echo "no" >&6; }
31104fi
31105
31106
31107  if test "x$CYGWIN_LINK" != x; then
31108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the first found link.exe is actually the Cygwin link tool" >&5
31109$as_echo_n "checking if the first found link.exe is actually the Cygwin link tool... " >&6; }
31110    "$CYGWIN_LINK" --version > /dev/null
31111    if test $? -eq 0 ; then
31112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
31113$as_echo "yes" >&6; }
31114    else
31115      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
31116$as_echo "no" >&6; }
31117      # This might be the VS linker. Don't exclude it later on.
31118      CYGWIN_LINK=""
31119    fi
31120  fi
31121
31122  # First-hand choice is to locate and run the vsvars bat file.
31123
31124
31125# Check whether --with-toolchain-version was given.
31126if test "${with_toolchain_version+set}" = set; then :
31127  withval=$with_toolchain_version;
31128fi
31129
31130
31131  if test "x$with_toolchain_version" = xlist; then
31132    # List all toolchains
31133    { $as_echo "$as_me:${as_lineno-$LINENO}: The following toolchain versions are valid on this platform:" >&5
31134$as_echo "$as_me: The following toolchain versions are valid on this platform:" >&6;}
31135    for version in $VALID_VS_VERSIONS; do
31136      eval VS_DESCRIPTION=\${VS_DESCRIPTION_$version}
31137      $PRINTF "  %-10s  %s\n" $version "$VS_DESCRIPTION"
31138    done
31139
31140    exit 0
31141  elif test "x$DEVKIT_VS_VERSION" != x; then
31142    VS_VERSION=$DEVKIT_VS_VERSION
31143    TOOLCHAIN_VERSION=$VS_VERSION
31144    eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31145    eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31146    eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31147    eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31148    eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31149    VS_PATH="$TOOLCHAIN_PATH:$PATH"
31150
31151    # Convert DEVKIT_VS_INCLUDE into windows style VS_INCLUDE so that it
31152    # can still be exported as INCLUDE for compiler invocations without
31153    # SYSROOT_CFLAGS
31154    OLDIFS="$IFS"
31155    IFS=";"
31156    for i in $DEVKIT_VS_INCLUDE; do
31157      ipath=$i
31158
31159  unix_path="$ipath"
31160  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31161    windows_path=`$CYGPATH -m "$unix_path"`
31162    ipath="$windows_path"
31163  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31164    windows_path=`cmd //c echo $unix_path`
31165    ipath="$windows_path"
31166  fi
31167
31168      VS_INCLUDE="$VS_INCLUDE;$ipath"
31169    done
31170    # Convert DEVKIT_VS_LIB into VS_LIB so that it can still be exported
31171    # as LIB for compiler invocations without SYSROOT_LDFLAGS
31172    for i in $DEVKIT_VS_LIB; do
31173      libpath=$i
31174
31175  unix_path="$libpath"
31176  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31177    windows_path=`$CYGPATH -m "$unix_path"`
31178    libpath="$windows_path"
31179  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31180    windows_path=`cmd //c echo $unix_path`
31181    libpath="$windows_path"
31182  fi
31183
31184      VS_LIB="$VS_LIB;$libpath"
31185    done
31186    IFS="$OLDIFS"
31187
31188    { $as_echo "$as_me:${as_lineno-$LINENO}: Found devkit $VS_DESCRIPTION" >&5
31189$as_echo "$as_me: Found devkit $VS_DESCRIPTION" >&6;}
31190
31191  elif test "x$with_toolchain_version" != x; then
31192    # User override; check that it is valid
31193    if test "x${VALID_VS_VERSIONS/$with_toolchain_version/}" = "x${VALID_VS_VERSIONS}"; then
31194      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio version $with_toolchain_version is not valid." >&5
31195$as_echo "$as_me: Visual Studio version $with_toolchain_version is not valid." >&6;}
31196      { $as_echo "$as_me:${as_lineno-$LINENO}: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&5
31197$as_echo "$as_me: Valid Visual Studio versions: $VALID_VS_VERSIONS." >&6;}
31198      as_fn_error $? "Cannot continue." "$LINENO" 5
31199    fi
31200    VS_VERSIONS_PROBE_LIST="$with_toolchain_version"
31201  else
31202    # No flag given, use default
31203    VS_VERSIONS_PROBE_LIST="$VALID_VS_VERSIONS"
31204  fi
31205
31206  for VS_VERSION in $VS_VERSIONS_PROBE_LIST; do
31207
31208  VS_VERSION="$VS_VERSION"
31209  eval VS_COMNTOOLS_VAR="\${VS_ENVVAR_${VS_VERSION}}"
31210  eval VS_COMNTOOLS="\$${VS_COMNTOOLS_VAR}"
31211  eval VS_INSTALL_DIR="\${VS_VS_INSTALLDIR_${VS_VERSION}}"
31212  eval SDK_INSTALL_DIR="\${VS_SDK_INSTALLDIR_${VS_VERSION}}"
31213
31214  # When using --with-tools-dir, assume it points to the correct and default
31215  # version of Visual Studio or that --with-toolchain-version was also set.
31216  if test "x$with_tools_dir" != x; then
31217
31218  if test "x$VS_ENV_CMD" = x; then
31219    VS_VERSION="${VS_VERSION}"
31220    VS_BASE="$with_tools_dir/../.."
31221    METHOD="--with-tools-dir"
31222
31223    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31224      VCVARSFILE="vc/bin/vcvars32.bat"
31225    else
31226      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31227    fi
31228
31229
31230  windows_path="$VS_BASE"
31231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31232    unix_path=`$CYGPATH -u "$windows_path"`
31233    VS_BASE="$unix_path"
31234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31236    VS_BASE="$unix_path"
31237  fi
31238
31239    if test -d "$VS_BASE"; then
31240      if test -f "$VS_BASE/$VCVARSFILE"; then
31241        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31242$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31243        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31244        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31245        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31246        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31247      else
31248        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31249$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31250        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31251$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31252      fi
31253    fi
31254  fi
31255
31256
31257  if test "x$VS_ENV_CMD" = x; then
31258    VS_VERSION="${VS_VERSION}"
31259    VS_BASE="$with_tools_dir/../../.."
31260    METHOD="--with-tools-dir"
31261
31262    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31263      VCVARSFILE="vc/bin/vcvars32.bat"
31264    else
31265      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31266    fi
31267
31268
31269  windows_path="$VS_BASE"
31270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31271    unix_path=`$CYGPATH -u "$windows_path"`
31272    VS_BASE="$unix_path"
31273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31275    VS_BASE="$unix_path"
31276  fi
31277
31278    if test -d "$VS_BASE"; then
31279      if test -f "$VS_BASE/$VCVARSFILE"; then
31280        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31281$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31282        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31283        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31284        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31285        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31286      else
31287        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31288$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31289        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31290$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31291      fi
31292    fi
31293  fi
31294
31295    if test "x$VS_ENV_CMD" = x; then
31296      # Having specified an argument which is incorrect will produce an instant failure;
31297      # we should not go on looking
31298      { $as_echo "$as_me:${as_lineno-$LINENO}: The path given by --with-tools-dir does not contain a valid" >&5
31299$as_echo "$as_me: The path given by --with-tools-dir does not contain a valid" >&6;}
31300      { $as_echo "$as_me:${as_lineno-$LINENO}: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&5
31301$as_echo "$as_me: Visual Studio installation. Please point to the VC/bin or VC/bin/amd64" >&6;}
31302      { $as_echo "$as_me:${as_lineno-$LINENO}: directory within the Visual Studio installation" >&5
31303$as_echo "$as_me: directory within the Visual Studio installation" >&6;}
31304      as_fn_error $? "Cannot locate a valid Visual Studio installation" "$LINENO" 5
31305    fi
31306  fi
31307
31308  VS_ENV_CMD=""
31309  VS_ENV_ARGS=""
31310
31311  if test "x$VS_COMNTOOLS" != x; then
31312
31313  if test "x$VS_ENV_CMD" = x; then
31314    VS_VERSION="${VS_VERSION}"
31315    VS_BASE="$VS_COMNTOOLS/../.."
31316    METHOD="$VS_COMNTOOLS_VAR variable"
31317
31318    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31319      VCVARSFILE="vc/bin/vcvars32.bat"
31320    else
31321      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31322    fi
31323
31324
31325  windows_path="$VS_BASE"
31326  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31327    unix_path=`$CYGPATH -u "$windows_path"`
31328    VS_BASE="$unix_path"
31329  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31330    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31331    VS_BASE="$unix_path"
31332  fi
31333
31334    if test -d "$VS_BASE"; then
31335      if test -f "$VS_BASE/$VCVARSFILE"; then
31336        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31337$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31338        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31339        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31340        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31341        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31342      else
31343        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31344$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31345        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31346$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31347      fi
31348    fi
31349  fi
31350
31351  fi
31352  if test "x$PROGRAMFILES" != x; then
31353
31354  if test "x$VS_ENV_CMD" = x; then
31355    VS_VERSION="${VS_VERSION}"
31356    VS_BASE="$PROGRAMFILES/$VS_INSTALL_DIR"
31357    METHOD="well-known name"
31358
31359    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31360      VCVARSFILE="vc/bin/vcvars32.bat"
31361    else
31362      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31363    fi
31364
31365
31366  windows_path="$VS_BASE"
31367  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31368    unix_path=`$CYGPATH -u "$windows_path"`
31369    VS_BASE="$unix_path"
31370  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31371    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31372    VS_BASE="$unix_path"
31373  fi
31374
31375    if test -d "$VS_BASE"; then
31376      if test -f "$VS_BASE/$VCVARSFILE"; then
31377        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31378$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31379        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31380        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31381        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31382        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31383      else
31384        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31385$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31386        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31387$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31388      fi
31389    fi
31390  fi
31391
31392  fi
31393  # Work around the insanely named ProgramFiles(x86) env variable
31394  PROGRAMFILES_X86="`env | $SED -n 's/^ProgramFiles(x86)=//p'`"
31395  if test "x$PROGRAMFILES_X86" != x; then
31396
31397  if test "x$VS_ENV_CMD" = x; then
31398    VS_VERSION="${VS_VERSION}"
31399    VS_BASE="$PROGRAMFILES_X86/$VS_INSTALL_DIR"
31400    METHOD="well-known name"
31401
31402    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31403      VCVARSFILE="vc/bin/vcvars32.bat"
31404    else
31405      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31406    fi
31407
31408
31409  windows_path="$VS_BASE"
31410  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31411    unix_path=`$CYGPATH -u "$windows_path"`
31412    VS_BASE="$unix_path"
31413  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31414    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31415    VS_BASE="$unix_path"
31416  fi
31417
31418    if test -d "$VS_BASE"; then
31419      if test -f "$VS_BASE/$VCVARSFILE"; then
31420        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31421$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31422        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31423        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31424        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31425        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31426      else
31427        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31428$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31429        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31430$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31431      fi
31432    fi
31433  fi
31434
31435  fi
31436
31437  if test "x$VS_ENV_CMD" = x; then
31438    VS_VERSION="${VS_VERSION}"
31439    VS_BASE="C:/Program Files/$VS_INSTALL_DIR"
31440    METHOD="well-known name"
31441
31442    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31443      VCVARSFILE="vc/bin/vcvars32.bat"
31444    else
31445      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31446    fi
31447
31448
31449  windows_path="$VS_BASE"
31450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31451    unix_path=`$CYGPATH -u "$windows_path"`
31452    VS_BASE="$unix_path"
31453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31455    VS_BASE="$unix_path"
31456  fi
31457
31458    if test -d "$VS_BASE"; then
31459      if test -f "$VS_BASE/$VCVARSFILE"; then
31460        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31461$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31462        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31463        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31464        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31465        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31466      else
31467        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31468$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31469        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31470$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31471      fi
31472    fi
31473  fi
31474
31475
31476  if test "x$VS_ENV_CMD" = x; then
31477    VS_VERSION="${VS_VERSION}"
31478    VS_BASE="C:/Program Files (x86)/$VS_INSTALL_DIR"
31479    METHOD="well-known name"
31480
31481    if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31482      VCVARSFILE="vc/bin/vcvars32.bat"
31483    else
31484      VCVARSFILE="vc/bin/amd64/vcvars64.bat"
31485    fi
31486
31487
31488  windows_path="$VS_BASE"
31489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31490    unix_path=`$CYGPATH -u "$windows_path"`
31491    VS_BASE="$unix_path"
31492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31494    VS_BASE="$unix_path"
31495  fi
31496
31497    if test -d "$VS_BASE"; then
31498      if test -f "$VS_BASE/$VCVARSFILE"; then
31499        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31500$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31501        VS_ENV_CMD="$VS_BASE/$VCVARSFILE"
31502        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31503        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be one of 'v100', 'v110' or 'v120' for VS 2010, 2012 or VS2013
31504        eval PLATFORM_TOOLSET="\${VS_VS_PLATFORM_NAME_${VS_VERSION}}"
31505      else
31506        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Visual Studio installation at $VS_BASE using $METHOD" >&5
31507$as_echo "$as_me: Found Visual Studio installation at $VS_BASE using $METHOD" >&6;}
31508        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&5
31509$as_echo "$as_me: Warning: $VCVARSFILE is missing, this is probably Visual Studio Express. Ignoring" >&6;}
31510      fi
31511    fi
31512  fi
31513
31514
31515  if test "x$SDK_INSTALL_DIR" != x; then
31516    if test "x$ProgramW6432" != x; then
31517
31518  if test "x$VS_ENV_CMD" = x; then
31519    VS_VERSION="${VS_VERSION}"
31520    WIN_SDK_BASE="$ProgramW6432/$SDK_INSTALL_DIR"
31521    METHOD="well-known name"
31522
31523  windows_path="$WIN_SDK_BASE"
31524  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31525    unix_path=`$CYGPATH -u "$windows_path"`
31526    WIN_SDK_BASE="$unix_path"
31527  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31528    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31529    WIN_SDK_BASE="$unix_path"
31530  fi
31531
31532    if test -d "$WIN_SDK_BASE"; then
31533      # There have been cases of partial or broken SDK installations. A missing
31534      # lib dir is not going to work.
31535      if test ! -d "$WIN_SDK_BASE/lib"; then
31536        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31537$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31538        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31539$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31540      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31541        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31542$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31543        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31544        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31545          VS_ENV_ARGS="/x86"
31546        else
31547          VS_ENV_ARGS="/x64"
31548        fi
31549        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31550        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31551        # TODO: improve detection for other versions of SDK
31552        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31553      else
31554        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31555$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31556        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31557$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31558      fi
31559    fi
31560  fi
31561
31562    fi
31563    if test "x$PROGRAMW6432" != x; then
31564
31565  if test "x$VS_ENV_CMD" = x; then
31566    VS_VERSION="${VS_VERSION}"
31567    WIN_SDK_BASE="$PROGRAMW6432/$SDK_INSTALL_DIR"
31568    METHOD="well-known name"
31569
31570  windows_path="$WIN_SDK_BASE"
31571  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31572    unix_path=`$CYGPATH -u "$windows_path"`
31573    WIN_SDK_BASE="$unix_path"
31574  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31575    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31576    WIN_SDK_BASE="$unix_path"
31577  fi
31578
31579    if test -d "$WIN_SDK_BASE"; then
31580      # There have been cases of partial or broken SDK installations. A missing
31581      # lib dir is not going to work.
31582      if test ! -d "$WIN_SDK_BASE/lib"; then
31583        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31584$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31585        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31586$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31587      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31588        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31589$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31590        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31591        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31592          VS_ENV_ARGS="/x86"
31593        else
31594          VS_ENV_ARGS="/x64"
31595        fi
31596        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31597        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31598        # TODO: improve detection for other versions of SDK
31599        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31600      else
31601        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31602$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31603        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31604$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31605      fi
31606    fi
31607  fi
31608
31609    fi
31610    if test "x$PROGRAMFILES" != x; then
31611
31612  if test "x$VS_ENV_CMD" = x; then
31613    VS_VERSION="${VS_VERSION}"
31614    WIN_SDK_BASE="$PROGRAMFILES/$SDK_INSTALL_DIR"
31615    METHOD="well-known name"
31616
31617  windows_path="$WIN_SDK_BASE"
31618  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31619    unix_path=`$CYGPATH -u "$windows_path"`
31620    WIN_SDK_BASE="$unix_path"
31621  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31622    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31623    WIN_SDK_BASE="$unix_path"
31624  fi
31625
31626    if test -d "$WIN_SDK_BASE"; then
31627      # There have been cases of partial or broken SDK installations. A missing
31628      # lib dir is not going to work.
31629      if test ! -d "$WIN_SDK_BASE/lib"; then
31630        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31631$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31632        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31633$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31634      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31635        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31636$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31637        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31638        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31639          VS_ENV_ARGS="/x86"
31640        else
31641          VS_ENV_ARGS="/x64"
31642        fi
31643        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31644        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31645        # TODO: improve detection for other versions of SDK
31646        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31647      else
31648        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31649$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31650        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31651$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31652      fi
31653    fi
31654  fi
31655
31656    fi
31657
31658  if test "x$VS_ENV_CMD" = x; then
31659    VS_VERSION="${VS_VERSION}"
31660    WIN_SDK_BASE="C:/Program Files/$SDK_INSTALL_DIR"
31661    METHOD="well-known name"
31662
31663  windows_path="$WIN_SDK_BASE"
31664  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31665    unix_path=`$CYGPATH -u "$windows_path"`
31666    WIN_SDK_BASE="$unix_path"
31667  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31668    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31669    WIN_SDK_BASE="$unix_path"
31670  fi
31671
31672    if test -d "$WIN_SDK_BASE"; then
31673      # There have been cases of partial or broken SDK installations. A missing
31674      # lib dir is not going to work.
31675      if test ! -d "$WIN_SDK_BASE/lib"; then
31676        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31677$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31678        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31679$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31680      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31681        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31682$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31683        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31684        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31685          VS_ENV_ARGS="/x86"
31686        else
31687          VS_ENV_ARGS="/x64"
31688        fi
31689        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31690        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31691        # TODO: improve detection for other versions of SDK
31692        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31693      else
31694        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31695$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31696        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31697$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31698      fi
31699    fi
31700  fi
31701
31702
31703  if test "x$VS_ENV_CMD" = x; then
31704    VS_VERSION="${VS_VERSION}"
31705    WIN_SDK_BASE="C:/Program Files (x86)/$SDK_INSTALL_DIR"
31706    METHOD="well-known name"
31707
31708  windows_path="$WIN_SDK_BASE"
31709  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31710    unix_path=`$CYGPATH -u "$windows_path"`
31711    WIN_SDK_BASE="$unix_path"
31712  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31713    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31714    WIN_SDK_BASE="$unix_path"
31715  fi
31716
31717    if test -d "$WIN_SDK_BASE"; then
31718      # There have been cases of partial or broken SDK installations. A missing
31719      # lib dir is not going to work.
31720      if test ! -d "$WIN_SDK_BASE/lib"; then
31721        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31722$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31723        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, lib dir is missing. Ignoring" >&5
31724$as_echo "$as_me: Warning: Installation is broken, lib dir is missing. Ignoring" >&6;}
31725      elif test -f "$WIN_SDK_BASE/Bin/SetEnv.Cmd"; then
31726        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31727$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31728        VS_ENV_CMD="$WIN_SDK_BASE/Bin/SetEnv.Cmd"
31729        if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
31730          VS_ENV_ARGS="/x86"
31731        else
31732          VS_ENV_ARGS="/x64"
31733        fi
31734        # PLATFORM_TOOLSET is used during the compilation of the freetype sources (see
31735        # 'LIB_BUILD_FREETYPE' in libraries.m4) and must be 'Windows7.1SDK' for Windows7.1SDK
31736        # TODO: improve detection for other versions of SDK
31737        eval PLATFORM_TOOLSET="\${VS_SDK_PLATFORM_NAME_${VS_VERSION}}"
31738      else
31739        { $as_echo "$as_me:${as_lineno-$LINENO}: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&5
31740$as_echo "$as_me: Found Windows SDK installation at $WIN_SDK_BASE using $METHOD" >&6;}
31741        { $as_echo "$as_me:${as_lineno-$LINENO}: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&5
31742$as_echo "$as_me: Warning: Installation is broken, SetEnv.Cmd is missing. Ignoring" >&6;}
31743      fi
31744    fi
31745  fi
31746
31747  fi
31748
31749    if test "x$VS_ENV_CMD" != x; then
31750      TOOLCHAIN_VERSION=$VS_VERSION
31751      eval VS_DESCRIPTION="\${VS_DESCRIPTION_${VS_VERSION}}"
31752      eval VS_VERSION_INTERNAL="\${VS_VERSION_INTERNAL_${VS_VERSION}}"
31753      eval MSVCR_NAME="\${VS_MSVCR_${VS_VERSION}}"
31754      eval MSVCP_NAME="\${VS_MSVCP_${VS_VERSION}}"
31755      # The rest of the variables are already evaled while probing
31756      { $as_echo "$as_me:${as_lineno-$LINENO}: Found $VS_DESCRIPTION" >&5
31757$as_echo "$as_me: Found $VS_DESCRIPTION" >&6;}
31758      break
31759    fi
31760  done
31761
31762
31763  # If we have a devkit, skip all of the below.
31764  if test "x$DEVKIT_VS_VERSION" = x; then
31765    if test "x$VS_ENV_CMD" != x; then
31766      # We have found a Visual Studio environment on disk, let's extract variables from the vsvars bat file.
31767
31768  # Only process if variable expands to non-empty
31769
31770  if test "x$VS_ENV_CMD" != x; then
31771    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31772
31773  # First separate the path from the arguments. This will split at the first
31774  # space.
31775  complete="$VS_ENV_CMD"
31776  path="${complete%% *}"
31777  tmp="$complete EOL"
31778  arguments="${tmp#* }"
31779
31780  # Input might be given as Windows format, start by converting to
31781  # unix format.
31782  new_path=`$CYGPATH -u "$path"`
31783
31784  # Now try to locate executable using which
31785  new_path=`$WHICH "$new_path" 2> /dev/null`
31786  # bat and cmd files are not always considered executable in cygwin causing which
31787  # to not find them
31788  if test "x$new_path" = x \
31789      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31790      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31791    new_path=`$CYGPATH -u "$path"`
31792  fi
31793  if test "x$new_path" = x; then
31794    # Oops. Which didn't find the executable.
31795    # The splitting of arguments from the executable at a space might have been incorrect,
31796    # since paths with space are more likely in Windows. Give it another try with the whole
31797    # argument.
31798    path="$complete"
31799    arguments="EOL"
31800    new_path=`$CYGPATH -u "$path"`
31801    new_path=`$WHICH "$new_path" 2> /dev/null`
31802    # bat and cmd files are not always considered executable in cygwin causing which
31803    # to not find them
31804    if test "x$new_path" = x \
31805        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31806        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31807      new_path=`$CYGPATH -u "$path"`
31808    fi
31809    if test "x$new_path" = x; then
31810      # It's still not found. Now this is an unrecoverable error.
31811      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31812$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31813      has_space=`$ECHO "$complete" | $GREP " "`
31814      if test "x$has_space" != x; then
31815        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31816$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31817      fi
31818      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31819    fi
31820  fi
31821
31822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
31823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
31824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
31825  # "foo.exe" is OK but "foo" is an error.
31826  #
31827  # This test is therefore slightly more accurate than "test -f" to check for file presence.
31828  # It is also a way to make sure we got the proper file name for the real test later on.
31829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
31830  if test "x$test_shortpath" = x; then
31831    # Short path failed, file does not exist as specified.
31832    # Try adding .exe or .cmd
31833    if test -f "${new_path}.exe"; then
31834      input_to_shortpath="${new_path}.exe"
31835    elif test -f "${new_path}.cmd"; then
31836      input_to_shortpath="${new_path}.cmd"
31837    else
31838      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&5
31839$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$new_path\", is invalid." >&6;}
31840      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
31841$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
31842      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31843    fi
31844  else
31845    input_to_shortpath="$new_path"
31846  fi
31847
31848  # Call helper function which possibly converts this using DOS-style short mode.
31849  # If so, the updated path is stored in $new_path.
31850  new_path="$input_to_shortpath"
31851
31852  input_path="$input_to_shortpath"
31853  # Check if we need to convert this using DOS-style short mode. If the path
31854  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31855  # take no chances and rewrite it.
31856  # Note: m4 eats our [], so we need to use [ and ] instead.
31857  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
31858  if test "x$has_forbidden_chars" != x; then
31859    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31860    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
31861    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
31862    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
31863      # Going to short mode and back again did indeed matter. Since short mode is
31864      # case insensitive, let's make it lowercase to improve readability.
31865      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31866      # Now convert it back to Unix-style (cygpath)
31867      input_path=`$CYGPATH -u "$shortmode_path"`
31868      new_path="$input_path"
31869    fi
31870  fi
31871
31872  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
31873  if test "x$test_cygdrive_prefix" = x; then
31874    # As a simple fix, exclude /usr/bin since it's not a real path.
31875    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
31876      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
31877      # a path prefixed by /cygdrive for fixpath to work.
31878      new_path="$CYGWIN_ROOT_PATH$input_path"
31879    fi
31880  fi
31881
31882  # remove trailing .exe if any
31883  new_path="${new_path/%.exe/}"
31884
31885    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31886
31887  # First separate the path from the arguments. This will split at the first
31888  # space.
31889  complete="$VS_ENV_CMD"
31890  path="${complete%% *}"
31891  tmp="$complete EOL"
31892  arguments="${tmp#* }"
31893
31894  # Input might be given as Windows format, start by converting to
31895  # unix format.
31896  new_path="$path"
31897
31898  windows_path="$new_path"
31899  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31900    unix_path=`$CYGPATH -u "$windows_path"`
31901    new_path="$unix_path"
31902  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31903    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31904    new_path="$unix_path"
31905  fi
31906
31907
31908  # Now try to locate executable using which
31909  new_path=`$WHICH "$new_path" 2> /dev/null`
31910
31911  if test "x$new_path" = x; then
31912    # Oops. Which didn't find the executable.
31913    # The splitting of arguments from the executable at a space might have been incorrect,
31914    # since paths with space are more likely in Windows. Give it another try with the whole
31915    # argument.
31916    path="$complete"
31917    arguments="EOL"
31918    new_path="$path"
31919
31920  windows_path="$new_path"
31921  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31922    unix_path=`$CYGPATH -u "$windows_path"`
31923    new_path="$unix_path"
31924  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31925    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31926    new_path="$unix_path"
31927  fi
31928
31929
31930    new_path=`$WHICH "$new_path" 2> /dev/null`
31931    # bat and cmd files are not always considered executable in MSYS causing which
31932    # to not find them
31933    if test "x$new_path" = x \
31934        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
31935        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
31936      new_path="$path"
31937
31938  windows_path="$new_path"
31939  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31940    unix_path=`$CYGPATH -u "$windows_path"`
31941    new_path="$unix_path"
31942  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31943    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31944    new_path="$unix_path"
31945  fi
31946
31947    fi
31948
31949    if test "x$new_path" = x; then
31950      # It's still not found. Now this is an unrecoverable error.
31951      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
31952$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
31953      has_space=`$ECHO "$complete" | $GREP " "`
31954      if test "x$has_space" != x; then
31955        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
31956$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
31957      fi
31958      as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
31959    fi
31960  fi
31961
31962  # Now new_path has a complete unix path to the binary
31963  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
31964    # Keep paths in /bin as-is, but remove trailing .exe if any
31965    new_path="${new_path/%.exe/}"
31966    # Do not save /bin paths to all_fixpath_prefixes!
31967  else
31968    # Not in mixed or Windows style, start by that.
31969    new_path=`cmd //c echo $new_path`
31970
31971  input_path="$new_path"
31972  # Check if we need to convert this using DOS-style short mode. If the path
31973  # contains just simple characters, use it. Otherwise (spaces, weird characters),
31974  # take no chances and rewrite it.
31975  # Note: m4 eats our [], so we need to use [ and ] instead.
31976  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
31977  if test "x$has_forbidden_chars" != x; then
31978    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
31979    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
31980  fi
31981
31982    # Output is in $new_path
31983
31984  windows_path="$new_path"
31985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
31986    unix_path=`$CYGPATH -u "$windows_path"`
31987    new_path="$unix_path"
31988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
31989    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
31990    new_path="$unix_path"
31991  fi
31992
31993    # remove trailing .exe if any
31994    new_path="${new_path/%.exe/}"
31995
31996    # Save the first 10 bytes of this path to the storage, so fixpath can work.
31997    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
31998  fi
31999
32000    else
32001      # We're on a unix platform. Hooray! :)
32002      # First separate the path from the arguments. This will split at the first
32003      # space.
32004      complete="$VS_ENV_CMD"
32005      path="${complete%% *}"
32006      tmp="$complete EOL"
32007      arguments="${tmp#* }"
32008
32009      # Cannot rely on the command "which" here since it doesn't always work.
32010      is_absolute_path=`$ECHO "$path" | $GREP ^/`
32011      if test -z "$is_absolute_path"; then
32012        # Path to executable is not absolute. Find it.
32013        IFS_save="$IFS"
32014        IFS=:
32015        for p in $PATH; do
32016          if test -f "$p/$path" && test -x "$p/$path"; then
32017            new_path="$p/$path"
32018            break
32019          fi
32020        done
32021        IFS="$IFS_save"
32022      else
32023        # This is an absolute path, we can use it without further modifications.
32024        new_path="$path"
32025      fi
32026
32027      if test "x$new_path" = x; then
32028        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&5
32029$as_echo "$as_me: The path of VS_ENV_CMD, which resolves as \"$complete\", is not found." >&6;}
32030        has_space=`$ECHO "$complete" | $GREP " "`
32031        if test "x$has_space" != x; then
32032          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
32033$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
32034        fi
32035        as_fn_error $? "Cannot locate the the path of VS_ENV_CMD" "$LINENO" 5
32036      fi
32037    fi
32038
32039    # Now join together the path and the arguments once again
32040    if test "x$arguments" != xEOL; then
32041      new_complete="$new_path ${arguments% *}"
32042    else
32043      new_complete="$new_path"
32044    fi
32045
32046    if test "x$complete" != "x$new_complete"; then
32047      VS_ENV_CMD="$new_complete"
32048      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting VS_ENV_CMD to \"$new_complete\"" >&5
32049$as_echo "$as_me: Rewriting VS_ENV_CMD to \"$new_complete\"" >&6;}
32050    fi
32051  fi
32052
32053
32054      # Lets extract the variables that are set by vcvarsall.bat/vsvars32.bat/vsvars64.bat
32055      { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to extract Visual Studio environment variables" >&5
32056$as_echo "$as_me: Trying to extract Visual Studio environment variables" >&6;}
32057
32058      # We need to create a couple of temporary files.
32059      VS_ENV_TMP_DIR="$CONFIGURESUPPORT_OUTPUTDIR/vs-env"
32060      $MKDIR -p $VS_ENV_TMP_DIR
32061
32062      # Cannot use the VS10 setup script directly (since it only updates the DOS subshell environment).
32063      # Instead create a shell script which will set the relevant variables when run.
32064      WINPATH_VS_ENV_CMD="$VS_ENV_CMD"
32065
32066  unix_path="$WINPATH_VS_ENV_CMD"
32067  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32068    windows_path=`$CYGPATH -m "$unix_path"`
32069    WINPATH_VS_ENV_CMD="$windows_path"
32070  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32071    windows_path=`cmd //c echo $unix_path`
32072    WINPATH_VS_ENV_CMD="$windows_path"
32073  fi
32074
32075      WINPATH_BASH="$BASH"
32076
32077  unix_path="$WINPATH_BASH"
32078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32079    windows_path=`$CYGPATH -m "$unix_path"`
32080    WINPATH_BASH="$windows_path"
32081  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32082    windows_path=`cmd //c echo $unix_path`
32083    WINPATH_BASH="$windows_path"
32084  fi
32085
32086
32087      # Generate a DOS batch file which runs $VS_ENV_CMD, and then creates a shell
32088      # script (executable by bash) that will setup the important variables.
32089      EXTRACT_VC_ENV_BAT_FILE="$VS_ENV_TMP_DIR/extract-vs-env.bat"
32090      $ECHO "@echo off" >  $EXTRACT_VC_ENV_BAT_FILE
32091      # This will end up something like:
32092      # call C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat
32093      $ECHO "call $WINPATH_VS_ENV_CMD $VS_ENV_ARGS" >> $EXTRACT_VC_ENV_BAT_FILE
32094      # These will end up something like:
32095      # C:/CygWin/bin/bash -c 'echo VS_PATH=\"$PATH\" > localdevenv.sh
32096      # The trailing space for everyone except PATH is no typo, but is needed due
32097      # to trailing \ in the Windows paths. These will be stripped later.
32098      $ECHO "$WINPATH_BASH -c 'echo VS_PATH="'\"$PATH\" > set-vs-env.sh' \
32099          >> $EXTRACT_VC_ENV_BAT_FILE
32100      $ECHO "$WINPATH_BASH -c 'echo VS_INCLUDE="'\"$INCLUDE\;$include \" >> set-vs-env.sh' \
32101          >> $EXTRACT_VC_ENV_BAT_FILE
32102      $ECHO "$WINPATH_BASH -c 'echo VS_LIB="'\"$LIB\;$lib \" >> set-vs-env.sh' \
32103          >> $EXTRACT_VC_ENV_BAT_FILE
32104      $ECHO "$WINPATH_BASH -c 'echo VCINSTALLDIR="'\"$VCINSTALLDIR \" >> set-vs-env.sh' \
32105          >> $EXTRACT_VC_ENV_BAT_FILE
32106      $ECHO "$WINPATH_BASH -c 'echo WindowsSdkDir="'\"$WindowsSdkDir \" >> set-vs-env.sh' \
32107          >> $EXTRACT_VC_ENV_BAT_FILE
32108      $ECHO "$WINPATH_BASH -c 'echo WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> set-vs-env.sh' \
32109          >> $EXTRACT_VC_ENV_BAT_FILE
32110
32111      # Now execute the newly created bat file.
32112      # The | cat is to stop SetEnv.Cmd to mess with system colors on msys.
32113      # Change directory so we don't need to mess with Windows paths in redirects.
32114      cd $VS_ENV_TMP_DIR
32115      cmd /c extract-vs-env.bat | $CAT
32116      cd $CURDIR
32117
32118      if test ! -s $VS_ENV_TMP_DIR/set-vs-env.sh; then
32119        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not succesfully extract the envionment variables needed for the VS setup." >&5
32120$as_echo "$as_me: Could not succesfully extract the envionment variables needed for the VS setup." >&6;}
32121        { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32122$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32123        { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32124$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32125        as_fn_error $? "Cannot continue" "$LINENO" 5
32126      fi
32127
32128      # Now set all paths and other env variables. This will allow the rest of
32129      # the configure script to find and run the compiler in the proper way.
32130      { $as_echo "$as_me:${as_lineno-$LINENO}: Setting extracted environment variables" >&5
32131$as_echo "$as_me: Setting extracted environment variables" >&6;}
32132      . $VS_ENV_TMP_DIR/set-vs-env.sh
32133      # Now we have VS_PATH, VS_INCLUDE, VS_LIB. For further checking, we
32134      # also define VCINSTALLDIR, WindowsSdkDir and WINDOWSSDKDIR.
32135    else
32136      # We did not find a vsvars bat file, let's hope we are run from a VS command prompt.
32137      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio installation, checking current environment" >&5
32138$as_echo "$as_me: Cannot locate a valid Visual Studio installation, checking current environment" >&6;}
32139    fi
32140  fi
32141
32142  # At this point, we should have correct variables in the environment, or we can't continue.
32143  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for Visual Studio variables" >&5
32144$as_echo_n "checking for Visual Studio variables... " >&6; }
32145
32146  if test "x$VCINSTALLDIR" != x || test "x$WindowsSDKDir" != x \
32147      || test "x$WINDOWSSDKDIR" != x || test "x$DEVKIT_NAME" != x; then
32148    if test "x$VS_INCLUDE" = x || test "x$VS_LIB" = x; then
32149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: present but broken" >&5
32150$as_echo "present but broken" >&6; }
32151      as_fn_error $? "Your VC command prompt seems broken, INCLUDE and/or LIB is missing." "$LINENO" 5
32152    else
32153      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
32154$as_echo "ok" >&6; }
32155      # Remove any trailing "\" ";" and " " from the variables.
32156      VS_INCLUDE=`$ECHO "$VS_INCLUDE" | $SED -e 's/\\\\*;* *$//'`
32157      VS_LIB=`$ECHO "$VS_LIB" | $SED 's/\\\\*;* *$//'`
32158      VCINSTALLDIR=`$ECHO "$VCINSTALLDIR" | $SED 's/\\\\* *$//'`
32159      WindowsSDKDir=`$ECHO "$WindowsSDKDir" | $SED 's/\\\\* *$//'`
32160      WINDOWSSDKDIR=`$ECHO "$WINDOWSSDKDIR" | $SED 's/\\\\* *$//'`
32161      # Remove any paths containing # (typically F#) as that messes up make. This
32162      # is needed if visual studio was installed with F# support.
32163      VS_PATH=`$ECHO "$VS_PATH" | $SED 's/[^:#]*#[^:]*://g'`
32164
32165
32166
32167
32168
32169      # Convert VS_INCLUDE into SYSROOT_CFLAGS
32170      OLDIFS="$IFS"
32171      IFS=";"
32172      for i in $VS_INCLUDE; do
32173        ipath=$i
32174        # Only process non-empty elements
32175        if test "x$ipath" != x; then
32176          IFS="$OLDIFS"
32177          # Check that directory exists before calling fixup_path
32178          testpath=$ipath
32179
32180  windows_path="$testpath"
32181  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32182    unix_path=`$CYGPATH -u "$windows_path"`
32183    testpath="$unix_path"
32184  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32185    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32186    testpath="$unix_path"
32187  fi
32188
32189          if test -d "$testpath"; then
32190
32191  # Only process if variable expands to non-empty
32192
32193  if test "x$ipath" != x; then
32194    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32195
32196  # Input might be given as Windows format, start by converting to
32197  # unix format.
32198  path="$ipath"
32199  new_path=`$CYGPATH -u "$path"`
32200
32201  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32202  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32203  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32204  # "foo.exe" is OK but "foo" is an error.
32205  #
32206  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32207  # It is also a way to make sure we got the proper file name for the real test later on.
32208  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32209  if test "x$test_shortpath" = x; then
32210    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32211$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32212    as_fn_error $? "Cannot locate the the path of ipath" "$LINENO" 5
32213  fi
32214
32215  # Call helper function which possibly converts this using DOS-style short mode.
32216  # If so, the updated path is stored in $new_path.
32217
32218  input_path="$new_path"
32219  # Check if we need to convert this using DOS-style short mode. If the path
32220  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32221  # take no chances and rewrite it.
32222  # Note: m4 eats our [], so we need to use [ and ] instead.
32223  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32224  if test "x$has_forbidden_chars" != x; then
32225    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32226    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32227    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32228    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32229      # Going to short mode and back again did indeed matter. Since short mode is
32230      # case insensitive, let's make it lowercase to improve readability.
32231      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32232      # Now convert it back to Unix-style (cygpath)
32233      input_path=`$CYGPATH -u "$shortmode_path"`
32234      new_path="$input_path"
32235    fi
32236  fi
32237
32238  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32239  if test "x$test_cygdrive_prefix" = x; then
32240    # As a simple fix, exclude /usr/bin since it's not a real path.
32241    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32242      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32243      # a path prefixed by /cygdrive for fixpath to work.
32244      new_path="$CYGWIN_ROOT_PATH$input_path"
32245    fi
32246  fi
32247
32248
32249  if test "x$path" != "x$new_path"; then
32250    ipath="$new_path"
32251    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32252$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32253  fi
32254
32255    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32256
32257  path="$ipath"
32258  has_colon=`$ECHO $path | $GREP ^.:`
32259  new_path="$path"
32260  if test "x$has_colon" = x; then
32261    # Not in mixed or Windows style, start by that.
32262    new_path=`cmd //c echo $path`
32263  fi
32264
32265
32266  input_path="$new_path"
32267  # Check if we need to convert this using DOS-style short mode. If the path
32268  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32269  # take no chances and rewrite it.
32270  # Note: m4 eats our [], so we need to use [ and ] instead.
32271  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32272  if test "x$has_forbidden_chars" != x; then
32273    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32274    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32275  fi
32276
32277
32278  windows_path="$new_path"
32279  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32280    unix_path=`$CYGPATH -u "$windows_path"`
32281    new_path="$unix_path"
32282  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32283    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32284    new_path="$unix_path"
32285  fi
32286
32287  if test "x$path" != "x$new_path"; then
32288    ipath="$new_path"
32289    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting ipath to \"$new_path\"" >&5
32290$as_echo "$as_me: Rewriting ipath to \"$new_path\"" >&6;}
32291  fi
32292
32293  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32294  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32295
32296    else
32297      # We're on a unix platform. Hooray! :)
32298      path="$ipath"
32299      has_space=`$ECHO "$path" | $GREP " "`
32300      if test "x$has_space" != x; then
32301        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of ipath, which resolves as \"$path\", is invalid." >&5
32302$as_echo "$as_me: The path of ipath, which resolves as \"$path\", is invalid." >&6;}
32303        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32304      fi
32305
32306      # Use eval to expand a potential ~
32307      eval path="$path"
32308      if test ! -f "$path" && test ! -d "$path"; then
32309        as_fn_error $? "The path of ipath, which resolves as \"$path\", is not found." "$LINENO" 5
32310      fi
32311
32312      if test -d "$path"; then
32313        ipath="`cd "$path"; $THEPWDCMD -L`"
32314      else
32315        dir="`$DIRNAME "$path"`"
32316        base="`$BASENAME "$path"`"
32317        ipath="`cd "$dir"; $THEPWDCMD -L`/$base"
32318      fi
32319    fi
32320  fi
32321
32322            SYSROOT_CFLAGS="$SYSROOT_CFLAGS -I$ipath"
32323          fi
32324          IFS=";"
32325        fi
32326      done
32327      # Convert VS_LIB into SYSROOT_LDFLAGS
32328      for i in $VS_LIB; do
32329        libpath=$i
32330        # Only process non-empty elements
32331        if test "x$libpath" != x; then
32332          IFS="$OLDIFS"
32333          # Check that directory exists before calling fixup_path
32334          testpath=$libpath
32335
32336  windows_path="$testpath"
32337  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32338    unix_path=`$CYGPATH -u "$windows_path"`
32339    testpath="$unix_path"
32340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32341    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32342    testpath="$unix_path"
32343  fi
32344
32345          if test -d "$testpath"; then
32346
32347  # Only process if variable expands to non-empty
32348
32349  if test "x$libpath" != x; then
32350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32351
32352  # Input might be given as Windows format, start by converting to
32353  # unix format.
32354  path="$libpath"
32355  new_path=`$CYGPATH -u "$path"`
32356
32357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32360  # "foo.exe" is OK but "foo" is an error.
32361  #
32362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
32363  # It is also a way to make sure we got the proper file name for the real test later on.
32364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32365  if test "x$test_shortpath" = x; then
32366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32367$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32368    as_fn_error $? "Cannot locate the the path of libpath" "$LINENO" 5
32369  fi
32370
32371  # Call helper function which possibly converts this using DOS-style short mode.
32372  # If so, the updated path is stored in $new_path.
32373
32374  input_path="$new_path"
32375  # Check if we need to convert this using DOS-style short mode. If the path
32376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32377  # take no chances and rewrite it.
32378  # Note: m4 eats our [], so we need to use [ and ] instead.
32379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32380  if test "x$has_forbidden_chars" != x; then
32381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32385      # Going to short mode and back again did indeed matter. Since short mode is
32386      # case insensitive, let's make it lowercase to improve readability.
32387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32388      # Now convert it back to Unix-style (cygpath)
32389      input_path=`$CYGPATH -u "$shortmode_path"`
32390      new_path="$input_path"
32391    fi
32392  fi
32393
32394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32395  if test "x$test_cygdrive_prefix" = x; then
32396    # As a simple fix, exclude /usr/bin since it's not a real path.
32397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
32398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32399      # a path prefixed by /cygdrive for fixpath to work.
32400      new_path="$CYGWIN_ROOT_PATH$input_path"
32401    fi
32402  fi
32403
32404
32405  if test "x$path" != "x$new_path"; then
32406    libpath="$new_path"
32407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32408$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32409  fi
32410
32411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32412
32413  path="$libpath"
32414  has_colon=`$ECHO $path | $GREP ^.:`
32415  new_path="$path"
32416  if test "x$has_colon" = x; then
32417    # Not in mixed or Windows style, start by that.
32418    new_path=`cmd //c echo $path`
32419  fi
32420
32421
32422  input_path="$new_path"
32423  # Check if we need to convert this using DOS-style short mode. If the path
32424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32425  # take no chances and rewrite it.
32426  # Note: m4 eats our [], so we need to use [ and ] instead.
32427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32428  if test "x$has_forbidden_chars" != x; then
32429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32431  fi
32432
32433
32434  windows_path="$new_path"
32435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32436    unix_path=`$CYGPATH -u "$windows_path"`
32437    new_path="$unix_path"
32438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32440    new_path="$unix_path"
32441  fi
32442
32443  if test "x$path" != "x$new_path"; then
32444    libpath="$new_path"
32445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting libpath to \"$new_path\"" >&5
32446$as_echo "$as_me: Rewriting libpath to \"$new_path\"" >&6;}
32447  fi
32448
32449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
32450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32451
32452    else
32453      # We're on a unix platform. Hooray! :)
32454      path="$libpath"
32455      has_space=`$ECHO "$path" | $GREP " "`
32456      if test "x$has_space" != x; then
32457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of libpath, which resolves as \"$path\", is invalid." >&5
32458$as_echo "$as_me: The path of libpath, which resolves as \"$path\", is invalid." >&6;}
32459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
32460      fi
32461
32462      # Use eval to expand a potential ~
32463      eval path="$path"
32464      if test ! -f "$path" && test ! -d "$path"; then
32465        as_fn_error $? "The path of libpath, which resolves as \"$path\", is not found." "$LINENO" 5
32466      fi
32467
32468      if test -d "$path"; then
32469        libpath="`cd "$path"; $THEPWDCMD -L`"
32470      else
32471        dir="`$DIRNAME "$path"`"
32472        base="`$BASENAME "$path"`"
32473        libpath="`cd "$dir"; $THEPWDCMD -L`/$base"
32474      fi
32475    fi
32476  fi
32477
32478            SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS -libpath:$libpath"
32479          fi
32480          IFS=";"
32481        fi
32482      done
32483      IFS="$OLDIFS"
32484    fi
32485  else
32486    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
32487$as_echo "not found" >&6; }
32488
32489    if test "x$VS_ENV_CMD" = x; then
32490      { $as_echo "$as_me:${as_lineno-$LINENO}: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&5
32491$as_echo "$as_me: Cannot locate a valid Visual Studio or Windows SDK installation on disk," >&6;}
32492      { $as_echo "$as_me:${as_lineno-$LINENO}: nor is this script run from a Visual Studio command prompt." >&5
32493$as_echo "$as_me: nor is this script run from a Visual Studio command prompt." >&6;}
32494    else
32495      { $as_echo "$as_me:${as_lineno-$LINENO}: Running the extraction script failed." >&5
32496$as_echo "$as_me: Running the extraction script failed." >&6;}
32497    fi
32498    { $as_echo "$as_me:${as_lineno-$LINENO}: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&5
32499$as_echo "$as_me: Try setting --with-tools-dir to the VC/bin directory within the VS installation" >&6;}
32500    { $as_echo "$as_me:${as_lineno-$LINENO}: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&5
32501$as_echo "$as_me: or run \"bash.exe -l\" from a VS command prompt and then run configure from there." >&6;}
32502    as_fn_error $? "Cannot continue" "$LINENO" 5
32503  fi
32504
32505    # Reset path to VS_PATH. It will include everything that was on PATH at the time we
32506    # ran TOOLCHAIN_SETUP_VISUAL_STUDIO_ENV.
32507    PATH="$VS_PATH"
32508    # The microsoft toolchain also requires INCLUDE and LIB to be set.
32509    export INCLUDE="$VS_INCLUDE"
32510    export LIB="$VS_LIB"
32511  else
32512    if test "x$XCODE_VERSION_OUTPUT" != x; then
32513      # For Xcode, we set the Xcode version as TOOLCHAIN_VERSION
32514      TOOLCHAIN_VERSION=`$ECHO $XCODE_VERSION_OUTPUT | $CUT -f 2 -d ' '`
32515      TOOLCHAIN_DESCRIPTION="$TOOLCHAIN_DESCRIPTION from Xcode"
32516    else
32517      # Currently we do not define this for other toolchains. This might change as the need arise.
32518      TOOLCHAIN_VERSION=
32519    fi
32520  fi
32521
32522
32523  # For solaris we really need solaris tools, and not the GNU equivalent.
32524  # The build tools on Solaris reside in /usr/ccs (C Compilation System),
32525  # so add that to path before starting to probe.
32526  # FIXME: This was originally only done for AS,NM,GNM,STRIP,OBJCOPY,OBJDUMP.
32527  if test "x$OPENJDK_BUILD_OS" = xsolaris; then
32528    PATH="/usr/ccs/bin:$PATH"
32529  fi
32530
32531  # Finally add TOOLCHAIN_PATH at the beginning, to allow --with-tools-dir to
32532  # override all other locations.
32533  if test "x$TOOLCHAIN_PATH" != x; then
32534    PATH=$TOOLCHAIN_PATH:$PATH
32535  fi
32536
32537
32538  #
32539  # Setup the compilers (CC and CXX)
32540  #
32541
32542  COMPILER_NAME=C
32543  SEARCH_LIST="$TOOLCHAIN_CC_BINARY"
32544
32545  if test "x$CC" != x; then
32546    # User has supplied compiler name already, always let that override.
32547    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CC=$CC" >&5
32548$as_echo "$as_me: Will use user supplied compiler CC=$CC" >&6;}
32549    if test "x`basename $CC`" = "x$CC"; then
32550      # A command without a complete path is provided, search $PATH.
32551
32552      for ac_prog in $CC
32553do
32554  # Extract the first word of "$ac_prog", so it can be a program name with args.
32555set dummy $ac_prog; ac_word=$2
32556{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32557$as_echo_n "checking for $ac_word... " >&6; }
32558if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32559  $as_echo_n "(cached) " >&6
32560else
32561  case $POTENTIAL_CC in
32562  [\\/]* | ?:[\\/]*)
32563  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32564  ;;
32565  *)
32566  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32567for as_dir in $PATH
32568do
32569  IFS=$as_save_IFS
32570  test -z "$as_dir" && as_dir=.
32571    for ac_exec_ext in '' $ac_executable_extensions; do
32572  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32573    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32574    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32575    break 2
32576  fi
32577done
32578  done
32579IFS=$as_save_IFS
32580
32581  ;;
32582esac
32583fi
32584POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32585if test -n "$POTENTIAL_CC"; then
32586  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32587$as_echo "$POTENTIAL_CC" >&6; }
32588else
32589  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32590$as_echo "no" >&6; }
32591fi
32592
32593
32594  test -n "$POTENTIAL_CC" && break
32595done
32596
32597      if test "x$POTENTIAL_CC" != x; then
32598        CC=$POTENTIAL_CC
32599      else
32600        as_fn_error $? "User supplied compiler CC=$CC could not be found" "$LINENO" 5
32601      fi
32602    else
32603      # Otherwise it might already be a complete path
32604      if test ! -x "$CC"; then
32605        as_fn_error $? "User supplied compiler CC=$CC does not exist" "$LINENO" 5
32606      fi
32607    fi
32608  else
32609    # No user supplied value. Locate compiler ourselves.
32610
32611    # If we are cross compiling, assume cross compilation tools follows the
32612    # cross compilation standard where they are prefixed with the autoconf
32613    # standard name for the target. For example the binary
32614    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
32615    # If we are not cross compiling, then the default compiler name will be
32616    # used.
32617
32618    CC=
32619    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
32620    # before checking the rest of the PATH.
32621    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
32622    # step, this should not be necessary.
32623    if test -n "$TOOLCHAIN_PATH"; then
32624      PATH_save="$PATH"
32625      PATH="$TOOLCHAIN_PATH"
32626      for ac_prog in $SEARCH_LIST
32627do
32628  # Extract the first word of "$ac_prog", so it can be a program name with args.
32629set dummy $ac_prog; ac_word=$2
32630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32631$as_echo_n "checking for $ac_word... " >&6; }
32632if ${ac_cv_path_TOOLCHAIN_PATH_CC+:} false; then :
32633  $as_echo_n "(cached) " >&6
32634else
32635  case $TOOLCHAIN_PATH_CC in
32636  [\\/]* | ?:[\\/]*)
32637  ac_cv_path_TOOLCHAIN_PATH_CC="$TOOLCHAIN_PATH_CC" # Let the user override the test with a path.
32638  ;;
32639  *)
32640  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32641for as_dir in $PATH
32642do
32643  IFS=$as_save_IFS
32644  test -z "$as_dir" && as_dir=.
32645    for ac_exec_ext in '' $ac_executable_extensions; do
32646  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32647    ac_cv_path_TOOLCHAIN_PATH_CC="$as_dir/$ac_word$ac_exec_ext"
32648    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32649    break 2
32650  fi
32651done
32652  done
32653IFS=$as_save_IFS
32654
32655  ;;
32656esac
32657fi
32658TOOLCHAIN_PATH_CC=$ac_cv_path_TOOLCHAIN_PATH_CC
32659if test -n "$TOOLCHAIN_PATH_CC"; then
32660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CC" >&5
32661$as_echo "$TOOLCHAIN_PATH_CC" >&6; }
32662else
32663  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32664$as_echo "no" >&6; }
32665fi
32666
32667
32668  test -n "$TOOLCHAIN_PATH_CC" && break
32669done
32670
32671      CC=$TOOLCHAIN_PATH_CC
32672      PATH="$PATH_save"
32673    fi
32674
32675    # AC_PATH_PROGS can't be run multiple times with the same variable,
32676    # so create a new name for this run.
32677    if test "x$CC" = x; then
32678      for ac_prog in $SEARCH_LIST
32679do
32680  # Extract the first word of "$ac_prog", so it can be a program name with args.
32681set dummy $ac_prog; ac_word=$2
32682{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
32683$as_echo_n "checking for $ac_word... " >&6; }
32684if ${ac_cv_path_POTENTIAL_CC+:} false; then :
32685  $as_echo_n "(cached) " >&6
32686else
32687  case $POTENTIAL_CC in
32688  [\\/]* | ?:[\\/]*)
32689  ac_cv_path_POTENTIAL_CC="$POTENTIAL_CC" # Let the user override the test with a path.
32690  ;;
32691  *)
32692  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
32693for as_dir in $PATH
32694do
32695  IFS=$as_save_IFS
32696  test -z "$as_dir" && as_dir=.
32697    for ac_exec_ext in '' $ac_executable_extensions; do
32698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
32699    ac_cv_path_POTENTIAL_CC="$as_dir/$ac_word$ac_exec_ext"
32700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
32701    break 2
32702  fi
32703done
32704  done
32705IFS=$as_save_IFS
32706
32707  ;;
32708esac
32709fi
32710POTENTIAL_CC=$ac_cv_path_POTENTIAL_CC
32711if test -n "$POTENTIAL_CC"; then
32712  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CC" >&5
32713$as_echo "$POTENTIAL_CC" >&6; }
32714else
32715  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
32716$as_echo "no" >&6; }
32717fi
32718
32719
32720  test -n "$POTENTIAL_CC" && break
32721done
32722
32723      CC=$POTENTIAL_CC
32724    fi
32725
32726    if test "x$CC" = x; then
32727
32728  # Print a helpful message on how to acquire the necessary build dependency.
32729  # devkit is the help tag: freetype, cups, alsa etc
32730  MISSING_DEPENDENCY=devkit
32731
32732  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32733    cygwin_help $MISSING_DEPENDENCY
32734  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32735    msys_help $MISSING_DEPENDENCY
32736  else
32737    PKGHANDLER_COMMAND=
32738
32739    case $PKGHANDLER in
32740      apt-get)
32741        apt_help     $MISSING_DEPENDENCY ;;
32742      yum)
32743        yum_help     $MISSING_DEPENDENCY ;;
32744      port)
32745        port_help    $MISSING_DEPENDENCY ;;
32746      pkgutil)
32747        pkgutil_help $MISSING_DEPENDENCY ;;
32748      pkgadd)
32749        pkgadd_help  $MISSING_DEPENDENCY ;;
32750    esac
32751
32752    if test "x$PKGHANDLER_COMMAND" != x; then
32753      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
32754    fi
32755  fi
32756
32757      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
32758    fi
32759  fi
32760
32761  # Now we have a compiler binary in CC. Make sure it's okay.
32762
32763  # Only process if variable expands to non-empty
32764
32765  if test "x$CC" != x; then
32766    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32767
32768  # First separate the path from the arguments. This will split at the first
32769  # space.
32770  complete="$CC"
32771  path="${complete%% *}"
32772  tmp="$complete EOL"
32773  arguments="${tmp#* }"
32774
32775  # Input might be given as Windows format, start by converting to
32776  # unix format.
32777  new_path=`$CYGPATH -u "$path"`
32778
32779  # Now try to locate executable using which
32780  new_path=`$WHICH "$new_path" 2> /dev/null`
32781  # bat and cmd files are not always considered executable in cygwin causing which
32782  # to not find them
32783  if test "x$new_path" = x \
32784      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32785      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32786    new_path=`$CYGPATH -u "$path"`
32787  fi
32788  if test "x$new_path" = x; then
32789    # Oops. Which didn't find the executable.
32790    # The splitting of arguments from the executable at a space might have been incorrect,
32791    # since paths with space are more likely in Windows. Give it another try with the whole
32792    # argument.
32793    path="$complete"
32794    arguments="EOL"
32795    new_path=`$CYGPATH -u "$path"`
32796    new_path=`$WHICH "$new_path" 2> /dev/null`
32797    # bat and cmd files are not always considered executable in cygwin causing which
32798    # to not find them
32799    if test "x$new_path" = x \
32800        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32801        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32802      new_path=`$CYGPATH -u "$path"`
32803    fi
32804    if test "x$new_path" = x; then
32805      # It's still not found. Now this is an unrecoverable error.
32806      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32807$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32808      has_space=`$ECHO "$complete" | $GREP " "`
32809      if test "x$has_space" != x; then
32810        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32811$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32812      fi
32813      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32814    fi
32815  fi
32816
32817  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
32818  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
32819  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
32820  # "foo.exe" is OK but "foo" is an error.
32821  #
32822  # This test is therefore slightly more accurate than "test -f" to check for file presence.
32823  # It is also a way to make sure we got the proper file name for the real test later on.
32824  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
32825  if test "x$test_shortpath" = x; then
32826    # Short path failed, file does not exist as specified.
32827    # Try adding .exe or .cmd
32828    if test -f "${new_path}.exe"; then
32829      input_to_shortpath="${new_path}.exe"
32830    elif test -f "${new_path}.cmd"; then
32831      input_to_shortpath="${new_path}.cmd"
32832    else
32833      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$new_path\", is invalid." >&5
32834$as_echo "$as_me: The path of CC, which resolves as \"$new_path\", is invalid." >&6;}
32835      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
32836$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
32837      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32838    fi
32839  else
32840    input_to_shortpath="$new_path"
32841  fi
32842
32843  # Call helper function which possibly converts this using DOS-style short mode.
32844  # If so, the updated path is stored in $new_path.
32845  new_path="$input_to_shortpath"
32846
32847  input_path="$input_to_shortpath"
32848  # Check if we need to convert this using DOS-style short mode. If the path
32849  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32850  # take no chances and rewrite it.
32851  # Note: m4 eats our [], so we need to use [ and ] instead.
32852  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
32853  if test "x$has_forbidden_chars" != x; then
32854    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32855    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
32856    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
32857    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
32858      # Going to short mode and back again did indeed matter. Since short mode is
32859      # case insensitive, let's make it lowercase to improve readability.
32860      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32861      # Now convert it back to Unix-style (cygpath)
32862      input_path=`$CYGPATH -u "$shortmode_path"`
32863      new_path="$input_path"
32864    fi
32865  fi
32866
32867  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
32868  if test "x$test_cygdrive_prefix" = x; then
32869    # As a simple fix, exclude /usr/bin since it's not a real path.
32870    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
32871      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
32872      # a path prefixed by /cygdrive for fixpath to work.
32873      new_path="$CYGWIN_ROOT_PATH$input_path"
32874    fi
32875  fi
32876
32877  # remove trailing .exe if any
32878  new_path="${new_path/%.exe/}"
32879
32880    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32881
32882  # First separate the path from the arguments. This will split at the first
32883  # space.
32884  complete="$CC"
32885  path="${complete%% *}"
32886  tmp="$complete EOL"
32887  arguments="${tmp#* }"
32888
32889  # Input might be given as Windows format, start by converting to
32890  # unix format.
32891  new_path="$path"
32892
32893  windows_path="$new_path"
32894  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32895    unix_path=`$CYGPATH -u "$windows_path"`
32896    new_path="$unix_path"
32897  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32898    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32899    new_path="$unix_path"
32900  fi
32901
32902
32903  # Now try to locate executable using which
32904  new_path=`$WHICH "$new_path" 2> /dev/null`
32905
32906  if test "x$new_path" = x; then
32907    # Oops. Which didn't find the executable.
32908    # The splitting of arguments from the executable at a space might have been incorrect,
32909    # since paths with space are more likely in Windows. Give it another try with the whole
32910    # argument.
32911    path="$complete"
32912    arguments="EOL"
32913    new_path="$path"
32914
32915  windows_path="$new_path"
32916  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32917    unix_path=`$CYGPATH -u "$windows_path"`
32918    new_path="$unix_path"
32919  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32920    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32921    new_path="$unix_path"
32922  fi
32923
32924
32925    new_path=`$WHICH "$new_path" 2> /dev/null`
32926    # bat and cmd files are not always considered executable in MSYS causing which
32927    # to not find them
32928    if test "x$new_path" = x \
32929        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
32930        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
32931      new_path="$path"
32932
32933  windows_path="$new_path"
32934  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32935    unix_path=`$CYGPATH -u "$windows_path"`
32936    new_path="$unix_path"
32937  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32938    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32939    new_path="$unix_path"
32940  fi
32941
32942    fi
32943
32944    if test "x$new_path" = x; then
32945      # It's still not found. Now this is an unrecoverable error.
32946      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
32947$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
32948      has_space=`$ECHO "$complete" | $GREP " "`
32949      if test "x$has_space" != x; then
32950        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
32951$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
32952      fi
32953      as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
32954    fi
32955  fi
32956
32957  # Now new_path has a complete unix path to the binary
32958  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
32959    # Keep paths in /bin as-is, but remove trailing .exe if any
32960    new_path="${new_path/%.exe/}"
32961    # Do not save /bin paths to all_fixpath_prefixes!
32962  else
32963    # Not in mixed or Windows style, start by that.
32964    new_path=`cmd //c echo $new_path`
32965
32966  input_path="$new_path"
32967  # Check if we need to convert this using DOS-style short mode. If the path
32968  # contains just simple characters, use it. Otherwise (spaces, weird characters),
32969  # take no chances and rewrite it.
32970  # Note: m4 eats our [], so we need to use [ and ] instead.
32971  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
32972  if test "x$has_forbidden_chars" != x; then
32973    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
32974    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
32975  fi
32976
32977    # Output is in $new_path
32978
32979  windows_path="$new_path"
32980  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
32981    unix_path=`$CYGPATH -u "$windows_path"`
32982    new_path="$unix_path"
32983  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
32984    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
32985    new_path="$unix_path"
32986  fi
32987
32988    # remove trailing .exe if any
32989    new_path="${new_path/%.exe/}"
32990
32991    # Save the first 10 bytes of this path to the storage, so fixpath can work.
32992    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
32993  fi
32994
32995    else
32996      # We're on a unix platform. Hooray! :)
32997      # First separate the path from the arguments. This will split at the first
32998      # space.
32999      complete="$CC"
33000      path="${complete%% *}"
33001      tmp="$complete EOL"
33002      arguments="${tmp#* }"
33003
33004      # Cannot rely on the command "which" here since it doesn't always work.
33005      is_absolute_path=`$ECHO "$path" | $GREP ^/`
33006      if test -z "$is_absolute_path"; then
33007        # Path to executable is not absolute. Find it.
33008        IFS_save="$IFS"
33009        IFS=:
33010        for p in $PATH; do
33011          if test -f "$p/$path" && test -x "$p/$path"; then
33012            new_path="$p/$path"
33013            break
33014          fi
33015        done
33016        IFS="$IFS_save"
33017      else
33018        # This is an absolute path, we can use it without further modifications.
33019        new_path="$path"
33020      fi
33021
33022      if test "x$new_path" = x; then
33023        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CC, which resolves as \"$complete\", is not found." >&5
33024$as_echo "$as_me: The path of CC, which resolves as \"$complete\", is not found." >&6;}
33025        has_space=`$ECHO "$complete" | $GREP " "`
33026        if test "x$has_space" != x; then
33027          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
33028$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
33029        fi
33030        as_fn_error $? "Cannot locate the the path of CC" "$LINENO" 5
33031      fi
33032    fi
33033
33034    # Now join together the path and the arguments once again
33035    if test "x$arguments" != xEOL; then
33036      new_complete="$new_path ${arguments% *}"
33037    else
33038      new_complete="$new_path"
33039    fi
33040
33041    if test "x$complete" != "x$new_complete"; then
33042      CC="$new_complete"
33043      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CC to \"$new_complete\"" >&5
33044$as_echo "$as_me: Rewriting CC to \"$new_complete\"" >&6;}
33045    fi
33046  fi
33047
33048  TEST_COMPILER="$CC"
33049
33050  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CC" >&5
33051$as_echo_n "checking resolved symbolic links for CC... " >&6; }
33052  SYMLINK_ORIGINAL="$TEST_COMPILER"
33053
33054  if test "x$OPENJDK_BUILD_OS" != xwindows; then
33055    # Follow a chain of symbolic links. Use readlink
33056    # where it exists, else fall back to horribly
33057    # complicated shell code.
33058    if test "x$READLINK_TESTED" != yes; then
33059      # On MacOSX there is a readlink tool with a different
33060      # purpose than the GNU readlink tool. Check the found readlink.
33061      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
33062      if test "x$ISGNU" = x; then
33063        # A readlink that we do not know how to use.
33064        # Are there other non-GNU readlinks out there?
33065        READLINK_TESTED=yes
33066        READLINK=
33067      fi
33068    fi
33069
33070    if test "x$READLINK" != x; then
33071      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
33072    else
33073      # Save the current directory for restoring afterwards
33074      STARTDIR=$PWD
33075      COUNTER=0
33076      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
33077      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
33078      cd $sym_link_dir
33079      # Use -P flag to resolve symlinks in directories.
33080      cd `$THEPWDCMD -P`
33081      sym_link_dir=`$THEPWDCMD -P`
33082      # Resolve file symlinks
33083      while test $COUNTER -lt 20; do
33084        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
33085        if test "x$ISLINK" == x; then
33086          # This is not a symbolic link! We are done!
33087          break
33088        fi
33089        # Again resolve directory symlinks since the target of the just found
33090        # link could be in a different directory
33091        cd `$DIRNAME $ISLINK`
33092        sym_link_dir=`$THEPWDCMD -P`
33093        sym_link_file=`$BASENAME $ISLINK`
33094        let COUNTER=COUNTER+1
33095      done
33096      cd $STARTDIR
33097      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
33098    fi
33099  fi
33100
33101  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
33102    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
33103$as_echo "no symlink" >&6; }
33104  else
33105    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
33106$as_echo "$SYMLINK_ORIGINAL" >&6; }
33107
33108    # We can't handle ccache by gcc wrappers, since we need to know if we're
33109    # using ccache. Instead ccache usage must be controlled by a configure option.
33110    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
33111    if test "x$COMPILER_BASENAME" = "xccache"; then
33112      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
33113$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
33114      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
33115    fi
33116  fi
33117
33118
33119  COMPILER=$CC
33120  COMPILER_NAME=$COMPILER_NAME
33121
33122  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
33123    # cc -V output typically looks like
33124    #     cc: Sun C 5.12 Linux_i386 2011/11/16
33125    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
33126    # Check that this is likely to be the Solaris Studio cc.
33127    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
33128    if test $? -ne 0; then
33129      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33130      { $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
33131$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33132      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33133$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33134      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33135$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33136      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33137    fi
33138    # Remove usage instructions (if present), and
33139    # collapse compiler output into a single line
33140    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33141        $SED -e 's/ *[Uu]sage:.*//'`
33142    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33143        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
33144  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
33145    # xlc -qversion output typically looks like
33146    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
33147    #     Version: 11.01.0000.0015
33148    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
33149    # Check that this is likely to be the IBM XL C compiler.
33150    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
33151    if test $? -ne 0; then
33152      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33153      { $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
33154$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33155      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33156$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33157      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
33158$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
33159      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33160    fi
33161    # Collapse compiler output into a single line
33162    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33163    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33164        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
33165  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
33166    # There is no specific version flag, but all output starts with a version string.
33167    # First line typically looks something like:
33168    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
33169    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
33170    # Check that this is likely to be Microsoft CL.EXE.
33171    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
33172    if test $? -ne 0; then
33173      { $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
33174$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33175      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33176$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33177      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33178    fi
33179    # Collapse compiler output into a single line
33180    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33181    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33182        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
33183  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
33184    # gcc --version output typically looks like
33185    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
33186    #     Copyright (C) 2013 Free Software Foundation, Inc.
33187    #     This is free software; see the source for copying conditions.  There is NO
33188    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
33189    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33190    # Check that this is likely to be GCC.
33191    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
33192    if test $? -ne 0; then
33193      { $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
33194$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33195      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
33196$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
33197      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33198    fi
33199    # Remove Copyright and legalese from version string, and
33200    # collapse into a single line
33201    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
33202        $SED -e 's/ *Copyright .*//'`
33203    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33204        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
33205  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
33206    # clang --version output typically looks like
33207    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
33208    #    clang version 3.3 (tags/RELEASE_33/final)
33209    # or
33210    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
33211    #    Target: x86_64-pc-linux-gnu
33212    #    Thread model: posix
33213    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
33214    # Check that this is likely to be clang
33215    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
33216    if test $? -ne 0; then
33217      { $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
33218$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
33219      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
33220$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
33221      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
33222    fi
33223    # Collapse compiler output into a single line
33224    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
33225    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
33226        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
33227  else
33228      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
33229  fi
33230  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
33231  CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
33232  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
33233  CC_VERSION_STRING="$COMPILER_VERSION_STRING"
33234
33235  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
33236$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
33237
33238
33239  # Now that we have resolved CC ourself, let autoconf have its go at it
33240  ac_ext=c
33241ac_cpp='$CPP $CPPFLAGS'
33242ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33243ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33244ac_compiler_gnu=$ac_cv_c_compiler_gnu
33245if test -n "$ac_tool_prefix"; then
33246  for ac_prog in $CC
33247  do
33248    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
33249set dummy $ac_tool_prefix$ac_prog; ac_word=$2
33250{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33251$as_echo_n "checking for $ac_word... " >&6; }
33252if ${ac_cv_prog_CC+:} false; then :
33253  $as_echo_n "(cached) " >&6
33254else
33255  if test -n "$CC"; then
33256  ac_cv_prog_CC="$CC" # Let the user override the test.
33257else
33258as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33259for as_dir in $PATH
33260do
33261  IFS=$as_save_IFS
33262  test -z "$as_dir" && as_dir=.
33263    for ac_exec_ext in '' $ac_executable_extensions; do
33264  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33265    ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
33266    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33267    break 2
33268  fi
33269done
33270  done
33271IFS=$as_save_IFS
33272
33273fi
33274fi
33275CC=$ac_cv_prog_CC
33276if test -n "$CC"; then
33277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5
33278$as_echo "$CC" >&6; }
33279else
33280  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33281$as_echo "no" >&6; }
33282fi
33283
33284
33285    test -n "$CC" && break
33286  done
33287fi
33288if test -z "$CC"; then
33289  ac_ct_CC=$CC
33290  for ac_prog in $CC
33291do
33292  # Extract the first word of "$ac_prog", so it can be a program name with args.
33293set dummy $ac_prog; ac_word=$2
33294{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33295$as_echo_n "checking for $ac_word... " >&6; }
33296if ${ac_cv_prog_ac_ct_CC+:} false; then :
33297  $as_echo_n "(cached) " >&6
33298else
33299  if test -n "$ac_ct_CC"; then
33300  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
33301else
33302as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33303for as_dir in $PATH
33304do
33305  IFS=$as_save_IFS
33306  test -z "$as_dir" && as_dir=.
33307    for ac_exec_ext in '' $ac_executable_extensions; do
33308  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33309    ac_cv_prog_ac_ct_CC="$ac_prog"
33310    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33311    break 2
33312  fi
33313done
33314  done
33315IFS=$as_save_IFS
33316
33317fi
33318fi
33319ac_ct_CC=$ac_cv_prog_ac_ct_CC
33320if test -n "$ac_ct_CC"; then
33321  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5
33322$as_echo "$ac_ct_CC" >&6; }
33323else
33324  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33325$as_echo "no" >&6; }
33326fi
33327
33328
33329  test -n "$ac_ct_CC" && break
33330done
33331
33332  if test "x$ac_ct_CC" = x; then
33333    CC=""
33334  else
33335    case $cross_compiling:$ac_tool_warned in
33336yes:)
33337{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
33338$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
33339ac_tool_warned=yes ;;
33340esac
33341    CC=$ac_ct_CC
33342  fi
33343fi
33344
33345
33346test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33347$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33348as_fn_error $? "no acceptable C compiler found in \$PATH
33349See \`config.log' for more details" "$LINENO" 5; }
33350
33351# Provide some information about the compiler.
33352$as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5
33353set X $ac_compile
33354ac_compiler=$2
33355for ac_option in --version -v -V -qversion; do
33356  { { ac_try="$ac_compiler $ac_option >&5"
33357case "(($ac_try" in
33358  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33359  *) ac_try_echo=$ac_try;;
33360esac
33361eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33362$as_echo "$ac_try_echo"; } >&5
33363  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
33364  ac_status=$?
33365  if test -s conftest.err; then
33366    sed '10a\
33367... rest of stderr output deleted ...
33368         10q' conftest.err >conftest.er1
33369    cat conftest.er1 >&5
33370  fi
33371  rm -f conftest.er1 conftest.err
33372  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33373  test $ac_status = 0; }
33374done
33375
33376cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33377/* end confdefs.h.  */
33378
33379int
33380main ()
33381{
33382
33383  ;
33384  return 0;
33385}
33386_ACEOF
33387ac_clean_files_save=$ac_clean_files
33388ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out"
33389# Try to create an executable without -o first, disregard a.out.
33390# It will help us diagnose broken compilers, and finding out an intuition
33391# of exeext.
33392{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5
33393$as_echo_n "checking whether the C compiler works... " >&6; }
33394ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
33395
33396# The possible output files:
33397ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*"
33398
33399ac_rmfiles=
33400for ac_file in $ac_files
33401do
33402  case $ac_file in
33403    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33404    * ) ac_rmfiles="$ac_rmfiles $ac_file";;
33405  esac
33406done
33407rm -f $ac_rmfiles
33408
33409if { { ac_try="$ac_link_default"
33410case "(($ac_try" in
33411  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33412  *) ac_try_echo=$ac_try;;
33413esac
33414eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33415$as_echo "$ac_try_echo"; } >&5
33416  (eval "$ac_link_default") 2>&5
33417  ac_status=$?
33418  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33419  test $ac_status = 0; }; then :
33420  # Autoconf-2.13 could set the ac_cv_exeext variable to `no'.
33421# So ignore a value of `no', otherwise this would lead to `EXEEXT = no'
33422# in a Makefile.  We should not override ac_cv_exeext if it was cached,
33423# so that the user can short-circuit this test for compilers unknown to
33424# Autoconf.
33425for ac_file in $ac_files ''
33426do
33427  test -f "$ac_file" || continue
33428  case $ac_file in
33429    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj )
33430	;;
33431    [ab].out )
33432	# We found the default executable, but exeext='' is most
33433	# certainly right.
33434	break;;
33435    *.* )
33436	if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no;
33437	then :; else
33438	   ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33439	fi
33440	# We set ac_cv_exeext here because the later test for it is not
33441	# safe: cross compilers may not add the suffix if given an `-o'
33442	# argument, so we may need to know it at that point already.
33443	# Even if this section looks crufty: it has the advantage of
33444	# actually working.
33445	break;;
33446    * )
33447	break;;
33448  esac
33449done
33450test "$ac_cv_exeext" = no && ac_cv_exeext=
33451
33452else
33453  ac_file=''
33454fi
33455if test -z "$ac_file"; then :
33456  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33457$as_echo "no" >&6; }
33458$as_echo "$as_me: failed program was:" >&5
33459sed 's/^/| /' conftest.$ac_ext >&5
33460
33461{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33463as_fn_error 77 "C compiler cannot create executables
33464See \`config.log' for more details" "$LINENO" 5; }
33465else
33466  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
33467$as_echo "yes" >&6; }
33468fi
33469{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5
33470$as_echo_n "checking for C compiler default output file name... " >&6; }
33471{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5
33472$as_echo "$ac_file" >&6; }
33473ac_exeext=$ac_cv_exeext
33474
33475rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out
33476ac_clean_files=$ac_clean_files_save
33477{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5
33478$as_echo_n "checking for suffix of executables... " >&6; }
33479if { { ac_try="$ac_link"
33480case "(($ac_try" in
33481  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33482  *) ac_try_echo=$ac_try;;
33483esac
33484eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33485$as_echo "$ac_try_echo"; } >&5
33486  (eval "$ac_link") 2>&5
33487  ac_status=$?
33488  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33489  test $ac_status = 0; }; then :
33490  # If both `conftest.exe' and `conftest' are `present' (well, observable)
33491# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
33492# work properly (i.e., refer to `conftest.exe'), while it won't with
33493# `rm'.
33494for ac_file in conftest.exe conftest conftest.*; do
33495  test -f "$ac_file" || continue
33496  case $ac_file in
33497    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;;
33498    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
33499	  break;;
33500    * ) break;;
33501  esac
33502done
33503else
33504  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33505$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33506as_fn_error $? "cannot compute suffix of executables: cannot compile and link
33507See \`config.log' for more details" "$LINENO" 5; }
33508fi
33509rm -f conftest conftest$ac_cv_exeext
33510{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5
33511$as_echo "$ac_cv_exeext" >&6; }
33512
33513rm -f conftest.$ac_ext
33514EXEEXT=$ac_cv_exeext
33515ac_exeext=$EXEEXT
33516cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33517/* end confdefs.h.  */
33518#include <stdio.h>
33519int
33520main ()
33521{
33522FILE *f = fopen ("conftest.out", "w");
33523 return ferror (f) || fclose (f) != 0;
33524
33525  ;
33526  return 0;
33527}
33528_ACEOF
33529ac_clean_files="$ac_clean_files conftest.out"
33530# Check that the compiler produces executables we can run.  If not, either
33531# the compiler is broken, or we cross compile.
33532{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5
33533$as_echo_n "checking whether we are cross compiling... " >&6; }
33534if test "$cross_compiling" != yes; then
33535  { { ac_try="$ac_link"
33536case "(($ac_try" in
33537  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33538  *) ac_try_echo=$ac_try;;
33539esac
33540eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33541$as_echo "$ac_try_echo"; } >&5
33542  (eval "$ac_link") 2>&5
33543  ac_status=$?
33544  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33545  test $ac_status = 0; }
33546  if { ac_try='./conftest$ac_cv_exeext'
33547  { { case "(($ac_try" in
33548  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33549  *) ac_try_echo=$ac_try;;
33550esac
33551eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33552$as_echo "$ac_try_echo"; } >&5
33553  (eval "$ac_try") 2>&5
33554  ac_status=$?
33555  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33556  test $ac_status = 0; }; }; then
33557    cross_compiling=no
33558  else
33559    if test "$cross_compiling" = maybe; then
33560	cross_compiling=yes
33561    else
33562	{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33563$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33564as_fn_error $? "cannot run C compiled programs.
33565If you meant to cross compile, use \`--host'.
33566See \`config.log' for more details" "$LINENO" 5; }
33567    fi
33568  fi
33569fi
33570{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5
33571$as_echo "$cross_compiling" >&6; }
33572
33573rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out
33574ac_clean_files=$ac_clean_files_save
33575{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5
33576$as_echo_n "checking for suffix of object files... " >&6; }
33577if ${ac_cv_objext+:} false; then :
33578  $as_echo_n "(cached) " >&6
33579else
33580  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33581/* end confdefs.h.  */
33582
33583int
33584main ()
33585{
33586
33587  ;
33588  return 0;
33589}
33590_ACEOF
33591rm -f conftest.o conftest.obj
33592if { { ac_try="$ac_compile"
33593case "(($ac_try" in
33594  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
33595  *) ac_try_echo=$ac_try;;
33596esac
33597eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
33598$as_echo "$ac_try_echo"; } >&5
33599  (eval "$ac_compile") 2>&5
33600  ac_status=$?
33601  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
33602  test $ac_status = 0; }; then :
33603  for ac_file in conftest.o conftest.obj conftest.*; do
33604  test -f "$ac_file" || continue;
33605  case $ac_file in
33606    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;;
33607    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
33608       break;;
33609  esac
33610done
33611else
33612  $as_echo "$as_me: failed program was:" >&5
33613sed 's/^/| /' conftest.$ac_ext >&5
33614
33615{ { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
33616$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
33617as_fn_error $? "cannot compute suffix of object files: cannot compile
33618See \`config.log' for more details" "$LINENO" 5; }
33619fi
33620rm -f conftest.$ac_cv_objext conftest.$ac_ext
33621fi
33622{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5
33623$as_echo "$ac_cv_objext" >&6; }
33624OBJEXT=$ac_cv_objext
33625ac_objext=$OBJEXT
33626{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5
33627$as_echo_n "checking whether we are using the GNU C compiler... " >&6; }
33628if ${ac_cv_c_compiler_gnu+:} false; then :
33629  $as_echo_n "(cached) " >&6
33630else
33631  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33632/* end confdefs.h.  */
33633
33634int
33635main ()
33636{
33637#ifndef __GNUC__
33638       choke me
33639#endif
33640
33641  ;
33642  return 0;
33643}
33644_ACEOF
33645if ac_fn_c_try_compile "$LINENO"; then :
33646  ac_compiler_gnu=yes
33647else
33648  ac_compiler_gnu=no
33649fi
33650rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33651ac_cv_c_compiler_gnu=$ac_compiler_gnu
33652
33653fi
33654{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5
33655$as_echo "$ac_cv_c_compiler_gnu" >&6; }
33656if test $ac_compiler_gnu = yes; then
33657  GCC=yes
33658else
33659  GCC=
33660fi
33661ac_test_CFLAGS=${CFLAGS+set}
33662ac_save_CFLAGS=$CFLAGS
33663{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5
33664$as_echo_n "checking whether $CC accepts -g... " >&6; }
33665if ${ac_cv_prog_cc_g+:} false; then :
33666  $as_echo_n "(cached) " >&6
33667else
33668  ac_save_c_werror_flag=$ac_c_werror_flag
33669   ac_c_werror_flag=yes
33670   ac_cv_prog_cc_g=no
33671   CFLAGS="-g"
33672   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33673/* end confdefs.h.  */
33674
33675int
33676main ()
33677{
33678
33679  ;
33680  return 0;
33681}
33682_ACEOF
33683if ac_fn_c_try_compile "$LINENO"; then :
33684  ac_cv_prog_cc_g=yes
33685else
33686  CFLAGS=""
33687      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33688/* end confdefs.h.  */
33689
33690int
33691main ()
33692{
33693
33694  ;
33695  return 0;
33696}
33697_ACEOF
33698if ac_fn_c_try_compile "$LINENO"; then :
33699
33700else
33701  ac_c_werror_flag=$ac_save_c_werror_flag
33702	 CFLAGS="-g"
33703	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33704/* end confdefs.h.  */
33705
33706int
33707main ()
33708{
33709
33710  ;
33711  return 0;
33712}
33713_ACEOF
33714if ac_fn_c_try_compile "$LINENO"; then :
33715  ac_cv_prog_cc_g=yes
33716fi
33717rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33718fi
33719rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33720fi
33721rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
33722   ac_c_werror_flag=$ac_save_c_werror_flag
33723fi
33724{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5
33725$as_echo "$ac_cv_prog_cc_g" >&6; }
33726if test "$ac_test_CFLAGS" = set; then
33727  CFLAGS=$ac_save_CFLAGS
33728elif test $ac_cv_prog_cc_g = yes; then
33729  if test "$GCC" = yes; then
33730    CFLAGS="-g -O2"
33731  else
33732    CFLAGS="-g"
33733  fi
33734else
33735  if test "$GCC" = yes; then
33736    CFLAGS="-O2"
33737  else
33738    CFLAGS=
33739  fi
33740fi
33741{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5
33742$as_echo_n "checking for $CC option to accept ISO C89... " >&6; }
33743if ${ac_cv_prog_cc_c89+:} false; then :
33744  $as_echo_n "(cached) " >&6
33745else
33746  ac_cv_prog_cc_c89=no
33747ac_save_CC=$CC
33748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
33749/* end confdefs.h.  */
33750#include <stdarg.h>
33751#include <stdio.h>
33752struct stat;
33753/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
33754struct buf { int x; };
33755FILE * (*rcsopen) (struct buf *, struct stat *, int);
33756static char *e (p, i)
33757     char **p;
33758     int i;
33759{
33760  return p[i];
33761}
33762static char *f (char * (*g) (char **, int), char **p, ...)
33763{
33764  char *s;
33765  va_list v;
33766  va_start (v,p);
33767  s = g (p, va_arg (v,int));
33768  va_end (v);
33769  return s;
33770}
33771
33772/* OSF 4.0 Compaq cc is some sort of almost-ANSI by default.  It has
33773   function prototypes and stuff, but not '\xHH' hex character constants.
33774   These don't provoke an error unfortunately, instead are silently treated
33775   as 'x'.  The following induces an error, until -std is added to get
33776   proper ANSI mode.  Curiously '\x00'!='x' always comes out true, for an
33777   array size at least.  It's necessary to write '\x00'==0 to get something
33778   that's true only with -std.  */
33779int osf4_cc_array ['\x00' == 0 ? 1 : -1];
33780
33781/* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters
33782   inside strings and character constants.  */
33783#define FOO(x) 'x'
33784int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1];
33785
33786int test (int i, double x);
33787struct s1 {int (*f) (int a);};
33788struct s2 {int (*f) (double a);};
33789int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
33790int argc;
33791char **argv;
33792int
33793main ()
33794{
33795return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
33796  ;
33797  return 0;
33798}
33799_ACEOF
33800for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \
33801	-Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
33802do
33803  CC="$ac_save_CC $ac_arg"
33804  if ac_fn_c_try_compile "$LINENO"; then :
33805  ac_cv_prog_cc_c89=$ac_arg
33806fi
33807rm -f core conftest.err conftest.$ac_objext
33808  test "x$ac_cv_prog_cc_c89" != "xno" && break
33809done
33810rm -f conftest.$ac_ext
33811CC=$ac_save_CC
33812
33813fi
33814# AC_CACHE_VAL
33815case "x$ac_cv_prog_cc_c89" in
33816  x)
33817    { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5
33818$as_echo "none needed" >&6; } ;;
33819  xno)
33820    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5
33821$as_echo "unsupported" >&6; } ;;
33822  *)
33823    CC="$CC $ac_cv_prog_cc_c89"
33824    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5
33825$as_echo "$ac_cv_prog_cc_c89" >&6; } ;;
33826esac
33827if test "x$ac_cv_prog_cc_c89" != xno; then :
33828
33829fi
33830
33831ac_ext=cpp
33832ac_cpp='$CXXCPP $CPPFLAGS'
33833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
33834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
33835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
33836
33837
33838
33839  COMPILER_NAME=C++
33840  SEARCH_LIST="$TOOLCHAIN_CXX_BINARY"
33841
33842  if test "x$CXX" != x; then
33843    # User has supplied compiler name already, always let that override.
33844    { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied compiler CXX=$CXX" >&5
33845$as_echo "$as_me: Will use user supplied compiler CXX=$CXX" >&6;}
33846    if test "x`basename $CXX`" = "x$CXX"; then
33847      # A command without a complete path is provided, search $PATH.
33848
33849      for ac_prog in $CXX
33850do
33851  # Extract the first word of "$ac_prog", so it can be a program name with args.
33852set dummy $ac_prog; ac_word=$2
33853{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33854$as_echo_n "checking for $ac_word... " >&6; }
33855if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33856  $as_echo_n "(cached) " >&6
33857else
33858  case $POTENTIAL_CXX in
33859  [\\/]* | ?:[\\/]*)
33860  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33861  ;;
33862  *)
33863  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33864for as_dir in $PATH
33865do
33866  IFS=$as_save_IFS
33867  test -z "$as_dir" && as_dir=.
33868    for ac_exec_ext in '' $ac_executable_extensions; do
33869  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33870    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33871    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33872    break 2
33873  fi
33874done
33875  done
33876IFS=$as_save_IFS
33877
33878  ;;
33879esac
33880fi
33881POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
33882if test -n "$POTENTIAL_CXX"; then
33883  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
33884$as_echo "$POTENTIAL_CXX" >&6; }
33885else
33886  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33887$as_echo "no" >&6; }
33888fi
33889
33890
33891  test -n "$POTENTIAL_CXX" && break
33892done
33893
33894      if test "x$POTENTIAL_CXX" != x; then
33895        CXX=$POTENTIAL_CXX
33896      else
33897        as_fn_error $? "User supplied compiler CXX=$CXX could not be found" "$LINENO" 5
33898      fi
33899    else
33900      # Otherwise it might already be a complete path
33901      if test ! -x "$CXX"; then
33902        as_fn_error $? "User supplied compiler CXX=$CXX does not exist" "$LINENO" 5
33903      fi
33904    fi
33905  else
33906    # No user supplied value. Locate compiler ourselves.
33907
33908    # If we are cross compiling, assume cross compilation tools follows the
33909    # cross compilation standard where they are prefixed with the autoconf
33910    # standard name for the target. For example the binary
33911    # i686-sun-solaris2.10-gcc will cross compile for i686-sun-solaris2.10.
33912    # If we are not cross compiling, then the default compiler name will be
33913    # used.
33914
33915    CXX=
33916    # If TOOLCHAIN_PATH is set, check for all compiler names in there first
33917    # before checking the rest of the PATH.
33918    # FIXME: Now that we prefix the TOOLS_DIR to the PATH in the PRE_DETECTION
33919    # step, this should not be necessary.
33920    if test -n "$TOOLCHAIN_PATH"; then
33921      PATH_save="$PATH"
33922      PATH="$TOOLCHAIN_PATH"
33923      for ac_prog in $SEARCH_LIST
33924do
33925  # Extract the first word of "$ac_prog", so it can be a program name with args.
33926set dummy $ac_prog; ac_word=$2
33927{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33928$as_echo_n "checking for $ac_word... " >&6; }
33929if ${ac_cv_path_TOOLCHAIN_PATH_CXX+:} false; then :
33930  $as_echo_n "(cached) " >&6
33931else
33932  case $TOOLCHAIN_PATH_CXX in
33933  [\\/]* | ?:[\\/]*)
33934  ac_cv_path_TOOLCHAIN_PATH_CXX="$TOOLCHAIN_PATH_CXX" # Let the user override the test with a path.
33935  ;;
33936  *)
33937  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33938for as_dir in $PATH
33939do
33940  IFS=$as_save_IFS
33941  test -z "$as_dir" && as_dir=.
33942    for ac_exec_ext in '' $ac_executable_extensions; do
33943  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33944    ac_cv_path_TOOLCHAIN_PATH_CXX="$as_dir/$ac_word$ac_exec_ext"
33945    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33946    break 2
33947  fi
33948done
33949  done
33950IFS=$as_save_IFS
33951
33952  ;;
33953esac
33954fi
33955TOOLCHAIN_PATH_CXX=$ac_cv_path_TOOLCHAIN_PATH_CXX
33956if test -n "$TOOLCHAIN_PATH_CXX"; then
33957  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $TOOLCHAIN_PATH_CXX" >&5
33958$as_echo "$TOOLCHAIN_PATH_CXX" >&6; }
33959else
33960  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
33961$as_echo "no" >&6; }
33962fi
33963
33964
33965  test -n "$TOOLCHAIN_PATH_CXX" && break
33966done
33967
33968      CXX=$TOOLCHAIN_PATH_CXX
33969      PATH="$PATH_save"
33970    fi
33971
33972    # AC_PATH_PROGS can't be run multiple times with the same variable,
33973    # so create a new name for this run.
33974    if test "x$CXX" = x; then
33975      for ac_prog in $SEARCH_LIST
33976do
33977  # Extract the first word of "$ac_prog", so it can be a program name with args.
33978set dummy $ac_prog; ac_word=$2
33979{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
33980$as_echo_n "checking for $ac_word... " >&6; }
33981if ${ac_cv_path_POTENTIAL_CXX+:} false; then :
33982  $as_echo_n "(cached) " >&6
33983else
33984  case $POTENTIAL_CXX in
33985  [\\/]* | ?:[\\/]*)
33986  ac_cv_path_POTENTIAL_CXX="$POTENTIAL_CXX" # Let the user override the test with a path.
33987  ;;
33988  *)
33989  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
33990for as_dir in $PATH
33991do
33992  IFS=$as_save_IFS
33993  test -z "$as_dir" && as_dir=.
33994    for ac_exec_ext in '' $ac_executable_extensions; do
33995  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
33996    ac_cv_path_POTENTIAL_CXX="$as_dir/$ac_word$ac_exec_ext"
33997    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
33998    break 2
33999  fi
34000done
34001  done
34002IFS=$as_save_IFS
34003
34004  ;;
34005esac
34006fi
34007POTENTIAL_CXX=$ac_cv_path_POTENTIAL_CXX
34008if test -n "$POTENTIAL_CXX"; then
34009  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $POTENTIAL_CXX" >&5
34010$as_echo "$POTENTIAL_CXX" >&6; }
34011else
34012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34013$as_echo "no" >&6; }
34014fi
34015
34016
34017  test -n "$POTENTIAL_CXX" && break
34018done
34019
34020      CXX=$POTENTIAL_CXX
34021    fi
34022
34023    if test "x$CXX" = x; then
34024
34025  # Print a helpful message on how to acquire the necessary build dependency.
34026  # devkit is the help tag: freetype, cups, alsa etc
34027  MISSING_DEPENDENCY=devkit
34028
34029  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34030    cygwin_help $MISSING_DEPENDENCY
34031  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34032    msys_help $MISSING_DEPENDENCY
34033  else
34034    PKGHANDLER_COMMAND=
34035
34036    case $PKGHANDLER in
34037      apt-get)
34038        apt_help     $MISSING_DEPENDENCY ;;
34039      yum)
34040        yum_help     $MISSING_DEPENDENCY ;;
34041      port)
34042        port_help    $MISSING_DEPENDENCY ;;
34043      pkgutil)
34044        pkgutil_help $MISSING_DEPENDENCY ;;
34045      pkgadd)
34046        pkgadd_help  $MISSING_DEPENDENCY ;;
34047    esac
34048
34049    if test "x$PKGHANDLER_COMMAND" != x; then
34050      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
34051    fi
34052  fi
34053
34054      as_fn_error $? "Could not find a $COMPILER_NAME compiler. $HELP_MSG" "$LINENO" 5
34055    fi
34056  fi
34057
34058  # Now we have a compiler binary in CXX. Make sure it's okay.
34059
34060  # Only process if variable expands to non-empty
34061
34062  if test "x$CXX" != x; then
34063    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34064
34065  # First separate the path from the arguments. This will split at the first
34066  # space.
34067  complete="$CXX"
34068  path="${complete%% *}"
34069  tmp="$complete EOL"
34070  arguments="${tmp#* }"
34071
34072  # Input might be given as Windows format, start by converting to
34073  # unix format.
34074  new_path=`$CYGPATH -u "$path"`
34075
34076  # Now try to locate executable using which
34077  new_path=`$WHICH "$new_path" 2> /dev/null`
34078  # bat and cmd files are not always considered executable in cygwin causing which
34079  # to not find them
34080  if test "x$new_path" = x \
34081      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34082      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34083    new_path=`$CYGPATH -u "$path"`
34084  fi
34085  if test "x$new_path" = x; then
34086    # Oops. Which didn't find the executable.
34087    # The splitting of arguments from the executable at a space might have been incorrect,
34088    # since paths with space are more likely in Windows. Give it another try with the whole
34089    # argument.
34090    path="$complete"
34091    arguments="EOL"
34092    new_path=`$CYGPATH -u "$path"`
34093    new_path=`$WHICH "$new_path" 2> /dev/null`
34094    # bat and cmd files are not always considered executable in cygwin causing which
34095    # to not find them
34096    if test "x$new_path" = x \
34097        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34098        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34099      new_path=`$CYGPATH -u "$path"`
34100    fi
34101    if test "x$new_path" = x; then
34102      # It's still not found. Now this is an unrecoverable error.
34103      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34104$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34105      has_space=`$ECHO "$complete" | $GREP " "`
34106      if test "x$has_space" != x; then
34107        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34108$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34109      fi
34110      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34111    fi
34112  fi
34113
34114  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
34115  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
34116  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
34117  # "foo.exe" is OK but "foo" is an error.
34118  #
34119  # This test is therefore slightly more accurate than "test -f" to check for file presence.
34120  # It is also a way to make sure we got the proper file name for the real test later on.
34121  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
34122  if test "x$test_shortpath" = x; then
34123    # Short path failed, file does not exist as specified.
34124    # Try adding .exe or .cmd
34125    if test -f "${new_path}.exe"; then
34126      input_to_shortpath="${new_path}.exe"
34127    elif test -f "${new_path}.cmd"; then
34128      input_to_shortpath="${new_path}.cmd"
34129    else
34130      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$new_path\", is invalid." >&5
34131$as_echo "$as_me: The path of CXX, which resolves as \"$new_path\", is invalid." >&6;}
34132      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
34133$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
34134      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34135    fi
34136  else
34137    input_to_shortpath="$new_path"
34138  fi
34139
34140  # Call helper function which possibly converts this using DOS-style short mode.
34141  # If so, the updated path is stored in $new_path.
34142  new_path="$input_to_shortpath"
34143
34144  input_path="$input_to_shortpath"
34145  # Check if we need to convert this using DOS-style short mode. If the path
34146  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34147  # take no chances and rewrite it.
34148  # Note: m4 eats our [], so we need to use [ and ] instead.
34149  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
34150  if test "x$has_forbidden_chars" != x; then
34151    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34152    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
34153    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
34154    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
34155      # Going to short mode and back again did indeed matter. Since short mode is
34156      # case insensitive, let's make it lowercase to improve readability.
34157      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34158      # Now convert it back to Unix-style (cygpath)
34159      input_path=`$CYGPATH -u "$shortmode_path"`
34160      new_path="$input_path"
34161    fi
34162  fi
34163
34164  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
34165  if test "x$test_cygdrive_prefix" = x; then
34166    # As a simple fix, exclude /usr/bin since it's not a real path.
34167    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
34168      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
34169      # a path prefixed by /cygdrive for fixpath to work.
34170      new_path="$CYGWIN_ROOT_PATH$input_path"
34171    fi
34172  fi
34173
34174  # remove trailing .exe if any
34175  new_path="${new_path/%.exe/}"
34176
34177    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34178
34179  # First separate the path from the arguments. This will split at the first
34180  # space.
34181  complete="$CXX"
34182  path="${complete%% *}"
34183  tmp="$complete EOL"
34184  arguments="${tmp#* }"
34185
34186  # Input might be given as Windows format, start by converting to
34187  # unix format.
34188  new_path="$path"
34189
34190  windows_path="$new_path"
34191  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34192    unix_path=`$CYGPATH -u "$windows_path"`
34193    new_path="$unix_path"
34194  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34195    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34196    new_path="$unix_path"
34197  fi
34198
34199
34200  # Now try to locate executable using which
34201  new_path=`$WHICH "$new_path" 2> /dev/null`
34202
34203  if test "x$new_path" = x; then
34204    # Oops. Which didn't find the executable.
34205    # The splitting of arguments from the executable at a space might have been incorrect,
34206    # since paths with space are more likely in Windows. Give it another try with the whole
34207    # argument.
34208    path="$complete"
34209    arguments="EOL"
34210    new_path="$path"
34211
34212  windows_path="$new_path"
34213  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34214    unix_path=`$CYGPATH -u "$windows_path"`
34215    new_path="$unix_path"
34216  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34217    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34218    new_path="$unix_path"
34219  fi
34220
34221
34222    new_path=`$WHICH "$new_path" 2> /dev/null`
34223    # bat and cmd files are not always considered executable in MSYS causing which
34224    # to not find them
34225    if test "x$new_path" = x \
34226        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
34227        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
34228      new_path="$path"
34229
34230  windows_path="$new_path"
34231  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34232    unix_path=`$CYGPATH -u "$windows_path"`
34233    new_path="$unix_path"
34234  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34235    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34236    new_path="$unix_path"
34237  fi
34238
34239    fi
34240
34241    if test "x$new_path" = x; then
34242      # It's still not found. Now this is an unrecoverable error.
34243      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34244$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34245      has_space=`$ECHO "$complete" | $GREP " "`
34246      if test "x$has_space" != x; then
34247        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
34248$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
34249      fi
34250      as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34251    fi
34252  fi
34253
34254  # Now new_path has a complete unix path to the binary
34255  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
34256    # Keep paths in /bin as-is, but remove trailing .exe if any
34257    new_path="${new_path/%.exe/}"
34258    # Do not save /bin paths to all_fixpath_prefixes!
34259  else
34260    # Not in mixed or Windows style, start by that.
34261    new_path=`cmd //c echo $new_path`
34262
34263  input_path="$new_path"
34264  # Check if we need to convert this using DOS-style short mode. If the path
34265  # contains just simple characters, use it. Otherwise (spaces, weird characters),
34266  # take no chances and rewrite it.
34267  # Note: m4 eats our [], so we need to use [ and ] instead.
34268  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
34269  if test "x$has_forbidden_chars" != x; then
34270    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
34271    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
34272  fi
34273
34274    # Output is in $new_path
34275
34276  windows_path="$new_path"
34277  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
34278    unix_path=`$CYGPATH -u "$windows_path"`
34279    new_path="$unix_path"
34280  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
34281    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
34282    new_path="$unix_path"
34283  fi
34284
34285    # remove trailing .exe if any
34286    new_path="${new_path/%.exe/}"
34287
34288    # Save the first 10 bytes of this path to the storage, so fixpath can work.
34289    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
34290  fi
34291
34292    else
34293      # We're on a unix platform. Hooray! :)
34294      # First separate the path from the arguments. This will split at the first
34295      # space.
34296      complete="$CXX"
34297      path="${complete%% *}"
34298      tmp="$complete EOL"
34299      arguments="${tmp#* }"
34300
34301      # Cannot rely on the command "which" here since it doesn't always work.
34302      is_absolute_path=`$ECHO "$path" | $GREP ^/`
34303      if test -z "$is_absolute_path"; then
34304        # Path to executable is not absolute. Find it.
34305        IFS_save="$IFS"
34306        IFS=:
34307        for p in $PATH; do
34308          if test -f "$p/$path" && test -x "$p/$path"; then
34309            new_path="$p/$path"
34310            break
34311          fi
34312        done
34313        IFS="$IFS_save"
34314      else
34315        # This is an absolute path, we can use it without further modifications.
34316        new_path="$path"
34317      fi
34318
34319      if test "x$new_path" = x; then
34320        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXX, which resolves as \"$complete\", is not found." >&5
34321$as_echo "$as_me: The path of CXX, which resolves as \"$complete\", is not found." >&6;}
34322        has_space=`$ECHO "$complete" | $GREP " "`
34323        if test "x$has_space" != x; then
34324          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
34325$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
34326        fi
34327        as_fn_error $? "Cannot locate the the path of CXX" "$LINENO" 5
34328      fi
34329    fi
34330
34331    # Now join together the path and the arguments once again
34332    if test "x$arguments" != xEOL; then
34333      new_complete="$new_path ${arguments% *}"
34334    else
34335      new_complete="$new_path"
34336    fi
34337
34338    if test "x$complete" != "x$new_complete"; then
34339      CXX="$new_complete"
34340      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXX to \"$new_complete\"" >&5
34341$as_echo "$as_me: Rewriting CXX to \"$new_complete\"" >&6;}
34342    fi
34343  fi
34344
34345  TEST_COMPILER="$CXX"
34346
34347  { $as_echo "$as_me:${as_lineno-$LINENO}: checking resolved symbolic links for CXX" >&5
34348$as_echo_n "checking resolved symbolic links for CXX... " >&6; }
34349  SYMLINK_ORIGINAL="$TEST_COMPILER"
34350
34351  if test "x$OPENJDK_BUILD_OS" != xwindows; then
34352    # Follow a chain of symbolic links. Use readlink
34353    # where it exists, else fall back to horribly
34354    # complicated shell code.
34355    if test "x$READLINK_TESTED" != yes; then
34356      # On MacOSX there is a readlink tool with a different
34357      # purpose than the GNU readlink tool. Check the found readlink.
34358      ISGNU=`$READLINK --version 2>&1 | $GREP GNU`
34359      if test "x$ISGNU" = x; then
34360        # A readlink that we do not know how to use.
34361        # Are there other non-GNU readlinks out there?
34362        READLINK_TESTED=yes
34363        READLINK=
34364      fi
34365    fi
34366
34367    if test "x$READLINK" != x; then
34368      SYMLINK_ORIGINAL=`$READLINK -f $SYMLINK_ORIGINAL`
34369    else
34370      # Save the current directory for restoring afterwards
34371      STARTDIR=$PWD
34372      COUNTER=0
34373      sym_link_dir=`$DIRNAME $SYMLINK_ORIGINAL`
34374      sym_link_file=`$BASENAME $SYMLINK_ORIGINAL`
34375      cd $sym_link_dir
34376      # Use -P flag to resolve symlinks in directories.
34377      cd `$THEPWDCMD -P`
34378      sym_link_dir=`$THEPWDCMD -P`
34379      # Resolve file symlinks
34380      while test $COUNTER -lt 20; do
34381        ISLINK=`$LS -l $sym_link_dir/$sym_link_file | $GREP '\->' | $SED -e 's/.*-> \(.*\)/\1/'`
34382        if test "x$ISLINK" == x; then
34383          # This is not a symbolic link! We are done!
34384          break
34385        fi
34386        # Again resolve directory symlinks since the target of the just found
34387        # link could be in a different directory
34388        cd `$DIRNAME $ISLINK`
34389        sym_link_dir=`$THEPWDCMD -P`
34390        sym_link_file=`$BASENAME $ISLINK`
34391        let COUNTER=COUNTER+1
34392      done
34393      cd $STARTDIR
34394      SYMLINK_ORIGINAL=$sym_link_dir/$sym_link_file
34395    fi
34396  fi
34397
34398  if test "x$TEST_COMPILER" = "x$SYMLINK_ORIGINAL"; then
34399    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no symlink" >&5
34400$as_echo "no symlink" >&6; }
34401  else
34402    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $SYMLINK_ORIGINAL" >&5
34403$as_echo "$SYMLINK_ORIGINAL" >&6; }
34404
34405    # We can't handle ccache by gcc wrappers, since we need to know if we're
34406    # using ccache. Instead ccache usage must be controlled by a configure option.
34407    COMPILER_BASENAME=`$BASENAME "$SYMLINK_ORIGINAL"`
34408    if test "x$COMPILER_BASENAME" = "xccache"; then
34409      { $as_echo "$as_me:${as_lineno-$LINENO}: Please use --enable-ccache instead of providing a wrapped compiler." >&5
34410$as_echo "$as_me: Please use --enable-ccache instead of providing a wrapped compiler." >&6;}
34411      as_fn_error $? "$TEST_COMPILER is a symbolic link to ccache. This is not supported." "$LINENO" 5
34412    fi
34413  fi
34414
34415
34416  COMPILER=$CXX
34417  COMPILER_NAME=$COMPILER_NAME
34418
34419  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
34420    # cc -V output typically looks like
34421    #     cc: Sun C 5.12 Linux_i386 2011/11/16
34422    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
34423    # Check that this is likely to be the Solaris Studio cc.
34424    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
34425    if test $? -ne 0; then
34426      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34427      { $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
34428$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34429      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34430$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34431      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34432$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34433      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34434    fi
34435    # Remove usage instructions (if present), and
34436    # collapse compiler output into a single line
34437    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34438        $SED -e 's/ *[Uu]sage:.*//'`
34439    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34440        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
34441  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
34442    # xlc -qversion output typically looks like
34443    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
34444    #     Version: 11.01.0000.0015
34445    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
34446    # Check that this is likely to be the IBM XL C compiler.
34447    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
34448    if test $? -ne 0; then
34449      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34450      { $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
34451$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34452      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34453$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34454      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
34455$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
34456      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34457    fi
34458    # Collapse compiler output into a single line
34459    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34460    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34461        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
34462  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
34463    # There is no specific version flag, but all output starts with a version string.
34464    # First line typically looks something like:
34465    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
34466    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
34467    # Check that this is likely to be Microsoft CL.EXE.
34468    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
34469    if test $? -ne 0; then
34470      { $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
34471$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34472      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34473$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34474      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34475    fi
34476    # Collapse compiler output into a single line
34477    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34478    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34479        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
34480  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
34481    # gcc --version output typically looks like
34482    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
34483    #     Copyright (C) 2013 Free Software Foundation, Inc.
34484    #     This is free software; see the source for copying conditions.  There is NO
34485    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
34486    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34487    # Check that this is likely to be GCC.
34488    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
34489    if test $? -ne 0; then
34490      { $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
34491$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34492      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
34493$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
34494      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34495    fi
34496    # Remove Copyright and legalese from version string, and
34497    # collapse into a single line
34498    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
34499        $SED -e 's/ *Copyright .*//'`
34500    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34501        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
34502  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
34503    # clang --version output typically looks like
34504    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
34505    #    clang version 3.3 (tags/RELEASE_33/final)
34506    # or
34507    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
34508    #    Target: x86_64-pc-linux-gnu
34509    #    Thread model: posix
34510    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
34511    # Check that this is likely to be clang
34512    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
34513    if test $? -ne 0; then
34514      { $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
34515$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
34516      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
34517$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
34518      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
34519    fi
34520    # Collapse compiler output into a single line
34521    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
34522    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
34523        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
34524  else
34525      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
34526  fi
34527  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
34528  CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
34529  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
34530  CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
34531
34532  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
34533$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
34534
34535
34536  # Now that we have resolved CXX ourself, let autoconf have its go at it
34537  ac_ext=cpp
34538ac_cpp='$CXXCPP $CPPFLAGS'
34539ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34540ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34541ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34542if test -z "$CXX"; then
34543  if test -n "$CCC"; then
34544    CXX=$CCC
34545  else
34546    if test -n "$ac_tool_prefix"; then
34547  for ac_prog in $CXX
34548  do
34549    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34550set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34551{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34552$as_echo_n "checking for $ac_word... " >&6; }
34553if ${ac_cv_prog_CXX+:} false; then :
34554  $as_echo_n "(cached) " >&6
34555else
34556  if test -n "$CXX"; then
34557  ac_cv_prog_CXX="$CXX" # Let the user override the test.
34558else
34559as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34560for as_dir in $PATH
34561do
34562  IFS=$as_save_IFS
34563  test -z "$as_dir" && as_dir=.
34564    for ac_exec_ext in '' $ac_executable_extensions; do
34565  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34566    ac_cv_prog_CXX="$ac_tool_prefix$ac_prog"
34567    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34568    break 2
34569  fi
34570done
34571  done
34572IFS=$as_save_IFS
34573
34574fi
34575fi
34576CXX=$ac_cv_prog_CXX
34577if test -n "$CXX"; then
34578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXX" >&5
34579$as_echo "$CXX" >&6; }
34580else
34581  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34582$as_echo "no" >&6; }
34583fi
34584
34585
34586    test -n "$CXX" && break
34587  done
34588fi
34589if test -z "$CXX"; then
34590  ac_ct_CXX=$CXX
34591  for ac_prog in $CXX
34592do
34593  # Extract the first word of "$ac_prog", so it can be a program name with args.
34594set dummy $ac_prog; ac_word=$2
34595{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
34596$as_echo_n "checking for $ac_word... " >&6; }
34597if ${ac_cv_prog_ac_ct_CXX+:} false; then :
34598  $as_echo_n "(cached) " >&6
34599else
34600  if test -n "$ac_ct_CXX"; then
34601  ac_cv_prog_ac_ct_CXX="$ac_ct_CXX" # Let the user override the test.
34602else
34603as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
34604for as_dir in $PATH
34605do
34606  IFS=$as_save_IFS
34607  test -z "$as_dir" && as_dir=.
34608    for ac_exec_ext in '' $ac_executable_extensions; do
34609  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
34610    ac_cv_prog_ac_ct_CXX="$ac_prog"
34611    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
34612    break 2
34613  fi
34614done
34615  done
34616IFS=$as_save_IFS
34617
34618fi
34619fi
34620ac_ct_CXX=$ac_cv_prog_ac_ct_CXX
34621if test -n "$ac_ct_CXX"; then
34622  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CXX" >&5
34623$as_echo "$ac_ct_CXX" >&6; }
34624else
34625  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
34626$as_echo "no" >&6; }
34627fi
34628
34629
34630  test -n "$ac_ct_CXX" && break
34631done
34632
34633  if test "x$ac_ct_CXX" = x; then
34634    CXX="g++"
34635  else
34636    case $cross_compiling:$ac_tool_warned in
34637yes:)
34638{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
34639$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
34640ac_tool_warned=yes ;;
34641esac
34642    CXX=$ac_ct_CXX
34643  fi
34644fi
34645
34646  fi
34647fi
34648# Provide some information about the compiler.
34649$as_echo "$as_me:${as_lineno-$LINENO}: checking for C++ compiler version" >&5
34650set X $ac_compile
34651ac_compiler=$2
34652for ac_option in --version -v -V -qversion; do
34653  { { ac_try="$ac_compiler $ac_option >&5"
34654case "(($ac_try" in
34655  *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;;
34656  *) ac_try_echo=$ac_try;;
34657esac
34658eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\""
34659$as_echo "$ac_try_echo"; } >&5
34660  (eval "$ac_compiler $ac_option >&5") 2>conftest.err
34661  ac_status=$?
34662  if test -s conftest.err; then
34663    sed '10a\
34664... rest of stderr output deleted ...
34665         10q' conftest.err >conftest.er1
34666    cat conftest.er1 >&5
34667  fi
34668  rm -f conftest.er1 conftest.err
34669  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
34670  test $ac_status = 0; }
34671done
34672
34673{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C++ compiler" >&5
34674$as_echo_n "checking whether we are using the GNU C++ compiler... " >&6; }
34675if ${ac_cv_cxx_compiler_gnu+:} false; then :
34676  $as_echo_n "(cached) " >&6
34677else
34678  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34679/* end confdefs.h.  */
34680
34681int
34682main ()
34683{
34684#ifndef __GNUC__
34685       choke me
34686#endif
34687
34688  ;
34689  return 0;
34690}
34691_ACEOF
34692if ac_fn_cxx_try_compile "$LINENO"; then :
34693  ac_compiler_gnu=yes
34694else
34695  ac_compiler_gnu=no
34696fi
34697rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34698ac_cv_cxx_compiler_gnu=$ac_compiler_gnu
34699
34700fi
34701{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_cxx_compiler_gnu" >&5
34702$as_echo "$ac_cv_cxx_compiler_gnu" >&6; }
34703if test $ac_compiler_gnu = yes; then
34704  GXX=yes
34705else
34706  GXX=
34707fi
34708ac_test_CXXFLAGS=${CXXFLAGS+set}
34709ac_save_CXXFLAGS=$CXXFLAGS
34710{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CXX accepts -g" >&5
34711$as_echo_n "checking whether $CXX accepts -g... " >&6; }
34712if ${ac_cv_prog_cxx_g+:} false; then :
34713  $as_echo_n "(cached) " >&6
34714else
34715  ac_save_cxx_werror_flag=$ac_cxx_werror_flag
34716   ac_cxx_werror_flag=yes
34717   ac_cv_prog_cxx_g=no
34718   CXXFLAGS="-g"
34719   cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34720/* end confdefs.h.  */
34721
34722int
34723main ()
34724{
34725
34726  ;
34727  return 0;
34728}
34729_ACEOF
34730if ac_fn_cxx_try_compile "$LINENO"; then :
34731  ac_cv_prog_cxx_g=yes
34732else
34733  CXXFLAGS=""
34734      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34735/* end confdefs.h.  */
34736
34737int
34738main ()
34739{
34740
34741  ;
34742  return 0;
34743}
34744_ACEOF
34745if ac_fn_cxx_try_compile "$LINENO"; then :
34746
34747else
34748  ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34749	 CXXFLAGS="-g"
34750	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34751/* end confdefs.h.  */
34752
34753int
34754main ()
34755{
34756
34757  ;
34758  return 0;
34759}
34760_ACEOF
34761if ac_fn_cxx_try_compile "$LINENO"; then :
34762  ac_cv_prog_cxx_g=yes
34763fi
34764rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34765fi
34766rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34767fi
34768rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
34769   ac_cxx_werror_flag=$ac_save_cxx_werror_flag
34770fi
34771{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cxx_g" >&5
34772$as_echo "$ac_cv_prog_cxx_g" >&6; }
34773if test "$ac_test_CXXFLAGS" = set; then
34774  CXXFLAGS=$ac_save_CXXFLAGS
34775elif test $ac_cv_prog_cxx_g = yes; then
34776  if test "$GXX" = yes; then
34777    CXXFLAGS="-g -O2"
34778  else
34779    CXXFLAGS="-g"
34780  fi
34781else
34782  if test "$GXX" = yes; then
34783    CXXFLAGS="-O2"
34784  else
34785    CXXFLAGS=
34786  fi
34787fi
34788ac_ext=cpp
34789ac_cpp='$CXXCPP $CPPFLAGS'
34790ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34791ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34792ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
34793
34794
34795  # This is the compiler version number on the form X.Y[.Z]
34796
34797
34798
34799
34800  if test "x$CC_VERSION_NUMBER" != "x$CXX_VERSION_NUMBER"; then
34801    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&5
34802$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $CC_VERSION_NUMBER vs $CXX_VERSION_NUMBER." >&2;}
34803    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
34804$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
34805  fi
34806
34807  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
34808  if  [[ "[$]CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
34809    { $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
34810$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;}
34811  fi
34812
34813  if  [[  "[$]CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
34814    { $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
34815$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
34816  fi
34817
34818  COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$CC_VERSION_NUMBER"`
34819
34820
34821  if test "x$TOOLCHAIN_MINIMUM_VERSION" != x; then
34822
34823
34824
34825
34826
34827
34828
34829
34830
34831
34832
34833
34834
34835
34836
34837
34838
34839
34840
34841
34842
34843
34844
34845
34846
34847
34848
34849
34850
34851
34852
34853
34854
34855
34856
34857
34858
34859
34860
34861
34862
34863
34864
34865
34866
34867
34868
34869
34870
34871    # Execute function body
34872
34873  # Need to assign to a variable since m4 is blocked from modifying parts in [].
34874  REFERENCE_VERSION=$TOOLCHAIN_MINIMUM_VERSION
34875
34876  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
34877    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only three parts (X.Y.Z) is supported" "$LINENO" 5
34878  fi
34879
34880  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
34881    as_fn_error $? "Internal error: Cannot compare to $TOOLCHAIN_MINIMUM_VERSION, only parts < 99999 is supported" "$LINENO" 5
34882  fi
34883
34884  # Version comparison method inspired by http://stackoverflow.com/a/24067243
34885  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
34886
34887  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
34888    :
34889
34890  else
34891    :
34892
34893          { $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
34894$as_echo "$as_me: WARNING: You are using $TOOLCHAIN_TYPE older than $TOOLCHAIN_MINIMUM_VERSION. This is not a supported configuration." >&2;}
34895
34896
34897  fi
34898
34899
34900
34901
34902
34903
34904
34905
34906
34907
34908
34909
34910
34911
34912  fi
34913
34914  #
34915  # Setup the preprocessor (CPP and CXXCPP)
34916  #
34917  ac_ext=c
34918ac_cpp='$CPP $CPPFLAGS'
34919ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
34920ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
34921ac_compiler_gnu=$ac_cv_c_compiler_gnu
34922{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5
34923$as_echo_n "checking how to run the C preprocessor... " >&6; }
34924# On Suns, sometimes $CPP names a directory.
34925if test -n "$CPP" && test -d "$CPP"; then
34926  CPP=
34927fi
34928if test -z "$CPP"; then
34929  if ${ac_cv_prog_CPP+:} false; then :
34930  $as_echo_n "(cached) " >&6
34931else
34932      # Double quotes because CPP needs to be expanded
34933    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
34934    do
34935      ac_preproc_ok=false
34936for ac_c_preproc_warn_flag in '' yes
34937do
34938  # Use a header file that comes with gcc, so configuring glibc
34939  # with a fresh cross-compiler works.
34940  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
34941  # <limits.h> exists even on freestanding compilers.
34942  # On the NeXT, cc -E runs the code through the compiler's parser,
34943  # not just through cpp. "Syntax error" is here to catch this case.
34944  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34945/* end confdefs.h.  */
34946#ifdef __STDC__
34947# include <limits.h>
34948#else
34949# include <assert.h>
34950#endif
34951		     Syntax error
34952_ACEOF
34953if ac_fn_c_try_cpp "$LINENO"; then :
34954
34955else
34956  # Broken: fails on valid input.
34957continue
34958fi
34959rm -f conftest.err conftest.i conftest.$ac_ext
34960
34961  # OK, works on sane cases.  Now check whether nonexistent headers
34962  # can be detected and how.
34963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
34964/* end confdefs.h.  */
34965#include <ac_nonexistent.h>
34966_ACEOF
34967if ac_fn_c_try_cpp "$LINENO"; then :
34968  # Broken: success on invalid input.
34969continue
34970else
34971  # Passes both tests.
34972ac_preproc_ok=:
34973break
34974fi
34975rm -f conftest.err conftest.i conftest.$ac_ext
34976
34977done
34978# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
34979rm -f conftest.i conftest.err conftest.$ac_ext
34980if $ac_preproc_ok; then :
34981  break
34982fi
34983
34984    done
34985    ac_cv_prog_CPP=$CPP
34986
34987fi
34988  CPP=$ac_cv_prog_CPP
34989else
34990  ac_cv_prog_CPP=$CPP
34991fi
34992{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5
34993$as_echo "$CPP" >&6; }
34994ac_preproc_ok=false
34995for ac_c_preproc_warn_flag in '' yes
34996do
34997  # Use a header file that comes with gcc, so configuring glibc
34998  # with a fresh cross-compiler works.
34999  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35000  # <limits.h> exists even on freestanding compilers.
35001  # On the NeXT, cc -E runs the code through the compiler's parser,
35002  # not just through cpp. "Syntax error" is here to catch this case.
35003  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35004/* end confdefs.h.  */
35005#ifdef __STDC__
35006# include <limits.h>
35007#else
35008# include <assert.h>
35009#endif
35010		     Syntax error
35011_ACEOF
35012if ac_fn_c_try_cpp "$LINENO"; then :
35013
35014else
35015  # Broken: fails on valid input.
35016continue
35017fi
35018rm -f conftest.err conftest.i conftest.$ac_ext
35019
35020  # OK, works on sane cases.  Now check whether nonexistent headers
35021  # can be detected and how.
35022  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35023/* end confdefs.h.  */
35024#include <ac_nonexistent.h>
35025_ACEOF
35026if ac_fn_c_try_cpp "$LINENO"; then :
35027  # Broken: success on invalid input.
35028continue
35029else
35030  # Passes both tests.
35031ac_preproc_ok=:
35032break
35033fi
35034rm -f conftest.err conftest.i conftest.$ac_ext
35035
35036done
35037# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35038rm -f conftest.i conftest.err conftest.$ac_ext
35039if $ac_preproc_ok; then :
35040
35041else
35042  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35043$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35044as_fn_error $? "C preprocessor \"$CPP\" fails sanity check
35045See \`config.log' for more details" "$LINENO" 5; }
35046fi
35047
35048ac_ext=cpp
35049ac_cpp='$CXXCPP $CPPFLAGS'
35050ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35051ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35052ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35053
35054
35055  # Only process if variable expands to non-empty
35056
35057  if test "x$CPP" != x; then
35058    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35059
35060  # First separate the path from the arguments. This will split at the first
35061  # space.
35062  complete="$CPP"
35063  path="${complete%% *}"
35064  tmp="$complete EOL"
35065  arguments="${tmp#* }"
35066
35067  # Input might be given as Windows format, start by converting to
35068  # unix format.
35069  new_path=`$CYGPATH -u "$path"`
35070
35071  # Now try to locate executable using which
35072  new_path=`$WHICH "$new_path" 2> /dev/null`
35073  # bat and cmd files are not always considered executable in cygwin causing which
35074  # to not find them
35075  if test "x$new_path" = x \
35076      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35077      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35078    new_path=`$CYGPATH -u "$path"`
35079  fi
35080  if test "x$new_path" = x; then
35081    # Oops. Which didn't find the executable.
35082    # The splitting of arguments from the executable at a space might have been incorrect,
35083    # since paths with space are more likely in Windows. Give it another try with the whole
35084    # argument.
35085    path="$complete"
35086    arguments="EOL"
35087    new_path=`$CYGPATH -u "$path"`
35088    new_path=`$WHICH "$new_path" 2> /dev/null`
35089    # bat and cmd files are not always considered executable in cygwin causing which
35090    # to not find them
35091    if test "x$new_path" = x \
35092        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35093        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35094      new_path=`$CYGPATH -u "$path"`
35095    fi
35096    if test "x$new_path" = x; then
35097      # It's still not found. Now this is an unrecoverable error.
35098      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35099$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35100      has_space=`$ECHO "$complete" | $GREP " "`
35101      if test "x$has_space" != x; then
35102        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35103$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35104      fi
35105      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35106    fi
35107  fi
35108
35109  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35110  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35111  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35112  # "foo.exe" is OK but "foo" is an error.
35113  #
35114  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35115  # It is also a way to make sure we got the proper file name for the real test later on.
35116  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35117  if test "x$test_shortpath" = x; then
35118    # Short path failed, file does not exist as specified.
35119    # Try adding .exe or .cmd
35120    if test -f "${new_path}.exe"; then
35121      input_to_shortpath="${new_path}.exe"
35122    elif test -f "${new_path}.cmd"; then
35123      input_to_shortpath="${new_path}.cmd"
35124    else
35125      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$new_path\", is invalid." >&5
35126$as_echo "$as_me: The path of CPP, which resolves as \"$new_path\", is invalid." >&6;}
35127      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35128$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35129      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35130    fi
35131  else
35132    input_to_shortpath="$new_path"
35133  fi
35134
35135  # Call helper function which possibly converts this using DOS-style short mode.
35136  # If so, the updated path is stored in $new_path.
35137  new_path="$input_to_shortpath"
35138
35139  input_path="$input_to_shortpath"
35140  # Check if we need to convert this using DOS-style short mode. If the path
35141  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35142  # take no chances and rewrite it.
35143  # Note: m4 eats our [], so we need to use [ and ] instead.
35144  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35145  if test "x$has_forbidden_chars" != x; then
35146    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35147    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35148    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35149    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35150      # Going to short mode and back again did indeed matter. Since short mode is
35151      # case insensitive, let's make it lowercase to improve readability.
35152      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35153      # Now convert it back to Unix-style (cygpath)
35154      input_path=`$CYGPATH -u "$shortmode_path"`
35155      new_path="$input_path"
35156    fi
35157  fi
35158
35159  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35160  if test "x$test_cygdrive_prefix" = x; then
35161    # As a simple fix, exclude /usr/bin since it's not a real path.
35162    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35163      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35164      # a path prefixed by /cygdrive for fixpath to work.
35165      new_path="$CYGWIN_ROOT_PATH$input_path"
35166    fi
35167  fi
35168
35169  # remove trailing .exe if any
35170  new_path="${new_path/%.exe/}"
35171
35172    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35173
35174  # First separate the path from the arguments. This will split at the first
35175  # space.
35176  complete="$CPP"
35177  path="${complete%% *}"
35178  tmp="$complete EOL"
35179  arguments="${tmp#* }"
35180
35181  # Input might be given as Windows format, start by converting to
35182  # unix format.
35183  new_path="$path"
35184
35185  windows_path="$new_path"
35186  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35187    unix_path=`$CYGPATH -u "$windows_path"`
35188    new_path="$unix_path"
35189  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35190    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35191    new_path="$unix_path"
35192  fi
35193
35194
35195  # Now try to locate executable using which
35196  new_path=`$WHICH "$new_path" 2> /dev/null`
35197
35198  if test "x$new_path" = x; then
35199    # Oops. Which didn't find the executable.
35200    # The splitting of arguments from the executable at a space might have been incorrect,
35201    # since paths with space are more likely in Windows. Give it another try with the whole
35202    # argument.
35203    path="$complete"
35204    arguments="EOL"
35205    new_path="$path"
35206
35207  windows_path="$new_path"
35208  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35209    unix_path=`$CYGPATH -u "$windows_path"`
35210    new_path="$unix_path"
35211  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35212    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35213    new_path="$unix_path"
35214  fi
35215
35216
35217    new_path=`$WHICH "$new_path" 2> /dev/null`
35218    # bat and cmd files are not always considered executable in MSYS causing which
35219    # to not find them
35220    if test "x$new_path" = x \
35221        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35222        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35223      new_path="$path"
35224
35225  windows_path="$new_path"
35226  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35227    unix_path=`$CYGPATH -u "$windows_path"`
35228    new_path="$unix_path"
35229  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35230    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35231    new_path="$unix_path"
35232  fi
35233
35234    fi
35235
35236    if test "x$new_path" = x; then
35237      # It's still not found. Now this is an unrecoverable error.
35238      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35239$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35240      has_space=`$ECHO "$complete" | $GREP " "`
35241      if test "x$has_space" != x; then
35242        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35243$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35244      fi
35245      as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35246    fi
35247  fi
35248
35249  # Now new_path has a complete unix path to the binary
35250  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35251    # Keep paths in /bin as-is, but remove trailing .exe if any
35252    new_path="${new_path/%.exe/}"
35253    # Do not save /bin paths to all_fixpath_prefixes!
35254  else
35255    # Not in mixed or Windows style, start by that.
35256    new_path=`cmd //c echo $new_path`
35257
35258  input_path="$new_path"
35259  # Check if we need to convert this using DOS-style short mode. If the path
35260  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35261  # take no chances and rewrite it.
35262  # Note: m4 eats our [], so we need to use [ and ] instead.
35263  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35264  if test "x$has_forbidden_chars" != x; then
35265    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35266    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35267  fi
35268
35269    # Output is in $new_path
35270
35271  windows_path="$new_path"
35272  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35273    unix_path=`$CYGPATH -u "$windows_path"`
35274    new_path="$unix_path"
35275  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35276    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35277    new_path="$unix_path"
35278  fi
35279
35280    # remove trailing .exe if any
35281    new_path="${new_path/%.exe/}"
35282
35283    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35284    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35285  fi
35286
35287    else
35288      # We're on a unix platform. Hooray! :)
35289      # First separate the path from the arguments. This will split at the first
35290      # space.
35291      complete="$CPP"
35292      path="${complete%% *}"
35293      tmp="$complete EOL"
35294      arguments="${tmp#* }"
35295
35296      # Cannot rely on the command "which" here since it doesn't always work.
35297      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35298      if test -z "$is_absolute_path"; then
35299        # Path to executable is not absolute. Find it.
35300        IFS_save="$IFS"
35301        IFS=:
35302        for p in $PATH; do
35303          if test -f "$p/$path" && test -x "$p/$path"; then
35304            new_path="$p/$path"
35305            break
35306          fi
35307        done
35308        IFS="$IFS_save"
35309      else
35310        # This is an absolute path, we can use it without further modifications.
35311        new_path="$path"
35312      fi
35313
35314      if test "x$new_path" = x; then
35315        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CPP, which resolves as \"$complete\", is not found." >&5
35316$as_echo "$as_me: The path of CPP, which resolves as \"$complete\", is not found." >&6;}
35317        has_space=`$ECHO "$complete" | $GREP " "`
35318        if test "x$has_space" != x; then
35319          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35320$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35321        fi
35322        as_fn_error $? "Cannot locate the the path of CPP" "$LINENO" 5
35323      fi
35324    fi
35325
35326    # Now join together the path and the arguments once again
35327    if test "x$arguments" != xEOL; then
35328      new_complete="$new_path ${arguments% *}"
35329    else
35330      new_complete="$new_path"
35331    fi
35332
35333    if test "x$complete" != "x$new_complete"; then
35334      CPP="$new_complete"
35335      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CPP to \"$new_complete\"" >&5
35336$as_echo "$as_me: Rewriting CPP to \"$new_complete\"" >&6;}
35337    fi
35338  fi
35339
35340  ac_ext=cpp
35341ac_cpp='$CXXCPP $CPPFLAGS'
35342ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35343ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35344ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35345{ $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C++ preprocessor" >&5
35346$as_echo_n "checking how to run the C++ preprocessor... " >&6; }
35347if test -z "$CXXCPP"; then
35348  if ${ac_cv_prog_CXXCPP+:} false; then :
35349  $as_echo_n "(cached) " >&6
35350else
35351      # Double quotes because CXXCPP needs to be expanded
35352    for CXXCPP in "$CXX -E" "/lib/cpp"
35353    do
35354      ac_preproc_ok=false
35355for ac_cxx_preproc_warn_flag in '' yes
35356do
35357  # Use a header file that comes with gcc, so configuring glibc
35358  # with a fresh cross-compiler works.
35359  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35360  # <limits.h> exists even on freestanding compilers.
35361  # On the NeXT, cc -E runs the code through the compiler's parser,
35362  # not just through cpp. "Syntax error" is here to catch this case.
35363  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35364/* end confdefs.h.  */
35365#ifdef __STDC__
35366# include <limits.h>
35367#else
35368# include <assert.h>
35369#endif
35370		     Syntax error
35371_ACEOF
35372if ac_fn_cxx_try_cpp "$LINENO"; then :
35373
35374else
35375  # Broken: fails on valid input.
35376continue
35377fi
35378rm -f conftest.err conftest.i conftest.$ac_ext
35379
35380  # OK, works on sane cases.  Now check whether nonexistent headers
35381  # can be detected and how.
35382  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35383/* end confdefs.h.  */
35384#include <ac_nonexistent.h>
35385_ACEOF
35386if ac_fn_cxx_try_cpp "$LINENO"; then :
35387  # Broken: success on invalid input.
35388continue
35389else
35390  # Passes both tests.
35391ac_preproc_ok=:
35392break
35393fi
35394rm -f conftest.err conftest.i conftest.$ac_ext
35395
35396done
35397# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35398rm -f conftest.i conftest.err conftest.$ac_ext
35399if $ac_preproc_ok; then :
35400  break
35401fi
35402
35403    done
35404    ac_cv_prog_CXXCPP=$CXXCPP
35405
35406fi
35407  CXXCPP=$ac_cv_prog_CXXCPP
35408else
35409  ac_cv_prog_CXXCPP=$CXXCPP
35410fi
35411{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CXXCPP" >&5
35412$as_echo "$CXXCPP" >&6; }
35413ac_preproc_ok=false
35414for ac_cxx_preproc_warn_flag in '' yes
35415do
35416  # Use a header file that comes with gcc, so configuring glibc
35417  # with a fresh cross-compiler works.
35418  # Prefer <limits.h> to <assert.h> if __STDC__ is defined, since
35419  # <limits.h> exists even on freestanding compilers.
35420  # On the NeXT, cc -E runs the code through the compiler's parser,
35421  # not just through cpp. "Syntax error" is here to catch this case.
35422  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35423/* end confdefs.h.  */
35424#ifdef __STDC__
35425# include <limits.h>
35426#else
35427# include <assert.h>
35428#endif
35429		     Syntax error
35430_ACEOF
35431if ac_fn_cxx_try_cpp "$LINENO"; then :
35432
35433else
35434  # Broken: fails on valid input.
35435continue
35436fi
35437rm -f conftest.err conftest.i conftest.$ac_ext
35438
35439  # OK, works on sane cases.  Now check whether nonexistent headers
35440  # can be detected and how.
35441  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
35442/* end confdefs.h.  */
35443#include <ac_nonexistent.h>
35444_ACEOF
35445if ac_fn_cxx_try_cpp "$LINENO"; then :
35446  # Broken: success on invalid input.
35447continue
35448else
35449  # Passes both tests.
35450ac_preproc_ok=:
35451break
35452fi
35453rm -f conftest.err conftest.i conftest.$ac_ext
35454
35455done
35456# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
35457rm -f conftest.i conftest.err conftest.$ac_ext
35458if $ac_preproc_ok; then :
35459
35460else
35461  { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
35462$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
35463as_fn_error $? "C++ preprocessor \"$CXXCPP\" fails sanity check
35464See \`config.log' for more details" "$LINENO" 5; }
35465fi
35466
35467ac_ext=cpp
35468ac_cpp='$CXXCPP $CPPFLAGS'
35469ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
35470ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
35471ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
35472
35473
35474  # Only process if variable expands to non-empty
35475
35476  if test "x$CXXCPP" != x; then
35477    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35478
35479  # First separate the path from the arguments. This will split at the first
35480  # space.
35481  complete="$CXXCPP"
35482  path="${complete%% *}"
35483  tmp="$complete EOL"
35484  arguments="${tmp#* }"
35485
35486  # Input might be given as Windows format, start by converting to
35487  # unix format.
35488  new_path=`$CYGPATH -u "$path"`
35489
35490  # Now try to locate executable using which
35491  new_path=`$WHICH "$new_path" 2> /dev/null`
35492  # bat and cmd files are not always considered executable in cygwin causing which
35493  # to not find them
35494  if test "x$new_path" = x \
35495      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35496      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35497    new_path=`$CYGPATH -u "$path"`
35498  fi
35499  if test "x$new_path" = x; then
35500    # Oops. Which didn't find the executable.
35501    # The splitting of arguments from the executable at a space might have been incorrect,
35502    # since paths with space are more likely in Windows. Give it another try with the whole
35503    # argument.
35504    path="$complete"
35505    arguments="EOL"
35506    new_path=`$CYGPATH -u "$path"`
35507    new_path=`$WHICH "$new_path" 2> /dev/null`
35508    # bat and cmd files are not always considered executable in cygwin causing which
35509    # to not find them
35510    if test "x$new_path" = x \
35511        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35512        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35513      new_path=`$CYGPATH -u "$path"`
35514    fi
35515    if test "x$new_path" = x; then
35516      # It's still not found. Now this is an unrecoverable error.
35517      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35518$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35519      has_space=`$ECHO "$complete" | $GREP " "`
35520      if test "x$has_space" != x; then
35521        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35522$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35523      fi
35524      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35525    fi
35526  fi
35527
35528  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35529  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35530  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35531  # "foo.exe" is OK but "foo" is an error.
35532  #
35533  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35534  # It is also a way to make sure we got the proper file name for the real test later on.
35535  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35536  if test "x$test_shortpath" = x; then
35537    # Short path failed, file does not exist as specified.
35538    # Try adding .exe or .cmd
35539    if test -f "${new_path}.exe"; then
35540      input_to_shortpath="${new_path}.exe"
35541    elif test -f "${new_path}.cmd"; then
35542      input_to_shortpath="${new_path}.cmd"
35543    else
35544      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&5
35545$as_echo "$as_me: The path of CXXCPP, which resolves as \"$new_path\", is invalid." >&6;}
35546      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35547$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35548      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35549    fi
35550  else
35551    input_to_shortpath="$new_path"
35552  fi
35553
35554  # Call helper function which possibly converts this using DOS-style short mode.
35555  # If so, the updated path is stored in $new_path.
35556  new_path="$input_to_shortpath"
35557
35558  input_path="$input_to_shortpath"
35559  # Check if we need to convert this using DOS-style short mode. If the path
35560  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35561  # take no chances and rewrite it.
35562  # Note: m4 eats our [], so we need to use [ and ] instead.
35563  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35564  if test "x$has_forbidden_chars" != x; then
35565    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35566    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35567    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35568    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35569      # Going to short mode and back again did indeed matter. Since short mode is
35570      # case insensitive, let's make it lowercase to improve readability.
35571      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35572      # Now convert it back to Unix-style (cygpath)
35573      input_path=`$CYGPATH -u "$shortmode_path"`
35574      new_path="$input_path"
35575    fi
35576  fi
35577
35578  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35579  if test "x$test_cygdrive_prefix" = x; then
35580    # As a simple fix, exclude /usr/bin since it's not a real path.
35581    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35582      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35583      # a path prefixed by /cygdrive for fixpath to work.
35584      new_path="$CYGWIN_ROOT_PATH$input_path"
35585    fi
35586  fi
35587
35588  # remove trailing .exe if any
35589  new_path="${new_path/%.exe/}"
35590
35591    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35592
35593  # First separate the path from the arguments. This will split at the first
35594  # space.
35595  complete="$CXXCPP"
35596  path="${complete%% *}"
35597  tmp="$complete EOL"
35598  arguments="${tmp#* }"
35599
35600  # Input might be given as Windows format, start by converting to
35601  # unix format.
35602  new_path="$path"
35603
35604  windows_path="$new_path"
35605  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35606    unix_path=`$CYGPATH -u "$windows_path"`
35607    new_path="$unix_path"
35608  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35609    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35610    new_path="$unix_path"
35611  fi
35612
35613
35614  # Now try to locate executable using which
35615  new_path=`$WHICH "$new_path" 2> /dev/null`
35616
35617  if test "x$new_path" = x; then
35618    # Oops. Which didn't find the executable.
35619    # The splitting of arguments from the executable at a space might have been incorrect,
35620    # since paths with space are more likely in Windows. Give it another try with the whole
35621    # argument.
35622    path="$complete"
35623    arguments="EOL"
35624    new_path="$path"
35625
35626  windows_path="$new_path"
35627  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35628    unix_path=`$CYGPATH -u "$windows_path"`
35629    new_path="$unix_path"
35630  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35631    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35632    new_path="$unix_path"
35633  fi
35634
35635
35636    new_path=`$WHICH "$new_path" 2> /dev/null`
35637    # bat and cmd files are not always considered executable in MSYS causing which
35638    # to not find them
35639    if test "x$new_path" = x \
35640        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35641        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35642      new_path="$path"
35643
35644  windows_path="$new_path"
35645  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35646    unix_path=`$CYGPATH -u "$windows_path"`
35647    new_path="$unix_path"
35648  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35649    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35650    new_path="$unix_path"
35651  fi
35652
35653    fi
35654
35655    if test "x$new_path" = x; then
35656      # It's still not found. Now this is an unrecoverable error.
35657      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35658$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35659      has_space=`$ECHO "$complete" | $GREP " "`
35660      if test "x$has_space" != x; then
35661        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35662$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35663      fi
35664      as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35665    fi
35666  fi
35667
35668  # Now new_path has a complete unix path to the binary
35669  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
35670    # Keep paths in /bin as-is, but remove trailing .exe if any
35671    new_path="${new_path/%.exe/}"
35672    # Do not save /bin paths to all_fixpath_prefixes!
35673  else
35674    # Not in mixed or Windows style, start by that.
35675    new_path=`cmd //c echo $new_path`
35676
35677  input_path="$new_path"
35678  # Check if we need to convert this using DOS-style short mode. If the path
35679  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35680  # take no chances and rewrite it.
35681  # Note: m4 eats our [], so we need to use [ and ] instead.
35682  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
35683  if test "x$has_forbidden_chars" != x; then
35684    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35685    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35686  fi
35687
35688    # Output is in $new_path
35689
35690  windows_path="$new_path"
35691  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35692    unix_path=`$CYGPATH -u "$windows_path"`
35693    new_path="$unix_path"
35694  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35695    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35696    new_path="$unix_path"
35697  fi
35698
35699    # remove trailing .exe if any
35700    new_path="${new_path/%.exe/}"
35701
35702    # Save the first 10 bytes of this path to the storage, so fixpath can work.
35703    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
35704  fi
35705
35706    else
35707      # We're on a unix platform. Hooray! :)
35708      # First separate the path from the arguments. This will split at the first
35709      # space.
35710      complete="$CXXCPP"
35711      path="${complete%% *}"
35712      tmp="$complete EOL"
35713      arguments="${tmp#* }"
35714
35715      # Cannot rely on the command "which" here since it doesn't always work.
35716      is_absolute_path=`$ECHO "$path" | $GREP ^/`
35717      if test -z "$is_absolute_path"; then
35718        # Path to executable is not absolute. Find it.
35719        IFS_save="$IFS"
35720        IFS=:
35721        for p in $PATH; do
35722          if test -f "$p/$path" && test -x "$p/$path"; then
35723            new_path="$p/$path"
35724            break
35725          fi
35726        done
35727        IFS="$IFS_save"
35728      else
35729        # This is an absolute path, we can use it without further modifications.
35730        new_path="$path"
35731      fi
35732
35733      if test "x$new_path" = x; then
35734        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of CXXCPP, which resolves as \"$complete\", is not found." >&5
35735$as_echo "$as_me: The path of CXXCPP, which resolves as \"$complete\", is not found." >&6;}
35736        has_space=`$ECHO "$complete" | $GREP " "`
35737        if test "x$has_space" != x; then
35738          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
35739$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
35740        fi
35741        as_fn_error $? "Cannot locate the the path of CXXCPP" "$LINENO" 5
35742      fi
35743    fi
35744
35745    # Now join together the path and the arguments once again
35746    if test "x$arguments" != xEOL; then
35747      new_complete="$new_path ${arguments% *}"
35748    else
35749      new_complete="$new_path"
35750    fi
35751
35752    if test "x$complete" != "x$new_complete"; then
35753      CXXCPP="$new_complete"
35754      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting CXXCPP to \"$new_complete\"" >&5
35755$as_echo "$as_me: Rewriting CXXCPP to \"$new_complete\"" >&6;}
35756    fi
35757  fi
35758
35759
35760  #
35761  # Setup the linker (LD)
35762  #
35763  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
35764    # In the Microsoft toolchain we have a separate LD command "link".
35765    # Make sure we reject /usr/bin/link (as determined in CYGWIN_LINK), which is
35766    # a cygwin program for something completely different.
35767    # Extract the first word of "link", so it can be a program name with args.
35768set dummy link; ac_word=$2
35769{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
35770$as_echo_n "checking for $ac_word... " >&6; }
35771if ${ac_cv_prog_LD+:} false; then :
35772  $as_echo_n "(cached) " >&6
35773else
35774  if test -n "$LD"; then
35775  ac_cv_prog_LD="$LD" # Let the user override the test.
35776else
35777  ac_prog_rejected=no
35778as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
35779for as_dir in $PATH
35780do
35781  IFS=$as_save_IFS
35782  test -z "$as_dir" && as_dir=.
35783    for ac_exec_ext in '' $ac_executable_extensions; do
35784  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
35785    if test "$as_dir/$ac_word$ac_exec_ext" = "$CYGWIN_LINK"; then
35786       ac_prog_rejected=yes
35787       continue
35788     fi
35789    ac_cv_prog_LD="link"
35790    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
35791    break 2
35792  fi
35793done
35794  done
35795IFS=$as_save_IFS
35796
35797if test $ac_prog_rejected = yes; then
35798  # We found a bogon in the path, so make sure we never use it.
35799  set dummy $ac_cv_prog_LD
35800  shift
35801  if test $# != 0; then
35802    # We chose a different compiler from the bogus one.
35803    # However, it has the same basename, so the bogon will be chosen
35804    # first if we set LD to just the basename; use the full file name.
35805    shift
35806    ac_cv_prog_LD="$as_dir/$ac_word${1+' '}$@"
35807  fi
35808fi
35809fi
35810fi
35811LD=$ac_cv_prog_LD
35812if test -n "$LD"; then
35813  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LD" >&5
35814$as_echo "$LD" >&6; }
35815else
35816  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
35817$as_echo "no" >&6; }
35818fi
35819
35820
35821
35822  # Only process if variable expands to non-empty
35823
35824  if test "x$LD" != x; then
35825    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35826
35827  # First separate the path from the arguments. This will split at the first
35828  # space.
35829  complete="$LD"
35830  path="${complete%% *}"
35831  tmp="$complete EOL"
35832  arguments="${tmp#* }"
35833
35834  # Input might be given as Windows format, start by converting to
35835  # unix format.
35836  new_path=`$CYGPATH -u "$path"`
35837
35838  # Now try to locate executable using which
35839  new_path=`$WHICH "$new_path" 2> /dev/null`
35840  # bat and cmd files are not always considered executable in cygwin causing which
35841  # to not find them
35842  if test "x$new_path" = x \
35843      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35844      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35845    new_path=`$CYGPATH -u "$path"`
35846  fi
35847  if test "x$new_path" = x; then
35848    # Oops. Which didn't find the executable.
35849    # The splitting of arguments from the executable at a space might have been incorrect,
35850    # since paths with space are more likely in Windows. Give it another try with the whole
35851    # argument.
35852    path="$complete"
35853    arguments="EOL"
35854    new_path=`$CYGPATH -u "$path"`
35855    new_path=`$WHICH "$new_path" 2> /dev/null`
35856    # bat and cmd files are not always considered executable in cygwin causing which
35857    # to not find them
35858    if test "x$new_path" = x \
35859        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35860        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35861      new_path=`$CYGPATH -u "$path"`
35862    fi
35863    if test "x$new_path" = x; then
35864      # It's still not found. Now this is an unrecoverable error.
35865      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
35866$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
35867      has_space=`$ECHO "$complete" | $GREP " "`
35868      if test "x$has_space" != x; then
35869        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
35870$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
35871      fi
35872      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35873    fi
35874  fi
35875
35876  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
35877  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
35878  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
35879  # "foo.exe" is OK but "foo" is an error.
35880  #
35881  # This test is therefore slightly more accurate than "test -f" to check for file presence.
35882  # It is also a way to make sure we got the proper file name for the real test later on.
35883  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
35884  if test "x$test_shortpath" = x; then
35885    # Short path failed, file does not exist as specified.
35886    # Try adding .exe or .cmd
35887    if test -f "${new_path}.exe"; then
35888      input_to_shortpath="${new_path}.exe"
35889    elif test -f "${new_path}.cmd"; then
35890      input_to_shortpath="${new_path}.cmd"
35891    else
35892      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$new_path\", is invalid." >&5
35893$as_echo "$as_me: The path of LD, which resolves as \"$new_path\", is invalid." >&6;}
35894      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
35895$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
35896      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
35897    fi
35898  else
35899    input_to_shortpath="$new_path"
35900  fi
35901
35902  # Call helper function which possibly converts this using DOS-style short mode.
35903  # If so, the updated path is stored in $new_path.
35904  new_path="$input_to_shortpath"
35905
35906  input_path="$input_to_shortpath"
35907  # Check if we need to convert this using DOS-style short mode. If the path
35908  # contains just simple characters, use it. Otherwise (spaces, weird characters),
35909  # take no chances and rewrite it.
35910  # Note: m4 eats our [], so we need to use [ and ] instead.
35911  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
35912  if test "x$has_forbidden_chars" != x; then
35913    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
35914    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
35915    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
35916    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
35917      # Going to short mode and back again did indeed matter. Since short mode is
35918      # case insensitive, let's make it lowercase to improve readability.
35919      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
35920      # Now convert it back to Unix-style (cygpath)
35921      input_path=`$CYGPATH -u "$shortmode_path"`
35922      new_path="$input_path"
35923    fi
35924  fi
35925
35926  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
35927  if test "x$test_cygdrive_prefix" = x; then
35928    # As a simple fix, exclude /usr/bin since it's not a real path.
35929    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
35930      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
35931      # a path prefixed by /cygdrive for fixpath to work.
35932      new_path="$CYGWIN_ROOT_PATH$input_path"
35933    fi
35934  fi
35935
35936  # remove trailing .exe if any
35937  new_path="${new_path/%.exe/}"
35938
35939    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35940
35941  # First separate the path from the arguments. This will split at the first
35942  # space.
35943  complete="$LD"
35944  path="${complete%% *}"
35945  tmp="$complete EOL"
35946  arguments="${tmp#* }"
35947
35948  # Input might be given as Windows format, start by converting to
35949  # unix format.
35950  new_path="$path"
35951
35952  windows_path="$new_path"
35953  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35954    unix_path=`$CYGPATH -u "$windows_path"`
35955    new_path="$unix_path"
35956  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35957    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35958    new_path="$unix_path"
35959  fi
35960
35961
35962  # Now try to locate executable using which
35963  new_path=`$WHICH "$new_path" 2> /dev/null`
35964
35965  if test "x$new_path" = x; then
35966    # Oops. Which didn't find the executable.
35967    # The splitting of arguments from the executable at a space might have been incorrect,
35968    # since paths with space are more likely in Windows. Give it another try with the whole
35969    # argument.
35970    path="$complete"
35971    arguments="EOL"
35972    new_path="$path"
35973
35974  windows_path="$new_path"
35975  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35976    unix_path=`$CYGPATH -u "$windows_path"`
35977    new_path="$unix_path"
35978  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35979    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35980    new_path="$unix_path"
35981  fi
35982
35983
35984    new_path=`$WHICH "$new_path" 2> /dev/null`
35985    # bat and cmd files are not always considered executable in MSYS causing which
35986    # to not find them
35987    if test "x$new_path" = x \
35988        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
35989        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
35990      new_path="$path"
35991
35992  windows_path="$new_path"
35993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
35994    unix_path=`$CYGPATH -u "$windows_path"`
35995    new_path="$unix_path"
35996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
35997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
35998    new_path="$unix_path"
35999  fi
36000
36001    fi
36002
36003    if test "x$new_path" = x; then
36004      # It's still not found. Now this is an unrecoverable error.
36005      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36006$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36007      has_space=`$ECHO "$complete" | $GREP " "`
36008      if test "x$has_space" != x; then
36009        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36010$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36011      fi
36012      as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36013    fi
36014  fi
36015
36016  # Now new_path has a complete unix path to the binary
36017  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36018    # Keep paths in /bin as-is, but remove trailing .exe if any
36019    new_path="${new_path/%.exe/}"
36020    # Do not save /bin paths to all_fixpath_prefixes!
36021  else
36022    # Not in mixed or Windows style, start by that.
36023    new_path=`cmd //c echo $new_path`
36024
36025  input_path="$new_path"
36026  # Check if we need to convert this using DOS-style short mode. If the path
36027  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36028  # take no chances and rewrite it.
36029  # Note: m4 eats our [], so we need to use [ and ] instead.
36030  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36031  if test "x$has_forbidden_chars" != x; then
36032    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36033    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36034  fi
36035
36036    # Output is in $new_path
36037
36038  windows_path="$new_path"
36039  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36040    unix_path=`$CYGPATH -u "$windows_path"`
36041    new_path="$unix_path"
36042  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36043    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36044    new_path="$unix_path"
36045  fi
36046
36047    # remove trailing .exe if any
36048    new_path="${new_path/%.exe/}"
36049
36050    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36051    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36052  fi
36053
36054    else
36055      # We're on a unix platform. Hooray! :)
36056      # First separate the path from the arguments. This will split at the first
36057      # space.
36058      complete="$LD"
36059      path="${complete%% *}"
36060      tmp="$complete EOL"
36061      arguments="${tmp#* }"
36062
36063      # Cannot rely on the command "which" here since it doesn't always work.
36064      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36065      if test -z "$is_absolute_path"; then
36066        # Path to executable is not absolute. Find it.
36067        IFS_save="$IFS"
36068        IFS=:
36069        for p in $PATH; do
36070          if test -f "$p/$path" && test -x "$p/$path"; then
36071            new_path="$p/$path"
36072            break
36073          fi
36074        done
36075        IFS="$IFS_save"
36076      else
36077        # This is an absolute path, we can use it without further modifications.
36078        new_path="$path"
36079      fi
36080
36081      if test "x$new_path" = x; then
36082        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LD, which resolves as \"$complete\", is not found." >&5
36083$as_echo "$as_me: The path of LD, which resolves as \"$complete\", is not found." >&6;}
36084        has_space=`$ECHO "$complete" | $GREP " "`
36085        if test "x$has_space" != x; then
36086          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36087$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36088        fi
36089        as_fn_error $? "Cannot locate the the path of LD" "$LINENO" 5
36090      fi
36091    fi
36092
36093    # Now join together the path and the arguments once again
36094    if test "x$arguments" != xEOL; then
36095      new_complete="$new_path ${arguments% *}"
36096    else
36097      new_complete="$new_path"
36098    fi
36099
36100    if test "x$complete" != "x$new_complete"; then
36101      LD="$new_complete"
36102      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LD to \"$new_complete\"" >&5
36103$as_echo "$as_me: Rewriting LD to \"$new_complete\"" >&6;}
36104    fi
36105  fi
36106
36107    # Verify that we indeed succeeded with this trick.
36108    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the found link.exe is actually the Visual Studio linker" >&5
36109$as_echo_n "checking if the found link.exe is actually the Visual Studio linker... " >&6; }
36110    "$LD" --version > /dev/null
36111    if test $? -eq 0 ; then
36112      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36113$as_echo "no" >&6; }
36114      as_fn_error $? "This is the Cygwin link tool. Please check your PATH and rerun configure." "$LINENO" 5
36115    else
36116      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
36117$as_echo "yes" >&6; }
36118    fi
36119    LDCXX="$LD"
36120  else
36121    # All other toolchains use the compiler to link.
36122    LD="$CC"
36123    LDCXX="$CXX"
36124  fi
36125
36126  # FIXME: it should be CXXLD, according to standard (cf CXXCPP)
36127
36128
36129  #
36130  # Setup the assembler (AS)
36131  #
36132  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
36133    # FIXME: should this really be solaris, or solstudio?
36134
36135
36136  # Publish this variable in the help.
36137
36138
36139  if [ -z "${AS+x}" ]; then
36140    # The variable is not set by user, try to locate tool using the code snippet
36141    for ac_prog in as
36142do
36143  # Extract the first word of "$ac_prog", so it can be a program name with args.
36144set dummy $ac_prog; ac_word=$2
36145{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36146$as_echo_n "checking for $ac_word... " >&6; }
36147if ${ac_cv_path_AS+:} false; then :
36148  $as_echo_n "(cached) " >&6
36149else
36150  case $AS in
36151  [\\/]* | ?:[\\/]*)
36152  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36153  ;;
36154  *)
36155  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36156for as_dir in $PATH
36157do
36158  IFS=$as_save_IFS
36159  test -z "$as_dir" && as_dir=.
36160    for ac_exec_ext in '' $ac_executable_extensions; do
36161  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36162    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36163    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36164    break 2
36165  fi
36166done
36167  done
36168IFS=$as_save_IFS
36169
36170  ;;
36171esac
36172fi
36173AS=$ac_cv_path_AS
36174if test -n "$AS"; then
36175  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36176$as_echo "$AS" >&6; }
36177else
36178  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36179$as_echo "no" >&6; }
36180fi
36181
36182
36183  test -n "$AS" && break
36184done
36185
36186  else
36187    # The variable is set, but is it from the command line or the environment?
36188
36189    # Try to remove the string !AS! from our list.
36190    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AS!/}
36191    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36192      # If it failed, the variable was not from the command line. Ignore it,
36193      # but warn the user (except for BASH, which is always set by the calling BASH).
36194      if test "xAS" != xBASH; then
36195        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&5
36196$as_echo "$as_me: WARNING: Ignoring value of AS from the environment. Use command line variables instead." >&2;}
36197      fi
36198      # Try to locate tool using the code snippet
36199      for ac_prog in as
36200do
36201  # Extract the first word of "$ac_prog", so it can be a program name with args.
36202set dummy $ac_prog; ac_word=$2
36203{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36204$as_echo_n "checking for $ac_word... " >&6; }
36205if ${ac_cv_path_AS+:} false; then :
36206  $as_echo_n "(cached) " >&6
36207else
36208  case $AS in
36209  [\\/]* | ?:[\\/]*)
36210  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36211  ;;
36212  *)
36213  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36214for as_dir in $PATH
36215do
36216  IFS=$as_save_IFS
36217  test -z "$as_dir" && as_dir=.
36218    for ac_exec_ext in '' $ac_executable_extensions; do
36219  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36220    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36221    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36222    break 2
36223  fi
36224done
36225  done
36226IFS=$as_save_IFS
36227
36228  ;;
36229esac
36230fi
36231AS=$ac_cv_path_AS
36232if test -n "$AS"; then
36233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36234$as_echo "$AS" >&6; }
36235else
36236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36237$as_echo "no" >&6; }
36238fi
36239
36240
36241  test -n "$AS" && break
36242done
36243
36244    else
36245      # If it succeeded, then it was overridden by the user. We will use it
36246      # for the tool.
36247
36248      # First remove it from the list of overridden variables, so we can test
36249      # for unknown variables in the end.
36250      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36251
36252      # Check if we try to supply an empty value
36253      if test "x$AS" = x; then
36254        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AS= (no value)" >&5
36255$as_echo "$as_me: Setting user supplied tool AS= (no value)" >&6;}
36256        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36257$as_echo_n "checking for AS... " >&6; }
36258        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36259$as_echo "disabled" >&6; }
36260      else
36261        # Check if the provided tool contains a complete path.
36262        tool_specified="$AS"
36263        tool_basename="${tool_specified##*/}"
36264        if test "x$tool_basename" = "x$tool_specified"; then
36265          # A command without a complete path is provided, search $PATH.
36266          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AS=$tool_basename" >&5
36267$as_echo "$as_me: Will search for user supplied tool AS=$tool_basename" >&6;}
36268          # Extract the first word of "$tool_basename", so it can be a program name with args.
36269set dummy $tool_basename; ac_word=$2
36270{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36271$as_echo_n "checking for $ac_word... " >&6; }
36272if ${ac_cv_path_AS+:} false; then :
36273  $as_echo_n "(cached) " >&6
36274else
36275  case $AS in
36276  [\\/]* | ?:[\\/]*)
36277  ac_cv_path_AS="$AS" # Let the user override the test with a path.
36278  ;;
36279  *)
36280  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36281for as_dir in $PATH
36282do
36283  IFS=$as_save_IFS
36284  test -z "$as_dir" && as_dir=.
36285    for ac_exec_ext in '' $ac_executable_extensions; do
36286  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36287    ac_cv_path_AS="$as_dir/$ac_word$ac_exec_ext"
36288    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36289    break 2
36290  fi
36291done
36292  done
36293IFS=$as_save_IFS
36294
36295  ;;
36296esac
36297fi
36298AS=$ac_cv_path_AS
36299if test -n "$AS"; then
36300  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AS" >&5
36301$as_echo "$AS" >&6; }
36302else
36303  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36304$as_echo "no" >&6; }
36305fi
36306
36307
36308          if test "x$AS" = x; then
36309            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36310          fi
36311        else
36312          # Otherwise we believe it is a complete path. Use it as it is.
36313          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AS=$tool_specified" >&5
36314$as_echo "$as_me: Will use user supplied tool AS=$tool_specified" >&6;}
36315          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AS" >&5
36316$as_echo_n "checking for AS... " >&6; }
36317          if test ! -x "$tool_specified"; then
36318            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36319$as_echo "not found" >&6; }
36320            as_fn_error $? "User supplied tool AS=$tool_specified does not exist or is not executable" "$LINENO" 5
36321          fi
36322          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36323$as_echo "$tool_specified" >&6; }
36324        fi
36325      fi
36326    fi
36327
36328  fi
36329
36330
36331
36332  # Only process if variable expands to non-empty
36333
36334  if test "x$AS" != x; then
36335    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36336
36337  # First separate the path from the arguments. This will split at the first
36338  # space.
36339  complete="$AS"
36340  path="${complete%% *}"
36341  tmp="$complete EOL"
36342  arguments="${tmp#* }"
36343
36344  # Input might be given as Windows format, start by converting to
36345  # unix format.
36346  new_path=`$CYGPATH -u "$path"`
36347
36348  # Now try to locate executable using which
36349  new_path=`$WHICH "$new_path" 2> /dev/null`
36350  # bat and cmd files are not always considered executable in cygwin causing which
36351  # to not find them
36352  if test "x$new_path" = x \
36353      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36354      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36355    new_path=`$CYGPATH -u "$path"`
36356  fi
36357  if test "x$new_path" = x; then
36358    # Oops. Which didn't find the executable.
36359    # The splitting of arguments from the executable at a space might have been incorrect,
36360    # since paths with space are more likely in Windows. Give it another try with the whole
36361    # argument.
36362    path="$complete"
36363    arguments="EOL"
36364    new_path=`$CYGPATH -u "$path"`
36365    new_path=`$WHICH "$new_path" 2> /dev/null`
36366    # bat and cmd files are not always considered executable in cygwin causing which
36367    # to not find them
36368    if test "x$new_path" = x \
36369        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36370        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36371      new_path=`$CYGPATH -u "$path"`
36372    fi
36373    if test "x$new_path" = x; then
36374      # It's still not found. Now this is an unrecoverable error.
36375      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36376$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36377      has_space=`$ECHO "$complete" | $GREP " "`
36378      if test "x$has_space" != x; then
36379        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36380$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36381      fi
36382      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36383    fi
36384  fi
36385
36386  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
36387  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
36388  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
36389  # "foo.exe" is OK but "foo" is an error.
36390  #
36391  # This test is therefore slightly more accurate than "test -f" to check for file presence.
36392  # It is also a way to make sure we got the proper file name for the real test later on.
36393  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
36394  if test "x$test_shortpath" = x; then
36395    # Short path failed, file does not exist as specified.
36396    # Try adding .exe or .cmd
36397    if test -f "${new_path}.exe"; then
36398      input_to_shortpath="${new_path}.exe"
36399    elif test -f "${new_path}.cmd"; then
36400      input_to_shortpath="${new_path}.cmd"
36401    else
36402      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$new_path\", is invalid." >&5
36403$as_echo "$as_me: The path of AS, which resolves as \"$new_path\", is invalid." >&6;}
36404      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
36405$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
36406      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36407    fi
36408  else
36409    input_to_shortpath="$new_path"
36410  fi
36411
36412  # Call helper function which possibly converts this using DOS-style short mode.
36413  # If so, the updated path is stored in $new_path.
36414  new_path="$input_to_shortpath"
36415
36416  input_path="$input_to_shortpath"
36417  # Check if we need to convert this using DOS-style short mode. If the path
36418  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36419  # take no chances and rewrite it.
36420  # Note: m4 eats our [], so we need to use [ and ] instead.
36421  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
36422  if test "x$has_forbidden_chars" != x; then
36423    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36424    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
36425    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
36426    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
36427      # Going to short mode and back again did indeed matter. Since short mode is
36428      # case insensitive, let's make it lowercase to improve readability.
36429      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36430      # Now convert it back to Unix-style (cygpath)
36431      input_path=`$CYGPATH -u "$shortmode_path"`
36432      new_path="$input_path"
36433    fi
36434  fi
36435
36436  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
36437  if test "x$test_cygdrive_prefix" = x; then
36438    # As a simple fix, exclude /usr/bin since it's not a real path.
36439    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
36440      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
36441      # a path prefixed by /cygdrive for fixpath to work.
36442      new_path="$CYGWIN_ROOT_PATH$input_path"
36443    fi
36444  fi
36445
36446  # remove trailing .exe if any
36447  new_path="${new_path/%.exe/}"
36448
36449    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36450
36451  # First separate the path from the arguments. This will split at the first
36452  # space.
36453  complete="$AS"
36454  path="${complete%% *}"
36455  tmp="$complete EOL"
36456  arguments="${tmp#* }"
36457
36458  # Input might be given as Windows format, start by converting to
36459  # unix format.
36460  new_path="$path"
36461
36462  windows_path="$new_path"
36463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36464    unix_path=`$CYGPATH -u "$windows_path"`
36465    new_path="$unix_path"
36466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36468    new_path="$unix_path"
36469  fi
36470
36471
36472  # Now try to locate executable using which
36473  new_path=`$WHICH "$new_path" 2> /dev/null`
36474
36475  if test "x$new_path" = x; then
36476    # Oops. Which didn't find the executable.
36477    # The splitting of arguments from the executable at a space might have been incorrect,
36478    # since paths with space are more likely in Windows. Give it another try with the whole
36479    # argument.
36480    path="$complete"
36481    arguments="EOL"
36482    new_path="$path"
36483
36484  windows_path="$new_path"
36485  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36486    unix_path=`$CYGPATH -u "$windows_path"`
36487    new_path="$unix_path"
36488  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36489    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36490    new_path="$unix_path"
36491  fi
36492
36493
36494    new_path=`$WHICH "$new_path" 2> /dev/null`
36495    # bat and cmd files are not always considered executable in MSYS causing which
36496    # to not find them
36497    if test "x$new_path" = x \
36498        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
36499        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
36500      new_path="$path"
36501
36502  windows_path="$new_path"
36503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36504    unix_path=`$CYGPATH -u "$windows_path"`
36505    new_path="$unix_path"
36506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36508    new_path="$unix_path"
36509  fi
36510
36511    fi
36512
36513    if test "x$new_path" = x; then
36514      # It's still not found. Now this is an unrecoverable error.
36515      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36516$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36517      has_space=`$ECHO "$complete" | $GREP " "`
36518      if test "x$has_space" != x; then
36519        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
36520$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
36521      fi
36522      as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36523    fi
36524  fi
36525
36526  # Now new_path has a complete unix path to the binary
36527  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
36528    # Keep paths in /bin as-is, but remove trailing .exe if any
36529    new_path="${new_path/%.exe/}"
36530    # Do not save /bin paths to all_fixpath_prefixes!
36531  else
36532    # Not in mixed or Windows style, start by that.
36533    new_path=`cmd //c echo $new_path`
36534
36535  input_path="$new_path"
36536  # Check if we need to convert this using DOS-style short mode. If the path
36537  # contains just simple characters, use it. Otherwise (spaces, weird characters),
36538  # take no chances and rewrite it.
36539  # Note: m4 eats our [], so we need to use [ and ] instead.
36540  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
36541  if test "x$has_forbidden_chars" != x; then
36542    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
36543    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
36544  fi
36545
36546    # Output is in $new_path
36547
36548  windows_path="$new_path"
36549  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
36550    unix_path=`$CYGPATH -u "$windows_path"`
36551    new_path="$unix_path"
36552  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
36553    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
36554    new_path="$unix_path"
36555  fi
36556
36557    # remove trailing .exe if any
36558    new_path="${new_path/%.exe/}"
36559
36560    # Save the first 10 bytes of this path to the storage, so fixpath can work.
36561    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
36562  fi
36563
36564    else
36565      # We're on a unix platform. Hooray! :)
36566      # First separate the path from the arguments. This will split at the first
36567      # space.
36568      complete="$AS"
36569      path="${complete%% *}"
36570      tmp="$complete EOL"
36571      arguments="${tmp#* }"
36572
36573      # Cannot rely on the command "which" here since it doesn't always work.
36574      is_absolute_path=`$ECHO "$path" | $GREP ^/`
36575      if test -z "$is_absolute_path"; then
36576        # Path to executable is not absolute. Find it.
36577        IFS_save="$IFS"
36578        IFS=:
36579        for p in $PATH; do
36580          if test -f "$p/$path" && test -x "$p/$path"; then
36581            new_path="$p/$path"
36582            break
36583          fi
36584        done
36585        IFS="$IFS_save"
36586      else
36587        # This is an absolute path, we can use it without further modifications.
36588        new_path="$path"
36589      fi
36590
36591      if test "x$new_path" = x; then
36592        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AS, which resolves as \"$complete\", is not found." >&5
36593$as_echo "$as_me: The path of AS, which resolves as \"$complete\", is not found." >&6;}
36594        has_space=`$ECHO "$complete" | $GREP " "`
36595        if test "x$has_space" != x; then
36596          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
36597$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
36598        fi
36599        as_fn_error $? "Cannot locate the the path of AS" "$LINENO" 5
36600      fi
36601    fi
36602
36603    # Now join together the path and the arguments once again
36604    if test "x$arguments" != xEOL; then
36605      new_complete="$new_path ${arguments% *}"
36606    else
36607      new_complete="$new_path"
36608    fi
36609
36610    if test "x$complete" != "x$new_complete"; then
36611      AS="$new_complete"
36612      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AS to \"$new_complete\"" >&5
36613$as_echo "$as_me: Rewriting AS to \"$new_complete\"" >&6;}
36614    fi
36615  fi
36616
36617  else
36618    # FIXME: is this correct for microsoft?
36619    AS="$CC -c"
36620  fi
36621
36622
36623  #
36624  # Setup the archiver (AR)
36625  #
36626  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
36627    # The corresponding ar tool is lib.exe (used to create static libraries)
36628    # Extract the first word of "lib", so it can be a program name with args.
36629set dummy lib; ac_word=$2
36630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36631$as_echo_n "checking for $ac_word... " >&6; }
36632if ${ac_cv_prog_AR+:} false; then :
36633  $as_echo_n "(cached) " >&6
36634else
36635  if test -n "$AR"; then
36636  ac_cv_prog_AR="$AR" # Let the user override the test.
36637else
36638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36639for as_dir in $PATH
36640do
36641  IFS=$as_save_IFS
36642  test -z "$as_dir" && as_dir=.
36643    for ac_exec_ext in '' $ac_executable_extensions; do
36644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36645    ac_cv_prog_AR="lib"
36646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36647    break 2
36648  fi
36649done
36650  done
36651IFS=$as_save_IFS
36652
36653fi
36654fi
36655AR=$ac_cv_prog_AR
36656if test -n "$AR"; then
36657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36658$as_echo "$AR" >&6; }
36659else
36660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36661$as_echo "no" >&6; }
36662fi
36663
36664
36665  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
36666
36667
36668  # Publish this variable in the help.
36669
36670
36671  if [ -z "${AR+x}" ]; then
36672    # The variable is not set by user, try to locate tool using the code snippet
36673    if test -n "$ac_tool_prefix"; then
36674  for ac_prog in ar gcc-ar
36675  do
36676    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36677set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36678{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36679$as_echo_n "checking for $ac_word... " >&6; }
36680if ${ac_cv_prog_AR+:} false; then :
36681  $as_echo_n "(cached) " >&6
36682else
36683  if test -n "$AR"; then
36684  ac_cv_prog_AR="$AR" # Let the user override the test.
36685else
36686as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36687for as_dir in $PATH
36688do
36689  IFS=$as_save_IFS
36690  test -z "$as_dir" && as_dir=.
36691    for ac_exec_ext in '' $ac_executable_extensions; do
36692  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36693    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36694    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36695    break 2
36696  fi
36697done
36698  done
36699IFS=$as_save_IFS
36700
36701fi
36702fi
36703AR=$ac_cv_prog_AR
36704if test -n "$AR"; then
36705  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36706$as_echo "$AR" >&6; }
36707else
36708  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36709$as_echo "no" >&6; }
36710fi
36711
36712
36713    test -n "$AR" && break
36714  done
36715fi
36716if test -z "$AR"; then
36717  ac_ct_AR=$AR
36718  for ac_prog in ar gcc-ar
36719do
36720  # Extract the first word of "$ac_prog", so it can be a program name with args.
36721set dummy $ac_prog; ac_word=$2
36722{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36723$as_echo_n "checking for $ac_word... " >&6; }
36724if ${ac_cv_prog_ac_ct_AR+:} false; then :
36725  $as_echo_n "(cached) " >&6
36726else
36727  if test -n "$ac_ct_AR"; then
36728  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36729else
36730as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36731for as_dir in $PATH
36732do
36733  IFS=$as_save_IFS
36734  test -z "$as_dir" && as_dir=.
36735    for ac_exec_ext in '' $ac_executable_extensions; do
36736  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36737    ac_cv_prog_ac_ct_AR="$ac_prog"
36738    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36739    break 2
36740  fi
36741done
36742  done
36743IFS=$as_save_IFS
36744
36745fi
36746fi
36747ac_ct_AR=$ac_cv_prog_ac_ct_AR
36748if test -n "$ac_ct_AR"; then
36749  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36750$as_echo "$ac_ct_AR" >&6; }
36751else
36752  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36753$as_echo "no" >&6; }
36754fi
36755
36756
36757  test -n "$ac_ct_AR" && break
36758done
36759
36760  if test "x$ac_ct_AR" = x; then
36761    AR=""
36762  else
36763    case $cross_compiling:$ac_tool_warned in
36764yes:)
36765{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36766$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36767ac_tool_warned=yes ;;
36768esac
36769    AR=$ac_ct_AR
36770  fi
36771fi
36772
36773  else
36774    # The variable is set, but is it from the command line or the environment?
36775
36776    # Try to remove the string !AR! from our list.
36777    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
36778    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
36779      # If it failed, the variable was not from the command line. Ignore it,
36780      # but warn the user (except for BASH, which is always set by the calling BASH).
36781      if test "xAR" != xBASH; then
36782        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
36783$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
36784      fi
36785      # Try to locate tool using the code snippet
36786      if test -n "$ac_tool_prefix"; then
36787  for ac_prog in ar gcc-ar
36788  do
36789    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36790set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36791{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36792$as_echo_n "checking for $ac_word... " >&6; }
36793if ${ac_cv_prog_AR+:} false; then :
36794  $as_echo_n "(cached) " >&6
36795else
36796  if test -n "$AR"; then
36797  ac_cv_prog_AR="$AR" # Let the user override the test.
36798else
36799as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36800for as_dir in $PATH
36801do
36802  IFS=$as_save_IFS
36803  test -z "$as_dir" && as_dir=.
36804    for ac_exec_ext in '' $ac_executable_extensions; do
36805  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36806    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
36807    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36808    break 2
36809  fi
36810done
36811  done
36812IFS=$as_save_IFS
36813
36814fi
36815fi
36816AR=$ac_cv_prog_AR
36817if test -n "$AR"; then
36818  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36819$as_echo "$AR" >&6; }
36820else
36821  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36822$as_echo "no" >&6; }
36823fi
36824
36825
36826    test -n "$AR" && break
36827  done
36828fi
36829if test -z "$AR"; then
36830  ac_ct_AR=$AR
36831  for ac_prog in ar gcc-ar
36832do
36833  # Extract the first word of "$ac_prog", so it can be a program name with args.
36834set dummy $ac_prog; ac_word=$2
36835{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36836$as_echo_n "checking for $ac_word... " >&6; }
36837if ${ac_cv_prog_ac_ct_AR+:} false; then :
36838  $as_echo_n "(cached) " >&6
36839else
36840  if test -n "$ac_ct_AR"; then
36841  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
36842else
36843as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36844for as_dir in $PATH
36845do
36846  IFS=$as_save_IFS
36847  test -z "$as_dir" && as_dir=.
36848    for ac_exec_ext in '' $ac_executable_extensions; do
36849  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36850    ac_cv_prog_ac_ct_AR="$ac_prog"
36851    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36852    break 2
36853  fi
36854done
36855  done
36856IFS=$as_save_IFS
36857
36858fi
36859fi
36860ac_ct_AR=$ac_cv_prog_ac_ct_AR
36861if test -n "$ac_ct_AR"; then
36862  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
36863$as_echo "$ac_ct_AR" >&6; }
36864else
36865  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36866$as_echo "no" >&6; }
36867fi
36868
36869
36870  test -n "$ac_ct_AR" && break
36871done
36872
36873  if test "x$ac_ct_AR" = x; then
36874    AR=""
36875  else
36876    case $cross_compiling:$ac_tool_warned in
36877yes:)
36878{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
36879$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
36880ac_tool_warned=yes ;;
36881esac
36882    AR=$ac_ct_AR
36883  fi
36884fi
36885
36886    else
36887      # If it succeeded, then it was overridden by the user. We will use it
36888      # for the tool.
36889
36890      # First remove it from the list of overridden variables, so we can test
36891      # for unknown variables in the end.
36892      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
36893
36894      # Check if we try to supply an empty value
36895      if test "x$AR" = x; then
36896        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
36897$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
36898        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36899$as_echo_n "checking for AR... " >&6; }
36900        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
36901$as_echo "disabled" >&6; }
36902      else
36903        # Check if the provided tool contains a complete path.
36904        tool_specified="$AR"
36905        tool_basename="${tool_specified##*/}"
36906        if test "x$tool_basename" = "x$tool_specified"; then
36907          # A command without a complete path is provided, search $PATH.
36908          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
36909$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
36910          # Extract the first word of "$tool_basename", so it can be a program name with args.
36911set dummy $tool_basename; ac_word=$2
36912{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36913$as_echo_n "checking for $ac_word... " >&6; }
36914if ${ac_cv_path_AR+:} false; then :
36915  $as_echo_n "(cached) " >&6
36916else
36917  case $AR in
36918  [\\/]* | ?:[\\/]*)
36919  ac_cv_path_AR="$AR" # Let the user override the test with a path.
36920  ;;
36921  *)
36922  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36923for as_dir in $PATH
36924do
36925  IFS=$as_save_IFS
36926  test -z "$as_dir" && as_dir=.
36927    for ac_exec_ext in '' $ac_executable_extensions; do
36928  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
36929    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
36930    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
36931    break 2
36932  fi
36933done
36934  done
36935IFS=$as_save_IFS
36936
36937  ;;
36938esac
36939fi
36940AR=$ac_cv_path_AR
36941if test -n "$AR"; then
36942  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
36943$as_echo "$AR" >&6; }
36944else
36945  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
36946$as_echo "no" >&6; }
36947fi
36948
36949
36950          if test "x$AR" = x; then
36951            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
36952          fi
36953        else
36954          # Otherwise we believe it is a complete path. Use it as it is.
36955          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
36956$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
36957          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
36958$as_echo_n "checking for AR... " >&6; }
36959          if test ! -x "$tool_specified"; then
36960            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
36961$as_echo "not found" >&6; }
36962            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
36963          fi
36964          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
36965$as_echo "$tool_specified" >&6; }
36966        fi
36967      fi
36968    fi
36969
36970  fi
36971
36972
36973  else
36974
36975
36976  # Publish this variable in the help.
36977
36978
36979  if [ -z "${AR+x}" ]; then
36980    # The variable is not set by user, try to locate tool using the code snippet
36981    if test -n "$ac_tool_prefix"; then
36982  for ac_prog in ar
36983  do
36984    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
36985set dummy $ac_tool_prefix$ac_prog; ac_word=$2
36986{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
36987$as_echo_n "checking for $ac_word... " >&6; }
36988if ${ac_cv_prog_AR+:} false; then :
36989  $as_echo_n "(cached) " >&6
36990else
36991  if test -n "$AR"; then
36992  ac_cv_prog_AR="$AR" # Let the user override the test.
36993else
36994as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
36995for as_dir in $PATH
36996do
36997  IFS=$as_save_IFS
36998  test -z "$as_dir" && as_dir=.
36999    for ac_exec_ext in '' $ac_executable_extensions; do
37000  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37001    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37002    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37003    break 2
37004  fi
37005done
37006  done
37007IFS=$as_save_IFS
37008
37009fi
37010fi
37011AR=$ac_cv_prog_AR
37012if test -n "$AR"; then
37013  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37014$as_echo "$AR" >&6; }
37015else
37016  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37017$as_echo "no" >&6; }
37018fi
37019
37020
37021    test -n "$AR" && break
37022  done
37023fi
37024if test -z "$AR"; then
37025  ac_ct_AR=$AR
37026  for ac_prog in ar
37027do
37028  # Extract the first word of "$ac_prog", so it can be a program name with args.
37029set dummy $ac_prog; ac_word=$2
37030{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37031$as_echo_n "checking for $ac_word... " >&6; }
37032if ${ac_cv_prog_ac_ct_AR+:} false; then :
37033  $as_echo_n "(cached) " >&6
37034else
37035  if test -n "$ac_ct_AR"; then
37036  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37037else
37038as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37039for as_dir in $PATH
37040do
37041  IFS=$as_save_IFS
37042  test -z "$as_dir" && as_dir=.
37043    for ac_exec_ext in '' $ac_executable_extensions; do
37044  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37045    ac_cv_prog_ac_ct_AR="$ac_prog"
37046    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37047    break 2
37048  fi
37049done
37050  done
37051IFS=$as_save_IFS
37052
37053fi
37054fi
37055ac_ct_AR=$ac_cv_prog_ac_ct_AR
37056if test -n "$ac_ct_AR"; then
37057  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37058$as_echo "$ac_ct_AR" >&6; }
37059else
37060  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37061$as_echo "no" >&6; }
37062fi
37063
37064
37065  test -n "$ac_ct_AR" && break
37066done
37067
37068  if test "x$ac_ct_AR" = x; then
37069    AR=""
37070  else
37071    case $cross_compiling:$ac_tool_warned in
37072yes:)
37073{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37074$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37075ac_tool_warned=yes ;;
37076esac
37077    AR=$ac_ct_AR
37078  fi
37079fi
37080
37081  else
37082    # The variable is set, but is it from the command line or the environment?
37083
37084    # Try to remove the string !AR! from our list.
37085    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!AR!/}
37086    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37087      # If it failed, the variable was not from the command line. Ignore it,
37088      # but warn the user (except for BASH, which is always set by the calling BASH).
37089      if test "xAR" != xBASH; then
37090        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&5
37091$as_echo "$as_me: WARNING: Ignoring value of AR from the environment. Use command line variables instead." >&2;}
37092      fi
37093      # Try to locate tool using the code snippet
37094      if test -n "$ac_tool_prefix"; then
37095  for ac_prog in ar
37096  do
37097    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
37098set dummy $ac_tool_prefix$ac_prog; ac_word=$2
37099{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37100$as_echo_n "checking for $ac_word... " >&6; }
37101if ${ac_cv_prog_AR+:} false; then :
37102  $as_echo_n "(cached) " >&6
37103else
37104  if test -n "$AR"; then
37105  ac_cv_prog_AR="$AR" # Let the user override the test.
37106else
37107as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37108for as_dir in $PATH
37109do
37110  IFS=$as_save_IFS
37111  test -z "$as_dir" && as_dir=.
37112    for ac_exec_ext in '' $ac_executable_extensions; do
37113  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37114    ac_cv_prog_AR="$ac_tool_prefix$ac_prog"
37115    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37116    break 2
37117  fi
37118done
37119  done
37120IFS=$as_save_IFS
37121
37122fi
37123fi
37124AR=$ac_cv_prog_AR
37125if test -n "$AR"; then
37126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37127$as_echo "$AR" >&6; }
37128else
37129  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37130$as_echo "no" >&6; }
37131fi
37132
37133
37134    test -n "$AR" && break
37135  done
37136fi
37137if test -z "$AR"; then
37138  ac_ct_AR=$AR
37139  for ac_prog in ar
37140do
37141  # Extract the first word of "$ac_prog", so it can be a program name with args.
37142set dummy $ac_prog; ac_word=$2
37143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37144$as_echo_n "checking for $ac_word... " >&6; }
37145if ${ac_cv_prog_ac_ct_AR+:} false; then :
37146  $as_echo_n "(cached) " >&6
37147else
37148  if test -n "$ac_ct_AR"; then
37149  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
37150else
37151as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37152for as_dir in $PATH
37153do
37154  IFS=$as_save_IFS
37155  test -z "$as_dir" && as_dir=.
37156    for ac_exec_ext in '' $ac_executable_extensions; do
37157  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37158    ac_cv_prog_ac_ct_AR="$ac_prog"
37159    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37160    break 2
37161  fi
37162done
37163  done
37164IFS=$as_save_IFS
37165
37166fi
37167fi
37168ac_ct_AR=$ac_cv_prog_ac_ct_AR
37169if test -n "$ac_ct_AR"; then
37170  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5
37171$as_echo "$ac_ct_AR" >&6; }
37172else
37173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37174$as_echo "no" >&6; }
37175fi
37176
37177
37178  test -n "$ac_ct_AR" && break
37179done
37180
37181  if test "x$ac_ct_AR" = x; then
37182    AR=""
37183  else
37184    case $cross_compiling:$ac_tool_warned in
37185yes:)
37186{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
37187$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
37188ac_tool_warned=yes ;;
37189esac
37190    AR=$ac_ct_AR
37191  fi
37192fi
37193
37194    else
37195      # If it succeeded, then it was overridden by the user. We will use it
37196      # for the tool.
37197
37198      # First remove it from the list of overridden variables, so we can test
37199      # for unknown variables in the end.
37200      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37201
37202      # Check if we try to supply an empty value
37203      if test "x$AR" = x; then
37204        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool AR= (no value)" >&5
37205$as_echo "$as_me: Setting user supplied tool AR= (no value)" >&6;}
37206        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37207$as_echo_n "checking for AR... " >&6; }
37208        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37209$as_echo "disabled" >&6; }
37210      else
37211        # Check if the provided tool contains a complete path.
37212        tool_specified="$AR"
37213        tool_basename="${tool_specified##*/}"
37214        if test "x$tool_basename" = "x$tool_specified"; then
37215          # A command without a complete path is provided, search $PATH.
37216          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool AR=$tool_basename" >&5
37217$as_echo "$as_me: Will search for user supplied tool AR=$tool_basename" >&6;}
37218          # Extract the first word of "$tool_basename", so it can be a program name with args.
37219set dummy $tool_basename; ac_word=$2
37220{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37221$as_echo_n "checking for $ac_word... " >&6; }
37222if ${ac_cv_path_AR+:} false; then :
37223  $as_echo_n "(cached) " >&6
37224else
37225  case $AR in
37226  [\\/]* | ?:[\\/]*)
37227  ac_cv_path_AR="$AR" # Let the user override the test with a path.
37228  ;;
37229  *)
37230  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37231for as_dir in $PATH
37232do
37233  IFS=$as_save_IFS
37234  test -z "$as_dir" && as_dir=.
37235    for ac_exec_ext in '' $ac_executable_extensions; do
37236  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37237    ac_cv_path_AR="$as_dir/$ac_word$ac_exec_ext"
37238    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37239    break 2
37240  fi
37241done
37242  done
37243IFS=$as_save_IFS
37244
37245  ;;
37246esac
37247fi
37248AR=$ac_cv_path_AR
37249if test -n "$AR"; then
37250  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5
37251$as_echo "$AR" >&6; }
37252else
37253  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37254$as_echo "no" >&6; }
37255fi
37256
37257
37258          if test "x$AR" = x; then
37259            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37260          fi
37261        else
37262          # Otherwise we believe it is a complete path. Use it as it is.
37263          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool AR=$tool_specified" >&5
37264$as_echo "$as_me: Will use user supplied tool AR=$tool_specified" >&6;}
37265          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for AR" >&5
37266$as_echo_n "checking for AR... " >&6; }
37267          if test ! -x "$tool_specified"; then
37268            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37269$as_echo "not found" >&6; }
37270            as_fn_error $? "User supplied tool AR=$tool_specified does not exist or is not executable" "$LINENO" 5
37271          fi
37272          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37273$as_echo "$tool_specified" >&6; }
37274        fi
37275      fi
37276    fi
37277
37278  fi
37279
37280
37281  fi
37282
37283  # Only process if variable expands to non-empty
37284
37285  if test "x$AR" != x; then
37286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37287
37288  # First separate the path from the arguments. This will split at the first
37289  # space.
37290  complete="$AR"
37291  path="${complete%% *}"
37292  tmp="$complete EOL"
37293  arguments="${tmp#* }"
37294
37295  # Input might be given as Windows format, start by converting to
37296  # unix format.
37297  new_path=`$CYGPATH -u "$path"`
37298
37299  # Now try to locate executable using which
37300  new_path=`$WHICH "$new_path" 2> /dev/null`
37301  # bat and cmd files are not always considered executable in cygwin causing which
37302  # to not find them
37303  if test "x$new_path" = x \
37304      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37305      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37306    new_path=`$CYGPATH -u "$path"`
37307  fi
37308  if test "x$new_path" = x; then
37309    # Oops. Which didn't find the executable.
37310    # The splitting of arguments from the executable at a space might have been incorrect,
37311    # since paths with space are more likely in Windows. Give it another try with the whole
37312    # argument.
37313    path="$complete"
37314    arguments="EOL"
37315    new_path=`$CYGPATH -u "$path"`
37316    new_path=`$WHICH "$new_path" 2> /dev/null`
37317    # bat and cmd files are not always considered executable in cygwin causing which
37318    # to not find them
37319    if test "x$new_path" = x \
37320        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37321        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37322      new_path=`$CYGPATH -u "$path"`
37323    fi
37324    if test "x$new_path" = x; then
37325      # It's still not found. Now this is an unrecoverable error.
37326      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37327$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37328      has_space=`$ECHO "$complete" | $GREP " "`
37329      if test "x$has_space" != x; then
37330        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37331$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37332      fi
37333      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37334    fi
37335  fi
37336
37337  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37338  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37339  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37340  # "foo.exe" is OK but "foo" is an error.
37341  #
37342  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37343  # It is also a way to make sure we got the proper file name for the real test later on.
37344  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37345  if test "x$test_shortpath" = x; then
37346    # Short path failed, file does not exist as specified.
37347    # Try adding .exe or .cmd
37348    if test -f "${new_path}.exe"; then
37349      input_to_shortpath="${new_path}.exe"
37350    elif test -f "${new_path}.cmd"; then
37351      input_to_shortpath="${new_path}.cmd"
37352    else
37353      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$new_path\", is invalid." >&5
37354$as_echo "$as_me: The path of AR, which resolves as \"$new_path\", is invalid." >&6;}
37355      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37356$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37357      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37358    fi
37359  else
37360    input_to_shortpath="$new_path"
37361  fi
37362
37363  # Call helper function which possibly converts this using DOS-style short mode.
37364  # If so, the updated path is stored in $new_path.
37365  new_path="$input_to_shortpath"
37366
37367  input_path="$input_to_shortpath"
37368  # Check if we need to convert this using DOS-style short mode. If the path
37369  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37370  # take no chances and rewrite it.
37371  # Note: m4 eats our [], so we need to use [ and ] instead.
37372  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37373  if test "x$has_forbidden_chars" != x; then
37374    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37375    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37376    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37377    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37378      # Going to short mode and back again did indeed matter. Since short mode is
37379      # case insensitive, let's make it lowercase to improve readability.
37380      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37381      # Now convert it back to Unix-style (cygpath)
37382      input_path=`$CYGPATH -u "$shortmode_path"`
37383      new_path="$input_path"
37384    fi
37385  fi
37386
37387  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37388  if test "x$test_cygdrive_prefix" = x; then
37389    # As a simple fix, exclude /usr/bin since it's not a real path.
37390    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37391      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37392      # a path prefixed by /cygdrive for fixpath to work.
37393      new_path="$CYGWIN_ROOT_PATH$input_path"
37394    fi
37395  fi
37396
37397  # remove trailing .exe if any
37398  new_path="${new_path/%.exe/}"
37399
37400    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37401
37402  # First separate the path from the arguments. This will split at the first
37403  # space.
37404  complete="$AR"
37405  path="${complete%% *}"
37406  tmp="$complete EOL"
37407  arguments="${tmp#* }"
37408
37409  # Input might be given as Windows format, start by converting to
37410  # unix format.
37411  new_path="$path"
37412
37413  windows_path="$new_path"
37414  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37415    unix_path=`$CYGPATH -u "$windows_path"`
37416    new_path="$unix_path"
37417  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37418    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37419    new_path="$unix_path"
37420  fi
37421
37422
37423  # Now try to locate executable using which
37424  new_path=`$WHICH "$new_path" 2> /dev/null`
37425
37426  if test "x$new_path" = x; then
37427    # Oops. Which didn't find the executable.
37428    # The splitting of arguments from the executable at a space might have been incorrect,
37429    # since paths with space are more likely in Windows. Give it another try with the whole
37430    # argument.
37431    path="$complete"
37432    arguments="EOL"
37433    new_path="$path"
37434
37435  windows_path="$new_path"
37436  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37437    unix_path=`$CYGPATH -u "$windows_path"`
37438    new_path="$unix_path"
37439  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37440    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37441    new_path="$unix_path"
37442  fi
37443
37444
37445    new_path=`$WHICH "$new_path" 2> /dev/null`
37446    # bat and cmd files are not always considered executable in MSYS causing which
37447    # to not find them
37448    if test "x$new_path" = x \
37449        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37450        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37451      new_path="$path"
37452
37453  windows_path="$new_path"
37454  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37455    unix_path=`$CYGPATH -u "$windows_path"`
37456    new_path="$unix_path"
37457  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37458    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37459    new_path="$unix_path"
37460  fi
37461
37462    fi
37463
37464    if test "x$new_path" = x; then
37465      # It's still not found. Now this is an unrecoverable error.
37466      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37467$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37468      has_space=`$ECHO "$complete" | $GREP " "`
37469      if test "x$has_space" != x; then
37470        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37471$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37472      fi
37473      as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37474    fi
37475  fi
37476
37477  # Now new_path has a complete unix path to the binary
37478  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37479    # Keep paths in /bin as-is, but remove trailing .exe if any
37480    new_path="${new_path/%.exe/}"
37481    # Do not save /bin paths to all_fixpath_prefixes!
37482  else
37483    # Not in mixed or Windows style, start by that.
37484    new_path=`cmd //c echo $new_path`
37485
37486  input_path="$new_path"
37487  # Check if we need to convert this using DOS-style short mode. If the path
37488  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37489  # take no chances and rewrite it.
37490  # Note: m4 eats our [], so we need to use [ and ] instead.
37491  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37492  if test "x$has_forbidden_chars" != x; then
37493    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37494    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37495  fi
37496
37497    # Output is in $new_path
37498
37499  windows_path="$new_path"
37500  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37501    unix_path=`$CYGPATH -u "$windows_path"`
37502    new_path="$unix_path"
37503  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37504    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37505    new_path="$unix_path"
37506  fi
37507
37508    # remove trailing .exe if any
37509    new_path="${new_path/%.exe/}"
37510
37511    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37512    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37513  fi
37514
37515    else
37516      # We're on a unix platform. Hooray! :)
37517      # First separate the path from the arguments. This will split at the first
37518      # space.
37519      complete="$AR"
37520      path="${complete%% *}"
37521      tmp="$complete EOL"
37522      arguments="${tmp#* }"
37523
37524      # Cannot rely on the command "which" here since it doesn't always work.
37525      is_absolute_path=`$ECHO "$path" | $GREP ^/`
37526      if test -z "$is_absolute_path"; then
37527        # Path to executable is not absolute. Find it.
37528        IFS_save="$IFS"
37529        IFS=:
37530        for p in $PATH; do
37531          if test -f "$p/$path" && test -x "$p/$path"; then
37532            new_path="$p/$path"
37533            break
37534          fi
37535        done
37536        IFS="$IFS_save"
37537      else
37538        # This is an absolute path, we can use it without further modifications.
37539        new_path="$path"
37540      fi
37541
37542      if test "x$new_path" = x; then
37543        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of AR, which resolves as \"$complete\", is not found." >&5
37544$as_echo "$as_me: The path of AR, which resolves as \"$complete\", is not found." >&6;}
37545        has_space=`$ECHO "$complete" | $GREP " "`
37546        if test "x$has_space" != x; then
37547          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
37548$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
37549        fi
37550        as_fn_error $? "Cannot locate the the path of AR" "$LINENO" 5
37551      fi
37552    fi
37553
37554    # Now join together the path and the arguments once again
37555    if test "x$arguments" != xEOL; then
37556      new_complete="$new_path ${arguments% *}"
37557    else
37558      new_complete="$new_path"
37559    fi
37560
37561    if test "x$complete" != "x$new_complete"; then
37562      AR="$new_complete"
37563      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting AR to \"$new_complete\"" >&5
37564$as_echo "$as_me: Rewriting AR to \"$new_complete\"" >&6;}
37565    fi
37566  fi
37567
37568
37569
37570  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
37571
37572
37573  # Publish this variable in the help.
37574
37575
37576  if [ -z "${LIPO+x}" ]; then
37577    # The variable is not set by user, try to locate tool using the code snippet
37578    for ac_prog in lipo
37579do
37580  # Extract the first word of "$ac_prog", so it can be a program name with args.
37581set dummy $ac_prog; ac_word=$2
37582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37583$as_echo_n "checking for $ac_word... " >&6; }
37584if ${ac_cv_path_LIPO+:} false; then :
37585  $as_echo_n "(cached) " >&6
37586else
37587  case $LIPO in
37588  [\\/]* | ?:[\\/]*)
37589  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37590  ;;
37591  *)
37592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37593for as_dir in $PATH
37594do
37595  IFS=$as_save_IFS
37596  test -z "$as_dir" && as_dir=.
37597    for ac_exec_ext in '' $ac_executable_extensions; do
37598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37599    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37601    break 2
37602  fi
37603done
37604  done
37605IFS=$as_save_IFS
37606
37607  ;;
37608esac
37609fi
37610LIPO=$ac_cv_path_LIPO
37611if test -n "$LIPO"; then
37612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37613$as_echo "$LIPO" >&6; }
37614else
37615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37616$as_echo "no" >&6; }
37617fi
37618
37619
37620  test -n "$LIPO" && break
37621done
37622
37623  else
37624    # The variable is set, but is it from the command line or the environment?
37625
37626    # Try to remove the string !LIPO! from our list.
37627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!LIPO!/}
37628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
37629      # If it failed, the variable was not from the command line. Ignore it,
37630      # but warn the user (except for BASH, which is always set by the calling BASH).
37631      if test "xLIPO" != xBASH; then
37632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&5
37633$as_echo "$as_me: WARNING: Ignoring value of LIPO from the environment. Use command line variables instead." >&2;}
37634      fi
37635      # Try to locate tool using the code snippet
37636      for ac_prog in lipo
37637do
37638  # Extract the first word of "$ac_prog", so it can be a program name with args.
37639set dummy $ac_prog; ac_word=$2
37640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37641$as_echo_n "checking for $ac_word... " >&6; }
37642if ${ac_cv_path_LIPO+:} false; then :
37643  $as_echo_n "(cached) " >&6
37644else
37645  case $LIPO in
37646  [\\/]* | ?:[\\/]*)
37647  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37648  ;;
37649  *)
37650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37651for as_dir in $PATH
37652do
37653  IFS=$as_save_IFS
37654  test -z "$as_dir" && as_dir=.
37655    for ac_exec_ext in '' $ac_executable_extensions; do
37656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37657    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37659    break 2
37660  fi
37661done
37662  done
37663IFS=$as_save_IFS
37664
37665  ;;
37666esac
37667fi
37668LIPO=$ac_cv_path_LIPO
37669if test -n "$LIPO"; then
37670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37671$as_echo "$LIPO" >&6; }
37672else
37673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37674$as_echo "no" >&6; }
37675fi
37676
37677
37678  test -n "$LIPO" && break
37679done
37680
37681    else
37682      # If it succeeded, then it was overridden by the user. We will use it
37683      # for the tool.
37684
37685      # First remove it from the list of overridden variables, so we can test
37686      # for unknown variables in the end.
37687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
37688
37689      # Check if we try to supply an empty value
37690      if test "x$LIPO" = x; then
37691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool LIPO= (no value)" >&5
37692$as_echo "$as_me: Setting user supplied tool LIPO= (no value)" >&6;}
37693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37694$as_echo_n "checking for LIPO... " >&6; }
37695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
37696$as_echo "disabled" >&6; }
37697      else
37698        # Check if the provided tool contains a complete path.
37699        tool_specified="$LIPO"
37700        tool_basename="${tool_specified##*/}"
37701        if test "x$tool_basename" = "x$tool_specified"; then
37702          # A command without a complete path is provided, search $PATH.
37703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool LIPO=$tool_basename" >&5
37704$as_echo "$as_me: Will search for user supplied tool LIPO=$tool_basename" >&6;}
37705          # Extract the first word of "$tool_basename", so it can be a program name with args.
37706set dummy $tool_basename; ac_word=$2
37707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
37708$as_echo_n "checking for $ac_word... " >&6; }
37709if ${ac_cv_path_LIPO+:} false; then :
37710  $as_echo_n "(cached) " >&6
37711else
37712  case $LIPO in
37713  [\\/]* | ?:[\\/]*)
37714  ac_cv_path_LIPO="$LIPO" # Let the user override the test with a path.
37715  ;;
37716  *)
37717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
37718for as_dir in $PATH
37719do
37720  IFS=$as_save_IFS
37721  test -z "$as_dir" && as_dir=.
37722    for ac_exec_ext in '' $ac_executable_extensions; do
37723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
37724    ac_cv_path_LIPO="$as_dir/$ac_word$ac_exec_ext"
37725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
37726    break 2
37727  fi
37728done
37729  done
37730IFS=$as_save_IFS
37731
37732  ;;
37733esac
37734fi
37735LIPO=$ac_cv_path_LIPO
37736if test -n "$LIPO"; then
37737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5
37738$as_echo "$LIPO" >&6; }
37739else
37740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
37741$as_echo "no" >&6; }
37742fi
37743
37744
37745          if test "x$LIPO" = x; then
37746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
37747          fi
37748        else
37749          # Otherwise we believe it is a complete path. Use it as it is.
37750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool LIPO=$tool_specified" >&5
37751$as_echo "$as_me: Will use user supplied tool LIPO=$tool_specified" >&6;}
37752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIPO" >&5
37753$as_echo_n "checking for LIPO... " >&6; }
37754          if test ! -x "$tool_specified"; then
37755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
37756$as_echo "not found" >&6; }
37757            as_fn_error $? "User supplied tool LIPO=$tool_specified does not exist or is not executable" "$LINENO" 5
37758          fi
37759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
37760$as_echo "$tool_specified" >&6; }
37761        fi
37762      fi
37763    fi
37764
37765  fi
37766
37767
37768
37769  # Only process if variable expands to non-empty
37770
37771  if test "x$LIPO" != x; then
37772    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37773
37774  # First separate the path from the arguments. This will split at the first
37775  # space.
37776  complete="$LIPO"
37777  path="${complete%% *}"
37778  tmp="$complete EOL"
37779  arguments="${tmp#* }"
37780
37781  # Input might be given as Windows format, start by converting to
37782  # unix format.
37783  new_path=`$CYGPATH -u "$path"`
37784
37785  # Now try to locate executable using which
37786  new_path=`$WHICH "$new_path" 2> /dev/null`
37787  # bat and cmd files are not always considered executable in cygwin causing which
37788  # to not find them
37789  if test "x$new_path" = x \
37790      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37791      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37792    new_path=`$CYGPATH -u "$path"`
37793  fi
37794  if test "x$new_path" = x; then
37795    # Oops. Which didn't find the executable.
37796    # The splitting of arguments from the executable at a space might have been incorrect,
37797    # since paths with space are more likely in Windows. Give it another try with the whole
37798    # argument.
37799    path="$complete"
37800    arguments="EOL"
37801    new_path=`$CYGPATH -u "$path"`
37802    new_path=`$WHICH "$new_path" 2> /dev/null`
37803    # bat and cmd files are not always considered executable in cygwin causing which
37804    # to not find them
37805    if test "x$new_path" = x \
37806        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37807        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37808      new_path=`$CYGPATH -u "$path"`
37809    fi
37810    if test "x$new_path" = x; then
37811      # It's still not found. Now this is an unrecoverable error.
37812      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37813$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37814      has_space=`$ECHO "$complete" | $GREP " "`
37815      if test "x$has_space" != x; then
37816        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37817$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37818      fi
37819      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37820    fi
37821  fi
37822
37823  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
37824  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
37825  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
37826  # "foo.exe" is OK but "foo" is an error.
37827  #
37828  # This test is therefore slightly more accurate than "test -f" to check for file presence.
37829  # It is also a way to make sure we got the proper file name for the real test later on.
37830  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
37831  if test "x$test_shortpath" = x; then
37832    # Short path failed, file does not exist as specified.
37833    # Try adding .exe or .cmd
37834    if test -f "${new_path}.exe"; then
37835      input_to_shortpath="${new_path}.exe"
37836    elif test -f "${new_path}.cmd"; then
37837      input_to_shortpath="${new_path}.cmd"
37838    else
37839      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$new_path\", is invalid." >&5
37840$as_echo "$as_me: The path of LIPO, which resolves as \"$new_path\", is invalid." >&6;}
37841      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
37842$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
37843      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37844    fi
37845  else
37846    input_to_shortpath="$new_path"
37847  fi
37848
37849  # Call helper function which possibly converts this using DOS-style short mode.
37850  # If so, the updated path is stored in $new_path.
37851  new_path="$input_to_shortpath"
37852
37853  input_path="$input_to_shortpath"
37854  # Check if we need to convert this using DOS-style short mode. If the path
37855  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37856  # take no chances and rewrite it.
37857  # Note: m4 eats our [], so we need to use [ and ] instead.
37858  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
37859  if test "x$has_forbidden_chars" != x; then
37860    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37861    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
37862    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
37863    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
37864      # Going to short mode and back again did indeed matter. Since short mode is
37865      # case insensitive, let's make it lowercase to improve readability.
37866      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37867      # Now convert it back to Unix-style (cygpath)
37868      input_path=`$CYGPATH -u "$shortmode_path"`
37869      new_path="$input_path"
37870    fi
37871  fi
37872
37873  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
37874  if test "x$test_cygdrive_prefix" = x; then
37875    # As a simple fix, exclude /usr/bin since it's not a real path.
37876    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
37877      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
37878      # a path prefixed by /cygdrive for fixpath to work.
37879      new_path="$CYGWIN_ROOT_PATH$input_path"
37880    fi
37881  fi
37882
37883  # remove trailing .exe if any
37884  new_path="${new_path/%.exe/}"
37885
37886    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37887
37888  # First separate the path from the arguments. This will split at the first
37889  # space.
37890  complete="$LIPO"
37891  path="${complete%% *}"
37892  tmp="$complete EOL"
37893  arguments="${tmp#* }"
37894
37895  # Input might be given as Windows format, start by converting to
37896  # unix format.
37897  new_path="$path"
37898
37899  windows_path="$new_path"
37900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37901    unix_path=`$CYGPATH -u "$windows_path"`
37902    new_path="$unix_path"
37903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37905    new_path="$unix_path"
37906  fi
37907
37908
37909  # Now try to locate executable using which
37910  new_path=`$WHICH "$new_path" 2> /dev/null`
37911
37912  if test "x$new_path" = x; then
37913    # Oops. Which didn't find the executable.
37914    # The splitting of arguments from the executable at a space might have been incorrect,
37915    # since paths with space are more likely in Windows. Give it another try with the whole
37916    # argument.
37917    path="$complete"
37918    arguments="EOL"
37919    new_path="$path"
37920
37921  windows_path="$new_path"
37922  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37923    unix_path=`$CYGPATH -u "$windows_path"`
37924    new_path="$unix_path"
37925  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37926    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37927    new_path="$unix_path"
37928  fi
37929
37930
37931    new_path=`$WHICH "$new_path" 2> /dev/null`
37932    # bat and cmd files are not always considered executable in MSYS causing which
37933    # to not find them
37934    if test "x$new_path" = x \
37935        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
37936        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
37937      new_path="$path"
37938
37939  windows_path="$new_path"
37940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37941    unix_path=`$CYGPATH -u "$windows_path"`
37942    new_path="$unix_path"
37943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37945    new_path="$unix_path"
37946  fi
37947
37948    fi
37949
37950    if test "x$new_path" = x; then
37951      # It's still not found. Now this is an unrecoverable error.
37952      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
37953$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
37954      has_space=`$ECHO "$complete" | $GREP " "`
37955      if test "x$has_space" != x; then
37956        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
37957$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
37958      fi
37959      as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
37960    fi
37961  fi
37962
37963  # Now new_path has a complete unix path to the binary
37964  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
37965    # Keep paths in /bin as-is, but remove trailing .exe if any
37966    new_path="${new_path/%.exe/}"
37967    # Do not save /bin paths to all_fixpath_prefixes!
37968  else
37969    # Not in mixed or Windows style, start by that.
37970    new_path=`cmd //c echo $new_path`
37971
37972  input_path="$new_path"
37973  # Check if we need to convert this using DOS-style short mode. If the path
37974  # contains just simple characters, use it. Otherwise (spaces, weird characters),
37975  # take no chances and rewrite it.
37976  # Note: m4 eats our [], so we need to use [ and ] instead.
37977  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
37978  if test "x$has_forbidden_chars" != x; then
37979    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
37980    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
37981  fi
37982
37983    # Output is in $new_path
37984
37985  windows_path="$new_path"
37986  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
37987    unix_path=`$CYGPATH -u "$windows_path"`
37988    new_path="$unix_path"
37989  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
37990    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
37991    new_path="$unix_path"
37992  fi
37993
37994    # remove trailing .exe if any
37995    new_path="${new_path/%.exe/}"
37996
37997    # Save the first 10 bytes of this path to the storage, so fixpath can work.
37998    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
37999  fi
38000
38001    else
38002      # We're on a unix platform. Hooray! :)
38003      # First separate the path from the arguments. This will split at the first
38004      # space.
38005      complete="$LIPO"
38006      path="${complete%% *}"
38007      tmp="$complete EOL"
38008      arguments="${tmp#* }"
38009
38010      # Cannot rely on the command "which" here since it doesn't always work.
38011      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38012      if test -z "$is_absolute_path"; then
38013        # Path to executable is not absolute. Find it.
38014        IFS_save="$IFS"
38015        IFS=:
38016        for p in $PATH; do
38017          if test -f "$p/$path" && test -x "$p/$path"; then
38018            new_path="$p/$path"
38019            break
38020          fi
38021        done
38022        IFS="$IFS_save"
38023      else
38024        # This is an absolute path, we can use it without further modifications.
38025        new_path="$path"
38026      fi
38027
38028      if test "x$new_path" = x; then
38029        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of LIPO, which resolves as \"$complete\", is not found." >&5
38030$as_echo "$as_me: The path of LIPO, which resolves as \"$complete\", is not found." >&6;}
38031        has_space=`$ECHO "$complete" | $GREP " "`
38032        if test "x$has_space" != x; then
38033          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38034$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38035        fi
38036        as_fn_error $? "Cannot locate the the path of LIPO" "$LINENO" 5
38037      fi
38038    fi
38039
38040    # Now join together the path and the arguments once again
38041    if test "x$arguments" != xEOL; then
38042      new_complete="$new_path ${arguments% *}"
38043    else
38044      new_complete="$new_path"
38045    fi
38046
38047    if test "x$complete" != "x$new_complete"; then
38048      LIPO="$new_complete"
38049      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting LIPO to \"$new_complete\"" >&5
38050$as_echo "$as_me: Rewriting LIPO to \"$new_complete\"" >&6;}
38051    fi
38052  fi
38053
38054  fi
38055
38056  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
38057    # Extract the first word of "mt", so it can be a program name with args.
38058set dummy mt; ac_word=$2
38059{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38060$as_echo_n "checking for $ac_word... " >&6; }
38061if ${ac_cv_prog_MT+:} false; then :
38062  $as_echo_n "(cached) " >&6
38063else
38064  if test -n "$MT"; then
38065  ac_cv_prog_MT="$MT" # Let the user override the test.
38066else
38067  ac_prog_rejected=no
38068as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38069for as_dir in $PATH
38070do
38071  IFS=$as_save_IFS
38072  test -z "$as_dir" && as_dir=.
38073    for ac_exec_ext in '' $ac_executable_extensions; do
38074  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38075    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/mt"; then
38076       ac_prog_rejected=yes
38077       continue
38078     fi
38079    ac_cv_prog_MT="mt"
38080    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38081    break 2
38082  fi
38083done
38084  done
38085IFS=$as_save_IFS
38086
38087if test $ac_prog_rejected = yes; then
38088  # We found a bogon in the path, so make sure we never use it.
38089  set dummy $ac_cv_prog_MT
38090  shift
38091  if test $# != 0; then
38092    # We chose a different compiler from the bogus one.
38093    # However, it has the same basename, so the bogon will be chosen
38094    # first if we set MT to just the basename; use the full file name.
38095    shift
38096    ac_cv_prog_MT="$as_dir/$ac_word${1+' '}$@"
38097  fi
38098fi
38099fi
38100fi
38101MT=$ac_cv_prog_MT
38102if test -n "$MT"; then
38103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MT" >&5
38104$as_echo "$MT" >&6; }
38105else
38106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38107$as_echo "no" >&6; }
38108fi
38109
38110
38111
38112  # Only process if variable expands to non-empty
38113
38114  if test "x$MT" != x; then
38115    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38116
38117  # First separate the path from the arguments. This will split at the first
38118  # space.
38119  complete="$MT"
38120  path="${complete%% *}"
38121  tmp="$complete EOL"
38122  arguments="${tmp#* }"
38123
38124  # Input might be given as Windows format, start by converting to
38125  # unix format.
38126  new_path=`$CYGPATH -u "$path"`
38127
38128  # Now try to locate executable using which
38129  new_path=`$WHICH "$new_path" 2> /dev/null`
38130  # bat and cmd files are not always considered executable in cygwin causing which
38131  # to not find them
38132  if test "x$new_path" = x \
38133      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38134      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38135    new_path=`$CYGPATH -u "$path"`
38136  fi
38137  if test "x$new_path" = x; then
38138    # Oops. Which didn't find the executable.
38139    # The splitting of arguments from the executable at a space might have been incorrect,
38140    # since paths with space are more likely in Windows. Give it another try with the whole
38141    # argument.
38142    path="$complete"
38143    arguments="EOL"
38144    new_path=`$CYGPATH -u "$path"`
38145    new_path=`$WHICH "$new_path" 2> /dev/null`
38146    # bat and cmd files are not always considered executable in cygwin causing which
38147    # to not find them
38148    if test "x$new_path" = x \
38149        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38150        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38151      new_path=`$CYGPATH -u "$path"`
38152    fi
38153    if test "x$new_path" = x; then
38154      # It's still not found. Now this is an unrecoverable error.
38155      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38156$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38157      has_space=`$ECHO "$complete" | $GREP " "`
38158      if test "x$has_space" != x; then
38159        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38160$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38161      fi
38162      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38163    fi
38164  fi
38165
38166  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38167  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38168  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38169  # "foo.exe" is OK but "foo" is an error.
38170  #
38171  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38172  # It is also a way to make sure we got the proper file name for the real test later on.
38173  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38174  if test "x$test_shortpath" = x; then
38175    # Short path failed, file does not exist as specified.
38176    # Try adding .exe or .cmd
38177    if test -f "${new_path}.exe"; then
38178      input_to_shortpath="${new_path}.exe"
38179    elif test -f "${new_path}.cmd"; then
38180      input_to_shortpath="${new_path}.cmd"
38181    else
38182      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$new_path\", is invalid." >&5
38183$as_echo "$as_me: The path of MT, which resolves as \"$new_path\", is invalid." >&6;}
38184      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38185$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38186      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38187    fi
38188  else
38189    input_to_shortpath="$new_path"
38190  fi
38191
38192  # Call helper function which possibly converts this using DOS-style short mode.
38193  # If so, the updated path is stored in $new_path.
38194  new_path="$input_to_shortpath"
38195
38196  input_path="$input_to_shortpath"
38197  # Check if we need to convert this using DOS-style short mode. If the path
38198  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38199  # take no chances and rewrite it.
38200  # Note: m4 eats our [], so we need to use [ and ] instead.
38201  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38202  if test "x$has_forbidden_chars" != x; then
38203    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38204    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38205    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38206    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38207      # Going to short mode and back again did indeed matter. Since short mode is
38208      # case insensitive, let's make it lowercase to improve readability.
38209      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38210      # Now convert it back to Unix-style (cygpath)
38211      input_path=`$CYGPATH -u "$shortmode_path"`
38212      new_path="$input_path"
38213    fi
38214  fi
38215
38216  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38217  if test "x$test_cygdrive_prefix" = x; then
38218    # As a simple fix, exclude /usr/bin since it's not a real path.
38219    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38220      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38221      # a path prefixed by /cygdrive for fixpath to work.
38222      new_path="$CYGWIN_ROOT_PATH$input_path"
38223    fi
38224  fi
38225
38226  # remove trailing .exe if any
38227  new_path="${new_path/%.exe/}"
38228
38229    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38230
38231  # First separate the path from the arguments. This will split at the first
38232  # space.
38233  complete="$MT"
38234  path="${complete%% *}"
38235  tmp="$complete EOL"
38236  arguments="${tmp#* }"
38237
38238  # Input might be given as Windows format, start by converting to
38239  # unix format.
38240  new_path="$path"
38241
38242  windows_path="$new_path"
38243  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38244    unix_path=`$CYGPATH -u "$windows_path"`
38245    new_path="$unix_path"
38246  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38247    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38248    new_path="$unix_path"
38249  fi
38250
38251
38252  # Now try to locate executable using which
38253  new_path=`$WHICH "$new_path" 2> /dev/null`
38254
38255  if test "x$new_path" = x; then
38256    # Oops. Which didn't find the executable.
38257    # The splitting of arguments from the executable at a space might have been incorrect,
38258    # since paths with space are more likely in Windows. Give it another try with the whole
38259    # argument.
38260    path="$complete"
38261    arguments="EOL"
38262    new_path="$path"
38263
38264  windows_path="$new_path"
38265  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38266    unix_path=`$CYGPATH -u "$windows_path"`
38267    new_path="$unix_path"
38268  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38269    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38270    new_path="$unix_path"
38271  fi
38272
38273
38274    new_path=`$WHICH "$new_path" 2> /dev/null`
38275    # bat and cmd files are not always considered executable in MSYS causing which
38276    # to not find them
38277    if test "x$new_path" = x \
38278        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38279        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38280      new_path="$path"
38281
38282  windows_path="$new_path"
38283  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38284    unix_path=`$CYGPATH -u "$windows_path"`
38285    new_path="$unix_path"
38286  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38287    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38288    new_path="$unix_path"
38289  fi
38290
38291    fi
38292
38293    if test "x$new_path" = x; then
38294      # It's still not found. Now this is an unrecoverable error.
38295      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38296$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38297      has_space=`$ECHO "$complete" | $GREP " "`
38298      if test "x$has_space" != x; then
38299        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38300$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38301      fi
38302      as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38303    fi
38304  fi
38305
38306  # Now new_path has a complete unix path to the binary
38307  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38308    # Keep paths in /bin as-is, but remove trailing .exe if any
38309    new_path="${new_path/%.exe/}"
38310    # Do not save /bin paths to all_fixpath_prefixes!
38311  else
38312    # Not in mixed or Windows style, start by that.
38313    new_path=`cmd //c echo $new_path`
38314
38315  input_path="$new_path"
38316  # Check if we need to convert this using DOS-style short mode. If the path
38317  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38318  # take no chances and rewrite it.
38319  # Note: m4 eats our [], so we need to use [ and ] instead.
38320  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38321  if test "x$has_forbidden_chars" != x; then
38322    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38323    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38324  fi
38325
38326    # Output is in $new_path
38327
38328  windows_path="$new_path"
38329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38330    unix_path=`$CYGPATH -u "$windows_path"`
38331    new_path="$unix_path"
38332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38334    new_path="$unix_path"
38335  fi
38336
38337    # remove trailing .exe if any
38338    new_path="${new_path/%.exe/}"
38339
38340    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38341    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38342  fi
38343
38344    else
38345      # We're on a unix platform. Hooray! :)
38346      # First separate the path from the arguments. This will split at the first
38347      # space.
38348      complete="$MT"
38349      path="${complete%% *}"
38350      tmp="$complete EOL"
38351      arguments="${tmp#* }"
38352
38353      # Cannot rely on the command "which" here since it doesn't always work.
38354      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38355      if test -z "$is_absolute_path"; then
38356        # Path to executable is not absolute. Find it.
38357        IFS_save="$IFS"
38358        IFS=:
38359        for p in $PATH; do
38360          if test -f "$p/$path" && test -x "$p/$path"; then
38361            new_path="$p/$path"
38362            break
38363          fi
38364        done
38365        IFS="$IFS_save"
38366      else
38367        # This is an absolute path, we can use it without further modifications.
38368        new_path="$path"
38369      fi
38370
38371      if test "x$new_path" = x; then
38372        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MT, which resolves as \"$complete\", is not found." >&5
38373$as_echo "$as_me: The path of MT, which resolves as \"$complete\", is not found." >&6;}
38374        has_space=`$ECHO "$complete" | $GREP " "`
38375        if test "x$has_space" != x; then
38376          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38377$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38378        fi
38379        as_fn_error $? "Cannot locate the the path of MT" "$LINENO" 5
38380      fi
38381    fi
38382
38383    # Now join together the path and the arguments once again
38384    if test "x$arguments" != xEOL; then
38385      new_complete="$new_path ${arguments% *}"
38386    else
38387      new_complete="$new_path"
38388    fi
38389
38390    if test "x$complete" != "x$new_complete"; then
38391      MT="$new_complete"
38392      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MT to \"$new_complete\"" >&5
38393$as_echo "$as_me: Rewriting MT to \"$new_complete\"" >&6;}
38394    fi
38395  fi
38396
38397    # Setup the resource compiler (RC)
38398    # Extract the first word of "rc", so it can be a program name with args.
38399set dummy rc; ac_word=$2
38400{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38401$as_echo_n "checking for $ac_word... " >&6; }
38402if ${ac_cv_prog_RC+:} false; then :
38403  $as_echo_n "(cached) " >&6
38404else
38405  if test -n "$RC"; then
38406  ac_cv_prog_RC="$RC" # Let the user override the test.
38407else
38408  ac_prog_rejected=no
38409as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38410for as_dir in $PATH
38411do
38412  IFS=$as_save_IFS
38413  test -z "$as_dir" && as_dir=.
38414    for ac_exec_ext in '' $ac_executable_extensions; do
38415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38416    if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/bin/rc"; then
38417       ac_prog_rejected=yes
38418       continue
38419     fi
38420    ac_cv_prog_RC="rc"
38421    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38422    break 2
38423  fi
38424done
38425  done
38426IFS=$as_save_IFS
38427
38428if test $ac_prog_rejected = yes; then
38429  # We found a bogon in the path, so make sure we never use it.
38430  set dummy $ac_cv_prog_RC
38431  shift
38432  if test $# != 0; then
38433    # We chose a different compiler from the bogus one.
38434    # However, it has the same basename, so the bogon will be chosen
38435    # first if we set RC to just the basename; use the full file name.
38436    shift
38437    ac_cv_prog_RC="$as_dir/$ac_word${1+' '}$@"
38438  fi
38439fi
38440fi
38441fi
38442RC=$ac_cv_prog_RC
38443if test -n "$RC"; then
38444  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RC" >&5
38445$as_echo "$RC" >&6; }
38446else
38447  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38448$as_echo "no" >&6; }
38449fi
38450
38451
38452
38453  # Only process if variable expands to non-empty
38454
38455  if test "x$RC" != x; then
38456    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38457
38458  # First separate the path from the arguments. This will split at the first
38459  # space.
38460  complete="$RC"
38461  path="${complete%% *}"
38462  tmp="$complete EOL"
38463  arguments="${tmp#* }"
38464
38465  # Input might be given as Windows format, start by converting to
38466  # unix format.
38467  new_path=`$CYGPATH -u "$path"`
38468
38469  # Now try to locate executable using which
38470  new_path=`$WHICH "$new_path" 2> /dev/null`
38471  # bat and cmd files are not always considered executable in cygwin causing which
38472  # to not find them
38473  if test "x$new_path" = x \
38474      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38475      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38476    new_path=`$CYGPATH -u "$path"`
38477  fi
38478  if test "x$new_path" = x; then
38479    # Oops. Which didn't find the executable.
38480    # The splitting of arguments from the executable at a space might have been incorrect,
38481    # since paths with space are more likely in Windows. Give it another try with the whole
38482    # argument.
38483    path="$complete"
38484    arguments="EOL"
38485    new_path=`$CYGPATH -u "$path"`
38486    new_path=`$WHICH "$new_path" 2> /dev/null`
38487    # bat and cmd files are not always considered executable in cygwin causing which
38488    # to not find them
38489    if test "x$new_path" = x \
38490        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38491        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38492      new_path=`$CYGPATH -u "$path"`
38493    fi
38494    if test "x$new_path" = x; then
38495      # It's still not found. Now this is an unrecoverable error.
38496      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38497$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38498      has_space=`$ECHO "$complete" | $GREP " "`
38499      if test "x$has_space" != x; then
38500        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38501$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38502      fi
38503      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38504    fi
38505  fi
38506
38507  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38508  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38509  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38510  # "foo.exe" is OK but "foo" is an error.
38511  #
38512  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38513  # It is also a way to make sure we got the proper file name for the real test later on.
38514  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38515  if test "x$test_shortpath" = x; then
38516    # Short path failed, file does not exist as specified.
38517    # Try adding .exe or .cmd
38518    if test -f "${new_path}.exe"; then
38519      input_to_shortpath="${new_path}.exe"
38520    elif test -f "${new_path}.cmd"; then
38521      input_to_shortpath="${new_path}.cmd"
38522    else
38523      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$new_path\", is invalid." >&5
38524$as_echo "$as_me: The path of RC, which resolves as \"$new_path\", is invalid." >&6;}
38525      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38526$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38527      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38528    fi
38529  else
38530    input_to_shortpath="$new_path"
38531  fi
38532
38533  # Call helper function which possibly converts this using DOS-style short mode.
38534  # If so, the updated path is stored in $new_path.
38535  new_path="$input_to_shortpath"
38536
38537  input_path="$input_to_shortpath"
38538  # Check if we need to convert this using DOS-style short mode. If the path
38539  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38540  # take no chances and rewrite it.
38541  # Note: m4 eats our [], so we need to use [ and ] instead.
38542  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38543  if test "x$has_forbidden_chars" != x; then
38544    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38545    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38546    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38547    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38548      # Going to short mode and back again did indeed matter. Since short mode is
38549      # case insensitive, let's make it lowercase to improve readability.
38550      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38551      # Now convert it back to Unix-style (cygpath)
38552      input_path=`$CYGPATH -u "$shortmode_path"`
38553      new_path="$input_path"
38554    fi
38555  fi
38556
38557  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38558  if test "x$test_cygdrive_prefix" = x; then
38559    # As a simple fix, exclude /usr/bin since it's not a real path.
38560    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38561      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38562      # a path prefixed by /cygdrive for fixpath to work.
38563      new_path="$CYGWIN_ROOT_PATH$input_path"
38564    fi
38565  fi
38566
38567  # remove trailing .exe if any
38568  new_path="${new_path/%.exe/}"
38569
38570    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38571
38572  # First separate the path from the arguments. This will split at the first
38573  # space.
38574  complete="$RC"
38575  path="${complete%% *}"
38576  tmp="$complete EOL"
38577  arguments="${tmp#* }"
38578
38579  # Input might be given as Windows format, start by converting to
38580  # unix format.
38581  new_path="$path"
38582
38583  windows_path="$new_path"
38584  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38585    unix_path=`$CYGPATH -u "$windows_path"`
38586    new_path="$unix_path"
38587  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38588    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38589    new_path="$unix_path"
38590  fi
38591
38592
38593  # Now try to locate executable using which
38594  new_path=`$WHICH "$new_path" 2> /dev/null`
38595
38596  if test "x$new_path" = x; then
38597    # Oops. Which didn't find the executable.
38598    # The splitting of arguments from the executable at a space might have been incorrect,
38599    # since paths with space are more likely in Windows. Give it another try with the whole
38600    # argument.
38601    path="$complete"
38602    arguments="EOL"
38603    new_path="$path"
38604
38605  windows_path="$new_path"
38606  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38607    unix_path=`$CYGPATH -u "$windows_path"`
38608    new_path="$unix_path"
38609  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38610    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38611    new_path="$unix_path"
38612  fi
38613
38614
38615    new_path=`$WHICH "$new_path" 2> /dev/null`
38616    # bat and cmd files are not always considered executable in MSYS causing which
38617    # to not find them
38618    if test "x$new_path" = x \
38619        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38620        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38621      new_path="$path"
38622
38623  windows_path="$new_path"
38624  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38625    unix_path=`$CYGPATH -u "$windows_path"`
38626    new_path="$unix_path"
38627  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38628    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38629    new_path="$unix_path"
38630  fi
38631
38632    fi
38633
38634    if test "x$new_path" = x; then
38635      # It's still not found. Now this is an unrecoverable error.
38636      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38637$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38638      has_space=`$ECHO "$complete" | $GREP " "`
38639      if test "x$has_space" != x; then
38640        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38641$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38642      fi
38643      as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38644    fi
38645  fi
38646
38647  # Now new_path has a complete unix path to the binary
38648  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38649    # Keep paths in /bin as-is, but remove trailing .exe if any
38650    new_path="${new_path/%.exe/}"
38651    # Do not save /bin paths to all_fixpath_prefixes!
38652  else
38653    # Not in mixed or Windows style, start by that.
38654    new_path=`cmd //c echo $new_path`
38655
38656  input_path="$new_path"
38657  # Check if we need to convert this using DOS-style short mode. If the path
38658  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38659  # take no chances and rewrite it.
38660  # Note: m4 eats our [], so we need to use [ and ] instead.
38661  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38662  if test "x$has_forbidden_chars" != x; then
38663    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38664    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38665  fi
38666
38667    # Output is in $new_path
38668
38669  windows_path="$new_path"
38670  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38671    unix_path=`$CYGPATH -u "$windows_path"`
38672    new_path="$unix_path"
38673  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38674    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38675    new_path="$unix_path"
38676  fi
38677
38678    # remove trailing .exe if any
38679    new_path="${new_path/%.exe/}"
38680
38681    # Save the first 10 bytes of this path to the storage, so fixpath can work.
38682    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
38683  fi
38684
38685    else
38686      # We're on a unix platform. Hooray! :)
38687      # First separate the path from the arguments. This will split at the first
38688      # space.
38689      complete="$RC"
38690      path="${complete%% *}"
38691      tmp="$complete EOL"
38692      arguments="${tmp#* }"
38693
38694      # Cannot rely on the command "which" here since it doesn't always work.
38695      is_absolute_path=`$ECHO "$path" | $GREP ^/`
38696      if test -z "$is_absolute_path"; then
38697        # Path to executable is not absolute. Find it.
38698        IFS_save="$IFS"
38699        IFS=:
38700        for p in $PATH; do
38701          if test -f "$p/$path" && test -x "$p/$path"; then
38702            new_path="$p/$path"
38703            break
38704          fi
38705        done
38706        IFS="$IFS_save"
38707      else
38708        # This is an absolute path, we can use it without further modifications.
38709        new_path="$path"
38710      fi
38711
38712      if test "x$new_path" = x; then
38713        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of RC, which resolves as \"$complete\", is not found." >&5
38714$as_echo "$as_me: The path of RC, which resolves as \"$complete\", is not found." >&6;}
38715        has_space=`$ECHO "$complete" | $GREP " "`
38716        if test "x$has_space" != x; then
38717          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
38718$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
38719        fi
38720        as_fn_error $? "Cannot locate the the path of RC" "$LINENO" 5
38721      fi
38722    fi
38723
38724    # Now join together the path and the arguments once again
38725    if test "x$arguments" != xEOL; then
38726      new_complete="$new_path ${arguments% *}"
38727    else
38728      new_complete="$new_path"
38729    fi
38730
38731    if test "x$complete" != "x$new_complete"; then
38732      RC="$new_complete"
38733      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting RC to \"$new_complete\"" >&5
38734$as_echo "$as_me: Rewriting RC to \"$new_complete\"" >&6;}
38735    fi
38736  fi
38737
38738    # Extract the first word of "dumpbin", so it can be a program name with args.
38739set dummy dumpbin; ac_word=$2
38740{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
38741$as_echo_n "checking for $ac_word... " >&6; }
38742if ${ac_cv_prog_DUMPBIN+:} false; then :
38743  $as_echo_n "(cached) " >&6
38744else
38745  if test -n "$DUMPBIN"; then
38746  ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test.
38747else
38748as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
38749for as_dir in $PATH
38750do
38751  IFS=$as_save_IFS
38752  test -z "$as_dir" && as_dir=.
38753    for ac_exec_ext in '' $ac_executable_extensions; do
38754  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
38755    ac_cv_prog_DUMPBIN="dumpbin"
38756    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
38757    break 2
38758  fi
38759done
38760  done
38761IFS=$as_save_IFS
38762
38763fi
38764fi
38765DUMPBIN=$ac_cv_prog_DUMPBIN
38766if test -n "$DUMPBIN"; then
38767  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5
38768$as_echo "$DUMPBIN" >&6; }
38769else
38770  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
38771$as_echo "no" >&6; }
38772fi
38773
38774
38775
38776  # Only process if variable expands to non-empty
38777
38778  if test "x$DUMPBIN" != x; then
38779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38780
38781  # First separate the path from the arguments. This will split at the first
38782  # space.
38783  complete="$DUMPBIN"
38784  path="${complete%% *}"
38785  tmp="$complete EOL"
38786  arguments="${tmp#* }"
38787
38788  # Input might be given as Windows format, start by converting to
38789  # unix format.
38790  new_path=`$CYGPATH -u "$path"`
38791
38792  # Now try to locate executable using which
38793  new_path=`$WHICH "$new_path" 2> /dev/null`
38794  # bat and cmd files are not always considered executable in cygwin causing which
38795  # to not find them
38796  if test "x$new_path" = x \
38797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38799    new_path=`$CYGPATH -u "$path"`
38800  fi
38801  if test "x$new_path" = x; then
38802    # Oops. Which didn't find the executable.
38803    # The splitting of arguments from the executable at a space might have been incorrect,
38804    # since paths with space are more likely in Windows. Give it another try with the whole
38805    # argument.
38806    path="$complete"
38807    arguments="EOL"
38808    new_path=`$CYGPATH -u "$path"`
38809    new_path=`$WHICH "$new_path" 2> /dev/null`
38810    # bat and cmd files are not always considered executable in cygwin causing which
38811    # to not find them
38812    if test "x$new_path" = x \
38813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38815      new_path=`$CYGPATH -u "$path"`
38816    fi
38817    if test "x$new_path" = x; then
38818      # It's still not found. Now this is an unrecoverable error.
38819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38820$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38821      has_space=`$ECHO "$complete" | $GREP " "`
38822      if test "x$has_space" != x; then
38823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38825      fi
38826      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38827    fi
38828  fi
38829
38830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
38831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
38832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
38833  # "foo.exe" is OK but "foo" is an error.
38834  #
38835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
38836  # It is also a way to make sure we got the proper file name for the real test later on.
38837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
38838  if test "x$test_shortpath" = x; then
38839    # Short path failed, file does not exist as specified.
38840    # Try adding .exe or .cmd
38841    if test -f "${new_path}.exe"; then
38842      input_to_shortpath="${new_path}.exe"
38843    elif test -f "${new_path}.cmd"; then
38844      input_to_shortpath="${new_path}.cmd"
38845    else
38846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&5
38847$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$new_path\", is invalid." >&6;}
38848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
38849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
38850      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38851    fi
38852  else
38853    input_to_shortpath="$new_path"
38854  fi
38855
38856  # Call helper function which possibly converts this using DOS-style short mode.
38857  # If so, the updated path is stored in $new_path.
38858  new_path="$input_to_shortpath"
38859
38860  input_path="$input_to_shortpath"
38861  # Check if we need to convert this using DOS-style short mode. If the path
38862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38863  # take no chances and rewrite it.
38864  # Note: m4 eats our [], so we need to use [ and ] instead.
38865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
38866  if test "x$has_forbidden_chars" != x; then
38867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
38869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
38870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
38871      # Going to short mode and back again did indeed matter. Since short mode is
38872      # case insensitive, let's make it lowercase to improve readability.
38873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38874      # Now convert it back to Unix-style (cygpath)
38875      input_path=`$CYGPATH -u "$shortmode_path"`
38876      new_path="$input_path"
38877    fi
38878  fi
38879
38880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
38881  if test "x$test_cygdrive_prefix" = x; then
38882    # As a simple fix, exclude /usr/bin since it's not a real path.
38883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
38884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
38885      # a path prefixed by /cygdrive for fixpath to work.
38886      new_path="$CYGWIN_ROOT_PATH$input_path"
38887    fi
38888  fi
38889
38890  # remove trailing .exe if any
38891  new_path="${new_path/%.exe/}"
38892
38893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38894
38895  # First separate the path from the arguments. This will split at the first
38896  # space.
38897  complete="$DUMPBIN"
38898  path="${complete%% *}"
38899  tmp="$complete EOL"
38900  arguments="${tmp#* }"
38901
38902  # Input might be given as Windows format, start by converting to
38903  # unix format.
38904  new_path="$path"
38905
38906  windows_path="$new_path"
38907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38908    unix_path=`$CYGPATH -u "$windows_path"`
38909    new_path="$unix_path"
38910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38912    new_path="$unix_path"
38913  fi
38914
38915
38916  # Now try to locate executable using which
38917  new_path=`$WHICH "$new_path" 2> /dev/null`
38918
38919  if test "x$new_path" = x; then
38920    # Oops. Which didn't find the executable.
38921    # The splitting of arguments from the executable at a space might have been incorrect,
38922    # since paths with space are more likely in Windows. Give it another try with the whole
38923    # argument.
38924    path="$complete"
38925    arguments="EOL"
38926    new_path="$path"
38927
38928  windows_path="$new_path"
38929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38930    unix_path=`$CYGPATH -u "$windows_path"`
38931    new_path="$unix_path"
38932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38934    new_path="$unix_path"
38935  fi
38936
38937
38938    new_path=`$WHICH "$new_path" 2> /dev/null`
38939    # bat and cmd files are not always considered executable in MSYS causing which
38940    # to not find them
38941    if test "x$new_path" = x \
38942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
38943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
38944      new_path="$path"
38945
38946  windows_path="$new_path"
38947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38948    unix_path=`$CYGPATH -u "$windows_path"`
38949    new_path="$unix_path"
38950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38952    new_path="$unix_path"
38953  fi
38954
38955    fi
38956
38957    if test "x$new_path" = x; then
38958      # It's still not found. Now this is an unrecoverable error.
38959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
38960$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
38961      has_space=`$ECHO "$complete" | $GREP " "`
38962      if test "x$has_space" != x; then
38963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
38964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
38965      fi
38966      as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
38967    fi
38968  fi
38969
38970  # Now new_path has a complete unix path to the binary
38971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
38972    # Keep paths in /bin as-is, but remove trailing .exe if any
38973    new_path="${new_path/%.exe/}"
38974    # Do not save /bin paths to all_fixpath_prefixes!
38975  else
38976    # Not in mixed or Windows style, start by that.
38977    new_path=`cmd //c echo $new_path`
38978
38979  input_path="$new_path"
38980  # Check if we need to convert this using DOS-style short mode. If the path
38981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
38982  # take no chances and rewrite it.
38983  # Note: m4 eats our [], so we need to use [ and ] instead.
38984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
38985  if test "x$has_forbidden_chars" != x; then
38986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
38987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
38988  fi
38989
38990    # Output is in $new_path
38991
38992  windows_path="$new_path"
38993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
38994    unix_path=`$CYGPATH -u "$windows_path"`
38995    new_path="$unix_path"
38996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
38997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
38998    new_path="$unix_path"
38999  fi
39000
39001    # remove trailing .exe if any
39002    new_path="${new_path/%.exe/}"
39003
39004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39006  fi
39007
39008    else
39009      # We're on a unix platform. Hooray! :)
39010      # First separate the path from the arguments. This will split at the first
39011      # space.
39012      complete="$DUMPBIN"
39013      path="${complete%% *}"
39014      tmp="$complete EOL"
39015      arguments="${tmp#* }"
39016
39017      # Cannot rely on the command "which" here since it doesn't always work.
39018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39019      if test -z "$is_absolute_path"; then
39020        # Path to executable is not absolute. Find it.
39021        IFS_save="$IFS"
39022        IFS=:
39023        for p in $PATH; do
39024          if test -f "$p/$path" && test -x "$p/$path"; then
39025            new_path="$p/$path"
39026            break
39027          fi
39028        done
39029        IFS="$IFS_save"
39030      else
39031        # This is an absolute path, we can use it without further modifications.
39032        new_path="$path"
39033      fi
39034
39035      if test "x$new_path" = x; then
39036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&5
39037$as_echo "$as_me: The path of DUMPBIN, which resolves as \"$complete\", is not found." >&6;}
39038        has_space=`$ECHO "$complete" | $GREP " "`
39039        if test "x$has_space" != x; then
39040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39042        fi
39043        as_fn_error $? "Cannot locate the the path of DUMPBIN" "$LINENO" 5
39044      fi
39045    fi
39046
39047    # Now join together the path and the arguments once again
39048    if test "x$arguments" != xEOL; then
39049      new_complete="$new_path ${arguments% *}"
39050    else
39051      new_complete="$new_path"
39052    fi
39053
39054    if test "x$complete" != "x$new_complete"; then
39055      DUMPBIN="$new_complete"
39056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting DUMPBIN to \"$new_complete\"" >&5
39057$as_echo "$as_me: Rewriting DUMPBIN to \"$new_complete\"" >&6;}
39058    fi
39059  fi
39060
39061    # We need to check for 'msbuild.exe' because at the place where we expect to
39062    # find 'msbuild.exe' there's also a directory called 'msbuild' and configure
39063    # won't find the 'msbuild.exe' executable in that case (and the
39064    # 'ac_executable_extensions' is unusable due to performance reasons).
39065    # Notice that we intentionally don't fix up the path to MSBUILD because we
39066    # will call it in a DOS shell during freetype detection on Windows (see
39067    # 'LIB_SETUP_FREETYPE' in "libraries.m4"
39068    # Extract the first word of "msbuild.exe", so it can be a program name with args.
39069set dummy msbuild.exe; ac_word=$2
39070{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39071$as_echo_n "checking for $ac_word... " >&6; }
39072if ${ac_cv_prog_MSBUILD+:} false; then :
39073  $as_echo_n "(cached) " >&6
39074else
39075  if test -n "$MSBUILD"; then
39076  ac_cv_prog_MSBUILD="$MSBUILD" # Let the user override the test.
39077else
39078as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39079for as_dir in $PATH
39080do
39081  IFS=$as_save_IFS
39082  test -z "$as_dir" && as_dir=.
39083    for ac_exec_ext in '' $ac_executable_extensions; do
39084  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39085    ac_cv_prog_MSBUILD="msbuild.exe"
39086    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39087    break 2
39088  fi
39089done
39090  done
39091IFS=$as_save_IFS
39092
39093fi
39094fi
39095MSBUILD=$ac_cv_prog_MSBUILD
39096if test -n "$MSBUILD"; then
39097  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSBUILD" >&5
39098$as_echo "$MSBUILD" >&6; }
39099else
39100  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39101$as_echo "no" >&6; }
39102fi
39103
39104
39105  fi
39106
39107  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
39108
39109
39110  # Publish this variable in the help.
39111
39112
39113  if [ -z "${STRIP+x}" ]; then
39114    # The variable is not set by user, try to locate tool using the code snippet
39115    for ac_prog in strip
39116do
39117  # Extract the first word of "$ac_prog", so it can be a program name with args.
39118set dummy $ac_prog; ac_word=$2
39119{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39120$as_echo_n "checking for $ac_word... " >&6; }
39121if ${ac_cv_path_STRIP+:} false; then :
39122  $as_echo_n "(cached) " >&6
39123else
39124  case $STRIP in
39125  [\\/]* | ?:[\\/]*)
39126  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39127  ;;
39128  *)
39129  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39130for as_dir in $PATH
39131do
39132  IFS=$as_save_IFS
39133  test -z "$as_dir" && as_dir=.
39134    for ac_exec_ext in '' $ac_executable_extensions; do
39135  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39136    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39137    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39138    break 2
39139  fi
39140done
39141  done
39142IFS=$as_save_IFS
39143
39144  ;;
39145esac
39146fi
39147STRIP=$ac_cv_path_STRIP
39148if test -n "$STRIP"; then
39149  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39150$as_echo "$STRIP" >&6; }
39151else
39152  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39153$as_echo "no" >&6; }
39154fi
39155
39156
39157  test -n "$STRIP" && break
39158done
39159
39160  else
39161    # The variable is set, but is it from the command line or the environment?
39162
39163    # Try to remove the string !STRIP! from our list.
39164    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
39165    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39166      # If it failed, the variable was not from the command line. Ignore it,
39167      # but warn the user (except for BASH, which is always set by the calling BASH).
39168      if test "xSTRIP" != xBASH; then
39169        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
39170$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
39171      fi
39172      # Try to locate tool using the code snippet
39173      for ac_prog in strip
39174do
39175  # Extract the first word of "$ac_prog", so it can be a program name with args.
39176set dummy $ac_prog; ac_word=$2
39177{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39178$as_echo_n "checking for $ac_word... " >&6; }
39179if ${ac_cv_path_STRIP+:} false; then :
39180  $as_echo_n "(cached) " >&6
39181else
39182  case $STRIP in
39183  [\\/]* | ?:[\\/]*)
39184  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39185  ;;
39186  *)
39187  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39188for as_dir in $PATH
39189do
39190  IFS=$as_save_IFS
39191  test -z "$as_dir" && as_dir=.
39192    for ac_exec_ext in '' $ac_executable_extensions; do
39193  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39194    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39195    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39196    break 2
39197  fi
39198done
39199  done
39200IFS=$as_save_IFS
39201
39202  ;;
39203esac
39204fi
39205STRIP=$ac_cv_path_STRIP
39206if test -n "$STRIP"; then
39207  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39208$as_echo "$STRIP" >&6; }
39209else
39210  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39211$as_echo "no" >&6; }
39212fi
39213
39214
39215  test -n "$STRIP" && break
39216done
39217
39218    else
39219      # If it succeeded, then it was overridden by the user. We will use it
39220      # for the tool.
39221
39222      # First remove it from the list of overridden variables, so we can test
39223      # for unknown variables in the end.
39224      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39225
39226      # Check if we try to supply an empty value
39227      if test "x$STRIP" = x; then
39228        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
39229$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
39230        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39231$as_echo_n "checking for STRIP... " >&6; }
39232        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39233$as_echo "disabled" >&6; }
39234      else
39235        # Check if the provided tool contains a complete path.
39236        tool_specified="$STRIP"
39237        tool_basename="${tool_specified##*/}"
39238        if test "x$tool_basename" = "x$tool_specified"; then
39239          # A command without a complete path is provided, search $PATH.
39240          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
39241$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
39242          # Extract the first word of "$tool_basename", so it can be a program name with args.
39243set dummy $tool_basename; ac_word=$2
39244{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39245$as_echo_n "checking for $ac_word... " >&6; }
39246if ${ac_cv_path_STRIP+:} false; then :
39247  $as_echo_n "(cached) " >&6
39248else
39249  case $STRIP in
39250  [\\/]* | ?:[\\/]*)
39251  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
39252  ;;
39253  *)
39254  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39255for as_dir in $PATH
39256do
39257  IFS=$as_save_IFS
39258  test -z "$as_dir" && as_dir=.
39259    for ac_exec_ext in '' $ac_executable_extensions; do
39260  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39261    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
39262    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39263    break 2
39264  fi
39265done
39266  done
39267IFS=$as_save_IFS
39268
39269  ;;
39270esac
39271fi
39272STRIP=$ac_cv_path_STRIP
39273if test -n "$STRIP"; then
39274  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
39275$as_echo "$STRIP" >&6; }
39276else
39277  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39278$as_echo "no" >&6; }
39279fi
39280
39281
39282          if test "x$STRIP" = x; then
39283            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39284          fi
39285        else
39286          # Otherwise we believe it is a complete path. Use it as it is.
39287          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
39288$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
39289          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
39290$as_echo_n "checking for STRIP... " >&6; }
39291          if test ! -x "$tool_specified"; then
39292            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39293$as_echo "not found" >&6; }
39294            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
39295          fi
39296          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39297$as_echo "$tool_specified" >&6; }
39298        fi
39299      fi
39300    fi
39301
39302  fi
39303
39304
39305
39306  # Only process if variable expands to non-empty
39307
39308  if test "x$STRIP" != x; then
39309    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39310
39311  # First separate the path from the arguments. This will split at the first
39312  # space.
39313  complete="$STRIP"
39314  path="${complete%% *}"
39315  tmp="$complete EOL"
39316  arguments="${tmp#* }"
39317
39318  # Input might be given as Windows format, start by converting to
39319  # unix format.
39320  new_path=`$CYGPATH -u "$path"`
39321
39322  # Now try to locate executable using which
39323  new_path=`$WHICH "$new_path" 2> /dev/null`
39324  # bat and cmd files are not always considered executable in cygwin causing which
39325  # to not find them
39326  if test "x$new_path" = x \
39327      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39328      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39329    new_path=`$CYGPATH -u "$path"`
39330  fi
39331  if test "x$new_path" = x; then
39332    # Oops. Which didn't find the executable.
39333    # The splitting of arguments from the executable at a space might have been incorrect,
39334    # since paths with space are more likely in Windows. Give it another try with the whole
39335    # argument.
39336    path="$complete"
39337    arguments="EOL"
39338    new_path=`$CYGPATH -u "$path"`
39339    new_path=`$WHICH "$new_path" 2> /dev/null`
39340    # bat and cmd files are not always considered executable in cygwin causing which
39341    # to not find them
39342    if test "x$new_path" = x \
39343        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39344        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39345      new_path=`$CYGPATH -u "$path"`
39346    fi
39347    if test "x$new_path" = x; then
39348      # It's still not found. Now this is an unrecoverable error.
39349      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39350$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39351      has_space=`$ECHO "$complete" | $GREP " "`
39352      if test "x$has_space" != x; then
39353        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39354$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39355      fi
39356      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39357    fi
39358  fi
39359
39360  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39361  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39362  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39363  # "foo.exe" is OK but "foo" is an error.
39364  #
39365  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39366  # It is also a way to make sure we got the proper file name for the real test later on.
39367  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39368  if test "x$test_shortpath" = x; then
39369    # Short path failed, file does not exist as specified.
39370    # Try adding .exe or .cmd
39371    if test -f "${new_path}.exe"; then
39372      input_to_shortpath="${new_path}.exe"
39373    elif test -f "${new_path}.cmd"; then
39374      input_to_shortpath="${new_path}.cmd"
39375    else
39376      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
39377$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
39378      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39379$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39380      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39381    fi
39382  else
39383    input_to_shortpath="$new_path"
39384  fi
39385
39386  # Call helper function which possibly converts this using DOS-style short mode.
39387  # If so, the updated path is stored in $new_path.
39388  new_path="$input_to_shortpath"
39389
39390  input_path="$input_to_shortpath"
39391  # Check if we need to convert this using DOS-style short mode. If the path
39392  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39393  # take no chances and rewrite it.
39394  # Note: m4 eats our [], so we need to use [ and ] instead.
39395  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39396  if test "x$has_forbidden_chars" != x; then
39397    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39398    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39399    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39400    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39401      # Going to short mode and back again did indeed matter. Since short mode is
39402      # case insensitive, let's make it lowercase to improve readability.
39403      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39404      # Now convert it back to Unix-style (cygpath)
39405      input_path=`$CYGPATH -u "$shortmode_path"`
39406      new_path="$input_path"
39407    fi
39408  fi
39409
39410  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39411  if test "x$test_cygdrive_prefix" = x; then
39412    # As a simple fix, exclude /usr/bin since it's not a real path.
39413    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39414      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39415      # a path prefixed by /cygdrive for fixpath to work.
39416      new_path="$CYGWIN_ROOT_PATH$input_path"
39417    fi
39418  fi
39419
39420  # remove trailing .exe if any
39421  new_path="${new_path/%.exe/}"
39422
39423    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39424
39425  # First separate the path from the arguments. This will split at the first
39426  # space.
39427  complete="$STRIP"
39428  path="${complete%% *}"
39429  tmp="$complete EOL"
39430  arguments="${tmp#* }"
39431
39432  # Input might be given as Windows format, start by converting to
39433  # unix format.
39434  new_path="$path"
39435
39436  windows_path="$new_path"
39437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39438    unix_path=`$CYGPATH -u "$windows_path"`
39439    new_path="$unix_path"
39440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39442    new_path="$unix_path"
39443  fi
39444
39445
39446  # Now try to locate executable using which
39447  new_path=`$WHICH "$new_path" 2> /dev/null`
39448
39449  if test "x$new_path" = x; then
39450    # Oops. Which didn't find the executable.
39451    # The splitting of arguments from the executable at a space might have been incorrect,
39452    # since paths with space are more likely in Windows. Give it another try with the whole
39453    # argument.
39454    path="$complete"
39455    arguments="EOL"
39456    new_path="$path"
39457
39458  windows_path="$new_path"
39459  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39460    unix_path=`$CYGPATH -u "$windows_path"`
39461    new_path="$unix_path"
39462  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39463    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39464    new_path="$unix_path"
39465  fi
39466
39467
39468    new_path=`$WHICH "$new_path" 2> /dev/null`
39469    # bat and cmd files are not always considered executable in MSYS causing which
39470    # to not find them
39471    if test "x$new_path" = x \
39472        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39473        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39474      new_path="$path"
39475
39476  windows_path="$new_path"
39477  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39478    unix_path=`$CYGPATH -u "$windows_path"`
39479    new_path="$unix_path"
39480  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39481    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39482    new_path="$unix_path"
39483  fi
39484
39485    fi
39486
39487    if test "x$new_path" = x; then
39488      # It's still not found. Now this is an unrecoverable error.
39489      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39490$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39491      has_space=`$ECHO "$complete" | $GREP " "`
39492      if test "x$has_space" != x; then
39493        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39494$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39495      fi
39496      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39497    fi
39498  fi
39499
39500  # Now new_path has a complete unix path to the binary
39501  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39502    # Keep paths in /bin as-is, but remove trailing .exe if any
39503    new_path="${new_path/%.exe/}"
39504    # Do not save /bin paths to all_fixpath_prefixes!
39505  else
39506    # Not in mixed or Windows style, start by that.
39507    new_path=`cmd //c echo $new_path`
39508
39509  input_path="$new_path"
39510  # Check if we need to convert this using DOS-style short mode. If the path
39511  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39512  # take no chances and rewrite it.
39513  # Note: m4 eats our [], so we need to use [ and ] instead.
39514  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39515  if test "x$has_forbidden_chars" != x; then
39516    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39517    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39518  fi
39519
39520    # Output is in $new_path
39521
39522  windows_path="$new_path"
39523  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39524    unix_path=`$CYGPATH -u "$windows_path"`
39525    new_path="$unix_path"
39526  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39527    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39528    new_path="$unix_path"
39529  fi
39530
39531    # remove trailing .exe if any
39532    new_path="${new_path/%.exe/}"
39533
39534    # Save the first 10 bytes of this path to the storage, so fixpath can work.
39535    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
39536  fi
39537
39538    else
39539      # We're on a unix platform. Hooray! :)
39540      # First separate the path from the arguments. This will split at the first
39541      # space.
39542      complete="$STRIP"
39543      path="${complete%% *}"
39544      tmp="$complete EOL"
39545      arguments="${tmp#* }"
39546
39547      # Cannot rely on the command "which" here since it doesn't always work.
39548      is_absolute_path=`$ECHO "$path" | $GREP ^/`
39549      if test -z "$is_absolute_path"; then
39550        # Path to executable is not absolute. Find it.
39551        IFS_save="$IFS"
39552        IFS=:
39553        for p in $PATH; do
39554          if test -f "$p/$path" && test -x "$p/$path"; then
39555            new_path="$p/$path"
39556            break
39557          fi
39558        done
39559        IFS="$IFS_save"
39560      else
39561        # This is an absolute path, we can use it without further modifications.
39562        new_path="$path"
39563      fi
39564
39565      if test "x$new_path" = x; then
39566        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
39567$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
39568        has_space=`$ECHO "$complete" | $GREP " "`
39569        if test "x$has_space" != x; then
39570          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
39571$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
39572        fi
39573        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
39574      fi
39575    fi
39576
39577    # Now join together the path and the arguments once again
39578    if test "x$arguments" != xEOL; then
39579      new_complete="$new_path ${arguments% *}"
39580    else
39581      new_complete="$new_path"
39582    fi
39583
39584    if test "x$complete" != "x$new_complete"; then
39585      STRIP="$new_complete"
39586      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
39587$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
39588    fi
39589  fi
39590
39591
39592
39593  # Publish this variable in the help.
39594
39595
39596  if [ -z "${NM+x}" ]; then
39597    # The variable is not set by user, try to locate tool using the code snippet
39598    for ac_prog in nm
39599do
39600  # Extract the first word of "$ac_prog", so it can be a program name with args.
39601set dummy $ac_prog; ac_word=$2
39602{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39603$as_echo_n "checking for $ac_word... " >&6; }
39604if ${ac_cv_path_NM+:} false; then :
39605  $as_echo_n "(cached) " >&6
39606else
39607  case $NM in
39608  [\\/]* | ?:[\\/]*)
39609  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39610  ;;
39611  *)
39612  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39613for as_dir in $PATH
39614do
39615  IFS=$as_save_IFS
39616  test -z "$as_dir" && as_dir=.
39617    for ac_exec_ext in '' $ac_executable_extensions; do
39618  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39619    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39620    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39621    break 2
39622  fi
39623done
39624  done
39625IFS=$as_save_IFS
39626
39627  ;;
39628esac
39629fi
39630NM=$ac_cv_path_NM
39631if test -n "$NM"; then
39632  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39633$as_echo "$NM" >&6; }
39634else
39635  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39636$as_echo "no" >&6; }
39637fi
39638
39639
39640  test -n "$NM" && break
39641done
39642
39643  else
39644    # The variable is set, but is it from the command line or the environment?
39645
39646    # Try to remove the string !NM! from our list.
39647    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
39648    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
39649      # If it failed, the variable was not from the command line. Ignore it,
39650      # but warn the user (except for BASH, which is always set by the calling BASH).
39651      if test "xNM" != xBASH; then
39652        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
39653$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
39654      fi
39655      # Try to locate tool using the code snippet
39656      for ac_prog in nm
39657do
39658  # Extract the first word of "$ac_prog", so it can be a program name with args.
39659set dummy $ac_prog; ac_word=$2
39660{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39661$as_echo_n "checking for $ac_word... " >&6; }
39662if ${ac_cv_path_NM+:} false; then :
39663  $as_echo_n "(cached) " >&6
39664else
39665  case $NM in
39666  [\\/]* | ?:[\\/]*)
39667  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39668  ;;
39669  *)
39670  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39671for as_dir in $PATH
39672do
39673  IFS=$as_save_IFS
39674  test -z "$as_dir" && as_dir=.
39675    for ac_exec_ext in '' $ac_executable_extensions; do
39676  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39677    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39678    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39679    break 2
39680  fi
39681done
39682  done
39683IFS=$as_save_IFS
39684
39685  ;;
39686esac
39687fi
39688NM=$ac_cv_path_NM
39689if test -n "$NM"; then
39690  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39691$as_echo "$NM" >&6; }
39692else
39693  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39694$as_echo "no" >&6; }
39695fi
39696
39697
39698  test -n "$NM" && break
39699done
39700
39701    else
39702      # If it succeeded, then it was overridden by the user. We will use it
39703      # for the tool.
39704
39705      # First remove it from the list of overridden variables, so we can test
39706      # for unknown variables in the end.
39707      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
39708
39709      # Check if we try to supply an empty value
39710      if test "x$NM" = x; then
39711        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
39712$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
39713        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39714$as_echo_n "checking for NM... " >&6; }
39715        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
39716$as_echo "disabled" >&6; }
39717      else
39718        # Check if the provided tool contains a complete path.
39719        tool_specified="$NM"
39720        tool_basename="${tool_specified##*/}"
39721        if test "x$tool_basename" = "x$tool_specified"; then
39722          # A command without a complete path is provided, search $PATH.
39723          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
39724$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
39725          # Extract the first word of "$tool_basename", so it can be a program name with args.
39726set dummy $tool_basename; ac_word=$2
39727{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
39728$as_echo_n "checking for $ac_word... " >&6; }
39729if ${ac_cv_path_NM+:} false; then :
39730  $as_echo_n "(cached) " >&6
39731else
39732  case $NM in
39733  [\\/]* | ?:[\\/]*)
39734  ac_cv_path_NM="$NM" # Let the user override the test with a path.
39735  ;;
39736  *)
39737  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
39738for as_dir in $PATH
39739do
39740  IFS=$as_save_IFS
39741  test -z "$as_dir" && as_dir=.
39742    for ac_exec_ext in '' $ac_executable_extensions; do
39743  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
39744    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
39745    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
39746    break 2
39747  fi
39748done
39749  done
39750IFS=$as_save_IFS
39751
39752  ;;
39753esac
39754fi
39755NM=$ac_cv_path_NM
39756if test -n "$NM"; then
39757  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
39758$as_echo "$NM" >&6; }
39759else
39760  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
39761$as_echo "no" >&6; }
39762fi
39763
39764
39765          if test "x$NM" = x; then
39766            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
39767          fi
39768        else
39769          # Otherwise we believe it is a complete path. Use it as it is.
39770          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
39771$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
39772          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
39773$as_echo_n "checking for NM... " >&6; }
39774          if test ! -x "$tool_specified"; then
39775            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
39776$as_echo "not found" >&6; }
39777            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
39778          fi
39779          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
39780$as_echo "$tool_specified" >&6; }
39781        fi
39782      fi
39783    fi
39784
39785  fi
39786
39787
39788
39789  # Only process if variable expands to non-empty
39790
39791  if test "x$NM" != x; then
39792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39793
39794  # First separate the path from the arguments. This will split at the first
39795  # space.
39796  complete="$NM"
39797  path="${complete%% *}"
39798  tmp="$complete EOL"
39799  arguments="${tmp#* }"
39800
39801  # Input might be given as Windows format, start by converting to
39802  # unix format.
39803  new_path=`$CYGPATH -u "$path"`
39804
39805  # Now try to locate executable using which
39806  new_path=`$WHICH "$new_path" 2> /dev/null`
39807  # bat and cmd files are not always considered executable in cygwin causing which
39808  # to not find them
39809  if test "x$new_path" = x \
39810      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39811      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39812    new_path=`$CYGPATH -u "$path"`
39813  fi
39814  if test "x$new_path" = x; then
39815    # Oops. Which didn't find the executable.
39816    # The splitting of arguments from the executable at a space might have been incorrect,
39817    # since paths with space are more likely in Windows. Give it another try with the whole
39818    # argument.
39819    path="$complete"
39820    arguments="EOL"
39821    new_path=`$CYGPATH -u "$path"`
39822    new_path=`$WHICH "$new_path" 2> /dev/null`
39823    # bat and cmd files are not always considered executable in cygwin causing which
39824    # to not find them
39825    if test "x$new_path" = x \
39826        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39827        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39828      new_path=`$CYGPATH -u "$path"`
39829    fi
39830    if test "x$new_path" = x; then
39831      # It's still not found. Now this is an unrecoverable error.
39832      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39833$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39834      has_space=`$ECHO "$complete" | $GREP " "`
39835      if test "x$has_space" != x; then
39836        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39837$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39838      fi
39839      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39840    fi
39841  fi
39842
39843  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
39844  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
39845  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
39846  # "foo.exe" is OK but "foo" is an error.
39847  #
39848  # This test is therefore slightly more accurate than "test -f" to check for file presence.
39849  # It is also a way to make sure we got the proper file name for the real test later on.
39850  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
39851  if test "x$test_shortpath" = x; then
39852    # Short path failed, file does not exist as specified.
39853    # Try adding .exe or .cmd
39854    if test -f "${new_path}.exe"; then
39855      input_to_shortpath="${new_path}.exe"
39856    elif test -f "${new_path}.cmd"; then
39857      input_to_shortpath="${new_path}.cmd"
39858    else
39859      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
39860$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
39861      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
39862$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
39863      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39864    fi
39865  else
39866    input_to_shortpath="$new_path"
39867  fi
39868
39869  # Call helper function which possibly converts this using DOS-style short mode.
39870  # If so, the updated path is stored in $new_path.
39871  new_path="$input_to_shortpath"
39872
39873  input_path="$input_to_shortpath"
39874  # Check if we need to convert this using DOS-style short mode. If the path
39875  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39876  # take no chances and rewrite it.
39877  # Note: m4 eats our [], so we need to use [ and ] instead.
39878  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
39879  if test "x$has_forbidden_chars" != x; then
39880    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
39881    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
39882    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
39883    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
39884      # Going to short mode and back again did indeed matter. Since short mode is
39885      # case insensitive, let's make it lowercase to improve readability.
39886      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
39887      # Now convert it back to Unix-style (cygpath)
39888      input_path=`$CYGPATH -u "$shortmode_path"`
39889      new_path="$input_path"
39890    fi
39891  fi
39892
39893  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
39894  if test "x$test_cygdrive_prefix" = x; then
39895    # As a simple fix, exclude /usr/bin since it's not a real path.
39896    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
39897      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
39898      # a path prefixed by /cygdrive for fixpath to work.
39899      new_path="$CYGWIN_ROOT_PATH$input_path"
39900    fi
39901  fi
39902
39903  # remove trailing .exe if any
39904  new_path="${new_path/%.exe/}"
39905
39906    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39907
39908  # First separate the path from the arguments. This will split at the first
39909  # space.
39910  complete="$NM"
39911  path="${complete%% *}"
39912  tmp="$complete EOL"
39913  arguments="${tmp#* }"
39914
39915  # Input might be given as Windows format, start by converting to
39916  # unix format.
39917  new_path="$path"
39918
39919  windows_path="$new_path"
39920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39921    unix_path=`$CYGPATH -u "$windows_path"`
39922    new_path="$unix_path"
39923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39925    new_path="$unix_path"
39926  fi
39927
39928
39929  # Now try to locate executable using which
39930  new_path=`$WHICH "$new_path" 2> /dev/null`
39931
39932  if test "x$new_path" = x; then
39933    # Oops. Which didn't find the executable.
39934    # The splitting of arguments from the executable at a space might have been incorrect,
39935    # since paths with space are more likely in Windows. Give it another try with the whole
39936    # argument.
39937    path="$complete"
39938    arguments="EOL"
39939    new_path="$path"
39940
39941  windows_path="$new_path"
39942  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39943    unix_path=`$CYGPATH -u "$windows_path"`
39944    new_path="$unix_path"
39945  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39946    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39947    new_path="$unix_path"
39948  fi
39949
39950
39951    new_path=`$WHICH "$new_path" 2> /dev/null`
39952    # bat and cmd files are not always considered executable in MSYS causing which
39953    # to not find them
39954    if test "x$new_path" = x \
39955        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
39956        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
39957      new_path="$path"
39958
39959  windows_path="$new_path"
39960  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
39961    unix_path=`$CYGPATH -u "$windows_path"`
39962    new_path="$unix_path"
39963  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
39964    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
39965    new_path="$unix_path"
39966  fi
39967
39968    fi
39969
39970    if test "x$new_path" = x; then
39971      # It's still not found. Now this is an unrecoverable error.
39972      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
39973$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
39974      has_space=`$ECHO "$complete" | $GREP " "`
39975      if test "x$has_space" != x; then
39976        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
39977$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
39978      fi
39979      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
39980    fi
39981  fi
39982
39983  # Now new_path has a complete unix path to the binary
39984  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
39985    # Keep paths in /bin as-is, but remove trailing .exe if any
39986    new_path="${new_path/%.exe/}"
39987    # Do not save /bin paths to all_fixpath_prefixes!
39988  else
39989    # Not in mixed or Windows style, start by that.
39990    new_path=`cmd //c echo $new_path`
39991
39992  input_path="$new_path"
39993  # Check if we need to convert this using DOS-style short mode. If the path
39994  # contains just simple characters, use it. Otherwise (spaces, weird characters),
39995  # take no chances and rewrite it.
39996  # Note: m4 eats our [], so we need to use [ and ] instead.
39997  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
39998  if test "x$has_forbidden_chars" != x; then
39999    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40000    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40001  fi
40002
40003    # Output is in $new_path
40004
40005  windows_path="$new_path"
40006  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40007    unix_path=`$CYGPATH -u "$windows_path"`
40008    new_path="$unix_path"
40009  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40010    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40011    new_path="$unix_path"
40012  fi
40013
40014    # remove trailing .exe if any
40015    new_path="${new_path/%.exe/}"
40016
40017    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40018    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40019  fi
40020
40021    else
40022      # We're on a unix platform. Hooray! :)
40023      # First separate the path from the arguments. This will split at the first
40024      # space.
40025      complete="$NM"
40026      path="${complete%% *}"
40027      tmp="$complete EOL"
40028      arguments="${tmp#* }"
40029
40030      # Cannot rely on the command "which" here since it doesn't always work.
40031      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40032      if test -z "$is_absolute_path"; then
40033        # Path to executable is not absolute. Find it.
40034        IFS_save="$IFS"
40035        IFS=:
40036        for p in $PATH; do
40037          if test -f "$p/$path" && test -x "$p/$path"; then
40038            new_path="$p/$path"
40039            break
40040          fi
40041        done
40042        IFS="$IFS_save"
40043      else
40044        # This is an absolute path, we can use it without further modifications.
40045        new_path="$path"
40046      fi
40047
40048      if test "x$new_path" = x; then
40049        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
40050$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
40051        has_space=`$ECHO "$complete" | $GREP " "`
40052        if test "x$has_space" != x; then
40053          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40054$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40055        fi
40056        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
40057      fi
40058    fi
40059
40060    # Now join together the path and the arguments once again
40061    if test "x$arguments" != xEOL; then
40062      new_complete="$new_path ${arguments% *}"
40063    else
40064      new_complete="$new_path"
40065    fi
40066
40067    if test "x$complete" != "x$new_complete"; then
40068      NM="$new_complete"
40069      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
40070$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
40071    fi
40072  fi
40073
40074
40075
40076  # Publish this variable in the help.
40077
40078
40079  if [ -z "${GNM+x}" ]; then
40080    # The variable is not set by user, try to locate tool using the code snippet
40081    for ac_prog in gnm
40082do
40083  # Extract the first word of "$ac_prog", so it can be a program name with args.
40084set dummy $ac_prog; ac_word=$2
40085{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40086$as_echo_n "checking for $ac_word... " >&6; }
40087if ${ac_cv_path_GNM+:} false; then :
40088  $as_echo_n "(cached) " >&6
40089else
40090  case $GNM in
40091  [\\/]* | ?:[\\/]*)
40092  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40093  ;;
40094  *)
40095  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40096for as_dir in $PATH
40097do
40098  IFS=$as_save_IFS
40099  test -z "$as_dir" && as_dir=.
40100    for ac_exec_ext in '' $ac_executable_extensions; do
40101  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40102    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40103    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40104    break 2
40105  fi
40106done
40107  done
40108IFS=$as_save_IFS
40109
40110  ;;
40111esac
40112fi
40113GNM=$ac_cv_path_GNM
40114if test -n "$GNM"; then
40115  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40116$as_echo "$GNM" >&6; }
40117else
40118  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40119$as_echo "no" >&6; }
40120fi
40121
40122
40123  test -n "$GNM" && break
40124done
40125
40126  else
40127    # The variable is set, but is it from the command line or the environment?
40128
40129    # Try to remove the string !GNM! from our list.
40130    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!GNM!/}
40131    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40132      # If it failed, the variable was not from the command line. Ignore it,
40133      # but warn the user (except for BASH, which is always set by the calling BASH).
40134      if test "xGNM" != xBASH; then
40135        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&5
40136$as_echo "$as_me: WARNING: Ignoring value of GNM from the environment. Use command line variables instead." >&2;}
40137      fi
40138      # Try to locate tool using the code snippet
40139      for ac_prog in gnm
40140do
40141  # Extract the first word of "$ac_prog", so it can be a program name with args.
40142set dummy $ac_prog; ac_word=$2
40143{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40144$as_echo_n "checking for $ac_word... " >&6; }
40145if ${ac_cv_path_GNM+:} false; then :
40146  $as_echo_n "(cached) " >&6
40147else
40148  case $GNM in
40149  [\\/]* | ?:[\\/]*)
40150  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40151  ;;
40152  *)
40153  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40154for as_dir in $PATH
40155do
40156  IFS=$as_save_IFS
40157  test -z "$as_dir" && as_dir=.
40158    for ac_exec_ext in '' $ac_executable_extensions; do
40159  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40160    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40161    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40162    break 2
40163  fi
40164done
40165  done
40166IFS=$as_save_IFS
40167
40168  ;;
40169esac
40170fi
40171GNM=$ac_cv_path_GNM
40172if test -n "$GNM"; then
40173  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40174$as_echo "$GNM" >&6; }
40175else
40176  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40177$as_echo "no" >&6; }
40178fi
40179
40180
40181  test -n "$GNM" && break
40182done
40183
40184    else
40185      # If it succeeded, then it was overridden by the user. We will use it
40186      # for the tool.
40187
40188      # First remove it from the list of overridden variables, so we can test
40189      # for unknown variables in the end.
40190      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40191
40192      # Check if we try to supply an empty value
40193      if test "x$GNM" = x; then
40194        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool GNM= (no value)" >&5
40195$as_echo "$as_me: Setting user supplied tool GNM= (no value)" >&6;}
40196        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40197$as_echo_n "checking for GNM... " >&6; }
40198        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40199$as_echo "disabled" >&6; }
40200      else
40201        # Check if the provided tool contains a complete path.
40202        tool_specified="$GNM"
40203        tool_basename="${tool_specified##*/}"
40204        if test "x$tool_basename" = "x$tool_specified"; then
40205          # A command without a complete path is provided, search $PATH.
40206          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool GNM=$tool_basename" >&5
40207$as_echo "$as_me: Will search for user supplied tool GNM=$tool_basename" >&6;}
40208          # Extract the first word of "$tool_basename", so it can be a program name with args.
40209set dummy $tool_basename; ac_word=$2
40210{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40211$as_echo_n "checking for $ac_word... " >&6; }
40212if ${ac_cv_path_GNM+:} false; then :
40213  $as_echo_n "(cached) " >&6
40214else
40215  case $GNM in
40216  [\\/]* | ?:[\\/]*)
40217  ac_cv_path_GNM="$GNM" # Let the user override the test with a path.
40218  ;;
40219  *)
40220  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40221for as_dir in $PATH
40222do
40223  IFS=$as_save_IFS
40224  test -z "$as_dir" && as_dir=.
40225    for ac_exec_ext in '' $ac_executable_extensions; do
40226  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40227    ac_cv_path_GNM="$as_dir/$ac_word$ac_exec_ext"
40228    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40229    break 2
40230  fi
40231done
40232  done
40233IFS=$as_save_IFS
40234
40235  ;;
40236esac
40237fi
40238GNM=$ac_cv_path_GNM
40239if test -n "$GNM"; then
40240  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $GNM" >&5
40241$as_echo "$GNM" >&6; }
40242else
40243  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40244$as_echo "no" >&6; }
40245fi
40246
40247
40248          if test "x$GNM" = x; then
40249            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40250          fi
40251        else
40252          # Otherwise we believe it is a complete path. Use it as it is.
40253          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool GNM=$tool_specified" >&5
40254$as_echo "$as_me: Will use user supplied tool GNM=$tool_specified" >&6;}
40255          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNM" >&5
40256$as_echo_n "checking for GNM... " >&6; }
40257          if test ! -x "$tool_specified"; then
40258            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40259$as_echo "not found" >&6; }
40260            as_fn_error $? "User supplied tool GNM=$tool_specified does not exist or is not executable" "$LINENO" 5
40261          fi
40262          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40263$as_echo "$tool_specified" >&6; }
40264        fi
40265      fi
40266    fi
40267
40268  fi
40269
40270
40271
40272  # Only process if variable expands to non-empty
40273
40274  if test "x$GNM" != x; then
40275    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40276
40277  # First separate the path from the arguments. This will split at the first
40278  # space.
40279  complete="$GNM"
40280  path="${complete%% *}"
40281  tmp="$complete EOL"
40282  arguments="${tmp#* }"
40283
40284  # Input might be given as Windows format, start by converting to
40285  # unix format.
40286  new_path=`$CYGPATH -u "$path"`
40287
40288  # Now try to locate executable using which
40289  new_path=`$WHICH "$new_path" 2> /dev/null`
40290  # bat and cmd files are not always considered executable in cygwin causing which
40291  # to not find them
40292  if test "x$new_path" = x \
40293      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40294      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40295    new_path=`$CYGPATH -u "$path"`
40296  fi
40297  if test "x$new_path" = x; then
40298    # Oops. Which didn't find the executable.
40299    # The splitting of arguments from the executable at a space might have been incorrect,
40300    # since paths with space are more likely in Windows. Give it another try with the whole
40301    # argument.
40302    path="$complete"
40303    arguments="EOL"
40304    new_path=`$CYGPATH -u "$path"`
40305    new_path=`$WHICH "$new_path" 2> /dev/null`
40306    # bat and cmd files are not always considered executable in cygwin causing which
40307    # to not find them
40308    if test "x$new_path" = x \
40309        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40310        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40311      new_path=`$CYGPATH -u "$path"`
40312    fi
40313    if test "x$new_path" = x; then
40314      # It's still not found. Now this is an unrecoverable error.
40315      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40316$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40317      has_space=`$ECHO "$complete" | $GREP " "`
40318      if test "x$has_space" != x; then
40319        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40320$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40321      fi
40322      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40323    fi
40324  fi
40325
40326  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40327  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40328  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40329  # "foo.exe" is OK but "foo" is an error.
40330  #
40331  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40332  # It is also a way to make sure we got the proper file name for the real test later on.
40333  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40334  if test "x$test_shortpath" = x; then
40335    # Short path failed, file does not exist as specified.
40336    # Try adding .exe or .cmd
40337    if test -f "${new_path}.exe"; then
40338      input_to_shortpath="${new_path}.exe"
40339    elif test -f "${new_path}.cmd"; then
40340      input_to_shortpath="${new_path}.cmd"
40341    else
40342      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$new_path\", is invalid." >&5
40343$as_echo "$as_me: The path of GNM, which resolves as \"$new_path\", is invalid." >&6;}
40344      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40345$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40346      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40347    fi
40348  else
40349    input_to_shortpath="$new_path"
40350  fi
40351
40352  # Call helper function which possibly converts this using DOS-style short mode.
40353  # If so, the updated path is stored in $new_path.
40354  new_path="$input_to_shortpath"
40355
40356  input_path="$input_to_shortpath"
40357  # Check if we need to convert this using DOS-style short mode. If the path
40358  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40359  # take no chances and rewrite it.
40360  # Note: m4 eats our [], so we need to use [ and ] instead.
40361  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40362  if test "x$has_forbidden_chars" != x; then
40363    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40364    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40365    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40366    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40367      # Going to short mode and back again did indeed matter. Since short mode is
40368      # case insensitive, let's make it lowercase to improve readability.
40369      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40370      # Now convert it back to Unix-style (cygpath)
40371      input_path=`$CYGPATH -u "$shortmode_path"`
40372      new_path="$input_path"
40373    fi
40374  fi
40375
40376  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40377  if test "x$test_cygdrive_prefix" = x; then
40378    # As a simple fix, exclude /usr/bin since it's not a real path.
40379    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40380      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40381      # a path prefixed by /cygdrive for fixpath to work.
40382      new_path="$CYGWIN_ROOT_PATH$input_path"
40383    fi
40384  fi
40385
40386  # remove trailing .exe if any
40387  new_path="${new_path/%.exe/}"
40388
40389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40390
40391  # First separate the path from the arguments. This will split at the first
40392  # space.
40393  complete="$GNM"
40394  path="${complete%% *}"
40395  tmp="$complete EOL"
40396  arguments="${tmp#* }"
40397
40398  # Input might be given as Windows format, start by converting to
40399  # unix format.
40400  new_path="$path"
40401
40402  windows_path="$new_path"
40403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40404    unix_path=`$CYGPATH -u "$windows_path"`
40405    new_path="$unix_path"
40406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40408    new_path="$unix_path"
40409  fi
40410
40411
40412  # Now try to locate executable using which
40413  new_path=`$WHICH "$new_path" 2> /dev/null`
40414
40415  if test "x$new_path" = x; then
40416    # Oops. Which didn't find the executable.
40417    # The splitting of arguments from the executable at a space might have been incorrect,
40418    # since paths with space are more likely in Windows. Give it another try with the whole
40419    # argument.
40420    path="$complete"
40421    arguments="EOL"
40422    new_path="$path"
40423
40424  windows_path="$new_path"
40425  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40426    unix_path=`$CYGPATH -u "$windows_path"`
40427    new_path="$unix_path"
40428  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40429    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40430    new_path="$unix_path"
40431  fi
40432
40433
40434    new_path=`$WHICH "$new_path" 2> /dev/null`
40435    # bat and cmd files are not always considered executable in MSYS causing which
40436    # to not find them
40437    if test "x$new_path" = x \
40438        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40439        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40440      new_path="$path"
40441
40442  windows_path="$new_path"
40443  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40444    unix_path=`$CYGPATH -u "$windows_path"`
40445    new_path="$unix_path"
40446  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40447    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40448    new_path="$unix_path"
40449  fi
40450
40451    fi
40452
40453    if test "x$new_path" = x; then
40454      # It's still not found. Now this is an unrecoverable error.
40455      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40456$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40457      has_space=`$ECHO "$complete" | $GREP " "`
40458      if test "x$has_space" != x; then
40459        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40460$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40461      fi
40462      as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40463    fi
40464  fi
40465
40466  # Now new_path has a complete unix path to the binary
40467  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
40468    # Keep paths in /bin as-is, but remove trailing .exe if any
40469    new_path="${new_path/%.exe/}"
40470    # Do not save /bin paths to all_fixpath_prefixes!
40471  else
40472    # Not in mixed or Windows style, start by that.
40473    new_path=`cmd //c echo $new_path`
40474
40475  input_path="$new_path"
40476  # Check if we need to convert this using DOS-style short mode. If the path
40477  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40478  # take no chances and rewrite it.
40479  # Note: m4 eats our [], so we need to use [ and ] instead.
40480  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
40481  if test "x$has_forbidden_chars" != x; then
40482    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40483    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40484  fi
40485
40486    # Output is in $new_path
40487
40488  windows_path="$new_path"
40489  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40490    unix_path=`$CYGPATH -u "$windows_path"`
40491    new_path="$unix_path"
40492  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40493    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
40494    new_path="$unix_path"
40495  fi
40496
40497    # remove trailing .exe if any
40498    new_path="${new_path/%.exe/}"
40499
40500    # Save the first 10 bytes of this path to the storage, so fixpath can work.
40501    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
40502  fi
40503
40504    else
40505      # We're on a unix platform. Hooray! :)
40506      # First separate the path from the arguments. This will split at the first
40507      # space.
40508      complete="$GNM"
40509      path="${complete%% *}"
40510      tmp="$complete EOL"
40511      arguments="${tmp#* }"
40512
40513      # Cannot rely on the command "which" here since it doesn't always work.
40514      is_absolute_path=`$ECHO "$path" | $GREP ^/`
40515      if test -z "$is_absolute_path"; then
40516        # Path to executable is not absolute. Find it.
40517        IFS_save="$IFS"
40518        IFS=:
40519        for p in $PATH; do
40520          if test -f "$p/$path" && test -x "$p/$path"; then
40521            new_path="$p/$path"
40522            break
40523          fi
40524        done
40525        IFS="$IFS_save"
40526      else
40527        # This is an absolute path, we can use it without further modifications.
40528        new_path="$path"
40529      fi
40530
40531      if test "x$new_path" = x; then
40532        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of GNM, which resolves as \"$complete\", is not found." >&5
40533$as_echo "$as_me: The path of GNM, which resolves as \"$complete\", is not found." >&6;}
40534        has_space=`$ECHO "$complete" | $GREP " "`
40535        if test "x$has_space" != x; then
40536          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
40537$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
40538        fi
40539        as_fn_error $? "Cannot locate the the path of GNM" "$LINENO" 5
40540      fi
40541    fi
40542
40543    # Now join together the path and the arguments once again
40544    if test "x$arguments" != xEOL; then
40545      new_complete="$new_path ${arguments% *}"
40546    else
40547      new_complete="$new_path"
40548    fi
40549
40550    if test "x$complete" != "x$new_complete"; then
40551      GNM="$new_complete"
40552      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting GNM to \"$new_complete\"" >&5
40553$as_echo "$as_me: Rewriting GNM to \"$new_complete\"" >&6;}
40554    fi
40555  fi
40556
40557  elif test "x$OPENJDK_TARGET_OS" != xwindows; then
40558    # FIXME: we should unify this with the solaris case above.
40559
40560
40561  # Publish this variable in the help.
40562
40563
40564  if [ -z "${STRIP+x}" ]; then
40565    # The variable is not set by user, try to locate tool using the code snippet
40566    if test -n "$ac_tool_prefix"; then
40567  for ac_prog in strip
40568  do
40569    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40570set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40571{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40572$as_echo_n "checking for $ac_word... " >&6; }
40573if ${ac_cv_prog_STRIP+:} false; then :
40574  $as_echo_n "(cached) " >&6
40575else
40576  if test -n "$STRIP"; then
40577  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40578else
40579as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40580for as_dir in $PATH
40581do
40582  IFS=$as_save_IFS
40583  test -z "$as_dir" && as_dir=.
40584    for ac_exec_ext in '' $ac_executable_extensions; do
40585  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40586    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40587    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40588    break 2
40589  fi
40590done
40591  done
40592IFS=$as_save_IFS
40593
40594fi
40595fi
40596STRIP=$ac_cv_prog_STRIP
40597if test -n "$STRIP"; then
40598  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40599$as_echo "$STRIP" >&6; }
40600else
40601  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40602$as_echo "no" >&6; }
40603fi
40604
40605
40606    test -n "$STRIP" && break
40607  done
40608fi
40609if test -z "$STRIP"; then
40610  ac_ct_STRIP=$STRIP
40611  for ac_prog in strip
40612do
40613  # Extract the first word of "$ac_prog", so it can be a program name with args.
40614set dummy $ac_prog; ac_word=$2
40615{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40616$as_echo_n "checking for $ac_word... " >&6; }
40617if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40618  $as_echo_n "(cached) " >&6
40619else
40620  if test -n "$ac_ct_STRIP"; then
40621  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40622else
40623as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40624for as_dir in $PATH
40625do
40626  IFS=$as_save_IFS
40627  test -z "$as_dir" && as_dir=.
40628    for ac_exec_ext in '' $ac_executable_extensions; do
40629  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40630    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40631    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40632    break 2
40633  fi
40634done
40635  done
40636IFS=$as_save_IFS
40637
40638fi
40639fi
40640ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40641if test -n "$ac_ct_STRIP"; then
40642  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40643$as_echo "$ac_ct_STRIP" >&6; }
40644else
40645  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40646$as_echo "no" >&6; }
40647fi
40648
40649
40650  test -n "$ac_ct_STRIP" && break
40651done
40652
40653  if test "x$ac_ct_STRIP" = x; then
40654    STRIP=""
40655  else
40656    case $cross_compiling:$ac_tool_warned in
40657yes:)
40658{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40659$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40660ac_tool_warned=yes ;;
40661esac
40662    STRIP=$ac_ct_STRIP
40663  fi
40664fi
40665
40666  else
40667    # The variable is set, but is it from the command line or the environment?
40668
40669    # Try to remove the string !STRIP! from our list.
40670    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!STRIP!/}
40671    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
40672      # If it failed, the variable was not from the command line. Ignore it,
40673      # but warn the user (except for BASH, which is always set by the calling BASH).
40674      if test "xSTRIP" != xBASH; then
40675        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&5
40676$as_echo "$as_me: WARNING: Ignoring value of STRIP from the environment. Use command line variables instead." >&2;}
40677      fi
40678      # Try to locate tool using the code snippet
40679      if test -n "$ac_tool_prefix"; then
40680  for ac_prog in strip
40681  do
40682    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
40683set dummy $ac_tool_prefix$ac_prog; ac_word=$2
40684{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40685$as_echo_n "checking for $ac_word... " >&6; }
40686if ${ac_cv_prog_STRIP+:} false; then :
40687  $as_echo_n "(cached) " >&6
40688else
40689  if test -n "$STRIP"; then
40690  ac_cv_prog_STRIP="$STRIP" # Let the user override the test.
40691else
40692as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40693for as_dir in $PATH
40694do
40695  IFS=$as_save_IFS
40696  test -z "$as_dir" && as_dir=.
40697    for ac_exec_ext in '' $ac_executable_extensions; do
40698  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40699    ac_cv_prog_STRIP="$ac_tool_prefix$ac_prog"
40700    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40701    break 2
40702  fi
40703done
40704  done
40705IFS=$as_save_IFS
40706
40707fi
40708fi
40709STRIP=$ac_cv_prog_STRIP
40710if test -n "$STRIP"; then
40711  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40712$as_echo "$STRIP" >&6; }
40713else
40714  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40715$as_echo "no" >&6; }
40716fi
40717
40718
40719    test -n "$STRIP" && break
40720  done
40721fi
40722if test -z "$STRIP"; then
40723  ac_ct_STRIP=$STRIP
40724  for ac_prog in strip
40725do
40726  # Extract the first word of "$ac_prog", so it can be a program name with args.
40727set dummy $ac_prog; ac_word=$2
40728{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40729$as_echo_n "checking for $ac_word... " >&6; }
40730if ${ac_cv_prog_ac_ct_STRIP+:} false; then :
40731  $as_echo_n "(cached) " >&6
40732else
40733  if test -n "$ac_ct_STRIP"; then
40734  ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test.
40735else
40736as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40737for as_dir in $PATH
40738do
40739  IFS=$as_save_IFS
40740  test -z "$as_dir" && as_dir=.
40741    for ac_exec_ext in '' $ac_executable_extensions; do
40742  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40743    ac_cv_prog_ac_ct_STRIP="$ac_prog"
40744    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40745    break 2
40746  fi
40747done
40748  done
40749IFS=$as_save_IFS
40750
40751fi
40752fi
40753ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP
40754if test -n "$ac_ct_STRIP"; then
40755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5
40756$as_echo "$ac_ct_STRIP" >&6; }
40757else
40758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40759$as_echo "no" >&6; }
40760fi
40761
40762
40763  test -n "$ac_ct_STRIP" && break
40764done
40765
40766  if test "x$ac_ct_STRIP" = x; then
40767    STRIP=""
40768  else
40769    case $cross_compiling:$ac_tool_warned in
40770yes:)
40771{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
40772$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
40773ac_tool_warned=yes ;;
40774esac
40775    STRIP=$ac_ct_STRIP
40776  fi
40777fi
40778
40779    else
40780      # If it succeeded, then it was overridden by the user. We will use it
40781      # for the tool.
40782
40783      # First remove it from the list of overridden variables, so we can test
40784      # for unknown variables in the end.
40785      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
40786
40787      # Check if we try to supply an empty value
40788      if test "x$STRIP" = x; then
40789        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool STRIP= (no value)" >&5
40790$as_echo "$as_me: Setting user supplied tool STRIP= (no value)" >&6;}
40791        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40792$as_echo_n "checking for STRIP... " >&6; }
40793        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
40794$as_echo "disabled" >&6; }
40795      else
40796        # Check if the provided tool contains a complete path.
40797        tool_specified="$STRIP"
40798        tool_basename="${tool_specified##*/}"
40799        if test "x$tool_basename" = "x$tool_specified"; then
40800          # A command without a complete path is provided, search $PATH.
40801          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool STRIP=$tool_basename" >&5
40802$as_echo "$as_me: Will search for user supplied tool STRIP=$tool_basename" >&6;}
40803          # Extract the first word of "$tool_basename", so it can be a program name with args.
40804set dummy $tool_basename; ac_word=$2
40805{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
40806$as_echo_n "checking for $ac_word... " >&6; }
40807if ${ac_cv_path_STRIP+:} false; then :
40808  $as_echo_n "(cached) " >&6
40809else
40810  case $STRIP in
40811  [\\/]* | ?:[\\/]*)
40812  ac_cv_path_STRIP="$STRIP" # Let the user override the test with a path.
40813  ;;
40814  *)
40815  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
40816for as_dir in $PATH
40817do
40818  IFS=$as_save_IFS
40819  test -z "$as_dir" && as_dir=.
40820    for ac_exec_ext in '' $ac_executable_extensions; do
40821  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
40822    ac_cv_path_STRIP="$as_dir/$ac_word$ac_exec_ext"
40823    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
40824    break 2
40825  fi
40826done
40827  done
40828IFS=$as_save_IFS
40829
40830  ;;
40831esac
40832fi
40833STRIP=$ac_cv_path_STRIP
40834if test -n "$STRIP"; then
40835  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5
40836$as_echo "$STRIP" >&6; }
40837else
40838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
40839$as_echo "no" >&6; }
40840fi
40841
40842
40843          if test "x$STRIP" = x; then
40844            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
40845          fi
40846        else
40847          # Otherwise we believe it is a complete path. Use it as it is.
40848          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool STRIP=$tool_specified" >&5
40849$as_echo "$as_me: Will use user supplied tool STRIP=$tool_specified" >&6;}
40850          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for STRIP" >&5
40851$as_echo_n "checking for STRIP... " >&6; }
40852          if test ! -x "$tool_specified"; then
40853            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
40854$as_echo "not found" >&6; }
40855            as_fn_error $? "User supplied tool STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
40856          fi
40857          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
40858$as_echo "$tool_specified" >&6; }
40859        fi
40860      fi
40861    fi
40862
40863  fi
40864
40865
40866
40867  # Only process if variable expands to non-empty
40868
40869  if test "x$STRIP" != x; then
40870    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40871
40872  # First separate the path from the arguments. This will split at the first
40873  # space.
40874  complete="$STRIP"
40875  path="${complete%% *}"
40876  tmp="$complete EOL"
40877  arguments="${tmp#* }"
40878
40879  # Input might be given as Windows format, start by converting to
40880  # unix format.
40881  new_path=`$CYGPATH -u "$path"`
40882
40883  # Now try to locate executable using which
40884  new_path=`$WHICH "$new_path" 2> /dev/null`
40885  # bat and cmd files are not always considered executable in cygwin causing which
40886  # to not find them
40887  if test "x$new_path" = x \
40888      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40889      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40890    new_path=`$CYGPATH -u "$path"`
40891  fi
40892  if test "x$new_path" = x; then
40893    # Oops. Which didn't find the executable.
40894    # The splitting of arguments from the executable at a space might have been incorrect,
40895    # since paths with space are more likely in Windows. Give it another try with the whole
40896    # argument.
40897    path="$complete"
40898    arguments="EOL"
40899    new_path=`$CYGPATH -u "$path"`
40900    new_path=`$WHICH "$new_path" 2> /dev/null`
40901    # bat and cmd files are not always considered executable in cygwin causing which
40902    # to not find them
40903    if test "x$new_path" = x \
40904        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
40905        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
40906      new_path=`$CYGPATH -u "$path"`
40907    fi
40908    if test "x$new_path" = x; then
40909      # It's still not found. Now this is an unrecoverable error.
40910      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
40911$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
40912      has_space=`$ECHO "$complete" | $GREP " "`
40913      if test "x$has_space" != x; then
40914        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
40915$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
40916      fi
40917      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40918    fi
40919  fi
40920
40921  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
40922  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
40923  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
40924  # "foo.exe" is OK but "foo" is an error.
40925  #
40926  # This test is therefore slightly more accurate than "test -f" to check for file presence.
40927  # It is also a way to make sure we got the proper file name for the real test later on.
40928  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
40929  if test "x$test_shortpath" = x; then
40930    # Short path failed, file does not exist as specified.
40931    # Try adding .exe or .cmd
40932    if test -f "${new_path}.exe"; then
40933      input_to_shortpath="${new_path}.exe"
40934    elif test -f "${new_path}.cmd"; then
40935      input_to_shortpath="${new_path}.cmd"
40936    else
40937      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$new_path\", is invalid." >&5
40938$as_echo "$as_me: The path of STRIP, which resolves as \"$new_path\", is invalid." >&6;}
40939      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
40940$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
40941      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
40942    fi
40943  else
40944    input_to_shortpath="$new_path"
40945  fi
40946
40947  # Call helper function which possibly converts this using DOS-style short mode.
40948  # If so, the updated path is stored in $new_path.
40949  new_path="$input_to_shortpath"
40950
40951  input_path="$input_to_shortpath"
40952  # Check if we need to convert this using DOS-style short mode. If the path
40953  # contains just simple characters, use it. Otherwise (spaces, weird characters),
40954  # take no chances and rewrite it.
40955  # Note: m4 eats our [], so we need to use [ and ] instead.
40956  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
40957  if test "x$has_forbidden_chars" != x; then
40958    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
40959    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
40960    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
40961    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
40962      # Going to short mode and back again did indeed matter. Since short mode is
40963      # case insensitive, let's make it lowercase to improve readability.
40964      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
40965      # Now convert it back to Unix-style (cygpath)
40966      input_path=`$CYGPATH -u "$shortmode_path"`
40967      new_path="$input_path"
40968    fi
40969  fi
40970
40971  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
40972  if test "x$test_cygdrive_prefix" = x; then
40973    # As a simple fix, exclude /usr/bin since it's not a real path.
40974    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
40975      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
40976      # a path prefixed by /cygdrive for fixpath to work.
40977      new_path="$CYGWIN_ROOT_PATH$input_path"
40978    fi
40979  fi
40980
40981  # remove trailing .exe if any
40982  new_path="${new_path/%.exe/}"
40983
40984    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
40985
40986  # First separate the path from the arguments. This will split at the first
40987  # space.
40988  complete="$STRIP"
40989  path="${complete%% *}"
40990  tmp="$complete EOL"
40991  arguments="${tmp#* }"
40992
40993  # Input might be given as Windows format, start by converting to
40994  # unix format.
40995  new_path="$path"
40996
40997  windows_path="$new_path"
40998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
40999    unix_path=`$CYGPATH -u "$windows_path"`
41000    new_path="$unix_path"
41001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41003    new_path="$unix_path"
41004  fi
41005
41006
41007  # Now try to locate executable using which
41008  new_path=`$WHICH "$new_path" 2> /dev/null`
41009
41010  if test "x$new_path" = x; then
41011    # Oops. Which didn't find the executable.
41012    # The splitting of arguments from the executable at a space might have been incorrect,
41013    # since paths with space are more likely in Windows. Give it another try with the whole
41014    # argument.
41015    path="$complete"
41016    arguments="EOL"
41017    new_path="$path"
41018
41019  windows_path="$new_path"
41020  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41021    unix_path=`$CYGPATH -u "$windows_path"`
41022    new_path="$unix_path"
41023  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41024    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41025    new_path="$unix_path"
41026  fi
41027
41028
41029    new_path=`$WHICH "$new_path" 2> /dev/null`
41030    # bat and cmd files are not always considered executable in MSYS causing which
41031    # to not find them
41032    if test "x$new_path" = x \
41033        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41034        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41035      new_path="$path"
41036
41037  windows_path="$new_path"
41038  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41039    unix_path=`$CYGPATH -u "$windows_path"`
41040    new_path="$unix_path"
41041  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41042    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41043    new_path="$unix_path"
41044  fi
41045
41046    fi
41047
41048    if test "x$new_path" = x; then
41049      # It's still not found. Now this is an unrecoverable error.
41050      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41051$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41052      has_space=`$ECHO "$complete" | $GREP " "`
41053      if test "x$has_space" != x; then
41054        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41055$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41056      fi
41057      as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41058    fi
41059  fi
41060
41061  # Now new_path has a complete unix path to the binary
41062  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41063    # Keep paths in /bin as-is, but remove trailing .exe if any
41064    new_path="${new_path/%.exe/}"
41065    # Do not save /bin paths to all_fixpath_prefixes!
41066  else
41067    # Not in mixed or Windows style, start by that.
41068    new_path=`cmd //c echo $new_path`
41069
41070  input_path="$new_path"
41071  # Check if we need to convert this using DOS-style short mode. If the path
41072  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41073  # take no chances and rewrite it.
41074  # Note: m4 eats our [], so we need to use [ and ] instead.
41075  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41076  if test "x$has_forbidden_chars" != x; then
41077    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41078    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41079  fi
41080
41081    # Output is in $new_path
41082
41083  windows_path="$new_path"
41084  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41085    unix_path=`$CYGPATH -u "$windows_path"`
41086    new_path="$unix_path"
41087  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41088    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41089    new_path="$unix_path"
41090  fi
41091
41092    # remove trailing .exe if any
41093    new_path="${new_path/%.exe/}"
41094
41095    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41096    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
41097  fi
41098
41099    else
41100      # We're on a unix platform. Hooray! :)
41101      # First separate the path from the arguments. This will split at the first
41102      # space.
41103      complete="$STRIP"
41104      path="${complete%% *}"
41105      tmp="$complete EOL"
41106      arguments="${tmp#* }"
41107
41108      # Cannot rely on the command "which" here since it doesn't always work.
41109      is_absolute_path=`$ECHO "$path" | $GREP ^/`
41110      if test -z "$is_absolute_path"; then
41111        # Path to executable is not absolute. Find it.
41112        IFS_save="$IFS"
41113        IFS=:
41114        for p in $PATH; do
41115          if test -f "$p/$path" && test -x "$p/$path"; then
41116            new_path="$p/$path"
41117            break
41118          fi
41119        done
41120        IFS="$IFS_save"
41121      else
41122        # This is an absolute path, we can use it without further modifications.
41123        new_path="$path"
41124      fi
41125
41126      if test "x$new_path" = x; then
41127        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of STRIP, which resolves as \"$complete\", is not found." >&5
41128$as_echo "$as_me: The path of STRIP, which resolves as \"$complete\", is not found." >&6;}
41129        has_space=`$ECHO "$complete" | $GREP " "`
41130        if test "x$has_space" != x; then
41131          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
41132$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
41133        fi
41134        as_fn_error $? "Cannot locate the the path of STRIP" "$LINENO" 5
41135      fi
41136    fi
41137
41138    # Now join together the path and the arguments once again
41139    if test "x$arguments" != xEOL; then
41140      new_complete="$new_path ${arguments% *}"
41141    else
41142      new_complete="$new_path"
41143    fi
41144
41145    if test "x$complete" != "x$new_complete"; then
41146      STRIP="$new_complete"
41147      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting STRIP to \"$new_complete\"" >&5
41148$as_echo "$as_me: Rewriting STRIP to \"$new_complete\"" >&6;}
41149    fi
41150  fi
41151
41152    if test "x$TOOLCHAIN_TYPE" = xgcc; then
41153
41154
41155  # Publish this variable in the help.
41156
41157
41158  if [ -z "${NM+x}" ]; then
41159    # The variable is not set by user, try to locate tool using the code snippet
41160    if test -n "$ac_tool_prefix"; then
41161  for ac_prog in nm gcc-nm
41162  do
41163    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41164set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41166$as_echo_n "checking for $ac_word... " >&6; }
41167if ${ac_cv_prog_NM+:} false; then :
41168  $as_echo_n "(cached) " >&6
41169else
41170  if test -n "$NM"; then
41171  ac_cv_prog_NM="$NM" # Let the user override the test.
41172else
41173as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41174for as_dir in $PATH
41175do
41176  IFS=$as_save_IFS
41177  test -z "$as_dir" && as_dir=.
41178    for ac_exec_ext in '' $ac_executable_extensions; do
41179  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41180    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41181    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41182    break 2
41183  fi
41184done
41185  done
41186IFS=$as_save_IFS
41187
41188fi
41189fi
41190NM=$ac_cv_prog_NM
41191if test -n "$NM"; then
41192  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41193$as_echo "$NM" >&6; }
41194else
41195  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41196$as_echo "no" >&6; }
41197fi
41198
41199
41200    test -n "$NM" && break
41201  done
41202fi
41203if test -z "$NM"; then
41204  ac_ct_NM=$NM
41205  for ac_prog in nm gcc-nm
41206do
41207  # Extract the first word of "$ac_prog", so it can be a program name with args.
41208set dummy $ac_prog; ac_word=$2
41209{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41210$as_echo_n "checking for $ac_word... " >&6; }
41211if ${ac_cv_prog_ac_ct_NM+:} false; then :
41212  $as_echo_n "(cached) " >&6
41213else
41214  if test -n "$ac_ct_NM"; then
41215  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41216else
41217as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41218for as_dir in $PATH
41219do
41220  IFS=$as_save_IFS
41221  test -z "$as_dir" && as_dir=.
41222    for ac_exec_ext in '' $ac_executable_extensions; do
41223  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41224    ac_cv_prog_ac_ct_NM="$ac_prog"
41225    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41226    break 2
41227  fi
41228done
41229  done
41230IFS=$as_save_IFS
41231
41232fi
41233fi
41234ac_ct_NM=$ac_cv_prog_ac_ct_NM
41235if test -n "$ac_ct_NM"; then
41236  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41237$as_echo "$ac_ct_NM" >&6; }
41238else
41239  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41240$as_echo "no" >&6; }
41241fi
41242
41243
41244  test -n "$ac_ct_NM" && break
41245done
41246
41247  if test "x$ac_ct_NM" = x; then
41248    NM=""
41249  else
41250    case $cross_compiling:$ac_tool_warned in
41251yes:)
41252{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41253$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41254ac_tool_warned=yes ;;
41255esac
41256    NM=$ac_ct_NM
41257  fi
41258fi
41259
41260  else
41261    # The variable is set, but is it from the command line or the environment?
41262
41263    # Try to remove the string !NM! from our list.
41264    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41265    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41266      # If it failed, the variable was not from the command line. Ignore it,
41267      # but warn the user (except for BASH, which is always set by the calling BASH).
41268      if test "xNM" != xBASH; then
41269        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41270$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41271      fi
41272      # Try to locate tool using the code snippet
41273      if test -n "$ac_tool_prefix"; then
41274  for ac_prog in nm gcc-nm
41275  do
41276    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41277set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41278{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41279$as_echo_n "checking for $ac_word... " >&6; }
41280if ${ac_cv_prog_NM+:} false; then :
41281  $as_echo_n "(cached) " >&6
41282else
41283  if test -n "$NM"; then
41284  ac_cv_prog_NM="$NM" # Let the user override the test.
41285else
41286as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41287for as_dir in $PATH
41288do
41289  IFS=$as_save_IFS
41290  test -z "$as_dir" && as_dir=.
41291    for ac_exec_ext in '' $ac_executable_extensions; do
41292  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41293    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41294    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41295    break 2
41296  fi
41297done
41298  done
41299IFS=$as_save_IFS
41300
41301fi
41302fi
41303NM=$ac_cv_prog_NM
41304if test -n "$NM"; then
41305  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41306$as_echo "$NM" >&6; }
41307else
41308  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41309$as_echo "no" >&6; }
41310fi
41311
41312
41313    test -n "$NM" && break
41314  done
41315fi
41316if test -z "$NM"; then
41317  ac_ct_NM=$NM
41318  for ac_prog in nm gcc-nm
41319do
41320  # Extract the first word of "$ac_prog", so it can be a program name with args.
41321set dummy $ac_prog; ac_word=$2
41322{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41323$as_echo_n "checking for $ac_word... " >&6; }
41324if ${ac_cv_prog_ac_ct_NM+:} false; then :
41325  $as_echo_n "(cached) " >&6
41326else
41327  if test -n "$ac_ct_NM"; then
41328  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41329else
41330as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41331for as_dir in $PATH
41332do
41333  IFS=$as_save_IFS
41334  test -z "$as_dir" && as_dir=.
41335    for ac_exec_ext in '' $ac_executable_extensions; do
41336  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41337    ac_cv_prog_ac_ct_NM="$ac_prog"
41338    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41339    break 2
41340  fi
41341done
41342  done
41343IFS=$as_save_IFS
41344
41345fi
41346fi
41347ac_ct_NM=$ac_cv_prog_ac_ct_NM
41348if test -n "$ac_ct_NM"; then
41349  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41350$as_echo "$ac_ct_NM" >&6; }
41351else
41352  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41353$as_echo "no" >&6; }
41354fi
41355
41356
41357  test -n "$ac_ct_NM" && break
41358done
41359
41360  if test "x$ac_ct_NM" = x; then
41361    NM=""
41362  else
41363    case $cross_compiling:$ac_tool_warned in
41364yes:)
41365{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41366$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41367ac_tool_warned=yes ;;
41368esac
41369    NM=$ac_ct_NM
41370  fi
41371fi
41372
41373    else
41374      # If it succeeded, then it was overridden by the user. We will use it
41375      # for the tool.
41376
41377      # First remove it from the list of overridden variables, so we can test
41378      # for unknown variables in the end.
41379      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41380
41381      # Check if we try to supply an empty value
41382      if test "x$NM" = x; then
41383        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41384$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41385        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41386$as_echo_n "checking for NM... " >&6; }
41387        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41388$as_echo "disabled" >&6; }
41389      else
41390        # Check if the provided tool contains a complete path.
41391        tool_specified="$NM"
41392        tool_basename="${tool_specified##*/}"
41393        if test "x$tool_basename" = "x$tool_specified"; then
41394          # A command without a complete path is provided, search $PATH.
41395          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41396$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41397          # Extract the first word of "$tool_basename", so it can be a program name with args.
41398set dummy $tool_basename; ac_word=$2
41399{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41400$as_echo_n "checking for $ac_word... " >&6; }
41401if ${ac_cv_path_NM+:} false; then :
41402  $as_echo_n "(cached) " >&6
41403else
41404  case $NM in
41405  [\\/]* | ?:[\\/]*)
41406  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41407  ;;
41408  *)
41409  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41410for as_dir in $PATH
41411do
41412  IFS=$as_save_IFS
41413  test -z "$as_dir" && as_dir=.
41414    for ac_exec_ext in '' $ac_executable_extensions; do
41415  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41416    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41417    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41418    break 2
41419  fi
41420done
41421  done
41422IFS=$as_save_IFS
41423
41424  ;;
41425esac
41426fi
41427NM=$ac_cv_path_NM
41428if test -n "$NM"; then
41429  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41430$as_echo "$NM" >&6; }
41431else
41432  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41433$as_echo "no" >&6; }
41434fi
41435
41436
41437          if test "x$NM" = x; then
41438            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41439          fi
41440        else
41441          # Otherwise we believe it is a complete path. Use it as it is.
41442          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41443$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41444          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41445$as_echo_n "checking for NM... " >&6; }
41446          if test ! -x "$tool_specified"; then
41447            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41448$as_echo "not found" >&6; }
41449            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41450          fi
41451          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41452$as_echo "$tool_specified" >&6; }
41453        fi
41454      fi
41455    fi
41456
41457  fi
41458
41459
41460    else
41461
41462
41463  # Publish this variable in the help.
41464
41465
41466  if [ -z "${NM+x}" ]; then
41467    # The variable is not set by user, try to locate tool using the code snippet
41468    if test -n "$ac_tool_prefix"; then
41469  for ac_prog in nm
41470  do
41471    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41472set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41473{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41474$as_echo_n "checking for $ac_word... " >&6; }
41475if ${ac_cv_prog_NM+:} false; then :
41476  $as_echo_n "(cached) " >&6
41477else
41478  if test -n "$NM"; then
41479  ac_cv_prog_NM="$NM" # Let the user override the test.
41480else
41481as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41482for as_dir in $PATH
41483do
41484  IFS=$as_save_IFS
41485  test -z "$as_dir" && as_dir=.
41486    for ac_exec_ext in '' $ac_executable_extensions; do
41487  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41488    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41489    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41490    break 2
41491  fi
41492done
41493  done
41494IFS=$as_save_IFS
41495
41496fi
41497fi
41498NM=$ac_cv_prog_NM
41499if test -n "$NM"; then
41500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41501$as_echo "$NM" >&6; }
41502else
41503  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41504$as_echo "no" >&6; }
41505fi
41506
41507
41508    test -n "$NM" && break
41509  done
41510fi
41511if test -z "$NM"; then
41512  ac_ct_NM=$NM
41513  for ac_prog in nm
41514do
41515  # Extract the first word of "$ac_prog", so it can be a program name with args.
41516set dummy $ac_prog; ac_word=$2
41517{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41518$as_echo_n "checking for $ac_word... " >&6; }
41519if ${ac_cv_prog_ac_ct_NM+:} false; then :
41520  $as_echo_n "(cached) " >&6
41521else
41522  if test -n "$ac_ct_NM"; then
41523  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41524else
41525as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41526for as_dir in $PATH
41527do
41528  IFS=$as_save_IFS
41529  test -z "$as_dir" && as_dir=.
41530    for ac_exec_ext in '' $ac_executable_extensions; do
41531  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41532    ac_cv_prog_ac_ct_NM="$ac_prog"
41533    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41534    break 2
41535  fi
41536done
41537  done
41538IFS=$as_save_IFS
41539
41540fi
41541fi
41542ac_ct_NM=$ac_cv_prog_ac_ct_NM
41543if test -n "$ac_ct_NM"; then
41544  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41545$as_echo "$ac_ct_NM" >&6; }
41546else
41547  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41548$as_echo "no" >&6; }
41549fi
41550
41551
41552  test -n "$ac_ct_NM" && break
41553done
41554
41555  if test "x$ac_ct_NM" = x; then
41556    NM=""
41557  else
41558    case $cross_compiling:$ac_tool_warned in
41559yes:)
41560{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41561$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41562ac_tool_warned=yes ;;
41563esac
41564    NM=$ac_ct_NM
41565  fi
41566fi
41567
41568  else
41569    # The variable is set, but is it from the command line or the environment?
41570
41571    # Try to remove the string !NM! from our list.
41572    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!NM!/}
41573    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
41574      # If it failed, the variable was not from the command line. Ignore it,
41575      # but warn the user (except for BASH, which is always set by the calling BASH).
41576      if test "xNM" != xBASH; then
41577        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&5
41578$as_echo "$as_me: WARNING: Ignoring value of NM from the environment. Use command line variables instead." >&2;}
41579      fi
41580      # Try to locate tool using the code snippet
41581      if test -n "$ac_tool_prefix"; then
41582  for ac_prog in nm
41583  do
41584    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
41585set dummy $ac_tool_prefix$ac_prog; ac_word=$2
41586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41587$as_echo_n "checking for $ac_word... " >&6; }
41588if ${ac_cv_prog_NM+:} false; then :
41589  $as_echo_n "(cached) " >&6
41590else
41591  if test -n "$NM"; then
41592  ac_cv_prog_NM="$NM" # Let the user override the test.
41593else
41594as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41595for as_dir in $PATH
41596do
41597  IFS=$as_save_IFS
41598  test -z "$as_dir" && as_dir=.
41599    for ac_exec_ext in '' $ac_executable_extensions; do
41600  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41601    ac_cv_prog_NM="$ac_tool_prefix$ac_prog"
41602    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41603    break 2
41604  fi
41605done
41606  done
41607IFS=$as_save_IFS
41608
41609fi
41610fi
41611NM=$ac_cv_prog_NM
41612if test -n "$NM"; then
41613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41614$as_echo "$NM" >&6; }
41615else
41616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41617$as_echo "no" >&6; }
41618fi
41619
41620
41621    test -n "$NM" && break
41622  done
41623fi
41624if test -z "$NM"; then
41625  ac_ct_NM=$NM
41626  for ac_prog in nm
41627do
41628  # Extract the first word of "$ac_prog", so it can be a program name with args.
41629set dummy $ac_prog; ac_word=$2
41630{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41631$as_echo_n "checking for $ac_word... " >&6; }
41632if ${ac_cv_prog_ac_ct_NM+:} false; then :
41633  $as_echo_n "(cached) " >&6
41634else
41635  if test -n "$ac_ct_NM"; then
41636  ac_cv_prog_ac_ct_NM="$ac_ct_NM" # Let the user override the test.
41637else
41638as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41639for as_dir in $PATH
41640do
41641  IFS=$as_save_IFS
41642  test -z "$as_dir" && as_dir=.
41643    for ac_exec_ext in '' $ac_executable_extensions; do
41644  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41645    ac_cv_prog_ac_ct_NM="$ac_prog"
41646    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41647    break 2
41648  fi
41649done
41650  done
41651IFS=$as_save_IFS
41652
41653fi
41654fi
41655ac_ct_NM=$ac_cv_prog_ac_ct_NM
41656if test -n "$ac_ct_NM"; then
41657  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NM" >&5
41658$as_echo "$ac_ct_NM" >&6; }
41659else
41660  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41661$as_echo "no" >&6; }
41662fi
41663
41664
41665  test -n "$ac_ct_NM" && break
41666done
41667
41668  if test "x$ac_ct_NM" = x; then
41669    NM=""
41670  else
41671    case $cross_compiling:$ac_tool_warned in
41672yes:)
41673{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
41674$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
41675ac_tool_warned=yes ;;
41676esac
41677    NM=$ac_ct_NM
41678  fi
41679fi
41680
41681    else
41682      # If it succeeded, then it was overridden by the user. We will use it
41683      # for the tool.
41684
41685      # First remove it from the list of overridden variables, so we can test
41686      # for unknown variables in the end.
41687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
41688
41689      # Check if we try to supply an empty value
41690      if test "x$NM" = x; then
41691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool NM= (no value)" >&5
41692$as_echo "$as_me: Setting user supplied tool NM= (no value)" >&6;}
41693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41694$as_echo_n "checking for NM... " >&6; }
41695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
41696$as_echo "disabled" >&6; }
41697      else
41698        # Check if the provided tool contains a complete path.
41699        tool_specified="$NM"
41700        tool_basename="${tool_specified##*/}"
41701        if test "x$tool_basename" = "x$tool_specified"; then
41702          # A command without a complete path is provided, search $PATH.
41703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool NM=$tool_basename" >&5
41704$as_echo "$as_me: Will search for user supplied tool NM=$tool_basename" >&6;}
41705          # Extract the first word of "$tool_basename", so it can be a program name with args.
41706set dummy $tool_basename; ac_word=$2
41707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
41708$as_echo_n "checking for $ac_word... " >&6; }
41709if ${ac_cv_path_NM+:} false; then :
41710  $as_echo_n "(cached) " >&6
41711else
41712  case $NM in
41713  [\\/]* | ?:[\\/]*)
41714  ac_cv_path_NM="$NM" # Let the user override the test with a path.
41715  ;;
41716  *)
41717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
41718for as_dir in $PATH
41719do
41720  IFS=$as_save_IFS
41721  test -z "$as_dir" && as_dir=.
41722    for ac_exec_ext in '' $ac_executable_extensions; do
41723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
41724    ac_cv_path_NM="$as_dir/$ac_word$ac_exec_ext"
41725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
41726    break 2
41727  fi
41728done
41729  done
41730IFS=$as_save_IFS
41731
41732  ;;
41733esac
41734fi
41735NM=$ac_cv_path_NM
41736if test -n "$NM"; then
41737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NM" >&5
41738$as_echo "$NM" >&6; }
41739else
41740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
41741$as_echo "no" >&6; }
41742fi
41743
41744
41745          if test "x$NM" = x; then
41746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
41747          fi
41748        else
41749          # Otherwise we believe it is a complete path. Use it as it is.
41750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool NM=$tool_specified" >&5
41751$as_echo "$as_me: Will use user supplied tool NM=$tool_specified" >&6;}
41752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for NM" >&5
41753$as_echo_n "checking for NM... " >&6; }
41754          if test ! -x "$tool_specified"; then
41755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
41756$as_echo "not found" >&6; }
41757            as_fn_error $? "User supplied tool NM=$tool_specified does not exist or is not executable" "$LINENO" 5
41758          fi
41759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
41760$as_echo "$tool_specified" >&6; }
41761        fi
41762      fi
41763    fi
41764
41765  fi
41766
41767
41768    fi
41769
41770  # Only process if variable expands to non-empty
41771
41772  if test "x$NM" != x; then
41773    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41774
41775  # First separate the path from the arguments. This will split at the first
41776  # space.
41777  complete="$NM"
41778  path="${complete%% *}"
41779  tmp="$complete EOL"
41780  arguments="${tmp#* }"
41781
41782  # Input might be given as Windows format, start by converting to
41783  # unix format.
41784  new_path=`$CYGPATH -u "$path"`
41785
41786  # Now try to locate executable using which
41787  new_path=`$WHICH "$new_path" 2> /dev/null`
41788  # bat and cmd files are not always considered executable in cygwin causing which
41789  # to not find them
41790  if test "x$new_path" = x \
41791      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41792      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41793    new_path=`$CYGPATH -u "$path"`
41794  fi
41795  if test "x$new_path" = x; then
41796    # Oops. Which didn't find the executable.
41797    # The splitting of arguments from the executable at a space might have been incorrect,
41798    # since paths with space are more likely in Windows. Give it another try with the whole
41799    # argument.
41800    path="$complete"
41801    arguments="EOL"
41802    new_path=`$CYGPATH -u "$path"`
41803    new_path=`$WHICH "$new_path" 2> /dev/null`
41804    # bat and cmd files are not always considered executable in cygwin causing which
41805    # to not find them
41806    if test "x$new_path" = x \
41807        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41808        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41809      new_path=`$CYGPATH -u "$path"`
41810    fi
41811    if test "x$new_path" = x; then
41812      # It's still not found. Now this is an unrecoverable error.
41813      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41814$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41815      has_space=`$ECHO "$complete" | $GREP " "`
41816      if test "x$has_space" != x; then
41817        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41818$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41819      fi
41820      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41821    fi
41822  fi
41823
41824  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
41825  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
41826  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
41827  # "foo.exe" is OK but "foo" is an error.
41828  #
41829  # This test is therefore slightly more accurate than "test -f" to check for file presence.
41830  # It is also a way to make sure we got the proper file name for the real test later on.
41831  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
41832  if test "x$test_shortpath" = x; then
41833    # Short path failed, file does not exist as specified.
41834    # Try adding .exe or .cmd
41835    if test -f "${new_path}.exe"; then
41836      input_to_shortpath="${new_path}.exe"
41837    elif test -f "${new_path}.cmd"; then
41838      input_to_shortpath="${new_path}.cmd"
41839    else
41840      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$new_path\", is invalid." >&5
41841$as_echo "$as_me: The path of NM, which resolves as \"$new_path\", is invalid." >&6;}
41842      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
41843$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
41844      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41845    fi
41846  else
41847    input_to_shortpath="$new_path"
41848  fi
41849
41850  # Call helper function which possibly converts this using DOS-style short mode.
41851  # If so, the updated path is stored in $new_path.
41852  new_path="$input_to_shortpath"
41853
41854  input_path="$input_to_shortpath"
41855  # Check if we need to convert this using DOS-style short mode. If the path
41856  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41857  # take no chances and rewrite it.
41858  # Note: m4 eats our [], so we need to use [ and ] instead.
41859  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
41860  if test "x$has_forbidden_chars" != x; then
41861    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41862    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
41863    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
41864    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
41865      # Going to short mode and back again did indeed matter. Since short mode is
41866      # case insensitive, let's make it lowercase to improve readability.
41867      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41868      # Now convert it back to Unix-style (cygpath)
41869      input_path=`$CYGPATH -u "$shortmode_path"`
41870      new_path="$input_path"
41871    fi
41872  fi
41873
41874  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
41875  if test "x$test_cygdrive_prefix" = x; then
41876    # As a simple fix, exclude /usr/bin since it's not a real path.
41877    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
41878      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
41879      # a path prefixed by /cygdrive for fixpath to work.
41880      new_path="$CYGWIN_ROOT_PATH$input_path"
41881    fi
41882  fi
41883
41884  # remove trailing .exe if any
41885  new_path="${new_path/%.exe/}"
41886
41887    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41888
41889  # First separate the path from the arguments. This will split at the first
41890  # space.
41891  complete="$NM"
41892  path="${complete%% *}"
41893  tmp="$complete EOL"
41894  arguments="${tmp#* }"
41895
41896  # Input might be given as Windows format, start by converting to
41897  # unix format.
41898  new_path="$path"
41899
41900  windows_path="$new_path"
41901  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41902    unix_path=`$CYGPATH -u "$windows_path"`
41903    new_path="$unix_path"
41904  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41905    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41906    new_path="$unix_path"
41907  fi
41908
41909
41910  # Now try to locate executable using which
41911  new_path=`$WHICH "$new_path" 2> /dev/null`
41912
41913  if test "x$new_path" = x; then
41914    # Oops. Which didn't find the executable.
41915    # The splitting of arguments from the executable at a space might have been incorrect,
41916    # since paths with space are more likely in Windows. Give it another try with the whole
41917    # argument.
41918    path="$complete"
41919    arguments="EOL"
41920    new_path="$path"
41921
41922  windows_path="$new_path"
41923  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41924    unix_path=`$CYGPATH -u "$windows_path"`
41925    new_path="$unix_path"
41926  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41927    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41928    new_path="$unix_path"
41929  fi
41930
41931
41932    new_path=`$WHICH "$new_path" 2> /dev/null`
41933    # bat and cmd files are not always considered executable in MSYS causing which
41934    # to not find them
41935    if test "x$new_path" = x \
41936        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
41937        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
41938      new_path="$path"
41939
41940  windows_path="$new_path"
41941  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41942    unix_path=`$CYGPATH -u "$windows_path"`
41943    new_path="$unix_path"
41944  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41945    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41946    new_path="$unix_path"
41947  fi
41948
41949    fi
41950
41951    if test "x$new_path" = x; then
41952      # It's still not found. Now this is an unrecoverable error.
41953      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
41954$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
41955      has_space=`$ECHO "$complete" | $GREP " "`
41956      if test "x$has_space" != x; then
41957        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
41958$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
41959      fi
41960      as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
41961    fi
41962  fi
41963
41964  # Now new_path has a complete unix path to the binary
41965  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
41966    # Keep paths in /bin as-is, but remove trailing .exe if any
41967    new_path="${new_path/%.exe/}"
41968    # Do not save /bin paths to all_fixpath_prefixes!
41969  else
41970    # Not in mixed or Windows style, start by that.
41971    new_path=`cmd //c echo $new_path`
41972
41973  input_path="$new_path"
41974  # Check if we need to convert this using DOS-style short mode. If the path
41975  # contains just simple characters, use it. Otherwise (spaces, weird characters),
41976  # take no chances and rewrite it.
41977  # Note: m4 eats our [], so we need to use [ and ] instead.
41978  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
41979  if test "x$has_forbidden_chars" != x; then
41980    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
41981    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
41982  fi
41983
41984    # Output is in $new_path
41985
41986  windows_path="$new_path"
41987  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
41988    unix_path=`$CYGPATH -u "$windows_path"`
41989    new_path="$unix_path"
41990  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
41991    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
41992    new_path="$unix_path"
41993  fi
41994
41995    # remove trailing .exe if any
41996    new_path="${new_path/%.exe/}"
41997
41998    # Save the first 10 bytes of this path to the storage, so fixpath can work.
41999    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42000  fi
42001
42002    else
42003      # We're on a unix platform. Hooray! :)
42004      # First separate the path from the arguments. This will split at the first
42005      # space.
42006      complete="$NM"
42007      path="${complete%% *}"
42008      tmp="$complete EOL"
42009      arguments="${tmp#* }"
42010
42011      # Cannot rely on the command "which" here since it doesn't always work.
42012      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42013      if test -z "$is_absolute_path"; then
42014        # Path to executable is not absolute. Find it.
42015        IFS_save="$IFS"
42016        IFS=:
42017        for p in $PATH; do
42018          if test -f "$p/$path" && test -x "$p/$path"; then
42019            new_path="$p/$path"
42020            break
42021          fi
42022        done
42023        IFS="$IFS_save"
42024      else
42025        # This is an absolute path, we can use it without further modifications.
42026        new_path="$path"
42027      fi
42028
42029      if test "x$new_path" = x; then
42030        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of NM, which resolves as \"$complete\", is not found." >&5
42031$as_echo "$as_me: The path of NM, which resolves as \"$complete\", is not found." >&6;}
42032        has_space=`$ECHO "$complete" | $GREP " "`
42033        if test "x$has_space" != x; then
42034          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42035$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42036        fi
42037        as_fn_error $? "Cannot locate the the path of NM" "$LINENO" 5
42038      fi
42039    fi
42040
42041    # Now join together the path and the arguments once again
42042    if test "x$arguments" != xEOL; then
42043      new_complete="$new_path ${arguments% *}"
42044    else
42045      new_complete="$new_path"
42046    fi
42047
42048    if test "x$complete" != "x$new_complete"; then
42049      NM="$new_complete"
42050      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting NM to \"$new_complete\"" >&5
42051$as_echo "$as_me: Rewriting NM to \"$new_complete\"" >&6;}
42052    fi
42053  fi
42054
42055    GNM="$NM"
42056
42057  fi
42058
42059  # objcopy is used for moving debug symbols to separate files when
42060  # full debug symbols are enabled.
42061  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
42062
42063
42064  # Publish this variable in the help.
42065
42066
42067  if [ -z "${OBJCOPY+x}" ]; then
42068    # The variable is not set by user, try to locate tool using the code snippet
42069    if test -n "$ac_tool_prefix"; then
42070  for ac_prog in gobjcopy objcopy
42071  do
42072    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42073set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42074{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42075$as_echo_n "checking for $ac_word... " >&6; }
42076if ${ac_cv_prog_OBJCOPY+:} false; then :
42077  $as_echo_n "(cached) " >&6
42078else
42079  if test -n "$OBJCOPY"; then
42080  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42081else
42082as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42083for as_dir in $PATH
42084do
42085  IFS=$as_save_IFS
42086  test -z "$as_dir" && as_dir=.
42087    for ac_exec_ext in '' $ac_executable_extensions; do
42088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42089    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42091    break 2
42092  fi
42093done
42094  done
42095IFS=$as_save_IFS
42096
42097fi
42098fi
42099OBJCOPY=$ac_cv_prog_OBJCOPY
42100if test -n "$OBJCOPY"; then
42101  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42102$as_echo "$OBJCOPY" >&6; }
42103else
42104  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42105$as_echo "no" >&6; }
42106fi
42107
42108
42109    test -n "$OBJCOPY" && break
42110  done
42111fi
42112if test -z "$OBJCOPY"; then
42113  ac_ct_OBJCOPY=$OBJCOPY
42114  for ac_prog in gobjcopy objcopy
42115do
42116  # Extract the first word of "$ac_prog", so it can be a program name with args.
42117set dummy $ac_prog; ac_word=$2
42118{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42119$as_echo_n "checking for $ac_word... " >&6; }
42120if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42121  $as_echo_n "(cached) " >&6
42122else
42123  if test -n "$ac_ct_OBJCOPY"; then
42124  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42125else
42126as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42127for as_dir in $PATH
42128do
42129  IFS=$as_save_IFS
42130  test -z "$as_dir" && as_dir=.
42131    for ac_exec_ext in '' $ac_executable_extensions; do
42132  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42133    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42134    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42135    break 2
42136  fi
42137done
42138  done
42139IFS=$as_save_IFS
42140
42141fi
42142fi
42143ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42144if test -n "$ac_ct_OBJCOPY"; then
42145  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42146$as_echo "$ac_ct_OBJCOPY" >&6; }
42147else
42148  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42149$as_echo "no" >&6; }
42150fi
42151
42152
42153  test -n "$ac_ct_OBJCOPY" && break
42154done
42155
42156  if test "x$ac_ct_OBJCOPY" = x; then
42157    OBJCOPY=""
42158  else
42159    case $cross_compiling:$ac_tool_warned in
42160yes:)
42161{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42162$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42163ac_tool_warned=yes ;;
42164esac
42165    OBJCOPY=$ac_ct_OBJCOPY
42166  fi
42167fi
42168
42169  else
42170    # The variable is set, but is it from the command line or the environment?
42171
42172    # Try to remove the string !OBJCOPY! from our list.
42173    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJCOPY!/}
42174    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42175      # If it failed, the variable was not from the command line. Ignore it,
42176      # but warn the user (except for BASH, which is always set by the calling BASH).
42177      if test "xOBJCOPY" != xBASH; then
42178        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&5
42179$as_echo "$as_me: WARNING: Ignoring value of OBJCOPY from the environment. Use command line variables instead." >&2;}
42180      fi
42181      # Try to locate tool using the code snippet
42182      if test -n "$ac_tool_prefix"; then
42183  for ac_prog in gobjcopy objcopy
42184  do
42185    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42186set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42187{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42188$as_echo_n "checking for $ac_word... " >&6; }
42189if ${ac_cv_prog_OBJCOPY+:} false; then :
42190  $as_echo_n "(cached) " >&6
42191else
42192  if test -n "$OBJCOPY"; then
42193  ac_cv_prog_OBJCOPY="$OBJCOPY" # Let the user override the test.
42194else
42195as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42196for as_dir in $PATH
42197do
42198  IFS=$as_save_IFS
42199  test -z "$as_dir" && as_dir=.
42200    for ac_exec_ext in '' $ac_executable_extensions; do
42201  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42202    ac_cv_prog_OBJCOPY="$ac_tool_prefix$ac_prog"
42203    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42204    break 2
42205  fi
42206done
42207  done
42208IFS=$as_save_IFS
42209
42210fi
42211fi
42212OBJCOPY=$ac_cv_prog_OBJCOPY
42213if test -n "$OBJCOPY"; then
42214  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42215$as_echo "$OBJCOPY" >&6; }
42216else
42217  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42218$as_echo "no" >&6; }
42219fi
42220
42221
42222    test -n "$OBJCOPY" && break
42223  done
42224fi
42225if test -z "$OBJCOPY"; then
42226  ac_ct_OBJCOPY=$OBJCOPY
42227  for ac_prog in gobjcopy objcopy
42228do
42229  # Extract the first word of "$ac_prog", so it can be a program name with args.
42230set dummy $ac_prog; ac_word=$2
42231{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42232$as_echo_n "checking for $ac_word... " >&6; }
42233if ${ac_cv_prog_ac_ct_OBJCOPY+:} false; then :
42234  $as_echo_n "(cached) " >&6
42235else
42236  if test -n "$ac_ct_OBJCOPY"; then
42237  ac_cv_prog_ac_ct_OBJCOPY="$ac_ct_OBJCOPY" # Let the user override the test.
42238else
42239as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42240for as_dir in $PATH
42241do
42242  IFS=$as_save_IFS
42243  test -z "$as_dir" && as_dir=.
42244    for ac_exec_ext in '' $ac_executable_extensions; do
42245  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42246    ac_cv_prog_ac_ct_OBJCOPY="$ac_prog"
42247    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42248    break 2
42249  fi
42250done
42251  done
42252IFS=$as_save_IFS
42253
42254fi
42255fi
42256ac_ct_OBJCOPY=$ac_cv_prog_ac_ct_OBJCOPY
42257if test -n "$ac_ct_OBJCOPY"; then
42258  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJCOPY" >&5
42259$as_echo "$ac_ct_OBJCOPY" >&6; }
42260else
42261  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42262$as_echo "no" >&6; }
42263fi
42264
42265
42266  test -n "$ac_ct_OBJCOPY" && break
42267done
42268
42269  if test "x$ac_ct_OBJCOPY" = x; then
42270    OBJCOPY=""
42271  else
42272    case $cross_compiling:$ac_tool_warned in
42273yes:)
42274{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42275$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42276ac_tool_warned=yes ;;
42277esac
42278    OBJCOPY=$ac_ct_OBJCOPY
42279  fi
42280fi
42281
42282    else
42283      # If it succeeded, then it was overridden by the user. We will use it
42284      # for the tool.
42285
42286      # First remove it from the list of overridden variables, so we can test
42287      # for unknown variables in the end.
42288      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42289
42290      # Check if we try to supply an empty value
42291      if test "x$OBJCOPY" = x; then
42292        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJCOPY= (no value)" >&5
42293$as_echo "$as_me: Setting user supplied tool OBJCOPY= (no value)" >&6;}
42294        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42295$as_echo_n "checking for OBJCOPY... " >&6; }
42296        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42297$as_echo "disabled" >&6; }
42298      else
42299        # Check if the provided tool contains a complete path.
42300        tool_specified="$OBJCOPY"
42301        tool_basename="${tool_specified##*/}"
42302        if test "x$tool_basename" = "x$tool_specified"; then
42303          # A command without a complete path is provided, search $PATH.
42304          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJCOPY=$tool_basename" >&5
42305$as_echo "$as_me: Will search for user supplied tool OBJCOPY=$tool_basename" >&6;}
42306          # Extract the first word of "$tool_basename", so it can be a program name with args.
42307set dummy $tool_basename; ac_word=$2
42308{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42309$as_echo_n "checking for $ac_word... " >&6; }
42310if ${ac_cv_path_OBJCOPY+:} false; then :
42311  $as_echo_n "(cached) " >&6
42312else
42313  case $OBJCOPY in
42314  [\\/]* | ?:[\\/]*)
42315  ac_cv_path_OBJCOPY="$OBJCOPY" # Let the user override the test with a path.
42316  ;;
42317  *)
42318  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42319for as_dir in $PATH
42320do
42321  IFS=$as_save_IFS
42322  test -z "$as_dir" && as_dir=.
42323    for ac_exec_ext in '' $ac_executable_extensions; do
42324  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42325    ac_cv_path_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
42326    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42327    break 2
42328  fi
42329done
42330  done
42331IFS=$as_save_IFS
42332
42333  ;;
42334esac
42335fi
42336OBJCOPY=$ac_cv_path_OBJCOPY
42337if test -n "$OBJCOPY"; then
42338  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJCOPY" >&5
42339$as_echo "$OBJCOPY" >&6; }
42340else
42341  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42342$as_echo "no" >&6; }
42343fi
42344
42345
42346          if test "x$OBJCOPY" = x; then
42347            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42348          fi
42349        else
42350          # Otherwise we believe it is a complete path. Use it as it is.
42351          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJCOPY=$tool_specified" >&5
42352$as_echo "$as_me: Will use user supplied tool OBJCOPY=$tool_specified" >&6;}
42353          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJCOPY" >&5
42354$as_echo_n "checking for OBJCOPY... " >&6; }
42355          if test ! -x "$tool_specified"; then
42356            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42357$as_echo "not found" >&6; }
42358            as_fn_error $? "User supplied tool OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
42359          fi
42360          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
42361$as_echo "$tool_specified" >&6; }
42362        fi
42363      fi
42364    fi
42365
42366  fi
42367
42368
42369    # Only call fixup if objcopy was found.
42370    if test -n "$OBJCOPY"; then
42371
42372  # Only process if variable expands to non-empty
42373
42374  if test "x$OBJCOPY" != x; then
42375    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42376
42377  # First separate the path from the arguments. This will split at the first
42378  # space.
42379  complete="$OBJCOPY"
42380  path="${complete%% *}"
42381  tmp="$complete EOL"
42382  arguments="${tmp#* }"
42383
42384  # Input might be given as Windows format, start by converting to
42385  # unix format.
42386  new_path=`$CYGPATH -u "$path"`
42387
42388  # Now try to locate executable using which
42389  new_path=`$WHICH "$new_path" 2> /dev/null`
42390  # bat and cmd files are not always considered executable in cygwin causing which
42391  # to not find them
42392  if test "x$new_path" = x \
42393      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42394      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42395    new_path=`$CYGPATH -u "$path"`
42396  fi
42397  if test "x$new_path" = x; then
42398    # Oops. Which didn't find the executable.
42399    # The splitting of arguments from the executable at a space might have been incorrect,
42400    # since paths with space are more likely in Windows. Give it another try with the whole
42401    # argument.
42402    path="$complete"
42403    arguments="EOL"
42404    new_path=`$CYGPATH -u "$path"`
42405    new_path=`$WHICH "$new_path" 2> /dev/null`
42406    # bat and cmd files are not always considered executable in cygwin causing which
42407    # to not find them
42408    if test "x$new_path" = x \
42409        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42410        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42411      new_path=`$CYGPATH -u "$path"`
42412    fi
42413    if test "x$new_path" = x; then
42414      # It's still not found. Now this is an unrecoverable error.
42415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42416$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42417      has_space=`$ECHO "$complete" | $GREP " "`
42418      if test "x$has_space" != x; then
42419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42421      fi
42422      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42423    fi
42424  fi
42425
42426  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
42427  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
42428  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
42429  # "foo.exe" is OK but "foo" is an error.
42430  #
42431  # This test is therefore slightly more accurate than "test -f" to check for file presence.
42432  # It is also a way to make sure we got the proper file name for the real test later on.
42433  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
42434  if test "x$test_shortpath" = x; then
42435    # Short path failed, file does not exist as specified.
42436    # Try adding .exe or .cmd
42437    if test -f "${new_path}.exe"; then
42438      input_to_shortpath="${new_path}.exe"
42439    elif test -f "${new_path}.cmd"; then
42440      input_to_shortpath="${new_path}.cmd"
42441    else
42442      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
42443$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
42444      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
42445$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
42446      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42447    fi
42448  else
42449    input_to_shortpath="$new_path"
42450  fi
42451
42452  # Call helper function which possibly converts this using DOS-style short mode.
42453  # If so, the updated path is stored in $new_path.
42454  new_path="$input_to_shortpath"
42455
42456  input_path="$input_to_shortpath"
42457  # Check if we need to convert this using DOS-style short mode. If the path
42458  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42459  # take no chances and rewrite it.
42460  # Note: m4 eats our [], so we need to use [ and ] instead.
42461  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
42462  if test "x$has_forbidden_chars" != x; then
42463    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42464    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
42465    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
42466    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
42467      # Going to short mode and back again did indeed matter. Since short mode is
42468      # case insensitive, let's make it lowercase to improve readability.
42469      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42470      # Now convert it back to Unix-style (cygpath)
42471      input_path=`$CYGPATH -u "$shortmode_path"`
42472      new_path="$input_path"
42473    fi
42474  fi
42475
42476  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
42477  if test "x$test_cygdrive_prefix" = x; then
42478    # As a simple fix, exclude /usr/bin since it's not a real path.
42479    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
42480      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
42481      # a path prefixed by /cygdrive for fixpath to work.
42482      new_path="$CYGWIN_ROOT_PATH$input_path"
42483    fi
42484  fi
42485
42486  # remove trailing .exe if any
42487  new_path="${new_path/%.exe/}"
42488
42489    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42490
42491  # First separate the path from the arguments. This will split at the first
42492  # space.
42493  complete="$OBJCOPY"
42494  path="${complete%% *}"
42495  tmp="$complete EOL"
42496  arguments="${tmp#* }"
42497
42498  # Input might be given as Windows format, start by converting to
42499  # unix format.
42500  new_path="$path"
42501
42502  windows_path="$new_path"
42503  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42504    unix_path=`$CYGPATH -u "$windows_path"`
42505    new_path="$unix_path"
42506  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42507    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42508    new_path="$unix_path"
42509  fi
42510
42511
42512  # Now try to locate executable using which
42513  new_path=`$WHICH "$new_path" 2> /dev/null`
42514
42515  if test "x$new_path" = x; then
42516    # Oops. Which didn't find the executable.
42517    # The splitting of arguments from the executable at a space might have been incorrect,
42518    # since paths with space are more likely in Windows. Give it another try with the whole
42519    # argument.
42520    path="$complete"
42521    arguments="EOL"
42522    new_path="$path"
42523
42524  windows_path="$new_path"
42525  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42526    unix_path=`$CYGPATH -u "$windows_path"`
42527    new_path="$unix_path"
42528  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42529    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42530    new_path="$unix_path"
42531  fi
42532
42533
42534    new_path=`$WHICH "$new_path" 2> /dev/null`
42535    # bat and cmd files are not always considered executable in MSYS causing which
42536    # to not find them
42537    if test "x$new_path" = x \
42538        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
42539        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
42540      new_path="$path"
42541
42542  windows_path="$new_path"
42543  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42544    unix_path=`$CYGPATH -u "$windows_path"`
42545    new_path="$unix_path"
42546  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42547    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42548    new_path="$unix_path"
42549  fi
42550
42551    fi
42552
42553    if test "x$new_path" = x; then
42554      # It's still not found. Now this is an unrecoverable error.
42555      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42556$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42557      has_space=`$ECHO "$complete" | $GREP " "`
42558      if test "x$has_space" != x; then
42559        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
42560$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
42561      fi
42562      as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42563    fi
42564  fi
42565
42566  # Now new_path has a complete unix path to the binary
42567  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
42568    # Keep paths in /bin as-is, but remove trailing .exe if any
42569    new_path="${new_path/%.exe/}"
42570    # Do not save /bin paths to all_fixpath_prefixes!
42571  else
42572    # Not in mixed or Windows style, start by that.
42573    new_path=`cmd //c echo $new_path`
42574
42575  input_path="$new_path"
42576  # Check if we need to convert this using DOS-style short mode. If the path
42577  # contains just simple characters, use it. Otherwise (spaces, weird characters),
42578  # take no chances and rewrite it.
42579  # Note: m4 eats our [], so we need to use [ and ] instead.
42580  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
42581  if test "x$has_forbidden_chars" != x; then
42582    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
42583    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
42584  fi
42585
42586    # Output is in $new_path
42587
42588  windows_path="$new_path"
42589  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
42590    unix_path=`$CYGPATH -u "$windows_path"`
42591    new_path="$unix_path"
42592  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
42593    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
42594    new_path="$unix_path"
42595  fi
42596
42597    # remove trailing .exe if any
42598    new_path="${new_path/%.exe/}"
42599
42600    # Save the first 10 bytes of this path to the storage, so fixpath can work.
42601    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
42602  fi
42603
42604    else
42605      # We're on a unix platform. Hooray! :)
42606      # First separate the path from the arguments. This will split at the first
42607      # space.
42608      complete="$OBJCOPY"
42609      path="${complete%% *}"
42610      tmp="$complete EOL"
42611      arguments="${tmp#* }"
42612
42613      # Cannot rely on the command "which" here since it doesn't always work.
42614      is_absolute_path=`$ECHO "$path" | $GREP ^/`
42615      if test -z "$is_absolute_path"; then
42616        # Path to executable is not absolute. Find it.
42617        IFS_save="$IFS"
42618        IFS=:
42619        for p in $PATH; do
42620          if test -f "$p/$path" && test -x "$p/$path"; then
42621            new_path="$p/$path"
42622            break
42623          fi
42624        done
42625        IFS="$IFS_save"
42626      else
42627        # This is an absolute path, we can use it without further modifications.
42628        new_path="$path"
42629      fi
42630
42631      if test "x$new_path" = x; then
42632        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&5
42633$as_echo "$as_me: The path of OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
42634        has_space=`$ECHO "$complete" | $GREP " "`
42635        if test "x$has_space" != x; then
42636          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
42637$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
42638        fi
42639        as_fn_error $? "Cannot locate the the path of OBJCOPY" "$LINENO" 5
42640      fi
42641    fi
42642
42643    # Now join together the path and the arguments once again
42644    if test "x$arguments" != xEOL; then
42645      new_complete="$new_path ${arguments% *}"
42646    else
42647      new_complete="$new_path"
42648    fi
42649
42650    if test "x$complete" != "x$new_complete"; then
42651      OBJCOPY="$new_complete"
42652      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJCOPY to \"$new_complete\"" >&5
42653$as_echo "$as_me: Rewriting OBJCOPY to \"$new_complete\"" >&6;}
42654    fi
42655  fi
42656
42657      if test "x$OPENJDK_BUILD_OS" = xsolaris; then
42658        # objcopy prior to 2.21.1 on solaris is broken and is not usable.
42659        # Rewrite objcopy version output to VALID_VERSION or BAD_VERSION.
42660        # - version number is last blank separate word on first line
42661        # - version number formats that have been seen:
42662        #   - <major>.<minor>
42663        #   - <major>.<minor>.<micro>
42664        OBJCOPY_VERSION=`$OBJCOPY --version | $HEAD -n 1`
42665        # The outer [ ] is to prevent m4 from eating the [] in the sed expression.
42666         OBJCOPY_VERSION_CHECK=`$ECHO $OBJCOPY_VERSION | $SED -n \
42667              -e 's/.* //' \
42668              -e '/^[01]\./b bad' \
42669              -e '/^2\./{' \
42670              -e '  s/^2\.//' \
42671              -e '  /^[0-9]$/b bad' \
42672              -e '  /^[0-9]\./b bad' \
42673              -e '  /^1[0-9]$/b bad' \
42674              -e '  /^1[0-9]\./b bad' \
42675              -e '  /^20\./b bad' \
42676              -e '  /^21\.0$/b bad' \
42677              -e '  /^21\.0\./b bad' \
42678              -e '}' \
42679              -e ':good' \
42680              -e 's/.*/VALID_VERSION/p' \
42681              -e 'q' \
42682              -e ':bad' \
42683              -e 's/.*/BAD_VERSION/p' \
42684              -e 'q'`
42685        if test "x$OBJCOPY_VERSION_CHECK" = xBAD_VERSION; then
42686          OBJCOPY=
42687          { $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
42688$as_echo "$as_me: WARNING: Ignoring found objcopy since it is broken (prior to 2.21.1). No debug symbols will be generated." >&2;}
42689          { $as_echo "$as_me:${as_lineno-$LINENO}: objcopy reports version $OBJCOPY_VERSION" >&5
42690$as_echo "$as_me: objcopy reports version $OBJCOPY_VERSION" >&6;}
42691          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&5
42692$as_echo "$as_me: Note: patch 149063-01 or newer contains the correct Solaris 10 SPARC version" >&6;}
42693          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&5
42694$as_echo "$as_me: Note: patch 149064-01 or newer contains the correct Solaris 10 X86 version" >&6;}
42695          { $as_echo "$as_me:${as_lineno-$LINENO}: Note: Solaris 11 Update 1 contains the correct version" >&5
42696$as_echo "$as_me: Note: Solaris 11 Update 1 contains the correct version" >&6;}
42697        fi
42698      fi
42699    fi
42700  fi
42701
42702
42703
42704  # Publish this variable in the help.
42705
42706
42707  if [ -z "${OBJDUMP+x}" ]; then
42708    # The variable is not set by user, try to locate tool using the code snippet
42709    if test -n "$ac_tool_prefix"; then
42710  for ac_prog in gobjdump objdump
42711  do
42712    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42713set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42714{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42715$as_echo_n "checking for $ac_word... " >&6; }
42716if ${ac_cv_prog_OBJDUMP+:} false; then :
42717  $as_echo_n "(cached) " >&6
42718else
42719  if test -n "$OBJDUMP"; then
42720  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42721else
42722as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42723for as_dir in $PATH
42724do
42725  IFS=$as_save_IFS
42726  test -z "$as_dir" && as_dir=.
42727    for ac_exec_ext in '' $ac_executable_extensions; do
42728  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42729    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42730    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42731    break 2
42732  fi
42733done
42734  done
42735IFS=$as_save_IFS
42736
42737fi
42738fi
42739OBJDUMP=$ac_cv_prog_OBJDUMP
42740if test -n "$OBJDUMP"; then
42741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42742$as_echo "$OBJDUMP" >&6; }
42743else
42744  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42745$as_echo "no" >&6; }
42746fi
42747
42748
42749    test -n "$OBJDUMP" && break
42750  done
42751fi
42752if test -z "$OBJDUMP"; then
42753  ac_ct_OBJDUMP=$OBJDUMP
42754  for ac_prog in gobjdump objdump
42755do
42756  # Extract the first word of "$ac_prog", so it can be a program name with args.
42757set dummy $ac_prog; ac_word=$2
42758{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42759$as_echo_n "checking for $ac_word... " >&6; }
42760if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42761  $as_echo_n "(cached) " >&6
42762else
42763  if test -n "$ac_ct_OBJDUMP"; then
42764  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42765else
42766as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42767for as_dir in $PATH
42768do
42769  IFS=$as_save_IFS
42770  test -z "$as_dir" && as_dir=.
42771    for ac_exec_ext in '' $ac_executable_extensions; do
42772  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42773    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42774    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42775    break 2
42776  fi
42777done
42778  done
42779IFS=$as_save_IFS
42780
42781fi
42782fi
42783ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42784if test -n "$ac_ct_OBJDUMP"; then
42785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42786$as_echo "$ac_ct_OBJDUMP" >&6; }
42787else
42788  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42789$as_echo "no" >&6; }
42790fi
42791
42792
42793  test -n "$ac_ct_OBJDUMP" && break
42794done
42795
42796  if test "x$ac_ct_OBJDUMP" = x; then
42797    OBJDUMP=""
42798  else
42799    case $cross_compiling:$ac_tool_warned in
42800yes:)
42801{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42802$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42803ac_tool_warned=yes ;;
42804esac
42805    OBJDUMP=$ac_ct_OBJDUMP
42806  fi
42807fi
42808
42809  else
42810    # The variable is set, but is it from the command line or the environment?
42811
42812    # Try to remove the string !OBJDUMP! from our list.
42813    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!OBJDUMP!/}
42814    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
42815      # If it failed, the variable was not from the command line. Ignore it,
42816      # but warn the user (except for BASH, which is always set by the calling BASH).
42817      if test "xOBJDUMP" != xBASH; then
42818        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&5
42819$as_echo "$as_me: WARNING: Ignoring value of OBJDUMP from the environment. Use command line variables instead." >&2;}
42820      fi
42821      # Try to locate tool using the code snippet
42822      if test -n "$ac_tool_prefix"; then
42823  for ac_prog in gobjdump objdump
42824  do
42825    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
42826set dummy $ac_tool_prefix$ac_prog; ac_word=$2
42827{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42828$as_echo_n "checking for $ac_word... " >&6; }
42829if ${ac_cv_prog_OBJDUMP+:} false; then :
42830  $as_echo_n "(cached) " >&6
42831else
42832  if test -n "$OBJDUMP"; then
42833  ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test.
42834else
42835as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42836for as_dir in $PATH
42837do
42838  IFS=$as_save_IFS
42839  test -z "$as_dir" && as_dir=.
42840    for ac_exec_ext in '' $ac_executable_extensions; do
42841  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42842    ac_cv_prog_OBJDUMP="$ac_tool_prefix$ac_prog"
42843    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42844    break 2
42845  fi
42846done
42847  done
42848IFS=$as_save_IFS
42849
42850fi
42851fi
42852OBJDUMP=$ac_cv_prog_OBJDUMP
42853if test -n "$OBJDUMP"; then
42854  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42855$as_echo "$OBJDUMP" >&6; }
42856else
42857  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42858$as_echo "no" >&6; }
42859fi
42860
42861
42862    test -n "$OBJDUMP" && break
42863  done
42864fi
42865if test -z "$OBJDUMP"; then
42866  ac_ct_OBJDUMP=$OBJDUMP
42867  for ac_prog in gobjdump objdump
42868do
42869  # Extract the first word of "$ac_prog", so it can be a program name with args.
42870set dummy $ac_prog; ac_word=$2
42871{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42872$as_echo_n "checking for $ac_word... " >&6; }
42873if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then :
42874  $as_echo_n "(cached) " >&6
42875else
42876  if test -n "$ac_ct_OBJDUMP"; then
42877  ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test.
42878else
42879as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42880for as_dir in $PATH
42881do
42882  IFS=$as_save_IFS
42883  test -z "$as_dir" && as_dir=.
42884    for ac_exec_ext in '' $ac_executable_extensions; do
42885  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42886    ac_cv_prog_ac_ct_OBJDUMP="$ac_prog"
42887    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42888    break 2
42889  fi
42890done
42891  done
42892IFS=$as_save_IFS
42893
42894fi
42895fi
42896ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP
42897if test -n "$ac_ct_OBJDUMP"; then
42898  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5
42899$as_echo "$ac_ct_OBJDUMP" >&6; }
42900else
42901  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42902$as_echo "no" >&6; }
42903fi
42904
42905
42906  test -n "$ac_ct_OBJDUMP" && break
42907done
42908
42909  if test "x$ac_ct_OBJDUMP" = x; then
42910    OBJDUMP=""
42911  else
42912    case $cross_compiling:$ac_tool_warned in
42913yes:)
42914{ $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5
42915$as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;}
42916ac_tool_warned=yes ;;
42917esac
42918    OBJDUMP=$ac_ct_OBJDUMP
42919  fi
42920fi
42921
42922    else
42923      # If it succeeded, then it was overridden by the user. We will use it
42924      # for the tool.
42925
42926      # First remove it from the list of overridden variables, so we can test
42927      # for unknown variables in the end.
42928      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
42929
42930      # Check if we try to supply an empty value
42931      if test "x$OBJDUMP" = x; then
42932        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool OBJDUMP= (no value)" >&5
42933$as_echo "$as_me: Setting user supplied tool OBJDUMP= (no value)" >&6;}
42934        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42935$as_echo_n "checking for OBJDUMP... " >&6; }
42936        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
42937$as_echo "disabled" >&6; }
42938      else
42939        # Check if the provided tool contains a complete path.
42940        tool_specified="$OBJDUMP"
42941        tool_basename="${tool_specified##*/}"
42942        if test "x$tool_basename" = "x$tool_specified"; then
42943          # A command without a complete path is provided, search $PATH.
42944          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool OBJDUMP=$tool_basename" >&5
42945$as_echo "$as_me: Will search for user supplied tool OBJDUMP=$tool_basename" >&6;}
42946          # Extract the first word of "$tool_basename", so it can be a program name with args.
42947set dummy $tool_basename; ac_word=$2
42948{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
42949$as_echo_n "checking for $ac_word... " >&6; }
42950if ${ac_cv_path_OBJDUMP+:} false; then :
42951  $as_echo_n "(cached) " >&6
42952else
42953  case $OBJDUMP in
42954  [\\/]* | ?:[\\/]*)
42955  ac_cv_path_OBJDUMP="$OBJDUMP" # Let the user override the test with a path.
42956  ;;
42957  *)
42958  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
42959for as_dir in $PATH
42960do
42961  IFS=$as_save_IFS
42962  test -z "$as_dir" && as_dir=.
42963    for ac_exec_ext in '' $ac_executable_extensions; do
42964  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
42965    ac_cv_path_OBJDUMP="$as_dir/$ac_word$ac_exec_ext"
42966    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
42967    break 2
42968  fi
42969done
42970  done
42971IFS=$as_save_IFS
42972
42973  ;;
42974esac
42975fi
42976OBJDUMP=$ac_cv_path_OBJDUMP
42977if test -n "$OBJDUMP"; then
42978  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5
42979$as_echo "$OBJDUMP" >&6; }
42980else
42981  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
42982$as_echo "no" >&6; }
42983fi
42984
42985
42986          if test "x$OBJDUMP" = x; then
42987            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
42988          fi
42989        else
42990          # Otherwise we believe it is a complete path. Use it as it is.
42991          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool OBJDUMP=$tool_specified" >&5
42992$as_echo "$as_me: Will use user supplied tool OBJDUMP=$tool_specified" >&6;}
42993          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for OBJDUMP" >&5
42994$as_echo_n "checking for OBJDUMP... " >&6; }
42995          if test ! -x "$tool_specified"; then
42996            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
42997$as_echo "not found" >&6; }
42998            as_fn_error $? "User supplied tool OBJDUMP=$tool_specified does not exist or is not executable" "$LINENO" 5
42999          fi
43000          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43001$as_echo "$tool_specified" >&6; }
43002        fi
43003      fi
43004    fi
43005
43006  fi
43007
43008
43009  if test "x$OBJDUMP" != x; then
43010    # Only used for compare.sh; we can live without it. BASIC_FIXUP_EXECUTABLE
43011    # bails if argument is missing.
43012
43013  # Only process if variable expands to non-empty
43014
43015  if test "x$OBJDUMP" != x; then
43016    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43017
43018  # First separate the path from the arguments. This will split at the first
43019  # space.
43020  complete="$OBJDUMP"
43021  path="${complete%% *}"
43022  tmp="$complete EOL"
43023  arguments="${tmp#* }"
43024
43025  # Input might be given as Windows format, start by converting to
43026  # unix format.
43027  new_path=`$CYGPATH -u "$path"`
43028
43029  # Now try to locate executable using which
43030  new_path=`$WHICH "$new_path" 2> /dev/null`
43031  # bat and cmd files are not always considered executable in cygwin causing which
43032  # to not find them
43033  if test "x$new_path" = x \
43034      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43035      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43036    new_path=`$CYGPATH -u "$path"`
43037  fi
43038  if test "x$new_path" = x; then
43039    # Oops. Which didn't find the executable.
43040    # The splitting of arguments from the executable at a space might have been incorrect,
43041    # since paths with space are more likely in Windows. Give it another try with the whole
43042    # argument.
43043    path="$complete"
43044    arguments="EOL"
43045    new_path=`$CYGPATH -u "$path"`
43046    new_path=`$WHICH "$new_path" 2> /dev/null`
43047    # bat and cmd files are not always considered executable in cygwin causing which
43048    # to not find them
43049    if test "x$new_path" = x \
43050        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43051        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43052      new_path=`$CYGPATH -u "$path"`
43053    fi
43054    if test "x$new_path" = x; then
43055      # It's still not found. Now this is an unrecoverable error.
43056      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43057$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43058      has_space=`$ECHO "$complete" | $GREP " "`
43059      if test "x$has_space" != x; then
43060        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43061$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43062      fi
43063      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43064    fi
43065  fi
43066
43067  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43068  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43069  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43070  # "foo.exe" is OK but "foo" is an error.
43071  #
43072  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43073  # It is also a way to make sure we got the proper file name for the real test later on.
43074  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43075  if test "x$test_shortpath" = x; then
43076    # Short path failed, file does not exist as specified.
43077    # Try adding .exe or .cmd
43078    if test -f "${new_path}.exe"; then
43079      input_to_shortpath="${new_path}.exe"
43080    elif test -f "${new_path}.cmd"; then
43081      input_to_shortpath="${new_path}.cmd"
43082    else
43083      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&5
43084$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$new_path\", is invalid." >&6;}
43085      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43086$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43087      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43088    fi
43089  else
43090    input_to_shortpath="$new_path"
43091  fi
43092
43093  # Call helper function which possibly converts this using DOS-style short mode.
43094  # If so, the updated path is stored in $new_path.
43095  new_path="$input_to_shortpath"
43096
43097  input_path="$input_to_shortpath"
43098  # Check if we need to convert this using DOS-style short mode. If the path
43099  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43100  # take no chances and rewrite it.
43101  # Note: m4 eats our [], so we need to use [ and ] instead.
43102  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43103  if test "x$has_forbidden_chars" != x; then
43104    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43105    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43106    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43107    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43108      # Going to short mode and back again did indeed matter. Since short mode is
43109      # case insensitive, let's make it lowercase to improve readability.
43110      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43111      # Now convert it back to Unix-style (cygpath)
43112      input_path=`$CYGPATH -u "$shortmode_path"`
43113      new_path="$input_path"
43114    fi
43115  fi
43116
43117  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43118  if test "x$test_cygdrive_prefix" = x; then
43119    # As a simple fix, exclude /usr/bin since it's not a real path.
43120    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43121      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43122      # a path prefixed by /cygdrive for fixpath to work.
43123      new_path="$CYGWIN_ROOT_PATH$input_path"
43124    fi
43125  fi
43126
43127  # remove trailing .exe if any
43128  new_path="${new_path/%.exe/}"
43129
43130    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43131
43132  # First separate the path from the arguments. This will split at the first
43133  # space.
43134  complete="$OBJDUMP"
43135  path="${complete%% *}"
43136  tmp="$complete EOL"
43137  arguments="${tmp#* }"
43138
43139  # Input might be given as Windows format, start by converting to
43140  # unix format.
43141  new_path="$path"
43142
43143  windows_path="$new_path"
43144  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43145    unix_path=`$CYGPATH -u "$windows_path"`
43146    new_path="$unix_path"
43147  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43148    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43149    new_path="$unix_path"
43150  fi
43151
43152
43153  # Now try to locate executable using which
43154  new_path=`$WHICH "$new_path" 2> /dev/null`
43155
43156  if test "x$new_path" = x; then
43157    # Oops. Which didn't find the executable.
43158    # The splitting of arguments from the executable at a space might have been incorrect,
43159    # since paths with space are more likely in Windows. Give it another try with the whole
43160    # argument.
43161    path="$complete"
43162    arguments="EOL"
43163    new_path="$path"
43164
43165  windows_path="$new_path"
43166  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43167    unix_path=`$CYGPATH -u "$windows_path"`
43168    new_path="$unix_path"
43169  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43170    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43171    new_path="$unix_path"
43172  fi
43173
43174
43175    new_path=`$WHICH "$new_path" 2> /dev/null`
43176    # bat and cmd files are not always considered executable in MSYS causing which
43177    # to not find them
43178    if test "x$new_path" = x \
43179        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43180        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43181      new_path="$path"
43182
43183  windows_path="$new_path"
43184  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43185    unix_path=`$CYGPATH -u "$windows_path"`
43186    new_path="$unix_path"
43187  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43188    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43189    new_path="$unix_path"
43190  fi
43191
43192    fi
43193
43194    if test "x$new_path" = x; then
43195      # It's still not found. Now this is an unrecoverable error.
43196      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43197$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43198      has_space=`$ECHO "$complete" | $GREP " "`
43199      if test "x$has_space" != x; then
43200        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43201$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43202      fi
43203      as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43204    fi
43205  fi
43206
43207  # Now new_path has a complete unix path to the binary
43208  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43209    # Keep paths in /bin as-is, but remove trailing .exe if any
43210    new_path="${new_path/%.exe/}"
43211    # Do not save /bin paths to all_fixpath_prefixes!
43212  else
43213    # Not in mixed or Windows style, start by that.
43214    new_path=`cmd //c echo $new_path`
43215
43216  input_path="$new_path"
43217  # Check if we need to convert this using DOS-style short mode. If the path
43218  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43219  # take no chances and rewrite it.
43220  # Note: m4 eats our [], so we need to use [ and ] instead.
43221  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43222  if test "x$has_forbidden_chars" != x; then
43223    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43224    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43225  fi
43226
43227    # Output is in $new_path
43228
43229  windows_path="$new_path"
43230  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43231    unix_path=`$CYGPATH -u "$windows_path"`
43232    new_path="$unix_path"
43233  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43234    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43235    new_path="$unix_path"
43236  fi
43237
43238    # remove trailing .exe if any
43239    new_path="${new_path/%.exe/}"
43240
43241    # Save the first 10 bytes of this path to the storage, so fixpath can work.
43242    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43243  fi
43244
43245    else
43246      # We're on a unix platform. Hooray! :)
43247      # First separate the path from the arguments. This will split at the first
43248      # space.
43249      complete="$OBJDUMP"
43250      path="${complete%% *}"
43251      tmp="$complete EOL"
43252      arguments="${tmp#* }"
43253
43254      # Cannot rely on the command "which" here since it doesn't always work.
43255      is_absolute_path=`$ECHO "$path" | $GREP ^/`
43256      if test -z "$is_absolute_path"; then
43257        # Path to executable is not absolute. Find it.
43258        IFS_save="$IFS"
43259        IFS=:
43260        for p in $PATH; do
43261          if test -f "$p/$path" && test -x "$p/$path"; then
43262            new_path="$p/$path"
43263            break
43264          fi
43265        done
43266        IFS="$IFS_save"
43267      else
43268        # This is an absolute path, we can use it without further modifications.
43269        new_path="$path"
43270      fi
43271
43272      if test "x$new_path" = x; then
43273        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&5
43274$as_echo "$as_me: The path of OBJDUMP, which resolves as \"$complete\", is not found." >&6;}
43275        has_space=`$ECHO "$complete" | $GREP " "`
43276        if test "x$has_space" != x; then
43277          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
43278$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
43279        fi
43280        as_fn_error $? "Cannot locate the the path of OBJDUMP" "$LINENO" 5
43281      fi
43282    fi
43283
43284    # Now join together the path and the arguments once again
43285    if test "x$arguments" != xEOL; then
43286      new_complete="$new_path ${arguments% *}"
43287    else
43288      new_complete="$new_path"
43289    fi
43290
43291    if test "x$complete" != "x$new_complete"; then
43292      OBJDUMP="$new_complete"
43293      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting OBJDUMP to \"$new_complete\"" >&5
43294$as_echo "$as_me: Rewriting OBJDUMP to \"$new_complete\"" >&6;}
43295    fi
43296  fi
43297
43298  fi
43299
43300
43301  # Restore old path.
43302  PATH="$OLD_PATH"
43303
43304  # Restore the flags to the user specified values.
43305  # This is necessary since AC_PROG_CC defaults CFLAGS to "-g -O2"
43306  CFLAGS="$ORG_CFLAGS"
43307  CXXFLAGS="$ORG_CXXFLAGS"
43308
43309
43310# Finally do some processing after the detection phase
43311
43312  if test "x$COMPILE_TYPE" = "xcross"; then
43313    # Now we need to find a C/C++ compiler that can build executables for the
43314    # build platform. We can't use the AC_PROG_CC macro, since it can only be
43315    # used once. Also, we need to do this without adding a tools dir to the
43316    # path, otherwise we might pick up cross-compilers which don't use standard
43317    # naming.
43318
43319    OLDPATH="$PATH"
43320
43321
43322# Check whether --with-build-devkit was given.
43323if test "${with_build_devkit+set}" = set; then :
43324  withval=$with_build_devkit;
43325fi
43326
43327    if test "x$with_build_devkit" = "xyes"; then
43328      as_fn_error $? "--with-build-devkit must have a value" "$LINENO" 5
43329    elif test -n "$with_build_devkit"; then
43330      if test ! -d "$with_build_devkit"; then
43331        as_fn_error $? "--with-build-devkit points to non existing dir: $with_build_devkit" "$LINENO" 5
43332      else
43333
43334  # Only process if variable expands to non-empty
43335
43336  if test "x$with_build_devkit" != x; then
43337    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43338
43339  # Input might be given as Windows format, start by converting to
43340  # unix format.
43341  path="$with_build_devkit"
43342  new_path=`$CYGPATH -u "$path"`
43343
43344  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43345  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43346  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43347  # "foo.exe" is OK but "foo" is an error.
43348  #
43349  # This test is therefore slightly more accurate than "test -f" to check for file precense.
43350  # It is also a way to make sure we got the proper file name for the real test later on.
43351  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43352  if test "x$test_shortpath" = x; then
43353    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43354$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43355    as_fn_error $? "Cannot locate the the path of with_build_devkit" "$LINENO" 5
43356  fi
43357
43358  # Call helper function which possibly converts this using DOS-style short mode.
43359  # If so, the updated path is stored in $new_path.
43360
43361  input_path="$new_path"
43362  # Check if we need to convert this using DOS-style short mode. If the path
43363  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43364  # take no chances and rewrite it.
43365  # Note: m4 eats our [], so we need to use [ and ] instead.
43366  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43367  if test "x$has_forbidden_chars" != x; then
43368    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43369    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43370    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43371    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43372      # Going to short mode and back again did indeed matter. Since short mode is
43373      # case insensitive, let's make it lowercase to improve readability.
43374      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43375      # Now convert it back to Unix-style (cygpath)
43376      input_path=`$CYGPATH -u "$shortmode_path"`
43377      new_path="$input_path"
43378    fi
43379  fi
43380
43381  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43382  if test "x$test_cygdrive_prefix" = x; then
43383    # As a simple fix, exclude /usr/bin since it's not a real path.
43384    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
43385      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43386      # a path prefixed by /cygdrive for fixpath to work.
43387      new_path="$CYGWIN_ROOT_PATH$input_path"
43388    fi
43389  fi
43390
43391
43392  if test "x$path" != "x$new_path"; then
43393    with_build_devkit="$new_path"
43394    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43395$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43396  fi
43397
43398    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43399
43400  path="$with_build_devkit"
43401  has_colon=`$ECHO $path | $GREP ^.:`
43402  new_path="$path"
43403  if test "x$has_colon" = x; then
43404    # Not in mixed or Windows style, start by that.
43405    new_path=`cmd //c echo $path`
43406  fi
43407
43408
43409  input_path="$new_path"
43410  # Check if we need to convert this using DOS-style short mode. If the path
43411  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43412  # take no chances and rewrite it.
43413  # Note: m4 eats our [], so we need to use [ and ] instead.
43414  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43415  if test "x$has_forbidden_chars" != x; then
43416    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43417    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43418  fi
43419
43420
43421  windows_path="$new_path"
43422  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43423    unix_path=`$CYGPATH -u "$windows_path"`
43424    new_path="$unix_path"
43425  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43426    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43427    new_path="$unix_path"
43428  fi
43429
43430  if test "x$path" != "x$new_path"; then
43431    with_build_devkit="$new_path"
43432    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting with_build_devkit to \"$new_path\"" >&5
43433$as_echo "$as_me: Rewriting with_build_devkit to \"$new_path\"" >&6;}
43434  fi
43435
43436  # Save the first 10 bytes of this path to the storage, so fixpath can work.
43437  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
43438
43439    else
43440      # We're on a unix platform. Hooray! :)
43441      path="$with_build_devkit"
43442      has_space=`$ECHO "$path" | $GREP " "`
43443      if test "x$has_space" != x; then
43444        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&5
43445$as_echo "$as_me: The path of with_build_devkit, which resolves as \"$path\", is invalid." >&6;}
43446        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
43447      fi
43448
43449      # Use eval to expand a potential ~
43450      eval path="$path"
43451      if test ! -f "$path" && test ! -d "$path"; then
43452        as_fn_error $? "The path of with_build_devkit, which resolves as \"$path\", is not found." "$LINENO" 5
43453      fi
43454
43455      if test -d "$path"; then
43456        with_build_devkit="`cd "$path"; $THEPWDCMD -L`"
43457      else
43458        dir="`$DIRNAME "$path"`"
43459        base="`$BASENAME "$path"`"
43460        with_build_devkit="`cd "$dir"; $THEPWDCMD -L`/$base"
43461      fi
43462    fi
43463  fi
43464
43465        BUILD_DEVKIT_ROOT="$with_build_devkit"
43466        # Check for a meta data info file in the root of the devkit
43467        if test -f "$BUILD_DEVKIT_ROOT/devkit.info"; then
43468          # Process devkit.info so that existing devkit variables are not
43469          # modified by this
43470          $SED -e "s/^DEVKIT_/BUILD_DEVKIT_/g" \
43471              -e "s/\$DEVKIT_ROOT/\$BUILD_DEVKIT_ROOT/g" \
43472              -e "s/\$host/\$build/g" \
43473              $BUILD_DEVKIT_ROOT/devkit.info \
43474              > $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43475          . $CONFIGURESUPPORT_OUTPUTDIR/build-devkit.info
43476          # This potentially sets the following:
43477          # A descriptive name of the devkit
43478
43479  if test "x$BUILD_DEVKIT_NAME" = x; then
43480    eval BUILD_DEVKIT_NAME="\${BUILD_DEVKIT_NAME_${OPENJDK_TARGET_CPU}}"
43481  fi
43482
43483          # Corresponds to --with-extra-path
43484
43485  if test "x$BUILD_DEVKIT_EXTRA_PATH" = x; then
43486    eval BUILD_DEVKIT_EXTRA_PATH="\${BUILD_DEVKIT_EXTRA_PATH_${OPENJDK_TARGET_CPU}}"
43487  fi
43488
43489          # Corresponds to --with-toolchain-path
43490
43491  if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43492    eval BUILD_DEVKIT_TOOLCHAIN_PATH="\${BUILD_DEVKIT_TOOLCHAIN_PATH_${OPENJDK_TARGET_CPU}}"
43493  fi
43494
43495          # Corresponds to --with-sysroot
43496
43497  if test "x$BUILD_DEVKIT_SYSROOT" = x; then
43498    eval BUILD_DEVKIT_SYSROOT="\${BUILD_DEVKIT_SYSROOT_${OPENJDK_TARGET_CPU}}"
43499  fi
43500
43501          # Skip the Window specific parts
43502        fi
43503
43504        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for build platform devkit" >&5
43505$as_echo_n "checking for build platform devkit... " >&6; }
43506        if test "x$BUILD_DEVKIT_NAME" != x; then
43507          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&5
43508$as_echo "$BUILD_DEVKIT_NAME in $BUILD_DEVKIT_ROOT" >&6; }
43509        else
43510          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_DEVKIT_ROOT" >&5
43511$as_echo "$BUILD_DEVKIT_ROOT" >&6; }
43512        fi
43513
43514        BUILD_SYSROOT="$BUILD_DEVKIT_SYSROOT"
43515
43516  if test "x$BUILD_SYSROOT" != "x"; then
43517    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
43518      if test "x$OPENJDK_TARGET_OS" = xsolaris; then
43519        # Solaris Studio does not have a concept of sysroot. Instead we must
43520        # make sure the default include and lib dirs are appended to each
43521        # compile and link command line. Must also add -I-xbuiltin to enable
43522        # inlining of system functions and intrinsics.
43523        BUILD_SYSROOT_CFLAGS="-I-xbuiltin -I$BUILD_SYSROOT/usr/include"
43524        BUILD_SYSROOT_LDFLAGS="-L$BUILD_SYSROOT/usr/lib$OPENJDK_TARGET_CPU_ISADIR \
43525            -L$BUILD_SYSROOT/lib$OPENJDK_TARGET_CPU_ISADIR \
43526            -L$BUILD_SYSROOT/usr/ccs/lib$OPENJDK_TARGET_CPU_ISADIR"
43527      fi
43528    elif test "x$TOOLCHAIN_TYPE" = xgcc; then
43529      BUILD_SYSROOT_CFLAGS="--sysroot=$BUILD_SYSROOT"
43530      BUILD_SYSROOT_LDFLAGS="--sysroot=$BUILD_SYSROOT"
43531    elif test "x$TOOLCHAIN_TYPE" = xclang; then
43532      BUILD_SYSROOT_CFLAGS="-isysroot $BUILD_SYSROOT"
43533      BUILD_SYSROOT_LDFLAGS="-isysroot $BUILD_SYSROOT"
43534    fi
43535    # Propagate the sysroot args to hotspot
43536    BUILD_LEGACY_EXTRA_CFLAGS="$BUILD_LEGACY_EXTRA_CFLAGS $BUILD_SYSROOT_CFLAGS"
43537    BUILD_LEGACY_EXTRA_CXXFLAGS="$BUILD_LEGACY_EXTRA_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43538    BUILD_LEGACY_EXTRA_LDFLAGS="$BUILD_LEGACY_EXTRA_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43539    # The global CFLAGS and LDFLAGS variables need these for configure to function
43540    BUILD_CFLAGS="$BUILD_CFLAGS $BUILD_SYSROOT_CFLAGS"
43541    BUILD_CPPFLAGS="$BUILD_CPPFLAGS $BUILD_SYSROOT_CFLAGS"
43542    BUILD_CXXFLAGS="$BUILD_CXXFLAGS $BUILD_SYSROOT_CFLAGS"
43543    BUILD_LDFLAGS="$BUILD_LDFLAGS $BUILD_SYSROOT_LDFLAGS"
43544  fi
43545
43546  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
43547    # We also need -iframework<path>/System/Library/Frameworks
43548    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43549    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -iframework $BUILD_SYSROOT/System/Library/Frameworks"
43550    # These always need to be set, or we can't find the frameworks embedded in JavaVM.framework
43551    # set this here so it doesn't have to be peppered throughout the forest
43552    BUILD_SYSROOT_CFLAGS="$BUILD_SYSROOT_CFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43553    BUILD_SYSROOT_LDFLAGS="$BUILD_SYSROOT_LDFLAGS -F $BUILD_SYSROOT/System/Library/Frameworks/JavaVM.framework/Frameworks"
43554  fi
43555
43556
43557
43558
43559
43560         # Fallback default of just /bin if DEVKIT_PATH is not defined
43561        if test "x$BUILD_DEVKIT_TOOLCHAIN_PATH" = x; then
43562          BUILD_DEVKIT_TOOLCHAIN_PATH="$BUILD_DEVKIT_ROOT/bin"
43563        fi
43564        PATH="$BUILD_DEVKIT_TOOLCHAIN_PATH:$BUILD_DEVKIT_EXTRA_PATH"
43565      fi
43566    fi
43567
43568    # FIXME: we should list the discovered compilers as an exclude pattern!
43569    # If we do that, we can do this detection before POST_DETECTION, and still
43570    # find the build compilers in the tools dir, if needed.
43571
43572
43573
43574  # Publish this variable in the help.
43575
43576
43577  if [ -z "${BUILD_CC+x}" ]; then
43578    # The variable is not set by user, try to locate tool using the code snippet
43579    for ac_prog in cl cc gcc
43580do
43581  # Extract the first word of "$ac_prog", so it can be a program name with args.
43582set dummy $ac_prog; ac_word=$2
43583{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43584$as_echo_n "checking for $ac_word... " >&6; }
43585if ${ac_cv_path_BUILD_CC+:} false; then :
43586  $as_echo_n "(cached) " >&6
43587else
43588  case $BUILD_CC in
43589  [\\/]* | ?:[\\/]*)
43590  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43591  ;;
43592  *)
43593  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43594for as_dir in $PATH
43595do
43596  IFS=$as_save_IFS
43597  test -z "$as_dir" && as_dir=.
43598    for ac_exec_ext in '' $ac_executable_extensions; do
43599  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43600    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43601    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43602    break 2
43603  fi
43604done
43605  done
43606IFS=$as_save_IFS
43607
43608  ;;
43609esac
43610fi
43611BUILD_CC=$ac_cv_path_BUILD_CC
43612if test -n "$BUILD_CC"; then
43613  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43614$as_echo "$BUILD_CC" >&6; }
43615else
43616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43617$as_echo "no" >&6; }
43618fi
43619
43620
43621  test -n "$BUILD_CC" && break
43622done
43623
43624  else
43625    # The variable is set, but is it from the command line or the environment?
43626
43627    # Try to remove the string !BUILD_CC! from our list.
43628    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CC!/}
43629    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
43630      # If it failed, the variable was not from the command line. Ignore it,
43631      # but warn the user (except for BASH, which is always set by the calling BASH).
43632      if test "xBUILD_CC" != xBASH; then
43633        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&5
43634$as_echo "$as_me: WARNING: Ignoring value of BUILD_CC from the environment. Use command line variables instead." >&2;}
43635      fi
43636      # Try to locate tool using the code snippet
43637      for ac_prog in cl cc gcc
43638do
43639  # Extract the first word of "$ac_prog", so it can be a program name with args.
43640set dummy $ac_prog; ac_word=$2
43641{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43642$as_echo_n "checking for $ac_word... " >&6; }
43643if ${ac_cv_path_BUILD_CC+:} false; then :
43644  $as_echo_n "(cached) " >&6
43645else
43646  case $BUILD_CC in
43647  [\\/]* | ?:[\\/]*)
43648  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43649  ;;
43650  *)
43651  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43652for as_dir in $PATH
43653do
43654  IFS=$as_save_IFS
43655  test -z "$as_dir" && as_dir=.
43656    for ac_exec_ext in '' $ac_executable_extensions; do
43657  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43658    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43659    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43660    break 2
43661  fi
43662done
43663  done
43664IFS=$as_save_IFS
43665
43666  ;;
43667esac
43668fi
43669BUILD_CC=$ac_cv_path_BUILD_CC
43670if test -n "$BUILD_CC"; then
43671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43672$as_echo "$BUILD_CC" >&6; }
43673else
43674  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43675$as_echo "no" >&6; }
43676fi
43677
43678
43679  test -n "$BUILD_CC" && break
43680done
43681
43682    else
43683      # If it succeeded, then it was overridden by the user. We will use it
43684      # for the tool.
43685
43686      # First remove it from the list of overridden variables, so we can test
43687      # for unknown variables in the end.
43688      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
43689
43690      # Check if we try to supply an empty value
43691      if test "x$BUILD_CC" = x; then
43692        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CC= (no value)" >&5
43693$as_echo "$as_me: Setting user supplied tool BUILD_CC= (no value)" >&6;}
43694        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43695$as_echo_n "checking for BUILD_CC... " >&6; }
43696        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
43697$as_echo "disabled" >&6; }
43698      else
43699        # Check if the provided tool contains a complete path.
43700        tool_specified="$BUILD_CC"
43701        tool_basename="${tool_specified##*/}"
43702        if test "x$tool_basename" = "x$tool_specified"; then
43703          # A command without a complete path is provided, search $PATH.
43704          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CC=$tool_basename" >&5
43705$as_echo "$as_me: Will search for user supplied tool BUILD_CC=$tool_basename" >&6;}
43706          # Extract the first word of "$tool_basename", so it can be a program name with args.
43707set dummy $tool_basename; ac_word=$2
43708{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
43709$as_echo_n "checking for $ac_word... " >&6; }
43710if ${ac_cv_path_BUILD_CC+:} false; then :
43711  $as_echo_n "(cached) " >&6
43712else
43713  case $BUILD_CC in
43714  [\\/]* | ?:[\\/]*)
43715  ac_cv_path_BUILD_CC="$BUILD_CC" # Let the user override the test with a path.
43716  ;;
43717  *)
43718  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
43719for as_dir in $PATH
43720do
43721  IFS=$as_save_IFS
43722  test -z "$as_dir" && as_dir=.
43723    for ac_exec_ext in '' $ac_executable_extensions; do
43724  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
43725    ac_cv_path_BUILD_CC="$as_dir/$ac_word$ac_exec_ext"
43726    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
43727    break 2
43728  fi
43729done
43730  done
43731IFS=$as_save_IFS
43732
43733  ;;
43734esac
43735fi
43736BUILD_CC=$ac_cv_path_BUILD_CC
43737if test -n "$BUILD_CC"; then
43738  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CC" >&5
43739$as_echo "$BUILD_CC" >&6; }
43740else
43741  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
43742$as_echo "no" >&6; }
43743fi
43744
43745
43746          if test "x$BUILD_CC" = x; then
43747            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
43748          fi
43749        else
43750          # Otherwise we believe it is a complete path. Use it as it is.
43751          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CC=$tool_specified" >&5
43752$as_echo "$as_me: Will use user supplied tool BUILD_CC=$tool_specified" >&6;}
43753          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CC" >&5
43754$as_echo_n "checking for BUILD_CC... " >&6; }
43755          if test ! -x "$tool_specified"; then
43756            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
43757$as_echo "not found" >&6; }
43758            as_fn_error $? "User supplied tool BUILD_CC=$tool_specified does not exist or is not executable" "$LINENO" 5
43759          fi
43760          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
43761$as_echo "$tool_specified" >&6; }
43762        fi
43763      fi
43764    fi
43765
43766  fi
43767
43768
43769
43770  if test "x$BUILD_CC" = x; then
43771    as_fn_error $? "Could not find required tool for BUILD_CC" "$LINENO" 5
43772  fi
43773
43774
43775
43776  # Only process if variable expands to non-empty
43777
43778  if test "x$BUILD_CC" != x; then
43779    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43780
43781  # First separate the path from the arguments. This will split at the first
43782  # space.
43783  complete="$BUILD_CC"
43784  path="${complete%% *}"
43785  tmp="$complete EOL"
43786  arguments="${tmp#* }"
43787
43788  # Input might be given as Windows format, start by converting to
43789  # unix format.
43790  new_path=`$CYGPATH -u "$path"`
43791
43792  # Now try to locate executable using which
43793  new_path=`$WHICH "$new_path" 2> /dev/null`
43794  # bat and cmd files are not always considered executable in cygwin causing which
43795  # to not find them
43796  if test "x$new_path" = x \
43797      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43798      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43799    new_path=`$CYGPATH -u "$path"`
43800  fi
43801  if test "x$new_path" = x; then
43802    # Oops. Which didn't find the executable.
43803    # The splitting of arguments from the executable at a space might have been incorrect,
43804    # since paths with space are more likely in Windows. Give it another try with the whole
43805    # argument.
43806    path="$complete"
43807    arguments="EOL"
43808    new_path=`$CYGPATH -u "$path"`
43809    new_path=`$WHICH "$new_path" 2> /dev/null`
43810    # bat and cmd files are not always considered executable in cygwin causing which
43811    # to not find them
43812    if test "x$new_path" = x \
43813        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43814        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43815      new_path=`$CYGPATH -u "$path"`
43816    fi
43817    if test "x$new_path" = x; then
43818      # It's still not found. Now this is an unrecoverable error.
43819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43820$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43821      has_space=`$ECHO "$complete" | $GREP " "`
43822      if test "x$has_space" != x; then
43823        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43824$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43825      fi
43826      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43827    fi
43828  fi
43829
43830  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
43831  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
43832  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
43833  # "foo.exe" is OK but "foo" is an error.
43834  #
43835  # This test is therefore slightly more accurate than "test -f" to check for file presence.
43836  # It is also a way to make sure we got the proper file name for the real test later on.
43837  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
43838  if test "x$test_shortpath" = x; then
43839    # Short path failed, file does not exist as specified.
43840    # Try adding .exe or .cmd
43841    if test -f "${new_path}.exe"; then
43842      input_to_shortpath="${new_path}.exe"
43843    elif test -f "${new_path}.cmd"; then
43844      input_to_shortpath="${new_path}.cmd"
43845    else
43846      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&5
43847$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$new_path\", is invalid." >&6;}
43848      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
43849$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
43850      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43851    fi
43852  else
43853    input_to_shortpath="$new_path"
43854  fi
43855
43856  # Call helper function which possibly converts this using DOS-style short mode.
43857  # If so, the updated path is stored in $new_path.
43858  new_path="$input_to_shortpath"
43859
43860  input_path="$input_to_shortpath"
43861  # Check if we need to convert this using DOS-style short mode. If the path
43862  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43863  # take no chances and rewrite it.
43864  # Note: m4 eats our [], so we need to use [ and ] instead.
43865  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
43866  if test "x$has_forbidden_chars" != x; then
43867    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43868    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
43869    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
43870    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
43871      # Going to short mode and back again did indeed matter. Since short mode is
43872      # case insensitive, let's make it lowercase to improve readability.
43873      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43874      # Now convert it back to Unix-style (cygpath)
43875      input_path=`$CYGPATH -u "$shortmode_path"`
43876      new_path="$input_path"
43877    fi
43878  fi
43879
43880  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
43881  if test "x$test_cygdrive_prefix" = x; then
43882    # As a simple fix, exclude /usr/bin since it's not a real path.
43883    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
43884      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
43885      # a path prefixed by /cygdrive for fixpath to work.
43886      new_path="$CYGWIN_ROOT_PATH$input_path"
43887    fi
43888  fi
43889
43890  # remove trailing .exe if any
43891  new_path="${new_path/%.exe/}"
43892
43893    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43894
43895  # First separate the path from the arguments. This will split at the first
43896  # space.
43897  complete="$BUILD_CC"
43898  path="${complete%% *}"
43899  tmp="$complete EOL"
43900  arguments="${tmp#* }"
43901
43902  # Input might be given as Windows format, start by converting to
43903  # unix format.
43904  new_path="$path"
43905
43906  windows_path="$new_path"
43907  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43908    unix_path=`$CYGPATH -u "$windows_path"`
43909    new_path="$unix_path"
43910  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43911    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43912    new_path="$unix_path"
43913  fi
43914
43915
43916  # Now try to locate executable using which
43917  new_path=`$WHICH "$new_path" 2> /dev/null`
43918
43919  if test "x$new_path" = x; then
43920    # Oops. Which didn't find the executable.
43921    # The splitting of arguments from the executable at a space might have been incorrect,
43922    # since paths with space are more likely in Windows. Give it another try with the whole
43923    # argument.
43924    path="$complete"
43925    arguments="EOL"
43926    new_path="$path"
43927
43928  windows_path="$new_path"
43929  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43930    unix_path=`$CYGPATH -u "$windows_path"`
43931    new_path="$unix_path"
43932  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43933    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43934    new_path="$unix_path"
43935  fi
43936
43937
43938    new_path=`$WHICH "$new_path" 2> /dev/null`
43939    # bat and cmd files are not always considered executable in MSYS causing which
43940    # to not find them
43941    if test "x$new_path" = x \
43942        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
43943        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
43944      new_path="$path"
43945
43946  windows_path="$new_path"
43947  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43948    unix_path=`$CYGPATH -u "$windows_path"`
43949    new_path="$unix_path"
43950  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43951    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43952    new_path="$unix_path"
43953  fi
43954
43955    fi
43956
43957    if test "x$new_path" = x; then
43958      # It's still not found. Now this is an unrecoverable error.
43959      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
43960$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
43961      has_space=`$ECHO "$complete" | $GREP " "`
43962      if test "x$has_space" != x; then
43963        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
43964$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
43965      fi
43966      as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
43967    fi
43968  fi
43969
43970  # Now new_path has a complete unix path to the binary
43971  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
43972    # Keep paths in /bin as-is, but remove trailing .exe if any
43973    new_path="${new_path/%.exe/}"
43974    # Do not save /bin paths to all_fixpath_prefixes!
43975  else
43976    # Not in mixed or Windows style, start by that.
43977    new_path=`cmd //c echo $new_path`
43978
43979  input_path="$new_path"
43980  # Check if we need to convert this using DOS-style short mode. If the path
43981  # contains just simple characters, use it. Otherwise (spaces, weird characters),
43982  # take no chances and rewrite it.
43983  # Note: m4 eats our [], so we need to use [ and ] instead.
43984  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
43985  if test "x$has_forbidden_chars" != x; then
43986    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
43987    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
43988  fi
43989
43990    # Output is in $new_path
43991
43992  windows_path="$new_path"
43993  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
43994    unix_path=`$CYGPATH -u "$windows_path"`
43995    new_path="$unix_path"
43996  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
43997    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
43998    new_path="$unix_path"
43999  fi
44000
44001    # remove trailing .exe if any
44002    new_path="${new_path/%.exe/}"
44003
44004    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44005    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44006  fi
44007
44008    else
44009      # We're on a unix platform. Hooray! :)
44010      # First separate the path from the arguments. This will split at the first
44011      # space.
44012      complete="$BUILD_CC"
44013      path="${complete%% *}"
44014      tmp="$complete EOL"
44015      arguments="${tmp#* }"
44016
44017      # Cannot rely on the command "which" here since it doesn't always work.
44018      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44019      if test -z "$is_absolute_path"; then
44020        # Path to executable is not absolute. Find it.
44021        IFS_save="$IFS"
44022        IFS=:
44023        for p in $PATH; do
44024          if test -f "$p/$path" && test -x "$p/$path"; then
44025            new_path="$p/$path"
44026            break
44027          fi
44028        done
44029        IFS="$IFS_save"
44030      else
44031        # This is an absolute path, we can use it without further modifications.
44032        new_path="$path"
44033      fi
44034
44035      if test "x$new_path" = x; then
44036        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&5
44037$as_echo "$as_me: The path of BUILD_CC, which resolves as \"$complete\", is not found." >&6;}
44038        has_space=`$ECHO "$complete" | $GREP " "`
44039        if test "x$has_space" != x; then
44040          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44041$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44042        fi
44043        as_fn_error $? "Cannot locate the the path of BUILD_CC" "$LINENO" 5
44044      fi
44045    fi
44046
44047    # Now join together the path and the arguments once again
44048    if test "x$arguments" != xEOL; then
44049      new_complete="$new_path ${arguments% *}"
44050    else
44051      new_complete="$new_path"
44052    fi
44053
44054    if test "x$complete" != "x$new_complete"; then
44055      BUILD_CC="$new_complete"
44056      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CC to \"$new_complete\"" >&5
44057$as_echo "$as_me: Rewriting BUILD_CC to \"$new_complete\"" >&6;}
44058    fi
44059  fi
44060
44061
44062
44063
44064  # Publish this variable in the help.
44065
44066
44067  if [ -z "${BUILD_CXX+x}" ]; then
44068    # The variable is not set by user, try to locate tool using the code snippet
44069    for ac_prog in cl CC g++
44070do
44071  # Extract the first word of "$ac_prog", so it can be a program name with args.
44072set dummy $ac_prog; ac_word=$2
44073{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44074$as_echo_n "checking for $ac_word... " >&6; }
44075if ${ac_cv_path_BUILD_CXX+:} false; then :
44076  $as_echo_n "(cached) " >&6
44077else
44078  case $BUILD_CXX in
44079  [\\/]* | ?:[\\/]*)
44080  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44081  ;;
44082  *)
44083  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44084for as_dir in $PATH
44085do
44086  IFS=$as_save_IFS
44087  test -z "$as_dir" && as_dir=.
44088    for ac_exec_ext in '' $ac_executable_extensions; do
44089  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44090    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44091    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44092    break 2
44093  fi
44094done
44095  done
44096IFS=$as_save_IFS
44097
44098  ;;
44099esac
44100fi
44101BUILD_CXX=$ac_cv_path_BUILD_CXX
44102if test -n "$BUILD_CXX"; then
44103  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44104$as_echo "$BUILD_CXX" >&6; }
44105else
44106  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44107$as_echo "no" >&6; }
44108fi
44109
44110
44111  test -n "$BUILD_CXX" && break
44112done
44113
44114  else
44115    # The variable is set, but is it from the command line or the environment?
44116
44117    # Try to remove the string !BUILD_CXX! from our list.
44118    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_CXX!/}
44119    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44120      # If it failed, the variable was not from the command line. Ignore it,
44121      # but warn the user (except for BASH, which is always set by the calling BASH).
44122      if test "xBUILD_CXX" != xBASH; then
44123        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&5
44124$as_echo "$as_me: WARNING: Ignoring value of BUILD_CXX from the environment. Use command line variables instead." >&2;}
44125      fi
44126      # Try to locate tool using the code snippet
44127      for ac_prog in cl CC g++
44128do
44129  # Extract the first word of "$ac_prog", so it can be a program name with args.
44130set dummy $ac_prog; ac_word=$2
44131{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44132$as_echo_n "checking for $ac_word... " >&6; }
44133if ${ac_cv_path_BUILD_CXX+:} false; then :
44134  $as_echo_n "(cached) " >&6
44135else
44136  case $BUILD_CXX in
44137  [\\/]* | ?:[\\/]*)
44138  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44139  ;;
44140  *)
44141  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44142for as_dir in $PATH
44143do
44144  IFS=$as_save_IFS
44145  test -z "$as_dir" && as_dir=.
44146    for ac_exec_ext in '' $ac_executable_extensions; do
44147  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44148    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44149    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44150    break 2
44151  fi
44152done
44153  done
44154IFS=$as_save_IFS
44155
44156  ;;
44157esac
44158fi
44159BUILD_CXX=$ac_cv_path_BUILD_CXX
44160if test -n "$BUILD_CXX"; then
44161  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44162$as_echo "$BUILD_CXX" >&6; }
44163else
44164  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44165$as_echo "no" >&6; }
44166fi
44167
44168
44169  test -n "$BUILD_CXX" && break
44170done
44171
44172    else
44173      # If it succeeded, then it was overridden by the user. We will use it
44174      # for the tool.
44175
44176      # First remove it from the list of overridden variables, so we can test
44177      # for unknown variables in the end.
44178      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44179
44180      # Check if we try to supply an empty value
44181      if test "x$BUILD_CXX" = x; then
44182        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_CXX= (no value)" >&5
44183$as_echo "$as_me: Setting user supplied tool BUILD_CXX= (no value)" >&6;}
44184        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44185$as_echo_n "checking for BUILD_CXX... " >&6; }
44186        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44187$as_echo "disabled" >&6; }
44188      else
44189        # Check if the provided tool contains a complete path.
44190        tool_specified="$BUILD_CXX"
44191        tool_basename="${tool_specified##*/}"
44192        if test "x$tool_basename" = "x$tool_specified"; then
44193          # A command without a complete path is provided, search $PATH.
44194          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_CXX=$tool_basename" >&5
44195$as_echo "$as_me: Will search for user supplied tool BUILD_CXX=$tool_basename" >&6;}
44196          # Extract the first word of "$tool_basename", so it can be a program name with args.
44197set dummy $tool_basename; ac_word=$2
44198{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44199$as_echo_n "checking for $ac_word... " >&6; }
44200if ${ac_cv_path_BUILD_CXX+:} false; then :
44201  $as_echo_n "(cached) " >&6
44202else
44203  case $BUILD_CXX in
44204  [\\/]* | ?:[\\/]*)
44205  ac_cv_path_BUILD_CXX="$BUILD_CXX" # Let the user override the test with a path.
44206  ;;
44207  *)
44208  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44209for as_dir in $PATH
44210do
44211  IFS=$as_save_IFS
44212  test -z "$as_dir" && as_dir=.
44213    for ac_exec_ext in '' $ac_executable_extensions; do
44214  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44215    ac_cv_path_BUILD_CXX="$as_dir/$ac_word$ac_exec_ext"
44216    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44217    break 2
44218  fi
44219done
44220  done
44221IFS=$as_save_IFS
44222
44223  ;;
44224esac
44225fi
44226BUILD_CXX=$ac_cv_path_BUILD_CXX
44227if test -n "$BUILD_CXX"; then
44228  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_CXX" >&5
44229$as_echo "$BUILD_CXX" >&6; }
44230else
44231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44232$as_echo "no" >&6; }
44233fi
44234
44235
44236          if test "x$BUILD_CXX" = x; then
44237            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44238          fi
44239        else
44240          # Otherwise we believe it is a complete path. Use it as it is.
44241          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_CXX=$tool_specified" >&5
44242$as_echo "$as_me: Will use user supplied tool BUILD_CXX=$tool_specified" >&6;}
44243          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_CXX" >&5
44244$as_echo_n "checking for BUILD_CXX... " >&6; }
44245          if test ! -x "$tool_specified"; then
44246            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44247$as_echo "not found" >&6; }
44248            as_fn_error $? "User supplied tool BUILD_CXX=$tool_specified does not exist or is not executable" "$LINENO" 5
44249          fi
44250          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44251$as_echo "$tool_specified" >&6; }
44252        fi
44253      fi
44254    fi
44255
44256  fi
44257
44258
44259
44260  if test "x$BUILD_CXX" = x; then
44261    as_fn_error $? "Could not find required tool for BUILD_CXX" "$LINENO" 5
44262  fi
44263
44264
44265
44266  # Only process if variable expands to non-empty
44267
44268  if test "x$BUILD_CXX" != x; then
44269    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44270
44271  # First separate the path from the arguments. This will split at the first
44272  # space.
44273  complete="$BUILD_CXX"
44274  path="${complete%% *}"
44275  tmp="$complete EOL"
44276  arguments="${tmp#* }"
44277
44278  # Input might be given as Windows format, start by converting to
44279  # unix format.
44280  new_path=`$CYGPATH -u "$path"`
44281
44282  # Now try to locate executable using which
44283  new_path=`$WHICH "$new_path" 2> /dev/null`
44284  # bat and cmd files are not always considered executable in cygwin causing which
44285  # to not find them
44286  if test "x$new_path" = x \
44287      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44288      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44289    new_path=`$CYGPATH -u "$path"`
44290  fi
44291  if test "x$new_path" = x; then
44292    # Oops. Which didn't find the executable.
44293    # The splitting of arguments from the executable at a space might have been incorrect,
44294    # since paths with space are more likely in Windows. Give it another try with the whole
44295    # argument.
44296    path="$complete"
44297    arguments="EOL"
44298    new_path=`$CYGPATH -u "$path"`
44299    new_path=`$WHICH "$new_path" 2> /dev/null`
44300    # bat and cmd files are not always considered executable in cygwin causing which
44301    # to not find them
44302    if test "x$new_path" = x \
44303        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44304        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44305      new_path=`$CYGPATH -u "$path"`
44306    fi
44307    if test "x$new_path" = x; then
44308      # It's still not found. Now this is an unrecoverable error.
44309      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44310$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44311      has_space=`$ECHO "$complete" | $GREP " "`
44312      if test "x$has_space" != x; then
44313        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44314$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44315      fi
44316      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44317    fi
44318  fi
44319
44320  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44321  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44322  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44323  # "foo.exe" is OK but "foo" is an error.
44324  #
44325  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44326  # It is also a way to make sure we got the proper file name for the real test later on.
44327  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44328  if test "x$test_shortpath" = x; then
44329    # Short path failed, file does not exist as specified.
44330    # Try adding .exe or .cmd
44331    if test -f "${new_path}.exe"; then
44332      input_to_shortpath="${new_path}.exe"
44333    elif test -f "${new_path}.cmd"; then
44334      input_to_shortpath="${new_path}.cmd"
44335    else
44336      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&5
44337$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$new_path\", is invalid." >&6;}
44338      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44339$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44340      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44341    fi
44342  else
44343    input_to_shortpath="$new_path"
44344  fi
44345
44346  # Call helper function which possibly converts this using DOS-style short mode.
44347  # If so, the updated path is stored in $new_path.
44348  new_path="$input_to_shortpath"
44349
44350  input_path="$input_to_shortpath"
44351  # Check if we need to convert this using DOS-style short mode. If the path
44352  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44353  # take no chances and rewrite it.
44354  # Note: m4 eats our [], so we need to use [ and ] instead.
44355  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44356  if test "x$has_forbidden_chars" != x; then
44357    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44358    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44359    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44360    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44361      # Going to short mode and back again did indeed matter. Since short mode is
44362      # case insensitive, let's make it lowercase to improve readability.
44363      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44364      # Now convert it back to Unix-style (cygpath)
44365      input_path=`$CYGPATH -u "$shortmode_path"`
44366      new_path="$input_path"
44367    fi
44368  fi
44369
44370  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44371  if test "x$test_cygdrive_prefix" = x; then
44372    # As a simple fix, exclude /usr/bin since it's not a real path.
44373    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44374      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44375      # a path prefixed by /cygdrive for fixpath to work.
44376      new_path="$CYGWIN_ROOT_PATH$input_path"
44377    fi
44378  fi
44379
44380  # remove trailing .exe if any
44381  new_path="${new_path/%.exe/}"
44382
44383    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44384
44385  # First separate the path from the arguments. This will split at the first
44386  # space.
44387  complete="$BUILD_CXX"
44388  path="${complete%% *}"
44389  tmp="$complete EOL"
44390  arguments="${tmp#* }"
44391
44392  # Input might be given as Windows format, start by converting to
44393  # unix format.
44394  new_path="$path"
44395
44396  windows_path="$new_path"
44397  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44398    unix_path=`$CYGPATH -u "$windows_path"`
44399    new_path="$unix_path"
44400  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44401    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44402    new_path="$unix_path"
44403  fi
44404
44405
44406  # Now try to locate executable using which
44407  new_path=`$WHICH "$new_path" 2> /dev/null`
44408
44409  if test "x$new_path" = x; then
44410    # Oops. Which didn't find the executable.
44411    # The splitting of arguments from the executable at a space might have been incorrect,
44412    # since paths with space are more likely in Windows. Give it another try with the whole
44413    # argument.
44414    path="$complete"
44415    arguments="EOL"
44416    new_path="$path"
44417
44418  windows_path="$new_path"
44419  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44420    unix_path=`$CYGPATH -u "$windows_path"`
44421    new_path="$unix_path"
44422  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44423    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44424    new_path="$unix_path"
44425  fi
44426
44427
44428    new_path=`$WHICH "$new_path" 2> /dev/null`
44429    # bat and cmd files are not always considered executable in MSYS causing which
44430    # to not find them
44431    if test "x$new_path" = x \
44432        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44433        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44434      new_path="$path"
44435
44436  windows_path="$new_path"
44437  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44438    unix_path=`$CYGPATH -u "$windows_path"`
44439    new_path="$unix_path"
44440  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44441    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44442    new_path="$unix_path"
44443  fi
44444
44445    fi
44446
44447    if test "x$new_path" = x; then
44448      # It's still not found. Now this is an unrecoverable error.
44449      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44450$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44451      has_space=`$ECHO "$complete" | $GREP " "`
44452      if test "x$has_space" != x; then
44453        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44454$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44455      fi
44456      as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44457    fi
44458  fi
44459
44460  # Now new_path has a complete unix path to the binary
44461  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44462    # Keep paths in /bin as-is, but remove trailing .exe if any
44463    new_path="${new_path/%.exe/}"
44464    # Do not save /bin paths to all_fixpath_prefixes!
44465  else
44466    # Not in mixed or Windows style, start by that.
44467    new_path=`cmd //c echo $new_path`
44468
44469  input_path="$new_path"
44470  # Check if we need to convert this using DOS-style short mode. If the path
44471  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44472  # take no chances and rewrite it.
44473  # Note: m4 eats our [], so we need to use [ and ] instead.
44474  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44475  if test "x$has_forbidden_chars" != x; then
44476    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44477    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44478  fi
44479
44480    # Output is in $new_path
44481
44482  windows_path="$new_path"
44483  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44484    unix_path=`$CYGPATH -u "$windows_path"`
44485    new_path="$unix_path"
44486  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44487    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44488    new_path="$unix_path"
44489  fi
44490
44491    # remove trailing .exe if any
44492    new_path="${new_path/%.exe/}"
44493
44494    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44495    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44496  fi
44497
44498    else
44499      # We're on a unix platform. Hooray! :)
44500      # First separate the path from the arguments. This will split at the first
44501      # space.
44502      complete="$BUILD_CXX"
44503      path="${complete%% *}"
44504      tmp="$complete EOL"
44505      arguments="${tmp#* }"
44506
44507      # Cannot rely on the command "which" here since it doesn't always work.
44508      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44509      if test -z "$is_absolute_path"; then
44510        # Path to executable is not absolute. Find it.
44511        IFS_save="$IFS"
44512        IFS=:
44513        for p in $PATH; do
44514          if test -f "$p/$path" && test -x "$p/$path"; then
44515            new_path="$p/$path"
44516            break
44517          fi
44518        done
44519        IFS="$IFS_save"
44520      else
44521        # This is an absolute path, we can use it without further modifications.
44522        new_path="$path"
44523      fi
44524
44525      if test "x$new_path" = x; then
44526        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&5
44527$as_echo "$as_me: The path of BUILD_CXX, which resolves as \"$complete\", is not found." >&6;}
44528        has_space=`$ECHO "$complete" | $GREP " "`
44529        if test "x$has_space" != x; then
44530          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
44531$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
44532        fi
44533        as_fn_error $? "Cannot locate the the path of BUILD_CXX" "$LINENO" 5
44534      fi
44535    fi
44536
44537    # Now join together the path and the arguments once again
44538    if test "x$arguments" != xEOL; then
44539      new_complete="$new_path ${arguments% *}"
44540    else
44541      new_complete="$new_path"
44542    fi
44543
44544    if test "x$complete" != "x$new_complete"; then
44545      BUILD_CXX="$new_complete"
44546      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_CXX to \"$new_complete\"" >&5
44547$as_echo "$as_me: Rewriting BUILD_CXX to \"$new_complete\"" >&6;}
44548    fi
44549  fi
44550
44551
44552
44553  # Publish this variable in the help.
44554
44555
44556  if [ -z "${BUILD_NM+x}" ]; then
44557    # The variable is not set by user, try to locate tool using the code snippet
44558    for ac_prog in nm gcc-nm
44559do
44560  # Extract the first word of "$ac_prog", so it can be a program name with args.
44561set dummy $ac_prog; ac_word=$2
44562{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44563$as_echo_n "checking for $ac_word... " >&6; }
44564if ${ac_cv_path_BUILD_NM+:} false; then :
44565  $as_echo_n "(cached) " >&6
44566else
44567  case $BUILD_NM in
44568  [\\/]* | ?:[\\/]*)
44569  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44570  ;;
44571  *)
44572  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44573for as_dir in $PATH
44574do
44575  IFS=$as_save_IFS
44576  test -z "$as_dir" && as_dir=.
44577    for ac_exec_ext in '' $ac_executable_extensions; do
44578  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44579    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44580    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44581    break 2
44582  fi
44583done
44584  done
44585IFS=$as_save_IFS
44586
44587  ;;
44588esac
44589fi
44590BUILD_NM=$ac_cv_path_BUILD_NM
44591if test -n "$BUILD_NM"; then
44592  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44593$as_echo "$BUILD_NM" >&6; }
44594else
44595  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44596$as_echo "no" >&6; }
44597fi
44598
44599
44600  test -n "$BUILD_NM" && break
44601done
44602
44603  else
44604    # The variable is set, but is it from the command line or the environment?
44605
44606    # Try to remove the string !BUILD_NM! from our list.
44607    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_NM!/}
44608    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
44609      # If it failed, the variable was not from the command line. Ignore it,
44610      # but warn the user (except for BASH, which is always set by the calling BASH).
44611      if test "xBUILD_NM" != xBASH; then
44612        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&5
44613$as_echo "$as_me: WARNING: Ignoring value of BUILD_NM from the environment. Use command line variables instead." >&2;}
44614      fi
44615      # Try to locate tool using the code snippet
44616      for ac_prog in nm gcc-nm
44617do
44618  # Extract the first word of "$ac_prog", so it can be a program name with args.
44619set dummy $ac_prog; ac_word=$2
44620{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44621$as_echo_n "checking for $ac_word... " >&6; }
44622if ${ac_cv_path_BUILD_NM+:} false; then :
44623  $as_echo_n "(cached) " >&6
44624else
44625  case $BUILD_NM in
44626  [\\/]* | ?:[\\/]*)
44627  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44628  ;;
44629  *)
44630  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44631for as_dir in $PATH
44632do
44633  IFS=$as_save_IFS
44634  test -z "$as_dir" && as_dir=.
44635    for ac_exec_ext in '' $ac_executable_extensions; do
44636  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44637    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44638    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44639    break 2
44640  fi
44641done
44642  done
44643IFS=$as_save_IFS
44644
44645  ;;
44646esac
44647fi
44648BUILD_NM=$ac_cv_path_BUILD_NM
44649if test -n "$BUILD_NM"; then
44650  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44651$as_echo "$BUILD_NM" >&6; }
44652else
44653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44654$as_echo "no" >&6; }
44655fi
44656
44657
44658  test -n "$BUILD_NM" && break
44659done
44660
44661    else
44662      # If it succeeded, then it was overridden by the user. We will use it
44663      # for the tool.
44664
44665      # First remove it from the list of overridden variables, so we can test
44666      # for unknown variables in the end.
44667      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
44668
44669      # Check if we try to supply an empty value
44670      if test "x$BUILD_NM" = x; then
44671        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_NM= (no value)" >&5
44672$as_echo "$as_me: Setting user supplied tool BUILD_NM= (no value)" >&6;}
44673        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44674$as_echo_n "checking for BUILD_NM... " >&6; }
44675        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
44676$as_echo "disabled" >&6; }
44677      else
44678        # Check if the provided tool contains a complete path.
44679        tool_specified="$BUILD_NM"
44680        tool_basename="${tool_specified##*/}"
44681        if test "x$tool_basename" = "x$tool_specified"; then
44682          # A command without a complete path is provided, search $PATH.
44683          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_NM=$tool_basename" >&5
44684$as_echo "$as_me: Will search for user supplied tool BUILD_NM=$tool_basename" >&6;}
44685          # Extract the first word of "$tool_basename", so it can be a program name with args.
44686set dummy $tool_basename; ac_word=$2
44687{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
44688$as_echo_n "checking for $ac_word... " >&6; }
44689if ${ac_cv_path_BUILD_NM+:} false; then :
44690  $as_echo_n "(cached) " >&6
44691else
44692  case $BUILD_NM in
44693  [\\/]* | ?:[\\/]*)
44694  ac_cv_path_BUILD_NM="$BUILD_NM" # Let the user override the test with a path.
44695  ;;
44696  *)
44697  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
44698for as_dir in $PATH
44699do
44700  IFS=$as_save_IFS
44701  test -z "$as_dir" && as_dir=.
44702    for ac_exec_ext in '' $ac_executable_extensions; do
44703  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
44704    ac_cv_path_BUILD_NM="$as_dir/$ac_word$ac_exec_ext"
44705    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
44706    break 2
44707  fi
44708done
44709  done
44710IFS=$as_save_IFS
44711
44712  ;;
44713esac
44714fi
44715BUILD_NM=$ac_cv_path_BUILD_NM
44716if test -n "$BUILD_NM"; then
44717  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_NM" >&5
44718$as_echo "$BUILD_NM" >&6; }
44719else
44720  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
44721$as_echo "no" >&6; }
44722fi
44723
44724
44725          if test "x$BUILD_NM" = x; then
44726            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
44727          fi
44728        else
44729          # Otherwise we believe it is a complete path. Use it as it is.
44730          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_NM=$tool_specified" >&5
44731$as_echo "$as_me: Will use user supplied tool BUILD_NM=$tool_specified" >&6;}
44732          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_NM" >&5
44733$as_echo_n "checking for BUILD_NM... " >&6; }
44734          if test ! -x "$tool_specified"; then
44735            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
44736$as_echo "not found" >&6; }
44737            as_fn_error $? "User supplied tool BUILD_NM=$tool_specified does not exist or is not executable" "$LINENO" 5
44738          fi
44739          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
44740$as_echo "$tool_specified" >&6; }
44741        fi
44742      fi
44743    fi
44744
44745  fi
44746
44747
44748
44749  # Only process if variable expands to non-empty
44750
44751  if test "x$BUILD_NM" != x; then
44752    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44753
44754  # First separate the path from the arguments. This will split at the first
44755  # space.
44756  complete="$BUILD_NM"
44757  path="${complete%% *}"
44758  tmp="$complete EOL"
44759  arguments="${tmp#* }"
44760
44761  # Input might be given as Windows format, start by converting to
44762  # unix format.
44763  new_path=`$CYGPATH -u "$path"`
44764
44765  # Now try to locate executable using which
44766  new_path=`$WHICH "$new_path" 2> /dev/null`
44767  # bat and cmd files are not always considered executable in cygwin causing which
44768  # to not find them
44769  if test "x$new_path" = x \
44770      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44771      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44772    new_path=`$CYGPATH -u "$path"`
44773  fi
44774  if test "x$new_path" = x; then
44775    # Oops. Which didn't find the executable.
44776    # The splitting of arguments from the executable at a space might have been incorrect,
44777    # since paths with space are more likely in Windows. Give it another try with the whole
44778    # argument.
44779    path="$complete"
44780    arguments="EOL"
44781    new_path=`$CYGPATH -u "$path"`
44782    new_path=`$WHICH "$new_path" 2> /dev/null`
44783    # bat and cmd files are not always considered executable in cygwin causing which
44784    # to not find them
44785    if test "x$new_path" = x \
44786        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44787        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44788      new_path=`$CYGPATH -u "$path"`
44789    fi
44790    if test "x$new_path" = x; then
44791      # It's still not found. Now this is an unrecoverable error.
44792      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44793$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44794      has_space=`$ECHO "$complete" | $GREP " "`
44795      if test "x$has_space" != x; then
44796        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44797$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44798      fi
44799      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44800    fi
44801  fi
44802
44803  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
44804  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
44805  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
44806  # "foo.exe" is OK but "foo" is an error.
44807  #
44808  # This test is therefore slightly more accurate than "test -f" to check for file presence.
44809  # It is also a way to make sure we got the proper file name for the real test later on.
44810  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
44811  if test "x$test_shortpath" = x; then
44812    # Short path failed, file does not exist as specified.
44813    # Try adding .exe or .cmd
44814    if test -f "${new_path}.exe"; then
44815      input_to_shortpath="${new_path}.exe"
44816    elif test -f "${new_path}.cmd"; then
44817      input_to_shortpath="${new_path}.cmd"
44818    else
44819      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&5
44820$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$new_path\", is invalid." >&6;}
44821      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
44822$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
44823      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44824    fi
44825  else
44826    input_to_shortpath="$new_path"
44827  fi
44828
44829  # Call helper function which possibly converts this using DOS-style short mode.
44830  # If so, the updated path is stored in $new_path.
44831  new_path="$input_to_shortpath"
44832
44833  input_path="$input_to_shortpath"
44834  # Check if we need to convert this using DOS-style short mode. If the path
44835  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44836  # take no chances and rewrite it.
44837  # Note: m4 eats our [], so we need to use [ and ] instead.
44838  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
44839  if test "x$has_forbidden_chars" != x; then
44840    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44841    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
44842    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
44843    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
44844      # Going to short mode and back again did indeed matter. Since short mode is
44845      # case insensitive, let's make it lowercase to improve readability.
44846      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44847      # Now convert it back to Unix-style (cygpath)
44848      input_path=`$CYGPATH -u "$shortmode_path"`
44849      new_path="$input_path"
44850    fi
44851  fi
44852
44853  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
44854  if test "x$test_cygdrive_prefix" = x; then
44855    # As a simple fix, exclude /usr/bin since it's not a real path.
44856    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
44857      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
44858      # a path prefixed by /cygdrive for fixpath to work.
44859      new_path="$CYGWIN_ROOT_PATH$input_path"
44860    fi
44861  fi
44862
44863  # remove trailing .exe if any
44864  new_path="${new_path/%.exe/}"
44865
44866    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44867
44868  # First separate the path from the arguments. This will split at the first
44869  # space.
44870  complete="$BUILD_NM"
44871  path="${complete%% *}"
44872  tmp="$complete EOL"
44873  arguments="${tmp#* }"
44874
44875  # Input might be given as Windows format, start by converting to
44876  # unix format.
44877  new_path="$path"
44878
44879  windows_path="$new_path"
44880  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44881    unix_path=`$CYGPATH -u "$windows_path"`
44882    new_path="$unix_path"
44883  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44884    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44885    new_path="$unix_path"
44886  fi
44887
44888
44889  # Now try to locate executable using which
44890  new_path=`$WHICH "$new_path" 2> /dev/null`
44891
44892  if test "x$new_path" = x; then
44893    # Oops. Which didn't find the executable.
44894    # The splitting of arguments from the executable at a space might have been incorrect,
44895    # since paths with space are more likely in Windows. Give it another try with the whole
44896    # argument.
44897    path="$complete"
44898    arguments="EOL"
44899    new_path="$path"
44900
44901  windows_path="$new_path"
44902  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44903    unix_path=`$CYGPATH -u "$windows_path"`
44904    new_path="$unix_path"
44905  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44906    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44907    new_path="$unix_path"
44908  fi
44909
44910
44911    new_path=`$WHICH "$new_path" 2> /dev/null`
44912    # bat and cmd files are not always considered executable in MSYS causing which
44913    # to not find them
44914    if test "x$new_path" = x \
44915        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
44916        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
44917      new_path="$path"
44918
44919  windows_path="$new_path"
44920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44921    unix_path=`$CYGPATH -u "$windows_path"`
44922    new_path="$unix_path"
44923  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44924    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44925    new_path="$unix_path"
44926  fi
44927
44928    fi
44929
44930    if test "x$new_path" = x; then
44931      # It's still not found. Now this is an unrecoverable error.
44932      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
44933$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
44934      has_space=`$ECHO "$complete" | $GREP " "`
44935      if test "x$has_space" != x; then
44936        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
44937$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
44938      fi
44939      as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
44940    fi
44941  fi
44942
44943  # Now new_path has a complete unix path to the binary
44944  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
44945    # Keep paths in /bin as-is, but remove trailing .exe if any
44946    new_path="${new_path/%.exe/}"
44947    # Do not save /bin paths to all_fixpath_prefixes!
44948  else
44949    # Not in mixed or Windows style, start by that.
44950    new_path=`cmd //c echo $new_path`
44951
44952  input_path="$new_path"
44953  # Check if we need to convert this using DOS-style short mode. If the path
44954  # contains just simple characters, use it. Otherwise (spaces, weird characters),
44955  # take no chances and rewrite it.
44956  # Note: m4 eats our [], so we need to use [ and ] instead.
44957  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
44958  if test "x$has_forbidden_chars" != x; then
44959    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
44960    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
44961  fi
44962
44963    # Output is in $new_path
44964
44965  windows_path="$new_path"
44966  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
44967    unix_path=`$CYGPATH -u "$windows_path"`
44968    new_path="$unix_path"
44969  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
44970    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
44971    new_path="$unix_path"
44972  fi
44973
44974    # remove trailing .exe if any
44975    new_path="${new_path/%.exe/}"
44976
44977    # Save the first 10 bytes of this path to the storage, so fixpath can work.
44978    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
44979  fi
44980
44981    else
44982      # We're on a unix platform. Hooray! :)
44983      # First separate the path from the arguments. This will split at the first
44984      # space.
44985      complete="$BUILD_NM"
44986      path="${complete%% *}"
44987      tmp="$complete EOL"
44988      arguments="${tmp#* }"
44989
44990      # Cannot rely on the command "which" here since it doesn't always work.
44991      is_absolute_path=`$ECHO "$path" | $GREP ^/`
44992      if test -z "$is_absolute_path"; then
44993        # Path to executable is not absolute. Find it.
44994        IFS_save="$IFS"
44995        IFS=:
44996        for p in $PATH; do
44997          if test -f "$p/$path" && test -x "$p/$path"; then
44998            new_path="$p/$path"
44999            break
45000          fi
45001        done
45002        IFS="$IFS_save"
45003      else
45004        # This is an absolute path, we can use it without further modifications.
45005        new_path="$path"
45006      fi
45007
45008      if test "x$new_path" = x; then
45009        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&5
45010$as_echo "$as_me: The path of BUILD_NM, which resolves as \"$complete\", is not found." >&6;}
45011        has_space=`$ECHO "$complete" | $GREP " "`
45012        if test "x$has_space" != x; then
45013          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45014$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45015        fi
45016        as_fn_error $? "Cannot locate the the path of BUILD_NM" "$LINENO" 5
45017      fi
45018    fi
45019
45020    # Now join together the path and the arguments once again
45021    if test "x$arguments" != xEOL; then
45022      new_complete="$new_path ${arguments% *}"
45023    else
45024      new_complete="$new_path"
45025    fi
45026
45027    if test "x$complete" != "x$new_complete"; then
45028      BUILD_NM="$new_complete"
45029      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_NM to \"$new_complete\"" >&5
45030$as_echo "$as_me: Rewriting BUILD_NM to \"$new_complete\"" >&6;}
45031    fi
45032  fi
45033
45034
45035
45036  # Publish this variable in the help.
45037
45038
45039  if [ -z "${BUILD_AR+x}" ]; then
45040    # The variable is not set by user, try to locate tool using the code snippet
45041    for ac_prog in ar gcc-ar
45042do
45043  # Extract the first word of "$ac_prog", so it can be a program name with args.
45044set dummy $ac_prog; ac_word=$2
45045{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45046$as_echo_n "checking for $ac_word... " >&6; }
45047if ${ac_cv_path_BUILD_AR+:} false; then :
45048  $as_echo_n "(cached) " >&6
45049else
45050  case $BUILD_AR in
45051  [\\/]* | ?:[\\/]*)
45052  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45053  ;;
45054  *)
45055  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45056for as_dir in $PATH
45057do
45058  IFS=$as_save_IFS
45059  test -z "$as_dir" && as_dir=.
45060    for ac_exec_ext in '' $ac_executable_extensions; do
45061  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45062    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45063    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45064    break 2
45065  fi
45066done
45067  done
45068IFS=$as_save_IFS
45069
45070  ;;
45071esac
45072fi
45073BUILD_AR=$ac_cv_path_BUILD_AR
45074if test -n "$BUILD_AR"; then
45075  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45076$as_echo "$BUILD_AR" >&6; }
45077else
45078  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45079$as_echo "no" >&6; }
45080fi
45081
45082
45083  test -n "$BUILD_AR" && break
45084done
45085
45086  else
45087    # The variable is set, but is it from the command line or the environment?
45088
45089    # Try to remove the string !BUILD_AR! from our list.
45090    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_AR!/}
45091    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45092      # If it failed, the variable was not from the command line. Ignore it,
45093      # but warn the user (except for BASH, which is always set by the calling BASH).
45094      if test "xBUILD_AR" != xBASH; then
45095        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&5
45096$as_echo "$as_me: WARNING: Ignoring value of BUILD_AR from the environment. Use command line variables instead." >&2;}
45097      fi
45098      # Try to locate tool using the code snippet
45099      for ac_prog in ar gcc-ar
45100do
45101  # Extract the first word of "$ac_prog", so it can be a program name with args.
45102set dummy $ac_prog; ac_word=$2
45103{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45104$as_echo_n "checking for $ac_word... " >&6; }
45105if ${ac_cv_path_BUILD_AR+:} false; then :
45106  $as_echo_n "(cached) " >&6
45107else
45108  case $BUILD_AR in
45109  [\\/]* | ?:[\\/]*)
45110  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45111  ;;
45112  *)
45113  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45114for as_dir in $PATH
45115do
45116  IFS=$as_save_IFS
45117  test -z "$as_dir" && as_dir=.
45118    for ac_exec_ext in '' $ac_executable_extensions; do
45119  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45120    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45121    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45122    break 2
45123  fi
45124done
45125  done
45126IFS=$as_save_IFS
45127
45128  ;;
45129esac
45130fi
45131BUILD_AR=$ac_cv_path_BUILD_AR
45132if test -n "$BUILD_AR"; then
45133  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45134$as_echo "$BUILD_AR" >&6; }
45135else
45136  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45137$as_echo "no" >&6; }
45138fi
45139
45140
45141  test -n "$BUILD_AR" && break
45142done
45143
45144    else
45145      # If it succeeded, then it was overridden by the user. We will use it
45146      # for the tool.
45147
45148      # First remove it from the list of overridden variables, so we can test
45149      # for unknown variables in the end.
45150      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45151
45152      # Check if we try to supply an empty value
45153      if test "x$BUILD_AR" = x; then
45154        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_AR= (no value)" >&5
45155$as_echo "$as_me: Setting user supplied tool BUILD_AR= (no value)" >&6;}
45156        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45157$as_echo_n "checking for BUILD_AR... " >&6; }
45158        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45159$as_echo "disabled" >&6; }
45160      else
45161        # Check if the provided tool contains a complete path.
45162        tool_specified="$BUILD_AR"
45163        tool_basename="${tool_specified##*/}"
45164        if test "x$tool_basename" = "x$tool_specified"; then
45165          # A command without a complete path is provided, search $PATH.
45166          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_AR=$tool_basename" >&5
45167$as_echo "$as_me: Will search for user supplied tool BUILD_AR=$tool_basename" >&6;}
45168          # Extract the first word of "$tool_basename", so it can be a program name with args.
45169set dummy $tool_basename; ac_word=$2
45170{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45171$as_echo_n "checking for $ac_word... " >&6; }
45172if ${ac_cv_path_BUILD_AR+:} false; then :
45173  $as_echo_n "(cached) " >&6
45174else
45175  case $BUILD_AR in
45176  [\\/]* | ?:[\\/]*)
45177  ac_cv_path_BUILD_AR="$BUILD_AR" # Let the user override the test with a path.
45178  ;;
45179  *)
45180  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45181for as_dir in $PATH
45182do
45183  IFS=$as_save_IFS
45184  test -z "$as_dir" && as_dir=.
45185    for ac_exec_ext in '' $ac_executable_extensions; do
45186  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45187    ac_cv_path_BUILD_AR="$as_dir/$ac_word$ac_exec_ext"
45188    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45189    break 2
45190  fi
45191done
45192  done
45193IFS=$as_save_IFS
45194
45195  ;;
45196esac
45197fi
45198BUILD_AR=$ac_cv_path_BUILD_AR
45199if test -n "$BUILD_AR"; then
45200  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_AR" >&5
45201$as_echo "$BUILD_AR" >&6; }
45202else
45203  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45204$as_echo "no" >&6; }
45205fi
45206
45207
45208          if test "x$BUILD_AR" = x; then
45209            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45210          fi
45211        else
45212          # Otherwise we believe it is a complete path. Use it as it is.
45213          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_AR=$tool_specified" >&5
45214$as_echo "$as_me: Will use user supplied tool BUILD_AR=$tool_specified" >&6;}
45215          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_AR" >&5
45216$as_echo_n "checking for BUILD_AR... " >&6; }
45217          if test ! -x "$tool_specified"; then
45218            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45219$as_echo "not found" >&6; }
45220            as_fn_error $? "User supplied tool BUILD_AR=$tool_specified does not exist or is not executable" "$LINENO" 5
45221          fi
45222          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45223$as_echo "$tool_specified" >&6; }
45224        fi
45225      fi
45226    fi
45227
45228  fi
45229
45230
45231
45232  # Only process if variable expands to non-empty
45233
45234  if test "x$BUILD_AR" != x; then
45235    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45236
45237  # First separate the path from the arguments. This will split at the first
45238  # space.
45239  complete="$BUILD_AR"
45240  path="${complete%% *}"
45241  tmp="$complete EOL"
45242  arguments="${tmp#* }"
45243
45244  # Input might be given as Windows format, start by converting to
45245  # unix format.
45246  new_path=`$CYGPATH -u "$path"`
45247
45248  # Now try to locate executable using which
45249  new_path=`$WHICH "$new_path" 2> /dev/null`
45250  # bat and cmd files are not always considered executable in cygwin causing which
45251  # to not find them
45252  if test "x$new_path" = x \
45253      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45254      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45255    new_path=`$CYGPATH -u "$path"`
45256  fi
45257  if test "x$new_path" = x; then
45258    # Oops. Which didn't find the executable.
45259    # The splitting of arguments from the executable at a space might have been incorrect,
45260    # since paths with space are more likely in Windows. Give it another try with the whole
45261    # argument.
45262    path="$complete"
45263    arguments="EOL"
45264    new_path=`$CYGPATH -u "$path"`
45265    new_path=`$WHICH "$new_path" 2> /dev/null`
45266    # bat and cmd files are not always considered executable in cygwin causing which
45267    # to not find them
45268    if test "x$new_path" = x \
45269        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45270        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45271      new_path=`$CYGPATH -u "$path"`
45272    fi
45273    if test "x$new_path" = x; then
45274      # It's still not found. Now this is an unrecoverable error.
45275      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45276$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45277      has_space=`$ECHO "$complete" | $GREP " "`
45278      if test "x$has_space" != x; then
45279        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45280$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45281      fi
45282      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45283    fi
45284  fi
45285
45286  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45287  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45288  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45289  # "foo.exe" is OK but "foo" is an error.
45290  #
45291  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45292  # It is also a way to make sure we got the proper file name for the real test later on.
45293  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45294  if test "x$test_shortpath" = x; then
45295    # Short path failed, file does not exist as specified.
45296    # Try adding .exe or .cmd
45297    if test -f "${new_path}.exe"; then
45298      input_to_shortpath="${new_path}.exe"
45299    elif test -f "${new_path}.cmd"; then
45300      input_to_shortpath="${new_path}.cmd"
45301    else
45302      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&5
45303$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$new_path\", is invalid." >&6;}
45304      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45305$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45306      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45307    fi
45308  else
45309    input_to_shortpath="$new_path"
45310  fi
45311
45312  # Call helper function which possibly converts this using DOS-style short mode.
45313  # If so, the updated path is stored in $new_path.
45314  new_path="$input_to_shortpath"
45315
45316  input_path="$input_to_shortpath"
45317  # Check if we need to convert this using DOS-style short mode. If the path
45318  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45319  # take no chances and rewrite it.
45320  # Note: m4 eats our [], so we need to use [ and ] instead.
45321  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45322  if test "x$has_forbidden_chars" != x; then
45323    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45324    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45325    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45326    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45327      # Going to short mode and back again did indeed matter. Since short mode is
45328      # case insensitive, let's make it lowercase to improve readability.
45329      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45330      # Now convert it back to Unix-style (cygpath)
45331      input_path=`$CYGPATH -u "$shortmode_path"`
45332      new_path="$input_path"
45333    fi
45334  fi
45335
45336  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45337  if test "x$test_cygdrive_prefix" = x; then
45338    # As a simple fix, exclude /usr/bin since it's not a real path.
45339    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45340      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45341      # a path prefixed by /cygdrive for fixpath to work.
45342      new_path="$CYGWIN_ROOT_PATH$input_path"
45343    fi
45344  fi
45345
45346  # remove trailing .exe if any
45347  new_path="${new_path/%.exe/}"
45348
45349    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45350
45351  # First separate the path from the arguments. This will split at the first
45352  # space.
45353  complete="$BUILD_AR"
45354  path="${complete%% *}"
45355  tmp="$complete EOL"
45356  arguments="${tmp#* }"
45357
45358  # Input might be given as Windows format, start by converting to
45359  # unix format.
45360  new_path="$path"
45361
45362  windows_path="$new_path"
45363  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45364    unix_path=`$CYGPATH -u "$windows_path"`
45365    new_path="$unix_path"
45366  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45367    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45368    new_path="$unix_path"
45369  fi
45370
45371
45372  # Now try to locate executable using which
45373  new_path=`$WHICH "$new_path" 2> /dev/null`
45374
45375  if test "x$new_path" = x; then
45376    # Oops. Which didn't find the executable.
45377    # The splitting of arguments from the executable at a space might have been incorrect,
45378    # since paths with space are more likely in Windows. Give it another try with the whole
45379    # argument.
45380    path="$complete"
45381    arguments="EOL"
45382    new_path="$path"
45383
45384  windows_path="$new_path"
45385  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45386    unix_path=`$CYGPATH -u "$windows_path"`
45387    new_path="$unix_path"
45388  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45389    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45390    new_path="$unix_path"
45391  fi
45392
45393
45394    new_path=`$WHICH "$new_path" 2> /dev/null`
45395    # bat and cmd files are not always considered executable in MSYS causing which
45396    # to not find them
45397    if test "x$new_path" = x \
45398        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45399        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45400      new_path="$path"
45401
45402  windows_path="$new_path"
45403  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45404    unix_path=`$CYGPATH -u "$windows_path"`
45405    new_path="$unix_path"
45406  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45407    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45408    new_path="$unix_path"
45409  fi
45410
45411    fi
45412
45413    if test "x$new_path" = x; then
45414      # It's still not found. Now this is an unrecoverable error.
45415      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45416$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45417      has_space=`$ECHO "$complete" | $GREP " "`
45418      if test "x$has_space" != x; then
45419        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45420$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45421      fi
45422      as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45423    fi
45424  fi
45425
45426  # Now new_path has a complete unix path to the binary
45427  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45428    # Keep paths in /bin as-is, but remove trailing .exe if any
45429    new_path="${new_path/%.exe/}"
45430    # Do not save /bin paths to all_fixpath_prefixes!
45431  else
45432    # Not in mixed or Windows style, start by that.
45433    new_path=`cmd //c echo $new_path`
45434
45435  input_path="$new_path"
45436  # Check if we need to convert this using DOS-style short mode. If the path
45437  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45438  # take no chances and rewrite it.
45439  # Note: m4 eats our [], so we need to use [ and ] instead.
45440  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45441  if test "x$has_forbidden_chars" != x; then
45442    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45443    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45444  fi
45445
45446    # Output is in $new_path
45447
45448  windows_path="$new_path"
45449  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45450    unix_path=`$CYGPATH -u "$windows_path"`
45451    new_path="$unix_path"
45452  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45453    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45454    new_path="$unix_path"
45455  fi
45456
45457    # remove trailing .exe if any
45458    new_path="${new_path/%.exe/}"
45459
45460    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45461    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45462  fi
45463
45464    else
45465      # We're on a unix platform. Hooray! :)
45466      # First separate the path from the arguments. This will split at the first
45467      # space.
45468      complete="$BUILD_AR"
45469      path="${complete%% *}"
45470      tmp="$complete EOL"
45471      arguments="${tmp#* }"
45472
45473      # Cannot rely on the command "which" here since it doesn't always work.
45474      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45475      if test -z "$is_absolute_path"; then
45476        # Path to executable is not absolute. Find it.
45477        IFS_save="$IFS"
45478        IFS=:
45479        for p in $PATH; do
45480          if test -f "$p/$path" && test -x "$p/$path"; then
45481            new_path="$p/$path"
45482            break
45483          fi
45484        done
45485        IFS="$IFS_save"
45486      else
45487        # This is an absolute path, we can use it without further modifications.
45488        new_path="$path"
45489      fi
45490
45491      if test "x$new_path" = x; then
45492        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&5
45493$as_echo "$as_me: The path of BUILD_AR, which resolves as \"$complete\", is not found." >&6;}
45494        has_space=`$ECHO "$complete" | $GREP " "`
45495        if test "x$has_space" != x; then
45496          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45497$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45498        fi
45499        as_fn_error $? "Cannot locate the the path of BUILD_AR" "$LINENO" 5
45500      fi
45501    fi
45502
45503    # Now join together the path and the arguments once again
45504    if test "x$arguments" != xEOL; then
45505      new_complete="$new_path ${arguments% *}"
45506    else
45507      new_complete="$new_path"
45508    fi
45509
45510    if test "x$complete" != "x$new_complete"; then
45511      BUILD_AR="$new_complete"
45512      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_AR to \"$new_complete\"" >&5
45513$as_echo "$as_me: Rewriting BUILD_AR to \"$new_complete\"" >&6;}
45514    fi
45515  fi
45516
45517
45518
45519  # Publish this variable in the help.
45520
45521
45522  if [ -z "${BUILD_OBJCOPY+x}" ]; then
45523    # The variable is not set by user, try to locate tool using the code snippet
45524    for ac_prog in objcopy
45525do
45526  # Extract the first word of "$ac_prog", so it can be a program name with args.
45527set dummy $ac_prog; ac_word=$2
45528{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45529$as_echo_n "checking for $ac_word... " >&6; }
45530if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45531  $as_echo_n "(cached) " >&6
45532else
45533  case $BUILD_OBJCOPY in
45534  [\\/]* | ?:[\\/]*)
45535  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45536  ;;
45537  *)
45538  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45539for as_dir in $PATH
45540do
45541  IFS=$as_save_IFS
45542  test -z "$as_dir" && as_dir=.
45543    for ac_exec_ext in '' $ac_executable_extensions; do
45544  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45545    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45546    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45547    break 2
45548  fi
45549done
45550  done
45551IFS=$as_save_IFS
45552
45553  ;;
45554esac
45555fi
45556BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45557if test -n "$BUILD_OBJCOPY"; then
45558  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45559$as_echo "$BUILD_OBJCOPY" >&6; }
45560else
45561  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45562$as_echo "no" >&6; }
45563fi
45564
45565
45566  test -n "$BUILD_OBJCOPY" && break
45567done
45568
45569  else
45570    # The variable is set, but is it from the command line or the environment?
45571
45572    # Try to remove the string !BUILD_OBJCOPY! from our list.
45573    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_OBJCOPY!/}
45574    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
45575      # If it failed, the variable was not from the command line. Ignore it,
45576      # but warn the user (except for BASH, which is always set by the calling BASH).
45577      if test "xBUILD_OBJCOPY" != xBASH; then
45578        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&5
45579$as_echo "$as_me: WARNING: Ignoring value of BUILD_OBJCOPY from the environment. Use command line variables instead." >&2;}
45580      fi
45581      # Try to locate tool using the code snippet
45582      for ac_prog in objcopy
45583do
45584  # Extract the first word of "$ac_prog", so it can be a program name with args.
45585set dummy $ac_prog; ac_word=$2
45586{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45587$as_echo_n "checking for $ac_word... " >&6; }
45588if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45589  $as_echo_n "(cached) " >&6
45590else
45591  case $BUILD_OBJCOPY in
45592  [\\/]* | ?:[\\/]*)
45593  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45594  ;;
45595  *)
45596  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45597for as_dir in $PATH
45598do
45599  IFS=$as_save_IFS
45600  test -z "$as_dir" && as_dir=.
45601    for ac_exec_ext in '' $ac_executable_extensions; do
45602  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45603    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45604    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45605    break 2
45606  fi
45607done
45608  done
45609IFS=$as_save_IFS
45610
45611  ;;
45612esac
45613fi
45614BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45615if test -n "$BUILD_OBJCOPY"; then
45616  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45617$as_echo "$BUILD_OBJCOPY" >&6; }
45618else
45619  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45620$as_echo "no" >&6; }
45621fi
45622
45623
45624  test -n "$BUILD_OBJCOPY" && break
45625done
45626
45627    else
45628      # If it succeeded, then it was overridden by the user. We will use it
45629      # for the tool.
45630
45631      # First remove it from the list of overridden variables, so we can test
45632      # for unknown variables in the end.
45633      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
45634
45635      # Check if we try to supply an empty value
45636      if test "x$BUILD_OBJCOPY" = x; then
45637        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&5
45638$as_echo "$as_me: Setting user supplied tool BUILD_OBJCOPY= (no value)" >&6;}
45639        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45640$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45641        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
45642$as_echo "disabled" >&6; }
45643      else
45644        # Check if the provided tool contains a complete path.
45645        tool_specified="$BUILD_OBJCOPY"
45646        tool_basename="${tool_specified##*/}"
45647        if test "x$tool_basename" = "x$tool_specified"; then
45648          # A command without a complete path is provided, search $PATH.
45649          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&5
45650$as_echo "$as_me: Will search for user supplied tool BUILD_OBJCOPY=$tool_basename" >&6;}
45651          # Extract the first word of "$tool_basename", so it can be a program name with args.
45652set dummy $tool_basename; ac_word=$2
45653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
45654$as_echo_n "checking for $ac_word... " >&6; }
45655if ${ac_cv_path_BUILD_OBJCOPY+:} false; then :
45656  $as_echo_n "(cached) " >&6
45657else
45658  case $BUILD_OBJCOPY in
45659  [\\/]* | ?:[\\/]*)
45660  ac_cv_path_BUILD_OBJCOPY="$BUILD_OBJCOPY" # Let the user override the test with a path.
45661  ;;
45662  *)
45663  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
45664for as_dir in $PATH
45665do
45666  IFS=$as_save_IFS
45667  test -z "$as_dir" && as_dir=.
45668    for ac_exec_ext in '' $ac_executable_extensions; do
45669  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
45670    ac_cv_path_BUILD_OBJCOPY="$as_dir/$ac_word$ac_exec_ext"
45671    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
45672    break 2
45673  fi
45674done
45675  done
45676IFS=$as_save_IFS
45677
45678  ;;
45679esac
45680fi
45681BUILD_OBJCOPY=$ac_cv_path_BUILD_OBJCOPY
45682if test -n "$BUILD_OBJCOPY"; then
45683  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_OBJCOPY" >&5
45684$as_echo "$BUILD_OBJCOPY" >&6; }
45685else
45686  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
45687$as_echo "no" >&6; }
45688fi
45689
45690
45691          if test "x$BUILD_OBJCOPY" = x; then
45692            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
45693          fi
45694        else
45695          # Otherwise we believe it is a complete path. Use it as it is.
45696          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&5
45697$as_echo "$as_me: Will use user supplied tool BUILD_OBJCOPY=$tool_specified" >&6;}
45698          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_OBJCOPY" >&5
45699$as_echo_n "checking for BUILD_OBJCOPY... " >&6; }
45700          if test ! -x "$tool_specified"; then
45701            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
45702$as_echo "not found" >&6; }
45703            as_fn_error $? "User supplied tool BUILD_OBJCOPY=$tool_specified does not exist or is not executable" "$LINENO" 5
45704          fi
45705          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
45706$as_echo "$tool_specified" >&6; }
45707        fi
45708      fi
45709    fi
45710
45711  fi
45712
45713
45714
45715  # Only process if variable expands to non-empty
45716
45717  if test "x$BUILD_OBJCOPY" != x; then
45718    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45719
45720  # First separate the path from the arguments. This will split at the first
45721  # space.
45722  complete="$BUILD_OBJCOPY"
45723  path="${complete%% *}"
45724  tmp="$complete EOL"
45725  arguments="${tmp#* }"
45726
45727  # Input might be given as Windows format, start by converting to
45728  # unix format.
45729  new_path=`$CYGPATH -u "$path"`
45730
45731  # Now try to locate executable using which
45732  new_path=`$WHICH "$new_path" 2> /dev/null`
45733  # bat and cmd files are not always considered executable in cygwin causing which
45734  # to not find them
45735  if test "x$new_path" = x \
45736      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45737      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45738    new_path=`$CYGPATH -u "$path"`
45739  fi
45740  if test "x$new_path" = x; then
45741    # Oops. Which didn't find the executable.
45742    # The splitting of arguments from the executable at a space might have been incorrect,
45743    # since paths with space are more likely in Windows. Give it another try with the whole
45744    # argument.
45745    path="$complete"
45746    arguments="EOL"
45747    new_path=`$CYGPATH -u "$path"`
45748    new_path=`$WHICH "$new_path" 2> /dev/null`
45749    # bat and cmd files are not always considered executable in cygwin causing which
45750    # to not find them
45751    if test "x$new_path" = x \
45752        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45753        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45754      new_path=`$CYGPATH -u "$path"`
45755    fi
45756    if test "x$new_path" = x; then
45757      # It's still not found. Now this is an unrecoverable error.
45758      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45759$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45760      has_space=`$ECHO "$complete" | $GREP " "`
45761      if test "x$has_space" != x; then
45762        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45763$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45764      fi
45765      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45766    fi
45767  fi
45768
45769  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
45770  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
45771  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
45772  # "foo.exe" is OK but "foo" is an error.
45773  #
45774  # This test is therefore slightly more accurate than "test -f" to check for file presence.
45775  # It is also a way to make sure we got the proper file name for the real test later on.
45776  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
45777  if test "x$test_shortpath" = x; then
45778    # Short path failed, file does not exist as specified.
45779    # Try adding .exe or .cmd
45780    if test -f "${new_path}.exe"; then
45781      input_to_shortpath="${new_path}.exe"
45782    elif test -f "${new_path}.cmd"; then
45783      input_to_shortpath="${new_path}.cmd"
45784    else
45785      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&5
45786$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$new_path\", is invalid." >&6;}
45787      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
45788$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
45789      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45790    fi
45791  else
45792    input_to_shortpath="$new_path"
45793  fi
45794
45795  # Call helper function which possibly converts this using DOS-style short mode.
45796  # If so, the updated path is stored in $new_path.
45797  new_path="$input_to_shortpath"
45798
45799  input_path="$input_to_shortpath"
45800  # Check if we need to convert this using DOS-style short mode. If the path
45801  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45802  # take no chances and rewrite it.
45803  # Note: m4 eats our [], so we need to use [ and ] instead.
45804  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
45805  if test "x$has_forbidden_chars" != x; then
45806    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45807    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
45808    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
45809    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
45810      # Going to short mode and back again did indeed matter. Since short mode is
45811      # case insensitive, let's make it lowercase to improve readability.
45812      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45813      # Now convert it back to Unix-style (cygpath)
45814      input_path=`$CYGPATH -u "$shortmode_path"`
45815      new_path="$input_path"
45816    fi
45817  fi
45818
45819  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
45820  if test "x$test_cygdrive_prefix" = x; then
45821    # As a simple fix, exclude /usr/bin since it's not a real path.
45822    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
45823      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
45824      # a path prefixed by /cygdrive for fixpath to work.
45825      new_path="$CYGWIN_ROOT_PATH$input_path"
45826    fi
45827  fi
45828
45829  # remove trailing .exe if any
45830  new_path="${new_path/%.exe/}"
45831
45832    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45833
45834  # First separate the path from the arguments. This will split at the first
45835  # space.
45836  complete="$BUILD_OBJCOPY"
45837  path="${complete%% *}"
45838  tmp="$complete EOL"
45839  arguments="${tmp#* }"
45840
45841  # Input might be given as Windows format, start by converting to
45842  # unix format.
45843  new_path="$path"
45844
45845  windows_path="$new_path"
45846  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45847    unix_path=`$CYGPATH -u "$windows_path"`
45848    new_path="$unix_path"
45849  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45850    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45851    new_path="$unix_path"
45852  fi
45853
45854
45855  # Now try to locate executable using which
45856  new_path=`$WHICH "$new_path" 2> /dev/null`
45857
45858  if test "x$new_path" = x; then
45859    # Oops. Which didn't find the executable.
45860    # The splitting of arguments from the executable at a space might have been incorrect,
45861    # since paths with space are more likely in Windows. Give it another try with the whole
45862    # argument.
45863    path="$complete"
45864    arguments="EOL"
45865    new_path="$path"
45866
45867  windows_path="$new_path"
45868  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45869    unix_path=`$CYGPATH -u "$windows_path"`
45870    new_path="$unix_path"
45871  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45872    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45873    new_path="$unix_path"
45874  fi
45875
45876
45877    new_path=`$WHICH "$new_path" 2> /dev/null`
45878    # bat and cmd files are not always considered executable in MSYS causing which
45879    # to not find them
45880    if test "x$new_path" = x \
45881        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
45882        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
45883      new_path="$path"
45884
45885  windows_path="$new_path"
45886  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45887    unix_path=`$CYGPATH -u "$windows_path"`
45888    new_path="$unix_path"
45889  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45890    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45891    new_path="$unix_path"
45892  fi
45893
45894    fi
45895
45896    if test "x$new_path" = x; then
45897      # It's still not found. Now this is an unrecoverable error.
45898      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45899$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45900      has_space=`$ECHO "$complete" | $GREP " "`
45901      if test "x$has_space" != x; then
45902        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
45903$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
45904      fi
45905      as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45906    fi
45907  fi
45908
45909  # Now new_path has a complete unix path to the binary
45910  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
45911    # Keep paths in /bin as-is, but remove trailing .exe if any
45912    new_path="${new_path/%.exe/}"
45913    # Do not save /bin paths to all_fixpath_prefixes!
45914  else
45915    # Not in mixed or Windows style, start by that.
45916    new_path=`cmd //c echo $new_path`
45917
45918  input_path="$new_path"
45919  # Check if we need to convert this using DOS-style short mode. If the path
45920  # contains just simple characters, use it. Otherwise (spaces, weird characters),
45921  # take no chances and rewrite it.
45922  # Note: m4 eats our [], so we need to use [ and ] instead.
45923  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
45924  if test "x$has_forbidden_chars" != x; then
45925    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
45926    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
45927  fi
45928
45929    # Output is in $new_path
45930
45931  windows_path="$new_path"
45932  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
45933    unix_path=`$CYGPATH -u "$windows_path"`
45934    new_path="$unix_path"
45935  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
45936    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
45937    new_path="$unix_path"
45938  fi
45939
45940    # remove trailing .exe if any
45941    new_path="${new_path/%.exe/}"
45942
45943    # Save the first 10 bytes of this path to the storage, so fixpath can work.
45944    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
45945  fi
45946
45947    else
45948      # We're on a unix platform. Hooray! :)
45949      # First separate the path from the arguments. This will split at the first
45950      # space.
45951      complete="$BUILD_OBJCOPY"
45952      path="${complete%% *}"
45953      tmp="$complete EOL"
45954      arguments="${tmp#* }"
45955
45956      # Cannot rely on the command "which" here since it doesn't always work.
45957      is_absolute_path=`$ECHO "$path" | $GREP ^/`
45958      if test -z "$is_absolute_path"; then
45959        # Path to executable is not absolute. Find it.
45960        IFS_save="$IFS"
45961        IFS=:
45962        for p in $PATH; do
45963          if test -f "$p/$path" && test -x "$p/$path"; then
45964            new_path="$p/$path"
45965            break
45966          fi
45967        done
45968        IFS="$IFS_save"
45969      else
45970        # This is an absolute path, we can use it without further modifications.
45971        new_path="$path"
45972      fi
45973
45974      if test "x$new_path" = x; then
45975        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&5
45976$as_echo "$as_me: The path of BUILD_OBJCOPY, which resolves as \"$complete\", is not found." >&6;}
45977        has_space=`$ECHO "$complete" | $GREP " "`
45978        if test "x$has_space" != x; then
45979          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
45980$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
45981        fi
45982        as_fn_error $? "Cannot locate the the path of BUILD_OBJCOPY" "$LINENO" 5
45983      fi
45984    fi
45985
45986    # Now join together the path and the arguments once again
45987    if test "x$arguments" != xEOL; then
45988      new_complete="$new_path ${arguments% *}"
45989    else
45990      new_complete="$new_path"
45991    fi
45992
45993    if test "x$complete" != "x$new_complete"; then
45994      BUILD_OBJCOPY="$new_complete"
45995      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&5
45996$as_echo "$as_me: Rewriting BUILD_OBJCOPY to \"$new_complete\"" >&6;}
45997    fi
45998  fi
45999
46000
46001
46002  # Publish this variable in the help.
46003
46004
46005  if [ -z "${BUILD_STRIP+x}" ]; then
46006    # The variable is not set by user, try to locate tool using the code snippet
46007    for ac_prog in strip
46008do
46009  # Extract the first word of "$ac_prog", so it can be a program name with args.
46010set dummy $ac_prog; ac_word=$2
46011{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46012$as_echo_n "checking for $ac_word... " >&6; }
46013if ${ac_cv_path_BUILD_STRIP+:} false; then :
46014  $as_echo_n "(cached) " >&6
46015else
46016  case $BUILD_STRIP in
46017  [\\/]* | ?:[\\/]*)
46018  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46019  ;;
46020  *)
46021  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46022for as_dir in $PATH
46023do
46024  IFS=$as_save_IFS
46025  test -z "$as_dir" && as_dir=.
46026    for ac_exec_ext in '' $ac_executable_extensions; do
46027  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46028    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46029    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46030    break 2
46031  fi
46032done
46033  done
46034IFS=$as_save_IFS
46035
46036  ;;
46037esac
46038fi
46039BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46040if test -n "$BUILD_STRIP"; then
46041  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46042$as_echo "$BUILD_STRIP" >&6; }
46043else
46044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46045$as_echo "no" >&6; }
46046fi
46047
46048
46049  test -n "$BUILD_STRIP" && break
46050done
46051
46052  else
46053    # The variable is set, but is it from the command line or the environment?
46054
46055    # Try to remove the string !BUILD_STRIP! from our list.
46056    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!BUILD_STRIP!/}
46057    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
46058      # If it failed, the variable was not from the command line. Ignore it,
46059      # but warn the user (except for BASH, which is always set by the calling BASH).
46060      if test "xBUILD_STRIP" != xBASH; then
46061        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&5
46062$as_echo "$as_me: WARNING: Ignoring value of BUILD_STRIP from the environment. Use command line variables instead." >&2;}
46063      fi
46064      # Try to locate tool using the code snippet
46065      for ac_prog in strip
46066do
46067  # Extract the first word of "$ac_prog", so it can be a program name with args.
46068set dummy $ac_prog; ac_word=$2
46069{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46070$as_echo_n "checking for $ac_word... " >&6; }
46071if ${ac_cv_path_BUILD_STRIP+:} false; then :
46072  $as_echo_n "(cached) " >&6
46073else
46074  case $BUILD_STRIP in
46075  [\\/]* | ?:[\\/]*)
46076  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46077  ;;
46078  *)
46079  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46080for as_dir in $PATH
46081do
46082  IFS=$as_save_IFS
46083  test -z "$as_dir" && as_dir=.
46084    for ac_exec_ext in '' $ac_executable_extensions; do
46085  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46086    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46087    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46088    break 2
46089  fi
46090done
46091  done
46092IFS=$as_save_IFS
46093
46094  ;;
46095esac
46096fi
46097BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46098if test -n "$BUILD_STRIP"; then
46099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46100$as_echo "$BUILD_STRIP" >&6; }
46101else
46102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46103$as_echo "no" >&6; }
46104fi
46105
46106
46107  test -n "$BUILD_STRIP" && break
46108done
46109
46110    else
46111      # If it succeeded, then it was overridden by the user. We will use it
46112      # for the tool.
46113
46114      # First remove it from the list of overridden variables, so we can test
46115      # for unknown variables in the end.
46116      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
46117
46118      # Check if we try to supply an empty value
46119      if test "x$BUILD_STRIP" = x; then
46120        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool BUILD_STRIP= (no value)" >&5
46121$as_echo "$as_me: Setting user supplied tool BUILD_STRIP= (no value)" >&6;}
46122        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46123$as_echo_n "checking for BUILD_STRIP... " >&6; }
46124        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
46125$as_echo "disabled" >&6; }
46126      else
46127        # Check if the provided tool contains a complete path.
46128        tool_specified="$BUILD_STRIP"
46129        tool_basename="${tool_specified##*/}"
46130        if test "x$tool_basename" = "x$tool_specified"; then
46131          # A command without a complete path is provided, search $PATH.
46132          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&5
46133$as_echo "$as_me: Will search for user supplied tool BUILD_STRIP=$tool_basename" >&6;}
46134          # Extract the first word of "$tool_basename", so it can be a program name with args.
46135set dummy $tool_basename; ac_word=$2
46136{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
46137$as_echo_n "checking for $ac_word... " >&6; }
46138if ${ac_cv_path_BUILD_STRIP+:} false; then :
46139  $as_echo_n "(cached) " >&6
46140else
46141  case $BUILD_STRIP in
46142  [\\/]* | ?:[\\/]*)
46143  ac_cv_path_BUILD_STRIP="$BUILD_STRIP" # Let the user override the test with a path.
46144  ;;
46145  *)
46146  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
46147for as_dir in $PATH
46148do
46149  IFS=$as_save_IFS
46150  test -z "$as_dir" && as_dir=.
46151    for ac_exec_ext in '' $ac_executable_extensions; do
46152  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
46153    ac_cv_path_BUILD_STRIP="$as_dir/$ac_word$ac_exec_ext"
46154    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
46155    break 2
46156  fi
46157done
46158  done
46159IFS=$as_save_IFS
46160
46161  ;;
46162esac
46163fi
46164BUILD_STRIP=$ac_cv_path_BUILD_STRIP
46165if test -n "$BUILD_STRIP"; then
46166  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUILD_STRIP" >&5
46167$as_echo "$BUILD_STRIP" >&6; }
46168else
46169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
46170$as_echo "no" >&6; }
46171fi
46172
46173
46174          if test "x$BUILD_STRIP" = x; then
46175            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
46176          fi
46177        else
46178          # Otherwise we believe it is a complete path. Use it as it is.
46179          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool BUILD_STRIP=$tool_specified" >&5
46180$as_echo "$as_me: Will use user supplied tool BUILD_STRIP=$tool_specified" >&6;}
46181          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BUILD_STRIP" >&5
46182$as_echo_n "checking for BUILD_STRIP... " >&6; }
46183          if test ! -x "$tool_specified"; then
46184            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
46185$as_echo "not found" >&6; }
46186            as_fn_error $? "User supplied tool BUILD_STRIP=$tool_specified does not exist or is not executable" "$LINENO" 5
46187          fi
46188          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
46189$as_echo "$tool_specified" >&6; }
46190        fi
46191      fi
46192    fi
46193
46194  fi
46195
46196
46197
46198  # Only process if variable expands to non-empty
46199
46200  if test "x$BUILD_STRIP" != x; then
46201    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46202
46203  # First separate the path from the arguments. This will split at the first
46204  # space.
46205  complete="$BUILD_STRIP"
46206  path="${complete%% *}"
46207  tmp="$complete EOL"
46208  arguments="${tmp#* }"
46209
46210  # Input might be given as Windows format, start by converting to
46211  # unix format.
46212  new_path=`$CYGPATH -u "$path"`
46213
46214  # Now try to locate executable using which
46215  new_path=`$WHICH "$new_path" 2> /dev/null`
46216  # bat and cmd files are not always considered executable in cygwin causing which
46217  # to not find them
46218  if test "x$new_path" = x \
46219      && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46220      && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46221    new_path=`$CYGPATH -u "$path"`
46222  fi
46223  if test "x$new_path" = x; then
46224    # Oops. Which didn't find the executable.
46225    # The splitting of arguments from the executable at a space might have been incorrect,
46226    # since paths with space are more likely in Windows. Give it another try with the whole
46227    # argument.
46228    path="$complete"
46229    arguments="EOL"
46230    new_path=`$CYGPATH -u "$path"`
46231    new_path=`$WHICH "$new_path" 2> /dev/null`
46232    # bat and cmd files are not always considered executable in cygwin causing which
46233    # to not find them
46234    if test "x$new_path" = x \
46235        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46236        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46237      new_path=`$CYGPATH -u "$path"`
46238    fi
46239    if test "x$new_path" = x; then
46240      # It's still not found. Now this is an unrecoverable error.
46241      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46242$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46243      has_space=`$ECHO "$complete" | $GREP " "`
46244      if test "x$has_space" != x; then
46245        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46246$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46247      fi
46248      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46249    fi
46250  fi
46251
46252  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
46253  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
46254  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
46255  # "foo.exe" is OK but "foo" is an error.
46256  #
46257  # This test is therefore slightly more accurate than "test -f" to check for file presence.
46258  # It is also a way to make sure we got the proper file name for the real test later on.
46259  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
46260  if test "x$test_shortpath" = x; then
46261    # Short path failed, file does not exist as specified.
46262    # Try adding .exe or .cmd
46263    if test -f "${new_path}.exe"; then
46264      input_to_shortpath="${new_path}.exe"
46265    elif test -f "${new_path}.cmd"; then
46266      input_to_shortpath="${new_path}.cmd"
46267    else
46268      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&5
46269$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$new_path\", is invalid." >&6;}
46270      { $as_echo "$as_me:${as_lineno-$LINENO}: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&5
46271$as_echo "$as_me: Neither \"$new_path\" nor \"$new_path.exe/cmd\" can be found" >&6;}
46272      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46273    fi
46274  else
46275    input_to_shortpath="$new_path"
46276  fi
46277
46278  # Call helper function which possibly converts this using DOS-style short mode.
46279  # If so, the updated path is stored in $new_path.
46280  new_path="$input_to_shortpath"
46281
46282  input_path="$input_to_shortpath"
46283  # Check if we need to convert this using DOS-style short mode. If the path
46284  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46285  # take no chances and rewrite it.
46286  # Note: m4 eats our [], so we need to use [ and ] instead.
46287  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
46288  if test "x$has_forbidden_chars" != x; then
46289    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46290    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
46291    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
46292    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
46293      # Going to short mode and back again did indeed matter. Since short mode is
46294      # case insensitive, let's make it lowercase to improve readability.
46295      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46296      # Now convert it back to Unix-style (cygpath)
46297      input_path=`$CYGPATH -u "$shortmode_path"`
46298      new_path="$input_path"
46299    fi
46300  fi
46301
46302  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
46303  if test "x$test_cygdrive_prefix" = x; then
46304    # As a simple fix, exclude /usr/bin since it's not a real path.
46305    if test "x`$ECHO $input_to_shortpath | $GREP ^/usr/bin/`" = x; then
46306      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
46307      # a path prefixed by /cygdrive for fixpath to work.
46308      new_path="$CYGWIN_ROOT_PATH$input_path"
46309    fi
46310  fi
46311
46312  # remove trailing .exe if any
46313  new_path="${new_path/%.exe/}"
46314
46315    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46316
46317  # First separate the path from the arguments. This will split at the first
46318  # space.
46319  complete="$BUILD_STRIP"
46320  path="${complete%% *}"
46321  tmp="$complete EOL"
46322  arguments="${tmp#* }"
46323
46324  # Input might be given as Windows format, start by converting to
46325  # unix format.
46326  new_path="$path"
46327
46328  windows_path="$new_path"
46329  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46330    unix_path=`$CYGPATH -u "$windows_path"`
46331    new_path="$unix_path"
46332  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46333    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46334    new_path="$unix_path"
46335  fi
46336
46337
46338  # Now try to locate executable using which
46339  new_path=`$WHICH "$new_path" 2> /dev/null`
46340
46341  if test "x$new_path" = x; then
46342    # Oops. Which didn't find the executable.
46343    # The splitting of arguments from the executable at a space might have been incorrect,
46344    # since paths with space are more likely in Windows. Give it another try with the whole
46345    # argument.
46346    path="$complete"
46347    arguments="EOL"
46348    new_path="$path"
46349
46350  windows_path="$new_path"
46351  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46352    unix_path=`$CYGPATH -u "$windows_path"`
46353    new_path="$unix_path"
46354  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46355    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46356    new_path="$unix_path"
46357  fi
46358
46359
46360    new_path=`$WHICH "$new_path" 2> /dev/null`
46361    # bat and cmd files are not always considered executable in MSYS causing which
46362    # to not find them
46363    if test "x$new_path" = x \
46364        && test "x`$ECHO \"$path\" | $GREP -i -e \"\\.bat$\" -e \"\\.cmd$\"`" != x \
46365        && test "x`$LS \"$path\" 2>/dev/null`" != x; then
46366      new_path="$path"
46367
46368  windows_path="$new_path"
46369  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46370    unix_path=`$CYGPATH -u "$windows_path"`
46371    new_path="$unix_path"
46372  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46373    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46374    new_path="$unix_path"
46375  fi
46376
46377    fi
46378
46379    if test "x$new_path" = x; then
46380      # It's still not found. Now this is an unrecoverable error.
46381      { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46382$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46383      has_space=`$ECHO "$complete" | $GREP " "`
46384      if test "x$has_space" != x; then
46385        { $as_echo "$as_me:${as_lineno-$LINENO}: You might be mixing spaces in the path and extra arguments, which is not allowed." >&5
46386$as_echo "$as_me: You might be mixing spaces in the path and extra arguments, which is not allowed." >&6;}
46387      fi
46388      as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46389    fi
46390  fi
46391
46392  # Now new_path has a complete unix path to the binary
46393  if test "x`$ECHO $new_path | $GREP ^/bin/`" != x; then
46394    # Keep paths in /bin as-is, but remove trailing .exe if any
46395    new_path="${new_path/%.exe/}"
46396    # Do not save /bin paths to all_fixpath_prefixes!
46397  else
46398    # Not in mixed or Windows style, start by that.
46399    new_path=`cmd //c echo $new_path`
46400
46401  input_path="$new_path"
46402  # Check if we need to convert this using DOS-style short mode. If the path
46403  # contains just simple characters, use it. Otherwise (spaces, weird characters),
46404  # take no chances and rewrite it.
46405  # Note: m4 eats our [], so we need to use [ and ] instead.
46406  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
46407  if test "x$has_forbidden_chars" != x; then
46408    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
46409    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
46410  fi
46411
46412    # Output is in $new_path
46413
46414  windows_path="$new_path"
46415  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46416    unix_path=`$CYGPATH -u "$windows_path"`
46417    new_path="$unix_path"
46418  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46419    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
46420    new_path="$unix_path"
46421  fi
46422
46423    # remove trailing .exe if any
46424    new_path="${new_path/%.exe/}"
46425
46426    # Save the first 10 bytes of this path to the storage, so fixpath can work.
46427    all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
46428  fi
46429
46430    else
46431      # We're on a unix platform. Hooray! :)
46432      # First separate the path from the arguments. This will split at the first
46433      # space.
46434      complete="$BUILD_STRIP"
46435      path="${complete%% *}"
46436      tmp="$complete EOL"
46437      arguments="${tmp#* }"
46438
46439      # Cannot rely on the command "which" here since it doesn't always work.
46440      is_absolute_path=`$ECHO "$path" | $GREP ^/`
46441      if test -z "$is_absolute_path"; then
46442        # Path to executable is not absolute. Find it.
46443        IFS_save="$IFS"
46444        IFS=:
46445        for p in $PATH; do
46446          if test -f "$p/$path" && test -x "$p/$path"; then
46447            new_path="$p/$path"
46448            break
46449          fi
46450        done
46451        IFS="$IFS_save"
46452      else
46453        # This is an absolute path, we can use it without further modifications.
46454        new_path="$path"
46455      fi
46456
46457      if test "x$new_path" = x; then
46458        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&5
46459$as_echo "$as_me: The path of BUILD_STRIP, which resolves as \"$complete\", is not found." >&6;}
46460        has_space=`$ECHO "$complete" | $GREP " "`
46461        if test "x$has_space" != x; then
46462          { $as_echo "$as_me:${as_lineno-$LINENO}: This might be caused by spaces in the path, which is not allowed." >&5
46463$as_echo "$as_me: This might be caused by spaces in the path, which is not allowed." >&6;}
46464        fi
46465        as_fn_error $? "Cannot locate the the path of BUILD_STRIP" "$LINENO" 5
46466      fi
46467    fi
46468
46469    # Now join together the path and the arguments once again
46470    if test "x$arguments" != xEOL; then
46471      new_complete="$new_path ${arguments% *}"
46472    else
46473      new_complete="$new_path"
46474    fi
46475
46476    if test "x$complete" != "x$new_complete"; then
46477      BUILD_STRIP="$new_complete"
46478      { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting BUILD_STRIP to \"$new_complete\"" >&5
46479$as_echo "$as_me: Rewriting BUILD_STRIP to \"$new_complete\"" >&6;}
46480    fi
46481  fi
46482
46483    # Assume the C compiler is the assembler
46484    BUILD_AS="$BUILD_CC -c"
46485    # Just like for the target compiler, use the compiler as linker
46486    BUILD_LD="$BUILD_CC"
46487    BUILD_LDCXX="$BUILD_CXX"
46488
46489    PATH="$OLDPATH"
46490
46491
46492  COMPILER=$BUILD_CC
46493  COMPILER_NAME=BuildC
46494
46495  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46496    # cc -V output typically looks like
46497    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46498    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46499    # Check that this is likely to be the Solaris Studio cc.
46500    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46501    if test $? -ne 0; then
46502      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46503      { $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
46504$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46505      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46506$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46507      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46508$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46509      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46510    fi
46511    # Remove usage instructions (if present), and
46512    # collapse compiler output into a single line
46513    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46514        $SED -e 's/ *[Uu]sage:.*//'`
46515    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46516        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46517  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46518    # xlc -qversion output typically looks like
46519    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46520    #     Version: 11.01.0000.0015
46521    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46522    # Check that this is likely to be the IBM XL C compiler.
46523    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46524    if test $? -ne 0; then
46525      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46526      { $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
46527$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46528      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46529$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46530      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46531$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46532      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46533    fi
46534    # Collapse compiler output into a single line
46535    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46536    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46537        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46538  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46539    # There is no specific version flag, but all output starts with a version string.
46540    # First line typically looks something like:
46541    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46542    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46543    # Check that this is likely to be Microsoft CL.EXE.
46544    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46545    if test $? -ne 0; then
46546      { $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
46547$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46548      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46549$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46550      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46551    fi
46552    # Collapse compiler output into a single line
46553    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46554    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46555        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46556  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46557    # gcc --version output typically looks like
46558    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46559    #     Copyright (C) 2013 Free Software Foundation, Inc.
46560    #     This is free software; see the source for copying conditions.  There is NO
46561    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46562    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46563    # Check that this is likely to be GCC.
46564    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46565    if test $? -ne 0; then
46566      { $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
46567$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46568      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46569$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46570      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46571    fi
46572    # Remove Copyright and legalese from version string, and
46573    # collapse into a single line
46574    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46575        $SED -e 's/ *Copyright .*//'`
46576    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46577        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46578  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
46579    # clang --version output typically looks like
46580    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46581    #    clang version 3.3 (tags/RELEASE_33/final)
46582    # or
46583    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46584    #    Target: x86_64-pc-linux-gnu
46585    #    Thread model: posix
46586    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46587    # Check that this is likely to be clang
46588    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46589    if test $? -ne 0; then
46590      { $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
46591$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46592      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46593$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46594      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46595    fi
46596    # Collapse compiler output into a single line
46597    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46598    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46599        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46600  else
46601      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46602  fi
46603  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46604  BUILD_CC_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46605  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46606  BUILD_CC_VERSION_STRING="$COMPILER_VERSION_STRING"
46607
46608  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46609$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46610
46611
46612  COMPILER=$BUILD_CXX
46613  COMPILER_NAME=BuildC++
46614
46615  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
46616    # cc -V output typically looks like
46617    #     cc: Sun C 5.12 Linux_i386 2011/11/16
46618    COMPILER_VERSION_OUTPUT=`$COMPILER -V 2>&1`
46619    # Check that this is likely to be the Solaris Studio cc.
46620    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "^.*: Sun $COMPILER_NAME" > /dev/null
46621    if test $? -ne 0; then
46622      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46623      { $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
46624$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46625      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46626$as_echo "$as_me: The result from running with -V was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46627      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46628$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46629      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46630    fi
46631    # Remove usage instructions (if present), and
46632    # collapse compiler output into a single line
46633    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46634        $SED -e 's/ *[Uu]sage:.*//'`
46635    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46636        $SED -e "s/^.*[ ,\t]$COMPILER_NAME[ ,\t]\([1-9]\.[0-9][0-9]*\).*/\1/"`
46637  elif test  "x$TOOLCHAIN_TYPE" = xxlc; then
46638    # xlc -qversion output typically looks like
46639    #     IBM XL C/C++ for AIX, V11.1 (5724-X13)
46640    #     Version: 11.01.0000.0015
46641    COMPILER_VERSION_OUTPUT=`$COMPILER -qversion 2>&1`
46642    # Check that this is likely to be the IBM XL C compiler.
46643    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "IBM XL C" > /dev/null
46644    if test $? -ne 0; then
46645      ALT_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46646      { $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
46647$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46648      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46649$as_echo "$as_me: The result from running with -qversion was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46650      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&5
46651$as_echo "$as_me: The result from running with --version was: \"$ALT_VERSION_OUTPUT\"" >&6;}
46652      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46653    fi
46654    # Collapse compiler output into a single line
46655    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46656    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46657        $SED -e 's/^.*, V\([1-9][0-9.]*\).*$/\1/'`
46658  elif test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46659    # There is no specific version flag, but all output starts with a version string.
46660    # First line typically looks something like:
46661    # Microsoft (R) 32-bit C/C++ Optimizing Compiler Version 16.00.40219.01 for 80x86
46662    COMPILER_VERSION_OUTPUT=`$COMPILER 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46663    # Check that this is likely to be Microsoft CL.EXE.
46664    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Microsoft.*Compiler" > /dev/null
46665    if test $? -ne 0; then
46666      { $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
46667$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46668      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46669$as_echo "$as_me: The result from running it was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46670      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46671    fi
46672    # Collapse compiler output into a single line
46673    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46674    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46675        $SED -e 's/^.*ersion.\([1-9][0-9.]*\) .*$/\1/'`
46676  elif test  "x$TOOLCHAIN_TYPE" = xgcc; then
46677    # gcc --version output typically looks like
46678    #     gcc (Ubuntu/Linaro 4.8.1-10ubuntu9) 4.8.1
46679    #     Copyright (C) 2013 Free Software Foundation, Inc.
46680    #     This is free software; see the source for copying conditions.  There is NO
46681    #     warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
46682    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46683    # Check that this is likely to be GCC.
46684    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "Free Software Foundation" > /dev/null
46685    if test $? -ne 0; then
46686      { $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
46687$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46688      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION\"" >&5
46689$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION\"" >&6;}
46690      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46691    fi
46692    # Remove Copyright and legalese from version string, and
46693    # collapse into a single line
46694    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT | \
46695        $SED -e 's/ *Copyright .*//'`
46696    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46697        $SED -e 's/^.* \([1-9]\.[0-9.]*\)[^0-9.].*$/\1/'`
46698  elif test  "x$TOOLCHAIN_TYPE" = xclang; then
46699    # clang --version output typically looks like
46700    #    Apple LLVM version 5.0 (clang-500.2.79) (based on LLVM 3.3svn)
46701    #    clang version 3.3 (tags/RELEASE_33/final)
46702    # or
46703    #    Debian clang version 3.2-7ubuntu1 (tags/RELEASE_32/final) (based on LLVM 3.2)
46704    #    Target: x86_64-pc-linux-gnu
46705    #    Thread model: posix
46706    COMPILER_VERSION_OUTPUT=`$COMPILER --version 2>&1`
46707    # Check that this is likely to be clang
46708    $ECHO "$COMPILER_VERSION_OUTPUT" | $GREP "clang" > /dev/null
46709    if test $? -ne 0; then
46710      { $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
46711$as_echo "$as_me: The $COMPILER_NAME compiler (located as $COMPILER) does not seem to be the required $TOOLCHAIN_TYPE compiler." >&6;}
46712      { $as_echo "$as_me:${as_lineno-$LINENO}: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&5
46713$as_echo "$as_me: The result from running with --version was: \"$COMPILER_VERSION_OUTPUT\"" >&6;}
46714      as_fn_error $? "A $TOOLCHAIN_TYPE compiler is required. Try setting --with-tools-dir." "$LINENO" 5
46715    fi
46716    # Collapse compiler output into a single line
46717    COMPILER_VERSION_STRING=`$ECHO $COMPILER_VERSION_OUTPUT`
46718    COMPILER_VERSION_NUMBER=`$ECHO $COMPILER_VERSION_OUTPUT | \
46719        $SED -e 's/^.* version \([1-9][0-9.]*\).*$/\1/'`
46720  else
46721      as_fn_error $? "Unknown toolchain type $TOOLCHAIN_TYPE." "$LINENO" 5
46722  fi
46723  # This sets CC_VERSION_NUMBER or CXX_VERSION_NUMBER. (This comment is a grep marker)
46724  BUILD_CXX_VERSION_NUMBER="$COMPILER_VERSION_NUMBER"
46725  # This sets CC_VERSION_STRING or CXX_VERSION_STRING. (This comment is a grep marker)
46726  BUILD_CXX_VERSION_STRING="$COMPILER_VERSION_STRING"
46727
46728  { $as_echo "$as_me:${as_lineno-$LINENO}: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&5
46729$as_echo "$as_me: Using $TOOLCHAIN_TYPE $COMPILER_NAME compiler version $COMPILER_VERSION_NUMBER [$COMPILER_VERSION_STRING]" >&6;}
46730
46731
46732  if test "x$BUILD_CC_VERSION_NUMBER" != "x$BUILD_CXX_VERSION_NUMBER"; then
46733    { $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
46734$as_echo "$as_me: WARNING: C and C++ compiler have different version numbers, $BUILD_CC_VERSION_NUMBER vs $BUILD_CXX_VERSION_NUMBER." >&2;}
46735    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This typically indicates a broken setup, and is not supported" >&5
46736$as_echo "$as_me: WARNING: This typically indicates a broken setup, and is not supported" >&2;}
46737  fi
46738
46739  # We only check CC_VERSION_NUMBER since we assume CXX_VERSION_NUMBER is equal.
46740  if  [[ "[$]BUILD_CC_VERSION_NUMBER" =~ (.*\.){3} ]] ; then
46741    { $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
46742$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;}
46743  fi
46744
46745  if  [[  "[$]BUILD_CC_VERSION_NUMBER" =~ [0-9]{6} ]] ; then
46746    { $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
46747$as_echo "$as_me: WARNING: C compiler version number has a part larger than 99999: $BUILD_CC_VERSION_NUMBER. Comparisons might be wrong." >&2;}
46748  fi
46749
46750  OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$BUILD_CC_VERSION_NUMBER"`
46751
46752  else
46753    # If we are not cross compiling, use the normal target compilers for
46754    # building the build platform executables.
46755    BUILD_CC="$CC"
46756    BUILD_CXX="$CXX"
46757    BUILD_LD="$LD"
46758    BUILD_LDCXX="$LDCXX"
46759    BUILD_NM="$NM"
46760    BUILD_AS="$AS"
46761    BUILD_OBJCOPY="$OBJCOPY"
46762    BUILD_STRIP="$STRIP"
46763    BUILD_SYSROOT_CFLAGS="$SYSROOT_CFLAGS"
46764    BUILD_SYSROOT_LDFLAGS="$SYSROOT_LDFLAGS"
46765    BUILD_AR="$AR"
46766  fi
46767
46768
46769
46770
46771
46772
46773
46774
46775
46776
46777
46778
46779  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46780    # For hotspot, we need these in Windows mixed path,
46781    # so rewrite them all. Need added .exe suffix.
46782    HOTSPOT_CXX="$CXX.exe"
46783    HOTSPOT_LD="$LD.exe"
46784    HOTSPOT_MT="$MT.exe"
46785    HOTSPOT_RC="$RC.exe"
46786
46787  unix_path="$HOTSPOT_CXX"
46788  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46789    windows_path=`$CYGPATH -m "$unix_path"`
46790    HOTSPOT_CXX="$windows_path"
46791  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46792    windows_path=`cmd //c echo $unix_path`
46793    HOTSPOT_CXX="$windows_path"
46794  fi
46795
46796
46797  unix_path="$HOTSPOT_LD"
46798  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46799    windows_path=`$CYGPATH -m "$unix_path"`
46800    HOTSPOT_LD="$windows_path"
46801  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46802    windows_path=`cmd //c echo $unix_path`
46803    HOTSPOT_LD="$windows_path"
46804  fi
46805
46806
46807  unix_path="$HOTSPOT_MT"
46808  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46809    windows_path=`$CYGPATH -m "$unix_path"`
46810    HOTSPOT_MT="$windows_path"
46811  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46812    windows_path=`cmd //c echo $unix_path`
46813    HOTSPOT_MT="$windows_path"
46814  fi
46815
46816
46817  unix_path="$HOTSPOT_RC"
46818  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
46819    windows_path=`$CYGPATH -m "$unix_path"`
46820    HOTSPOT_RC="$windows_path"
46821  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
46822    windows_path=`cmd //c echo $unix_path`
46823    HOTSPOT_RC="$windows_path"
46824  fi
46825
46826
46827
46828  else
46829    HOTSPOT_CXX="$CXX"
46830    HOTSPOT_LD="$LD"
46831  fi
46832
46833
46834
46835  if test  "x$TOOLCHAIN_TYPE" = xclang; then
46836    USE_CLANG=true
46837  fi
46838
46839
46840
46841
46842
46843  # The package path is used only on macosx?
46844  # FIXME: clean this up, and/or move it elsewhere.
46845  PACKAGE_PATH=/opt/local
46846
46847
46848  # Check for extra potential brokenness.
46849  if test  "x$TOOLCHAIN_TYPE" = xmicrosoft; then
46850    # On Windows, double-check that we got the right compiler.
46851    CC_VERSION_OUTPUT=`$CC 2>&1 | $HEAD -n 1 | $TR -d '\r'`
46852    COMPILER_CPU_TEST=`$ECHO $CC_VERSION_OUTPUT | $SED -n "s/^.* \(.*\)$/\1/p"`
46853    if test "x$OPENJDK_TARGET_CPU" = "xx86"; then
46854      if test "x$COMPILER_CPU_TEST" != "x80x86" -a "x$COMPILER_CPU_TEST" != "xx86"; then
46855        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
46856      fi
46857    elif test "x$OPENJDK_TARGET_CPU" = "xx86_64"; then
46858      if test "x$COMPILER_CPU_TEST" != "xx64"; then
46859        as_fn_error $? "Target CPU mismatch. We are building for $OPENJDK_TARGET_CPU but CL is for \"$COMPILER_CPU_TEST\"; expected \"x64\"." "$LINENO" 5
46860      fi
46861    fi
46862  fi
46863
46864  if test "x$TOOLCHAIN_TYPE" = xgcc; then
46865    # If this is a --hash-style=gnu system, use --hash-style=both, why?
46866    HAS_GNU_HASH=`$CC -dumpspecs 2>/dev/null | $GREP 'hash-style=gnu'`
46867    # This is later checked when setting flags.
46868
46869    # "-Og" suppported for GCC 4.8 and later
46870    CFLAG_OPTIMIZE_DEBUG_FLAG="-Og"
46871
46872
46873
46874
46875
46876
46877
46878
46879
46880
46881
46882
46883
46884
46885
46886
46887
46888
46889
46890
46891
46892
46893
46894
46895
46896
46897
46898
46899
46900
46901
46902
46903
46904
46905
46906
46907
46908
46909
46910
46911
46912
46913
46914
46915
46916
46917
46918    # Execute function body
46919
46920
46921
46922
46923
46924
46925
46926
46927
46928
46929
46930
46931
46932
46933
46934
46935
46936
46937
46938
46939
46940
46941
46942
46943
46944
46945
46946
46947
46948
46949
46950
46951
46952
46953
46954
46955
46956
46957
46958
46959
46960
46961
46962
46963
46964
46965
46966
46967    # Execute function body
46968
46969  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
46970$as_echo_n "checking if the C compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
46971  supports=yes
46972
46973  saved_cflags="$CFLAGS"
46974  CFLAGS="$CFLAGS $CFLAG_OPTIMIZE_DEBUG_FLAG"
46975  ac_ext=c
46976ac_cpp='$CPP $CPPFLAGS'
46977ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46978ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46979ac_compiler_gnu=$ac_cv_c_compiler_gnu
46980
46981  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
46982/* end confdefs.h.  */
46983int i;
46984_ACEOF
46985if ac_fn_c_try_compile "$LINENO"; then :
46986
46987else
46988  supports=no
46989fi
46990rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
46991  ac_ext=cpp
46992ac_cpp='$CXXCPP $CPPFLAGS'
46993ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
46994ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
46995ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
46996
46997  CFLAGS="$saved_cflags"
46998
46999  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47000$as_echo "$supports" >&6; }
47001  if test "x$supports" = "xyes" ; then
47002    :
47003    C_COMP_SUPPORTS="yes"
47004  else
47005    :
47006    C_COMP_SUPPORTS="no"
47007  fi
47008
47009
47010
47011
47012
47013
47014
47015
47016
47017
47018
47019
47020
47021
47022
47023
47024
47025
47026
47027
47028
47029
47030
47031
47032
47033
47034
47035
47036
47037
47038
47039
47040
47041
47042
47043
47044
47045
47046
47047
47048
47049
47050
47051
47052
47053
47054
47055
47056
47057
47058
47059
47060
47061
47062
47063
47064
47065
47066
47067    # Execute function body
47068
47069  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47070$as_echo_n "checking if the C++ compiler supports \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47071  supports=yes
47072
47073  saved_cxxflags="$CXXFLAGS"
47074  CXXFLAGS="$CXXFLAG $CFLAG_OPTIMIZE_DEBUG_FLAG"
47075  ac_ext=cpp
47076ac_cpp='$CXXCPP $CPPFLAGS'
47077ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47078ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47079ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47080
47081  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47082/* end confdefs.h.  */
47083int i;
47084_ACEOF
47085if ac_fn_cxx_try_compile "$LINENO"; then :
47086
47087else
47088  supports=no
47089fi
47090rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47091  ac_ext=cpp
47092ac_cpp='$CXXCPP $CPPFLAGS'
47093ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47094ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47095ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47096
47097  CXXFLAGS="$saved_cxxflags"
47098
47099  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47100$as_echo "$supports" >&6; }
47101  if test "x$supports" = "xyes" ; then
47102    :
47103    CXX_COMP_SUPPORTS="yes"
47104  else
47105    :
47106    CXX_COMP_SUPPORTS="no"
47107  fi
47108
47109
47110
47111
47112
47113
47114
47115
47116
47117
47118
47119
47120
47121  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"" >&5
47122$as_echo_n "checking if both compilers support \"$CFLAG_OPTIMIZE_DEBUG_FLAG\"... " >&6; }
47123  supports=no
47124  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
47125
47126  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47127$as_echo "$supports" >&6; }
47128  if test "x$supports" = "xyes" ; then
47129    :
47130    HAS_CFLAG_OPTIMIZE_DEBUG=true
47131  else
47132    :
47133    HAS_CFLAG_OPTIMIZE_DEBUG=false
47134  fi
47135
47136
47137
47138
47139
47140
47141
47142    # "-z relro" supported in GNU binutils 2.17 and later
47143    LINKER_RELRO_FLAG="-Wl,-z,relro"
47144
47145
47146
47147
47148
47149
47150
47151
47152
47153
47154
47155
47156
47157
47158
47159
47160
47161
47162
47163
47164
47165
47166
47167
47168
47169
47170
47171
47172
47173
47174
47175
47176
47177
47178
47179
47180
47181
47182
47183
47184
47185
47186
47187
47188
47189
47190
47191    # Execute function body
47192
47193  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_RELRO_FLAG\"" >&5
47194$as_echo_n "checking if linker supports \"$LINKER_RELRO_FLAG\"... " >&6; }
47195  supports=yes
47196
47197  saved_ldflags="$LDFLAGS"
47198  LDFLAGS="$LDFLAGS $LINKER_RELRO_FLAG"
47199  ac_ext=c
47200ac_cpp='$CPP $CPPFLAGS'
47201ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47202ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47203ac_compiler_gnu=$ac_cv_c_compiler_gnu
47204
47205  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47206/* end confdefs.h.  */
47207
47208int
47209main ()
47210{
47211
47212  ;
47213  return 0;
47214}
47215_ACEOF
47216if ac_fn_c_try_link "$LINENO"; then :
47217
47218else
47219  supports=no
47220fi
47221rm -f core conftest.err conftest.$ac_objext \
47222    conftest$ac_exeext conftest.$ac_ext
47223  ac_ext=cpp
47224ac_cpp='$CXXCPP $CPPFLAGS'
47225ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47226ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47227ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47228
47229  LDFLAGS="$saved_ldflags"
47230
47231  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47232$as_echo "$supports" >&6; }
47233  if test "x$supports" = "xyes" ; then
47234    :
47235    HAS_LINKER_RELRO=true
47236  else
47237    :
47238    HAS_LINKER_RELRO=false
47239  fi
47240
47241
47242
47243
47244
47245
47246
47247
47248
47249
47250
47251
47252
47253    # "-z now" supported in GNU binutils 2.11 and later
47254    LINKER_NOW_FLAG="-Wl,-z,now"
47255
47256
47257
47258
47259
47260
47261
47262
47263
47264
47265
47266
47267
47268
47269
47270
47271
47272
47273
47274
47275
47276
47277
47278
47279
47280
47281
47282
47283
47284
47285
47286
47287
47288
47289
47290
47291
47292
47293
47294
47295
47296
47297
47298
47299
47300
47301
47302    # Execute function body
47303
47304  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if linker supports \"$LINKER_NOW_FLAG\"" >&5
47305$as_echo_n "checking if linker supports \"$LINKER_NOW_FLAG\"... " >&6; }
47306  supports=yes
47307
47308  saved_ldflags="$LDFLAGS"
47309  LDFLAGS="$LDFLAGS $LINKER_NOW_FLAG"
47310  ac_ext=c
47311ac_cpp='$CPP $CPPFLAGS'
47312ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47313ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47314ac_compiler_gnu=$ac_cv_c_compiler_gnu
47315
47316  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47317/* end confdefs.h.  */
47318
47319int
47320main ()
47321{
47322
47323  ;
47324  return 0;
47325}
47326_ACEOF
47327if ac_fn_c_try_link "$LINENO"; then :
47328
47329else
47330  supports=no
47331fi
47332rm -f core conftest.err conftest.$ac_objext \
47333    conftest$ac_exeext conftest.$ac_ext
47334  ac_ext=cpp
47335ac_cpp='$CXXCPP $CPPFLAGS'
47336ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
47337ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
47338ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
47339
47340  LDFLAGS="$saved_ldflags"
47341
47342  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
47343$as_echo "$supports" >&6; }
47344  if test "x$supports" = "xyes" ; then
47345    :
47346    HAS_LINKER_NOW=true
47347  else
47348    :
47349    HAS_LINKER_NOW=false
47350  fi
47351
47352
47353
47354
47355
47356
47357
47358
47359
47360
47361
47362
47363  fi
47364
47365  # Check for broken SuSE 'ld' for which 'Only anonymous version tag is allowed
47366  # in executable.'
47367  USING_BROKEN_SUSE_LD=no
47368  if test "x$OPENJDK_TARGET_OS" = xlinux && test "x$TOOLCHAIN_TYPE" = xgcc; then
47369    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for broken SuSE 'ld' which only understands anonymous version tags in executables" >&5
47370$as_echo_n "checking for broken SuSE 'ld' which only understands anonymous version tags in executables... " >&6; }
47371    $ECHO "SUNWprivate_1.1 { local: *; };" > version-script.map
47372    $ECHO "int main() { }" > main.c
47373    if $CXX -Wl,-version-script=version-script.map main.c 2>&5 >&5; then
47374      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47375$as_echo "no" >&6; }
47376      USING_BROKEN_SUSE_LD=no
47377    else
47378      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47379$as_echo "yes" >&6; }
47380      USING_BROKEN_SUSE_LD=yes
47381    fi
47382    rm -rf version-script.map main.c a.out
47383  fi
47384
47385
47386  # Setup hotspot lecagy names for toolchains
47387  HOTSPOT_TOOLCHAIN_TYPE=$TOOLCHAIN_TYPE
47388  if test "x$TOOLCHAIN_TYPE" = xclang; then
47389    HOTSPOT_TOOLCHAIN_TYPE=gcc
47390  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47391    HOTSPOT_TOOLCHAIN_TYPE=sparcWorks
47392  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47393    HOTSPOT_TOOLCHAIN_TYPE=visCPP
47394  fi
47395
47396
47397
47398# Setup the JTReg Regression Test Harness.
47399
47400
47401# Check whether --with-jtreg was given.
47402if test "${with_jtreg+set}" = set; then :
47403  withval=$with_jtreg;
47404else
47405  with_jtreg=no
47406fi
47407
47408
47409  if test "x$with_jtreg" = xno; then
47410    # jtreg disabled
47411    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47412$as_echo_n "checking for jtreg... " >&6; }
47413    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47414$as_echo "no" >&6; }
47415  else
47416    if test "x$with_jtreg" != xyes; then
47417      # with path specified.
47418      JT_HOME="$with_jtreg"
47419    fi
47420
47421    if test "x$JT_HOME" != x; then
47422      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jtreg" >&5
47423$as_echo_n "checking for jtreg... " >&6; }
47424
47425      # use JT_HOME enviroment var.
47426
47427  # Only process if variable expands to non-empty
47428
47429  if test "x$JT_HOME" != x; then
47430    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47431
47432  # Input might be given as Windows format, start by converting to
47433  # unix format.
47434  path="$JT_HOME"
47435  new_path=`$CYGPATH -u "$path"`
47436
47437  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
47438  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
47439  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
47440  # "foo.exe" is OK but "foo" is an error.
47441  #
47442  # This test is therefore slightly more accurate than "test -f" to check for file precense.
47443  # It is also a way to make sure we got the proper file name for the real test later on.
47444  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
47445  if test "x$test_shortpath" = x; then
47446    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47447$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47448    as_fn_error $? "Cannot locate the the path of JT_HOME" "$LINENO" 5
47449  fi
47450
47451  # Call helper function which possibly converts this using DOS-style short mode.
47452  # If so, the updated path is stored in $new_path.
47453
47454  input_path="$new_path"
47455  # Check if we need to convert this using DOS-style short mode. If the path
47456  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47457  # take no chances and rewrite it.
47458  # Note: m4 eats our [], so we need to use [ and ] instead.
47459  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
47460  if test "x$has_forbidden_chars" != x; then
47461    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47462    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
47463    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
47464    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
47465      # Going to short mode and back again did indeed matter. Since short mode is
47466      # case insensitive, let's make it lowercase to improve readability.
47467      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47468      # Now convert it back to Unix-style (cygpath)
47469      input_path=`$CYGPATH -u "$shortmode_path"`
47470      new_path="$input_path"
47471    fi
47472  fi
47473
47474  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
47475  if test "x$test_cygdrive_prefix" = x; then
47476    # As a simple fix, exclude /usr/bin since it's not a real path.
47477    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
47478      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
47479      # a path prefixed by /cygdrive for fixpath to work.
47480      new_path="$CYGWIN_ROOT_PATH$input_path"
47481    fi
47482  fi
47483
47484
47485  if test "x$path" != "x$new_path"; then
47486    JT_HOME="$new_path"
47487    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47488$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47489  fi
47490
47491    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47492
47493  path="$JT_HOME"
47494  has_colon=`$ECHO $path | $GREP ^.:`
47495  new_path="$path"
47496  if test "x$has_colon" = x; then
47497    # Not in mixed or Windows style, start by that.
47498    new_path=`cmd //c echo $path`
47499  fi
47500
47501
47502  input_path="$new_path"
47503  # Check if we need to convert this using DOS-style short mode. If the path
47504  # contains just simple characters, use it. Otherwise (spaces, weird characters),
47505  # take no chances and rewrite it.
47506  # Note: m4 eats our [], so we need to use [ and ] instead.
47507  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
47508  if test "x$has_forbidden_chars" != x; then
47509    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
47510    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
47511  fi
47512
47513
47514  windows_path="$new_path"
47515  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
47516    unix_path=`$CYGPATH -u "$windows_path"`
47517    new_path="$unix_path"
47518  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
47519    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
47520    new_path="$unix_path"
47521  fi
47522
47523  if test "x$path" != "x$new_path"; then
47524    JT_HOME="$new_path"
47525    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting JT_HOME to \"$new_path\"" >&5
47526$as_echo "$as_me: Rewriting JT_HOME to \"$new_path\"" >&6;}
47527  fi
47528
47529  # Save the first 10 bytes of this path to the storage, so fixpath can work.
47530  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
47531
47532    else
47533      # We're on a unix platform. Hooray! :)
47534      path="$JT_HOME"
47535      has_space=`$ECHO "$path" | $GREP " "`
47536      if test "x$has_space" != x; then
47537        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of JT_HOME, which resolves as \"$path\", is invalid." >&5
47538$as_echo "$as_me: The path of JT_HOME, which resolves as \"$path\", is invalid." >&6;}
47539        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
47540      fi
47541
47542      # Use eval to expand a potential ~
47543      eval path="$path"
47544      if test ! -f "$path" && test ! -d "$path"; then
47545        as_fn_error $? "The path of JT_HOME, which resolves as \"$path\", is not found." "$LINENO" 5
47546      fi
47547
47548      if test -d "$path"; then
47549        JT_HOME="`cd "$path"; $THEPWDCMD -L`"
47550      else
47551        dir="`$DIRNAME "$path"`"
47552        base="`$BASENAME "$path"`"
47553        JT_HOME="`cd "$dir"; $THEPWDCMD -L`/$base"
47554      fi
47555    fi
47556  fi
47557
47558
47559      # jtreg win32 script works for everybody
47560      JTREGEXE="$JT_HOME/bin/jtreg"
47561
47562      if test ! -f "$JTREGEXE"; then
47563        as_fn_error $? "JTReg executable does not exist: $JTREGEXE" "$LINENO" 5
47564      fi
47565
47566      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47567$as_echo "$JTREGEXE" >&6; }
47568    else
47569      # try to find jtreg on path
47570
47571
47572
47573  # Publish this variable in the help.
47574
47575
47576  if [ -z "${JTREGEXE+x}" ]; then
47577    # The variable is not set by user, try to locate tool using the code snippet
47578    for ac_prog in jtreg
47579do
47580  # Extract the first word of "$ac_prog", so it can be a program name with args.
47581set dummy $ac_prog; ac_word=$2
47582{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47583$as_echo_n "checking for $ac_word... " >&6; }
47584if ${ac_cv_path_JTREGEXE+:} false; then :
47585  $as_echo_n "(cached) " >&6
47586else
47587  case $JTREGEXE in
47588  [\\/]* | ?:[\\/]*)
47589  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47590  ;;
47591  *)
47592  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47593for as_dir in $PATH
47594do
47595  IFS=$as_save_IFS
47596  test -z "$as_dir" && as_dir=.
47597    for ac_exec_ext in '' $ac_executable_extensions; do
47598  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47599    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47600    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47601    break 2
47602  fi
47603done
47604  done
47605IFS=$as_save_IFS
47606
47607  ;;
47608esac
47609fi
47610JTREGEXE=$ac_cv_path_JTREGEXE
47611if test -n "$JTREGEXE"; then
47612  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47613$as_echo "$JTREGEXE" >&6; }
47614else
47615  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47616$as_echo "no" >&6; }
47617fi
47618
47619
47620  test -n "$JTREGEXE" && break
47621done
47622
47623  else
47624    # The variable is set, but is it from the command line or the environment?
47625
47626    # Try to remove the string !JTREGEXE! from our list.
47627    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!JTREGEXE!/}
47628    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
47629      # If it failed, the variable was not from the command line. Ignore it,
47630      # but warn the user (except for BASH, which is always set by the calling BASH).
47631      if test "xJTREGEXE" != xBASH; then
47632        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&5
47633$as_echo "$as_me: WARNING: Ignoring value of JTREGEXE from the environment. Use command line variables instead." >&2;}
47634      fi
47635      # Try to locate tool using the code snippet
47636      for ac_prog in jtreg
47637do
47638  # Extract the first word of "$ac_prog", so it can be a program name with args.
47639set dummy $ac_prog; ac_word=$2
47640{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47641$as_echo_n "checking for $ac_word... " >&6; }
47642if ${ac_cv_path_JTREGEXE+:} false; then :
47643  $as_echo_n "(cached) " >&6
47644else
47645  case $JTREGEXE in
47646  [\\/]* | ?:[\\/]*)
47647  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47648  ;;
47649  *)
47650  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47651for as_dir in $PATH
47652do
47653  IFS=$as_save_IFS
47654  test -z "$as_dir" && as_dir=.
47655    for ac_exec_ext in '' $ac_executable_extensions; do
47656  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47657    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47658    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47659    break 2
47660  fi
47661done
47662  done
47663IFS=$as_save_IFS
47664
47665  ;;
47666esac
47667fi
47668JTREGEXE=$ac_cv_path_JTREGEXE
47669if test -n "$JTREGEXE"; then
47670  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47671$as_echo "$JTREGEXE" >&6; }
47672else
47673  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47674$as_echo "no" >&6; }
47675fi
47676
47677
47678  test -n "$JTREGEXE" && break
47679done
47680
47681    else
47682      # If it succeeded, then it was overridden by the user. We will use it
47683      # for the tool.
47684
47685      # First remove it from the list of overridden variables, so we can test
47686      # for unknown variables in the end.
47687      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
47688
47689      # Check if we try to supply an empty value
47690      if test "x$JTREGEXE" = x; then
47691        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool JTREGEXE= (no value)" >&5
47692$as_echo "$as_me: Setting user supplied tool JTREGEXE= (no value)" >&6;}
47693        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47694$as_echo_n "checking for JTREGEXE... " >&6; }
47695        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
47696$as_echo "disabled" >&6; }
47697      else
47698        # Check if the provided tool contains a complete path.
47699        tool_specified="$JTREGEXE"
47700        tool_basename="${tool_specified##*/}"
47701        if test "x$tool_basename" = "x$tool_specified"; then
47702          # A command without a complete path is provided, search $PATH.
47703          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool JTREGEXE=$tool_basename" >&5
47704$as_echo "$as_me: Will search for user supplied tool JTREGEXE=$tool_basename" >&6;}
47705          # Extract the first word of "$tool_basename", so it can be a program name with args.
47706set dummy $tool_basename; ac_word=$2
47707{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
47708$as_echo_n "checking for $ac_word... " >&6; }
47709if ${ac_cv_path_JTREGEXE+:} false; then :
47710  $as_echo_n "(cached) " >&6
47711else
47712  case $JTREGEXE in
47713  [\\/]* | ?:[\\/]*)
47714  ac_cv_path_JTREGEXE="$JTREGEXE" # Let the user override the test with a path.
47715  ;;
47716  *)
47717  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
47718for as_dir in $PATH
47719do
47720  IFS=$as_save_IFS
47721  test -z "$as_dir" && as_dir=.
47722    for ac_exec_ext in '' $ac_executable_extensions; do
47723  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
47724    ac_cv_path_JTREGEXE="$as_dir/$ac_word$ac_exec_ext"
47725    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
47726    break 2
47727  fi
47728done
47729  done
47730IFS=$as_save_IFS
47731
47732  ;;
47733esac
47734fi
47735JTREGEXE=$ac_cv_path_JTREGEXE
47736if test -n "$JTREGEXE"; then
47737  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JTREGEXE" >&5
47738$as_echo "$JTREGEXE" >&6; }
47739else
47740  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47741$as_echo "no" >&6; }
47742fi
47743
47744
47745          if test "x$JTREGEXE" = x; then
47746            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
47747          fi
47748        else
47749          # Otherwise we believe it is a complete path. Use it as it is.
47750          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool JTREGEXE=$tool_specified" >&5
47751$as_echo "$as_me: Will use user supplied tool JTREGEXE=$tool_specified" >&6;}
47752          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for JTREGEXE" >&5
47753$as_echo_n "checking for JTREGEXE... " >&6; }
47754          if test ! -x "$tool_specified"; then
47755            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
47756$as_echo "not found" >&6; }
47757            as_fn_error $? "User supplied tool JTREGEXE=$tool_specified does not exist or is not executable" "$LINENO" 5
47758          fi
47759          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
47760$as_echo "$tool_specified" >&6; }
47761        fi
47762      fi
47763    fi
47764
47765  fi
47766
47767
47768
47769  if test "x$JTREGEXE" = x; then
47770    as_fn_error $? "Could not find required tool for JTREGEXE" "$LINENO" 5
47771  fi
47772
47773
47774      JT_HOME="`$DIRNAME $JTREGEXE`"
47775    fi
47776  fi
47777
47778
47779
47780
47781
47782
47783  # COMPILER_TARGET_BITS_FLAG  : option for selecting 32- or 64-bit output
47784  # COMPILER_COMMAND_FILE_FLAG : option for passing a command file to the compiler
47785  # COMPILER_BINDCMD_FILE_FLAG : option for specifying a file which saves the binder
47786  #                              commands produced by the link step (currently AIX only)
47787  if test "x$TOOLCHAIN_TYPE" = xxlc; then
47788    COMPILER_TARGET_BITS_FLAG="-q"
47789    COMPILER_COMMAND_FILE_FLAG="-f"
47790    COMPILER_BINDCMD_FILE_FLAG="-bloadmap:"
47791  else
47792    COMPILER_TARGET_BITS_FLAG="-m"
47793    COMPILER_COMMAND_FILE_FLAG="@"
47794    COMPILER_BINDCMD_FILE_FLAG=""
47795
47796    # The solstudio linker does not support @-files.
47797    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
47798      COMPILER_COMMAND_FILE_FLAG=
47799    fi
47800
47801    # Check if @file is supported by gcc
47802    if test "x$TOOLCHAIN_TYPE" = xgcc; then
47803      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if @file is supported by gcc" >&5
47804$as_echo_n "checking if @file is supported by gcc... " >&6; }
47805      # Extra emtpy "" to prevent ECHO from interpreting '--version' as argument
47806      $ECHO "" "--version" > command.file
47807      if $CXX @command.file 2>&5 >&5; then
47808        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
47809$as_echo "yes" >&6; }
47810        COMPILER_COMMAND_FILE_FLAG="@"
47811      else
47812        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
47813$as_echo "no" >&6; }
47814        COMPILER_COMMAND_FILE_FLAG=
47815      fi
47816      rm -rf command.file
47817    fi
47818  fi
47819
47820
47821
47822
47823  # FIXME: figure out if we should select AR flags depending on OS or toolchain.
47824  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
47825    ARFLAGS="-r"
47826  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47827    ARFLAGS="-X64"
47828  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
47829    # lib.exe is used as AR to create static libraries.
47830    ARFLAGS="-nologo -NODEFAULTLIB:MSVCRT"
47831  else
47832    ARFLAGS=""
47833  fi
47834
47835
47836  ## Setup strip.
47837  # FIXME: should this really be per platform, or should it be per toolchain type?
47838  # strip is not provided by clang or solstudio; so guessing platform makes most sense.
47839  # FIXME: we should really only export STRIPFLAGS from here, not POST_STRIP_CMD.
47840  if test "x$OPENJDK_TARGET_OS" = xlinux; then
47841    STRIPFLAGS="-g"
47842  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
47843    STRIPFLAGS="-x"
47844  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
47845    STRIPFLAGS="-S"
47846  elif test "x$OPENJDK_TARGET_OS" = xaix; then
47847    STRIPFLAGS="-X32_64"
47848  fi
47849
47850
47851
47852  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47853    CC_OUT_OPTION=-Fo
47854    EXE_OUT_OPTION=-out:
47855    LD_OUT_OPTION=-out:
47856    AR_OUT_OPTION=-out:
47857  else
47858    # The option used to specify the target .o,.a or .so file.
47859    # When compiling, how to specify the to be created object file.
47860    CC_OUT_OPTION='-o$(SPACE)'
47861    # When linking, how to specify the to be created executable.
47862    EXE_OUT_OPTION='-o$(SPACE)'
47863    # When linking, how to specify the to be created dynamically linkable library.
47864    LD_OUT_OPTION='-o$(SPACE)'
47865    # When archiving, how to specify the to be create static archive for object files.
47866    AR_OUT_OPTION='rcs$(SPACE)'
47867  fi
47868
47869
47870
47871
47872
47873  # On Windows, we need to set RC flags.
47874  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47875    RC_FLAGS="-nologo -l0x409"
47876    JVM_RCFLAGS="-nologo"
47877    if test "x$DEBUG_LEVEL" = xrelease; then
47878      RC_FLAGS="$RC_FLAGS -DNDEBUG"
47879      JVM_RCFLAGS="$JVM_RCFLAGS -DNDEBUG"
47880    fi
47881
47882    # The version variables used to create RC_FLAGS may be overridden
47883    # in a custom configure script, or possibly the command line.
47884    # Let those variables be expanded at make time in spec.gmk.
47885    # The \$ are escaped to the shell, and the $(...) variables
47886    # are evaluated by make.
47887    RC_FLAGS="$RC_FLAGS \
47888        -D\"JDK_VERSION_STRING=\$(VERSION_STRING)\" \
47889        -D\"JDK_COMPANY=\$(COMPANY_NAME)\" \
47890        -D\"JDK_COMPONENT=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) binary\" \
47891        -D\"JDK_VER=\$(VERSION_NUMBER)\" \
47892        -D\"JDK_COPYRIGHT=Copyright \xA9 $COPYRIGHT_YEAR\" \
47893        -D\"JDK_NAME=\$(PRODUCT_NAME) \$(JDK_RC_PLATFORM_NAME) \$(VERSION_MAJOR)\" \
47894        -D\"JDK_FVER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\""
47895
47896    JVM_RCFLAGS="$JVM_RCFLAGS \
47897        -D\"HS_BUILD_ID=\$(VERSION_STRING)\" \
47898        -D\"HS_COMPANY=\$(COMPANY_NAME)\" \
47899        -D\"JDK_DOTVER=\$(VERSION_NUMBER_FOUR_POSITIONS)\" \
47900        -D\"HS_COPYRIGHT=Copyright $COPYRIGHT_YEAR\" \
47901        -D\"HS_NAME=\$(PRODUCT_NAME) \$(VERSION_SHORT)\" \
47902        -D\"JDK_VER=\$(subst .,\$(COMMA),\$(VERSION_NUMBER_FOUR_POSITIONS))\" \
47903        -D\"HS_FNAME=jvm.dll\" \
47904        -D\"HS_INTERNAL_NAME=jvm\""
47905  fi
47906
47907
47908
47909  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
47910    # silence copyright notice and other headers.
47911    COMMON_CCXXFLAGS="$COMMON_CCXXFLAGS -nologo"
47912  fi
47913
47914
47915# Now we can test some aspects on the target using configure macros.
47916
47917{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5
47918$as_echo_n "checking for ANSI C header files... " >&6; }
47919if ${ac_cv_header_stdc+:} false; then :
47920  $as_echo_n "(cached) " >&6
47921else
47922  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47923/* end confdefs.h.  */
47924#include <stdlib.h>
47925#include <stdarg.h>
47926#include <string.h>
47927#include <float.h>
47928
47929int
47930main ()
47931{
47932
47933  ;
47934  return 0;
47935}
47936_ACEOF
47937if ac_fn_cxx_try_compile "$LINENO"; then :
47938  ac_cv_header_stdc=yes
47939else
47940  ac_cv_header_stdc=no
47941fi
47942rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
47943
47944if test $ac_cv_header_stdc = yes; then
47945  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
47946  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47947/* end confdefs.h.  */
47948#include <string.h>
47949
47950_ACEOF
47951if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47952  $EGREP "memchr" >/dev/null 2>&1; then :
47953
47954else
47955  ac_cv_header_stdc=no
47956fi
47957rm -f conftest*
47958
47959fi
47960
47961if test $ac_cv_header_stdc = yes; then
47962  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
47963  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47964/* end confdefs.h.  */
47965#include <stdlib.h>
47966
47967_ACEOF
47968if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
47969  $EGREP "free" >/dev/null 2>&1; then :
47970
47971else
47972  ac_cv_header_stdc=no
47973fi
47974rm -f conftest*
47975
47976fi
47977
47978if test $ac_cv_header_stdc = yes; then
47979  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
47980  if test "$cross_compiling" = yes; then :
47981  :
47982else
47983  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
47984/* end confdefs.h.  */
47985#include <ctype.h>
47986#include <stdlib.h>
47987#if ((' ' & 0x0FF) == 0x020)
47988# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
47989# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
47990#else
47991# define ISLOWER(c) \
47992		   (('a' <= (c) && (c) <= 'i') \
47993		     || ('j' <= (c) && (c) <= 'r') \
47994		     || ('s' <= (c) && (c) <= 'z'))
47995# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
47996#endif
47997
47998#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
47999int
48000main ()
48001{
48002  int i;
48003  for (i = 0; i < 256; i++)
48004    if (XOR (islower (i), ISLOWER (i))
48005	|| toupper (i) != TOUPPER (i))
48006      return 2;
48007  return 0;
48008}
48009_ACEOF
48010if ac_fn_cxx_try_run "$LINENO"; then :
48011
48012else
48013  ac_cv_header_stdc=no
48014fi
48015rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48016  conftest.$ac_objext conftest.beam conftest.$ac_ext
48017fi
48018
48019fi
48020fi
48021{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5
48022$as_echo "$ac_cv_header_stdc" >&6; }
48023if test $ac_cv_header_stdc = yes; then
48024
48025$as_echo "#define STDC_HEADERS 1" >>confdefs.h
48026
48027fi
48028
48029# On IRIX 5.3, sys/types and inttypes.h are conflicting.
48030for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
48031		  inttypes.h stdint.h unistd.h
48032do :
48033  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
48034ac_fn_cxx_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default
48035"
48036if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
48037  cat >>confdefs.h <<_ACEOF
48038#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
48039_ACEOF
48040
48041fi
48042
48043done
48044
48045
48046
48047  ###############################################################################
48048  #
48049  # Now we check if libjvm.so will use 32 or 64 bit pointers for the C/C++ code.
48050  # (The JVM can use 32 or 64 bit Java pointers but that decision
48051  # is made at runtime.)
48052  #
48053
48054  if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xaix; then
48055    # Always specify -m flag on Solaris
48056    # And -q on AIX because otherwise the compiler produces 32-bit objects by default
48057
48058  # When we add flags to the "official" CFLAGS etc, we need to
48059  # keep track of these additions in ADDED_CFLAGS etc. These
48060  # will later be checked to make sure only controlled additions
48061  # have been made to CFLAGS etc.
48062  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48063  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48064  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48065
48066  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48067  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48068  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48069
48070  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48071  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48072  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48073
48074  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48075  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48076  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48077
48078  elif test "x$COMPILE_TYPE" = xreduced; then
48079    if test "x$OPENJDK_TARGET_OS_TYPE" = xunix; then
48080      # Specify -m if running reduced on unix platforms
48081
48082  # When we add flags to the "official" CFLAGS etc, we need to
48083  # keep track of these additions in ADDED_CFLAGS etc. These
48084  # will later be checked to make sure only controlled additions
48085  # have been made to CFLAGS etc.
48086  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48087  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48088  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48089
48090  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48091  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48092  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48093
48094  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48095  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48096  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48097
48098  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48099  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48100  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48101
48102    fi
48103  fi
48104  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48105    JVM_CFLAGS="$JVM_CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48106    JVM_LDFLAGS="$JVM_LDFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48107    JVM_ASFLAGS="$JVM_ASFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48108  fi
48109
48110  # Make compilation sanity check
48111  for ac_header in stdio.h
48112do :
48113  ac_fn_cxx_check_header_mongrel "$LINENO" "stdio.h" "ac_cv_header_stdio_h" "$ac_includes_default"
48114if test "x$ac_cv_header_stdio_h" = xyes; then :
48115  cat >>confdefs.h <<_ACEOF
48116#define HAVE_STDIO_H 1
48117_ACEOF
48118
48119else
48120
48121    { $as_echo "$as_me:${as_lineno-$LINENO}: Failed to compile stdio.h. This likely implies missing compile dependencies." >&5
48122$as_echo "$as_me: Failed to compile stdio.h. This likely implies missing compile dependencies." >&6;}
48123    if test "x$COMPILE_TYPE" = xreduced; then
48124
48125  # Print a helpful message on how to acquire the necessary build dependency.
48126  # reduced is the help tag: freetype, cups, alsa etc
48127  MISSING_DEPENDENCY=reduced
48128
48129  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48130    cygwin_help $MISSING_DEPENDENCY
48131  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48132    msys_help $MISSING_DEPENDENCY
48133  else
48134    PKGHANDLER_COMMAND=
48135
48136    case $PKGHANDLER in
48137      apt-get)
48138        apt_help     $MISSING_DEPENDENCY ;;
48139      yum)
48140        yum_help     $MISSING_DEPENDENCY ;;
48141      port)
48142        port_help    $MISSING_DEPENDENCY ;;
48143      pkgutil)
48144        pkgutil_help $MISSING_DEPENDENCY ;;
48145      pkgadd)
48146        pkgadd_help  $MISSING_DEPENDENCY ;;
48147    esac
48148
48149    if test "x$PKGHANDLER_COMMAND" != x; then
48150      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48151    fi
48152  fi
48153
48154      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48155$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48156    elif test "x$COMPILE_TYPE" = xcross; then
48157      { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48158$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48159    fi
48160    as_fn_error $? "Cannot continue." "$LINENO" 5
48161
48162fi
48163
48164done
48165
48166
48167  # The cast to long int works around a bug in the HP C Compiler
48168# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48169# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48170# This bug is HP SR number 8606223364.
48171{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48172$as_echo_n "checking size of int *... " >&6; }
48173if ${ac_cv_sizeof_int_p+:} false; then :
48174  $as_echo_n "(cached) " >&6
48175else
48176  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48177
48178else
48179  if test "$ac_cv_type_int_p" = yes; then
48180     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48181$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48182as_fn_error 77 "cannot compute sizeof (int *)
48183See \`config.log' for more details" "$LINENO" 5; }
48184   else
48185     ac_cv_sizeof_int_p=0
48186   fi
48187fi
48188
48189fi
48190{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48191$as_echo "$ac_cv_sizeof_int_p" >&6; }
48192
48193
48194
48195cat >>confdefs.h <<_ACEOF
48196#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48197_ACEOF
48198
48199
48200
48201  # AC_CHECK_SIZEOF defines 'ac_cv_sizeof_int_p' to hold the number of bytes used by an 'int*'
48202  if test "x$ac_cv_sizeof_int_p" = x; then
48203    # The test failed, lets stick to the assumed value.
48204    { $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
48205$as_echo "$as_me: WARNING: The number of bits in the target could not be determined, using $OPENJDK_TARGET_CPU_BITS." >&2;}
48206  else
48207    TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48208
48209    if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48210      # This situation may happen on 64-bit platforms where the compiler by default only generates 32-bit objects
48211      # Let's try to implicitely set the compilers target architecture and retry the test
48212      { $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
48213$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;}
48214      { $as_echo "$as_me:${as_lineno-$LINENO}: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&5
48215$as_echo "$as_me: Retrying with platforms compiler target bits flag to ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}" >&6;}
48216
48217  # When we add flags to the "official" CFLAGS etc, we need to
48218  # keep track of these additions in ADDED_CFLAGS etc. These
48219  # will later be checked to make sure only controlled additions
48220  # have been made to CFLAGS etc.
48221  ADDED_CFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48222  ADDED_CXXFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48223  ADDED_LDFLAGS=" ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
48224
48225  CFLAGS="${CFLAGS}${ADDED_CFLAGS}"
48226  CXXFLAGS="${CXXFLAGS}${ADDED_CXXFLAGS}"
48227  LDFLAGS="${LDFLAGS}${ADDED_LDFLAGS}"
48228
48229  CFLAGS_JDK="${CFLAGS_JDK}${ADDED_CFLAGS}"
48230  CXXFLAGS_JDK="${CXXFLAGS_JDK}${ADDED_CXXFLAGS}"
48231  LDFLAGS_JDK="${LDFLAGS_JDK}${ADDED_LDFLAGS}"
48232
48233  JVM_CFLAGS="$JVM_CFLAGS $ADDED_CFLAGS"
48234  JVM_LDFLAGS="$JVM_LDFLAGS $ADDED_LDFLAGS"
48235  JVM_ASFLAGS="$JVM_ASFLAGS $ADDED_CFLAGS"
48236
48237
48238      # We have to unset 'ac_cv_sizeof_int_p' first, otherwise AC_CHECK_SIZEOF will use the previously cached value!
48239      unset ac_cv_sizeof_int_p
48240      # And we have to undef the definition of SIZEOF_INT_P in confdefs.h by the previous invocation of AC_CHECK_SIZEOF
48241      cat >>confdefs.h <<_ACEOF
48242#undef SIZEOF_INT_P
48243_ACEOF
48244
48245      # The cast to long int works around a bug in the HP C Compiler
48246# version HP92453-01 B.11.11.23709.GP, which incorrectly rejects
48247# declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'.
48248# This bug is HP SR number 8606223364.
48249{ $as_echo "$as_me:${as_lineno-$LINENO}: checking size of int *" >&5
48250$as_echo_n "checking size of int *... " >&6; }
48251if ${ac_cv_sizeof_int_p+:} false; then :
48252  $as_echo_n "(cached) " >&6
48253else
48254  if ac_fn_cxx_compute_int "$LINENO" "(long int) (sizeof (int *))" "ac_cv_sizeof_int_p"        "$ac_includes_default"; then :
48255
48256else
48257  if test "$ac_cv_type_int_p" = yes; then
48258     { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5
48259$as_echo "$as_me: error: in \`$ac_pwd':" >&2;}
48260as_fn_error 77 "cannot compute sizeof (int *)
48261See \`config.log' for more details" "$LINENO" 5; }
48262   else
48263     ac_cv_sizeof_int_p=0
48264   fi
48265fi
48266
48267fi
48268{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_sizeof_int_p" >&5
48269$as_echo "$ac_cv_sizeof_int_p" >&6; }
48270
48271
48272
48273cat >>confdefs.h <<_ACEOF
48274#define SIZEOF_INT_P $ac_cv_sizeof_int_p
48275_ACEOF
48276
48277
48278
48279      TESTED_TARGET_CPU_BITS=`expr 8 \* $ac_cv_sizeof_int_p`
48280
48281      if test "x$TESTED_TARGET_CPU_BITS" != "x$OPENJDK_TARGET_CPU_BITS"; then
48282        { $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
48283$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;}
48284        if test "x$COMPILE_TYPE" = xreduced; then
48285
48286  # Print a helpful message on how to acquire the necessary build dependency.
48287  # reduced is the help tag: freetype, cups, alsa etc
48288  MISSING_DEPENDENCY=reduced
48289
48290  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
48291    cygwin_help $MISSING_DEPENDENCY
48292  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
48293    msys_help $MISSING_DEPENDENCY
48294  else
48295    PKGHANDLER_COMMAND=
48296
48297    case $PKGHANDLER in
48298      apt-get)
48299        apt_help     $MISSING_DEPENDENCY ;;
48300      yum)
48301        yum_help     $MISSING_DEPENDENCY ;;
48302      port)
48303        port_help    $MISSING_DEPENDENCY ;;
48304      pkgutil)
48305        pkgutil_help $MISSING_DEPENDENCY ;;
48306      pkgadd)
48307        pkgadd_help  $MISSING_DEPENDENCY ;;
48308    esac
48309
48310    if test "x$PKGHANDLER_COMMAND" != x; then
48311      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
48312    fi
48313  fi
48314
48315          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&5
48316$as_echo "$as_me: You are doing a reduced build. Check that you have 32-bit libraries installed. $HELP_MSG" >&6;}
48317        elif test "x$COMPILE_TYPE" = xcross; then
48318          { $as_echo "$as_me:${as_lineno-$LINENO}: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&5
48319$as_echo "$as_me: You are doing a cross-compilation. Check that you have all target platform libraries installed." >&6;}
48320        fi
48321        as_fn_error $? "Cannot continue." "$LINENO" 5
48322      fi
48323    fi
48324  fi
48325
48326  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for target address size" >&5
48327$as_echo_n "checking for target address size... " >&6; }
48328  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OPENJDK_TARGET_CPU_BITS bits" >&5
48329$as_echo "$OPENJDK_TARGET_CPU_BITS bits" >&6; }
48330
48331
48332  ###############################################################################
48333  #
48334  # Is the target little of big endian?
48335  #
48336   { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5
48337$as_echo_n "checking whether byte ordering is bigendian... " >&6; }
48338if ${ac_cv_c_bigendian+:} false; then :
48339  $as_echo_n "(cached) " >&6
48340else
48341  ac_cv_c_bigendian=unknown
48342    # See if we're dealing with a universal compiler.
48343    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48344/* end confdefs.h.  */
48345#ifndef __APPLE_CC__
48346	       not a universal capable compiler
48347	     #endif
48348	     typedef int dummy;
48349
48350_ACEOF
48351if ac_fn_cxx_try_compile "$LINENO"; then :
48352
48353	# Check for potential -arch flags.  It is not universal unless
48354	# there are at least two -arch flags with different values.
48355	ac_arch=
48356	ac_prev=
48357	for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do
48358	 if test -n "$ac_prev"; then
48359	   case $ac_word in
48360	     i?86 | x86_64 | ppc | ppc64)
48361	       if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then
48362		 ac_arch=$ac_word
48363	       else
48364		 ac_cv_c_bigendian=universal
48365		 break
48366	       fi
48367	       ;;
48368	   esac
48369	   ac_prev=
48370	 elif test "x$ac_word" = "x-arch"; then
48371	   ac_prev=arch
48372	 fi
48373       done
48374fi
48375rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48376    if test $ac_cv_c_bigendian = unknown; then
48377      # See if sys/param.h defines the BYTE_ORDER macro.
48378      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48379/* end confdefs.h.  */
48380#include <sys/types.h>
48381	     #include <sys/param.h>
48382
48383int
48384main ()
48385{
48386#if ! (defined BYTE_ORDER && defined BIG_ENDIAN \
48387		     && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \
48388		     && LITTLE_ENDIAN)
48389	      bogus endian macros
48390	     #endif
48391
48392  ;
48393  return 0;
48394}
48395_ACEOF
48396if ac_fn_cxx_try_compile "$LINENO"; then :
48397  # It does; now see whether it defined to BIG_ENDIAN or not.
48398	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48399/* end confdefs.h.  */
48400#include <sys/types.h>
48401		#include <sys/param.h>
48402
48403int
48404main ()
48405{
48406#if BYTE_ORDER != BIG_ENDIAN
48407		 not big endian
48408		#endif
48409
48410  ;
48411  return 0;
48412}
48413_ACEOF
48414if ac_fn_cxx_try_compile "$LINENO"; then :
48415  ac_cv_c_bigendian=yes
48416else
48417  ac_cv_c_bigendian=no
48418fi
48419rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48420fi
48421rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48422    fi
48423    if test $ac_cv_c_bigendian = unknown; then
48424      # See if <limits.h> defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris).
48425      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48426/* end confdefs.h.  */
48427#include <limits.h>
48428
48429int
48430main ()
48431{
48432#if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN)
48433	      bogus endian macros
48434	     #endif
48435
48436  ;
48437  return 0;
48438}
48439_ACEOF
48440if ac_fn_cxx_try_compile "$LINENO"; then :
48441  # It does; now see whether it defined to _BIG_ENDIAN or not.
48442	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48443/* end confdefs.h.  */
48444#include <limits.h>
48445
48446int
48447main ()
48448{
48449#ifndef _BIG_ENDIAN
48450		 not big endian
48451		#endif
48452
48453  ;
48454  return 0;
48455}
48456_ACEOF
48457if ac_fn_cxx_try_compile "$LINENO"; then :
48458  ac_cv_c_bigendian=yes
48459else
48460  ac_cv_c_bigendian=no
48461fi
48462rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48463fi
48464rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48465    fi
48466    if test $ac_cv_c_bigendian = unknown; then
48467      # Compile a test program.
48468      if test "$cross_compiling" = yes; then :
48469  # Try to guess by grepping values from an object file.
48470	 cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48471/* end confdefs.h.  */
48472short int ascii_mm[] =
48473		  { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 };
48474		short int ascii_ii[] =
48475		  { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 };
48476		int use_ascii (int i) {
48477		  return ascii_mm[i] + ascii_ii[i];
48478		}
48479		short int ebcdic_ii[] =
48480		  { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 };
48481		short int ebcdic_mm[] =
48482		  { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 };
48483		int use_ebcdic (int i) {
48484		  return ebcdic_mm[i] + ebcdic_ii[i];
48485		}
48486		extern int foo;
48487
48488int
48489main ()
48490{
48491return use_ascii (foo) == use_ebcdic (foo);
48492  ;
48493  return 0;
48494}
48495_ACEOF
48496if ac_fn_cxx_try_compile "$LINENO"; then :
48497  if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then
48498	      ac_cv_c_bigendian=yes
48499	    fi
48500	    if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then
48501	      if test "$ac_cv_c_bigendian" = unknown; then
48502		ac_cv_c_bigendian=no
48503	      else
48504		# finding both strings is unlikely to happen, but who knows?
48505		ac_cv_c_bigendian=unknown
48506	      fi
48507	    fi
48508fi
48509rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48510else
48511  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48512/* end confdefs.h.  */
48513$ac_includes_default
48514int
48515main ()
48516{
48517
48518	     /* Are we little or big endian?  From Harbison&Steele.  */
48519	     union
48520	     {
48521	       long int l;
48522	       char c[sizeof (long int)];
48523	     } u;
48524	     u.l = 1;
48525	     return u.c[sizeof (long int) - 1] == 1;
48526
48527  ;
48528  return 0;
48529}
48530_ACEOF
48531if ac_fn_cxx_try_run "$LINENO"; then :
48532  ac_cv_c_bigendian=no
48533else
48534  ac_cv_c_bigendian=yes
48535fi
48536rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \
48537  conftest.$ac_objext conftest.beam conftest.$ac_ext
48538fi
48539
48540    fi
48541fi
48542{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5
48543$as_echo "$ac_cv_c_bigendian" >&6; }
48544 case $ac_cv_c_bigendian in #(
48545   yes)
48546     ENDIAN="big";; #(
48547   no)
48548     ENDIAN="little" ;; #(
48549   universal)
48550     ENDIAN="universal_endianness"
48551     ;; #(
48552   *)
48553     ENDIAN="unknown" ;;
48554 esac
48555
48556
48557  if test "x$ENDIAN" = xuniversal_endianness; then
48558    as_fn_error $? "Building with both big and little endianness is not supported" "$LINENO" 5
48559  fi
48560  if test "x$ENDIAN" != "x$OPENJDK_TARGET_CPU_ENDIAN"; then
48561    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
48562  fi
48563
48564
48565# Configure flags for the tools
48566
48567  ###############################################################################
48568  #
48569  # How to compile shared libraries.
48570  #
48571
48572  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48573    PICFLAG="-fPIC"
48574    C_FLAG_REORDER=''
48575    CXX_FLAG_REORDER=''
48576
48577    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48578      # Linking is different on MacOSX
48579      if test "x$STATIC_BUILD" = xtrue; then
48580        SHARED_LIBRARY_FLAGS ='-undefined dynamic_lookup'
48581      else
48582        SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48583        JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48584      fi
48585      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48586      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48587      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48588      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48589    else
48590      # Default works for linux, might work on other platforms as well.
48591      SHARED_LIBRARY_FLAGS='-shared'
48592      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48593      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48594      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48595      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48596    fi
48597  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48598    C_FLAG_REORDER=''
48599    CXX_FLAG_REORDER=''
48600
48601    if test "x$OPENJDK_TARGET_OS" = xmacosx; then
48602      # Linking is different on MacOSX
48603      PICFLAG=''
48604      SHARED_LIBRARY_FLAGS="-dynamiclib -compatibility_version 1.0.0 -current_version 1.0.0 $PICFLAG"
48605      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,@loader_path/.'
48606      SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48607      SET_SHARED_LIBRARY_NAME='-Wl,-install_name,@rpath/$1'
48608      SET_SHARED_LIBRARY_MAPFILE='-Wl,-exported_symbols_list,$1'
48609
48610      if test "x$STATIC_BUILD" = xfalse; then
48611        JVM_CFLAGS="$JVM_CFLAGS -fPIC"
48612      fi
48613    else
48614      # Default works for linux, might work on other platforms as well.
48615      PICFLAG='-fPIC'
48616      SHARED_LIBRARY_FLAGS='-shared'
48617      SET_EXECUTABLE_ORIGIN='-Wl,-rpath,\$$$$ORIGIN$1'
48618      SET_SHARED_LIBRARY_ORIGIN="-Wl,-z,origin $SET_EXECUTABLE_ORIGIN"
48619      SET_SHARED_LIBRARY_NAME='-Wl,-soname=$1'
48620      SET_SHARED_LIBRARY_MAPFILE='-Wl,-version-script=$1'
48621    fi
48622  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48623    PICFLAG="-KPIC"
48624    C_FLAG_REORDER='-xF'
48625    CXX_FLAG_REORDER='-xF'
48626    SHARED_LIBRARY_FLAGS="-G"
48627    SET_EXECUTABLE_ORIGIN='-R\$$$$ORIGIN$1'
48628    SET_SHARED_LIBRARY_ORIGIN="$SET_EXECUTABLE_ORIGIN"
48629    SET_SHARED_LIBRARY_NAME='-h $1'
48630    SET_SHARED_LIBRARY_MAPFILE='-M$1'
48631  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48632    # '-qpic' defaults to 'qpic=small'. This means that the compiler generates only
48633    # one instruction for accessing the TOC. If the TOC grows larger than 64K, the linker
48634    # will have to patch this single instruction with a call to some out-of-order code which
48635    # does the load from the TOC. This is of course slow. But in that case we also would have
48636    # to use '-bbigtoc' for linking anyway so we could also change the PICFLAG to 'qpic=large'.
48637    # With 'qpic=large' the compiler will by default generate a two-instruction sequence which
48638    # can be patched directly by the linker and does not require a jump to out-of-order code.
48639    # Another alternative instead of using 'qpic=large -bbigtoc' may be to use '-qminimaltoc'
48640    # instead. This creates a distinct TOC for every compilation unit (and thus requires two
48641    # loads for accessing a global variable). But there are rumors that this may be seen as a
48642    # 'performance feature' because of improved code locality of the symbols used in a
48643    # compilation unit.
48644    PICFLAG="-qpic"
48645    JVM_CFLAGS="$JVM_CFLAGS $PICFLAG"
48646    C_FLAG_REORDER=''
48647    CXX_FLAG_REORDER=''
48648    SHARED_LIBRARY_FLAGS="-qmkshrobj -bM:SRE -bnoentry"
48649    SET_EXECUTABLE_ORIGIN=""
48650    SET_SHARED_LIBRARY_ORIGIN=''
48651    SET_SHARED_LIBRARY_NAME=''
48652    SET_SHARED_LIBRARY_MAPFILE=''
48653  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48654    PICFLAG=""
48655    C_FLAG_REORDER=''
48656    CXX_FLAG_REORDER=''
48657    SHARED_LIBRARY_FLAGS="-dll"
48658    SET_EXECUTABLE_ORIGIN=''
48659    SET_SHARED_LIBRARY_ORIGIN=''
48660    SET_SHARED_LIBRARY_NAME=''
48661    SET_SHARED_LIBRARY_MAPFILE='-def:$1'
48662  fi
48663
48664
48665
48666
48667
48668
48669
48670
48671
48672  # The (cross) compiler is now configured, we can now test capabilities
48673  # of the target platform.
48674
48675
48676
48677  ###############################################################################
48678  #
48679  # Setup the opt flags for different compilers
48680  # and different operating systems.
48681  #
48682
48683  # FIXME: this was indirectly the old default, but just inherited.
48684  # if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48685  #   C_FLAG_DEPS="-MMD -MF"
48686  # fi
48687
48688  # Generate make dependency files
48689  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48690    C_FLAG_DEPS="-MMD -MF"
48691  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48692    C_FLAG_DEPS="-MMD -MF"
48693  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48694    C_FLAG_DEPS="-xMMD -xMF"
48695  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48696    C_FLAG_DEPS="-qmakedep=gcc -MF"
48697  fi
48698  CXX_FLAG_DEPS="$C_FLAG_DEPS"
48699
48700
48701
48702  # Debug symbols
48703  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48704    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64" && test "x$DEBUG_LEVEL" = "xfastdebug"; then
48705      # reduce from default "-g2" option to save space
48706      CFLAGS_DEBUG_SYMBOLS="-g1"
48707      CXXFLAGS_DEBUG_SYMBOLS="-g1"
48708    else
48709      CFLAGS_DEBUG_SYMBOLS="-g"
48710      CXXFLAGS_DEBUG_SYMBOLS="-g"
48711    fi
48712  elif test "x$TOOLCHAIN_TYPE" = xclang; then
48713    CFLAGS_DEBUG_SYMBOLS="-g"
48714    CXXFLAGS_DEBUG_SYMBOLS="-g"
48715  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48716    CFLAGS_DEBUG_SYMBOLS="-g -xs"
48717    # -g0 enables debug symbols without disabling inlining.
48718    CXXFLAGS_DEBUG_SYMBOLS="-g0 -xs"
48719  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
48720    CFLAGS_DEBUG_SYMBOLS="-g"
48721    CXXFLAGS_DEBUG_SYMBOLS="-g"
48722  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48723    CFLAGS_DEBUG_SYMBOLS="-Zi"
48724    CXXFLAGS_DEBUG_SYMBOLS="-Zi"
48725  fi
48726
48727
48728
48729  # Debug symbols for JVM_CFLAGS
48730  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
48731    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -xs"
48732    if test "x$DEBUG_LEVEL" = xslowdebug; then
48733      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48734    else
48735      # -g0 does not disable inlining, which -g does.
48736      JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g0"
48737    fi
48738  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
48739    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -Z7 -d2Zi+"
48740  else
48741    JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS -g"
48742  fi
48743
48744
48745  # bounds, memory and behavior checking options
48746  if test "x$TOOLCHAIN_TYPE" = xgcc; then
48747    case $DEBUG_LEVEL in
48748    release )
48749      # no adjustment
48750      ;;
48751    fastdebug )
48752      # no adjustment
48753      ;;
48754    slowdebug )
48755      # FIXME: By adding this to C(XX)FLAGS_DEBUG_OPTIONS/JVM_CFLAGS_SYMBOLS it
48756      # get's added conditionally on whether we produce debug symbols or not.
48757      # This is most likely not really correct.
48758
48759      # Add runtime stack smashing and undefined behavior checks.
48760      # Not all versions of gcc support -fstack-protector
48761      STACK_PROTECTOR_CFLAG="-fstack-protector-all"
48762
48763
48764
48765
48766
48767
48768
48769
48770
48771
48772
48773
48774
48775
48776
48777
48778
48779
48780
48781
48782
48783
48784
48785
48786
48787
48788
48789
48790
48791
48792
48793
48794
48795
48796
48797
48798
48799
48800
48801
48802
48803
48804    # Execute function body
48805
48806
48807
48808
48809
48810
48811
48812
48813
48814
48815
48816
48817
48818
48819
48820
48821
48822
48823
48824
48825
48826
48827
48828
48829
48830
48831
48832
48833
48834
48835
48836
48837
48838
48839
48840
48841
48842
48843
48844
48845
48846
48847
48848
48849
48850
48851
48852
48853    # Execute function body
48854
48855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48856$as_echo_n "checking if the C compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48857  supports=yes
48858
48859  saved_cflags="$CFLAGS"
48860  CFLAGS="$CFLAGS $STACK_PROTECTOR_CFLAG -Werror"
48861  ac_ext=c
48862ac_cpp='$CPP $CPPFLAGS'
48863ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48864ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48865ac_compiler_gnu=$ac_cv_c_compiler_gnu
48866
48867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48868/* end confdefs.h.  */
48869int i;
48870_ACEOF
48871if ac_fn_c_try_compile "$LINENO"; then :
48872
48873else
48874  supports=no
48875fi
48876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48877  ac_ext=cpp
48878ac_cpp='$CXXCPP $CPPFLAGS'
48879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48882
48883  CFLAGS="$saved_cflags"
48884
48885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48886$as_echo "$supports" >&6; }
48887  if test "x$supports" = "xyes" ; then
48888    :
48889    C_COMP_SUPPORTS="yes"
48890  else
48891    :
48892    C_COMP_SUPPORTS="no"
48893  fi
48894
48895
48896
48897
48898
48899
48900
48901
48902
48903
48904
48905
48906
48907
48908
48909
48910
48911
48912
48913
48914
48915
48916
48917
48918
48919
48920
48921
48922
48923
48924
48925
48926
48927
48928
48929
48930
48931
48932
48933
48934
48935
48936
48937
48938
48939
48940
48941
48942
48943
48944
48945
48946
48947
48948
48949
48950
48951
48952
48953    # Execute function body
48954
48955  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
48956$as_echo_n "checking if the C++ compiler supports \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
48957  supports=yes
48958
48959  saved_cxxflags="$CXXFLAGS"
48960  CXXFLAGS="$CXXFLAG $STACK_PROTECTOR_CFLAG -Werror"
48961  ac_ext=cpp
48962ac_cpp='$CXXCPP $CPPFLAGS'
48963ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48964ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48965ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48966
48967  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
48968/* end confdefs.h.  */
48969int i;
48970_ACEOF
48971if ac_fn_cxx_try_compile "$LINENO"; then :
48972
48973else
48974  supports=no
48975fi
48976rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
48977  ac_ext=cpp
48978ac_cpp='$CXXCPP $CPPFLAGS'
48979ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
48980ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
48981ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
48982
48983  CXXFLAGS="$saved_cxxflags"
48984
48985  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
48986$as_echo "$supports" >&6; }
48987  if test "x$supports" = "xyes" ; then
48988    :
48989    CXX_COMP_SUPPORTS="yes"
48990  else
48991    :
48992    CXX_COMP_SUPPORTS="no"
48993  fi
48994
48995
48996
48997
48998
48999
49000
49001
49002
49003
49004
49005
49006
49007  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"" >&5
49008$as_echo_n "checking if both compilers support \"$STACK_PROTECTOR_CFLAG -Werror\"... " >&6; }
49009  supports=no
49010  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49011
49012  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49013$as_echo "$supports" >&6; }
49014  if test "x$supports" = "xyes" ; then
49015    :
49016
49017  else
49018    :
49019    STACK_PROTECTOR_CFLAG=""
49020  fi
49021
49022
49023
49024
49025
49026
49027
49028      CFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49029      CXXFLAGS_DEBUG_OPTIONS="$STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49030      if test "x$STACK_PROTECTOR_CFLAG" != x; then
49031        JVM_CFLAGS_SYMBOLS="$JVM_CFLAGS_SYMBOLS $STACK_PROTECTOR_CFLAG --param ssp-buffer-size=1"
49032      fi
49033      ;;
49034    esac
49035  fi
49036
49037  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49038    if test "x$DEBUG_LEVEL" != xrelease; then
49039      if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
49040        JVM_CFLAGS="$JVM_CFLAGS -homeparams"
49041      fi
49042    fi
49043  fi
49044
49045  # Optimization levels
49046  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49047    CC_HIGHEST="$CC_HIGHEST -fns -fsimple -fsingle -xbuiltin=%all -xdepend -xrestrict -xlibmil"
49048
49049    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xx86"; then
49050      # FIXME: seems we always set -xregs=no%frameptr; put it elsewhere more global?
49051      C_O_FLAG_HIGHEST_JVM="-xO4"
49052      C_O_FLAG_HIGHEST="-xO4 -Wu,-O4~yz $CC_HIGHEST -xalias_level=basic -xregs=no%frameptr"
49053      C_O_FLAG_HI="-xO4 -Wu,-O4~yz -xregs=no%frameptr"
49054      C_O_FLAG_NORM="-xO2 -Wu,-O2~yz -xregs=no%frameptr"
49055      C_O_FLAG_DEBUG="-xregs=no%frameptr"
49056      C_O_FLAG_DEBUG_JVM=""
49057      C_O_FLAG_NONE="-xregs=no%frameptr"
49058      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49059      CXX_O_FLAG_HIGHEST="-xO4 -Qoption ube -O4~yz $CC_HIGHEST -xregs=no%frameptr"
49060      CXX_O_FLAG_HI="-xO4 -Qoption ube -O4~yz -xregs=no%frameptr"
49061      CXX_O_FLAG_NORM="-xO2 -Qoption ube -O2~yz -xregs=no%frameptr"
49062      CXX_O_FLAG_DEBUG="-xregs=no%frameptr"
49063      CXX_O_FLAG_DEBUG_JVM=""
49064      CXX_O_FLAG_NONE="-xregs=no%frameptr"
49065      if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
49066        C_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST -xchip=pentium"
49067        CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_HIGHEST -xchip=pentium"
49068      fi
49069    elif test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49070      C_O_FLAG_HIGHEST_JVM="-xO4"
49071      C_O_FLAG_HIGHEST="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0 $CC_HIGHEST -xalias_level=basic -xprefetch=auto,explicit -xchip=ultra"
49072      C_O_FLAG_HI="-xO4 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49073      C_O_FLAG_NORM="-xO2 -Wc,-Qrm-s -Wc,-Qiselect-T0"
49074      C_O_FLAG_DEBUG=""
49075      C_O_FLAG_DEBUG_JVM=""
49076      C_O_FLAG_NONE=""
49077      CXX_O_FLAG_HIGHEST_JVM="-xO4"
49078      CXX_O_FLAG_HIGHEST="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0 $CC_HIGHEST -xprefetch=auto,explicit -xchip=ultra"
49079      CXX_O_FLAG_HI="-xO4 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49080      CXX_O_FLAG_NORM="-xO2 -Qoption cg -Qrm-s -Qoption cg -Qiselect-T0"
49081      CXX_O_FLAG_DEBUG=""
49082      CXX_O_FLAG_DEBUG_JVM=""
49083      CXX_O_FLAG_NONE=""
49084    fi
49085  else
49086    # The remaining toolchains share opt flags between CC and CXX;
49087    # setup for C and duplicate afterwards.
49088    if test "x$TOOLCHAIN_TYPE" = xgcc; then
49089      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49090        # On MacOSX we optimize for size, something
49091        # we should do for all platforms?
49092        C_O_FLAG_HIGHEST_JVM="-Os"
49093        C_O_FLAG_HIGHEST="-Os"
49094        C_O_FLAG_HI="-Os"
49095        C_O_FLAG_NORM="-Os"
49096        C_O_FLAG_SIZE="-Os"
49097      else
49098        C_O_FLAG_HIGHEST_JVM="-O3"
49099        C_O_FLAG_HIGHEST="-O3"
49100        C_O_FLAG_HI="-O3"
49101        C_O_FLAG_NORM="-O2"
49102        C_O_FLAG_SIZE="-Os"
49103      fi
49104      C_O_FLAG_DEBUG="-O0"
49105      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49106        C_O_FLAG_DEBUG_JVM=""
49107      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49108        C_O_FLAG_DEBUG_JVM="-O0"
49109      fi
49110      C_O_FLAG_NONE="-O0"
49111    elif test "x$TOOLCHAIN_TYPE" = xclang; then
49112      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49113        # On MacOSX we optimize for size, something
49114        # we should do for all platforms?
49115        C_O_FLAG_HIGHEST_JVM="-Os"
49116        C_O_FLAG_HIGHEST="-Os"
49117        C_O_FLAG_HI="-Os"
49118        C_O_FLAG_NORM="-Os"
49119        C_O_FLAG_SIZE="-Os"
49120      else
49121        C_O_FLAG_HIGHEST_JVM="-O3"
49122        C_O_FLAG_HIGHEST="-O3"
49123        C_O_FLAG_HI="-O3"
49124        C_O_FLAG_NORM="-O2"
49125        C_O_FLAG_SIZE="-Os"
49126      fi
49127      C_O_FLAG_DEBUG="-O0"
49128      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
49129        C_O_FLAG_DEBUG_JVM=""
49130      elif test "x$OPENJDK_TARGET_OS" = xlinux; then
49131        C_O_FLAG_DEBUG_JVM="-O0"
49132      fi
49133      C_O_FLAG_NONE="-O0"
49134    elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49135      C_O_FLAG_HIGHEST_JVM="-O3"
49136      C_O_FLAG_HIGHEST="-O3"
49137      C_O_FLAG_HI="-O3 -qstrict"
49138      C_O_FLAG_NORM="-O2"
49139      C_O_FLAG_DEBUG="-qnoopt"
49140      # FIXME: Value below not verified.
49141      C_O_FLAG_DEBUG_JVM=""
49142      C_O_FLAG_NONE="-qnoopt"
49143    elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
49144      C_O_FLAG_HIGHEST_JVM="-O2 -Oy-"
49145      C_O_FLAG_HIGHEST="-O2"
49146      C_O_FLAG_HI="-O1"
49147      C_O_FLAG_NORM="-O1"
49148      C_O_FLAG_DEBUG="-Od"
49149      C_O_FLAG_DEBUG_JVM=""
49150      C_O_FLAG_NONE="-Od"
49151      C_O_FLAG_SIZE="-Os"
49152    fi
49153    CXX_O_FLAG_HIGHEST_JVM="$C_O_FLAG_HIGHEST_JVM"
49154    CXX_O_FLAG_HIGHEST="$C_O_FLAG_HIGHEST"
49155    CXX_O_FLAG_HI="$C_O_FLAG_HI"
49156    CXX_O_FLAG_NORM="$C_O_FLAG_NORM"
49157    CXX_O_FLAG_DEBUG="$C_O_FLAG_DEBUG"
49158    CXX_O_FLAG_DEBUG_JVM="$C_O_FLAG_DEBUG_JVM"
49159    CXX_O_FLAG_NONE="$C_O_FLAG_NONE"
49160    CXX_O_FLAG_SIZE="$C_O_FLAG_SIZE"
49161  fi
49162
49163  # Adjust optimization flags according to debug level.
49164  case $DEBUG_LEVEL in
49165    release )
49166      # no adjustment
49167      ;;
49168    fastdebug )
49169      # Not quite so much optimization
49170      C_O_FLAG_HI="$C_O_FLAG_NORM"
49171      CXX_O_FLAG_HI="$CXX_O_FLAG_NORM"
49172      ;;
49173    slowdebug )
49174      # Disable optimization
49175      C_O_FLAG_HIGHEST_JVM="$C_O_FLAG_DEBUG_JVM"
49176      C_O_FLAG_HIGHEST="$C_O_FLAG_DEBUG"
49177      C_O_FLAG_HI="$C_O_FLAG_DEBUG"
49178      C_O_FLAG_NORM="$C_O_FLAG_DEBUG"
49179      C_O_FLAG_SIZE="$C_O_FLAG_DEBUG"
49180      CXX_O_FLAG_HIGHEST_JVM="$CXX_O_FLAG_DEBUG_JVM"
49181      CXX_O_FLAG_HIGHEST="$CXX_O_FLAG_DEBUG"
49182      CXX_O_FLAG_HI="$CXX_O_FLAG_DEBUG"
49183      CXX_O_FLAG_NORM="$CXX_O_FLAG_DEBUG"
49184      CXX_O_FLAG_SIZE="$CXX_O_FLAG_DEBUG"
49185      ;;
49186  esac
49187
49188
49189
49190
49191
49192
49193
49194
49195
49196
49197
49198
49199
49200
49201
49202
49203
49204
49205
49206  # Special extras...
49207  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
49208    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
49209      CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49210      CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
49211    fi
49212    CFLAGS_JDKLIB_EXTRA="${CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49213    CXXFLAGS_JDKLIB_EXTRA="${CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
49214  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
49215    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49216    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49217  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
49218    CXXSTD_CXXFLAG="-std=gnu++98"
49219
49220
49221
49222
49223
49224
49225
49226
49227
49228
49229
49230
49231
49232
49233
49234
49235
49236
49237
49238
49239
49240
49241
49242
49243
49244
49245
49246
49247
49248
49249
49250
49251
49252
49253
49254
49255
49256
49257
49258
49259
49260
49261    # Execute function body
49262
49263  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"" >&5
49264$as_echo_n "checking if the C++ compiler supports \"$CXXSTD_CXXFLAG -Werror\"... " >&6; }
49265  supports=yes
49266
49267  saved_cxxflags="$CXXFLAGS"
49268  CXXFLAGS="$CXXFLAG $CXXSTD_CXXFLAG -Werror"
49269  ac_ext=cpp
49270ac_cpp='$CXXCPP $CPPFLAGS'
49271ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49272ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49273ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49274
49275  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49276/* end confdefs.h.  */
49277int i;
49278_ACEOF
49279if ac_fn_cxx_try_compile "$LINENO"; then :
49280
49281else
49282  supports=no
49283fi
49284rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49285  ac_ext=cpp
49286ac_cpp='$CXXCPP $CPPFLAGS'
49287ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49288ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49289ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49290
49291  CXXFLAGS="$saved_cxxflags"
49292
49293  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49294$as_echo "$supports" >&6; }
49295  if test "x$supports" = "xyes" ; then
49296    :
49297
49298  else
49299    :
49300    CXXSTD_CXXFLAG=""
49301  fi
49302
49303
49304
49305
49306
49307
49308
49309
49310
49311
49312
49313
49314    CXXFLAGS_JDK="${CXXFLAGS_JDK} ${CXXSTD_CXXFLAG}"
49315
49316  fi
49317  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49318    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49319    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49320    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49321    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49322    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
49323  fi
49324
49325  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
49326    CFLAGS_JDK="${CFLAGS_JDK} -D__solaris__"
49327    CXXFLAGS_JDK="${CXXFLAGS_JDK} -D__solaris__"
49328    CFLAGS_JDKLIB_EXTRA='-xstrconst'
49329  fi
49330
49331  CFLAGS_JDK="${CFLAGS_JDK} ${EXTRA_CFLAGS}"
49332  CXXFLAGS_JDK="${CXXFLAGS_JDK} ${EXTRA_CXXFLAGS}"
49333  LDFLAGS_JDK="${LDFLAGS_JDK} ${EXTRA_LDFLAGS}"
49334
49335  ###############################################################################
49336  #
49337  # Now setup the CFLAGS and LDFLAGS for the JDK build.
49338  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
49339  #
49340
49341  # Setup compiler/platform specific flags into
49342  #    CFLAGS_JDK    - C Compiler flags
49343  #    CXXFLAGS_JDK  - C++ Compiler flags
49344  #    COMMON_CCXXFLAGS_JDK - common to C and C++
49345  if test "x$TOOLCHAIN_TYPE" = xgcc; then
49346    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
49347    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT"
49348    JVM_CFLAGS="$JVM_CFLAGS -fcheck-new"
49349    if test "x$OPENJDK_TARGET_CPU" = xx86; then
49350      # Force compatibility with i586 on 32 bit intel platforms.
49351      COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
49352      JVM_CFLAGS="$JVM_CFLAGS -march=i586"
49353    fi
49354    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
49355        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
49356    case $OPENJDK_TARGET_CPU_ARCH in
49357      arm )
49358        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49359        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49360        ;;
49361      ppc )
49362        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
49363        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49364        ;;
49365      * )
49366        COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
49367        CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
49368        ;;
49369    esac
49370
49371
49372
49373
49374
49375
49376
49377
49378
49379
49380
49381
49382
49383
49384
49385
49386
49387
49388
49389
49390
49391
49392
49393
49394
49395
49396
49397
49398
49399
49400
49401
49402
49403
49404
49405
49406
49407
49408
49409
49410
49411
49412
49413
49414
49415
49416
49417
49418
49419
49420
49421
49422
49423
49424    # Execute function body
49425
49426  # Need to assign to a variable since m4 is blocked from modifying parts in [].
49427  REFERENCE_VERSION=6
49428
49429  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
49430    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
49431  fi
49432
49433  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
49434    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
49435  fi
49436
49437  # Version comparison method inspired by http://stackoverflow.com/a/24067243
49438  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
49439
49440  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
49441    :
49442
49443  # These flags are required for GCC 6 builds as undefined behaviour in OpenJDK code
49444  # runs afoul of the more aggressive versions of these optimisations.
49445  # Notably, value range propagation now assumes that the this pointer of C++
49446  # member functions is non-null.
49447  NO_NULL_POINTER_CHECK_CFLAG="-fno-delete-null-pointer-checks"
49448
49449
49450
49451
49452
49453
49454
49455
49456
49457
49458
49459
49460
49461
49462
49463
49464
49465
49466
49467
49468
49469
49470
49471
49472
49473
49474
49475
49476
49477
49478
49479
49480
49481
49482
49483
49484
49485
49486
49487
49488
49489
49490    # Execute function body
49491
49492
49493
49494
49495
49496
49497
49498
49499
49500
49501
49502
49503
49504
49505
49506
49507
49508
49509
49510
49511
49512
49513
49514
49515
49516
49517
49518
49519
49520
49521
49522
49523
49524
49525
49526
49527
49528
49529
49530
49531
49532
49533
49534
49535
49536
49537
49538
49539    # Execute function body
49540
49541  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49542$as_echo_n "checking if the C compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49543  supports=yes
49544
49545  saved_cflags="$CFLAGS"
49546  CFLAGS="$CFLAGS $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49547  ac_ext=c
49548ac_cpp='$CPP $CPPFLAGS'
49549ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49550ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49551ac_compiler_gnu=$ac_cv_c_compiler_gnu
49552
49553  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49554/* end confdefs.h.  */
49555int i;
49556_ACEOF
49557if ac_fn_c_try_compile "$LINENO"; then :
49558
49559else
49560  supports=no
49561fi
49562rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49563  ac_ext=cpp
49564ac_cpp='$CXXCPP $CPPFLAGS'
49565ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49566ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49567ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49568
49569  CFLAGS="$saved_cflags"
49570
49571  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49572$as_echo "$supports" >&6; }
49573  if test "x$supports" = "xyes" ; then
49574    :
49575    C_COMP_SUPPORTS="yes"
49576  else
49577    :
49578    C_COMP_SUPPORTS="no"
49579  fi
49580
49581
49582
49583
49584
49585
49586
49587
49588
49589
49590
49591
49592
49593
49594
49595
49596
49597
49598
49599
49600
49601
49602
49603
49604
49605
49606
49607
49608
49609
49610
49611
49612
49613
49614
49615
49616
49617
49618
49619
49620
49621
49622
49623
49624
49625
49626
49627
49628
49629
49630
49631
49632
49633
49634
49635
49636
49637
49638
49639    # Execute function body
49640
49641  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49642$as_echo_n "checking if the C++ compiler supports \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49643  supports=yes
49644
49645  saved_cxxflags="$CXXFLAGS"
49646  CXXFLAGS="$CXXFLAG $NO_NULL_POINTER_CHECK_CFLAG -Werror"
49647  ac_ext=cpp
49648ac_cpp='$CXXCPP $CPPFLAGS'
49649ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49650ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49651ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49652
49653  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49654/* end confdefs.h.  */
49655int i;
49656_ACEOF
49657if ac_fn_cxx_try_compile "$LINENO"; then :
49658
49659else
49660  supports=no
49661fi
49662rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49663  ac_ext=cpp
49664ac_cpp='$CXXCPP $CPPFLAGS'
49665ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49666ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49667ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49668
49669  CXXFLAGS="$saved_cxxflags"
49670
49671  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49672$as_echo "$supports" >&6; }
49673  if test "x$supports" = "xyes" ; then
49674    :
49675    CXX_COMP_SUPPORTS="yes"
49676  else
49677    :
49678    CXX_COMP_SUPPORTS="no"
49679  fi
49680
49681
49682
49683
49684
49685
49686
49687
49688
49689
49690
49691
49692
49693  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"" >&5
49694$as_echo_n "checking if both compilers support \"$NO_NULL_POINTER_CHECK_CFLAG -Werror\"... " >&6; }
49695  supports=no
49696  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49697
49698  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49699$as_echo "$supports" >&6; }
49700  if test "x$supports" = "xyes" ; then
49701    :
49702
49703  else
49704    :
49705    NO_NULL_POINTER_CHECK_CFLAG=""
49706  fi
49707
49708
49709
49710
49711
49712
49713
49714  NO_LIFETIME_DSE_CFLAG="-fno-lifetime-dse"
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
49753
49754
49755
49756
49757    # Execute function body
49758
49759
49760
49761
49762
49763
49764
49765
49766
49767
49768
49769
49770
49771
49772
49773
49774
49775
49776
49777
49778
49779
49780
49781
49782
49783
49784
49785
49786
49787
49788
49789
49790
49791
49792
49793
49794
49795
49796
49797
49798
49799
49800
49801
49802
49803
49804
49805
49806    # Execute function body
49807
49808  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49809$as_echo_n "checking if the C compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49810  supports=yes
49811
49812  saved_cflags="$CFLAGS"
49813  CFLAGS="$CFLAGS $NO_LIFETIME_DSE_CFLAG -Werror"
49814  ac_ext=c
49815ac_cpp='$CPP $CPPFLAGS'
49816ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49817ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49818ac_compiler_gnu=$ac_cv_c_compiler_gnu
49819
49820  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49821/* end confdefs.h.  */
49822int i;
49823_ACEOF
49824if ac_fn_c_try_compile "$LINENO"; then :
49825
49826else
49827  supports=no
49828fi
49829rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49830  ac_ext=cpp
49831ac_cpp='$CXXCPP $CPPFLAGS'
49832ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49833ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49834ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49835
49836  CFLAGS="$saved_cflags"
49837
49838  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49839$as_echo "$supports" >&6; }
49840  if test "x$supports" = "xyes" ; then
49841    :
49842    C_COMP_SUPPORTS="yes"
49843  else
49844    :
49845    C_COMP_SUPPORTS="no"
49846  fi
49847
49848
49849
49850
49851
49852
49853
49854
49855
49856
49857
49858
49859
49860
49861
49862
49863
49864
49865
49866
49867
49868
49869
49870
49871
49872
49873
49874
49875
49876
49877
49878
49879
49880
49881
49882
49883
49884
49885
49886
49887
49888
49889
49890
49891
49892
49893
49894
49895
49896
49897
49898
49899
49900
49901
49902
49903
49904
49905
49906    # Execute function body
49907
49908  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49909$as_echo_n "checking if the C++ compiler supports \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49910  supports=yes
49911
49912  saved_cxxflags="$CXXFLAGS"
49913  CXXFLAGS="$CXXFLAG $NO_LIFETIME_DSE_CFLAG -Werror"
49914  ac_ext=cpp
49915ac_cpp='$CXXCPP $CPPFLAGS'
49916ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49917ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49918ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49919
49920  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
49921/* end confdefs.h.  */
49922int i;
49923_ACEOF
49924if ac_fn_cxx_try_compile "$LINENO"; then :
49925
49926else
49927  supports=no
49928fi
49929rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
49930  ac_ext=cpp
49931ac_cpp='$CXXCPP $CPPFLAGS'
49932ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
49933ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
49934ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
49935
49936  CXXFLAGS="$saved_cxxflags"
49937
49938  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49939$as_echo "$supports" >&6; }
49940  if test "x$supports" = "xyes" ; then
49941    :
49942    CXX_COMP_SUPPORTS="yes"
49943  else
49944    :
49945    CXX_COMP_SUPPORTS="no"
49946  fi
49947
49948
49949
49950
49951
49952
49953
49954
49955
49956
49957
49958
49959
49960  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"" >&5
49961$as_echo_n "checking if both compilers support \"$NO_LIFETIME_DSE_CFLAG -Werror\"... " >&6; }
49962  supports=no
49963  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
49964
49965  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
49966$as_echo "$supports" >&6; }
49967  if test "x$supports" = "xyes" ; then
49968    :
49969
49970  else
49971    :
49972    NO_LIFETIME_DSE_CFLAG=""
49973  fi
49974
49975
49976
49977
49978
49979
49980  CFLAGS_JDK="${CFLAGS_JDK} ${NO_NULL_POINTER_CHECK_CFLAG} ${NO_LIFETIME_DSE_CFLAG}"
49981
49982
49983
49984  else
49985    :
49986
49987  fi
49988
49989
49990
49991
49992
49993
49994
49995
49996
49997
49998
49999
50000
50001
50002  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50003    JVM_CFLAGS="$JVM_CFLAGS -D_GNU_SOURCE"
50004
50005    # Restrict the debug information created by Clang to avoid
50006    # too big object files and speed the build up a little bit
50007    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50008    JVM_CFLAGS="$JVM_CFLAGS -flimit-debug-info"
50009    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50010      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50011        # Force compatibility with i586 on 32 bit intel platforms.
50012        COMMON_CCXXFLAGS="${COMMON_CCXXFLAGS} -march=i586"
50013        JVM_CFLAGS="$JVM_CFLAGS -march=i586"
50014      fi
50015      JVM_CFLAGS="$JVM_CFLAGS -Wno-sometimes-uninitialized"
50016      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50017          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50018      case $OPENJDK_TARGET_CPU_ARCH in
50019        ppc )
50020          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50021          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50022          ;;
50023        * )
50024          COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50025          CFLAGS_JDK="${CFLAGS_JDK} -fno-strict-aliasing"
50026          ;;
50027      esac
50028    fi
50029  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50030    JVM_CFLAGS="$JVM_CFLAGS -DSPARC_WORKS"
50031    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50032    if test "x$OPENJDK_TARGET_CPU_ARCH" = xx86; then
50033      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_TARGET_CPU_LEGACY_LIB"
50034    fi
50035
50036    CFLAGS_JDK="$CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50037    CXXFLAGS_JDK="$CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50038  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50039    JVM_CFLAGS="$JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50040    CFLAGS_JDK="$CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50041    CXXFLAGS_JDK="$CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50042  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50043    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS $COMMON_CCXXFLAGS_JDK \
50044        -MD -Zc:wchar_t- -W3 -wd4800 \
50045        -DWIN32_LEAN_AND_MEAN \
50046        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50047        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50048        -DWIN32 -DIAL"
50049    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50050      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50051    else
50052      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50053    fi
50054    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50055    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50056    # studio.
50057    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50058      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50059      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50060      JVM_CFLAGS="$JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50061    fi
50062  fi
50063
50064  ###############################################################################
50065
50066  # Adjust flags according to debug level.
50067  case $DEBUG_LEVEL in
50068    fastdebug | slowdebug )
50069      CFLAGS_JDK="$CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50070      CXXFLAGS_JDK="$CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50071      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50072      ;;
50073    release )
50074      ;;
50075    * )
50076      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50077      ;;
50078  esac
50079
50080  # Set some common defines. These works for all compilers, but assume
50081  # -D is universally accepted.
50082
50083  # Setup endianness
50084  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50085    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50086    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50087    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50088    #   Note: -Dmacro         is the same as    #define macro 1
50089    #         -Dmacro=        is the same as    #define macro
50090    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50091      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50092    else
50093      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50094    fi
50095  else
50096    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50097    # are defined in the system?
50098    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50099      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50100    else
50101      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50102    fi
50103  fi
50104
50105  # Setup target OS define. Use OS target name but in upper case.
50106  OPENJDK_TARGET_OS_UPPERCASE=`$ECHO $OPENJDK_TARGET_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50107  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D$OPENJDK_TARGET_OS_UPPERCASE"
50108
50109  # Setup target CPU
50110  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50111      $OPENJDK_TARGET_ADD_LP64 \
50112      -DARCH='\"$OPENJDK_TARGET_CPU_LEGACY\"' -D$OPENJDK_TARGET_CPU_LEGACY"
50113
50114  # Setup debug/release defines
50115  if test "x$DEBUG_LEVEL" = xrelease; then
50116    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DNDEBUG"
50117    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50118      COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DTRIMMED"
50119    fi
50120  else
50121    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DDEBUG"
50122  fi
50123
50124  # Set some additional per-OS defines.
50125  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50126    JVM_CFLAGS="$JVM_CFLAGS -DLINUX"
50127    JVM_CFLAGS="$JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50128        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50129  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50130    JVM_CFLAGS="$JVM_CFLAGS -DSOLARIS"
50131    JVM_CFLAGS="$JVM_CFLAGS -template=no%extdef -features=no%split_init \
50132        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50133  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50134    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50135    JVM_CFLAGS="$JVM_CFLAGS -D_ALLBSD_SOURCE"
50136    JVM_CFLAGS="$JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50137    JVM_CFLAGS="$JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50138        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50139        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50140        -fno-omit-frame-pointer"
50141  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50142    JVM_CFLAGS="$JVM_CFLAGS -DAIX"
50143    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50144    JVM_CFLAGS="$JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50145        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50146        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50147  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50148    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50149  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50150    JVM_CFLAGS="$JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50151    JVM_CFLAGS="$JVM_CFLAGS -nologo -W3 -MD -MP"
50152  fi
50153
50154  # Set some additional per-CPU defines.
50155  if test "x$OPENJDK_TARGET_OS-$OPENJDK_TARGET_CPU" = xwindows-x86; then
50156    JVM_CFLAGS="$JVM_CFLAGS -arch:IA32"
50157  elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50158    JVM_CFLAGS="$JVM_CFLAGS -xarch=sparc"
50159  elif test "x$OPENJDK_TARGET_CPU" = xppc64; then
50160    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50161      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50162      # fixes `relocation truncated to fit' error for gcc 4.1.
50163      JVM_CFLAGS="$JVM_CFLAGS -mminimal-toc"
50164      # Use ppc64 instructions, but schedule for power5
50165      JVM_CFLAGS="$JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50166    elif test "x$OPENJDK_TARGET_OS" = xaix; then
50167      JVM_CFLAGS="$JVM_CFLAGS -qarch=ppc64"
50168    fi
50169  elif test "x$OPENJDK_TARGET_CPU" = xppc64le; then
50170    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50171      JVM_CFLAGS="$JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50172      # Little endian machine uses ELFv2 ABI.
50173      JVM_CFLAGS="$JVM_CFLAGS -DABI_ELFv2"
50174      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50175      JVM_CFLAGS="$JVM_CFLAGS -mcpu=power7 -mtune=power8"
50176    fi
50177  fi
50178
50179  if test "x$OPENJDK_TARGET_CPU_ENDIAN" = xlittle; then
50180    JVM_CFLAGS="$JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50181  fi
50182
50183  if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
50184    if test "x$OPENJDK_TARGET_OS" != xsolaris && test "x$OPENJDK_TARGET_OS" != xaix; then
50185      # Solaris does not have _LP64=1 in the old build.
50186      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50187      JVM_CFLAGS="$JVM_CFLAGS -D_LP64=1"
50188    fi
50189  fi
50190
50191  # Set JVM_CFLAGS warning handling
50192  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50193    JVM_CFLAGS="$JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50194        -Wunused-value -Woverloaded-virtual"
50195
50196    if test "x$TOOLCHAIN_TYPE" = xgcc; then
50197
50198
50199
50200
50201
50202
50203
50204
50205
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
50249
50250
50251    # Execute function body
50252
50253  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50254  REFERENCE_VERSION=4.8
50255
50256  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50257    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
50258  fi
50259
50260  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50261    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
50262  fi
50263
50264  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50265  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50266
50267  if test $COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50268    :
50269
50270            # These flags either do not work or give spurious warnings prior to gcc 4.8.
50271            JVM_CFLAGS="$JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
50272
50273
50274  else
50275    :
50276
50277  fi
50278
50279
50280
50281
50282
50283
50284
50285
50286
50287
50288
50289
50290
50291
50292    fi
50293    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
50294      # Non-zero builds have stricter warnings
50295      JVM_CFLAGS="$JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
50296    else
50297      if test "x$TOOLCHAIN_TYPE" = xclang; then
50298        # Some versions of llvm do not like -Wundef
50299        JVM_CFLAGS="$JVM_CFLAGS -Wno-undef"
50300      fi
50301    fi
50302  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50303    JVM_CFLAGS="$JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
50304        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
50305  fi
50306
50307  # Additional macosx handling
50308  if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50309    # Setting these parameters makes it an error to link to macosx APIs that are
50310    # newer than the given OS version and makes the linked binaries compatible
50311    # even if built on a newer version of the OS.
50312    # The expected format is X.Y.Z
50313    MACOSX_VERSION_MIN=10.7.0
50314
50315
50316    # The macro takes the version with no dots, ex: 1070
50317    # Let the flags variables get resolved in make for easier override on make
50318    # command line.
50319    COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK -DMAC_OS_X_VERSION_MAX_ALLOWED=\$(subst .,,\$(MACOSX_VERSION_MIN)) -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50320    LDFLAGS_JDK="$LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
50321  fi
50322
50323  # Setup some hard coded includes
50324  COMMON_CCXXFLAGS_JDK="$COMMON_CCXXFLAGS_JDK \
50325      -I${JDK_TOPDIR}/src/java.base/share/native/include \
50326      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS/native/include \
50327      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/include \
50328      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
50329      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_TARGET_OS_TYPE/native/libjava"
50330
50331  # The shared libraries are compiled using the picflag.
50332  CFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50333      $CFLAGS_JDK $EXTRA_CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
50334  CXXFLAGS_JDKLIB="$COMMON_CCXXFLAGS_JDK \
50335      $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
50336
50337  # Executable flags
50338  CFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $EXTRA_CFLAGS_JDK"
50339  CXXFLAGS_JDKEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $EXTRA_CXXFLAGS_JDK"
50340
50341
50342
50343
50344
50345
50346  # Setup LDFLAGS et al.
50347  #
50348
50349  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50350    LDFLAGS_MICROSOFT="-nologo -opt:ref"
50351    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
50352    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
50353    if test "x$OPENJDK_TARGET_CPU_BITS" = "x32"; then
50354      LDFLAGS_SAFESH="-safeseh"
50355      LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SAFESH"
50356      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SAFESH"
50357      # NOTE: Old build added -machine. Probably not needed.
50358      JVM_LDFLAGS="$JVM_LDFLAGS -machine:I386"
50359    else
50360      JVM_LDFLAGS="$JVM_LDFLAGS -machine:AMD64"
50361    fi
50362  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50363      JVM_LDFLAGS="$JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
50364      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50365        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
50366        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50367    fi
50368  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50369    # If this is a --hash-style=gnu system, use --hash-style=both, why?
50370    # We have previously set HAS_GNU_HASH if this is the case
50371    if test -n "$HAS_GNU_HASH"; then
50372      LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
50373      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_HASH_STYLE"
50374      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_HASH_STYLE"
50375    fi
50376      if test "x$OPENJDK_TARGET_OS" = xmacosx; then
50377        JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
50378    fi
50379    if test "x$OPENJDK_TARGET_OS" = xlinux; then
50380      # And since we now know that the linker is gnu, then add -z defs, to forbid
50381      # undefined symbols in object files.
50382      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
50383      LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
50384      JVM_LDFLAGS="$JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
50385      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
50386      JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
50387      if test "x$OPENJDK_TARGET_CPU" = xx86; then
50388        JVM_LDFLAGS="$JVM_LDFLAGS -march=i586"
50389      fi
50390      case $DEBUG_LEVEL in
50391        release )
50392          # tell linker to optimize libraries.
50393          # Should this be supplied to the OSS linker as well?
50394          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
50395          LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
50396          JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
50397          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50398            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50399          fi
50400          ;;
50401        slowdebug )
50402          # Hotspot always let the linker optimize
50403          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50404          if test "x$HAS_LINKER_NOW" = "xtrue"; then
50405            # do relocations at load
50406            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_NOW_FLAG"
50407            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
50408            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_NOW_FLAG"
50409          fi
50410          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50411            # mark relocations read only
50412            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50413            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50414            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50415          fi
50416          ;;
50417        fastdebug )
50418          # Hotspot always let the linker optimize
50419          JVM_LDFLAGS="$JVM_LDFLAGS -Wl,-O1"
50420          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
50421            # mark relocations read only
50422            LDFLAGS_JDK="$LDFLAGS_JDK $LINKER_RELRO_FLAG"
50423            LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
50424            JVM_LDFLAGS="$JVM_LDFLAGS $LINKER_RELRO_FLAG"
50425          fi
50426          ;;
50427        * )
50428          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50429          ;;
50430        esac
50431    fi
50432  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50433    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
50434    LDFLAGS_JDK="$LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
50435    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
50436    LDFLAGS_CXX_JDK="$LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
50437    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
50438    if test "x$OPENJDK_TARGET_CPU_ARCH" = "xsparc"; then
50439      JVM_LDFLAGS="$JVM_LDFLAGS -xarch=sparc"
50440    fi
50441  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50442    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
50443    LDFLAGS_JDK="${LDFLAGS_JDK} $LDFLAGS_XLC"
50444    JVM_LDFLAGS="$JVM_LDFLAGS $LDFLAGS_XLC"
50445  fi
50446
50447  # Customize LDFLAGS for executables
50448
50449  LDFLAGS_JDKEXE="${LDFLAGS_JDK}"
50450
50451  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50452    if test "x$OPENJDK_TARGET_CPU_BITS" = "x64"; then
50453      LDFLAGS_STACK_SIZE=1048576
50454    else
50455      LDFLAGS_STACK_SIZE=327680
50456    fi
50457    LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
50458  elif test "x$OPENJDK_TARGET_OS" = xlinux; then
50459    LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
50460  fi
50461
50462  LDFLAGS_JDKEXE="${LDFLAGS_JDKEXE} ${EXTRA_LDFLAGS_JDK}"
50463
50464  # Customize LDFLAGS for libs
50465  LDFLAGS_JDKLIB="${LDFLAGS_JDK}"
50466
50467  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
50468  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50469    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50470        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
50471    JDKLIB_LIBS=""
50472  else
50473    LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50474        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)"
50475
50476    if test "xTARGET" = "xTARGET"; then
50477    # On some platforms (mac) the linker warns about non existing -L dirs.
50478    # Add server first if available. Linking aginst client does not always produce the same results.
50479      # Only add client/minimal dir if client/minimal is being built.
50480    # Default to server for other variants.
50481      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
50482        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50483      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
50484        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/client"
50485      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
50486        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/minimal"
50487    else
50488        LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50489    fi
50490    elif test "xTARGET" = "xBUILD"; then
50491      # When building a buildjdk, it's always only the server variant
50492      LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} \
50493          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_TARGET_CPU_LIBDIR)/server"
50494    fi
50495
50496    JDKLIB_LIBS="-ljava -ljvm"
50497    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50498      JDKLIB_LIBS="$JDKLIB_LIBS -lc"
50499    fi
50500
50501  fi
50502
50503  # Set JVM_LIBS (per os)
50504  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50505    JVM_LIBS="$JVM_LIBS -lm -ldl -lpthread"
50506  elif test "x$OPENJDK_TARGET_OS" = xsolaris; then
50507    # FIXME: This hard-coded path is not really proper.
50508    if test "x$OPENJDK_TARGET_CPU" = xx86_64; then
50509      SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
50510    elif test "x$OPENJDK_TARGET_CPU" = xsparcv9; then
50511      SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
50512    fi
50513    JVM_LIBS="$JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
50514        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
50515  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50516    JVM_LIBS="$JVM_LIBS -lm"
50517  elif test "x$OPENJDK_TARGET_OS" = xaix; then
50518    JVM_LIBS="$JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
50519  elif test "x$OPENJDK_TARGET_OS" = xbsd; then
50520    JVM_LIBS="$JVM_LIBS -lm"
50521  elif test "x$OPENJDK_TARGET_OS" = xwindows; then
50522    JVM_LIBS="$JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
50523        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
50524        wsock32.lib winmm.lib version.lib psapi.lib"
50525    fi
50526
50527  # Set JVM_ASFLAGS
50528  if test "x$OPENJDK_TARGET_OS" = xlinux; then
50529    if test "x$OPENJDK_TARGET_CPU" = xx86; then
50530      JVM_ASFLAGS="$JVM_ASFLAGS -march=i586"
50531    fi
50532  elif test "x$OPENJDK_TARGET_OS" = xmacosx; then
50533    JVM_ASFLAGS="$JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
50534  fi
50535
50536  LDFLAGS_JDKLIB="${LDFLAGS_JDKLIB} ${EXTRA_LDFLAGS_JDK}"
50537
50538
50539
50540
50541
50542
50543
50544
50545
50546
50547
50548
50549
50550
50551
50552  # Special extras...
50553  if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50554    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
50555      OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50556      OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -xregs=no%appl"
50557    fi
50558    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50559    OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA="${OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA} -errtags=yes -errfmt"
50560  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50561    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50562    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50563  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
50564    OPENJDK_BUILD_CXXSTD_CXXFLAG="-std=gnu++98"
50565
50566
50567
50568
50569
50570
50571
50572
50573
50574
50575
50576
50577
50578
50579
50580
50581
50582
50583
50584
50585
50586
50587
50588
50589
50590
50591
50592
50593
50594
50595
50596
50597
50598
50599
50600
50601
50602
50603
50604
50605
50606
50607    # Execute function body
50608
50609  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"" >&5
50610$as_echo_n "checking if the C++ compiler supports \"$OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror\"... " >&6; }
50611  supports=yes
50612
50613  saved_cxxflags="$CXXFLAGS"
50614  CXXFLAGS="$CXXFLAG $OPENJDK_BUILD_CXXSTD_CXXFLAG -Werror"
50615  ac_ext=cpp
50616ac_cpp='$CXXCPP $CPPFLAGS'
50617ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50618ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50619ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50620
50621  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
50622/* end confdefs.h.  */
50623int i;
50624_ACEOF
50625if ac_fn_cxx_try_compile "$LINENO"; then :
50626
50627else
50628  supports=no
50629fi
50630rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
50631  ac_ext=cpp
50632ac_cpp='$CXXCPP $CPPFLAGS'
50633ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
50634ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
50635ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
50636
50637  CXXFLAGS="$saved_cxxflags"
50638
50639  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
50640$as_echo "$supports" >&6; }
50641  if test "x$supports" = "xyes" ; then
50642    :
50643
50644  else
50645    :
50646    OPENJDK_BUILD_CXXSTD_CXXFLAG=""
50647  fi
50648
50649
50650
50651
50652
50653
50654
50655
50656
50657
50658
50659
50660    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_CXXSTD_CXXFLAG}"
50661
50662  fi
50663  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50664    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50665    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50666    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50667    CFLAGS_JDK="${CFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50668    CXXFLAGS_JDK="${CXXFLAGS_JDK} -qchars=signed -qfullpath -qsaveopt"
50669  fi
50670
50671  if test "x$OPENJDK_TARGET_OS" = xsolaris; then
50672    OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -D__solaris__"
50673    OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} -D__solaris__"
50674    OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA='-xstrconst'
50675  fi
50676
50677  OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CFLAGS}"
50678  OPENJDK_BUILD_CXXFLAGS_JDK="${OPENJDK_BUILD_CXXFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_CXXFLAGS}"
50679  OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} ${OPENJDK_BUILD_EXTRA_LDFLAGS}"
50680
50681  ###############################################################################
50682  #
50683  # Now setup the CFLAGS and LDFLAGS for the JDK build.
50684  # Later we will also have CFLAGS and LDFLAGS for the hotspot subrepo build.
50685  #
50686
50687  # Setup compiler/platform specific flags into
50688  #    OPENJDK_BUILD_CFLAGS_JDK    - C Compiler flags
50689  #    OPENJDK_BUILD_CXXFLAGS_JDK  - C++ Compiler flags
50690  #    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK - common to C and C++
50691  if test "x$TOOLCHAIN_TYPE" = xgcc; then
50692    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50693    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT"
50694    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fcheck-new"
50695    if test "x$OPENJDK_BUILD_CPU" = xx86; then
50696      # Force compatibility with i586 on 32 bit intel platforms.
50697      OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50698      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50699    fi
50700    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50701        -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50702    case $OPENJDK_BUILD_CPU_ARCH in
50703      arm )
50704        # on arm we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50705        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50706        ;;
50707      ppc )
50708        # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50709        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50710        ;;
50711      * )
50712        OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50713        OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50714        ;;
50715    esac
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
50743
50744
50745
50746
50747
50748
50749
50750
50751
50752
50753
50754
50755
50756
50757
50758
50759
50760
50761
50762
50763
50764
50765
50766
50767
50768
50769
50770    # Execute function body
50771
50772  # Need to assign to a variable since m4 is blocked from modifying parts in [].
50773  REFERENCE_VERSION=6
50774
50775  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
50776    as_fn_error $? "Internal error: Cannot compare to 6, only three parts (X.Y.Z) is supported" "$LINENO" 5
50777  fi
50778
50779  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
50780    as_fn_error $? "Internal error: Cannot compare to 6, only parts < 99999 is supported" "$LINENO" 5
50781  fi
50782
50783  # Version comparison method inspired by http://stackoverflow.com/a/24067243
50784  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
50785
50786  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
50787    :
50788
50789  else
50790    :
50791
50792  fi
50793
50794
50795
50796
50797
50798
50799
50800
50801
50802
50803
50804
50805
50806
50807  elif test "x$TOOLCHAIN_TYPE" = xclang; then
50808    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_GNU_SOURCE"
50809
50810    # Restrict the debug information created by Clang to avoid
50811    # too big object files and speed the build up a little bit
50812    # (see http://llvm.org/bugs/show_bug.cgi?id=7554)
50813    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -flimit-debug-info"
50814    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50815      if test "x$OPENJDK_BUILD_CPU" = xx86; then
50816        # Force compatibility with i586 on 32 bit intel platforms.
50817        OPENJDK_BUILD_COMMON_CCXXFLAGS="${OPENJDK_BUILD_COMMON_CCXXFLAGS} -march=i586"
50818        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -march=i586"
50819      fi
50820      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-sometimes-uninitialized"
50821      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -Wall -Wextra -Wno-unused -Wno-unused-parameter -Wformat=2 \
50822          -pipe -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE"
50823      case $OPENJDK_BUILD_CPU_ARCH in
50824        ppc )
50825          # on ppc we don't prevent gcc to omit frame pointer but do prevent strict aliasing
50826          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50827          ;;
50828        * )
50829          OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -fno-omit-frame-pointer"
50830          OPENJDK_BUILD_CFLAGS_JDK="${OPENJDK_BUILD_CFLAGS_JDK} -fno-strict-aliasing"
50831          ;;
50832      esac
50833    fi
50834  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
50835    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSPARC_WORKS"
50836    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRACING -DMACRO_MEMSYS_OPS -DBREAKPTS"
50837    if test "x$OPENJDK_BUILD_CPU_ARCH" = xx86; then
50838      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DcpuIntel -Di586 -D$OPENJDK_BUILD_CPU_LEGACY_LIB"
50839    fi
50840
50841    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -xc99=%none -xCC -errshort=tags -Xa -v -mt -W0,-noglobal"
50842    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -errtags=yes +w -mt -features=no%except -DCC_NOEX -norunpath -xnolib"
50843  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
50844    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_REENTRANT -D__STDC_FORMAT_MACROS"
50845    OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50846    OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK -D_GNU_SOURCE -D_REENTRANT -D_LARGEFILE64_SOURCE -DSTDC"
50847  elif test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
50848    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS $OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50849        -MD -Zc:wchar_t- -W3 -wd4800 \
50850        -DWIN32_LEAN_AND_MEAN \
50851        -D_CRT_SECURE_NO_DEPRECATE -D_CRT_NONSTDC_NO_DEPRECATE \
50852        -D_WINSOCK_DEPRECATED_NO_WARNINGS \
50853        -DWIN32 -DIAL"
50854    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
50855      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_AMD64_ -Damd64"
50856    else
50857      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_X86_ -Dx86"
50858    fi
50859    # If building with Visual Studio 2010, we can still use _STATIC_CPPLIB to
50860    # avoid bundling msvcpNNN.dll. Doesn't work with newer versions of visual
50861    # studio.
50862    if test "x$TOOLCHAIN_VERSION" = "x2010"; then
50863      STATIC_CPPLIB_FLAGS="-D_STATIC_CPPLIB -D_DISABLE_DEPRECATE_STATIC_CPPLIB"
50864      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $STATIC_CPPLIB_FLAGS"
50865      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS $STATIC_CPPLIB_FLAGS"
50866    fi
50867  fi
50868
50869  ###############################################################################
50870
50871  # Adjust flags according to debug level.
50872  case $DEBUG_LEVEL in
50873    fastdebug | slowdebug )
50874      OPENJDK_BUILD_CFLAGS_JDK="$OPENJDK_BUILD_CFLAGS_JDK $CFLAGS_DEBUG_SYMBOLS $CFLAGS_DEBUG_OPTIONS"
50875      OPENJDK_BUILD_CXXFLAGS_JDK="$OPENJDK_BUILD_CXXFLAGS_JDK $CXXFLAGS_DEBUG_SYMBOLS $CXXFLAGS_DEBUG_OPTIONS"
50876      JAVAC_FLAGS="$JAVAC_FLAGS -g"
50877      ;;
50878    release )
50879      ;;
50880    * )
50881      as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
50882      ;;
50883  esac
50884
50885  # Set some common defines. These works for all compilers, but assume
50886  # -D is universally accepted.
50887
50888  # Setup endianness
50889  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50890    # The macro _LITTLE_ENDIAN needs to be defined the same to avoid the
50891    #   Sun C compiler warning message: warning: macro redefined: _LITTLE_ENDIAN
50892    #   (The Solaris X86 system defines this in file /usr/include/sys/isa_defs.h).
50893    #   Note: -Dmacro         is the same as    #define macro 1
50894    #         -Dmacro=        is the same as    #define macro
50895    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50896      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN="
50897    else
50898      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_LITTLE_ENDIAN"
50899    fi
50900  else
50901    # Same goes for _BIG_ENDIAN. Do we really need to set *ENDIAN on Solaris if they
50902    # are defined in the system?
50903    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50904      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN="
50905    else
50906      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_BIG_ENDIAN"
50907    fi
50908  fi
50909
50910  # Setup target OS define. Use OS target name but in upper case.
50911  OPENJDK_BUILD_OS_UPPERCASE=`$ECHO $OPENJDK_BUILD_OS | $TR 'abcdefghijklmnopqrstuvwxyz' 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'`
50912  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D$OPENJDK_BUILD_OS_UPPERCASE"
50913
50914  # Setup target CPU
50915  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
50916      $OPENJDK_BUILD_ADD_LP64 \
50917      -DARCH='\"$OPENJDK_BUILD_CPU_LEGACY\"' -D$OPENJDK_BUILD_CPU_LEGACY"
50918
50919  # Setup debug/release defines
50920  if test "x$DEBUG_LEVEL" = xrelease; then
50921    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DNDEBUG"
50922    if test "x$OPENJDK_BUILD_OS" = xsolaris; then
50923      OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DTRIMMED"
50924    fi
50925  else
50926    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -DDEBUG"
50927  fi
50928
50929  # Set some additional per-OS defines.
50930  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50931    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DLINUX"
50932    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -pipe -fPIC -fno-rtti -fno-exceptions \
50933        -fvisibility=hidden -fno-strict-aliasing -fno-omit-frame-pointer"
50934  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
50935    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DSOLARIS"
50936    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -template=no%extdef -features=no%split_init \
50937        -D_Crun_inline_placement -library=%none -KPIC -mt -xwe -features=no%except"
50938  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
50939    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE -D_DARWIN_UNLIMITED_SELECT"
50940    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_ALLBSD_SOURCE"
50941    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_DARWIN_C_SOURCE -D_XOPEN_SOURCE"
50942    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -fno-rtti -fno-exceptions -fvisibility=hidden \
50943        -mno-omit-leaf-frame-pointer -mstack-alignment=16 -pipe -fno-strict-aliasing \
50944        -DMAC_OS_X_VERSION_MAX_ALLOWED=1070 -mmacosx-version-min=10.7.0 \
50945        -fno-omit-frame-pointer"
50946  elif test "x$OPENJDK_BUILD_OS" = xaix; then
50947    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DAIX"
50948    # We may need '-qminimaltoc' or '-qpic=large -bbigtoc' if the TOC overflows.
50949    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qtune=balanced -qhot=level=1 -qinline \
50950        -qinlglue -qalias=noansi -qstrict -qtls=default -qlanglvl=c99vla \
50951        -qlanglvl=noredefmac -qnortti -qnoeh -qignerrno"
50952  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
50953    OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK -D_ALLBSD_SOURCE"
50954  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
50955    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_WINDOWS -DWIN32 -D_JNI_IMPLEMENTATION_"
50956    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -nologo -W3 -MD -MP"
50957  fi
50958
50959  # Set some additional per-CPU defines.
50960  if test "x$OPENJDK_BUILD_OS-$OPENJDK_BUILD_CPU" = xwindows-x86; then
50961    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -arch:IA32"
50962  elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
50963    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -xarch=sparc"
50964  elif test "x$OPENJDK_BUILD_CPU" = xppc64; then
50965    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50966      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50967      # fixes `relocation truncated to fit' error for gcc 4.1.
50968      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mminimal-toc"
50969      # Use ppc64 instructions, but schedule for power5
50970      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=powerpc64 -mtune=power5"
50971    elif test "x$OPENJDK_BUILD_OS" = xaix; then
50972      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -qarch=ppc64"
50973    fi
50974  elif test "x$OPENJDK_BUILD_CPU" = xppc64le; then
50975    if test "x$OPENJDK_BUILD_OS" = xlinux; then
50976      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -minsert-sched-nops=regroup_exact -mno-multiple -mno-string"
50977      # Little endian machine uses ELFv2 ABI.
50978      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DABI_ELFv2"
50979      # Use Power8, this is the first CPU to support PPC64 LE with ELFv2 ABI.
50980      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -mcpu=power7 -mtune=power8"
50981    fi
50982  fi
50983
50984  if test "x$OPENJDK_BUILD_CPU_ENDIAN" = xlittle; then
50985    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -DVM_LITTLE_ENDIAN"
50986  fi
50987
50988  if test "x$OPENJDK_BUILD_CPU_BITS" = x64; then
50989    if test "x$OPENJDK_BUILD_OS" != xsolaris && test "x$OPENJDK_BUILD_OS" != xaix; then
50990      # Solaris does not have _LP64=1 in the old build.
50991      # xlc on AIX defines _LP64=1 by default and issues a warning if we redefine it.
50992      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -D_LP64=1"
50993    fi
50994  fi
50995
50996  # Set OPENJDK_BUILD_JVM_CFLAGS warning handling
50997  if test "x$OPENJDK_BUILD_OS" = xlinux; then
50998    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wpointer-arith -Wsign-compare -Wunused-function \
50999        -Wunused-value -Woverloaded-virtual"
51000
51001    if test "x$TOOLCHAIN_TYPE" = xgcc; then
51002
51003
51004
51005
51006
51007
51008
51009
51010
51011
51012
51013
51014
51015
51016
51017
51018
51019
51020
51021
51022
51023
51024
51025
51026
51027
51028
51029
51030
51031
51032
51033
51034
51035
51036
51037
51038
51039
51040
51041
51042
51043
51044
51045
51046
51047
51048
51049
51050
51051
51052
51053
51054
51055
51056    # Execute function body
51057
51058  # Need to assign to a variable since m4 is blocked from modifying parts in [].
51059  REFERENCE_VERSION=4.8
51060
51061  if  [[ "$REFERENCE_VERSION" =~ (.*\.){3} ]] ; then
51062    as_fn_error $? "Internal error: Cannot compare to 4.8, only three parts (X.Y.Z) is supported" "$LINENO" 5
51063  fi
51064
51065  if  [[ "$REFERENCE_VERSION" =~ [0-9]{6} ]] ; then
51066    as_fn_error $? "Internal error: Cannot compare to 4.8, only parts < 99999 is supported" "$LINENO" 5
51067  fi
51068
51069  # Version comparison method inspired by http://stackoverflow.com/a/24067243
51070  COMPARABLE_REFERENCE_VERSION=`$AWK -F. '{ printf("%05d%05d%05d\n", $1, $2, $3) }' <<< "$REFERENCE_VERSION"`
51071
51072  if test $OPENJDK_BUILD_COMPARABLE_ACTUAL_VERSION -ge $COMPARABLE_REFERENCE_VERSION ; then
51073    :
51074
51075            # These flags either do not work or give spurious warnings prior to gcc 4.8.
51076            OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-format-zero-length -Wtype-limits -Wuninitialized"
51077
51078
51079  else
51080    :
51081
51082  fi
51083
51084
51085
51086
51087
51088
51089
51090
51091
51092
51093
51094
51095
51096
51097    fi
51098    if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
51099      # Non-zero builds have stricter warnings
51100      OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wreturn-type -Wundef -Wformat=2"
51101    else
51102      if test "x$TOOLCHAIN_TYPE" = xclang; then
51103        # Some versions of llvm do not like -Wundef
51104        OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-undef"
51105      fi
51106    fi
51107  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51108    OPENJDK_BUILD_JVM_CFLAGS="$OPENJDK_BUILD_JVM_CFLAGS -Wno-deprecated -Wpointer-arith \
51109        -Wsign-compare -Wundef -Wunused-function -Wformat=2"
51110  fi
51111
51112  # Additional macosx handling
51113  if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51114    # Setting these parameters makes it an error to link to macosx APIs that are
51115    # newer than the given OS version and makes the linked binaries compatible
51116    # even if built on a newer version of the OS.
51117    # The expected format is X.Y.Z
51118    MACOSX_VERSION_MIN=10.7.0
51119
51120
51121    # The macro takes the version with no dots, ex: 1070
51122    # Let the flags variables get resolved in make for easier override on make
51123    # command line.
51124    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)"
51125    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK -mmacosx-version-min=\$(MACOSX_VERSION_MIN)"
51126  fi
51127
51128  # Setup some hard coded includes
51129  OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51130      -I${JDK_TOPDIR}/src/java.base/share/native/include \
51131      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS/native/include \
51132      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/include \
51133      -I${JDK_TOPDIR}/src/java.base/share/native/libjava \
51134      -I${JDK_TOPDIR}/src/java.base/$OPENJDK_BUILD_OS_TYPE/native/libjava"
51135
51136  # The shared libraries are compiled using the picflag.
51137  OPENJDK_BUILD_CFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51138      $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CFLAGS_JDKLIB_EXTRA"
51139  OPENJDK_BUILD_CXXFLAGS_JDKLIB="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK \
51140      $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK $PICFLAG $OPENJDK_BUILD_CXXFLAGS_JDKLIB_EXTRA"
51141
51142  # Executable flags
51143  OPENJDK_BUILD_CFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CFLAGS_JDK $OPENJDK_BUILD_EXTRA_CFLAGS_JDK"
51144  OPENJDK_BUILD_CXXFLAGS_JDKEXE="$OPENJDK_BUILD_COMMON_CCXXFLAGS_JDK $OPENJDK_BUILD_CXXFLAGS_JDK $OPENJDK_BUILD_EXTRA_CXXFLAGS_JDK"
51145
51146
51147
51148
51149
51150
51151  # Setup LDFLAGS et al.
51152  #
51153
51154  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51155    LDFLAGS_MICROSOFT="-nologo -opt:ref"
51156    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_MICROSOFT -incremental:no"
51157    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_MICROSOFT -opt:icf,8 -subsystem:windows -base:0x8000000"
51158    if test "x$OPENJDK_BUILD_CPU_BITS" = "x32"; then
51159      LDFLAGS_SAFESH="-safeseh"
51160      OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SAFESH"
51161      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SAFESH"
51162      # NOTE: Old build added -machine. Probably not needed.
51163      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:I386"
51164    else
51165      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -machine:AMD64"
51166    fi
51167  elif test "x$TOOLCHAIN_TYPE" = xclang; then
51168      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -mno-omit-leaf-frame-pointer -mstack-alignment=16 -stdlib=libstdc++ -fPIC"
51169      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51170        # FIXME: We should really generalize SET_SHARED_LIBRARY_ORIGIN instead.
51171        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51172    fi
51173  elif test "x$TOOLCHAIN_TYPE" = xgcc; then
51174    # If this is a --hash-style=gnu system, use --hash-style=both, why?
51175    # We have previously set HAS_GNU_HASH if this is the case
51176    if test -n "$HAS_GNU_HASH"; then
51177      OPENJDK_BUILD_LDFLAGS_HASH_STYLE="-Wl,--hash-style=both"
51178      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51179      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $OPENJDK_BUILD_LDFLAGS_HASH_STYLE"
51180    fi
51181      if test "x$OPENJDK_BUILD_OS" = xmacosx; then
51182        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-rpath,@loader_path/. -Wl,-rpath,@loader_path/.."
51183    fi
51184    if test "x$OPENJDK_BUILD_OS" = xlinux; then
51185      # And since we now know that the linker is gnu, then add -z defs, to forbid
51186      # undefined symbols in object files.
51187      LDFLAGS_NO_UNDEF_SYM="-Wl,-z,defs"
51188      OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_NO_UNDEF_SYM"
51189      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS  $LDFLAGS_NO_UNDEF_SYM"
51190      LDFLAGS_NO_EXEC_STACK="-Wl,-z,noexecstack"
51191      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_NO_EXEC_STACK"
51192      if test "x$OPENJDK_BUILD_CPU" = xx86; then
51193        OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -march=i586"
51194      fi
51195      case $DEBUG_LEVEL in
51196        release )
51197          # tell linker to optimize libraries.
51198          # Should this be supplied to the OSS linker as well?
51199          LDFLAGS_DEBUGLEVEL_release="-Wl,-O1"
51200          OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_DEBUGLEVEL_release"
51201          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_DEBUGLEVEL_release"
51202          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51203            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51204          fi
51205          ;;
51206        slowdebug )
51207          # Hotspot always let the linker optimize
51208          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51209          if test "x$HAS_LINKER_NOW" = "xtrue"; then
51210            # do relocations at load
51211            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_NOW_FLAG"
51212            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_NOW_FLAG"
51213            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_NOW_FLAG"
51214          fi
51215          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51216            # mark relocations read only
51217            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51218            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51219            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51220          fi
51221          ;;
51222        fastdebug )
51223          # Hotspot always let the linker optimize
51224          OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -Wl,-O1"
51225          if test "x$HAS_LINKER_RELRO" = "xtrue"; then
51226            # mark relocations read only
51227            OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LINKER_RELRO_FLAG"
51228            OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LINKER_RELRO_FLAG"
51229            OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LINKER_RELRO_FLAG"
51230          fi
51231          ;;
51232        * )
51233          as_fn_error $? "Unrecognized \$DEBUG_LEVEL: $DEBUG_LEVEL" "$LINENO" 5
51234          ;;
51235        esac
51236    fi
51237  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51238    LDFLAGS_SOLSTUDIO="-Wl,-z,defs"
51239    OPENJDK_BUILD_LDFLAGS_JDK="$OPENJDK_BUILD_LDFLAGS_JDK $LDFLAGS_SOLSTUDIO -xildoff -ztext"
51240    LDFLAGS_CXX_SOLSTUDIO="-norunpath"
51241    OPENJDK_BUILD_LDFLAGS_CXX_JDK="$OPENJDK_BUILD_LDFLAGS_CXX_JDK $LDFLAGS_CXX_SOLSTUDIO -xnolib"
51242    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_SOLSTUDIO -library=%none -mt $LDFLAGS_CXX_SOLSTUDIO -z noversion"
51243    if test "x$OPENJDK_BUILD_CPU_ARCH" = "xsparc"; then
51244      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -xarch=sparc"
51245    fi
51246  elif test "x$TOOLCHAIN_TYPE" = xxlc; then
51247    LDFLAGS_XLC="-b64 -brtl -bnolibpath -bexpall -bernotok"
51248    OPENJDK_BUILD_LDFLAGS_JDK="${OPENJDK_BUILD_LDFLAGS_JDK} $LDFLAGS_XLC"
51249    OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS $LDFLAGS_XLC"
51250  fi
51251
51252  # Customize LDFLAGS for executables
51253
51254  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDK}"
51255
51256  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51257    if test "x$OPENJDK_BUILD_CPU_BITS" = "x64"; then
51258      LDFLAGS_STACK_SIZE=1048576
51259    else
51260      LDFLAGS_STACK_SIZE=327680
51261    fi
51262    OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} /STACK:$LDFLAGS_STACK_SIZE"
51263  elif test "x$OPENJDK_BUILD_OS" = xlinux; then
51264    OPENJDK_BUILD_LDFLAGS_JDKEXE="$OPENJDK_BUILD_LDFLAGS_JDKEXE -Wl,--allow-shlib-undefined"
51265  fi
51266
51267  OPENJDK_BUILD_LDFLAGS_JDKEXE="${OPENJDK_BUILD_LDFLAGS_JDKEXE} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51268
51269  # Customize LDFLAGS for libs
51270  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDK}"
51271
51272  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${SHARED_LIBRARY_FLAGS}"
51273  if test "x$TOOLCHAIN_TYPE" = xmicrosoft; then
51274    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51275        -libpath:${OUTPUT_ROOT}/support/modules_libs/java.base"
51276    OPENJDK_BUILD_JDKLIB_LIBS=""
51277  else
51278    OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51279        -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)"
51280
51281    if test "xBUILD" = "xTARGET"; then
51282    # On some platforms (mac) the linker warns about non existing -L dirs.
51283    # Add server first if available. Linking aginst client does not always produce the same results.
51284      # Only add client/minimal dir if client/minimal is being built.
51285    # Default to server for other variants.
51286      if   [[ " $JVM_VARIANTS " =~ " server " ]]  ; then
51287        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51288      elif   [[ " $JVM_VARIANTS " =~ " client " ]]  ; then
51289        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/client"
51290      elif   [[ " $JVM_VARIANTS " =~ " minimal " ]]  ; then
51291        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/minimal"
51292    else
51293        OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51294    fi
51295    elif test "xBUILD" = "xBUILD"; then
51296      # When building a buildjdk, it's always only the server variant
51297      OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} \
51298          -L\$(SUPPORT_OUTPUTDIR)/modules_libs/java.base\$(OPENJDK_BUILD_CPU_LIBDIR)/server"
51299    fi
51300
51301    OPENJDK_BUILD_JDKLIB_LIBS="-ljava -ljvm"
51302    if test "x$TOOLCHAIN_TYPE" = xsolstudio; then
51303      OPENJDK_BUILD_JDKLIB_LIBS="$OPENJDK_BUILD_JDKLIB_LIBS -lc"
51304    fi
51305
51306  fi
51307
51308  # Set OPENJDK_BUILD_JVM_LIBS (per os)
51309  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51310    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm -ldl -lpthread"
51311  elif test "x$OPENJDK_BUILD_OS" = xsolaris; then
51312    # FIXME: This hard-coded path is not really proper.
51313    if test "x$OPENJDK_BUILD_CPU" = xx86_64; then
51314      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/amd64/libm.so.1"
51315    elif test "x$OPENJDK_BUILD_CPU" = xsparcv9; then
51316      OPENJDK_BUILD_SOLARIS_LIBM_LIBS="/usr/lib/sparcv9/libm.so.1"
51317    fi
51318    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lsocket -lsched -ldl $SOLARIS_LIBM_LIBS -lCrun \
51319        -lthread -ldoor -lc -ldemangle -lnsl -lkstat -lrt"
51320  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51321    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51322  elif test "x$OPENJDK_BUILD_OS" = xaix; then
51323    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -Wl,-lC_r -lm -ldl -lpthread"
51324  elif test "x$OPENJDK_BUILD_OS" = xbsd; then
51325    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS -lm"
51326  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
51327    OPENJDK_BUILD_JVM_LIBS="$OPENJDK_BUILD_JVM_LIBS kernel32.lib user32.lib gdi32.lib winspool.lib \
51328        comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib \
51329        wsock32.lib winmm.lib version.lib psapi.lib"
51330    fi
51331
51332  # Set OPENJDK_BUILD_JVM_ASFLAGS
51333  if test "x$OPENJDK_BUILD_OS" = xlinux; then
51334    if test "x$OPENJDK_BUILD_CPU" = xx86; then
51335      OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -march=i586"
51336    fi
51337  elif test "x$OPENJDK_BUILD_OS" = xmacosx; then
51338    OPENJDK_BUILD_JVM_ASFLAGS="$OPENJDK_BUILD_JVM_ASFLAGS -x assembler-with-cpp -mno-omit-leaf-frame-pointer -mstack-alignment=16"
51339  fi
51340
51341  OPENJDK_BUILD_LDFLAGS_JDKLIB="${OPENJDK_BUILD_LDFLAGS_JDKLIB} ${OPENJDK_BUILD_EXTRA_LDFLAGS_JDK}"
51342
51343
51344
51345
51346
51347
51348
51349
51350
51351
51352
51353
51354
51355
51356
51357  # Tests are only ever compiled for TARGET
51358  # Flags for compiling test libraries
51359  CFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK $PICFLAG $CFLAGS_JDKLIB_EXTRA"
51360  CXXFLAGS_TESTLIB="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK $PICFLAG $CXXFLAGS_JDKLIB_EXTRA"
51361
51362  # Flags for compiling test executables
51363  CFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CFLAGS_JDK"
51364  CXXFLAGS_TESTEXE="$COMMON_CCXXFLAGS_JDK $CXXFLAGS_JDK"
51365
51366
51367
51368
51369
51370
51371  LDFLAGS_TESTLIB="$LDFLAGS_JDKLIB"
51372  LDFLAGS_TESTEXE="$LDFLAGS_JDKEXE"
51373
51374
51375
51376
51377
51378
51379  # Some Zero and Shark settings.
51380  # ZERO_ARCHFLAG tells the compiler which mode to build for
51381  case "${OPENJDK_TARGET_CPU}" in
51382    s390)
51383      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}31"
51384      ;;
51385    *)
51386      ZERO_ARCHFLAG="${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51387  esac
51388
51389
51390
51391
51392
51393
51394
51395
51396
51397
51398
51399
51400
51401
51402
51403
51404
51405
51406
51407
51408
51409
51410
51411
51412
51413
51414
51415
51416
51417
51418
51419
51420
51421
51422
51423
51424
51425
51426
51427
51428
51429
51430    # Execute function body
51431
51432
51433
51434
51435
51436
51437
51438
51439
51440
51441
51442
51443
51444
51445
51446
51447
51448
51449
51450
51451
51452
51453
51454
51455
51456
51457
51458
51459
51460
51461
51462
51463
51464
51465
51466
51467
51468
51469
51470
51471
51472
51473
51474
51475
51476
51477
51478
51479    # Execute function body
51480
51481  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"$ZERO_ARCHFLAG\"" >&5
51482$as_echo_n "checking if the C compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51483  supports=yes
51484
51485  saved_cflags="$CFLAGS"
51486  CFLAGS="$CFLAGS $ZERO_ARCHFLAG"
51487  ac_ext=c
51488ac_cpp='$CPP $CPPFLAGS'
51489ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51490ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51491ac_compiler_gnu=$ac_cv_c_compiler_gnu
51492
51493  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51494/* end confdefs.h.  */
51495int i;
51496_ACEOF
51497if ac_fn_c_try_compile "$LINENO"; then :
51498
51499else
51500  supports=no
51501fi
51502rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51503  ac_ext=cpp
51504ac_cpp='$CXXCPP $CPPFLAGS'
51505ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51506ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51507ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51508
51509  CFLAGS="$saved_cflags"
51510
51511  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51512$as_echo "$supports" >&6; }
51513  if test "x$supports" = "xyes" ; then
51514    :
51515    C_COMP_SUPPORTS="yes"
51516  else
51517    :
51518    C_COMP_SUPPORTS="no"
51519  fi
51520
51521
51522
51523
51524
51525
51526
51527
51528
51529
51530
51531
51532
51533
51534
51535
51536
51537
51538
51539
51540
51541
51542
51543
51544
51545
51546
51547
51548
51549
51550
51551
51552
51553
51554
51555
51556
51557
51558
51559
51560
51561
51562
51563
51564
51565
51566
51567
51568
51569
51570
51571
51572
51573
51574
51575
51576
51577
51578
51579    # Execute function body
51580
51581  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"" >&5
51582$as_echo_n "checking if the C++ compiler supports \"$ZERO_ARCHFLAG\"... " >&6; }
51583  supports=yes
51584
51585  saved_cxxflags="$CXXFLAGS"
51586  CXXFLAGS="$CXXFLAG $ZERO_ARCHFLAG"
51587  ac_ext=cpp
51588ac_cpp='$CXXCPP $CPPFLAGS'
51589ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51590ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51591ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51592
51593  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51594/* end confdefs.h.  */
51595int i;
51596_ACEOF
51597if ac_fn_cxx_try_compile "$LINENO"; then :
51598
51599else
51600  supports=no
51601fi
51602rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51603  ac_ext=cpp
51604ac_cpp='$CXXCPP $CPPFLAGS'
51605ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51606ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51607ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51608
51609  CXXFLAGS="$saved_cxxflags"
51610
51611  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51612$as_echo "$supports" >&6; }
51613  if test "x$supports" = "xyes" ; then
51614    :
51615    CXX_COMP_SUPPORTS="yes"
51616  else
51617    :
51618    CXX_COMP_SUPPORTS="no"
51619  fi
51620
51621
51622
51623
51624
51625
51626
51627
51628
51629
51630
51631
51632
51633  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"$ZERO_ARCHFLAG\"" >&5
51634$as_echo_n "checking if both compilers support \"$ZERO_ARCHFLAG\"... " >&6; }
51635  supports=no
51636  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51637
51638  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51639$as_echo "$supports" >&6; }
51640  if test "x$supports" = "xyes" ; then
51641    :
51642
51643  else
51644    :
51645    ZERO_ARCHFLAG=""
51646  fi
51647
51648
51649
51650
51651
51652
51653
51654
51655  # Check that the compiler supports -mX (or -qX on AIX) flags
51656  # Set COMPILER_SUPPORTS_TARGET_BITS_FLAG to 'true' if it does
51657
51658
51659
51660
51661
51662
51663
51664
51665
51666
51667
51668
51669
51670
51671
51672
51673
51674
51675
51676
51677
51678
51679
51680
51681
51682
51683
51684
51685
51686
51687
51688
51689
51690
51691
51692
51693
51694
51695
51696
51697
51698
51699
51700
51701
51702
51703
51704    # Execute function body
51705
51706
51707
51708
51709
51710
51711
51712
51713
51714
51715
51716
51717
51718
51719
51720
51721
51722
51723
51724
51725
51726
51727
51728
51729
51730
51731
51732
51733
51734
51735
51736
51737
51738
51739
51740
51741
51742
51743
51744
51745
51746
51747
51748
51749
51750
51751
51752
51753    # Execute function body
51754
51755  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51756$as_echo_n "checking if the C compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51757  supports=yes
51758
51759  saved_cflags="$CFLAGS"
51760  CFLAGS="$CFLAGS ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51761  ac_ext=c
51762ac_cpp='$CPP $CPPFLAGS'
51763ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51764ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51765ac_compiler_gnu=$ac_cv_c_compiler_gnu
51766
51767  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51768/* end confdefs.h.  */
51769int i;
51770_ACEOF
51771if ac_fn_c_try_compile "$LINENO"; then :
51772
51773else
51774  supports=no
51775fi
51776rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51777  ac_ext=cpp
51778ac_cpp='$CXXCPP $CPPFLAGS'
51779ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51780ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51781ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51782
51783  CFLAGS="$saved_cflags"
51784
51785  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51786$as_echo "$supports" >&6; }
51787  if test "x$supports" = "xyes" ; then
51788    :
51789    C_COMP_SUPPORTS="yes"
51790  else
51791    :
51792    C_COMP_SUPPORTS="no"
51793  fi
51794
51795
51796
51797
51798
51799
51800
51801
51802
51803
51804
51805
51806
51807
51808
51809
51810
51811
51812
51813
51814
51815
51816
51817
51818
51819
51820
51821
51822
51823
51824
51825
51826
51827
51828
51829
51830
51831
51832
51833
51834
51835
51836
51837
51838
51839
51840
51841
51842
51843
51844
51845
51846
51847
51848
51849
51850
51851
51852
51853    # Execute function body
51854
51855  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51856$as_echo_n "checking if the C++ compiler supports \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51857  supports=yes
51858
51859  saved_cxxflags="$CXXFLAGS"
51860  CXXFLAGS="$CXXFLAG ${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}"
51861  ac_ext=cpp
51862ac_cpp='$CXXCPP $CPPFLAGS'
51863ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51864ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51865ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51866
51867  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
51868/* end confdefs.h.  */
51869int i;
51870_ACEOF
51871if ac_fn_cxx_try_compile "$LINENO"; then :
51872
51873else
51874  supports=no
51875fi
51876rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
51877  ac_ext=cpp
51878ac_cpp='$CXXCPP $CPPFLAGS'
51879ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
51880ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
51881ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
51882
51883  CXXFLAGS="$saved_cxxflags"
51884
51885  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51886$as_echo "$supports" >&6; }
51887  if test "x$supports" = "xyes" ; then
51888    :
51889    CXX_COMP_SUPPORTS="yes"
51890  else
51891    :
51892    CXX_COMP_SUPPORTS="no"
51893  fi
51894
51895
51896
51897
51898
51899
51900
51901
51902
51903
51904
51905
51906
51907  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"" >&5
51908$as_echo_n "checking if both compilers support \"${COMPILER_TARGET_BITS_FLAG}${OPENJDK_TARGET_CPU_BITS}\"... " >&6; }
51909  supports=no
51910  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
51911
51912  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
51913$as_echo "$supports" >&6; }
51914  if test "x$supports" = "xyes" ; then
51915    :
51916    COMPILER_SUPPORTS_TARGET_BITS_FLAG=true
51917  else
51918    :
51919    COMPILER_SUPPORTS_TARGET_BITS_FLAG=false
51920  fi
51921
51922
51923
51924
51925
51926
51927
51928
51929  # Check whether --enable-warnings-as-errors was given.
51930if test "${enable_warnings_as_errors+set}" = set; then :
51931  enableval=$enable_warnings_as_errors;
51932fi
51933
51934
51935  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native warnings are errors" >&5
51936$as_echo_n "checking if native warnings are errors... " >&6; }
51937  if test "x$enable_warnings_as_errors" = "xyes"; then
51938    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (explicitely set)" >&5
51939$as_echo "yes (explicitely set)" >&6; }
51940    WARNINGS_AS_ERRORS=true
51941  elif test "x$enable_warnings_as_errors" = "xno"; then
51942    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
51943$as_echo "no" >&6; }
51944    WARNINGS_AS_ERRORS=false
51945  elif test "x$enable_warnings_as_errors" = "x"; then
51946    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (default)" >&5
51947$as_echo "yes (default)" >&6; }
51948    WARNINGS_AS_ERRORS=true
51949  else
51950    as_fn_error $? "--enable-warnings-as-errors accepts no argument" "$LINENO" 5
51951  fi
51952
51953  if test "x$WARNINGS_AS_ERRORS" = "xfalse"; then
51954    # Set legacy hotspot variable
51955    HOTSPOT_SET_WARNINGS_AS_ERRORS="WARNINGS_ARE_ERRORS="
51956  else
51957    HOTSPOT_SET_WARNINGS_AS_ERRORS=""
51958  fi
51959
51960
51961
51962
51963  case "${TOOLCHAIN_TYPE}" in
51964    microsoft)
51965      DISABLE_WARNING_PREFIX="-wd"
51966      CFLAGS_WARNINGS_ARE_ERRORS="-WX"
51967      ;;
51968    solstudio)
51969      DISABLE_WARNING_PREFIX="-erroff="
51970      CFLAGS_WARNINGS_ARE_ERRORS="-errtags -errwarn=%all"
51971      ;;
51972    gcc)
51973      # Prior to gcc 4.4, a -Wno-X where X is unknown for that version of gcc will cause an error
51974
51975
51976
51977
51978
51979
51980
51981
51982
51983
51984
51985
51986
51987
51988
51989
51990
51991
51992
51993
51994
51995
51996
51997
51998
51999
52000
52001
52002
52003
52004
52005
52006
52007
52008
52009
52010
52011
52012
52013
52014
52015
52016
52017
52018
52019
52020
52021    # Execute function body
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 \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52073$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52074  supports=yes
52075
52076  saved_cflags="$CFLAGS"
52077  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52078  ac_ext=c
52079ac_cpp='$CPP $CPPFLAGS'
52080ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52081ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52082ac_compiler_gnu=$ac_cv_c_compiler_gnu
52083
52084  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52085/* end confdefs.h.  */
52086int i;
52087_ACEOF
52088if ac_fn_c_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  CFLAGS="$saved_cflags"
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    C_COMP_SUPPORTS="yes"
52107  else
52108    :
52109    C_COMP_SUPPORTS="no"
52110  fi
52111
52112
52113
52114
52115
52116
52117
52118
52119
52120
52121
52122
52123
52124
52125
52126
52127
52128
52129
52130
52131
52132
52133
52134
52135
52136
52137
52138
52139
52140
52141
52142
52143
52144
52145
52146
52147
52148
52149
52150
52151
52152
52153
52154
52155
52156
52157
52158
52159
52160
52161
52162
52163
52164
52165
52166
52167
52168
52169
52170    # Execute function body
52171
52172  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52173$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52174  supports=yes
52175
52176  saved_cxxflags="$CXXFLAGS"
52177  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52178  ac_ext=cpp
52179ac_cpp='$CXXCPP $CPPFLAGS'
52180ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52181ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52182ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52183
52184  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52185/* end confdefs.h.  */
52186int i;
52187_ACEOF
52188if ac_fn_cxx_try_compile "$LINENO"; then :
52189
52190else
52191  supports=no
52192fi
52193rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52194  ac_ext=cpp
52195ac_cpp='$CXXCPP $CPPFLAGS'
52196ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52197ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52198ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52199
52200  CXXFLAGS="$saved_cxxflags"
52201
52202  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52203$as_echo "$supports" >&6; }
52204  if test "x$supports" = "xyes" ; then
52205    :
52206    CXX_COMP_SUPPORTS="yes"
52207  else
52208    :
52209    CXX_COMP_SUPPORTS="no"
52210  fi
52211
52212
52213
52214
52215
52216
52217
52218
52219
52220
52221
52222
52223
52224  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52225$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52226  supports=no
52227  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52228
52229  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52230$as_echo "$supports" >&6; }
52231  if test "x$supports" = "xyes" ; then
52232    :
52233    GCC_CAN_DISABLE_WARNINGS=true
52234  else
52235    :
52236    GCC_CAN_DISABLE_WARNINGS=false
52237
52238  fi
52239
52240
52241
52242
52243
52244
52245      if test "x$GCC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52246        DISABLE_WARNING_PREFIX="-Wno-"
52247      else
52248        DISABLE_WARNING_PREFIX=
52249      fi
52250      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52251      # Repeate the check for the BUILD_CC and BUILD_CXX. Need to also reset
52252      # CFLAGS since any target specific flags will likely not work with the
52253      # build compiler
52254      CC_OLD="$CC"
52255      CXX_OLD="$CXX"
52256      CC="$BUILD_CC"
52257      CXX="$BUILD_CXX"
52258      CFLAGS_OLD="$CFLAGS"
52259      CFLAGS=""
52260
52261
52262
52263
52264
52265
52266
52267
52268
52269
52270
52271
52272
52273
52274
52275
52276
52277
52278
52279
52280
52281
52282
52283
52284
52285
52286
52287
52288
52289
52290
52291
52292
52293
52294
52295
52296
52297
52298
52299
52300
52301
52302
52303
52304
52305
52306
52307    # Execute function body
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
52345
52346
52347
52348
52349
52350
52351
52352
52353
52354
52355
52356    # Execute function body
52357
52358  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52359$as_echo_n "checking if the C compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52360  supports=yes
52361
52362  saved_cflags="$CFLAGS"
52363  CFLAGS="$CFLAGS -Wno-this-is-a-warning-that-do-not-exist"
52364  ac_ext=c
52365ac_cpp='$CPP $CPPFLAGS'
52366ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52367ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52368ac_compiler_gnu=$ac_cv_c_compiler_gnu
52369
52370  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52371/* end confdefs.h.  */
52372int i;
52373_ACEOF
52374if ac_fn_c_try_compile "$LINENO"; then :
52375
52376else
52377  supports=no
52378fi
52379rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52380  ac_ext=cpp
52381ac_cpp='$CXXCPP $CPPFLAGS'
52382ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52383ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52384ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52385
52386  CFLAGS="$saved_cflags"
52387
52388  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52389$as_echo "$supports" >&6; }
52390  if test "x$supports" = "xyes" ; then
52391    :
52392    C_COMP_SUPPORTS="yes"
52393  else
52394    :
52395    C_COMP_SUPPORTS="no"
52396  fi
52397
52398
52399
52400
52401
52402
52403
52404
52405
52406
52407
52408
52409
52410
52411
52412
52413
52414
52415
52416
52417
52418
52419
52420
52421
52422
52423
52424
52425
52426
52427
52428
52429
52430
52431
52432
52433
52434
52435
52436
52437
52438
52439
52440
52441
52442
52443
52444
52445
52446
52447
52448
52449
52450
52451
52452
52453
52454
52455
52456    # Execute function body
52457
52458  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52459$as_echo_n "checking if the C++ compiler supports \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52460  supports=yes
52461
52462  saved_cxxflags="$CXXFLAGS"
52463  CXXFLAGS="$CXXFLAG -Wno-this-is-a-warning-that-do-not-exist"
52464  ac_ext=cpp
52465ac_cpp='$CXXCPP $CPPFLAGS'
52466ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52467ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52468ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52469
52470  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
52471/* end confdefs.h.  */
52472int i;
52473_ACEOF
52474if ac_fn_cxx_try_compile "$LINENO"; then :
52475
52476else
52477  supports=no
52478fi
52479rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
52480  ac_ext=cpp
52481ac_cpp='$CXXCPP $CPPFLAGS'
52482ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
52483ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
52484ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
52485
52486  CXXFLAGS="$saved_cxxflags"
52487
52488  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52489$as_echo "$supports" >&6; }
52490  if test "x$supports" = "xyes" ; then
52491    :
52492    CXX_COMP_SUPPORTS="yes"
52493  else
52494    :
52495    CXX_COMP_SUPPORTS="no"
52496  fi
52497
52498
52499
52500
52501
52502
52503
52504
52505
52506
52507
52508
52509
52510  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"" >&5
52511$as_echo_n "checking if both compilers support \"-Wno-this-is-a-warning-that-do-not-exist\"... " >&6; }
52512  supports=no
52513  if test "x$C_COMP_SUPPORTS" = "xyes" -a "x$CXX_COMP_SUPPORTS" = "xyes"; then supports=yes; fi
52514
52515  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $supports" >&5
52516$as_echo "$supports" >&6; }
52517  if test "x$supports" = "xyes" ; then
52518    :
52519    BUILD_CC_CAN_DISABLE_WARNINGS=true
52520  else
52521    :
52522    BUILD_CC_CAN_DISABLE_WARNINGS=false
52523
52524  fi
52525
52526
52527
52528
52529
52530
52531      if test "x$BUILD_CC_CAN_DISABLE_WARNINGS" = "xtrue"; then
52532        BUILD_CC_DISABLE_WARNING_PREFIX="-Wno-"
52533      else
52534        BUILD_CC_DISABLE_WARNING_PREFIX=
52535      fi
52536      CC="$CC_OLD"
52537      CXX="$CXX_OLD"
52538      CFLAGS="$CFLAGS_OLD"
52539      ;;
52540    clang)
52541      DISABLE_WARNING_PREFIX="-Wno-"
52542      CFLAGS_WARNINGS_ARE_ERRORS="-Werror"
52543      ;;
52544    xlc)
52545      DISABLE_WARNING_PREFIX="-qsuppress="
52546      CFLAGS_WARNINGS_ARE_ERRORS="-qhalt=w"
52547      ;;
52548  esac
52549
52550
52551
52552
52553
52554# Setup debug symbols (need objcopy from the toolchain for that)
52555
52556  #
52557  # NATIVE_DEBUG_SYMBOLS
52558  # This must be done after the toolchain is setup, since we're looking at objcopy.
52559  #
52560  { $as_echo "$as_me:${as_lineno-$LINENO}: checking what type of native debug symbols to use" >&5
52561$as_echo_n "checking what type of native debug symbols to use... " >&6; }
52562
52563# Check whether --with-native-debug-symbols was given.
52564if test "${with_native_debug_symbols+set}" = set; then :
52565  withval=$with_native_debug_symbols;
52566        if test "x$OPENJDK_TARGET_OS" = xaix; then
52567          if test "x$withval" = xexternal || test "x$withval" = xzipped; then
52568            as_fn_error $? "AIX only supports the parameters 'none' and 'internal' for --with-native-debug-symbols" "$LINENO" 5
52569          fi
52570        fi
52571
52572else
52573
52574        if test "x$OPENJDK_TARGET_OS" = xaix; then
52575          # AIX doesn't support 'zipped' so use 'internal' as default
52576          with_native_debug_symbols="internal"
52577        else
52578          if test "x$STATIC_BUILD" = xtrue; then
52579            with_native_debug_symbols="none"
52580          else
52581            with_native_debug_symbols="zipped"
52582          fi
52583        fi
52584
52585fi
52586
52587  NATIVE_DEBUG_SYMBOLS=$with_native_debug_symbols
52588  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NATIVE_DEBUG_SYMBOLS" >&5
52589$as_echo "$NATIVE_DEBUG_SYMBOLS" >&6; }
52590
52591  if test "x$NATIVE_DEBUG_SYMBOLS" = xzipped; then
52592
52593    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52594      if test "x$OBJCOPY" = x; then
52595        # enabling of enable-debug-symbols and can't find objcopy
52596        # this is an error
52597        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52598      fi
52599    fi
52600
52601    COMPILE_WITH_DEBUG_SYMBOLS=true
52602    COPY_DEBUG_SYMBOLS=true
52603    ZIP_EXTERNAL_DEBUG_SYMBOLS=true
52604
52605    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52606    DEBUG_BINARIES=false
52607    STRIP_POLICY=min_strip
52608
52609  elif test "x$NATIVE_DEBUG_SYMBOLS" = xnone; then
52610    COMPILE_WITH_DEBUG_SYMBOLS=false
52611    COPY_DEBUG_SYMBOLS=false
52612    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52613
52614    DEBUG_BINARIES=false
52615    STRIP_POLICY=no_strip
52616  elif test "x$NATIVE_DEBUG_SYMBOLS" = xinternal; then
52617    COMPILE_WITH_DEBUG_SYMBOLS=true
52618    COPY_DEBUG_SYMBOLS=false
52619    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52620
52621    # Hotspot legacy support, will turn on -g when COPY_DEBUG_SYMBOLS=false
52622    DEBUG_BINARIES=true
52623    STRIP_POLICY=no_strip
52624    STRIP=""
52625
52626  elif test "x$NATIVE_DEBUG_SYMBOLS" = xexternal; then
52627
52628    if test "x$OPENJDK_TARGET_OS" = xsolaris || test "x$OPENJDK_TARGET_OS" = xlinux; then
52629      if test "x$OBJCOPY" = x; then
52630        # enabling of enable-debug-symbols and can't find objcopy
52631        # this is an error
52632        as_fn_error $? "Unable to find objcopy, cannot enable native debug symbols" "$LINENO" 5
52633      fi
52634    fi
52635
52636    COMPILE_WITH_DEBUG_SYMBOLS=true
52637    COPY_DEBUG_SYMBOLS=true
52638    ZIP_EXTERNAL_DEBUG_SYMBOLS=false
52639
52640    # Hotspot legacy support, not relevant with COPY_DEBUG_SYMBOLS=true
52641    DEBUG_BINARIES=false
52642    STRIP_POLICY=min_strip
52643  else
52644    as_fn_error $? "Allowed native debug symbols are: none, internal, external, zipped" "$LINENO" 5
52645  fi
52646
52647  # --enable-debug-symbols is deprecated.
52648  # Please use --with-native-debug-symbols=[internal,external,zipped] .
52649
52650  # Check whether --enable-debug-symbols was given.
52651if test "${enable_debug_symbols+set}" = set; then :
52652  enableval=$enable_debug_symbols;
52653fi
52654
52655  if test "x$enable_debug_symbols" != x; then
52656    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&5
52657$as_echo "$as_me: WARNING: Option --enable-debug-symbols is deprecated and will be ignored." >&2;}
52658
52659    if test "xPlease use --with-native-debug-symbols=[internal,external,zipped] ." != x; then
52660      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&5
52661$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=[internal,external,zipped] ." >&2;}
52662    fi
52663
52664  fi
52665
52666
52667  # --enable-zip-debug-info is deprecated.
52668  # Please use --with-native-debug-symbols=zipped .
52669
52670  # Check whether --enable-zip-debug-info was given.
52671if test "${enable_zip_debug_info+set}" = set; then :
52672  enableval=$enable_zip_debug_info;
52673fi
52674
52675  if test "x$enable_zip_debug_info" != x; then
52676    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&5
52677$as_echo "$as_me: WARNING: Option --enable-zip-debug-info is deprecated and will be ignored." >&2;}
52678
52679    if test "xPlease use --with-native-debug-symbols=zipped ." != x; then
52680      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Please use --with-native-debug-symbols=zipped ." >&5
52681$as_echo "$as_me: WARNING: Please use --with-native-debug-symbols=zipped ." >&2;}
52682    fi
52683
52684  fi
52685
52686
52687
52688
52689
52690
52691  # Legacy values
52692
52693
52694
52695
52696  # Check whether --enable-native-coverage was given.
52697if test "${enable_native_coverage+set}" = set; then :
52698  enableval=$enable_native_coverage;
52699fi
52700
52701  GCOV_ENABLED="false"
52702  if test "x$enable_native_coverage" = "xyes"; then
52703    if test "x$TOOLCHAIN_TYPE" = "xgcc"; then
52704      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52705$as_echo_n "checking if native coverage is enabled... " >&6; }
52706      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
52707$as_echo "yes" >&6; }
52708      GCOV_CFLAGS="-fprofile-arcs -ftest-coverage -fno-inline"
52709      GCOV_LDFLAGS="-fprofile-arcs"
52710      LEGACY_EXTRA_CFLAGS="$LEGACY_EXTRA_CFLAGS $GCOV_CFLAGS"
52711      LEGACY_EXTRA_CXXFLAGS="$LEGACY_EXTRA_CXXFLAGS $GCOV_CFLAGS"
52712      LEGACY_EXTRA_LDFLAGS="$LEGACY_EXTRA_LDFLAGS $GCOV_LDFLAGS"
52713      CFLAGS_JDKLIB="$CFLAGS_JDKLIB $GCOV_CFLAGS"
52714      CFLAGS_JDKEXE="$CFLAGS_JDKEXE $GCOV_CFLAGS"
52715      CXXFLAGS_JDKLIB="$CXXFLAGS_JDKLIB $GCOV_CFLAGS"
52716      CXXFLAGS_JDKEXE="$CXXFLAGS_JDKEXE $GCOV_CFLAGS"
52717      LDFLAGS_JDKLIB="$LDFLAGS_JDKLIB $GCOV_LDFLAGS"
52718      LDFLAGS_JDKEXE="$LDFLAGS_JDKEXE $GCOV_LDFLAGS"
52719      GCOV_ENABLED="true"
52720    else
52721      as_fn_error $? "--enable-native-coverage only works with toolchain type gcc" "$LINENO" 5
52722    fi
52723  elif test "x$enable_native_coverage" = "xno"; then
52724    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if native coverage is enabled" >&5
52725$as_echo_n "checking if native coverage is enabled... " >&6; }
52726    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
52727$as_echo "no" >&6; }
52728  elif test "x$enable_native_coverage" != "x"; then
52729    as_fn_error $? "--enable-native-coverage can only be assigned \"yes\" or \"no\"" "$LINENO" 5
52730  fi
52731
52732
52733
52734
52735# Need toolchain to setup dtrace
52736
52737  # Test for dtrace dependencies
52738  # Check whether --enable-dtrace was given.
52739if test "${enable_dtrace+set}" = set; then :
52740  enableval=$enable_dtrace;
52741fi
52742
52743
52744  DTRACE_DEP_MISSING=false
52745
52746  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dtrace tool" >&5
52747$as_echo_n "checking for dtrace tool... " >&6; }
52748  if test "x$DTRACE" != "x" && test -x "$DTRACE"; then
52749    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DTRACE" >&5
52750$as_echo "$DTRACE" >&6; }
52751  else
52752    { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found, cannot build dtrace" >&5
52753$as_echo "not found, cannot build dtrace" >&6; }
52754    DTRACE_DEP_MISSING=true
52755  fi
52756
52757  for ac_header in sys/sdt.h
52758do :
52759  ac_fn_cxx_check_header_mongrel "$LINENO" "sys/sdt.h" "ac_cv_header_sys_sdt_h" "$ac_includes_default"
52760if test "x$ac_cv_header_sys_sdt_h" = xyes; then :
52761  cat >>confdefs.h <<_ACEOF
52762#define HAVE_SYS_SDT_H 1
52763_ACEOF
52764 DTRACE_HEADERS_OK=yes
52765else
52766  DTRACE_HEADERS_OK=no
52767fi
52768
52769done
52770
52771  if test "x$DTRACE_HEADERS_OK" != "xyes"; then
52772    DTRACE_DEP_MISSING=true
52773  fi
52774
52775  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dtrace should be built" >&5
52776$as_echo_n "checking if dtrace should be built... " >&6; }
52777  if test "x$enable_dtrace" = "xyes"; then
52778    if test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52779      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52780$as_echo "no, missing dependencies" >&6; }
52781
52782  # Print a helpful message on how to acquire the necessary build dependency.
52783  # dtrace is the help tag: freetype, cups, alsa etc
52784  MISSING_DEPENDENCY=dtrace
52785
52786  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52787    cygwin_help $MISSING_DEPENDENCY
52788  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52789    msys_help $MISSING_DEPENDENCY
52790  else
52791    PKGHANDLER_COMMAND=
52792
52793    case $PKGHANDLER in
52794      apt-get)
52795        apt_help     $MISSING_DEPENDENCY ;;
52796      yum)
52797        yum_help     $MISSING_DEPENDENCY ;;
52798      port)
52799        port_help    $MISSING_DEPENDENCY ;;
52800      pkgutil)
52801        pkgutil_help $MISSING_DEPENDENCY ;;
52802      pkgadd)
52803        pkgadd_help  $MISSING_DEPENDENCY ;;
52804    esac
52805
52806    if test "x$PKGHANDLER_COMMAND" != x; then
52807      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
52808    fi
52809  fi
52810
52811      as_fn_error $? "Cannot enable dtrace with missing dependencies. See above. $HELP_MSG" "$LINENO" 5
52812    else
52813      INCLUDE_DTRACE=true
52814      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
52815$as_echo "yes, forced" >&6; }
52816    fi
52817  elif test "x$enable_dtrace" = "xno"; then
52818    INCLUDE_DTRACE=false
52819    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
52820$as_echo "no, forced" >&6; }
52821  elif test "x$enable_dtrace" = "xauto" || test "x$enable_dtrace" = "x"; then
52822    if test "x$OPENJDK_TARGET_OS" = "xlinux" && test "x$OPENJDK" != "xtrue"; then
52823      INCLUDE_DTRACE=false
52824      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, non-open linux build" >&5
52825$as_echo "no, non-open linux build" >&6; }
52826    elif test "x$DTRACE_DEP_MISSING" = "xtrue"; then
52827      INCLUDE_DTRACE=false
52828      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing dependencies" >&5
52829$as_echo "no, missing dependencies" >&6; }
52830    else
52831      INCLUDE_DTRACE=true
52832      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, dependencies present" >&5
52833$as_echo "yes, dependencies present" >&6; }
52834    fi
52835  else
52836    as_fn_error $? "Invalid value for --enable-dtrace: $enable_dtrace" "$LINENO" 5
52837  fi
52838
52839
52840
52841  # The user can in some cases supply additional jvm features. For the custom
52842  # variant, this defines the entire variant.
52843
52844# Check whether --with-jvm-features was given.
52845if test "${with_jvm_features+set}" = set; then :
52846  withval=$with_jvm_features;
52847fi
52848
52849  if test "x$with_jvm_features" != x; then
52850    { $as_echo "$as_me:${as_lineno-$LINENO}: checking additional JVM features" >&5
52851$as_echo_n "checking additional JVM features... " >&6; }
52852    JVM_FEATURES=`$ECHO $with_jvm_features | $SED -e 's/,/ /g'`
52853    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES" >&5
52854$as_echo "$JVM_FEATURES" >&6; }
52855  fi
52856
52857  # Verify that dependencies are met for explicitly set features.
52858  if   [[ " $JVM_FEATURES " =~ " jvmti " ]]   && !   [[ " $JVM_FEATURES " =~ " services " ]]  ; then
52859    as_fn_error $? "Specified JVM feature 'jvmti' requires feature 'services'" "$LINENO" 5
52860  fi
52861
52862  if   [[ " $JVM_FEATURES " =~ " management " ]]   && !   [[ " $JVM_FEATURES " =~ " nmt " ]]  ; then
52863    as_fn_error $? "Specified JVM feature 'management' requires feature 'nmt'" "$LINENO" 5
52864  fi
52865
52866  if   [[ " $JVM_FEATURES " =~ " jvmci " ]]   && !   [[ " $JVM_FEATURES " =~ " compiler2 " ]]  ; then
52867    as_fn_error $? "Specified JVM feature 'jvmci' requires feature 'compiler2'" "$LINENO" 5
52868  fi
52869
52870  if   [[ " $JVM_FEATURES " =~ " compiler2 " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52871    as_fn_error $? "Specified JVM feature 'compiler2' requires feature 'all-gcs'" "$LINENO" 5
52872  fi
52873
52874  if   [[ " $JVM_FEATURES " =~ " vm-structs " ]]   && !   [[ " $JVM_FEATURES " =~ " all-gcs " ]]  ; then
52875    as_fn_error $? "Specified JVM feature 'vm-structs' requires feature 'all-gcs'" "$LINENO" 5
52876  fi
52877
52878  # Turn on additional features based on other parts of configure
52879  if test "x$INCLUDE_DTRACE" = "xtrue"; then
52880    JVM_FEATURES="$JVM_FEATURES dtrace"
52881  else
52882    if   [[ " $JVM_FEATURES " =~ " dtrace " ]]  ; then
52883      as_fn_error $? "To enable dtrace, you must use --enable-dtrace" "$LINENO" 5
52884    fi
52885  fi
52886
52887  if test "x$STATIC_BUILD" = "xtrue"; then
52888    JVM_FEATURES="$JVM_FEATURES static-build"
52889  else
52890    if   [[ " $JVM_FEATURES " =~ " static-build " ]]  ; then
52891      as_fn_error $? "To enable static-build, you must use --enable-static-build" "$LINENO" 5
52892    fi
52893  fi
52894
52895  if !   [[ " $JVM_VARIANTS " =~ " zero " ]]   && !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52896    if   [[ " $JVM_FEATURES " =~ " zero " ]]  ; then
52897      as_fn_error $? "To enable zero/zeroshark, you must use --with-jvm-variants=zero/zeroshark" "$LINENO" 5
52898    fi
52899  fi
52900
52901  if !   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
52902    if   [[ " $JVM_FEATURES " =~ " shark " ]]  ; then
52903      as_fn_error $? "To enable shark, you must use --with-jvm-variants=zeroshark" "$LINENO" 5
52904    fi
52905  fi
52906
52907  # Only enable jvmci on x86_64, sparcv9 and aarch64, and only on server.
52908  if test "x$OPENJDK_TARGET_CPU" = "xx86_64" || \
52909      test "x$OPENJDK_TARGET_CPU" = "xsparcv9" || \
52910      test "x$OPENJDK_TARGET_CPU" = "xaarch64" ; then
52911    JVM_FEATURES_jvmci="jvmci"
52912  else
52913    JVM_FEATURES_jvmci=""
52914  fi
52915
52916  # All variants but minimal (and custom) get these features
52917  NON_MINIMAL_FEATURES="$NON_MINIMAL_FEATURES jvmti fprof vm-structs jni-check services management all-gcs nmt cds"
52918
52919  # Enable features depending on variant.
52920  JVM_FEATURES_server="compiler1 compiler2 $NON_MINIMAL_FEATURES $JVM_FEATURES $JVM_FEATURES_jvmci"
52921  JVM_FEATURES_client="compiler1 $NON_MINIMAL_FEATURES $JVM_FEATURES"
52922  JVM_FEATURES_core="$NON_MINIMAL_FEATURES $JVM_FEATURES"
52923  JVM_FEATURES_minimal="compiler1 minimal $JVM_FEATURES"
52924  JVM_FEATURES_zero="zero $NON_MINIMAL_FEATURES $JVM_FEATURES"
52925  JVM_FEATURES_zeroshark="zero shark $NON_MINIMAL_FEATURES $JVM_FEATURES"
52926  JVM_FEATURES_custom="$JVM_FEATURES"
52927
52928
52929
52930
52931
52932
52933
52934
52935
52936  # Used for verification of Makefiles by check-jvm-feature
52937
52938
52939  # We don't support --with-jvm-interpreter anymore, use zero instead.
52940
52941
52942# Check whether --with-jvm-interpreter was given.
52943if test "${with_jvm_interpreter+set}" = set; then :
52944  withval=$with_jvm_interpreter; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&5
52945$as_echo "$as_me: WARNING: Option --with-jvm-interpreter is deprecated and will be ignored." >&2;}
52946fi
52947
52948
52949
52950
52951###############################################################################
52952#
52953# Check dependencies for external and internal libraries.
52954#
52955###############################################################################
52956
52957# After we have toolchain, we can compile fixpath. It's needed by the lib checks.
52958
52959  # When using cygwin or msys, we need a wrapper binary that renames
52960  # /cygdrive/c/ arguments into c:/ arguments and peeks into
52961  # @files and rewrites these too! This wrapper binary is
52962  # called fixpath.
52963  FIXPATH=
52964  if test "x$OPENJDK_BUILD_OS" = xwindows; then
52965    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath can be created" >&5
52966$as_echo_n "checking if fixpath can be created... " >&6; }
52967    FIXPATH_SRC="$SRC_ROOT/common/src/fixpath.c"
52968    FIXPATH_BIN="$CONFIGURESUPPORT_OUTPUTDIR/bin/fixpath.exe"
52969    FIXPATH_DIR="$CONFIGURESUPPORT_OUTPUTDIR/fixpath"
52970    if test "x$OPENJDK_BUILD_OS_ENV" = xwindows.cygwin; then
52971      # Important to keep the .exe suffix on Cygwin for Hotspot makefiles
52972      FIXPATH="$FIXPATH_BIN -c"
52973    elif test "x$OPENJDK_BUILD_OS_ENV" = xwindows.msys; then
52974      # Take all collected prefixes and turn them into a -m/c/foo@/c/bar@... command line
52975      # @ was chosen as separator to minimize risk of other tools messing around with it
52976      all_unique_prefixes=`echo "${all_fixpath_prefixes[@]}" \
52977          | tr ' ' '\n' | grep '^/./' | sort | uniq`
52978      fixpath_argument_list=`echo $all_unique_prefixes  | tr ' ' '@'`
52979      FIXPATH="$FIXPATH_BIN -m$fixpath_argument_list"
52980    fi
52981    FIXPATH_SRC_W="$FIXPATH_SRC"
52982    FIXPATH_BIN_W="$FIXPATH_BIN"
52983
52984  unix_path="$FIXPATH_SRC_W"
52985  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52986    windows_path=`$CYGPATH -m "$unix_path"`
52987    FIXPATH_SRC_W="$windows_path"
52988  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52989    windows_path=`cmd //c echo $unix_path`
52990    FIXPATH_SRC_W="$windows_path"
52991  fi
52992
52993
52994  unix_path="$FIXPATH_BIN_W"
52995  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
52996    windows_path=`$CYGPATH -m "$unix_path"`
52997    FIXPATH_BIN_W="$windows_path"
52998  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
52999    windows_path=`cmd //c echo $unix_path`
53000    FIXPATH_BIN_W="$windows_path"
53001  fi
53002
53003    $RM -rf $FIXPATH_BIN $FIXPATH_DIR
53004    $MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
53005    cd $FIXPATH_DIR
53006    $CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
53007    cd $CURDIR
53008
53009    if test ! -x $FIXPATH_BIN; then
53010      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53011$as_echo "no" >&6; }
53012      cat $FIXPATH_DIR/fixpath1.log
53013      as_fn_error $? "Could not create $FIXPATH_BIN" "$LINENO" 5
53014    fi
53015    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53016$as_echo "yes" >&6; }
53017    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if fixpath.exe works" >&5
53018$as_echo_n "checking if fixpath.exe works... " >&6; }
53019    cd $FIXPATH_DIR
53020    $FIXPATH $CC $FIXPATH_SRC -Fe$FIXPATH_DIR/fixpath2.exe \
53021        > $FIXPATH_DIR/fixpath2.log 2>&1
53022    cd $CURDIR
53023    if test ! -x $FIXPATH_DIR/fixpath2.exe; then
53024      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
53025$as_echo "no" >&6; }
53026      cat $FIXPATH_DIR/fixpath2.log
53027      as_fn_error $? "fixpath did not work!" "$LINENO" 5
53028    fi
53029    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
53030$as_echo "yes" >&6; }
53031
53032    FIXPATH_DETACH_FLAG="--detach"
53033  fi
53034
53035
53036
53037
53038
53039
53040  # Check if X11 is needed
53041  if test "x$OPENJDK_TARGET_OS" = xwindows || test "x$OPENJDK_TARGET_OS" = xmacosx; then
53042    # No X11 support on windows or macosx
53043    NEEDS_LIB_X11=false
53044  else
53045    if test "x$SUPPORT_HEADFUL" = xno; then
53046      # No X11 support if building headless-only
53047      NEEDS_LIB_X11=false
53048    else
53049      # All other instances need X11
53050      NEEDS_LIB_X11=true
53051    fi
53052  fi
53053
53054  # Check if cups is needed
53055  if test "x$OPENJDK_TARGET_OS" = xwindows; then
53056    # Windows have a separate print system
53057    NEEDS_LIB_CUPS=false
53058  else
53059    NEEDS_LIB_CUPS=true
53060  fi
53061
53062  # Check if freetype is needed
53063  if test "x$OPENJDK" = "xtrue"; then
53064    NEEDS_LIB_FREETYPE=true
53065  else
53066    NEEDS_LIB_FREETYPE=false
53067  fi
53068
53069  # Check if alsa is needed
53070  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53071    NEEDS_LIB_ALSA=true
53072  else
53073    NEEDS_LIB_ALSA=false
53074  fi
53075
53076  # Check if ffi is needed
53077  if   [[ " $JVM_VARIANTS " =~ " zero " ]]   ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53078    NEEDS_LIB_FFI=true
53079  else
53080    NEEDS_LIB_FFI=false
53081  fi
53082
53083
53084  # statically link libstdc++ before C++ ABI is stablized on Linux unless
53085  # dynamic build is configured on command line.
53086
53087# Check whether --with-stdc++lib was given.
53088if test "${with_stdc__lib+set}" = set; then :
53089  withval=$with_stdc__lib;
53090        if test "x$with_stdc__lib" != xdynamic && test "x$with_stdc__lib" != xstatic \
53091                && test "x$with_stdc__lib" != xdefault; then
53092          as_fn_error $? "Bad parameter value --with-stdc++lib=$with_stdc__lib!" "$LINENO" 5
53093        fi
53094
53095else
53096  with_stdc__lib=default
53097
53098fi
53099
53100
53101  if test "x$OPENJDK_TARGET_OS" = xlinux; then
53102    # Test if -lstdc++ works.
53103    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if dynamic link of stdc++ is possible" >&5
53104$as_echo_n "checking if dynamic link of stdc++ is possible... " >&6; }
53105    ac_ext=cpp
53106ac_cpp='$CXXCPP $CPPFLAGS'
53107ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53108ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53109ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53110
53111    OLD_CXXFLAGS="$CXXFLAGS"
53112    CXXFLAGS="$CXXFLAGS -lstdc++"
53113    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53114/* end confdefs.h.  */
53115
53116int
53117main ()
53118{
53119return 0;
53120  ;
53121  return 0;
53122}
53123_ACEOF
53124if ac_fn_cxx_try_link "$LINENO"; then :
53125  has_dynamic_libstdcxx=yes
53126else
53127  has_dynamic_libstdcxx=no
53128fi
53129rm -f core conftest.err conftest.$ac_objext \
53130    conftest$ac_exeext conftest.$ac_ext
53131    CXXFLAGS="$OLD_CXXFLAGS"
53132    ac_ext=cpp
53133ac_cpp='$CXXCPP $CPPFLAGS'
53134ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53135ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53136ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53137
53138    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_dynamic_libstdcxx" >&5
53139$as_echo "$has_dynamic_libstdcxx" >&6; }
53140
53141    # Test if stdc++ can be linked statically.
53142    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if static link of stdc++ is possible" >&5
53143$as_echo_n "checking if static link of stdc++ is possible... " >&6; }
53144    STATIC_STDCXX_FLAGS="-Wl,-Bstatic -lstdc++ -lgcc -Wl,-Bdynamic"
53145    ac_ext=cpp
53146ac_cpp='$CXXCPP $CPPFLAGS'
53147ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53148ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53149ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53150
53151    OLD_LIBS="$LIBS"
53152    OLD_CXX="$CXX"
53153    LIBS="$STATIC_STDCXX_FLAGS"
53154    CXX="$CC"
53155    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
53156/* end confdefs.h.  */
53157
53158int
53159main ()
53160{
53161return 0;
53162  ;
53163  return 0;
53164}
53165_ACEOF
53166if ac_fn_cxx_try_link "$LINENO"; then :
53167  has_static_libstdcxx=yes
53168else
53169  has_static_libstdcxx=no
53170fi
53171rm -f core conftest.err conftest.$ac_objext \
53172    conftest$ac_exeext conftest.$ac_ext
53173    LIBS="$OLD_LIBS"
53174    CXX="$OLD_CXX"
53175    ac_ext=cpp
53176ac_cpp='$CXXCPP $CPPFLAGS'
53177ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
53178ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
53179ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
53180
53181    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $has_static_libstdcxx" >&5
53182$as_echo "$has_static_libstdcxx" >&6; }
53183
53184    if test "x$has_static_libstdcxx" = xno && test "x$has_dynamic_libstdcxx" = xno; then
53185      as_fn_error $? "Cannot link to stdc++, neither dynamically nor statically!" "$LINENO" 5
53186    fi
53187
53188    if test "x$with_stdc__lib" = xstatic && test "x$has_static_libstdcxx" = xno; then
53189      as_fn_error $? "Static linking of libstdc++ was not possible!" "$LINENO" 5
53190    fi
53191
53192    if test "x$with_stdc__lib" = xdynamic && test "x$has_dynamic_libstdcxx" = xno; then
53193      as_fn_error $? "Dynamic linking of libstdc++ was not possible!" "$LINENO" 5
53194    fi
53195
53196    # If dynamic was requested, it's available since it would fail above otherwise.
53197    # If dynamic wasn't requested, go with static unless it isn't available.
53198    { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to link with libstdc++" >&5
53199$as_echo_n "checking how to link with libstdc++... " >&6; }
53200    if test "x$with_stdc__lib" = xdynamic || test "x$has_static_libstdcxx" = xno ||   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
53201      LIBCXX="$LIBCXX -lstdc++"
53202      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53203      JVM_LIBS="-lstdc++ $JVM_LIBS"
53204      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53205      # just use the same setting as for the TARGET toolchain.
53206      OPENJDK_BUILD_JVM_LIBS="-lstdc++ $OPENJDK_BUILD_JVM_LIBS"
53207      LDCXX="$CXX"
53208      STATIC_CXX_SETTING="STATIC_CXX=false"
53209      { $as_echo "$as_me:${as_lineno-$LINENO}: result: dynamic" >&5
53210$as_echo "dynamic" >&6; }
53211    else
53212      LIBCXX="$LIBCXX $STATIC_STDCXX_FLAGS"
53213      JVM_LDFLAGS="$JVM_LDFLAGS -static-libgcc"
53214      # To help comparisons with old build, put stdc++ first in JVM_LIBS
53215      JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $JVM_LIBS"
53216      # Ideally, we should test stdc++ for the BUILD toolchain separately. For now
53217      # just use the same setting as for the TARGET toolchain.
53218      OPENJDK_BUILD_JVM_LDFLAGS="$OPENJDK_BUILD_JVM_LDFLAGS -static-libgcc"
53219      OPENJDK_BUILD_JVM_LIBS="-Wl,-Bstatic -lstdc++ -Wl,-Bdynamic $OPENJDK_BUILD_JVM_LIBS"
53220      LDCXX="$CC"
53221      STATIC_CXX_SETTING="STATIC_CXX=true"
53222      { $as_echo "$as_me:${as_lineno-$LINENO}: result: static" >&5
53223$as_echo "static" >&6; }
53224    fi
53225  fi
53226
53227
53228  # libCrun is the c++ runtime-library with SunStudio (roughly the equivalent of gcc's libstdc++.so)
53229  if test "x$TOOLCHAIN_TYPE" = xsolstudio && test "x$LIBCXX" = x; then
53230    LIBCXX="${SYSROOT}/usr/lib${OPENJDK_TARGET_CPU_ISADIR}/libCrun.so.1"
53231  fi
53232
53233  # TODO better (platform agnostic) test
53234  if test "x$OPENJDK_TARGET_OS" = xmacosx && test "x$LIBCXX" = x && test "x$TOOLCHAIN_TYPE" = xgcc; then
53235    LIBCXX="-lstdc++"
53236  fi
53237
53238
53239  # Setup Windows runtime dlls
53240  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
53241
53242
53243# Check whether --with-msvcr-dll was given.
53244if test "${with_msvcr_dll+set}" = set; then :
53245  withval=$with_msvcr_dll;
53246fi
53247
53248
53249  if test "x$with_msvcr_dll" != x; then
53250    # If given explicitely by user, do not probe. If not present, fail directly.
53251
53252  DLL_NAME="$MSVCR_NAME"
53253  POSSIBLE_MSVC_DLL="$with_msvcr_dll"
53254  METHOD="--with-msvcr-dll"
53255  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53256    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53257$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53258
53259    # Need to check if the found msvcr is correct architecture
53260    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53261$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53262    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53263    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53264      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53265      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53266      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53267        CORRECT_MSVCR_ARCH="PE32 executable"
53268      else
53269        CORRECT_MSVCR_ARCH="PE32+ executable"
53270      fi
53271    else
53272      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53273        CORRECT_MSVCR_ARCH=386
53274      else
53275        CORRECT_MSVCR_ARCH=x86-64
53276      fi
53277    fi
53278    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53279      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53280$as_echo "ok" >&6; }
53281      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53282
53283  # Only process if variable expands to non-empty
53284
53285  if test "x$MSVC_DLL" != x; then
53286    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53287
53288  # Input might be given as Windows format, start by converting to
53289  # unix format.
53290  path="$MSVC_DLL"
53291  new_path=`$CYGPATH -u "$path"`
53292
53293  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53294  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53295  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53296  # "foo.exe" is OK but "foo" is an error.
53297  #
53298  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53299  # It is also a way to make sure we got the proper file name for the real test later on.
53300  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53301  if test "x$test_shortpath" = x; then
53302    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53303$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53304    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53305  fi
53306
53307  # Call helper function which possibly converts this using DOS-style short mode.
53308  # If so, the updated path is stored in $new_path.
53309
53310  input_path="$new_path"
53311  # Check if we need to convert this using DOS-style short mode. If the path
53312  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53313  # take no chances and rewrite it.
53314  # Note: m4 eats our [], so we need to use [ and ] instead.
53315  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53316  if test "x$has_forbidden_chars" != x; then
53317    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53318    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53319    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53320    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53321      # Going to short mode and back again did indeed matter. Since short mode is
53322      # case insensitive, let's make it lowercase to improve readability.
53323      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53324      # Now convert it back to Unix-style (cygpath)
53325      input_path=`$CYGPATH -u "$shortmode_path"`
53326      new_path="$input_path"
53327    fi
53328  fi
53329
53330  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53331  if test "x$test_cygdrive_prefix" = x; then
53332    # As a simple fix, exclude /usr/bin since it's not a real path.
53333    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53334      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53335      # a path prefixed by /cygdrive for fixpath to work.
53336      new_path="$CYGWIN_ROOT_PATH$input_path"
53337    fi
53338  fi
53339
53340
53341  if test "x$path" != "x$new_path"; then
53342    MSVC_DLL="$new_path"
53343    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53344$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53345  fi
53346
53347    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53348
53349  path="$MSVC_DLL"
53350  has_colon=`$ECHO $path | $GREP ^.:`
53351  new_path="$path"
53352  if test "x$has_colon" = x; then
53353    # Not in mixed or Windows style, start by that.
53354    new_path=`cmd //c echo $path`
53355  fi
53356
53357
53358  input_path="$new_path"
53359  # Check if we need to convert this using DOS-style short mode. If the path
53360  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53361  # take no chances and rewrite it.
53362  # Note: m4 eats our [], so we need to use [ and ] instead.
53363  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53364  if test "x$has_forbidden_chars" != x; then
53365    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53366    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53367  fi
53368
53369
53370  windows_path="$new_path"
53371  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53372    unix_path=`$CYGPATH -u "$windows_path"`
53373    new_path="$unix_path"
53374  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53375    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53376    new_path="$unix_path"
53377  fi
53378
53379  if test "x$path" != "x$new_path"; then
53380    MSVC_DLL="$new_path"
53381    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53382$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53383  fi
53384
53385  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53386  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53387
53388    else
53389      # We're on a unix platform. Hooray! :)
53390      path="$MSVC_DLL"
53391      has_space=`$ECHO "$path" | $GREP " "`
53392      if test "x$has_space" != x; then
53393        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53394$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53395        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53396      fi
53397
53398      # Use eval to expand a potential ~
53399      eval path="$path"
53400      if test ! -f "$path" && test ! -d "$path"; then
53401        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53402      fi
53403
53404      if test -d "$path"; then
53405        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53406      else
53407        dir="`$DIRNAME "$path"`"
53408        base="`$BASENAME "$path"`"
53409        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53410      fi
53411    fi
53412  fi
53413
53414      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53415$as_echo_n "checking for $DLL_NAME... " >&6; }
53416      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53417$as_echo "$MSVC_DLL" >&6; }
53418    else
53419      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53420$as_echo "incorrect, ignoring" >&6; }
53421      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53422$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53423    fi
53424  fi
53425
53426    if test "x$MSVC_DLL" = x; then
53427      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by --with-msvcr-dll" "$LINENO" 5
53428    fi
53429    MSVCR_DLL="$MSVC_DLL"
53430  elif test "x$DEVKIT_MSVCR_DLL" != x; then
53431
53432  DLL_NAME="$MSVCR_NAME"
53433  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCR_DLL"
53434  METHOD="devkit"
53435  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53436    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53437$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53438
53439    # Need to check if the found msvcr is correct architecture
53440    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53441$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53442    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53443    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53444      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53445      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53446      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53447        CORRECT_MSVCR_ARCH="PE32 executable"
53448      else
53449        CORRECT_MSVCR_ARCH="PE32+ executable"
53450      fi
53451    else
53452      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53453        CORRECT_MSVCR_ARCH=386
53454      else
53455        CORRECT_MSVCR_ARCH=x86-64
53456      fi
53457    fi
53458    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53459      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53460$as_echo "ok" >&6; }
53461      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53462
53463  # Only process if variable expands to non-empty
53464
53465  if test "x$MSVC_DLL" != x; then
53466    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53467
53468  # Input might be given as Windows format, start by converting to
53469  # unix format.
53470  path="$MSVC_DLL"
53471  new_path=`$CYGPATH -u "$path"`
53472
53473  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53474  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53475  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53476  # "foo.exe" is OK but "foo" is an error.
53477  #
53478  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53479  # It is also a way to make sure we got the proper file name for the real test later on.
53480  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53481  if test "x$test_shortpath" = x; then
53482    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53483$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53484    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53485  fi
53486
53487  # Call helper function which possibly converts this using DOS-style short mode.
53488  # If so, the updated path is stored in $new_path.
53489
53490  input_path="$new_path"
53491  # Check if we need to convert this using DOS-style short mode. If the path
53492  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53493  # take no chances and rewrite it.
53494  # Note: m4 eats our [], so we need to use [ and ] instead.
53495  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53496  if test "x$has_forbidden_chars" != x; then
53497    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53498    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53499    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53500    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53501      # Going to short mode and back again did indeed matter. Since short mode is
53502      # case insensitive, let's make it lowercase to improve readability.
53503      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53504      # Now convert it back to Unix-style (cygpath)
53505      input_path=`$CYGPATH -u "$shortmode_path"`
53506      new_path="$input_path"
53507    fi
53508  fi
53509
53510  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53511  if test "x$test_cygdrive_prefix" = x; then
53512    # As a simple fix, exclude /usr/bin since it's not a real path.
53513    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53514      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53515      # a path prefixed by /cygdrive for fixpath to work.
53516      new_path="$CYGWIN_ROOT_PATH$input_path"
53517    fi
53518  fi
53519
53520
53521  if test "x$path" != "x$new_path"; then
53522    MSVC_DLL="$new_path"
53523    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53524$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53525  fi
53526
53527    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53528
53529  path="$MSVC_DLL"
53530  has_colon=`$ECHO $path | $GREP ^.:`
53531  new_path="$path"
53532  if test "x$has_colon" = x; then
53533    # Not in mixed or Windows style, start by that.
53534    new_path=`cmd //c echo $path`
53535  fi
53536
53537
53538  input_path="$new_path"
53539  # Check if we need to convert this using DOS-style short mode. If the path
53540  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53541  # take no chances and rewrite it.
53542  # Note: m4 eats our [], so we need to use [ and ] instead.
53543  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53544  if test "x$has_forbidden_chars" != x; then
53545    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53546    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53547  fi
53548
53549
53550  windows_path="$new_path"
53551  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53552    unix_path=`$CYGPATH -u "$windows_path"`
53553    new_path="$unix_path"
53554  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53555    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53556    new_path="$unix_path"
53557  fi
53558
53559  if test "x$path" != "x$new_path"; then
53560    MSVC_DLL="$new_path"
53561    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53562$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53563  fi
53564
53565  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53566  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53567
53568    else
53569      # We're on a unix platform. Hooray! :)
53570      path="$MSVC_DLL"
53571      has_space=`$ECHO "$path" | $GREP " "`
53572      if test "x$has_space" != x; then
53573        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53574$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53575        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53576      fi
53577
53578      # Use eval to expand a potential ~
53579      eval path="$path"
53580      if test ! -f "$path" && test ! -d "$path"; then
53581        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53582      fi
53583
53584      if test -d "$path"; then
53585        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53586      else
53587        dir="`$DIRNAME "$path"`"
53588        base="`$BASENAME "$path"`"
53589        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53590      fi
53591    fi
53592  fi
53593
53594      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53595$as_echo_n "checking for $DLL_NAME... " >&6; }
53596      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53597$as_echo "$MSVC_DLL" >&6; }
53598    else
53599      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53600$as_echo "incorrect, ignoring" >&6; }
53601      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53602$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53603    fi
53604  fi
53605
53606    if test "x$MSVC_DLL" = x; then
53607      as_fn_error $? "Could not find a proper $MSVCR_NAME as specified by devkit" "$LINENO" 5
53608    fi
53609    MSVCR_DLL="$MSVC_DLL"
53610  else
53611
53612  DLL_NAME="${MSVCR_NAME}"
53613  MSVC_DLL=
53614
53615  if test "x$MSVC_DLL" = x; then
53616    # Probe: Using well-known location from Visual Studio 10.0
53617    if test "x$VCINSTALLDIR" != x; then
53618      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
53619
53620  windows_path="$CYGWIN_VC_INSTALL_DIR"
53621  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53622    unix_path=`$CYGPATH -u "$windows_path"`
53623    CYGWIN_VC_INSTALL_DIR="$unix_path"
53624  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53625    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53626    CYGWIN_VC_INSTALL_DIR="$unix_path"
53627  fi
53628
53629      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
53630        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53631      else
53632        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
53633      fi
53634      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
53635
53636  DLL_NAME="$DLL_NAME"
53637  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53638  METHOD="well-known location in VCINSTALLDIR"
53639  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53640    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53641$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53642
53643    # Need to check if the found msvcr is correct architecture
53644    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53645$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53646    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53647    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53648      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53649      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53650      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53651        CORRECT_MSVCR_ARCH="PE32 executable"
53652      else
53653        CORRECT_MSVCR_ARCH="PE32+ executable"
53654      fi
53655    else
53656      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53657        CORRECT_MSVCR_ARCH=386
53658      else
53659        CORRECT_MSVCR_ARCH=x86-64
53660      fi
53661    fi
53662    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53663      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53664$as_echo "ok" >&6; }
53665      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53666
53667  # Only process if variable expands to non-empty
53668
53669  if test "x$MSVC_DLL" != x; then
53670    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53671
53672  # Input might be given as Windows format, start by converting to
53673  # unix format.
53674  path="$MSVC_DLL"
53675  new_path=`$CYGPATH -u "$path"`
53676
53677  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53678  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53679  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53680  # "foo.exe" is OK but "foo" is an error.
53681  #
53682  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53683  # It is also a way to make sure we got the proper file name for the real test later on.
53684  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53685  if test "x$test_shortpath" = x; then
53686    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53687$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53688    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53689  fi
53690
53691  # Call helper function which possibly converts this using DOS-style short mode.
53692  # If so, the updated path is stored in $new_path.
53693
53694  input_path="$new_path"
53695  # Check if we need to convert this using DOS-style short mode. If the path
53696  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53697  # take no chances and rewrite it.
53698  # Note: m4 eats our [], so we need to use [ and ] instead.
53699  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53700  if test "x$has_forbidden_chars" != x; then
53701    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53702    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53703    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53704    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53705      # Going to short mode and back again did indeed matter. Since short mode is
53706      # case insensitive, let's make it lowercase to improve readability.
53707      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53708      # Now convert it back to Unix-style (cygpath)
53709      input_path=`$CYGPATH -u "$shortmode_path"`
53710      new_path="$input_path"
53711    fi
53712  fi
53713
53714  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53715  if test "x$test_cygdrive_prefix" = x; then
53716    # As a simple fix, exclude /usr/bin since it's not a real path.
53717    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53718      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53719      # a path prefixed by /cygdrive for fixpath to work.
53720      new_path="$CYGWIN_ROOT_PATH$input_path"
53721    fi
53722  fi
53723
53724
53725  if test "x$path" != "x$new_path"; then
53726    MSVC_DLL="$new_path"
53727    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53728$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53729  fi
53730
53731    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53732
53733  path="$MSVC_DLL"
53734  has_colon=`$ECHO $path | $GREP ^.:`
53735  new_path="$path"
53736  if test "x$has_colon" = x; then
53737    # Not in mixed or Windows style, start by that.
53738    new_path=`cmd //c echo $path`
53739  fi
53740
53741
53742  input_path="$new_path"
53743  # Check if we need to convert this using DOS-style short mode. If the path
53744  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53745  # take no chances and rewrite it.
53746  # Note: m4 eats our [], so we need to use [ and ] instead.
53747  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53748  if test "x$has_forbidden_chars" != x; then
53749    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53750    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53751  fi
53752
53753
53754  windows_path="$new_path"
53755  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53756    unix_path=`$CYGPATH -u "$windows_path"`
53757    new_path="$unix_path"
53758  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53759    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53760    new_path="$unix_path"
53761  fi
53762
53763  if test "x$path" != "x$new_path"; then
53764    MSVC_DLL="$new_path"
53765    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53766$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53767  fi
53768
53769  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53770  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53771
53772    else
53773      # We're on a unix platform. Hooray! :)
53774      path="$MSVC_DLL"
53775      has_space=`$ECHO "$path" | $GREP " "`
53776      if test "x$has_space" != x; then
53777        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53778$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53779        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53780      fi
53781
53782      # Use eval to expand a potential ~
53783      eval path="$path"
53784      if test ! -f "$path" && test ! -d "$path"; then
53785        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53786      fi
53787
53788      if test -d "$path"; then
53789        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53790      else
53791        dir="`$DIRNAME "$path"`"
53792        base="`$BASENAME "$path"`"
53793        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53794      fi
53795    fi
53796  fi
53797
53798      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53799$as_echo_n "checking for $DLL_NAME... " >&6; }
53800      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53801$as_echo "$MSVC_DLL" >&6; }
53802    else
53803      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53804$as_echo "incorrect, ignoring" >&6; }
53805      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53806$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53807    fi
53808  fi
53809
53810    fi
53811  fi
53812
53813  if test "x$MSVC_DLL" = x; then
53814    # Probe: Check in the Boot JDK directory.
53815    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
53816
53817  DLL_NAME="$DLL_NAME"
53818  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
53819  METHOD="well-known location in Boot JDK"
53820  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
53821    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
53822$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
53823
53824    # Need to check if the found msvcr is correct architecture
53825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
53826$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
53827    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
53828    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53829      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
53830      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
53831      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53832        CORRECT_MSVCR_ARCH="PE32 executable"
53833      else
53834        CORRECT_MSVCR_ARCH="PE32+ executable"
53835      fi
53836    else
53837      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
53838        CORRECT_MSVCR_ARCH=386
53839      else
53840        CORRECT_MSVCR_ARCH=x86-64
53841      fi
53842    fi
53843    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
53844      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
53845$as_echo "ok" >&6; }
53846      MSVC_DLL="$POSSIBLE_MSVC_DLL"
53847
53848  # Only process if variable expands to non-empty
53849
53850  if test "x$MSVC_DLL" != x; then
53851    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53852
53853  # Input might be given as Windows format, start by converting to
53854  # unix format.
53855  path="$MSVC_DLL"
53856  new_path=`$CYGPATH -u "$path"`
53857
53858  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
53859  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
53860  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
53861  # "foo.exe" is OK but "foo" is an error.
53862  #
53863  # This test is therefore slightly more accurate than "test -f" to check for file precense.
53864  # It is also a way to make sure we got the proper file name for the real test later on.
53865  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
53866  if test "x$test_shortpath" = x; then
53867    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53868$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53869    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
53870  fi
53871
53872  # Call helper function which possibly converts this using DOS-style short mode.
53873  # If so, the updated path is stored in $new_path.
53874
53875  input_path="$new_path"
53876  # Check if we need to convert this using DOS-style short mode. If the path
53877  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53878  # take no chances and rewrite it.
53879  # Note: m4 eats our [], so we need to use [ and ] instead.
53880  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
53881  if test "x$has_forbidden_chars" != x; then
53882    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53883    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
53884    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
53885    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
53886      # Going to short mode and back again did indeed matter. Since short mode is
53887      # case insensitive, let's make it lowercase to improve readability.
53888      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53889      # Now convert it back to Unix-style (cygpath)
53890      input_path=`$CYGPATH -u "$shortmode_path"`
53891      new_path="$input_path"
53892    fi
53893  fi
53894
53895  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
53896  if test "x$test_cygdrive_prefix" = x; then
53897    # As a simple fix, exclude /usr/bin since it's not a real path.
53898    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
53899      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
53900      # a path prefixed by /cygdrive for fixpath to work.
53901      new_path="$CYGWIN_ROOT_PATH$input_path"
53902    fi
53903  fi
53904
53905
53906  if test "x$path" != "x$new_path"; then
53907    MSVC_DLL="$new_path"
53908    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53909$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53910  fi
53911
53912    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53913
53914  path="$MSVC_DLL"
53915  has_colon=`$ECHO $path | $GREP ^.:`
53916  new_path="$path"
53917  if test "x$has_colon" = x; then
53918    # Not in mixed or Windows style, start by that.
53919    new_path=`cmd //c echo $path`
53920  fi
53921
53922
53923  input_path="$new_path"
53924  # Check if we need to convert this using DOS-style short mode. If the path
53925  # contains just simple characters, use it. Otherwise (spaces, weird characters),
53926  # take no chances and rewrite it.
53927  # Note: m4 eats our [], so we need to use [ and ] instead.
53928  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
53929  if test "x$has_forbidden_chars" != x; then
53930    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
53931    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
53932  fi
53933
53934
53935  windows_path="$new_path"
53936  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53937    unix_path=`$CYGPATH -u "$windows_path"`
53938    new_path="$unix_path"
53939  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
53940    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
53941    new_path="$unix_path"
53942  fi
53943
53944  if test "x$path" != "x$new_path"; then
53945    MSVC_DLL="$new_path"
53946    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
53947$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
53948  fi
53949
53950  # Save the first 10 bytes of this path to the storage, so fixpath can work.
53951  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
53952
53953    else
53954      # We're on a unix platform. Hooray! :)
53955      path="$MSVC_DLL"
53956      has_space=`$ECHO "$path" | $GREP " "`
53957      if test "x$has_space" != x; then
53958        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
53959$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
53960        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
53961      fi
53962
53963      # Use eval to expand a potential ~
53964      eval path="$path"
53965      if test ! -f "$path" && test ! -d "$path"; then
53966        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
53967      fi
53968
53969      if test -d "$path"; then
53970        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
53971      else
53972        dir="`$DIRNAME "$path"`"
53973        base="`$BASENAME "$path"`"
53974        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
53975      fi
53976    fi
53977  fi
53978
53979      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
53980$as_echo_n "checking for $DLL_NAME... " >&6; }
53981      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
53982$as_echo "$MSVC_DLL" >&6; }
53983    else
53984      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
53985$as_echo "incorrect, ignoring" >&6; }
53986      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
53987$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
53988    fi
53989  fi
53990
53991  fi
53992
53993  if test "x$MSVC_DLL" = x; then
53994    # Probe: Look in the Windows system32 directory
53995    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
53996
53997  windows_path="$CYGWIN_SYSTEMROOT"
53998  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
53999    unix_path=`$CYGPATH -u "$windows_path"`
54000    CYGWIN_SYSTEMROOT="$unix_path"
54001  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54002    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54003    CYGWIN_SYSTEMROOT="$unix_path"
54004  fi
54005
54006    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
54007
54008  DLL_NAME="$DLL_NAME"
54009  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54010  METHOD="well-known location in SYSTEMROOT"
54011  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54012    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54013$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54014
54015    # Need to check if the found msvcr is correct architecture
54016    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54017$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54018    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54020      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54021      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54022      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54023        CORRECT_MSVCR_ARCH="PE32 executable"
54024      else
54025        CORRECT_MSVCR_ARCH="PE32+ executable"
54026      fi
54027    else
54028      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54029        CORRECT_MSVCR_ARCH=386
54030      else
54031        CORRECT_MSVCR_ARCH=x86-64
54032      fi
54033    fi
54034    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54035      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54036$as_echo "ok" >&6; }
54037      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54038
54039  # Only process if variable expands to non-empty
54040
54041  if test "x$MSVC_DLL" != x; then
54042    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54043
54044  # Input might be given as Windows format, start by converting to
54045  # unix format.
54046  path="$MSVC_DLL"
54047  new_path=`$CYGPATH -u "$path"`
54048
54049  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54050  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54051  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54052  # "foo.exe" is OK but "foo" is an error.
54053  #
54054  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54055  # It is also a way to make sure we got the proper file name for the real test later on.
54056  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54057  if test "x$test_shortpath" = x; then
54058    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54059$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54060    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54061  fi
54062
54063  # Call helper function which possibly converts this using DOS-style short mode.
54064  # If so, the updated path is stored in $new_path.
54065
54066  input_path="$new_path"
54067  # Check if we need to convert this using DOS-style short mode. If the path
54068  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54069  # take no chances and rewrite it.
54070  # Note: m4 eats our [], so we need to use [ and ] instead.
54071  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54072  if test "x$has_forbidden_chars" != x; then
54073    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54074    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54075    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54076    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54077      # Going to short mode and back again did indeed matter. Since short mode is
54078      # case insensitive, let's make it lowercase to improve readability.
54079      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54080      # Now convert it back to Unix-style (cygpath)
54081      input_path=`$CYGPATH -u "$shortmode_path"`
54082      new_path="$input_path"
54083    fi
54084  fi
54085
54086  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54087  if test "x$test_cygdrive_prefix" = x; then
54088    # As a simple fix, exclude /usr/bin since it's not a real path.
54089    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54090      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54091      # a path prefixed by /cygdrive for fixpath to work.
54092      new_path="$CYGWIN_ROOT_PATH$input_path"
54093    fi
54094  fi
54095
54096
54097  if test "x$path" != "x$new_path"; then
54098    MSVC_DLL="$new_path"
54099    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54100$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54101  fi
54102
54103    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54104
54105  path="$MSVC_DLL"
54106  has_colon=`$ECHO $path | $GREP ^.:`
54107  new_path="$path"
54108  if test "x$has_colon" = x; then
54109    # Not in mixed or Windows style, start by that.
54110    new_path=`cmd //c echo $path`
54111  fi
54112
54113
54114  input_path="$new_path"
54115  # Check if we need to convert this using DOS-style short mode. If the path
54116  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54117  # take no chances and rewrite it.
54118  # Note: m4 eats our [], so we need to use [ and ] instead.
54119  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54120  if test "x$has_forbidden_chars" != x; then
54121    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54122    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54123  fi
54124
54125
54126  windows_path="$new_path"
54127  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54128    unix_path=`$CYGPATH -u "$windows_path"`
54129    new_path="$unix_path"
54130  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54131    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54132    new_path="$unix_path"
54133  fi
54134
54135  if test "x$path" != "x$new_path"; then
54136    MSVC_DLL="$new_path"
54137    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54138$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54139  fi
54140
54141  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54142  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54143
54144    else
54145      # We're on a unix platform. Hooray! :)
54146      path="$MSVC_DLL"
54147      has_space=`$ECHO "$path" | $GREP " "`
54148      if test "x$has_space" != x; then
54149        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54150$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54151        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54152      fi
54153
54154      # Use eval to expand a potential ~
54155      eval path="$path"
54156      if test ! -f "$path" && test ! -d "$path"; then
54157        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54158      fi
54159
54160      if test -d "$path"; then
54161        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54162      else
54163        dir="`$DIRNAME "$path"`"
54164        base="`$BASENAME "$path"`"
54165        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54166      fi
54167    fi
54168  fi
54169
54170      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54171$as_echo_n "checking for $DLL_NAME... " >&6; }
54172      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54173$as_echo "$MSVC_DLL" >&6; }
54174    else
54175      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54176$as_echo "incorrect, ignoring" >&6; }
54177      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54178$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54179    fi
54180  fi
54181
54182  fi
54183
54184  if test "x$MSVC_DLL" = x; then
54185    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
54186    if test "x$VS100COMNTOOLS" != x; then
54187      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
54188
54189  windows_path="$CYGWIN_VS_TOOLS_DIR"
54190  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54191    unix_path=`$CYGPATH -u "$windows_path"`
54192    CYGWIN_VS_TOOLS_DIR="$unix_path"
54193  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54194    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54195    CYGWIN_VS_TOOLS_DIR="$unix_path"
54196  fi
54197
54198      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54199        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54200	    | $GREP -i /x64/ | $HEAD --lines 1`
54201      else
54202        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
54203	    | $GREP -i /x86/ | $HEAD --lines 1`
54204      fi
54205
54206  DLL_NAME="$DLL_NAME"
54207  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54208  METHOD="search of VS100COMNTOOLS"
54209  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54210    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54211$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54212
54213    # Need to check if the found msvcr is correct architecture
54214    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54215$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54216    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54217    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54218      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54219      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54220      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54221        CORRECT_MSVCR_ARCH="PE32 executable"
54222      else
54223        CORRECT_MSVCR_ARCH="PE32+ executable"
54224      fi
54225    else
54226      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54227        CORRECT_MSVCR_ARCH=386
54228      else
54229        CORRECT_MSVCR_ARCH=x86-64
54230      fi
54231    fi
54232    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54233      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54234$as_echo "ok" >&6; }
54235      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54236
54237  # Only process if variable expands to non-empty
54238
54239  if test "x$MSVC_DLL" != x; then
54240    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54241
54242  # Input might be given as Windows format, start by converting to
54243  # unix format.
54244  path="$MSVC_DLL"
54245  new_path=`$CYGPATH -u "$path"`
54246
54247  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54248  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54249  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54250  # "foo.exe" is OK but "foo" is an error.
54251  #
54252  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54253  # It is also a way to make sure we got the proper file name for the real test later on.
54254  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54255  if test "x$test_shortpath" = x; then
54256    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54257$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54258    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54259  fi
54260
54261  # Call helper function which possibly converts this using DOS-style short mode.
54262  # If so, the updated path is stored in $new_path.
54263
54264  input_path="$new_path"
54265  # Check if we need to convert this using DOS-style short mode. If the path
54266  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54267  # take no chances and rewrite it.
54268  # Note: m4 eats our [], so we need to use [ and ] instead.
54269  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54270  if test "x$has_forbidden_chars" != x; then
54271    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54272    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54273    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54274    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54275      # Going to short mode and back again did indeed matter. Since short mode is
54276      # case insensitive, let's make it lowercase to improve readability.
54277      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54278      # Now convert it back to Unix-style (cygpath)
54279      input_path=`$CYGPATH -u "$shortmode_path"`
54280      new_path="$input_path"
54281    fi
54282  fi
54283
54284  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54285  if test "x$test_cygdrive_prefix" = x; then
54286    # As a simple fix, exclude /usr/bin since it's not a real path.
54287    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54288      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54289      # a path prefixed by /cygdrive for fixpath to work.
54290      new_path="$CYGWIN_ROOT_PATH$input_path"
54291    fi
54292  fi
54293
54294
54295  if test "x$path" != "x$new_path"; then
54296    MSVC_DLL="$new_path"
54297    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54298$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54299  fi
54300
54301    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54302
54303  path="$MSVC_DLL"
54304  has_colon=`$ECHO $path | $GREP ^.:`
54305  new_path="$path"
54306  if test "x$has_colon" = x; then
54307    # Not in mixed or Windows style, start by that.
54308    new_path=`cmd //c echo $path`
54309  fi
54310
54311
54312  input_path="$new_path"
54313  # Check if we need to convert this using DOS-style short mode. If the path
54314  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54315  # take no chances and rewrite it.
54316  # Note: m4 eats our [], so we need to use [ and ] instead.
54317  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54318  if test "x$has_forbidden_chars" != x; then
54319    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54320    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54321  fi
54322
54323
54324  windows_path="$new_path"
54325  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54326    unix_path=`$CYGPATH -u "$windows_path"`
54327    new_path="$unix_path"
54328  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54329    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54330    new_path="$unix_path"
54331  fi
54332
54333  if test "x$path" != "x$new_path"; then
54334    MSVC_DLL="$new_path"
54335    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54336$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54337  fi
54338
54339  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54340  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54341
54342    else
54343      # We're on a unix platform. Hooray! :)
54344      path="$MSVC_DLL"
54345      has_space=`$ECHO "$path" | $GREP " "`
54346      if test "x$has_space" != x; then
54347        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54348$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54349        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54350      fi
54351
54352      # Use eval to expand a potential ~
54353      eval path="$path"
54354      if test ! -f "$path" && test ! -d "$path"; then
54355        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54356      fi
54357
54358      if test -d "$path"; then
54359        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54360      else
54361        dir="`$DIRNAME "$path"`"
54362        base="`$BASENAME "$path"`"
54363        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54364      fi
54365    fi
54366  fi
54367
54368      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54369$as_echo_n "checking for $DLL_NAME... " >&6; }
54370      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54371$as_echo "$MSVC_DLL" >&6; }
54372    else
54373      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54374$as_echo "incorrect, ignoring" >&6; }
54375      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54376$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54377    fi
54378  fi
54379
54380    fi
54381  fi
54382
54383  if test "x$MSVC_DLL" = x; then
54384    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
54385    # (This was the original behaviour; kept since it might turn something up)
54386    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
54387      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54388        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54389	    | $GREP x64 | $HEAD --lines 1`
54390      else
54391        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54392	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
54393        if test "x$POSSIBLE_MSVC_DLL" = x; then
54394          # We're grasping at straws now...
54395          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
54396	      | $HEAD --lines 1`
54397        fi
54398      fi
54399
54400
54401  DLL_NAME="$DLL_NAME"
54402  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54403  METHOD="search of VCINSTALLDIR"
54404  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54405    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54406$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54407
54408    # Need to check if the found msvcr is correct architecture
54409    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54410$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54411    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54412    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54413      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54414      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54415      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54416        CORRECT_MSVCR_ARCH="PE32 executable"
54417      else
54418        CORRECT_MSVCR_ARCH="PE32+ executable"
54419      fi
54420    else
54421      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54422        CORRECT_MSVCR_ARCH=386
54423      else
54424        CORRECT_MSVCR_ARCH=x86-64
54425      fi
54426    fi
54427    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54428      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54429$as_echo "ok" >&6; }
54430      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54431
54432  # Only process if variable expands to non-empty
54433
54434  if test "x$MSVC_DLL" != x; then
54435    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54436
54437  # Input might be given as Windows format, start by converting to
54438  # unix format.
54439  path="$MSVC_DLL"
54440  new_path=`$CYGPATH -u "$path"`
54441
54442  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54443  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54444  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54445  # "foo.exe" is OK but "foo" is an error.
54446  #
54447  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54448  # It is also a way to make sure we got the proper file name for the real test later on.
54449  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54450  if test "x$test_shortpath" = x; then
54451    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54452$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54453    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54454  fi
54455
54456  # Call helper function which possibly converts this using DOS-style short mode.
54457  # If so, the updated path is stored in $new_path.
54458
54459  input_path="$new_path"
54460  # Check if we need to convert this using DOS-style short mode. If the path
54461  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54462  # take no chances and rewrite it.
54463  # Note: m4 eats our [], so we need to use [ and ] instead.
54464  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54465  if test "x$has_forbidden_chars" != x; then
54466    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54467    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54468    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54469    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54470      # Going to short mode and back again did indeed matter. Since short mode is
54471      # case insensitive, let's make it lowercase to improve readability.
54472      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54473      # Now convert it back to Unix-style (cygpath)
54474      input_path=`$CYGPATH -u "$shortmode_path"`
54475      new_path="$input_path"
54476    fi
54477  fi
54478
54479  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54480  if test "x$test_cygdrive_prefix" = x; then
54481    # As a simple fix, exclude /usr/bin since it's not a real path.
54482    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54483      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54484      # a path prefixed by /cygdrive for fixpath to work.
54485      new_path="$CYGWIN_ROOT_PATH$input_path"
54486    fi
54487  fi
54488
54489
54490  if test "x$path" != "x$new_path"; then
54491    MSVC_DLL="$new_path"
54492    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54493$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54494  fi
54495
54496    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54497
54498  path="$MSVC_DLL"
54499  has_colon=`$ECHO $path | $GREP ^.:`
54500  new_path="$path"
54501  if test "x$has_colon" = x; then
54502    # Not in mixed or Windows style, start by that.
54503    new_path=`cmd //c echo $path`
54504  fi
54505
54506
54507  input_path="$new_path"
54508  # Check if we need to convert this using DOS-style short mode. If the path
54509  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54510  # take no chances and rewrite it.
54511  # Note: m4 eats our [], so we need to use [ and ] instead.
54512  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54513  if test "x$has_forbidden_chars" != x; then
54514    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54515    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54516  fi
54517
54518
54519  windows_path="$new_path"
54520  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54521    unix_path=`$CYGPATH -u "$windows_path"`
54522    new_path="$unix_path"
54523  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54524    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54525    new_path="$unix_path"
54526  fi
54527
54528  if test "x$path" != "x$new_path"; then
54529    MSVC_DLL="$new_path"
54530    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54531$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54532  fi
54533
54534  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54535  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54536
54537    else
54538      # We're on a unix platform. Hooray! :)
54539      path="$MSVC_DLL"
54540      has_space=`$ECHO "$path" | $GREP " "`
54541      if test "x$has_space" != x; then
54542        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54543$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54544        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54545      fi
54546
54547      # Use eval to expand a potential ~
54548      eval path="$path"
54549      if test ! -f "$path" && test ! -d "$path"; then
54550        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54551      fi
54552
54553      if test -d "$path"; then
54554        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54555      else
54556        dir="`$DIRNAME "$path"`"
54557        base="`$BASENAME "$path"`"
54558        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54559      fi
54560    fi
54561  fi
54562
54563      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54564$as_echo_n "checking for $DLL_NAME... " >&6; }
54565      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54566$as_echo "$MSVC_DLL" >&6; }
54567    else
54568      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54569$as_echo "incorrect, ignoring" >&6; }
54570      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54571$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54572    fi
54573  fi
54574
54575    fi
54576  fi
54577
54578  if test "x$MSVC_DLL" = x; then
54579    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54580$as_echo_n "checking for $DLL_NAME... " >&6; }
54581    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
54582$as_echo "no" >&6; }
54583    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
54584  fi
54585
54586    MSVCR_DLL="$MSVC_DLL"
54587  fi
54588
54589
54590
54591# Check whether --with-msvcp-dll was given.
54592if test "${with_msvcp_dll+set}" = set; then :
54593  withval=$with_msvcp_dll;
54594fi
54595
54596
54597  if test "x$MSVCP_NAME" != "x"; then
54598    if test "x$with_msvcp_dll" != x; then
54599      # If given explicitely by user, do not probe. If not present, fail directly.
54600
54601  DLL_NAME="$MSVCP_NAME"
54602  POSSIBLE_MSVC_DLL="$with_msvcp_dll"
54603  METHOD="--with-msvcp-dll"
54604  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54605    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54606$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54607
54608    # Need to check if the found msvcr is correct architecture
54609    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54610$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54611    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54612    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54613      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54614      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54615      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54616        CORRECT_MSVCR_ARCH="PE32 executable"
54617      else
54618        CORRECT_MSVCR_ARCH="PE32+ executable"
54619      fi
54620    else
54621      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54622        CORRECT_MSVCR_ARCH=386
54623      else
54624        CORRECT_MSVCR_ARCH=x86-64
54625      fi
54626    fi
54627    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54628      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54629$as_echo "ok" >&6; }
54630      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54631
54632  # Only process if variable expands to non-empty
54633
54634  if test "x$MSVC_DLL" != x; then
54635    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54636
54637  # Input might be given as Windows format, start by converting to
54638  # unix format.
54639  path="$MSVC_DLL"
54640  new_path=`$CYGPATH -u "$path"`
54641
54642  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54643  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54644  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54645  # "foo.exe" is OK but "foo" is an error.
54646  #
54647  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54648  # It is also a way to make sure we got the proper file name for the real test later on.
54649  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54650  if test "x$test_shortpath" = x; then
54651    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54652$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54653    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54654  fi
54655
54656  # Call helper function which possibly converts this using DOS-style short mode.
54657  # If so, the updated path is stored in $new_path.
54658
54659  input_path="$new_path"
54660  # Check if we need to convert this using DOS-style short mode. If the path
54661  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54662  # take no chances and rewrite it.
54663  # Note: m4 eats our [], so we need to use [ and ] instead.
54664  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54665  if test "x$has_forbidden_chars" != x; then
54666    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54667    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54668    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54669    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54670      # Going to short mode and back again did indeed matter. Since short mode is
54671      # case insensitive, let's make it lowercase to improve readability.
54672      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54673      # Now convert it back to Unix-style (cygpath)
54674      input_path=`$CYGPATH -u "$shortmode_path"`
54675      new_path="$input_path"
54676    fi
54677  fi
54678
54679  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54680  if test "x$test_cygdrive_prefix" = x; then
54681    # As a simple fix, exclude /usr/bin since it's not a real path.
54682    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54683      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54684      # a path prefixed by /cygdrive for fixpath to work.
54685      new_path="$CYGWIN_ROOT_PATH$input_path"
54686    fi
54687  fi
54688
54689
54690  if test "x$path" != "x$new_path"; then
54691    MSVC_DLL="$new_path"
54692    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54693$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54694  fi
54695
54696    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54697
54698  path="$MSVC_DLL"
54699  has_colon=`$ECHO $path | $GREP ^.:`
54700  new_path="$path"
54701  if test "x$has_colon" = x; then
54702    # Not in mixed or Windows style, start by that.
54703    new_path=`cmd //c echo $path`
54704  fi
54705
54706
54707  input_path="$new_path"
54708  # Check if we need to convert this using DOS-style short mode. If the path
54709  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54710  # take no chances and rewrite it.
54711  # Note: m4 eats our [], so we need to use [ and ] instead.
54712  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54713  if test "x$has_forbidden_chars" != x; then
54714    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54715    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54716  fi
54717
54718
54719  windows_path="$new_path"
54720  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54721    unix_path=`$CYGPATH -u "$windows_path"`
54722    new_path="$unix_path"
54723  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54724    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54725    new_path="$unix_path"
54726  fi
54727
54728  if test "x$path" != "x$new_path"; then
54729    MSVC_DLL="$new_path"
54730    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54731$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54732  fi
54733
54734  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54735  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54736
54737    else
54738      # We're on a unix platform. Hooray! :)
54739      path="$MSVC_DLL"
54740      has_space=`$ECHO "$path" | $GREP " "`
54741      if test "x$has_space" != x; then
54742        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54743$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54744        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54745      fi
54746
54747      # Use eval to expand a potential ~
54748      eval path="$path"
54749      if test ! -f "$path" && test ! -d "$path"; then
54750        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54751      fi
54752
54753      if test -d "$path"; then
54754        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54755      else
54756        dir="`$DIRNAME "$path"`"
54757        base="`$BASENAME "$path"`"
54758        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54759      fi
54760    fi
54761  fi
54762
54763      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54764$as_echo_n "checking for $DLL_NAME... " >&6; }
54765      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54766$as_echo "$MSVC_DLL" >&6; }
54767    else
54768      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54769$as_echo "incorrect, ignoring" >&6; }
54770      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54771$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54772    fi
54773  fi
54774
54775      if test "x$MSVC_DLL" = x; then
54776        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by --with-msvcp-dll" "$LINENO" 5
54777      fi
54778      MSVCP_DLL="$MSVC_DLL"
54779    elif test "x$DEVKIT_MSVCP_DLL" != x; then
54780
54781  DLL_NAME="$MSVCP_NAME"
54782  POSSIBLE_MSVC_DLL="$DEVKIT_MSVCP_DLL"
54783  METHOD="devkit"
54784  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54785    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54786$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54787
54788    # Need to check if the found msvcr is correct architecture
54789    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54790$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54791    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54792    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54793      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54794      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54795      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54796        CORRECT_MSVCR_ARCH="PE32 executable"
54797      else
54798        CORRECT_MSVCR_ARCH="PE32+ executable"
54799      fi
54800    else
54801      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
54802        CORRECT_MSVCR_ARCH=386
54803      else
54804        CORRECT_MSVCR_ARCH=x86-64
54805      fi
54806    fi
54807    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
54808      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
54809$as_echo "ok" >&6; }
54810      MSVC_DLL="$POSSIBLE_MSVC_DLL"
54811
54812  # Only process if variable expands to non-empty
54813
54814  if test "x$MSVC_DLL" != x; then
54815    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54816
54817  # Input might be given as Windows format, start by converting to
54818  # unix format.
54819  path="$MSVC_DLL"
54820  new_path=`$CYGPATH -u "$path"`
54821
54822  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
54823  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
54824  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
54825  # "foo.exe" is OK but "foo" is an error.
54826  #
54827  # This test is therefore slightly more accurate than "test -f" to check for file precense.
54828  # It is also a way to make sure we got the proper file name for the real test later on.
54829  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
54830  if test "x$test_shortpath" = x; then
54831    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54832$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54833    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
54834  fi
54835
54836  # Call helper function which possibly converts this using DOS-style short mode.
54837  # If so, the updated path is stored in $new_path.
54838
54839  input_path="$new_path"
54840  # Check if we need to convert this using DOS-style short mode. If the path
54841  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54842  # take no chances and rewrite it.
54843  # Note: m4 eats our [], so we need to use [ and ] instead.
54844  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
54845  if test "x$has_forbidden_chars" != x; then
54846    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54847    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
54848    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
54849    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
54850      # Going to short mode and back again did indeed matter. Since short mode is
54851      # case insensitive, let's make it lowercase to improve readability.
54852      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54853      # Now convert it back to Unix-style (cygpath)
54854      input_path=`$CYGPATH -u "$shortmode_path"`
54855      new_path="$input_path"
54856    fi
54857  fi
54858
54859  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
54860  if test "x$test_cygdrive_prefix" = x; then
54861    # As a simple fix, exclude /usr/bin since it's not a real path.
54862    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
54863      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
54864      # a path prefixed by /cygdrive for fixpath to work.
54865      new_path="$CYGWIN_ROOT_PATH$input_path"
54866    fi
54867  fi
54868
54869
54870  if test "x$path" != "x$new_path"; then
54871    MSVC_DLL="$new_path"
54872    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54873$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54874  fi
54875
54876    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54877
54878  path="$MSVC_DLL"
54879  has_colon=`$ECHO $path | $GREP ^.:`
54880  new_path="$path"
54881  if test "x$has_colon" = x; then
54882    # Not in mixed or Windows style, start by that.
54883    new_path=`cmd //c echo $path`
54884  fi
54885
54886
54887  input_path="$new_path"
54888  # Check if we need to convert this using DOS-style short mode. If the path
54889  # contains just simple characters, use it. Otherwise (spaces, weird characters),
54890  # take no chances and rewrite it.
54891  # Note: m4 eats our [], so we need to use [ and ] instead.
54892  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
54893  if test "x$has_forbidden_chars" != x; then
54894    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
54895    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
54896  fi
54897
54898
54899  windows_path="$new_path"
54900  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54901    unix_path=`$CYGPATH -u "$windows_path"`
54902    new_path="$unix_path"
54903  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54904    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54905    new_path="$unix_path"
54906  fi
54907
54908  if test "x$path" != "x$new_path"; then
54909    MSVC_DLL="$new_path"
54910    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
54911$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
54912  fi
54913
54914  # Save the first 10 bytes of this path to the storage, so fixpath can work.
54915  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
54916
54917    else
54918      # We're on a unix platform. Hooray! :)
54919      path="$MSVC_DLL"
54920      has_space=`$ECHO "$path" | $GREP " "`
54921      if test "x$has_space" != x; then
54922        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
54923$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
54924        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
54925      fi
54926
54927      # Use eval to expand a potential ~
54928      eval path="$path"
54929      if test ! -f "$path" && test ! -d "$path"; then
54930        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
54931      fi
54932
54933      if test -d "$path"; then
54934        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
54935      else
54936        dir="`$DIRNAME "$path"`"
54937        base="`$BASENAME "$path"`"
54938        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
54939      fi
54940    fi
54941  fi
54942
54943      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
54944$as_echo_n "checking for $DLL_NAME... " >&6; }
54945      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
54946$as_echo "$MSVC_DLL" >&6; }
54947    else
54948      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
54949$as_echo "incorrect, ignoring" >&6; }
54950      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
54951$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
54952    fi
54953  fi
54954
54955      if test "x$MSVC_DLL" = x; then
54956        as_fn_error $? "Could not find a proper $MSVCP_NAME as specified by devkit" "$LINENO" 5
54957      fi
54958      MSVCP_DLL="$MSVC_DLL"
54959    else
54960
54961  DLL_NAME="${MSVCP_NAME}"
54962  MSVC_DLL=
54963
54964  if test "x$MSVC_DLL" = x; then
54965    # Probe: Using well-known location from Visual Studio 10.0
54966    if test "x$VCINSTALLDIR" != x; then
54967      CYGWIN_VC_INSTALL_DIR="$VCINSTALLDIR"
54968
54969  windows_path="$CYGWIN_VC_INSTALL_DIR"
54970  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
54971    unix_path=`$CYGPATH -u "$windows_path"`
54972    CYGWIN_VC_INSTALL_DIR="$unix_path"
54973  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54974    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
54975    CYGWIN_VC_INSTALL_DIR="$unix_path"
54976  fi
54977
54978      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
54979        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x64/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54980      else
54981        POSSIBLE_MSVC_DLL="$CYGWIN_VC_INSTALL_DIR/redist/x86/Microsoft.VC${VS_VERSION_INTERNAL}.CRT/$DLL_NAME"
54982      fi
54983      $ECHO "POSSIBLE_MSVC_DLL $POSSIBLEMSVC_DLL"
54984
54985  DLL_NAME="$DLL_NAME"
54986  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
54987  METHOD="well-known location in VCINSTALLDIR"
54988  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
54989    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
54990$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
54991
54992    # Need to check if the found msvcr is correct architecture
54993    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
54994$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
54995    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
54996    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
54997      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
54998      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
54999      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55000        CORRECT_MSVCR_ARCH="PE32 executable"
55001      else
55002        CORRECT_MSVCR_ARCH="PE32+ executable"
55003      fi
55004    else
55005      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55006        CORRECT_MSVCR_ARCH=386
55007      else
55008        CORRECT_MSVCR_ARCH=x86-64
55009      fi
55010    fi
55011    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55012      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55013$as_echo "ok" >&6; }
55014      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55015
55016  # Only process if variable expands to non-empty
55017
55018  if test "x$MSVC_DLL" != x; then
55019    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55020
55021  # Input might be given as Windows format, start by converting to
55022  # unix format.
55023  path="$MSVC_DLL"
55024  new_path=`$CYGPATH -u "$path"`
55025
55026  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55027  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55028  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55029  # "foo.exe" is OK but "foo" is an error.
55030  #
55031  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55032  # It is also a way to make sure we got the proper file name for the real test later on.
55033  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55034  if test "x$test_shortpath" = x; then
55035    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55036$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55037    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55038  fi
55039
55040  # Call helper function which possibly converts this using DOS-style short mode.
55041  # If so, the updated path is stored in $new_path.
55042
55043  input_path="$new_path"
55044  # Check if we need to convert this using DOS-style short mode. If the path
55045  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55046  # take no chances and rewrite it.
55047  # Note: m4 eats our [], so we need to use [ and ] instead.
55048  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55049  if test "x$has_forbidden_chars" != x; then
55050    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55051    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55052    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55053    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55054      # Going to short mode and back again did indeed matter. Since short mode is
55055      # case insensitive, let's make it lowercase to improve readability.
55056      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55057      # Now convert it back to Unix-style (cygpath)
55058      input_path=`$CYGPATH -u "$shortmode_path"`
55059      new_path="$input_path"
55060    fi
55061  fi
55062
55063  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55064  if test "x$test_cygdrive_prefix" = x; then
55065    # As a simple fix, exclude /usr/bin since it's not a real path.
55066    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55067      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55068      # a path prefixed by /cygdrive for fixpath to work.
55069      new_path="$CYGWIN_ROOT_PATH$input_path"
55070    fi
55071  fi
55072
55073
55074  if test "x$path" != "x$new_path"; then
55075    MSVC_DLL="$new_path"
55076    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55077$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55078  fi
55079
55080    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55081
55082  path="$MSVC_DLL"
55083  has_colon=`$ECHO $path | $GREP ^.:`
55084  new_path="$path"
55085  if test "x$has_colon" = x; then
55086    # Not in mixed or Windows style, start by that.
55087    new_path=`cmd //c echo $path`
55088  fi
55089
55090
55091  input_path="$new_path"
55092  # Check if we need to convert this using DOS-style short mode. If the path
55093  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55094  # take no chances and rewrite it.
55095  # Note: m4 eats our [], so we need to use [ and ] instead.
55096  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55097  if test "x$has_forbidden_chars" != x; then
55098    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55099    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55100  fi
55101
55102
55103  windows_path="$new_path"
55104  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55105    unix_path=`$CYGPATH -u "$windows_path"`
55106    new_path="$unix_path"
55107  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55108    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55109    new_path="$unix_path"
55110  fi
55111
55112  if test "x$path" != "x$new_path"; then
55113    MSVC_DLL="$new_path"
55114    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55115$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55116  fi
55117
55118  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55119  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55120
55121    else
55122      # We're on a unix platform. Hooray! :)
55123      path="$MSVC_DLL"
55124      has_space=`$ECHO "$path" | $GREP " "`
55125      if test "x$has_space" != x; then
55126        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55127$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55128        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55129      fi
55130
55131      # Use eval to expand a potential ~
55132      eval path="$path"
55133      if test ! -f "$path" && test ! -d "$path"; then
55134        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55135      fi
55136
55137      if test -d "$path"; then
55138        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55139      else
55140        dir="`$DIRNAME "$path"`"
55141        base="`$BASENAME "$path"`"
55142        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55143      fi
55144    fi
55145  fi
55146
55147      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55148$as_echo_n "checking for $DLL_NAME... " >&6; }
55149      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55150$as_echo "$MSVC_DLL" >&6; }
55151    else
55152      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55153$as_echo "incorrect, ignoring" >&6; }
55154      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55155$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55156    fi
55157  fi
55158
55159    fi
55160  fi
55161
55162  if test "x$MSVC_DLL" = x; then
55163    # Probe: Check in the Boot JDK directory.
55164    POSSIBLE_MSVC_DLL="$BOOT_JDK/bin/$DLL_NAME"
55165
55166  DLL_NAME="$DLL_NAME"
55167  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55168  METHOD="well-known location in Boot JDK"
55169  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55170    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55171$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55172
55173    # Need to check if the found msvcr is correct architecture
55174    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55175$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55176    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55177    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55178      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55179      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55180      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55181        CORRECT_MSVCR_ARCH="PE32 executable"
55182      else
55183        CORRECT_MSVCR_ARCH="PE32+ executable"
55184      fi
55185    else
55186      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55187        CORRECT_MSVCR_ARCH=386
55188      else
55189        CORRECT_MSVCR_ARCH=x86-64
55190      fi
55191    fi
55192    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55193      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55194$as_echo "ok" >&6; }
55195      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55196
55197  # Only process if variable expands to non-empty
55198
55199  if test "x$MSVC_DLL" != x; then
55200    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55201
55202  # Input might be given as Windows format, start by converting to
55203  # unix format.
55204  path="$MSVC_DLL"
55205  new_path=`$CYGPATH -u "$path"`
55206
55207  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55208  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55209  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55210  # "foo.exe" is OK but "foo" is an error.
55211  #
55212  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55213  # It is also a way to make sure we got the proper file name for the real test later on.
55214  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55215  if test "x$test_shortpath" = x; then
55216    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55217$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55218    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55219  fi
55220
55221  # Call helper function which possibly converts this using DOS-style short mode.
55222  # If so, the updated path is stored in $new_path.
55223
55224  input_path="$new_path"
55225  # Check if we need to convert this using DOS-style short mode. If the path
55226  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55227  # take no chances and rewrite it.
55228  # Note: m4 eats our [], so we need to use [ and ] instead.
55229  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55230  if test "x$has_forbidden_chars" != x; then
55231    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55232    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55233    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55234    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55235      # Going to short mode and back again did indeed matter. Since short mode is
55236      # case insensitive, let's make it lowercase to improve readability.
55237      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55238      # Now convert it back to Unix-style (cygpath)
55239      input_path=`$CYGPATH -u "$shortmode_path"`
55240      new_path="$input_path"
55241    fi
55242  fi
55243
55244  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55245  if test "x$test_cygdrive_prefix" = x; then
55246    # As a simple fix, exclude /usr/bin since it's not a real path.
55247    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55248      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55249      # a path prefixed by /cygdrive for fixpath to work.
55250      new_path="$CYGWIN_ROOT_PATH$input_path"
55251    fi
55252  fi
55253
55254
55255  if test "x$path" != "x$new_path"; then
55256    MSVC_DLL="$new_path"
55257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55258$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55259  fi
55260
55261    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55262
55263  path="$MSVC_DLL"
55264  has_colon=`$ECHO $path | $GREP ^.:`
55265  new_path="$path"
55266  if test "x$has_colon" = x; then
55267    # Not in mixed or Windows style, start by that.
55268    new_path=`cmd //c echo $path`
55269  fi
55270
55271
55272  input_path="$new_path"
55273  # Check if we need to convert this using DOS-style short mode. If the path
55274  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55275  # take no chances and rewrite it.
55276  # Note: m4 eats our [], so we need to use [ and ] instead.
55277  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55278  if test "x$has_forbidden_chars" != x; then
55279    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55280    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55281  fi
55282
55283
55284  windows_path="$new_path"
55285  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55286    unix_path=`$CYGPATH -u "$windows_path"`
55287    new_path="$unix_path"
55288  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55289    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55290    new_path="$unix_path"
55291  fi
55292
55293  if test "x$path" != "x$new_path"; then
55294    MSVC_DLL="$new_path"
55295    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55296$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55297  fi
55298
55299  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55300  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55301
55302    else
55303      # We're on a unix platform. Hooray! :)
55304      path="$MSVC_DLL"
55305      has_space=`$ECHO "$path" | $GREP " "`
55306      if test "x$has_space" != x; then
55307        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55308$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55309        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55310      fi
55311
55312      # Use eval to expand a potential ~
55313      eval path="$path"
55314      if test ! -f "$path" && test ! -d "$path"; then
55315        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55316      fi
55317
55318      if test -d "$path"; then
55319        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55320      else
55321        dir="`$DIRNAME "$path"`"
55322        base="`$BASENAME "$path"`"
55323        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55324      fi
55325    fi
55326  fi
55327
55328      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55329$as_echo_n "checking for $DLL_NAME... " >&6; }
55330      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55331$as_echo "$MSVC_DLL" >&6; }
55332    else
55333      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55334$as_echo "incorrect, ignoring" >&6; }
55335      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55336$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55337    fi
55338  fi
55339
55340  fi
55341
55342  if test "x$MSVC_DLL" = x; then
55343    # Probe: Look in the Windows system32 directory
55344    CYGWIN_SYSTEMROOT="$SYSTEMROOT"
55345
55346  windows_path="$CYGWIN_SYSTEMROOT"
55347  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55348    unix_path=`$CYGPATH -u "$windows_path"`
55349    CYGWIN_SYSTEMROOT="$unix_path"
55350  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55351    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55352    CYGWIN_SYSTEMROOT="$unix_path"
55353  fi
55354
55355    POSSIBLE_MSVC_DLL="$CYGWIN_SYSTEMROOT/system32/$DLL_NAME"
55356
55357  DLL_NAME="$DLL_NAME"
55358  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55359  METHOD="well-known location in SYSTEMROOT"
55360  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55361    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55362$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55363
55364    # Need to check if the found msvcr is correct architecture
55365    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55366$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55367    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55368    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55369      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55370      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55371      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55372        CORRECT_MSVCR_ARCH="PE32 executable"
55373      else
55374        CORRECT_MSVCR_ARCH="PE32+ executable"
55375      fi
55376    else
55377      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55378        CORRECT_MSVCR_ARCH=386
55379      else
55380        CORRECT_MSVCR_ARCH=x86-64
55381      fi
55382    fi
55383    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55384      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55385$as_echo "ok" >&6; }
55386      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55387
55388  # Only process if variable expands to non-empty
55389
55390  if test "x$MSVC_DLL" != x; then
55391    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55392
55393  # Input might be given as Windows format, start by converting to
55394  # unix format.
55395  path="$MSVC_DLL"
55396  new_path=`$CYGPATH -u "$path"`
55397
55398  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55399  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55400  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55401  # "foo.exe" is OK but "foo" is an error.
55402  #
55403  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55404  # It is also a way to make sure we got the proper file name for the real test later on.
55405  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55406  if test "x$test_shortpath" = x; then
55407    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55408$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55409    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55410  fi
55411
55412  # Call helper function which possibly converts this using DOS-style short mode.
55413  # If so, the updated path is stored in $new_path.
55414
55415  input_path="$new_path"
55416  # Check if we need to convert this using DOS-style short mode. If the path
55417  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55418  # take no chances and rewrite it.
55419  # Note: m4 eats our [], so we need to use [ and ] instead.
55420  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55421  if test "x$has_forbidden_chars" != x; then
55422    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55423    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55424    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55425    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55426      # Going to short mode and back again did indeed matter. Since short mode is
55427      # case insensitive, let's make it lowercase to improve readability.
55428      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55429      # Now convert it back to Unix-style (cygpath)
55430      input_path=`$CYGPATH -u "$shortmode_path"`
55431      new_path="$input_path"
55432    fi
55433  fi
55434
55435  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55436  if test "x$test_cygdrive_prefix" = x; then
55437    # As a simple fix, exclude /usr/bin since it's not a real path.
55438    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55439      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55440      # a path prefixed by /cygdrive for fixpath to work.
55441      new_path="$CYGWIN_ROOT_PATH$input_path"
55442    fi
55443  fi
55444
55445
55446  if test "x$path" != "x$new_path"; then
55447    MSVC_DLL="$new_path"
55448    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55449$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55450  fi
55451
55452    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55453
55454  path="$MSVC_DLL"
55455  has_colon=`$ECHO $path | $GREP ^.:`
55456  new_path="$path"
55457  if test "x$has_colon" = x; then
55458    # Not in mixed or Windows style, start by that.
55459    new_path=`cmd //c echo $path`
55460  fi
55461
55462
55463  input_path="$new_path"
55464  # Check if we need to convert this using DOS-style short mode. If the path
55465  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55466  # take no chances and rewrite it.
55467  # Note: m4 eats our [], so we need to use [ and ] instead.
55468  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55469  if test "x$has_forbidden_chars" != x; then
55470    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55471    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55472  fi
55473
55474
55475  windows_path="$new_path"
55476  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55477    unix_path=`$CYGPATH -u "$windows_path"`
55478    new_path="$unix_path"
55479  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55480    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55481    new_path="$unix_path"
55482  fi
55483
55484  if test "x$path" != "x$new_path"; then
55485    MSVC_DLL="$new_path"
55486    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55487$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55488  fi
55489
55490  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55491  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55492
55493    else
55494      # We're on a unix platform. Hooray! :)
55495      path="$MSVC_DLL"
55496      has_space=`$ECHO "$path" | $GREP " "`
55497      if test "x$has_space" != x; then
55498        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55499$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55500        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55501      fi
55502
55503      # Use eval to expand a potential ~
55504      eval path="$path"
55505      if test ! -f "$path" && test ! -d "$path"; then
55506        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55507      fi
55508
55509      if test -d "$path"; then
55510        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55511      else
55512        dir="`$DIRNAME "$path"`"
55513        base="`$BASENAME "$path"`"
55514        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55515      fi
55516    fi
55517  fi
55518
55519      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55520$as_echo_n "checking for $DLL_NAME... " >&6; }
55521      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55522$as_echo "$MSVC_DLL" >&6; }
55523    else
55524      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55525$as_echo "incorrect, ignoring" >&6; }
55526      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55527$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55528    fi
55529  fi
55530
55531  fi
55532
55533  if test "x$MSVC_DLL" = x; then
55534    # Probe: If Visual Studio Express is installed, there is usually one with the debugger
55535    if test "x$VS100COMNTOOLS" != x; then
55536      CYGWIN_VS_TOOLS_DIR="$VS100COMNTOOLS/.."
55537
55538  windows_path="$CYGWIN_VS_TOOLS_DIR"
55539  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55540    unix_path=`$CYGPATH -u "$windows_path"`
55541    CYGWIN_VS_TOOLS_DIR="$unix_path"
55542  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55543    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55544    CYGWIN_VS_TOOLS_DIR="$unix_path"
55545  fi
55546
55547      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55548        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55549	    | $GREP -i /x64/ | $HEAD --lines 1`
55550      else
55551        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME \
55552	    | $GREP -i /x86/ | $HEAD --lines 1`
55553      fi
55554
55555  DLL_NAME="$DLL_NAME"
55556  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55557  METHOD="search of VS100COMNTOOLS"
55558  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55559    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55560$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55561
55562    # Need to check if the found msvcr is correct architecture
55563    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55564$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55565    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55566    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55567      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55568      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55569      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55570        CORRECT_MSVCR_ARCH="PE32 executable"
55571      else
55572        CORRECT_MSVCR_ARCH="PE32+ executable"
55573      fi
55574    else
55575      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55576        CORRECT_MSVCR_ARCH=386
55577      else
55578        CORRECT_MSVCR_ARCH=x86-64
55579      fi
55580    fi
55581    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55583$as_echo "ok" >&6; }
55584      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55585
55586  # Only process if variable expands to non-empty
55587
55588  if test "x$MSVC_DLL" != x; then
55589    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55590
55591  # Input might be given as Windows format, start by converting to
55592  # unix format.
55593  path="$MSVC_DLL"
55594  new_path=`$CYGPATH -u "$path"`
55595
55596  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55597  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55598  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55599  # "foo.exe" is OK but "foo" is an error.
55600  #
55601  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55602  # It is also a way to make sure we got the proper file name for the real test later on.
55603  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55604  if test "x$test_shortpath" = x; then
55605    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55606$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55607    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55608  fi
55609
55610  # Call helper function which possibly converts this using DOS-style short mode.
55611  # If so, the updated path is stored in $new_path.
55612
55613  input_path="$new_path"
55614  # Check if we need to convert this using DOS-style short mode. If the path
55615  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55616  # take no chances and rewrite it.
55617  # Note: m4 eats our [], so we need to use [ and ] instead.
55618  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55619  if test "x$has_forbidden_chars" != x; then
55620    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55621    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55622    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55623    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55624      # Going to short mode and back again did indeed matter. Since short mode is
55625      # case insensitive, let's make it lowercase to improve readability.
55626      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55627      # Now convert it back to Unix-style (cygpath)
55628      input_path=`$CYGPATH -u "$shortmode_path"`
55629      new_path="$input_path"
55630    fi
55631  fi
55632
55633  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55634  if test "x$test_cygdrive_prefix" = x; then
55635    # As a simple fix, exclude /usr/bin since it's not a real path.
55636    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55637      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55638      # a path prefixed by /cygdrive for fixpath to work.
55639      new_path="$CYGWIN_ROOT_PATH$input_path"
55640    fi
55641  fi
55642
55643
55644  if test "x$path" != "x$new_path"; then
55645    MSVC_DLL="$new_path"
55646    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55647$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55648  fi
55649
55650    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55651
55652  path="$MSVC_DLL"
55653  has_colon=`$ECHO $path | $GREP ^.:`
55654  new_path="$path"
55655  if test "x$has_colon" = x; then
55656    # Not in mixed or Windows style, start by that.
55657    new_path=`cmd //c echo $path`
55658  fi
55659
55660
55661  input_path="$new_path"
55662  # Check if we need to convert this using DOS-style short mode. If the path
55663  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55664  # take no chances and rewrite it.
55665  # Note: m4 eats our [], so we need to use [ and ] instead.
55666  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55667  if test "x$has_forbidden_chars" != x; then
55668    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55669    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55670  fi
55671
55672
55673  windows_path="$new_path"
55674  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55675    unix_path=`$CYGPATH -u "$windows_path"`
55676    new_path="$unix_path"
55677  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55678    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55679    new_path="$unix_path"
55680  fi
55681
55682  if test "x$path" != "x$new_path"; then
55683    MSVC_DLL="$new_path"
55684    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55685$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55686  fi
55687
55688  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55689  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55690
55691    else
55692      # We're on a unix platform. Hooray! :)
55693      path="$MSVC_DLL"
55694      has_space=`$ECHO "$path" | $GREP " "`
55695      if test "x$has_space" != x; then
55696        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55697$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55698        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55699      fi
55700
55701      # Use eval to expand a potential ~
55702      eval path="$path"
55703      if test ! -f "$path" && test ! -d "$path"; then
55704        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55705      fi
55706
55707      if test -d "$path"; then
55708        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55709      else
55710        dir="`$DIRNAME "$path"`"
55711        base="`$BASENAME "$path"`"
55712        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55713      fi
55714    fi
55715  fi
55716
55717      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55718$as_echo_n "checking for $DLL_NAME... " >&6; }
55719      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55720$as_echo "$MSVC_DLL" >&6; }
55721    else
55722      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55723$as_echo "incorrect, ignoring" >&6; }
55724      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55725$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55726    fi
55727  fi
55728
55729    fi
55730  fi
55731
55732  if test "x$MSVC_DLL" = x; then
55733    # Probe: Search wildly in the VCINSTALLDIR. We've probably lost by now.
55734    # (This was the original behaviour; kept since it might turn something up)
55735    if test "x$CYGWIN_VC_INSTALL_DIR" != x; then
55736      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55737        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55738	    | $GREP x64 | $HEAD --lines 1`
55739      else
55740        POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55741	    | $GREP x86 | $GREP -v ia64 | $GREP -v x64 | $HEAD --lines 1`
55742        if test "x$POSSIBLE_MSVC_DLL" = x; then
55743          # We're grasping at straws now...
55744          POSSIBLE_MSVC_DLL=`$FIND "$CYGWIN_VC_INSTALL_DIR" -name $DLL_NAME \
55745	      | $HEAD --lines 1`
55746        fi
55747      fi
55748
55749
55750  DLL_NAME="$DLL_NAME"
55751  POSSIBLE_MSVC_DLL="$POSSIBLE_MSVC_DLL"
55752  METHOD="search of VCINSTALLDIR"
55753  if test -n "$POSSIBLE_MSVC_DLL" -a -e "$POSSIBLE_MSVC_DLL"; then
55754    { $as_echo "$as_me:${as_lineno-$LINENO}: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&5
55755$as_echo "$as_me: Found $DLL_NAME at $POSSIBLE_MSVC_DLL using $METHOD" >&6;}
55756
55757    # Need to check if the found msvcr is correct architecture
55758    { $as_echo "$as_me:${as_lineno-$LINENO}: checking found $DLL_NAME architecture" >&5
55759$as_echo_n "checking found $DLL_NAME architecture... " >&6; }
55760    MSVC_DLL_FILETYPE=`$FILE -b "$POSSIBLE_MSVC_DLL"`
55761    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55762      # The MSYS 'file' command returns "PE32 executable for MS Windows (DLL) (GUI) Intel 80386 32-bit"
55763      # on x32 and "PE32+ executable for MS Windows (DLL) (GUI) Mono/.Net assembly" on x64 systems.
55764      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55765        CORRECT_MSVCR_ARCH="PE32 executable"
55766      else
55767        CORRECT_MSVCR_ARCH="PE32+ executable"
55768      fi
55769    else
55770      if test "x$OPENJDK_TARGET_CPU_BITS" = x32; then
55771        CORRECT_MSVCR_ARCH=386
55772      else
55773        CORRECT_MSVCR_ARCH=x86-64
55774      fi
55775    fi
55776    if $ECHO "$MSVC_DLL_FILETYPE" | $GREP "$CORRECT_MSVCR_ARCH" 2>&1 > /dev/null; then
55777      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5
55778$as_echo "ok" >&6; }
55779      MSVC_DLL="$POSSIBLE_MSVC_DLL"
55780
55781  # Only process if variable expands to non-empty
55782
55783  if test "x$MSVC_DLL" != x; then
55784    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55785
55786  # Input might be given as Windows format, start by converting to
55787  # unix format.
55788  path="$MSVC_DLL"
55789  new_path=`$CYGPATH -u "$path"`
55790
55791  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
55792  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
55793  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
55794  # "foo.exe" is OK but "foo" is an error.
55795  #
55796  # This test is therefore slightly more accurate than "test -f" to check for file precense.
55797  # It is also a way to make sure we got the proper file name for the real test later on.
55798  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
55799  if test "x$test_shortpath" = x; then
55800    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55801$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55802    as_fn_error $? "Cannot locate the the path of MSVC_DLL" "$LINENO" 5
55803  fi
55804
55805  # Call helper function which possibly converts this using DOS-style short mode.
55806  # If so, the updated path is stored in $new_path.
55807
55808  input_path="$new_path"
55809  # Check if we need to convert this using DOS-style short mode. If the path
55810  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55811  # take no chances and rewrite it.
55812  # Note: m4 eats our [], so we need to use [ and ] instead.
55813  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
55814  if test "x$has_forbidden_chars" != x; then
55815    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55816    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
55817    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
55818    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
55819      # Going to short mode and back again did indeed matter. Since short mode is
55820      # case insensitive, let's make it lowercase to improve readability.
55821      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55822      # Now convert it back to Unix-style (cygpath)
55823      input_path=`$CYGPATH -u "$shortmode_path"`
55824      new_path="$input_path"
55825    fi
55826  fi
55827
55828  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
55829  if test "x$test_cygdrive_prefix" = x; then
55830    # As a simple fix, exclude /usr/bin since it's not a real path.
55831    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
55832      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
55833      # a path prefixed by /cygdrive for fixpath to work.
55834      new_path="$CYGWIN_ROOT_PATH$input_path"
55835    fi
55836  fi
55837
55838
55839  if test "x$path" != "x$new_path"; then
55840    MSVC_DLL="$new_path"
55841    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55842$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55843  fi
55844
55845    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55846
55847  path="$MSVC_DLL"
55848  has_colon=`$ECHO $path | $GREP ^.:`
55849  new_path="$path"
55850  if test "x$has_colon" = x; then
55851    # Not in mixed or Windows style, start by that.
55852    new_path=`cmd //c echo $path`
55853  fi
55854
55855
55856  input_path="$new_path"
55857  # Check if we need to convert this using DOS-style short mode. If the path
55858  # contains just simple characters, use it. Otherwise (spaces, weird characters),
55859  # take no chances and rewrite it.
55860  # Note: m4 eats our [], so we need to use [ and ] instead.
55861  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
55862  if test "x$has_forbidden_chars" != x; then
55863    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
55864    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
55865  fi
55866
55867
55868  windows_path="$new_path"
55869  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
55870    unix_path=`$CYGPATH -u "$windows_path"`
55871    new_path="$unix_path"
55872  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
55873    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
55874    new_path="$unix_path"
55875  fi
55876
55877  if test "x$path" != "x$new_path"; then
55878    MSVC_DLL="$new_path"
55879    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting MSVC_DLL to \"$new_path\"" >&5
55880$as_echo "$as_me: Rewriting MSVC_DLL to \"$new_path\"" >&6;}
55881  fi
55882
55883  # Save the first 10 bytes of this path to the storage, so fixpath can work.
55884  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
55885
55886    else
55887      # We're on a unix platform. Hooray! :)
55888      path="$MSVC_DLL"
55889      has_space=`$ECHO "$path" | $GREP " "`
55890      if test "x$has_space" != x; then
55891        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&5
55892$as_echo "$as_me: The path of MSVC_DLL, which resolves as \"$path\", is invalid." >&6;}
55893        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
55894      fi
55895
55896      # Use eval to expand a potential ~
55897      eval path="$path"
55898      if test ! -f "$path" && test ! -d "$path"; then
55899        as_fn_error $? "The path of MSVC_DLL, which resolves as \"$path\", is not found." "$LINENO" 5
55900      fi
55901
55902      if test -d "$path"; then
55903        MSVC_DLL="`cd "$path"; $THEPWDCMD -L`"
55904      else
55905        dir="`$DIRNAME "$path"`"
55906        base="`$BASENAME "$path"`"
55907        MSVC_DLL="`cd "$dir"; $THEPWDCMD -L`/$base"
55908      fi
55909    fi
55910  fi
55911
55912      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55913$as_echo_n "checking for $DLL_NAME... " >&6; }
55914      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MSVC_DLL" >&5
55915$as_echo "$MSVC_DLL" >&6; }
55916    else
55917      { $as_echo "$as_me:${as_lineno-$LINENO}: result: incorrect, ignoring" >&5
55918$as_echo "incorrect, ignoring" >&6; }
55919      { $as_echo "$as_me:${as_lineno-$LINENO}: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&5
55920$as_echo "$as_me: The file type of the located $DLL_NAME is $MSVC_DLL_FILETYPE" >&6;}
55921    fi
55922  fi
55923
55924    fi
55925  fi
55926
55927  if test "x$MSVC_DLL" = x; then
55928    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $DLL_NAME" >&5
55929$as_echo_n "checking for $DLL_NAME... " >&6; }
55930    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
55931$as_echo "no" >&6; }
55932    as_fn_error $? "Could not find $DLL_NAME. Please specify using --with-msvcr-dll." "$LINENO" 5
55933  fi
55934
55935      MSVCP_DLL="$MSVC_DLL"
55936    fi
55937
55938  fi
55939
55940  fi
55941
55942
55943  if test "x$NEEDS_LIB_X11" = xfalse; then
55944    if (test "x${with_x}" != x && test "x${with_x}" != xno); then
55945      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: X11 is not used, so --with-x is ignored" >&5
55946$as_echo "$as_me: WARNING: X11 is not used, so --with-x is ignored" >&2;}
55947    fi
55948    X_CFLAGS=
55949    X_LIBS=
55950  else
55951
55952    if test "x${with_x}" = xno; then
55953      as_fn_error $? "It is not possible to disable the use of X11. Remove the --without-x option." "$LINENO" 5
55954    fi
55955
55956    if test "x${with_x}" != x &&  test "x${with_x}" != xyes; then
55957      # The user has specified a X11 base directory. Use it for includes and
55958      # libraries, unless explicitely overridden.
55959      if test "x$x_includes" = xNONE; then
55960        x_includes="${with_x}/include"
55961      fi
55962      if test "x$x_libraries" = xNONE; then
55963        x_libraries="${with_x}/lib"
55964      fi
55965    else
55966      # Check if the user has specified sysroot, but not --with-x, --x-includes or --x-libraries.
55967      # Make a simple check for the libraries at the sysroot, and setup --x-includes and
55968      # --x-libraries for the sysroot, if that seems to be correct.
55969      if test "x$SYSROOT" != "x"; then
55970        if test "x$x_includes" = xNONE; then
55971          if test -f "$SYSROOT/usr/X11R6/include/X11/Xlib.h"; then
55972            x_includes="$SYSROOT/usr/X11R6/include"
55973          elif test -f "$SYSROOT/usr/include/X11/Xlib.h"; then
55974            x_includes="$SYSROOT/usr/include"
55975          fi
55976        fi
55977        if test "x$x_libraries" = xNONE; then
55978          if test -f "$SYSROOT/usr/X11R6/lib/libX11.so"; then
55979            x_libraries="$SYSROOT/usr/X11R6/lib"
55980          elif test -f "$SYSROOT/usr/lib64/libX11.so" && test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
55981            x_libraries="$SYSROOT/usr/lib64"
55982          elif test -f "$SYSROOT/usr/lib/libX11.so"; then
55983            x_libraries="$SYSROOT/usr/lib"
55984          fi
55985        fi
55986      fi
55987    fi
55988
55989    # Now let autoconf do it's magic
55990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for X" >&5
55991$as_echo_n "checking for X... " >&6; }
55992
55993
55994# Check whether --with-x was given.
55995if test "${with_x+set}" = set; then :
55996  withval=$with_x;
55997fi
55998
55999# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
56000if test "x$with_x" = xno; then
56001  # The user explicitly disabled X.
56002  have_x=disabled
56003else
56004  case $x_includes,$x_libraries in #(
56005    *\'*) as_fn_error $? "cannot use X directory names containing '" "$LINENO" 5;; #(
56006    *,NONE | NONE,*) if ${ac_cv_have_x+:} false; then :
56007  $as_echo_n "(cached) " >&6
56008else
56009  # One or both of the vars are not set, and there is no cached value.
56010ac_x_includes=no ac_x_libraries=no
56011rm -f -r conftest.dir
56012if mkdir conftest.dir; then
56013  cd conftest.dir
56014  cat >Imakefile <<'_ACEOF'
56015incroot:
56016	@echo incroot='${INCROOT}'
56017usrlibdir:
56018	@echo usrlibdir='${USRLIBDIR}'
56019libdir:
56020	@echo libdir='${LIBDIR}'
56021_ACEOF
56022  if (export CC; ${XMKMF-xmkmf}) >/dev/null 2>/dev/null && test -f Makefile; then
56023    # GNU make sometimes prints "make[1]: Entering ...", which would confuse us.
56024    for ac_var in incroot usrlibdir libdir; do
56025      eval "ac_im_$ac_var=\`\${MAKE-make} $ac_var 2>/dev/null | sed -n 's/^$ac_var=//p'\`"
56026    done
56027    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
56028    for ac_extension in a so sl dylib la dll; do
56029      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
56030	 test -f "$ac_im_libdir/libX11.$ac_extension"; then
56031	ac_im_usrlibdir=$ac_im_libdir; break
56032      fi
56033    done
56034    # Screen out bogus values from the imake configuration.  They are
56035    # bogus both because they are the default anyway, and because
56036    # using them would break gcc on systems where it needs fixed includes.
56037    case $ac_im_incroot in
56038	/usr/include) ac_x_includes= ;;
56039	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
56040    esac
56041    case $ac_im_usrlibdir in
56042	/usr/lib | /usr/lib64 | /lib | /lib64) ;;
56043	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
56044    esac
56045  fi
56046  cd ..
56047  rm -f -r conftest.dir
56048fi
56049
56050# Standard set of common directories for X headers.
56051# Check X11 before X11Rn because it is often a symlink to the current release.
56052ac_x_header_dirs='
56053/usr/X11/include
56054/usr/X11R7/include
56055/usr/X11R6/include
56056/usr/X11R5/include
56057/usr/X11R4/include
56058
56059/usr/include/X11
56060/usr/include/X11R7
56061/usr/include/X11R6
56062/usr/include/X11R5
56063/usr/include/X11R4
56064
56065/usr/local/X11/include
56066/usr/local/X11R7/include
56067/usr/local/X11R6/include
56068/usr/local/X11R5/include
56069/usr/local/X11R4/include
56070
56071/usr/local/include/X11
56072/usr/local/include/X11R7
56073/usr/local/include/X11R6
56074/usr/local/include/X11R5
56075/usr/local/include/X11R4
56076
56077/usr/X386/include
56078/usr/x386/include
56079/usr/XFree86/include/X11
56080
56081/usr/include
56082/usr/local/include
56083/usr/unsupported/include
56084/usr/athena/include
56085/usr/local/x11r5/include
56086/usr/lpp/Xamples/include
56087
56088/usr/openwin/include
56089/usr/openwin/share/include'
56090
56091if test "$ac_x_includes" = no; then
56092  # Guess where to find include files, by looking for Xlib.h.
56093  # First, try using that file with no special directory specified.
56094  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56095/* end confdefs.h.  */
56096#include <X11/Xlib.h>
56097_ACEOF
56098if ac_fn_cxx_try_cpp "$LINENO"; then :
56099  # We can compile using X headers with no special include directory.
56100ac_x_includes=
56101else
56102  for ac_dir in $ac_x_header_dirs; do
56103  if test -r "$ac_dir/X11/Xlib.h"; then
56104    ac_x_includes=$ac_dir
56105    break
56106  fi
56107done
56108fi
56109rm -f conftest.err conftest.i conftest.$ac_ext
56110fi # $ac_x_includes = no
56111
56112if test "$ac_x_libraries" = no; then
56113  # Check for the libraries.
56114  # See if we find them without any special options.
56115  # Don't add to $LIBS permanently.
56116  ac_save_LIBS=$LIBS
56117  LIBS="-lX11 $LIBS"
56118  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56119/* end confdefs.h.  */
56120#include <X11/Xlib.h>
56121int
56122main ()
56123{
56124XrmInitialize ()
56125  ;
56126  return 0;
56127}
56128_ACEOF
56129if ac_fn_cxx_try_link "$LINENO"; then :
56130  LIBS=$ac_save_LIBS
56131# We can link X programs with no special library path.
56132ac_x_libraries=
56133else
56134  LIBS=$ac_save_LIBS
56135for ac_dir in `$as_echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
56136do
56137  # Don't even attempt the hair of trying to link an X program!
56138  for ac_extension in a so sl dylib la dll; do
56139    if test -r "$ac_dir/libX11.$ac_extension"; then
56140      ac_x_libraries=$ac_dir
56141      break 2
56142    fi
56143  done
56144done
56145fi
56146rm -f core conftest.err conftest.$ac_objext \
56147    conftest$ac_exeext conftest.$ac_ext
56148fi # $ac_x_libraries = no
56149
56150case $ac_x_includes,$ac_x_libraries in #(
56151  no,* | *,no | *\'*)
56152    # Didn't find X, or a directory has "'" in its name.
56153    ac_cv_have_x="have_x=no";; #(
56154  *)
56155    # Record where we found X for the cache.
56156    ac_cv_have_x="have_x=yes\
56157	ac_x_includes='$ac_x_includes'\
56158	ac_x_libraries='$ac_x_libraries'"
56159esac
56160fi
56161;; #(
56162    *) have_x=yes;;
56163  esac
56164  eval "$ac_cv_have_x"
56165fi # $with_x != no
56166
56167if test "$have_x" != yes; then
56168  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $have_x" >&5
56169$as_echo "$have_x" >&6; }
56170  no_x=yes
56171else
56172  # If each of the values was on the command line, it overrides each guess.
56173  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
56174  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
56175  # Update the cache value to reflect the command line values.
56176  ac_cv_have_x="have_x=yes\
56177	ac_x_includes='$x_includes'\
56178	ac_x_libraries='$x_libraries'"
56179  { $as_echo "$as_me:${as_lineno-$LINENO}: result: libraries $x_libraries, headers $x_includes" >&5
56180$as_echo "libraries $x_libraries, headers $x_includes" >&6; }
56181fi
56182
56183    if test "$no_x" = yes; then
56184  # Not all programs may use this symbol, but it does not hurt to define it.
56185
56186$as_echo "#define X_DISPLAY_MISSING 1" >>confdefs.h
56187
56188  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
56189else
56190  if test -n "$x_includes"; then
56191    X_CFLAGS="$X_CFLAGS -I$x_includes"
56192  fi
56193
56194  # It would also be nice to do this for all -L options, not just this one.
56195  if test -n "$x_libraries"; then
56196    X_LIBS="$X_LIBS -L$x_libraries"
56197    # For Solaris; some versions of Sun CC require a space after -R and
56198    # others require no space.  Words are not sufficient . . . .
56199    { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -R must be followed by a space" >&5
56200$as_echo_n "checking whether -R must be followed by a space... " >&6; }
56201    ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
56202    ac_xsave_cxx_werror_flag=$ac_cxx_werror_flag
56203    ac_cxx_werror_flag=yes
56204    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56205/* end confdefs.h.  */
56206
56207int
56208main ()
56209{
56210
56211  ;
56212  return 0;
56213}
56214_ACEOF
56215if ac_fn_cxx_try_link "$LINENO"; then :
56216  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56217$as_echo "no" >&6; }
56218       X_LIBS="$X_LIBS -R$x_libraries"
56219else
56220  LIBS="$ac_xsave_LIBS -R $x_libraries"
56221       cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56222/* end confdefs.h.  */
56223
56224int
56225main ()
56226{
56227
56228  ;
56229  return 0;
56230}
56231_ACEOF
56232if ac_fn_cxx_try_link "$LINENO"; then :
56233  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56234$as_echo "yes" >&6; }
56235	  X_LIBS="$X_LIBS -R $x_libraries"
56236else
56237  { $as_echo "$as_me:${as_lineno-$LINENO}: result: neither works" >&5
56238$as_echo "neither works" >&6; }
56239fi
56240rm -f core conftest.err conftest.$ac_objext \
56241    conftest$ac_exeext conftest.$ac_ext
56242fi
56243rm -f core conftest.err conftest.$ac_objext \
56244    conftest$ac_exeext conftest.$ac_ext
56245    ac_cxx_werror_flag=$ac_xsave_cxx_werror_flag
56246    LIBS=$ac_xsave_LIBS
56247  fi
56248
56249  # Check for system-dependent libraries X programs must link with.
56250  # Do this before checking for the system-independent R6 libraries
56251  # (-lICE), since we may need -lsocket or whatever for X linking.
56252
56253  if test "$ISC" = yes; then
56254    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
56255  else
56256    # Martyn Johnson says this is needed for Ultrix, if the X
56257    # libraries were built with DECnet support.  And Karl Berry says
56258    # the Alpha needs dnet_stub (dnet does not exist).
56259    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
56260    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56261/* end confdefs.h.  */
56262
56263/* Override any GCC internal prototype to avoid an error.
56264   Use char because int might match the return type of a GCC
56265   builtin and then its argument prototype would still apply.  */
56266#ifdef __cplusplus
56267extern "C"
56268#endif
56269char XOpenDisplay ();
56270int
56271main ()
56272{
56273return XOpenDisplay ();
56274  ;
56275  return 0;
56276}
56277_ACEOF
56278if ac_fn_cxx_try_link "$LINENO"; then :
56279
56280else
56281  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet" >&5
56282$as_echo_n "checking for dnet_ntoa in -ldnet... " >&6; }
56283if ${ac_cv_lib_dnet_dnet_ntoa+:} false; then :
56284  $as_echo_n "(cached) " >&6
56285else
56286  ac_check_lib_save_LIBS=$LIBS
56287LIBS="-ldnet  $LIBS"
56288cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56289/* end confdefs.h.  */
56290
56291/* Override any GCC internal prototype to avoid an error.
56292   Use char because int might match the return type of a GCC
56293   builtin and then its argument prototype would still apply.  */
56294#ifdef __cplusplus
56295extern "C"
56296#endif
56297char dnet_ntoa ();
56298int
56299main ()
56300{
56301return dnet_ntoa ();
56302  ;
56303  return 0;
56304}
56305_ACEOF
56306if ac_fn_cxx_try_link "$LINENO"; then :
56307  ac_cv_lib_dnet_dnet_ntoa=yes
56308else
56309  ac_cv_lib_dnet_dnet_ntoa=no
56310fi
56311rm -f core conftest.err conftest.$ac_objext \
56312    conftest$ac_exeext conftest.$ac_ext
56313LIBS=$ac_check_lib_save_LIBS
56314fi
56315{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
56316$as_echo "$ac_cv_lib_dnet_dnet_ntoa" >&6; }
56317if test "x$ac_cv_lib_dnet_dnet_ntoa" = xyes; then :
56318  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
56319fi
56320
56321    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
56322      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dnet_ntoa in -ldnet_stub" >&5
56323$as_echo_n "checking for dnet_ntoa in -ldnet_stub... " >&6; }
56324if ${ac_cv_lib_dnet_stub_dnet_ntoa+:} false; then :
56325  $as_echo_n "(cached) " >&6
56326else
56327  ac_check_lib_save_LIBS=$LIBS
56328LIBS="-ldnet_stub  $LIBS"
56329cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56330/* end confdefs.h.  */
56331
56332/* Override any GCC internal prototype to avoid an error.
56333   Use char because int might match the return type of a GCC
56334   builtin and then its argument prototype would still apply.  */
56335#ifdef __cplusplus
56336extern "C"
56337#endif
56338char dnet_ntoa ();
56339int
56340main ()
56341{
56342return dnet_ntoa ();
56343  ;
56344  return 0;
56345}
56346_ACEOF
56347if ac_fn_cxx_try_link "$LINENO"; then :
56348  ac_cv_lib_dnet_stub_dnet_ntoa=yes
56349else
56350  ac_cv_lib_dnet_stub_dnet_ntoa=no
56351fi
56352rm -f core conftest.err conftest.$ac_objext \
56353    conftest$ac_exeext conftest.$ac_ext
56354LIBS=$ac_check_lib_save_LIBS
56355fi
56356{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
56357$as_echo "$ac_cv_lib_dnet_stub_dnet_ntoa" >&6; }
56358if test "x$ac_cv_lib_dnet_stub_dnet_ntoa" = xyes; then :
56359  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
56360fi
56361
56362    fi
56363fi
56364rm -f core conftest.err conftest.$ac_objext \
56365    conftest$ac_exeext conftest.$ac_ext
56366    LIBS="$ac_xsave_LIBS"
56367
56368    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
56369    # to get the SysV transport functions.
56370    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
56371    # needs -lnsl.
56372    # The nsl library prevents programs from opening the X display
56373    # on Irix 5.2, according to T.E. Dickey.
56374    # The functions gethostbyname, getservbyname, and inet_addr are
56375    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
56376    ac_fn_cxx_check_func "$LINENO" "gethostbyname" "ac_cv_func_gethostbyname"
56377if test "x$ac_cv_func_gethostbyname" = xyes; then :
56378
56379fi
56380
56381    if test $ac_cv_func_gethostbyname = no; then
56382      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lnsl" >&5
56383$as_echo_n "checking for gethostbyname in -lnsl... " >&6; }
56384if ${ac_cv_lib_nsl_gethostbyname+:} false; then :
56385  $as_echo_n "(cached) " >&6
56386else
56387  ac_check_lib_save_LIBS=$LIBS
56388LIBS="-lnsl  $LIBS"
56389cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56390/* end confdefs.h.  */
56391
56392/* Override any GCC internal prototype to avoid an error.
56393   Use char because int might match the return type of a GCC
56394   builtin and then its argument prototype would still apply.  */
56395#ifdef __cplusplus
56396extern "C"
56397#endif
56398char gethostbyname ();
56399int
56400main ()
56401{
56402return gethostbyname ();
56403  ;
56404  return 0;
56405}
56406_ACEOF
56407if ac_fn_cxx_try_link "$LINENO"; then :
56408  ac_cv_lib_nsl_gethostbyname=yes
56409else
56410  ac_cv_lib_nsl_gethostbyname=no
56411fi
56412rm -f core conftest.err conftest.$ac_objext \
56413    conftest$ac_exeext conftest.$ac_ext
56414LIBS=$ac_check_lib_save_LIBS
56415fi
56416{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname" >&5
56417$as_echo "$ac_cv_lib_nsl_gethostbyname" >&6; }
56418if test "x$ac_cv_lib_nsl_gethostbyname" = xyes; then :
56419  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
56420fi
56421
56422      if test $ac_cv_lib_nsl_gethostbyname = no; then
56423	{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname in -lbsd" >&5
56424$as_echo_n "checking for gethostbyname in -lbsd... " >&6; }
56425if ${ac_cv_lib_bsd_gethostbyname+:} false; then :
56426  $as_echo_n "(cached) " >&6
56427else
56428  ac_check_lib_save_LIBS=$LIBS
56429LIBS="-lbsd  $LIBS"
56430cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56431/* end confdefs.h.  */
56432
56433/* Override any GCC internal prototype to avoid an error.
56434   Use char because int might match the return type of a GCC
56435   builtin and then its argument prototype would still apply.  */
56436#ifdef __cplusplus
56437extern "C"
56438#endif
56439char gethostbyname ();
56440int
56441main ()
56442{
56443return gethostbyname ();
56444  ;
56445  return 0;
56446}
56447_ACEOF
56448if ac_fn_cxx_try_link "$LINENO"; then :
56449  ac_cv_lib_bsd_gethostbyname=yes
56450else
56451  ac_cv_lib_bsd_gethostbyname=no
56452fi
56453rm -f core conftest.err conftest.$ac_objext \
56454    conftest$ac_exeext conftest.$ac_ext
56455LIBS=$ac_check_lib_save_LIBS
56456fi
56457{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_bsd_gethostbyname" >&5
56458$as_echo "$ac_cv_lib_bsd_gethostbyname" >&6; }
56459if test "x$ac_cv_lib_bsd_gethostbyname" = xyes; then :
56460  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
56461fi
56462
56463      fi
56464    fi
56465
56466    # lieder@skyler.mavd.honeywell.com says without -lsocket,
56467    # socket/setsockopt and other routines are undefined under SCO ODT
56468    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
56469    # on later versions), says Simon Leinen: it contains gethostby*
56470    # variants that don't use the name server (or something).  -lsocket
56471    # must be given before -lnsl if both are needed.  We assume that
56472    # if connect needs -lnsl, so does gethostbyname.
56473    ac_fn_cxx_check_func "$LINENO" "connect" "ac_cv_func_connect"
56474if test "x$ac_cv_func_connect" = xyes; then :
56475
56476fi
56477
56478    if test $ac_cv_func_connect = no; then
56479      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for connect in -lsocket" >&5
56480$as_echo_n "checking for connect in -lsocket... " >&6; }
56481if ${ac_cv_lib_socket_connect+:} false; then :
56482  $as_echo_n "(cached) " >&6
56483else
56484  ac_check_lib_save_LIBS=$LIBS
56485LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
56486cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56487/* end confdefs.h.  */
56488
56489/* Override any GCC internal prototype to avoid an error.
56490   Use char because int might match the return type of a GCC
56491   builtin and then its argument prototype would still apply.  */
56492#ifdef __cplusplus
56493extern "C"
56494#endif
56495char connect ();
56496int
56497main ()
56498{
56499return connect ();
56500  ;
56501  return 0;
56502}
56503_ACEOF
56504if ac_fn_cxx_try_link "$LINENO"; then :
56505  ac_cv_lib_socket_connect=yes
56506else
56507  ac_cv_lib_socket_connect=no
56508fi
56509rm -f core conftest.err conftest.$ac_objext \
56510    conftest$ac_exeext conftest.$ac_ext
56511LIBS=$ac_check_lib_save_LIBS
56512fi
56513{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_connect" >&5
56514$as_echo "$ac_cv_lib_socket_connect" >&6; }
56515if test "x$ac_cv_lib_socket_connect" = xyes; then :
56516  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
56517fi
56518
56519    fi
56520
56521    # Guillermo Gomez says -lposix is necessary on A/UX.
56522    ac_fn_cxx_check_func "$LINENO" "remove" "ac_cv_func_remove"
56523if test "x$ac_cv_func_remove" = xyes; then :
56524
56525fi
56526
56527    if test $ac_cv_func_remove = no; then
56528      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for remove in -lposix" >&5
56529$as_echo_n "checking for remove in -lposix... " >&6; }
56530if ${ac_cv_lib_posix_remove+:} false; then :
56531  $as_echo_n "(cached) " >&6
56532else
56533  ac_check_lib_save_LIBS=$LIBS
56534LIBS="-lposix  $LIBS"
56535cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56536/* end confdefs.h.  */
56537
56538/* Override any GCC internal prototype to avoid an error.
56539   Use char because int might match the return type of a GCC
56540   builtin and then its argument prototype would still apply.  */
56541#ifdef __cplusplus
56542extern "C"
56543#endif
56544char remove ();
56545int
56546main ()
56547{
56548return remove ();
56549  ;
56550  return 0;
56551}
56552_ACEOF
56553if ac_fn_cxx_try_link "$LINENO"; then :
56554  ac_cv_lib_posix_remove=yes
56555else
56556  ac_cv_lib_posix_remove=no
56557fi
56558rm -f core conftest.err conftest.$ac_objext \
56559    conftest$ac_exeext conftest.$ac_ext
56560LIBS=$ac_check_lib_save_LIBS
56561fi
56562{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_posix_remove" >&5
56563$as_echo "$ac_cv_lib_posix_remove" >&6; }
56564if test "x$ac_cv_lib_posix_remove" = xyes; then :
56565  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
56566fi
56567
56568    fi
56569
56570    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
56571    ac_fn_cxx_check_func "$LINENO" "shmat" "ac_cv_func_shmat"
56572if test "x$ac_cv_func_shmat" = xyes; then :
56573
56574fi
56575
56576    if test $ac_cv_func_shmat = no; then
56577      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shmat in -lipc" >&5
56578$as_echo_n "checking for shmat in -lipc... " >&6; }
56579if ${ac_cv_lib_ipc_shmat+:} false; then :
56580  $as_echo_n "(cached) " >&6
56581else
56582  ac_check_lib_save_LIBS=$LIBS
56583LIBS="-lipc  $LIBS"
56584cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56585/* end confdefs.h.  */
56586
56587/* Override any GCC internal prototype to avoid an error.
56588   Use char because int might match the return type of a GCC
56589   builtin and then its argument prototype would still apply.  */
56590#ifdef __cplusplus
56591extern "C"
56592#endif
56593char shmat ();
56594int
56595main ()
56596{
56597return shmat ();
56598  ;
56599  return 0;
56600}
56601_ACEOF
56602if ac_fn_cxx_try_link "$LINENO"; then :
56603  ac_cv_lib_ipc_shmat=yes
56604else
56605  ac_cv_lib_ipc_shmat=no
56606fi
56607rm -f core conftest.err conftest.$ac_objext \
56608    conftest$ac_exeext conftest.$ac_ext
56609LIBS=$ac_check_lib_save_LIBS
56610fi
56611{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ipc_shmat" >&5
56612$as_echo "$ac_cv_lib_ipc_shmat" >&6; }
56613if test "x$ac_cv_lib_ipc_shmat" = xyes; then :
56614  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
56615fi
56616
56617    fi
56618  fi
56619
56620  # Check for libraries that X11R6 Xt/Xaw programs need.
56621  ac_save_LDFLAGS=$LDFLAGS
56622  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
56623  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
56624  # check for ICE first), but we must link in the order -lSM -lICE or
56625  # we get undefined symbols.  So assume we have SM if we have ICE.
56626  # These have to be linked with before -lX11, unlike the other
56627  # libraries we check for below, so use a different variable.
56628  # John Interrante, Karl Berry
56629  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for IceConnectionNumber in -lICE" >&5
56630$as_echo_n "checking for IceConnectionNumber in -lICE... " >&6; }
56631if ${ac_cv_lib_ICE_IceConnectionNumber+:} false; then :
56632  $as_echo_n "(cached) " >&6
56633else
56634  ac_check_lib_save_LIBS=$LIBS
56635LIBS="-lICE $X_EXTRA_LIBS $LIBS"
56636cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56637/* end confdefs.h.  */
56638
56639/* Override any GCC internal prototype to avoid an error.
56640   Use char because int might match the return type of a GCC
56641   builtin and then its argument prototype would still apply.  */
56642#ifdef __cplusplus
56643extern "C"
56644#endif
56645char IceConnectionNumber ();
56646int
56647main ()
56648{
56649return IceConnectionNumber ();
56650  ;
56651  return 0;
56652}
56653_ACEOF
56654if ac_fn_cxx_try_link "$LINENO"; then :
56655  ac_cv_lib_ICE_IceConnectionNumber=yes
56656else
56657  ac_cv_lib_ICE_IceConnectionNumber=no
56658fi
56659rm -f core conftest.err conftest.$ac_objext \
56660    conftest$ac_exeext conftest.$ac_ext
56661LIBS=$ac_check_lib_save_LIBS
56662fi
56663{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
56664$as_echo "$ac_cv_lib_ICE_IceConnectionNumber" >&6; }
56665if test "x$ac_cv_lib_ICE_IceConnectionNumber" = xyes; then :
56666  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
56667fi
56668
56669  LDFLAGS=$ac_save_LDFLAGS
56670
56671fi
56672
56673
56674    # AC_PATH_XTRA creates X_LIBS and sometimes adds -R flags. When cross compiling
56675    # this doesn't make sense so we remove it.
56676    if test "x$COMPILE_TYPE" = xcross; then
56677      X_LIBS=`$ECHO $X_LIBS | $SED 's/-R \{0,1\}[^ ]*//g'`
56678    fi
56679
56680    if test "x$no_x" = xyes; then
56681
56682  # Print a helpful message on how to acquire the necessary build dependency.
56683  # x11 is the help tag: freetype, cups, alsa etc
56684  MISSING_DEPENDENCY=x11
56685
56686  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56687    cygwin_help $MISSING_DEPENDENCY
56688  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56689    msys_help $MISSING_DEPENDENCY
56690  else
56691    PKGHANDLER_COMMAND=
56692
56693    case $PKGHANDLER in
56694      apt-get)
56695        apt_help     $MISSING_DEPENDENCY ;;
56696      yum)
56697        yum_help     $MISSING_DEPENDENCY ;;
56698      port)
56699        port_help    $MISSING_DEPENDENCY ;;
56700      pkgutil)
56701        pkgutil_help $MISSING_DEPENDENCY ;;
56702      pkgadd)
56703        pkgadd_help  $MISSING_DEPENDENCY ;;
56704    esac
56705
56706    if test "x$PKGHANDLER_COMMAND" != x; then
56707      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56708    fi
56709  fi
56710
56711      as_fn_error $? "Could not find X11 libraries. $HELP_MSG" "$LINENO" 5
56712    fi
56713
56714    if test "x$OPENJDK_TARGET_OS" = xsolaris; then
56715      OPENWIN_HOME="/usr/openwin"
56716      X_CFLAGS="-I$SYSROOT$OPENWIN_HOME/include -I$SYSROOT$OPENWIN_HOME/include/X11/extensions"
56717      X_LIBS="-L$SYSROOT$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56718          -L$SYSROOT$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR \
56719          -R$OPENWIN_HOME/sfw/lib$OPENJDK_TARGET_CPU_ISADIR \
56720          -R$OPENWIN_HOME/lib$OPENJDK_TARGET_CPU_ISADIR"
56721    fi
56722
56723    ac_ext=c
56724ac_cpp='$CPP $CPPFLAGS'
56725ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56726ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56727ac_compiler_gnu=$ac_cv_c_compiler_gnu
56728
56729    OLD_CFLAGS="$CFLAGS"
56730    CFLAGS="$CFLAGS $SYSROOT_CFLAGS $X_CFLAGS"
56731
56732    # Need to include Xlib.h and Xutil.h to avoid "present but cannot be compiled" warnings on Solaris 10
56733    for ac_header in X11/extensions/shape.h X11/extensions/Xrender.h X11/extensions/XTest.h X11/Intrinsic.h
56734do :
56735  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56736ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "
56737          # include <X11/Xlib.h>
56738          # include <X11/Xutil.h>
56739
56740
56741"
56742if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56743  cat >>confdefs.h <<_ACEOF
56744#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56745_ACEOF
56746 X11_HEADERS_OK=yes
56747else
56748  X11_HEADERS_OK=no; break
56749fi
56750
56751done
56752
56753
56754    if test "x$X11_HEADERS_OK" = xno; then
56755
56756  # Print a helpful message on how to acquire the necessary build dependency.
56757  # x11 is the help tag: freetype, cups, alsa etc
56758  MISSING_DEPENDENCY=x11
56759
56760  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56761    cygwin_help $MISSING_DEPENDENCY
56762  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56763    msys_help $MISSING_DEPENDENCY
56764  else
56765    PKGHANDLER_COMMAND=
56766
56767    case $PKGHANDLER in
56768      apt-get)
56769        apt_help     $MISSING_DEPENDENCY ;;
56770      yum)
56771        yum_help     $MISSING_DEPENDENCY ;;
56772      port)
56773        port_help    $MISSING_DEPENDENCY ;;
56774      pkgutil)
56775        pkgutil_help $MISSING_DEPENDENCY ;;
56776      pkgadd)
56777        pkgadd_help  $MISSING_DEPENDENCY ;;
56778    esac
56779
56780    if test "x$PKGHANDLER_COMMAND" != x; then
56781      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56782    fi
56783  fi
56784
56785      as_fn_error $? "Could not find all X11 headers (shape.h Xrender.h XTest.h Intrinsic.h). $HELP_MSG" "$LINENO" 5
56786    fi
56787
56788    # If XLinearGradient isn't available in Xrender.h, signal that it needs to be
56789    # defined in libawt_xawt.
56790    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if XlinearGradient is defined in Xrender.h" >&5
56791$as_echo_n "checking if XlinearGradient is defined in Xrender.h... " >&6; }
56792    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
56793/* end confdefs.h.  */
56794#include <X11/extensions/Xrender.h>
56795int
56796main ()
56797{
56798XLinearGradient x;
56799  ;
56800  return 0;
56801}
56802_ACEOF
56803if ac_fn_c_try_compile "$LINENO"; then :
56804  { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
56805$as_echo "yes" >&6; }
56806else
56807  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
56808$as_echo "no" >&6; }
56809         X_CFLAGS="$X_CFLAGS -DSOLARIS10_NO_XRENDER_STRUCTS"
56810fi
56811rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
56812
56813    CFLAGS="$OLD_CFLAGS"
56814    ac_ext=cpp
56815ac_cpp='$CXXCPP $CPPFLAGS'
56816ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
56817ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
56818ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
56819
56820  fi # NEEDS_LIB_X11
56821
56822
56823
56824
56825
56826
56827# Check whether --with-cups was given.
56828if test "${with_cups+set}" = set; then :
56829  withval=$with_cups;
56830fi
56831
56832
56833# Check whether --with-cups-include was given.
56834if test "${with_cups_include+set}" = set; then :
56835  withval=$with_cups_include;
56836fi
56837
56838
56839  if test "x$NEEDS_LIB_CUPS" = xfalse; then
56840    if (test "x${with_cups}" != x && test "x${with_cups}" != xno) || \
56841        (test "x${with_cups_include}" != x && test "x${with_cups_include}" != xno); then
56842      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cups not used, so --with-cups[-*] is ignored" >&5
56843$as_echo "$as_me: WARNING: cups not used, so --with-cups[-*] is ignored" >&2;}
56844    fi
56845    CUPS_CFLAGS=
56846  else
56847    CUPS_FOUND=no
56848
56849    if test "x${with_cups}" = xno || test "x${with_cups_include}" = xno; then
56850      as_fn_error $? "It is not possible to disable the use of cups. Remove the --without-cups option." "$LINENO" 5
56851    fi
56852
56853    if test "x${with_cups}" != x; then
56854      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56855$as_echo_n "checking for cups headers... " >&6; }
56856      if test -s "${with_cups}/include/cups/cups.h"; then
56857        CUPS_CFLAGS="-I${with_cups}/include"
56858        CUPS_FOUND=yes
56859        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56860$as_echo "$CUPS_FOUND" >&6; }
56861      else
56862        as_fn_error $? "Can't find 'include/cups/cups.h' under ${with_cups} given with the --with-cups option." "$LINENO" 5
56863      fi
56864    fi
56865    if test "x${with_cups_include}" != x; then
56866      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56867$as_echo_n "checking for cups headers... " >&6; }
56868      if test -s "${with_cups_include}/cups/cups.h"; then
56869        CUPS_CFLAGS="-I${with_cups_include}"
56870        CUPS_FOUND=yes
56871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56872$as_echo "$CUPS_FOUND" >&6; }
56873      else
56874        as_fn_error $? "Can't find 'cups/cups.h' under ${with_cups_include} given with the --with-cups-include option." "$LINENO" 5
56875      fi
56876    fi
56877    if test "x$CUPS_FOUND" = xno; then
56878      # Are the cups headers installed in the default /usr/include location?
56879      for ac_header in cups/cups.h cups/ppd.h
56880do :
56881  as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
56882ac_fn_cxx_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default"
56883if eval test \"x\$"$as_ac_Header"\" = x"yes"; then :
56884  cat >>confdefs.h <<_ACEOF
56885#define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1
56886_ACEOF
56887
56888          CUPS_FOUND=yes
56889          CUPS_CFLAGS=
56890          DEFAULT_CUPS=yes
56891
56892fi
56893
56894done
56895
56896    fi
56897    if test "x$CUPS_FOUND" = xno; then
56898      # Getting nervous now? Lets poke around for standard Solaris third-party
56899      # package installation locations.
56900      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cups headers" >&5
56901$as_echo_n "checking for cups headers... " >&6; }
56902      if test -s $SYSROOT/opt/sfw/cups/include/cups/cups.h; then
56903        # An SFW package seems to be installed!
56904        CUPS_FOUND=yes
56905        CUPS_CFLAGS="-I$SYSROOT/opt/sfw/cups/include"
56906      elif test -s $SYSROOT/opt/csw/include/cups/cups.h; then
56907        # A CSW package seems to be installed!
56908        CUPS_FOUND=yes
56909        CUPS_CFLAGS="-I$SYSROOT/opt/csw/include"
56910      fi
56911      { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CUPS_FOUND" >&5
56912$as_echo "$CUPS_FOUND" >&6; }
56913    fi
56914    if test "x$CUPS_FOUND" = xno; then
56915
56916  # Print a helpful message on how to acquire the necessary build dependency.
56917  # cups is the help tag: freetype, cups, alsa etc
56918  MISSING_DEPENDENCY=cups
56919
56920  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
56921    cygwin_help $MISSING_DEPENDENCY
56922  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
56923    msys_help $MISSING_DEPENDENCY
56924  else
56925    PKGHANDLER_COMMAND=
56926
56927    case $PKGHANDLER in
56928      apt-get)
56929        apt_help     $MISSING_DEPENDENCY ;;
56930      yum)
56931        yum_help     $MISSING_DEPENDENCY ;;
56932      port)
56933        port_help    $MISSING_DEPENDENCY ;;
56934      pkgutil)
56935        pkgutil_help $MISSING_DEPENDENCY ;;
56936      pkgadd)
56937        pkgadd_help  $MISSING_DEPENDENCY ;;
56938    esac
56939
56940    if test "x$PKGHANDLER_COMMAND" != x; then
56941      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
56942    fi
56943  fi
56944
56945      as_fn_error $? "Could not find cups! $HELP_MSG " "$LINENO" 5
56946    fi
56947  fi
56948
56949
56950
56951
56952
56953# Check whether --with-freetype was given.
56954if test "${with_freetype+set}" = set; then :
56955  withval=$with_freetype;
56956fi
56957
56958
56959# Check whether --with-freetype-include was given.
56960if test "${with_freetype_include+set}" = set; then :
56961  withval=$with_freetype_include;
56962fi
56963
56964
56965# Check whether --with-freetype-lib was given.
56966if test "${with_freetype_lib+set}" = set; then :
56967  withval=$with_freetype_lib;
56968fi
56969
56970
56971# Check whether --with-freetype-src was given.
56972if test "${with_freetype_src+set}" = set; then :
56973  withval=$with_freetype_src;
56974fi
56975
56976  # Check whether --enable-freetype-bundling was given.
56977if test "${enable_freetype_bundling+set}" = set; then :
56978  enableval=$enable_freetype_bundling;
56979fi
56980
56981
56982  # Need to specify explicitly since it needs to be overridden on some versions of macosx
56983  FREETYPE_BASE_NAME=freetype
56984  FREETYPE_CFLAGS=
56985  FREETYPE_LIBS=
56986  FREETYPE_BUNDLE_LIB_PATH=
56987
56988  if test "x$NEEDS_LIB_FREETYPE" = xfalse; then
56989    if (test "x$with_freetype" != x  && test "x$with_freetype" != xno) || \
56990        (test "x$with_freetype_include" != x && test "x$with_freetype_include" != xno) || \
56991        (test "x$with_freetype_lib" != x && test "x$with_freetype_lib" != xno) || \
56992        (test "x$with_freetype_src" != x && test "x$with_freetype_src" != xno); then
56993      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&5
56994$as_echo "$as_me: WARNING: freetype not used, so --with-freetype[-*] is ignored" >&2;}
56995    fi
56996    if (test "x$enable_freetype_bundling" != x && test "x$enable_freetype_bundling" != xno); then
56997      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&5
56998$as_echo "$as_me: WARNING: freetype not used, so --enable-freetype-bundling is ignored" >&2;}
56999    fi
57000  else
57001    # freetype is needed to build; go get it!
57002
57003    BUNDLE_FREETYPE="$enable_freetype_bundling"
57004
57005    if  test "x$with_freetype_src" != x; then
57006      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57007        # Try to build freetype if --with-freetype-src was given on Windows
57008
57009  FREETYPE_SRC_PATH="$with_freetype_src"
57010  BUILD_FREETYPE=yes
57011
57012  # Check if the freetype sources are acessible..
57013  if ! test -d $FREETYPE_SRC_PATH; then
57014    { $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
57015$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
57016    BUILD_FREETYPE=no
57017  fi
57018  # ..and contain a vc2010 project file
57019  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
57020  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
57021    { $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
57022$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
57023    BUILD_FREETYPE=no
57024  fi
57025  # Now check if configure found a version of 'msbuild.exe'
57026  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
57027    { $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
57028$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;}
57029    BUILD_FREETYPE=no
57030  fi
57031
57032  # Ready to go..
57033  if test "x$BUILD_FREETYPE" = xyes; then
57034    # msbuild requires trailing slashes for output directories
57035    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
57036    freetype_lib_path_unix="$freetype_lib_path"
57037    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
57038
57039  unix_path="$vcxproj_path"
57040  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57041    windows_path=`$CYGPATH -m "$unix_path"`
57042    vcxproj_path="$windows_path"
57043  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57044    windows_path=`cmd //c echo $unix_path`
57045    vcxproj_path="$windows_path"
57046  fi
57047
57048
57049  unix_path="$freetype_lib_path"
57050  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57051    windows_path=`$CYGPATH -m "$unix_path"`
57052    freetype_lib_path="$windows_path"
57053  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57054    windows_path=`cmd //c echo $unix_path`
57055    freetype_lib_path="$windows_path"
57056  fi
57057
57058
57059  unix_path="$freetype_obj_path"
57060  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57061    windows_path=`$CYGPATH -m "$unix_path"`
57062    freetype_obj_path="$windows_path"
57063  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57064    windows_path=`cmd //c echo $unix_path`
57065    freetype_obj_path="$windows_path"
57066  fi
57067
57068    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
57069      freetype_platform=x64
57070    else
57071      freetype_platform=win32
57072    fi
57073
57074    # The original freetype project file is for VS 2010 (i.e. 'v100'),
57075    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
57076    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
57077    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
57078    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
57079$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
57080
57081    # First we try to build the freetype.dll
57082    $ECHO -e "@echo off\n"\
57083        "$MSBUILD $vcxproj_path "\
57084        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57085        "/p:Configuration=\"Release Multithreaded\" "\
57086        "/p:Platform=$freetype_platform "\
57087        "/p:ConfigurationType=DynamicLibrary "\
57088        "/p:TargetName=freetype "\
57089        "/p:OutDir=\"$freetype_lib_path\" "\
57090        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
57091    cmd /c freetype.bat
57092
57093    if test -s "$freetype_lib_path_unix/freetype.dll"; then
57094      # If that succeeds we also build freetype.lib
57095      $ECHO -e "@echo off\n"\
57096          "$MSBUILD $vcxproj_path "\
57097          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
57098          "/p:Configuration=\"Release Multithreaded\" "\
57099          "/p:Platform=$freetype_platform "\
57100          "/p:ConfigurationType=StaticLibrary "\
57101          "/p:TargetName=freetype "\
57102          "/p:OutDir=\"$freetype_lib_path\" "\
57103          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
57104      cmd /c freetype.bat
57105
57106      if test -s "$freetype_lib_path_unix/freetype.lib"; then
57107        # Once we build both, lib and dll, set freetype lib and include path appropriately
57108        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
57109        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
57110        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
57111$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
57112      else
57113        BUILD_FREETYPE=no
57114      fi
57115    else
57116      BUILD_FREETYPE=no
57117    fi
57118  fi
57119
57120        if test "x$BUILD_FREETYPE" = xyes; then
57121          # Okay, we built it. Check that it works.
57122
57123  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57124  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57125  METHOD="--with-freetype-src"
57126
57127  # Let's start with an optimistic view of the world :-)
57128  FOUND_FREETYPE=yes
57129
57130  # First look for the canonical freetype main include file ft2build.h.
57131  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57132    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57133    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57134    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57135      # Fail.
57136      FOUND_FREETYPE=no
57137    fi
57138  fi
57139
57140  if test "x$FOUND_FREETYPE" = xyes; then
57141    # Include file found, let's continue the sanity check.
57142    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57143$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57144
57145    # Reset to default value
57146    FREETYPE_BASE_NAME=freetype
57147    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57148    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57149      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57150          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57151        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57152        # for the .6 version explicitly.
57153        FREETYPE_BASE_NAME=freetype.6
57154        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57155        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57156$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57157      else
57158        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57159$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57160        FOUND_FREETYPE=no
57161      fi
57162    else
57163      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57164        # On Windows, we will need both .lib and .dll file.
57165        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57166          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57167$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57168          FOUND_FREETYPE=no
57169        fi
57170      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57171          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57172        # Found lib in isa dir, use that instead.
57173        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57174        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57175$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57176      fi
57177    fi
57178  fi
57179
57180  if test "x$FOUND_FREETYPE" = xyes; then
57181
57182  # Only process if variable expands to non-empty
57183
57184  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57185    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57186
57187  # Input might be given as Windows format, start by converting to
57188  # unix format.
57189  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57190  new_path=`$CYGPATH -u "$path"`
57191
57192  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57193  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57194  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57195  # "foo.exe" is OK but "foo" is an error.
57196  #
57197  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57198  # It is also a way to make sure we got the proper file name for the real test later on.
57199  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57200  if test "x$test_shortpath" = x; then
57201    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57202$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57203    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57204  fi
57205
57206  # Call helper function which possibly converts this using DOS-style short mode.
57207  # If so, the updated path is stored in $new_path.
57208
57209  input_path="$new_path"
57210  # Check if we need to convert this using DOS-style short mode. If the path
57211  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57212  # take no chances and rewrite it.
57213  # Note: m4 eats our [], so we need to use [ and ] instead.
57214  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57215  if test "x$has_forbidden_chars" != x; then
57216    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57217    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57218    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57219    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57220      # Going to short mode and back again did indeed matter. Since short mode is
57221      # case insensitive, let's make it lowercase to improve readability.
57222      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57223      # Now convert it back to Unix-style (cygpath)
57224      input_path=`$CYGPATH -u "$shortmode_path"`
57225      new_path="$input_path"
57226    fi
57227  fi
57228
57229  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57230  if test "x$test_cygdrive_prefix" = x; then
57231    # As a simple fix, exclude /usr/bin since it's not a real path.
57232    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57233      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57234      # a path prefixed by /cygdrive for fixpath to work.
57235      new_path="$CYGWIN_ROOT_PATH$input_path"
57236    fi
57237  fi
57238
57239
57240  if test "x$path" != "x$new_path"; then
57241    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57242    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57243$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57244  fi
57245
57246    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57247
57248  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57249  has_colon=`$ECHO $path | $GREP ^.:`
57250  new_path="$path"
57251  if test "x$has_colon" = x; then
57252    # Not in mixed or Windows style, start by that.
57253    new_path=`cmd //c echo $path`
57254  fi
57255
57256
57257  input_path="$new_path"
57258  # Check if we need to convert this using DOS-style short mode. If the path
57259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57260  # take no chances and rewrite it.
57261  # Note: m4 eats our [], so we need to use [ and ] instead.
57262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57263  if test "x$has_forbidden_chars" != x; then
57264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57265    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57266  fi
57267
57268
57269  windows_path="$new_path"
57270  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57271    unix_path=`$CYGPATH -u "$windows_path"`
57272    new_path="$unix_path"
57273  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57274    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57275    new_path="$unix_path"
57276  fi
57277
57278  if test "x$path" != "x$new_path"; then
57279    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57280    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57281$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57282  fi
57283
57284  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57285  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57286
57287    else
57288      # We're on a unix platform. Hooray! :)
57289      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57290      has_space=`$ECHO "$path" | $GREP " "`
57291      if test "x$has_space" != x; then
57292        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57293$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57294        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57295      fi
57296
57297      # Use eval to expand a potential ~
57298      eval path="$path"
57299      if test ! -f "$path" && test ! -d "$path"; then
57300        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57301      fi
57302
57303      if test -d "$path"; then
57304        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57305      else
57306        dir="`$DIRNAME "$path"`"
57307        base="`$BASENAME "$path"`"
57308        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57309      fi
57310    fi
57311  fi
57312
57313
57314  # Only process if variable expands to non-empty
57315
57316  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57317    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57318
57319  # Input might be given as Windows format, start by converting to
57320  # unix format.
57321  path="$POTENTIAL_FREETYPE_LIB_PATH"
57322  new_path=`$CYGPATH -u "$path"`
57323
57324  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57325  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57326  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57327  # "foo.exe" is OK but "foo" is an error.
57328  #
57329  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57330  # It is also a way to make sure we got the proper file name for the real test later on.
57331  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57332  if test "x$test_shortpath" = x; then
57333    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57334$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57335    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57336  fi
57337
57338  # Call helper function which possibly converts this using DOS-style short mode.
57339  # If so, the updated path is stored in $new_path.
57340
57341  input_path="$new_path"
57342  # Check if we need to convert this using DOS-style short mode. If the path
57343  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57344  # take no chances and rewrite it.
57345  # Note: m4 eats our [], so we need to use [ and ] instead.
57346  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57347  if test "x$has_forbidden_chars" != x; then
57348    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57349    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57350    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57351    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57352      # Going to short mode and back again did indeed matter. Since short mode is
57353      # case insensitive, let's make it lowercase to improve readability.
57354      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57355      # Now convert it back to Unix-style (cygpath)
57356      input_path=`$CYGPATH -u "$shortmode_path"`
57357      new_path="$input_path"
57358    fi
57359  fi
57360
57361  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57362  if test "x$test_cygdrive_prefix" = x; then
57363    # As a simple fix, exclude /usr/bin since it's not a real path.
57364    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57365      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57366      # a path prefixed by /cygdrive for fixpath to work.
57367      new_path="$CYGWIN_ROOT_PATH$input_path"
57368    fi
57369  fi
57370
57371
57372  if test "x$path" != "x$new_path"; then
57373    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57374    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57375$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57376  fi
57377
57378    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57379
57380  path="$POTENTIAL_FREETYPE_LIB_PATH"
57381  has_colon=`$ECHO $path | $GREP ^.:`
57382  new_path="$path"
57383  if test "x$has_colon" = x; then
57384    # Not in mixed or Windows style, start by that.
57385    new_path=`cmd //c echo $path`
57386  fi
57387
57388
57389  input_path="$new_path"
57390  # Check if we need to convert this using DOS-style short mode. If the path
57391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57392  # take no chances and rewrite it.
57393  # Note: m4 eats our [], so we need to use [ and ] instead.
57394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57395  if test "x$has_forbidden_chars" != x; then
57396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57397    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57398  fi
57399
57400
57401  windows_path="$new_path"
57402  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57403    unix_path=`$CYGPATH -u "$windows_path"`
57404    new_path="$unix_path"
57405  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57406    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57407    new_path="$unix_path"
57408  fi
57409
57410  if test "x$path" != "x$new_path"; then
57411    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57412    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57413$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57414  fi
57415
57416  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57417  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57418
57419    else
57420      # We're on a unix platform. Hooray! :)
57421      path="$POTENTIAL_FREETYPE_LIB_PATH"
57422      has_space=`$ECHO "$path" | $GREP " "`
57423      if test "x$has_space" != x; then
57424        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57425$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57426        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57427      fi
57428
57429      # Use eval to expand a potential ~
57430      eval path="$path"
57431      if test ! -f "$path" && test ! -d "$path"; then
57432        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57433      fi
57434
57435      if test -d "$path"; then
57436        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57437      else
57438        dir="`$DIRNAME "$path"`"
57439        base="`$BASENAME "$path"`"
57440        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57441      fi
57442    fi
57443  fi
57444
57445
57446    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57447    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57448$as_echo_n "checking for freetype includes... " >&6; }
57449    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57450$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57451    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57452    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57453$as_echo_n "checking for freetype libraries... " >&6; }
57454    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57455$as_echo "$FREETYPE_LIB_PATH" >&6; }
57456  fi
57457
57458          if test "x$FOUND_FREETYPE" != xyes; then
57459            as_fn_error $? "Can not use the built freetype at location given by --with-freetype-src" "$LINENO" 5
57460          fi
57461        else
57462          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&5
57463$as_echo "$as_me: User specified --with-freetype-src but building freetype failed. (see freetype.log for build results)" >&6;}
57464          as_fn_error $? "Consider building freetype manually and using --with-freetype instead." "$LINENO" 5
57465        fi
57466      else
57467        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&5
57468$as_echo "$as_me: WARNING: --with-freetype-src is currently only supported on Windows - ignoring" >&2;}
57469      fi
57470    fi
57471
57472    if test "x$with_freetype" != x || test "x$with_freetype_include" != x || test "x$with_freetype_lib" != x; then
57473      # User has specified settings
57474
57475      if test "x$BUNDLE_FREETYPE" = x; then
57476        # If not specified, default is to bundle freetype
57477        BUNDLE_FREETYPE=yes
57478      fi
57479
57480      if test "x$with_freetype" != x; then
57481        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype/include"
57482        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype/lib"
57483      fi
57484
57485      # Allow --with-freetype-lib and --with-freetype-include to override
57486      if test "x$with_freetype_include" != x; then
57487        POTENTIAL_FREETYPE_INCLUDE_PATH="$with_freetype_include"
57488      fi
57489      if test "x$with_freetype_lib" != x; then
57490        POTENTIAL_FREETYPE_LIB_PATH="$with_freetype_lib"
57491      fi
57492
57493      if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x && test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57494        # Okay, we got it. Check that it works.
57495
57496  POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57497  POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57498  METHOD="--with-freetype"
57499
57500  # Let's start with an optimistic view of the world :-)
57501  FOUND_FREETYPE=yes
57502
57503  # First look for the canonical freetype main include file ft2build.h.
57504  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57505    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57506    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57507    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57508      # Fail.
57509      FOUND_FREETYPE=no
57510    fi
57511  fi
57512
57513  if test "x$FOUND_FREETYPE" = xyes; then
57514    # Include file found, let's continue the sanity check.
57515    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57516$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57517
57518    # Reset to default value
57519    FREETYPE_BASE_NAME=freetype
57520    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57521    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57522      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57523          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57524        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57525        # for the .6 version explicitly.
57526        FREETYPE_BASE_NAME=freetype.6
57527        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57528        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
57529$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
57530      else
57531        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
57532$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
57533        FOUND_FREETYPE=no
57534      fi
57535    else
57536      if test "x$OPENJDK_TARGET_OS" = xwindows; then
57537        # On Windows, we will need both .lib and .dll file.
57538        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
57539          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
57540$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
57541          FOUND_FREETYPE=no
57542        fi
57543      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
57544          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
57545        # Found lib in isa dir, use that instead.
57546        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
57547        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
57548$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
57549      fi
57550    fi
57551  fi
57552
57553  if test "x$FOUND_FREETYPE" = xyes; then
57554
57555  # Only process if variable expands to non-empty
57556
57557  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
57558    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57559
57560  # Input might be given as Windows format, start by converting to
57561  # unix format.
57562  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57563  new_path=`$CYGPATH -u "$path"`
57564
57565  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57566  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57567  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57568  # "foo.exe" is OK but "foo" is an error.
57569  #
57570  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57571  # It is also a way to make sure we got the proper file name for the real test later on.
57572  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57573  if test "x$test_shortpath" = x; then
57574    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57575$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57576    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
57577  fi
57578
57579  # Call helper function which possibly converts this using DOS-style short mode.
57580  # If so, the updated path is stored in $new_path.
57581
57582  input_path="$new_path"
57583  # Check if we need to convert this using DOS-style short mode. If the path
57584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57585  # take no chances and rewrite it.
57586  # Note: m4 eats our [], so we need to use [ and ] instead.
57587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57588  if test "x$has_forbidden_chars" != x; then
57589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57590    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57591    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57592    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57593      # Going to short mode and back again did indeed matter. Since short mode is
57594      # case insensitive, let's make it lowercase to improve readability.
57595      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57596      # Now convert it back to Unix-style (cygpath)
57597      input_path=`$CYGPATH -u "$shortmode_path"`
57598      new_path="$input_path"
57599    fi
57600  fi
57601
57602  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57603  if test "x$test_cygdrive_prefix" = x; then
57604    # As a simple fix, exclude /usr/bin since it's not a real path.
57605    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57606      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57607      # a path prefixed by /cygdrive for fixpath to work.
57608      new_path="$CYGWIN_ROOT_PATH$input_path"
57609    fi
57610  fi
57611
57612
57613  if test "x$path" != "x$new_path"; then
57614    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57615    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57616$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57617  fi
57618
57619    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57620
57621  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57622  has_colon=`$ECHO $path | $GREP ^.:`
57623  new_path="$path"
57624  if test "x$has_colon" = x; then
57625    # Not in mixed or Windows style, start by that.
57626    new_path=`cmd //c echo $path`
57627  fi
57628
57629
57630  input_path="$new_path"
57631  # Check if we need to convert this using DOS-style short mode. If the path
57632  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57633  # take no chances and rewrite it.
57634  # Note: m4 eats our [], so we need to use [ and ] instead.
57635  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57636  if test "x$has_forbidden_chars" != x; then
57637    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57638    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57639  fi
57640
57641
57642  windows_path="$new_path"
57643  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57644    unix_path=`$CYGPATH -u "$windows_path"`
57645    new_path="$unix_path"
57646  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57647    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57648    new_path="$unix_path"
57649  fi
57650
57651  if test "x$path" != "x$new_path"; then
57652    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
57653    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
57654$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
57655  fi
57656
57657  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57658  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57659
57660    else
57661      # We're on a unix platform. Hooray! :)
57662      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57663      has_space=`$ECHO "$path" | $GREP " "`
57664      if test "x$has_space" != x; then
57665        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
57666$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
57667        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57668      fi
57669
57670      # Use eval to expand a potential ~
57671      eval path="$path"
57672      if test ! -f "$path" && test ! -d "$path"; then
57673        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57674      fi
57675
57676      if test -d "$path"; then
57677        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
57678      else
57679        dir="`$DIRNAME "$path"`"
57680        base="`$BASENAME "$path"`"
57681        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57682      fi
57683    fi
57684  fi
57685
57686
57687  # Only process if variable expands to non-empty
57688
57689  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
57690    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57691
57692  # Input might be given as Windows format, start by converting to
57693  # unix format.
57694  path="$POTENTIAL_FREETYPE_LIB_PATH"
57695  new_path=`$CYGPATH -u "$path"`
57696
57697  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
57698  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
57699  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
57700  # "foo.exe" is OK but "foo" is an error.
57701  #
57702  # This test is therefore slightly more accurate than "test -f" to check for file precense.
57703  # It is also a way to make sure we got the proper file name for the real test later on.
57704  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
57705  if test "x$test_shortpath" = x; then
57706    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57707$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57708    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
57709  fi
57710
57711  # Call helper function which possibly converts this using DOS-style short mode.
57712  # If so, the updated path is stored in $new_path.
57713
57714  input_path="$new_path"
57715  # Check if we need to convert this using DOS-style short mode. If the path
57716  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57717  # take no chances and rewrite it.
57718  # Note: m4 eats our [], so we need to use [ and ] instead.
57719  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
57720  if test "x$has_forbidden_chars" != x; then
57721    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57722    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
57723    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
57724    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
57725      # Going to short mode and back again did indeed matter. Since short mode is
57726      # case insensitive, let's make it lowercase to improve readability.
57727      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57728      # Now convert it back to Unix-style (cygpath)
57729      input_path=`$CYGPATH -u "$shortmode_path"`
57730      new_path="$input_path"
57731    fi
57732  fi
57733
57734  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
57735  if test "x$test_cygdrive_prefix" = x; then
57736    # As a simple fix, exclude /usr/bin since it's not a real path.
57737    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
57738      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
57739      # a path prefixed by /cygdrive for fixpath to work.
57740      new_path="$CYGWIN_ROOT_PATH$input_path"
57741    fi
57742  fi
57743
57744
57745  if test "x$path" != "x$new_path"; then
57746    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57747    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57748$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57749  fi
57750
57751    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57752
57753  path="$POTENTIAL_FREETYPE_LIB_PATH"
57754  has_colon=`$ECHO $path | $GREP ^.:`
57755  new_path="$path"
57756  if test "x$has_colon" = x; then
57757    # Not in mixed or Windows style, start by that.
57758    new_path=`cmd //c echo $path`
57759  fi
57760
57761
57762  input_path="$new_path"
57763  # Check if we need to convert this using DOS-style short mode. If the path
57764  # contains just simple characters, use it. Otherwise (spaces, weird characters),
57765  # take no chances and rewrite it.
57766  # Note: m4 eats our [], so we need to use [ and ] instead.
57767  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
57768  if test "x$has_forbidden_chars" != x; then
57769    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
57770    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
57771  fi
57772
57773
57774  windows_path="$new_path"
57775  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57776    unix_path=`$CYGPATH -u "$windows_path"`
57777    new_path="$unix_path"
57778  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57779    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57780    new_path="$unix_path"
57781  fi
57782
57783  if test "x$path" != "x$new_path"; then
57784    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
57785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
57786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
57787  fi
57788
57789  # Save the first 10 bytes of this path to the storage, so fixpath can work.
57790  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
57791
57792    else
57793      # We're on a unix platform. Hooray! :)
57794      path="$POTENTIAL_FREETYPE_LIB_PATH"
57795      has_space=`$ECHO "$path" | $GREP " "`
57796      if test "x$has_space" != x; then
57797        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
57798$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
57799        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
57800      fi
57801
57802      # Use eval to expand a potential ~
57803      eval path="$path"
57804      if test ! -f "$path" && test ! -d "$path"; then
57805        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
57806      fi
57807
57808      if test -d "$path"; then
57809        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
57810      else
57811        dir="`$DIRNAME "$path"`"
57812        base="`$BASENAME "$path"`"
57813        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
57814      fi
57815    fi
57816  fi
57817
57818
57819    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
57820    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
57821$as_echo_n "checking for freetype includes... " >&6; }
57822    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
57823$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
57824    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
57825    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
57826$as_echo_n "checking for freetype libraries... " >&6; }
57827    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
57828$as_echo "$FREETYPE_LIB_PATH" >&6; }
57829  fi
57830
57831        if test "x$FOUND_FREETYPE" != xyes; then
57832          as_fn_error $? "Can not find or use freetype at location given by --with-freetype" "$LINENO" 5
57833        fi
57834      else
57835        # User specified only one of lib or include. This is an error.
57836        if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" = x ; then
57837          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-lib but not --with-freetype-include" >&5
57838$as_echo "$as_me: User specified --with-freetype-lib but not --with-freetype-include" >&6;}
57839          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57840        else
57841          { $as_echo "$as_me:${as_lineno-$LINENO}: User specified --with-freetype-include but not --with-freetype-lib" >&5
57842$as_echo "$as_me: User specified --with-freetype-include but not --with-freetype-lib" >&6;}
57843          as_fn_error $? "Need both freetype lib and include paths. Consider using --with-freetype instead." "$LINENO" 5
57844        fi
57845      fi
57846    else
57847      # User did not specify settings, but we need freetype. Try to locate it.
57848
57849      if test "x$BUNDLE_FREETYPE" = x; then
57850        # If not specified, default is to bundle freetype only on windows
57851        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57852          BUNDLE_FREETYPE=yes
57853        else
57854          BUNDLE_FREETYPE=no
57855        fi
57856      fi
57857
57858      # If we have a sysroot, assume that's where we are supposed to look and skip pkg-config.
57859      if test "x$SYSROOT" = x; then
57860        if test "x$FOUND_FREETYPE" != xyes; then
57861          # Check modules using pkg-config, but only if we have it (ugly output results otherwise)
57862          if test "x$PKG_CONFIG" != x; then
57863
57864pkg_failed=no
57865{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for FREETYPE" >&5
57866$as_echo_n "checking for FREETYPE... " >&6; }
57867
57868if test -n "$FREETYPE_CFLAGS"; then
57869    pkg_cv_FREETYPE_CFLAGS="$FREETYPE_CFLAGS"
57870 elif test -n "$PKG_CONFIG"; then
57871    if test -n "$PKG_CONFIG" && \
57872    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57873  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57874  ac_status=$?
57875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57876  test $ac_status = 0; }; then
57877  pkg_cv_FREETYPE_CFLAGS=`$PKG_CONFIG --cflags "freetype2" 2>/dev/null`
57878else
57879  pkg_failed=yes
57880fi
57881 else
57882    pkg_failed=untried
57883fi
57884if test -n "$FREETYPE_LIBS"; then
57885    pkg_cv_FREETYPE_LIBS="$FREETYPE_LIBS"
57886 elif test -n "$PKG_CONFIG"; then
57887    if test -n "$PKG_CONFIG" && \
57888    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"freetype2\""; } >&5
57889  ($PKG_CONFIG --exists --print-errors "freetype2") 2>&5
57890  ac_status=$?
57891  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
57892  test $ac_status = 0; }; then
57893  pkg_cv_FREETYPE_LIBS=`$PKG_CONFIG --libs "freetype2" 2>/dev/null`
57894else
57895  pkg_failed=yes
57896fi
57897 else
57898    pkg_failed=untried
57899fi
57900
57901
57902
57903if test $pkg_failed = yes; then
57904
57905if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
57906        _pkg_short_errors_supported=yes
57907else
57908        _pkg_short_errors_supported=no
57909fi
57910        if test $_pkg_short_errors_supported = yes; then
57911	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "freetype2" 2>&1`
57912        else
57913	        FREETYPE_PKG_ERRORS=`$PKG_CONFIG --print-errors "freetype2" 2>&1`
57914        fi
57915	# Put the nasty error message in config.log where it belongs
57916	echo "$FREETYPE_PKG_ERRORS" >&5
57917
57918	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
57919$as_echo "no" >&6; }
57920                FOUND_FREETYPE=no
57921elif test $pkg_failed = untried; then
57922	FOUND_FREETYPE=no
57923else
57924	FREETYPE_CFLAGS=$pkg_cv_FREETYPE_CFLAGS
57925	FREETYPE_LIBS=$pkg_cv_FREETYPE_LIBS
57926        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
57927$as_echo "yes" >&6; }
57928	FOUND_FREETYPE=yes
57929fi
57930            if test "x$FOUND_FREETYPE" = xyes; then
57931              # On solaris, pkg_check adds -lz to freetype libs, which isn't necessary for us.
57932              FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's/-lz//g'`
57933              # 64-bit libs for Solaris x86 are installed in the amd64 subdirectory, change lib to lib/amd64
57934              if test "x$OPENJDK_TARGET_OS" = xsolaris && test "x$OPENJDK_TARGET_CPU" = xx86_64; then
57935                FREETYPE_LIBS=`$ECHO $FREETYPE_LIBS | $SED 's?/lib?/lib/amd64?g'`
57936              fi
57937              # PKG_CHECK_MODULES will set FREETYPE_CFLAGS and _LIBS, but we don't get a lib path for bundling.
57938              if test "x$BUNDLE_FREETYPE" = xyes; then
57939                { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype using pkg-config, but ignoring since we can not bundle that" >&5
57940$as_echo "$as_me: Found freetype using pkg-config, but ignoring since we can not bundle that" >&6;}
57941                FOUND_FREETYPE=no
57942              else
57943                { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype" >&5
57944$as_echo_n "checking for freetype... " >&6; }
57945                { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (using pkg-config)" >&5
57946$as_echo "yes (using pkg-config)" >&6; }
57947              fi
57948            fi
57949          fi
57950        fi
57951      fi
57952
57953      if test "x$FOUND_FREETYPE" != xyes; then
57954        # Check in well-known locations
57955        if test "x$OPENJDK_TARGET_OS" = xwindows; then
57956          FREETYPE_BASE_DIR="$PROGRAMFILES/GnuWin32"
57957
57958  windows_path="$FREETYPE_BASE_DIR"
57959  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
57960    unix_path=`$CYGPATH -u "$windows_path"`
57961    FREETYPE_BASE_DIR="$unix_path"
57962  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
57963    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
57964    FREETYPE_BASE_DIR="$unix_path"
57965  fi
57966
57967
57968  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
57969  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
57970  METHOD="well-known location"
57971
57972  # Let's start with an optimistic view of the world :-)
57973  FOUND_FREETYPE=yes
57974
57975  # First look for the canonical freetype main include file ft2build.h.
57976  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57977    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
57978    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
57979    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
57980      # Fail.
57981      FOUND_FREETYPE=no
57982    fi
57983  fi
57984
57985  if test "x$FOUND_FREETYPE" = xyes; then
57986    # Include file found, let's continue the sanity check.
57987    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
57988$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
57989
57990    # Reset to default value
57991    FREETYPE_BASE_NAME=freetype
57992    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
57993    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
57994      if test "x$OPENJDK_TARGET_OS" = xmacosx \
57995          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
57996        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
57997        # for the .6 version explicitly.
57998        FREETYPE_BASE_NAME=freetype.6
57999        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58000        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58001$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58002      else
58003        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58004$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58005        FOUND_FREETYPE=no
58006      fi
58007    else
58008      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58009        # On Windows, we will need both .lib and .dll file.
58010        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58011          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58012$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58013          FOUND_FREETYPE=no
58014        fi
58015      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58016          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58017        # Found lib in isa dir, use that instead.
58018        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58019        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58020$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58021      fi
58022    fi
58023  fi
58024
58025  if test "x$FOUND_FREETYPE" = xyes; then
58026
58027  # Only process if variable expands to non-empty
58028
58029  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58030    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58031
58032  # Input might be given as Windows format, start by converting to
58033  # unix format.
58034  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58035  new_path=`$CYGPATH -u "$path"`
58036
58037  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58038  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58039  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58040  # "foo.exe" is OK but "foo" is an error.
58041  #
58042  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58043  # It is also a way to make sure we got the proper file name for the real test later on.
58044  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58045  if test "x$test_shortpath" = x; then
58046    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58047$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58048    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58049  fi
58050
58051  # Call helper function which possibly converts this using DOS-style short mode.
58052  # If so, the updated path is stored in $new_path.
58053
58054  input_path="$new_path"
58055  # Check if we need to convert this using DOS-style short mode. If the path
58056  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58057  # take no chances and rewrite it.
58058  # Note: m4 eats our [], so we need to use [ and ] instead.
58059  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58060  if test "x$has_forbidden_chars" != x; then
58061    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58062    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58063    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58064    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58065      # Going to short mode and back again did indeed matter. Since short mode is
58066      # case insensitive, let's make it lowercase to improve readability.
58067      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58068      # Now convert it back to Unix-style (cygpath)
58069      input_path=`$CYGPATH -u "$shortmode_path"`
58070      new_path="$input_path"
58071    fi
58072  fi
58073
58074  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58075  if test "x$test_cygdrive_prefix" = x; then
58076    # As a simple fix, exclude /usr/bin since it's not a real path.
58077    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58078      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58079      # a path prefixed by /cygdrive for fixpath to work.
58080      new_path="$CYGWIN_ROOT_PATH$input_path"
58081    fi
58082  fi
58083
58084
58085  if test "x$path" != "x$new_path"; then
58086    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58087    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58088$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58089  fi
58090
58091    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58092
58093  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58094  has_colon=`$ECHO $path | $GREP ^.:`
58095  new_path="$path"
58096  if test "x$has_colon" = x; then
58097    # Not in mixed or Windows style, start by that.
58098    new_path=`cmd //c echo $path`
58099  fi
58100
58101
58102  input_path="$new_path"
58103  # Check if we need to convert this using DOS-style short mode. If the path
58104  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58105  # take no chances and rewrite it.
58106  # Note: m4 eats our [], so we need to use [ and ] instead.
58107  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58108  if test "x$has_forbidden_chars" != x; then
58109    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58110    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58111  fi
58112
58113
58114  windows_path="$new_path"
58115  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58116    unix_path=`$CYGPATH -u "$windows_path"`
58117    new_path="$unix_path"
58118  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58119    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58120    new_path="$unix_path"
58121  fi
58122
58123  if test "x$path" != "x$new_path"; then
58124    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58125    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58126$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58127  fi
58128
58129  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58130  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58131
58132    else
58133      # We're on a unix platform. Hooray! :)
58134      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58135      has_space=`$ECHO "$path" | $GREP " "`
58136      if test "x$has_space" != x; then
58137        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58138$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58139        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58140      fi
58141
58142      # Use eval to expand a potential ~
58143      eval path="$path"
58144      if test ! -f "$path" && test ! -d "$path"; then
58145        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58146      fi
58147
58148      if test -d "$path"; then
58149        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58150      else
58151        dir="`$DIRNAME "$path"`"
58152        base="`$BASENAME "$path"`"
58153        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58154      fi
58155    fi
58156  fi
58157
58158
58159  # Only process if variable expands to non-empty
58160
58161  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58162    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58163
58164  # Input might be given as Windows format, start by converting to
58165  # unix format.
58166  path="$POTENTIAL_FREETYPE_LIB_PATH"
58167  new_path=`$CYGPATH -u "$path"`
58168
58169  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58170  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58171  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58172  # "foo.exe" is OK but "foo" is an error.
58173  #
58174  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58175  # It is also a way to make sure we got the proper file name for the real test later on.
58176  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58177  if test "x$test_shortpath" = x; then
58178    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58179$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58180    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58181  fi
58182
58183  # Call helper function which possibly converts this using DOS-style short mode.
58184  # If so, the updated path is stored in $new_path.
58185
58186  input_path="$new_path"
58187  # Check if we need to convert this using DOS-style short mode. If the path
58188  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58189  # take no chances and rewrite it.
58190  # Note: m4 eats our [], so we need to use [ and ] instead.
58191  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58192  if test "x$has_forbidden_chars" != x; then
58193    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58194    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58195    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58196    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58197      # Going to short mode and back again did indeed matter. Since short mode is
58198      # case insensitive, let's make it lowercase to improve readability.
58199      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58200      # Now convert it back to Unix-style (cygpath)
58201      input_path=`$CYGPATH -u "$shortmode_path"`
58202      new_path="$input_path"
58203    fi
58204  fi
58205
58206  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58207  if test "x$test_cygdrive_prefix" = x; then
58208    # As a simple fix, exclude /usr/bin since it's not a real path.
58209    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58210      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58211      # a path prefixed by /cygdrive for fixpath to work.
58212      new_path="$CYGWIN_ROOT_PATH$input_path"
58213    fi
58214  fi
58215
58216
58217  if test "x$path" != "x$new_path"; then
58218    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58219    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58220$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58221  fi
58222
58223    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58224
58225  path="$POTENTIAL_FREETYPE_LIB_PATH"
58226  has_colon=`$ECHO $path | $GREP ^.:`
58227  new_path="$path"
58228  if test "x$has_colon" = x; then
58229    # Not in mixed or Windows style, start by that.
58230    new_path=`cmd //c echo $path`
58231  fi
58232
58233
58234  input_path="$new_path"
58235  # Check if we need to convert this using DOS-style short mode. If the path
58236  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58237  # take no chances and rewrite it.
58238  # Note: m4 eats our [], so we need to use [ and ] instead.
58239  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58240  if test "x$has_forbidden_chars" != x; then
58241    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58242    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58243  fi
58244
58245
58246  windows_path="$new_path"
58247  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58248    unix_path=`$CYGPATH -u "$windows_path"`
58249    new_path="$unix_path"
58250  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58251    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58252    new_path="$unix_path"
58253  fi
58254
58255  if test "x$path" != "x$new_path"; then
58256    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58257    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58258$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58259  fi
58260
58261  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58262  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58263
58264    else
58265      # We're on a unix platform. Hooray! :)
58266      path="$POTENTIAL_FREETYPE_LIB_PATH"
58267      has_space=`$ECHO "$path" | $GREP " "`
58268      if test "x$has_space" != x; then
58269        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58270$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58271        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58272      fi
58273
58274      # Use eval to expand a potential ~
58275      eval path="$path"
58276      if test ! -f "$path" && test ! -d "$path"; then
58277        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58278      fi
58279
58280      if test -d "$path"; then
58281        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58282      else
58283        dir="`$DIRNAME "$path"`"
58284        base="`$BASENAME "$path"`"
58285        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58286      fi
58287    fi
58288  fi
58289
58290
58291    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58292    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58293$as_echo_n "checking for freetype includes... " >&6; }
58294    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58295$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58296    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58297    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58298$as_echo_n "checking for freetype libraries... " >&6; }
58299    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58300$as_echo "$FREETYPE_LIB_PATH" >&6; }
58301  fi
58302
58303          if test "x$FOUND_FREETYPE" != xyes; then
58304            FREETYPE_BASE_DIR="$ProgramW6432/GnuWin32"
58305
58306  windows_path="$FREETYPE_BASE_DIR"
58307  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58308    unix_path=`$CYGPATH -u "$windows_path"`
58309    FREETYPE_BASE_DIR="$unix_path"
58310  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58311    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58312    FREETYPE_BASE_DIR="$unix_path"
58313  fi
58314
58315
58316  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58317  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
58318  METHOD="well-known location"
58319
58320  # Let's start with an optimistic view of the world :-)
58321  FOUND_FREETYPE=yes
58322
58323  # First look for the canonical freetype main include file ft2build.h.
58324  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58325    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58326    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58327    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58328      # Fail.
58329      FOUND_FREETYPE=no
58330    fi
58331  fi
58332
58333  if test "x$FOUND_FREETYPE" = xyes; then
58334    # Include file found, let's continue the sanity check.
58335    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58336$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58337
58338    # Reset to default value
58339    FREETYPE_BASE_NAME=freetype
58340    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58341    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58342      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58343          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58344        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58345        # for the .6 version explicitly.
58346        FREETYPE_BASE_NAME=freetype.6
58347        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58348        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58349$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58350      else
58351        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58352$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58353        FOUND_FREETYPE=no
58354      fi
58355    else
58356      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58357        # On Windows, we will need both .lib and .dll file.
58358        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58359          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58360$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58361          FOUND_FREETYPE=no
58362        fi
58363      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58364          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58365        # Found lib in isa dir, use that instead.
58366        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58367        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58368$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58369      fi
58370    fi
58371  fi
58372
58373  if test "x$FOUND_FREETYPE" = xyes; then
58374
58375  # Only process if variable expands to non-empty
58376
58377  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58378    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58379
58380  # Input might be given as Windows format, start by converting to
58381  # unix format.
58382  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58383  new_path=`$CYGPATH -u "$path"`
58384
58385  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58386  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58387  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58388  # "foo.exe" is OK but "foo" is an error.
58389  #
58390  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58391  # It is also a way to make sure we got the proper file name for the real test later on.
58392  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58393  if test "x$test_shortpath" = x; then
58394    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58395$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58396    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58397  fi
58398
58399  # Call helper function which possibly converts this using DOS-style short mode.
58400  # If so, the updated path is stored in $new_path.
58401
58402  input_path="$new_path"
58403  # Check if we need to convert this using DOS-style short mode. If the path
58404  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58405  # take no chances and rewrite it.
58406  # Note: m4 eats our [], so we need to use [ and ] instead.
58407  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58408  if test "x$has_forbidden_chars" != x; then
58409    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58410    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58411    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58412    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58413      # Going to short mode and back again did indeed matter. Since short mode is
58414      # case insensitive, let's make it lowercase to improve readability.
58415      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58416      # Now convert it back to Unix-style (cygpath)
58417      input_path=`$CYGPATH -u "$shortmode_path"`
58418      new_path="$input_path"
58419    fi
58420  fi
58421
58422  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58423  if test "x$test_cygdrive_prefix" = x; then
58424    # As a simple fix, exclude /usr/bin since it's not a real path.
58425    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58426      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58427      # a path prefixed by /cygdrive for fixpath to work.
58428      new_path="$CYGWIN_ROOT_PATH$input_path"
58429    fi
58430  fi
58431
58432
58433  if test "x$path" != "x$new_path"; then
58434    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58435    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58436$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58437  fi
58438
58439    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58440
58441  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58442  has_colon=`$ECHO $path | $GREP ^.:`
58443  new_path="$path"
58444  if test "x$has_colon" = x; then
58445    # Not in mixed or Windows style, start by that.
58446    new_path=`cmd //c echo $path`
58447  fi
58448
58449
58450  input_path="$new_path"
58451  # Check if we need to convert this using DOS-style short mode. If the path
58452  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58453  # take no chances and rewrite it.
58454  # Note: m4 eats our [], so we need to use [ and ] instead.
58455  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58456  if test "x$has_forbidden_chars" != x; then
58457    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58458    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58459  fi
58460
58461
58462  windows_path="$new_path"
58463  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58464    unix_path=`$CYGPATH -u "$windows_path"`
58465    new_path="$unix_path"
58466  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58467    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58468    new_path="$unix_path"
58469  fi
58470
58471  if test "x$path" != "x$new_path"; then
58472    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58473    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58474$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58475  fi
58476
58477  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58478  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58479
58480    else
58481      # We're on a unix platform. Hooray! :)
58482      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58483      has_space=`$ECHO "$path" | $GREP " "`
58484      if test "x$has_space" != x; then
58485        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58486$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58487        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58488      fi
58489
58490      # Use eval to expand a potential ~
58491      eval path="$path"
58492      if test ! -f "$path" && test ! -d "$path"; then
58493        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58494      fi
58495
58496      if test -d "$path"; then
58497        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58498      else
58499        dir="`$DIRNAME "$path"`"
58500        base="`$BASENAME "$path"`"
58501        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58502      fi
58503    fi
58504  fi
58505
58506
58507  # Only process if variable expands to non-empty
58508
58509  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58510    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58511
58512  # Input might be given as Windows format, start by converting to
58513  # unix format.
58514  path="$POTENTIAL_FREETYPE_LIB_PATH"
58515  new_path=`$CYGPATH -u "$path"`
58516
58517  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58518  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58519  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58520  # "foo.exe" is OK but "foo" is an error.
58521  #
58522  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58523  # It is also a way to make sure we got the proper file name for the real test later on.
58524  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58525  if test "x$test_shortpath" = x; then
58526    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58527$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58528    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58529  fi
58530
58531  # Call helper function which possibly converts this using DOS-style short mode.
58532  # If so, the updated path is stored in $new_path.
58533
58534  input_path="$new_path"
58535  # Check if we need to convert this using DOS-style short mode. If the path
58536  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58537  # take no chances and rewrite it.
58538  # Note: m4 eats our [], so we need to use [ and ] instead.
58539  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58540  if test "x$has_forbidden_chars" != x; then
58541    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58542    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58543    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58544    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58545      # Going to short mode and back again did indeed matter. Since short mode is
58546      # case insensitive, let's make it lowercase to improve readability.
58547      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58548      # Now convert it back to Unix-style (cygpath)
58549      input_path=`$CYGPATH -u "$shortmode_path"`
58550      new_path="$input_path"
58551    fi
58552  fi
58553
58554  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58555  if test "x$test_cygdrive_prefix" = x; then
58556    # As a simple fix, exclude /usr/bin since it's not a real path.
58557    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58558      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58559      # a path prefixed by /cygdrive for fixpath to work.
58560      new_path="$CYGWIN_ROOT_PATH$input_path"
58561    fi
58562  fi
58563
58564
58565  if test "x$path" != "x$new_path"; then
58566    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58567    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58568$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58569  fi
58570
58571    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58572
58573  path="$POTENTIAL_FREETYPE_LIB_PATH"
58574  has_colon=`$ECHO $path | $GREP ^.:`
58575  new_path="$path"
58576  if test "x$has_colon" = x; then
58577    # Not in mixed or Windows style, start by that.
58578    new_path=`cmd //c echo $path`
58579  fi
58580
58581
58582  input_path="$new_path"
58583  # Check if we need to convert this using DOS-style short mode. If the path
58584  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58585  # take no chances and rewrite it.
58586  # Note: m4 eats our [], so we need to use [ and ] instead.
58587  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58588  if test "x$has_forbidden_chars" != x; then
58589    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58590    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58591  fi
58592
58593
58594  windows_path="$new_path"
58595  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58596    unix_path=`$CYGPATH -u "$windows_path"`
58597    new_path="$unix_path"
58598  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58599    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58600    new_path="$unix_path"
58601  fi
58602
58603  if test "x$path" != "x$new_path"; then
58604    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58605    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58606$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58607  fi
58608
58609  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58610  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58611
58612    else
58613      # We're on a unix platform. Hooray! :)
58614      path="$POTENTIAL_FREETYPE_LIB_PATH"
58615      has_space=`$ECHO "$path" | $GREP " "`
58616      if test "x$has_space" != x; then
58617        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58618$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58619        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58620      fi
58621
58622      # Use eval to expand a potential ~
58623      eval path="$path"
58624      if test ! -f "$path" && test ! -d "$path"; then
58625        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58626      fi
58627
58628      if test -d "$path"; then
58629        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58630      else
58631        dir="`$DIRNAME "$path"`"
58632        base="`$BASENAME "$path"`"
58633        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58634      fi
58635    fi
58636  fi
58637
58638
58639    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58640    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58641$as_echo_n "checking for freetype includes... " >&6; }
58642    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58643$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58644    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58645    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58646$as_echo_n "checking for freetype libraries... " >&6; }
58647    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58648$as_echo "$FREETYPE_LIB_PATH" >&6; }
58649  fi
58650
58651          fi
58652          if test "x$FOUND_FREETYPE" != xyes; then
58653            FREETYPE_BASE_DIR="$HOME/freetype"
58654
58655  windows_path="$FREETYPE_BASE_DIR"
58656  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58657    unix_path=`$CYGPATH -u "$windows_path"`
58658    FREETYPE_BASE_DIR="$unix_path"
58659  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58660    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58661    FREETYPE_BASE_DIR="$unix_path"
58662  fi
58663
58664            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
58665
58666  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
58667  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
58668  METHOD="well-known location"
58669
58670  # Let's start with an optimistic view of the world :-)
58671  FOUND_FREETYPE=yes
58672
58673  # First look for the canonical freetype main include file ft2build.h.
58674  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58675    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
58676    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
58677    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
58678      # Fail.
58679      FOUND_FREETYPE=no
58680    fi
58681  fi
58682
58683  if test "x$FOUND_FREETYPE" = xyes; then
58684    # Include file found, let's continue the sanity check.
58685    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
58686$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
58687
58688    # Reset to default value
58689    FREETYPE_BASE_NAME=freetype
58690    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58691    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
58692      if test "x$OPENJDK_TARGET_OS" = xmacosx \
58693          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
58694        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
58695        # for the .6 version explicitly.
58696        FREETYPE_BASE_NAME=freetype.6
58697        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
58698        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
58699$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
58700      else
58701        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
58702$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
58703        FOUND_FREETYPE=no
58704      fi
58705    else
58706      if test "x$OPENJDK_TARGET_OS" = xwindows; then
58707        # On Windows, we will need both .lib and .dll file.
58708        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
58709          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
58710$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
58711          FOUND_FREETYPE=no
58712        fi
58713      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
58714          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
58715        # Found lib in isa dir, use that instead.
58716        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
58717        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
58718$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
58719      fi
58720    fi
58721  fi
58722
58723  if test "x$FOUND_FREETYPE" = xyes; then
58724
58725  # Only process if variable expands to non-empty
58726
58727  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
58728    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58729
58730  # Input might be given as Windows format, start by converting to
58731  # unix format.
58732  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58733  new_path=`$CYGPATH -u "$path"`
58734
58735  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58736  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58737  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58738  # "foo.exe" is OK but "foo" is an error.
58739  #
58740  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58741  # It is also a way to make sure we got the proper file name for the real test later on.
58742  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58743  if test "x$test_shortpath" = x; then
58744    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58745$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58746    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
58747  fi
58748
58749  # Call helper function which possibly converts this using DOS-style short mode.
58750  # If so, the updated path is stored in $new_path.
58751
58752  input_path="$new_path"
58753  # Check if we need to convert this using DOS-style short mode. If the path
58754  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58755  # take no chances and rewrite it.
58756  # Note: m4 eats our [], so we need to use [ and ] instead.
58757  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58758  if test "x$has_forbidden_chars" != x; then
58759    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58760    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58761    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58762    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58763      # Going to short mode and back again did indeed matter. Since short mode is
58764      # case insensitive, let's make it lowercase to improve readability.
58765      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58766      # Now convert it back to Unix-style (cygpath)
58767      input_path=`$CYGPATH -u "$shortmode_path"`
58768      new_path="$input_path"
58769    fi
58770  fi
58771
58772  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58773  if test "x$test_cygdrive_prefix" = x; then
58774    # As a simple fix, exclude /usr/bin since it's not a real path.
58775    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58776      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58777      # a path prefixed by /cygdrive for fixpath to work.
58778      new_path="$CYGWIN_ROOT_PATH$input_path"
58779    fi
58780  fi
58781
58782
58783  if test "x$path" != "x$new_path"; then
58784    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58785    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58786$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58787  fi
58788
58789    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58790
58791  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58792  has_colon=`$ECHO $path | $GREP ^.:`
58793  new_path="$path"
58794  if test "x$has_colon" = x; then
58795    # Not in mixed or Windows style, start by that.
58796    new_path=`cmd //c echo $path`
58797  fi
58798
58799
58800  input_path="$new_path"
58801  # Check if we need to convert this using DOS-style short mode. If the path
58802  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58803  # take no chances and rewrite it.
58804  # Note: m4 eats our [], so we need to use [ and ] instead.
58805  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58806  if test "x$has_forbidden_chars" != x; then
58807    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58808    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58809  fi
58810
58811
58812  windows_path="$new_path"
58813  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58814    unix_path=`$CYGPATH -u "$windows_path"`
58815    new_path="$unix_path"
58816  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58817    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58818    new_path="$unix_path"
58819  fi
58820
58821  if test "x$path" != "x$new_path"; then
58822    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
58823    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
58824$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
58825  fi
58826
58827  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58828  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58829
58830    else
58831      # We're on a unix platform. Hooray! :)
58832      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58833      has_space=`$ECHO "$path" | $GREP " "`
58834      if test "x$has_space" != x; then
58835        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
58836$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
58837        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58838      fi
58839
58840      # Use eval to expand a potential ~
58841      eval path="$path"
58842      if test ! -f "$path" && test ! -d "$path"; then
58843        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58844      fi
58845
58846      if test -d "$path"; then
58847        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
58848      else
58849        dir="`$DIRNAME "$path"`"
58850        base="`$BASENAME "$path"`"
58851        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58852      fi
58853    fi
58854  fi
58855
58856
58857  # Only process if variable expands to non-empty
58858
58859  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
58860    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58861
58862  # Input might be given as Windows format, start by converting to
58863  # unix format.
58864  path="$POTENTIAL_FREETYPE_LIB_PATH"
58865  new_path=`$CYGPATH -u "$path"`
58866
58867  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
58868  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
58869  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
58870  # "foo.exe" is OK but "foo" is an error.
58871  #
58872  # This test is therefore slightly more accurate than "test -f" to check for file precense.
58873  # It is also a way to make sure we got the proper file name for the real test later on.
58874  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
58875  if test "x$test_shortpath" = x; then
58876    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58877$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58878    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
58879  fi
58880
58881  # Call helper function which possibly converts this using DOS-style short mode.
58882  # If so, the updated path is stored in $new_path.
58883
58884  input_path="$new_path"
58885  # Check if we need to convert this using DOS-style short mode. If the path
58886  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58887  # take no chances and rewrite it.
58888  # Note: m4 eats our [], so we need to use [ and ] instead.
58889  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
58890  if test "x$has_forbidden_chars" != x; then
58891    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58892    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
58893    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
58894    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
58895      # Going to short mode and back again did indeed matter. Since short mode is
58896      # case insensitive, let's make it lowercase to improve readability.
58897      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58898      # Now convert it back to Unix-style (cygpath)
58899      input_path=`$CYGPATH -u "$shortmode_path"`
58900      new_path="$input_path"
58901    fi
58902  fi
58903
58904  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
58905  if test "x$test_cygdrive_prefix" = x; then
58906    # As a simple fix, exclude /usr/bin since it's not a real path.
58907    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
58908      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
58909      # a path prefixed by /cygdrive for fixpath to work.
58910      new_path="$CYGWIN_ROOT_PATH$input_path"
58911    fi
58912  fi
58913
58914
58915  if test "x$path" != "x$new_path"; then
58916    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58917    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58918$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58919  fi
58920
58921    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58922
58923  path="$POTENTIAL_FREETYPE_LIB_PATH"
58924  has_colon=`$ECHO $path | $GREP ^.:`
58925  new_path="$path"
58926  if test "x$has_colon" = x; then
58927    # Not in mixed or Windows style, start by that.
58928    new_path=`cmd //c echo $path`
58929  fi
58930
58931
58932  input_path="$new_path"
58933  # Check if we need to convert this using DOS-style short mode. If the path
58934  # contains just simple characters, use it. Otherwise (spaces, weird characters),
58935  # take no chances and rewrite it.
58936  # Note: m4 eats our [], so we need to use [ and ] instead.
58937  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
58938  if test "x$has_forbidden_chars" != x; then
58939    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
58940    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
58941  fi
58942
58943
58944  windows_path="$new_path"
58945  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
58946    unix_path=`$CYGPATH -u "$windows_path"`
58947    new_path="$unix_path"
58948  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
58949    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
58950    new_path="$unix_path"
58951  fi
58952
58953  if test "x$path" != "x$new_path"; then
58954    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
58955    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
58956$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
58957  fi
58958
58959  # Save the first 10 bytes of this path to the storage, so fixpath can work.
58960  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
58961
58962    else
58963      # We're on a unix platform. Hooray! :)
58964      path="$POTENTIAL_FREETYPE_LIB_PATH"
58965      has_space=`$ECHO "$path" | $GREP " "`
58966      if test "x$has_space" != x; then
58967        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
58968$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
58969        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
58970      fi
58971
58972      # Use eval to expand a potential ~
58973      eval path="$path"
58974      if test ! -f "$path" && test ! -d "$path"; then
58975        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
58976      fi
58977
58978      if test -d "$path"; then
58979        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
58980      else
58981        dir="`$DIRNAME "$path"`"
58982        base="`$BASENAME "$path"`"
58983        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
58984      fi
58985    fi
58986  fi
58987
58988
58989    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
58990    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
58991$as_echo_n "checking for freetype includes... " >&6; }
58992    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
58993$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
58994    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
58995    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
58996$as_echo_n "checking for freetype libraries... " >&6; }
58997    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
58998$as_echo "$FREETYPE_LIB_PATH" >&6; }
58999  fi
59000
59001            else
59002
59003  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59004  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59005  METHOD="well-known location"
59006
59007  # Let's start with an optimistic view of the world :-)
59008  FOUND_FREETYPE=yes
59009
59010  # First look for the canonical freetype main include file ft2build.h.
59011  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59012    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59013    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59014    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59015      # Fail.
59016      FOUND_FREETYPE=no
59017    fi
59018  fi
59019
59020  if test "x$FOUND_FREETYPE" = xyes; then
59021    # Include file found, let's continue the sanity check.
59022    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59023$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59024
59025    # Reset to default value
59026    FREETYPE_BASE_NAME=freetype
59027    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59028    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59029      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59030          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59031        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59032        # for the .6 version explicitly.
59033        FREETYPE_BASE_NAME=freetype.6
59034        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59035        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59036$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59037      else
59038        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59039$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59040        FOUND_FREETYPE=no
59041      fi
59042    else
59043      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59044        # On Windows, we will need both .lib and .dll file.
59045        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59046          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59047$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59048          FOUND_FREETYPE=no
59049        fi
59050      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59051          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59052        # Found lib in isa dir, use that instead.
59053        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59054        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59055$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59056      fi
59057    fi
59058  fi
59059
59060  if test "x$FOUND_FREETYPE" = xyes; then
59061
59062  # Only process if variable expands to non-empty
59063
59064  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59065    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59066
59067  # Input might be given as Windows format, start by converting to
59068  # unix format.
59069  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59070  new_path=`$CYGPATH -u "$path"`
59071
59072  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59073  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59074  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59075  # "foo.exe" is OK but "foo" is an error.
59076  #
59077  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59078  # It is also a way to make sure we got the proper file name for the real test later on.
59079  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59080  if test "x$test_shortpath" = x; then
59081    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59082$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59083    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59084  fi
59085
59086  # Call helper function which possibly converts this using DOS-style short mode.
59087  # If so, the updated path is stored in $new_path.
59088
59089  input_path="$new_path"
59090  # Check if we need to convert this using DOS-style short mode. If the path
59091  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59092  # take no chances and rewrite it.
59093  # Note: m4 eats our [], so we need to use [ and ] instead.
59094  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59095  if test "x$has_forbidden_chars" != x; then
59096    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59097    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59098    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59099    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59100      # Going to short mode and back again did indeed matter. Since short mode is
59101      # case insensitive, let's make it lowercase to improve readability.
59102      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59103      # Now convert it back to Unix-style (cygpath)
59104      input_path=`$CYGPATH -u "$shortmode_path"`
59105      new_path="$input_path"
59106    fi
59107  fi
59108
59109  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59110  if test "x$test_cygdrive_prefix" = x; then
59111    # As a simple fix, exclude /usr/bin since it's not a real path.
59112    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59113      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59114      # a path prefixed by /cygdrive for fixpath to work.
59115      new_path="$CYGWIN_ROOT_PATH$input_path"
59116    fi
59117  fi
59118
59119
59120  if test "x$path" != "x$new_path"; then
59121    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59122    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59123$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59124  fi
59125
59126    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59127
59128  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59129  has_colon=`$ECHO $path | $GREP ^.:`
59130  new_path="$path"
59131  if test "x$has_colon" = x; then
59132    # Not in mixed or Windows style, start by that.
59133    new_path=`cmd //c echo $path`
59134  fi
59135
59136
59137  input_path="$new_path"
59138  # Check if we need to convert this using DOS-style short mode. If the path
59139  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59140  # take no chances and rewrite it.
59141  # Note: m4 eats our [], so we need to use [ and ] instead.
59142  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59143  if test "x$has_forbidden_chars" != x; then
59144    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59145    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59146  fi
59147
59148
59149  windows_path="$new_path"
59150  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59151    unix_path=`$CYGPATH -u "$windows_path"`
59152    new_path="$unix_path"
59153  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59154    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59155    new_path="$unix_path"
59156  fi
59157
59158  if test "x$path" != "x$new_path"; then
59159    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59160    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59161$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59162  fi
59163
59164  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59165  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59166
59167    else
59168      # We're on a unix platform. Hooray! :)
59169      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59170      has_space=`$ECHO "$path" | $GREP " "`
59171      if test "x$has_space" != x; then
59172        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59173$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59174        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59175      fi
59176
59177      # Use eval to expand a potential ~
59178      eval path="$path"
59179      if test ! -f "$path" && test ! -d "$path"; then
59180        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59181      fi
59182
59183      if test -d "$path"; then
59184        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59185      else
59186        dir="`$DIRNAME "$path"`"
59187        base="`$BASENAME "$path"`"
59188        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59189      fi
59190    fi
59191  fi
59192
59193
59194  # Only process if variable expands to non-empty
59195
59196  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59197    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59198
59199  # Input might be given as Windows format, start by converting to
59200  # unix format.
59201  path="$POTENTIAL_FREETYPE_LIB_PATH"
59202  new_path=`$CYGPATH -u "$path"`
59203
59204  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59205  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59206  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59207  # "foo.exe" is OK but "foo" is an error.
59208  #
59209  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59210  # It is also a way to make sure we got the proper file name for the real test later on.
59211  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59212  if test "x$test_shortpath" = x; then
59213    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59214$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59215    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59216  fi
59217
59218  # Call helper function which possibly converts this using DOS-style short mode.
59219  # If so, the updated path is stored in $new_path.
59220
59221  input_path="$new_path"
59222  # Check if we need to convert this using DOS-style short mode. If the path
59223  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59224  # take no chances and rewrite it.
59225  # Note: m4 eats our [], so we need to use [ and ] instead.
59226  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59227  if test "x$has_forbidden_chars" != x; then
59228    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59229    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59230    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59231    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59232      # Going to short mode and back again did indeed matter. Since short mode is
59233      # case insensitive, let's make it lowercase to improve readability.
59234      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59235      # Now convert it back to Unix-style (cygpath)
59236      input_path=`$CYGPATH -u "$shortmode_path"`
59237      new_path="$input_path"
59238    fi
59239  fi
59240
59241  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59242  if test "x$test_cygdrive_prefix" = x; then
59243    # As a simple fix, exclude /usr/bin since it's not a real path.
59244    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59245      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59246      # a path prefixed by /cygdrive for fixpath to work.
59247      new_path="$CYGWIN_ROOT_PATH$input_path"
59248    fi
59249  fi
59250
59251
59252  if test "x$path" != "x$new_path"; then
59253    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59254    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59255$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59256  fi
59257
59258    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59259
59260  path="$POTENTIAL_FREETYPE_LIB_PATH"
59261  has_colon=`$ECHO $path | $GREP ^.:`
59262  new_path="$path"
59263  if test "x$has_colon" = x; then
59264    # Not in mixed or Windows style, start by that.
59265    new_path=`cmd //c echo $path`
59266  fi
59267
59268
59269  input_path="$new_path"
59270  # Check if we need to convert this using DOS-style short mode. If the path
59271  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59272  # take no chances and rewrite it.
59273  # Note: m4 eats our [], so we need to use [ and ] instead.
59274  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59275  if test "x$has_forbidden_chars" != x; then
59276    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59277    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59278  fi
59279
59280
59281  windows_path="$new_path"
59282  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59283    unix_path=`$CYGPATH -u "$windows_path"`
59284    new_path="$unix_path"
59285  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59286    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59287    new_path="$unix_path"
59288  fi
59289
59290  if test "x$path" != "x$new_path"; then
59291    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59292    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59293$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59294  fi
59295
59296  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59297  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59298
59299    else
59300      # We're on a unix platform. Hooray! :)
59301      path="$POTENTIAL_FREETYPE_LIB_PATH"
59302      has_space=`$ECHO "$path" | $GREP " "`
59303      if test "x$has_space" != x; then
59304        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59305$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59306        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59307      fi
59308
59309      # Use eval to expand a potential ~
59310      eval path="$path"
59311      if test ! -f "$path" && test ! -d "$path"; then
59312        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59313      fi
59314
59315      if test -d "$path"; then
59316        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59317      else
59318        dir="`$DIRNAME "$path"`"
59319        base="`$BASENAME "$path"`"
59320        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59321      fi
59322    fi
59323  fi
59324
59325
59326    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59327    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59328$as_echo_n "checking for freetype includes... " >&6; }
59329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59330$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59331    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59332    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59333$as_echo_n "checking for freetype libraries... " >&6; }
59334    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59335$as_echo "$FREETYPE_LIB_PATH" >&6; }
59336  fi
59337
59338            fi
59339            if test "x$FOUND_FREETYPE" != xyes && test -d $FREETYPE_BASE_DIR \
59340                && test -s "$FREETYPE_BASE_DIR/builds/windows/vc2010/freetype.vcxproj" && test "x$MSBUILD" != x; then
59341              # Source is available, as a last resort try to build freetype in default location
59342
59343  FREETYPE_SRC_PATH="$FREETYPE_BASE_DIR"
59344  BUILD_FREETYPE=yes
59345
59346  # Check if the freetype sources are acessible..
59347  if ! test -d $FREETYPE_SRC_PATH; then
59348    { $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
59349$as_echo "$as_me: WARNING: --with-freetype-src specified, but can not find path \"$FREETYPE_SRC_PATH\" - ignoring --with-freetype-src" >&2;}
59350    BUILD_FREETYPE=no
59351  fi
59352  # ..and contain a vc2010 project file
59353  vcxproj_path="$FREETYPE_SRC_PATH/builds/windows/vc2010/freetype.vcxproj"
59354  if test "x$BUILD_FREETYPE" = xyes && ! test -s $vcxproj_path; then
59355    { $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
59356$as_echo "$as_me: WARNING: Can not find project file $vcxproj_path (you may try a newer freetype version) - ignoring --with-freetype-src" >&2;}
59357    BUILD_FREETYPE=no
59358  fi
59359  # Now check if configure found a version of 'msbuild.exe'
59360  if test "x$BUILD_FREETYPE" = xyes && test "x$MSBUILD" == x ; then
59361    { $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
59362$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;}
59363    BUILD_FREETYPE=no
59364  fi
59365
59366  # Ready to go..
59367  if test "x$BUILD_FREETYPE" = xyes; then
59368    # msbuild requires trailing slashes for output directories
59369    freetype_lib_path="$FREETYPE_SRC_PATH/lib$OPENJDK_TARGET_CPU_BITS/"
59370    freetype_lib_path_unix="$freetype_lib_path"
59371    freetype_obj_path="$FREETYPE_SRC_PATH/obj$OPENJDK_TARGET_CPU_BITS/"
59372
59373  unix_path="$vcxproj_path"
59374  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59375    windows_path=`$CYGPATH -m "$unix_path"`
59376    vcxproj_path="$windows_path"
59377  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59378    windows_path=`cmd //c echo $unix_path`
59379    vcxproj_path="$windows_path"
59380  fi
59381
59382
59383  unix_path="$freetype_lib_path"
59384  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59385    windows_path=`$CYGPATH -m "$unix_path"`
59386    freetype_lib_path="$windows_path"
59387  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59388    windows_path=`cmd //c echo $unix_path`
59389    freetype_lib_path="$windows_path"
59390  fi
59391
59392
59393  unix_path="$freetype_obj_path"
59394  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59395    windows_path=`$CYGPATH -m "$unix_path"`
59396    freetype_obj_path="$windows_path"
59397  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59398    windows_path=`cmd //c echo $unix_path`
59399    freetype_obj_path="$windows_path"
59400  fi
59401
59402    if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59403      freetype_platform=x64
59404    else
59405      freetype_platform=win32
59406    fi
59407
59408    # The original freetype project file is for VS 2010 (i.e. 'v100'),
59409    # so we have to adapt the toolset if building with any other toolsed (i.e. SDK).
59410    # Currently 'PLATFORM_TOOLSET' is set in 'TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT'/
59411    # 'TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT' in toolchain_windows.m4
59412    { $as_echo "$as_me:${as_lineno-$LINENO}: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&5
59413$as_echo "$as_me: Trying to compile freetype sources with PlatformToolset=$PLATFORM_TOOLSET to $freetype_lib_path_unix ..." >&6;}
59414
59415    # First we try to build the freetype.dll
59416    $ECHO -e "@echo off\n"\
59417        "$MSBUILD $vcxproj_path "\
59418        "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59419        "/p:Configuration=\"Release Multithreaded\" "\
59420        "/p:Platform=$freetype_platform "\
59421        "/p:ConfigurationType=DynamicLibrary "\
59422        "/p:TargetName=freetype "\
59423        "/p:OutDir=\"$freetype_lib_path\" "\
59424        "/p:IntDir=\"$freetype_obj_path\" > freetype.log" > freetype.bat
59425    cmd /c freetype.bat
59426
59427    if test -s "$freetype_lib_path_unix/freetype.dll"; then
59428      # If that succeeds we also build freetype.lib
59429      $ECHO -e "@echo off\n"\
59430          "$MSBUILD $vcxproj_path "\
59431          "/p:PlatformToolset=$PLATFORM_TOOLSET "\
59432          "/p:Configuration=\"Release Multithreaded\" "\
59433          "/p:Platform=$freetype_platform "\
59434          "/p:ConfigurationType=StaticLibrary "\
59435          "/p:TargetName=freetype "\
59436          "/p:OutDir=\"$freetype_lib_path\" "\
59437          "/p:IntDir=\"$freetype_obj_path\" >> freetype.log" > freetype.bat
59438      cmd /c freetype.bat
59439
59440      if test -s "$freetype_lib_path_unix/freetype.lib"; then
59441        # Once we build both, lib and dll, set freetype lib and include path appropriately
59442        POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_SRC_PATH/include"
59443        POTENTIAL_FREETYPE_LIB_PATH="$freetype_lib_path_unix"
59444        { $as_echo "$as_me:${as_lineno-$LINENO}: Compiling freetype sources succeeded! (see freetype.log for build results)" >&5
59445$as_echo "$as_me: Compiling freetype sources succeeded! (see freetype.log for build results)" >&6;}
59446      else
59447        BUILD_FREETYPE=no
59448      fi
59449    else
59450      BUILD_FREETYPE=no
59451    fi
59452  fi
59453
59454              if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
59455
59456  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59457  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib64"
59458  METHOD="well-known location"
59459
59460  # Let's start with an optimistic view of the world :-)
59461  FOUND_FREETYPE=yes
59462
59463  # First look for the canonical freetype main include file ft2build.h.
59464  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59465    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59466    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59467    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59468      # Fail.
59469      FOUND_FREETYPE=no
59470    fi
59471  fi
59472
59473  if test "x$FOUND_FREETYPE" = xyes; then
59474    # Include file found, let's continue the sanity check.
59475    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59476$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59477
59478    # Reset to default value
59479    FREETYPE_BASE_NAME=freetype
59480    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59481    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59482      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59483          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59484        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59485        # for the .6 version explicitly.
59486        FREETYPE_BASE_NAME=freetype.6
59487        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59488        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59489$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59490      else
59491        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59492$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59493        FOUND_FREETYPE=no
59494      fi
59495    else
59496      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59497        # On Windows, we will need both .lib and .dll file.
59498        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59499          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59500$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59501          FOUND_FREETYPE=no
59502        fi
59503      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59504          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59505        # Found lib in isa dir, use that instead.
59506        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59507        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59508$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59509      fi
59510    fi
59511  fi
59512
59513  if test "x$FOUND_FREETYPE" = xyes; then
59514
59515  # Only process if variable expands to non-empty
59516
59517  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59518    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59519
59520  # Input might be given as Windows format, start by converting to
59521  # unix format.
59522  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59523  new_path=`$CYGPATH -u "$path"`
59524
59525  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59526  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59527  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59528  # "foo.exe" is OK but "foo" is an error.
59529  #
59530  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59531  # It is also a way to make sure we got the proper file name for the real test later on.
59532  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59533  if test "x$test_shortpath" = x; then
59534    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59535$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59536    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59537  fi
59538
59539  # Call helper function which possibly converts this using DOS-style short mode.
59540  # If so, the updated path is stored in $new_path.
59541
59542  input_path="$new_path"
59543  # Check if we need to convert this using DOS-style short mode. If the path
59544  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59545  # take no chances and rewrite it.
59546  # Note: m4 eats our [], so we need to use [ and ] instead.
59547  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59548  if test "x$has_forbidden_chars" != x; then
59549    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59550    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59551    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59552    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59553      # Going to short mode and back again did indeed matter. Since short mode is
59554      # case insensitive, let's make it lowercase to improve readability.
59555      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59556      # Now convert it back to Unix-style (cygpath)
59557      input_path=`$CYGPATH -u "$shortmode_path"`
59558      new_path="$input_path"
59559    fi
59560  fi
59561
59562  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59563  if test "x$test_cygdrive_prefix" = x; then
59564    # As a simple fix, exclude /usr/bin since it's not a real path.
59565    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59566      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59567      # a path prefixed by /cygdrive for fixpath to work.
59568      new_path="$CYGWIN_ROOT_PATH$input_path"
59569    fi
59570  fi
59571
59572
59573  if test "x$path" != "x$new_path"; then
59574    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59575    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59576$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59577  fi
59578
59579    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59580
59581  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59582  has_colon=`$ECHO $path | $GREP ^.:`
59583  new_path="$path"
59584  if test "x$has_colon" = x; then
59585    # Not in mixed or Windows style, start by that.
59586    new_path=`cmd //c echo $path`
59587  fi
59588
59589
59590  input_path="$new_path"
59591  # Check if we need to convert this using DOS-style short mode. If the path
59592  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59593  # take no chances and rewrite it.
59594  # Note: m4 eats our [], so we need to use [ and ] instead.
59595  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59596  if test "x$has_forbidden_chars" != x; then
59597    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59598    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59599  fi
59600
59601
59602  windows_path="$new_path"
59603  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59604    unix_path=`$CYGPATH -u "$windows_path"`
59605    new_path="$unix_path"
59606  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59607    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59608    new_path="$unix_path"
59609  fi
59610
59611  if test "x$path" != "x$new_path"; then
59612    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59613    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59614$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59615  fi
59616
59617  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59618  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59619
59620    else
59621      # We're on a unix platform. Hooray! :)
59622      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59623      has_space=`$ECHO "$path" | $GREP " "`
59624      if test "x$has_space" != x; then
59625        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59626$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59627        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59628      fi
59629
59630      # Use eval to expand a potential ~
59631      eval path="$path"
59632      if test ! -f "$path" && test ! -d "$path"; then
59633        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59634      fi
59635
59636      if test -d "$path"; then
59637        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59638      else
59639        dir="`$DIRNAME "$path"`"
59640        base="`$BASENAME "$path"`"
59641        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59642      fi
59643    fi
59644  fi
59645
59646
59647  # Only process if variable expands to non-empty
59648
59649  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59650    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59651
59652  # Input might be given as Windows format, start by converting to
59653  # unix format.
59654  path="$POTENTIAL_FREETYPE_LIB_PATH"
59655  new_path=`$CYGPATH -u "$path"`
59656
59657  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59658  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59659  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59660  # "foo.exe" is OK but "foo" is an error.
59661  #
59662  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59663  # It is also a way to make sure we got the proper file name for the real test later on.
59664  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59665  if test "x$test_shortpath" = x; then
59666    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59668    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
59669  fi
59670
59671  # Call helper function which possibly converts this using DOS-style short mode.
59672  # If so, the updated path is stored in $new_path.
59673
59674  input_path="$new_path"
59675  # Check if we need to convert this using DOS-style short mode. If the path
59676  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59677  # take no chances and rewrite it.
59678  # Note: m4 eats our [], so we need to use [ and ] instead.
59679  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59680  if test "x$has_forbidden_chars" != x; then
59681    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59682    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59683    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59684    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59685      # Going to short mode and back again did indeed matter. Since short mode is
59686      # case insensitive, let's make it lowercase to improve readability.
59687      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59688      # Now convert it back to Unix-style (cygpath)
59689      input_path=`$CYGPATH -u "$shortmode_path"`
59690      new_path="$input_path"
59691    fi
59692  fi
59693
59694  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59695  if test "x$test_cygdrive_prefix" = x; then
59696    # As a simple fix, exclude /usr/bin since it's not a real path.
59697    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59698      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59699      # a path prefixed by /cygdrive for fixpath to work.
59700      new_path="$CYGWIN_ROOT_PATH$input_path"
59701    fi
59702  fi
59703
59704
59705  if test "x$path" != "x$new_path"; then
59706    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59707    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59708$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59709  fi
59710
59711    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59712
59713  path="$POTENTIAL_FREETYPE_LIB_PATH"
59714  has_colon=`$ECHO $path | $GREP ^.:`
59715  new_path="$path"
59716  if test "x$has_colon" = x; then
59717    # Not in mixed or Windows style, start by that.
59718    new_path=`cmd //c echo $path`
59719  fi
59720
59721
59722  input_path="$new_path"
59723  # Check if we need to convert this using DOS-style short mode. If the path
59724  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59725  # take no chances and rewrite it.
59726  # Note: m4 eats our [], so we need to use [ and ] instead.
59727  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59728  if test "x$has_forbidden_chars" != x; then
59729    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59730    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59731  fi
59732
59733
59734  windows_path="$new_path"
59735  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59736    unix_path=`$CYGPATH -u "$windows_path"`
59737    new_path="$unix_path"
59738  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59739    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59740    new_path="$unix_path"
59741  fi
59742
59743  if test "x$path" != "x$new_path"; then
59744    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
59745    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
59746$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
59747  fi
59748
59749  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59750  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59751
59752    else
59753      # We're on a unix platform. Hooray! :)
59754      path="$POTENTIAL_FREETYPE_LIB_PATH"
59755      has_space=`$ECHO "$path" | $GREP " "`
59756      if test "x$has_space" != x; then
59757        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
59758$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
59759        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59760      fi
59761
59762      # Use eval to expand a potential ~
59763      eval path="$path"
59764      if test ! -f "$path" && test ! -d "$path"; then
59765        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59766      fi
59767
59768      if test -d "$path"; then
59769        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
59770      else
59771        dir="`$DIRNAME "$path"`"
59772        base="`$BASENAME "$path"`"
59773        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59774      fi
59775    fi
59776  fi
59777
59778
59779    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59780    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
59781$as_echo_n "checking for freetype includes... " >&6; }
59782    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
59783$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
59784    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
59785    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
59786$as_echo_n "checking for freetype libraries... " >&6; }
59787    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
59788$as_echo "$FREETYPE_LIB_PATH" >&6; }
59789  fi
59790
59791              else
59792
59793  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
59794  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
59795  METHOD="well-known location"
59796
59797  # Let's start with an optimistic view of the world :-)
59798  FOUND_FREETYPE=yes
59799
59800  # First look for the canonical freetype main include file ft2build.h.
59801  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59802    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
59803    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
59804    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
59805      # Fail.
59806      FOUND_FREETYPE=no
59807    fi
59808  fi
59809
59810  if test "x$FOUND_FREETYPE" = xyes; then
59811    # Include file found, let's continue the sanity check.
59812    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
59813$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
59814
59815    # Reset to default value
59816    FREETYPE_BASE_NAME=freetype
59817    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59818    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
59819      if test "x$OPENJDK_TARGET_OS" = xmacosx \
59820          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
59821        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
59822        # for the .6 version explicitly.
59823        FREETYPE_BASE_NAME=freetype.6
59824        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
59825        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
59826$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
59827      else
59828        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
59829$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
59830        FOUND_FREETYPE=no
59831      fi
59832    else
59833      if test "x$OPENJDK_TARGET_OS" = xwindows; then
59834        # On Windows, we will need both .lib and .dll file.
59835        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
59836          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
59837$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
59838          FOUND_FREETYPE=no
59839        fi
59840      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
59841          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
59842        # Found lib in isa dir, use that instead.
59843        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
59844        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
59845$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
59846      fi
59847    fi
59848  fi
59849
59850  if test "x$FOUND_FREETYPE" = xyes; then
59851
59852  # Only process if variable expands to non-empty
59853
59854  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
59855    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59856
59857  # Input might be given as Windows format, start by converting to
59858  # unix format.
59859  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59860  new_path=`$CYGPATH -u "$path"`
59861
59862  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59863  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59864  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59865  # "foo.exe" is OK but "foo" is an error.
59866  #
59867  # This test is therefore slightly more accurate than "test -f" to check for file precense.
59868  # It is also a way to make sure we got the proper file name for the real test later on.
59869  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
59870  if test "x$test_shortpath" = x; then
59871    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59872$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59873    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
59874  fi
59875
59876  # Call helper function which possibly converts this using DOS-style short mode.
59877  # If so, the updated path is stored in $new_path.
59878
59879  input_path="$new_path"
59880  # Check if we need to convert this using DOS-style short mode. If the path
59881  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59882  # take no chances and rewrite it.
59883  # Note: m4 eats our [], so we need to use [ and ] instead.
59884  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
59885  if test "x$has_forbidden_chars" != x; then
59886    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59887    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
59888    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
59889    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
59890      # Going to short mode and back again did indeed matter. Since short mode is
59891      # case insensitive, let's make it lowercase to improve readability.
59892      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59893      # Now convert it back to Unix-style (cygpath)
59894      input_path=`$CYGPATH -u "$shortmode_path"`
59895      new_path="$input_path"
59896    fi
59897  fi
59898
59899  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
59900  if test "x$test_cygdrive_prefix" = x; then
59901    # As a simple fix, exclude /usr/bin since it's not a real path.
59902    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
59903      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
59904      # a path prefixed by /cygdrive for fixpath to work.
59905      new_path="$CYGWIN_ROOT_PATH$input_path"
59906    fi
59907  fi
59908
59909
59910  if test "x$path" != "x$new_path"; then
59911    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59912    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59913$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59914  fi
59915
59916    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59917
59918  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59919  has_colon=`$ECHO $path | $GREP ^.:`
59920  new_path="$path"
59921  if test "x$has_colon" = x; then
59922    # Not in mixed or Windows style, start by that.
59923    new_path=`cmd //c echo $path`
59924  fi
59925
59926
59927  input_path="$new_path"
59928  # Check if we need to convert this using DOS-style short mode. If the path
59929  # contains just simple characters, use it. Otherwise (spaces, weird characters),
59930  # take no chances and rewrite it.
59931  # Note: m4 eats our [], so we need to use [ and ] instead.
59932  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
59933  if test "x$has_forbidden_chars" != x; then
59934    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
59935    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
59936  fi
59937
59938
59939  windows_path="$new_path"
59940  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59941    unix_path=`$CYGPATH -u "$windows_path"`
59942    new_path="$unix_path"
59943  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
59944    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
59945    new_path="$unix_path"
59946  fi
59947
59948  if test "x$path" != "x$new_path"; then
59949    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
59950    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
59951$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
59952  fi
59953
59954  # Save the first 10 bytes of this path to the storage, so fixpath can work.
59955  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
59956
59957    else
59958      # We're on a unix platform. Hooray! :)
59959      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
59960      has_space=`$ECHO "$path" | $GREP " "`
59961      if test "x$has_space" != x; then
59962        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
59963$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
59964        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
59965      fi
59966
59967      # Use eval to expand a potential ~
59968      eval path="$path"
59969      if test ! -f "$path" && test ! -d "$path"; then
59970        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
59971      fi
59972
59973      if test -d "$path"; then
59974        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
59975      else
59976        dir="`$DIRNAME "$path"`"
59977        base="`$BASENAME "$path"`"
59978        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
59979      fi
59980    fi
59981  fi
59982
59983
59984  # Only process if variable expands to non-empty
59985
59986  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
59987    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
59988
59989  # Input might be given as Windows format, start by converting to
59990  # unix format.
59991  path="$POTENTIAL_FREETYPE_LIB_PATH"
59992  new_path=`$CYGPATH -u "$path"`
59993
59994  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
59995  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
59996  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
59997  # "foo.exe" is OK but "foo" is an error.
59998  #
59999  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60000  # It is also a way to make sure we got the proper file name for the real test later on.
60001  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60002  if test "x$test_shortpath" = x; then
60003    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60005    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60006  fi
60007
60008  # Call helper function which possibly converts this using DOS-style short mode.
60009  # If so, the updated path is stored in $new_path.
60010
60011  input_path="$new_path"
60012  # Check if we need to convert this using DOS-style short mode. If the path
60013  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60014  # take no chances and rewrite it.
60015  # Note: m4 eats our [], so we need to use [ and ] instead.
60016  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60017  if test "x$has_forbidden_chars" != x; then
60018    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60019    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60020    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60021    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60022      # Going to short mode and back again did indeed matter. Since short mode is
60023      # case insensitive, let's make it lowercase to improve readability.
60024      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60025      # Now convert it back to Unix-style (cygpath)
60026      input_path=`$CYGPATH -u "$shortmode_path"`
60027      new_path="$input_path"
60028    fi
60029  fi
60030
60031  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60032  if test "x$test_cygdrive_prefix" = x; then
60033    # As a simple fix, exclude /usr/bin since it's not a real path.
60034    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60035      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60036      # a path prefixed by /cygdrive for fixpath to work.
60037      new_path="$CYGWIN_ROOT_PATH$input_path"
60038    fi
60039  fi
60040
60041
60042  if test "x$path" != "x$new_path"; then
60043    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60044    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60045$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60046  fi
60047
60048    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60049
60050  path="$POTENTIAL_FREETYPE_LIB_PATH"
60051  has_colon=`$ECHO $path | $GREP ^.:`
60052  new_path="$path"
60053  if test "x$has_colon" = x; then
60054    # Not in mixed or Windows style, start by that.
60055    new_path=`cmd //c echo $path`
60056  fi
60057
60058
60059  input_path="$new_path"
60060  # Check if we need to convert this using DOS-style short mode. If the path
60061  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60062  # take no chances and rewrite it.
60063  # Note: m4 eats our [], so we need to use [ and ] instead.
60064  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60065  if test "x$has_forbidden_chars" != x; then
60066    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60067    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60068  fi
60069
60070
60071  windows_path="$new_path"
60072  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60073    unix_path=`$CYGPATH -u "$windows_path"`
60074    new_path="$unix_path"
60075  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60076    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60077    new_path="$unix_path"
60078  fi
60079
60080  if test "x$path" != "x$new_path"; then
60081    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60082    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60083$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60084  fi
60085
60086  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60087  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60088
60089    else
60090      # We're on a unix platform. Hooray! :)
60091      path="$POTENTIAL_FREETYPE_LIB_PATH"
60092      has_space=`$ECHO "$path" | $GREP " "`
60093      if test "x$has_space" != x; then
60094        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60095$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60096        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60097      fi
60098
60099      # Use eval to expand a potential ~
60100      eval path="$path"
60101      if test ! -f "$path" && test ! -d "$path"; then
60102        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60103      fi
60104
60105      if test -d "$path"; then
60106        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60107      else
60108        dir="`$DIRNAME "$path"`"
60109        base="`$BASENAME "$path"`"
60110        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60111      fi
60112    fi
60113  fi
60114
60115
60116    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60117    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60118$as_echo_n "checking for freetype includes... " >&6; }
60119    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60120$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60121    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60122    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60123$as_echo_n "checking for freetype libraries... " >&6; }
60124    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60125$as_echo "$FREETYPE_LIB_PATH" >&6; }
60126  fi
60127
60128              fi
60129            fi
60130          fi
60131        else
60132          FREETYPE_BASE_DIR="$SYSROOT/usr"
60133
60134  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60135  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60136  METHOD="well-known location"
60137
60138  # Let's start with an optimistic view of the world :-)
60139  FOUND_FREETYPE=yes
60140
60141  # First look for the canonical freetype main include file ft2build.h.
60142  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60143    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60144    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60145    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60146      # Fail.
60147      FOUND_FREETYPE=no
60148    fi
60149  fi
60150
60151  if test "x$FOUND_FREETYPE" = xyes; then
60152    # Include file found, let's continue the sanity check.
60153    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60154$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60155
60156    # Reset to default value
60157    FREETYPE_BASE_NAME=freetype
60158    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60159    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60160      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60161          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60162        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60163        # for the .6 version explicitly.
60164        FREETYPE_BASE_NAME=freetype.6
60165        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60166        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60167$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60168      else
60169        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60170$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60171        FOUND_FREETYPE=no
60172      fi
60173    else
60174      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60175        # On Windows, we will need both .lib and .dll file.
60176        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60177          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60178$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60179          FOUND_FREETYPE=no
60180        fi
60181      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60182          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60183        # Found lib in isa dir, use that instead.
60184        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60185        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60186$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60187      fi
60188    fi
60189  fi
60190
60191  if test "x$FOUND_FREETYPE" = xyes; then
60192
60193  # Only process if variable expands to non-empty
60194
60195  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60196    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60197
60198  # Input might be given as Windows format, start by converting to
60199  # unix format.
60200  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60201  new_path=`$CYGPATH -u "$path"`
60202
60203  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60204  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60205  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60206  # "foo.exe" is OK but "foo" is an error.
60207  #
60208  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60209  # It is also a way to make sure we got the proper file name for the real test later on.
60210  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60211  if test "x$test_shortpath" = x; then
60212    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60213$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60214    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60215  fi
60216
60217  # Call helper function which possibly converts this using DOS-style short mode.
60218  # If so, the updated path is stored in $new_path.
60219
60220  input_path="$new_path"
60221  # Check if we need to convert this using DOS-style short mode. If the path
60222  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60223  # take no chances and rewrite it.
60224  # Note: m4 eats our [], so we need to use [ and ] instead.
60225  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60226  if test "x$has_forbidden_chars" != x; then
60227    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60228    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60229    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60230    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60231      # Going to short mode and back again did indeed matter. Since short mode is
60232      # case insensitive, let's make it lowercase to improve readability.
60233      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60234      # Now convert it back to Unix-style (cygpath)
60235      input_path=`$CYGPATH -u "$shortmode_path"`
60236      new_path="$input_path"
60237    fi
60238  fi
60239
60240  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60241  if test "x$test_cygdrive_prefix" = x; then
60242    # As a simple fix, exclude /usr/bin since it's not a real path.
60243    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60244      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60245      # a path prefixed by /cygdrive for fixpath to work.
60246      new_path="$CYGWIN_ROOT_PATH$input_path"
60247    fi
60248  fi
60249
60250
60251  if test "x$path" != "x$new_path"; then
60252    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60253    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60254$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60255  fi
60256
60257    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60258
60259  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60260  has_colon=`$ECHO $path | $GREP ^.:`
60261  new_path="$path"
60262  if test "x$has_colon" = x; then
60263    # Not in mixed or Windows style, start by that.
60264    new_path=`cmd //c echo $path`
60265  fi
60266
60267
60268  input_path="$new_path"
60269  # Check if we need to convert this using DOS-style short mode. If the path
60270  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60271  # take no chances and rewrite it.
60272  # Note: m4 eats our [], so we need to use [ and ] instead.
60273  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60274  if test "x$has_forbidden_chars" != x; then
60275    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60276    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60277  fi
60278
60279
60280  windows_path="$new_path"
60281  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60282    unix_path=`$CYGPATH -u "$windows_path"`
60283    new_path="$unix_path"
60284  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60285    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60286    new_path="$unix_path"
60287  fi
60288
60289  if test "x$path" != "x$new_path"; then
60290    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60291    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60292$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60293  fi
60294
60295  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60296  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60297
60298    else
60299      # We're on a unix platform. Hooray! :)
60300      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60301      has_space=`$ECHO "$path" | $GREP " "`
60302      if test "x$has_space" != x; then
60303        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60304$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60305        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60306      fi
60307
60308      # Use eval to expand a potential ~
60309      eval path="$path"
60310      if test ! -f "$path" && test ! -d "$path"; then
60311        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60312      fi
60313
60314      if test -d "$path"; then
60315        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60316      else
60317        dir="`$DIRNAME "$path"`"
60318        base="`$BASENAME "$path"`"
60319        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60320      fi
60321    fi
60322  fi
60323
60324
60325  # Only process if variable expands to non-empty
60326
60327  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60328    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60329
60330  # Input might be given as Windows format, start by converting to
60331  # unix format.
60332  path="$POTENTIAL_FREETYPE_LIB_PATH"
60333  new_path=`$CYGPATH -u "$path"`
60334
60335  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60336  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60337  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60338  # "foo.exe" is OK but "foo" is an error.
60339  #
60340  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60341  # It is also a way to make sure we got the proper file name for the real test later on.
60342  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60343  if test "x$test_shortpath" = x; then
60344    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60345$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60346    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60347  fi
60348
60349  # Call helper function which possibly converts this using DOS-style short mode.
60350  # If so, the updated path is stored in $new_path.
60351
60352  input_path="$new_path"
60353  # Check if we need to convert this using DOS-style short mode. If the path
60354  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60355  # take no chances and rewrite it.
60356  # Note: m4 eats our [], so we need to use [ and ] instead.
60357  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60358  if test "x$has_forbidden_chars" != x; then
60359    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60360    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60361    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60362    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60363      # Going to short mode and back again did indeed matter. Since short mode is
60364      # case insensitive, let's make it lowercase to improve readability.
60365      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60366      # Now convert it back to Unix-style (cygpath)
60367      input_path=`$CYGPATH -u "$shortmode_path"`
60368      new_path="$input_path"
60369    fi
60370  fi
60371
60372  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60373  if test "x$test_cygdrive_prefix" = x; then
60374    # As a simple fix, exclude /usr/bin since it's not a real path.
60375    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60376      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60377      # a path prefixed by /cygdrive for fixpath to work.
60378      new_path="$CYGWIN_ROOT_PATH$input_path"
60379    fi
60380  fi
60381
60382
60383  if test "x$path" != "x$new_path"; then
60384    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60385    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60386$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60387  fi
60388
60389    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60390
60391  path="$POTENTIAL_FREETYPE_LIB_PATH"
60392  has_colon=`$ECHO $path | $GREP ^.:`
60393  new_path="$path"
60394  if test "x$has_colon" = x; then
60395    # Not in mixed or Windows style, start by that.
60396    new_path=`cmd //c echo $path`
60397  fi
60398
60399
60400  input_path="$new_path"
60401  # Check if we need to convert this using DOS-style short mode. If the path
60402  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60403  # take no chances and rewrite it.
60404  # Note: m4 eats our [], so we need to use [ and ] instead.
60405  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60406  if test "x$has_forbidden_chars" != x; then
60407    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60408    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60409  fi
60410
60411
60412  windows_path="$new_path"
60413  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60414    unix_path=`$CYGPATH -u "$windows_path"`
60415    new_path="$unix_path"
60416  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60417    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60418    new_path="$unix_path"
60419  fi
60420
60421  if test "x$path" != "x$new_path"; then
60422    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60423    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60424$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60425  fi
60426
60427  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60428  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60429
60430    else
60431      # We're on a unix platform. Hooray! :)
60432      path="$POTENTIAL_FREETYPE_LIB_PATH"
60433      has_space=`$ECHO "$path" | $GREP " "`
60434      if test "x$has_space" != x; then
60435        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60436$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60437        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60438      fi
60439
60440      # Use eval to expand a potential ~
60441      eval path="$path"
60442      if test ! -f "$path" && test ! -d "$path"; then
60443        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60444      fi
60445
60446      if test -d "$path"; then
60447        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60448      else
60449        dir="`$DIRNAME "$path"`"
60450        base="`$BASENAME "$path"`"
60451        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60452      fi
60453    fi
60454  fi
60455
60456
60457    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60458    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60459$as_echo_n "checking for freetype includes... " >&6; }
60460    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60461$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60462    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60463    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60464$as_echo_n "checking for freetype libraries... " >&6; }
60465    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60466$as_echo "$FREETYPE_LIB_PATH" >&6; }
60467  fi
60468
60469
60470          if test "x$FOUND_FREETYPE" != xyes; then
60471            FREETYPE_BASE_DIR="$SYSROOT/usr/X11"
60472
60473  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60474  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60475  METHOD="well-known location"
60476
60477  # Let's start with an optimistic view of the world :-)
60478  FOUND_FREETYPE=yes
60479
60480  # First look for the canonical freetype main include file ft2build.h.
60481  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60482    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60483    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60484    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60485      # Fail.
60486      FOUND_FREETYPE=no
60487    fi
60488  fi
60489
60490  if test "x$FOUND_FREETYPE" = xyes; then
60491    # Include file found, let's continue the sanity check.
60492    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60493$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60494
60495    # Reset to default value
60496    FREETYPE_BASE_NAME=freetype
60497    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60498    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60499      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60500          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60501        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60502        # for the .6 version explicitly.
60503        FREETYPE_BASE_NAME=freetype.6
60504        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60505        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60506$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60507      else
60508        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60509$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60510        FOUND_FREETYPE=no
60511      fi
60512    else
60513      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60514        # On Windows, we will need both .lib and .dll file.
60515        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60516          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60517$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60518          FOUND_FREETYPE=no
60519        fi
60520      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60521          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60522        # Found lib in isa dir, use that instead.
60523        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60524        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60525$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60526      fi
60527    fi
60528  fi
60529
60530  if test "x$FOUND_FREETYPE" = xyes; then
60531
60532  # Only process if variable expands to non-empty
60533
60534  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60535    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60536
60537  # Input might be given as Windows format, start by converting to
60538  # unix format.
60539  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60540  new_path=`$CYGPATH -u "$path"`
60541
60542  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60543  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60544  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60545  # "foo.exe" is OK but "foo" is an error.
60546  #
60547  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60548  # It is also a way to make sure we got the proper file name for the real test later on.
60549  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60550  if test "x$test_shortpath" = x; then
60551    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60552$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60553    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60554  fi
60555
60556  # Call helper function which possibly converts this using DOS-style short mode.
60557  # If so, the updated path is stored in $new_path.
60558
60559  input_path="$new_path"
60560  # Check if we need to convert this using DOS-style short mode. If the path
60561  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60562  # take no chances and rewrite it.
60563  # Note: m4 eats our [], so we need to use [ and ] instead.
60564  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60565  if test "x$has_forbidden_chars" != x; then
60566    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60567    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60568    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60569    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60570      # Going to short mode and back again did indeed matter. Since short mode is
60571      # case insensitive, let's make it lowercase to improve readability.
60572      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60573      # Now convert it back to Unix-style (cygpath)
60574      input_path=`$CYGPATH -u "$shortmode_path"`
60575      new_path="$input_path"
60576    fi
60577  fi
60578
60579  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60580  if test "x$test_cygdrive_prefix" = x; then
60581    # As a simple fix, exclude /usr/bin since it's not a real path.
60582    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60583      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60584      # a path prefixed by /cygdrive for fixpath to work.
60585      new_path="$CYGWIN_ROOT_PATH$input_path"
60586    fi
60587  fi
60588
60589
60590  if test "x$path" != "x$new_path"; then
60591    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60592    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60593$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60594  fi
60595
60596    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60597
60598  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60599  has_colon=`$ECHO $path | $GREP ^.:`
60600  new_path="$path"
60601  if test "x$has_colon" = x; then
60602    # Not in mixed or Windows style, start by that.
60603    new_path=`cmd //c echo $path`
60604  fi
60605
60606
60607  input_path="$new_path"
60608  # Check if we need to convert this using DOS-style short mode. If the path
60609  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60610  # take no chances and rewrite it.
60611  # Note: m4 eats our [], so we need to use [ and ] instead.
60612  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60613  if test "x$has_forbidden_chars" != x; then
60614    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60615    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60616  fi
60617
60618
60619  windows_path="$new_path"
60620  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60621    unix_path=`$CYGPATH -u "$windows_path"`
60622    new_path="$unix_path"
60623  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60624    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60625    new_path="$unix_path"
60626  fi
60627
60628  if test "x$path" != "x$new_path"; then
60629    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60630    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60631$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60632  fi
60633
60634  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60635  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60636
60637    else
60638      # We're on a unix platform. Hooray! :)
60639      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60640      has_space=`$ECHO "$path" | $GREP " "`
60641      if test "x$has_space" != x; then
60642        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60643$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60644        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60645      fi
60646
60647      # Use eval to expand a potential ~
60648      eval path="$path"
60649      if test ! -f "$path" && test ! -d "$path"; then
60650        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60651      fi
60652
60653      if test -d "$path"; then
60654        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60655      else
60656        dir="`$DIRNAME "$path"`"
60657        base="`$BASENAME "$path"`"
60658        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60659      fi
60660    fi
60661  fi
60662
60663
60664  # Only process if variable expands to non-empty
60665
60666  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
60667    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60668
60669  # Input might be given as Windows format, start by converting to
60670  # unix format.
60671  path="$POTENTIAL_FREETYPE_LIB_PATH"
60672  new_path=`$CYGPATH -u "$path"`
60673
60674  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60675  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60676  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60677  # "foo.exe" is OK but "foo" is an error.
60678  #
60679  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60680  # It is also a way to make sure we got the proper file name for the real test later on.
60681  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60682  if test "x$test_shortpath" = x; then
60683    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60684$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60685    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
60686  fi
60687
60688  # Call helper function which possibly converts this using DOS-style short mode.
60689  # If so, the updated path is stored in $new_path.
60690
60691  input_path="$new_path"
60692  # Check if we need to convert this using DOS-style short mode. If the path
60693  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60694  # take no chances and rewrite it.
60695  # Note: m4 eats our [], so we need to use [ and ] instead.
60696  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60697  if test "x$has_forbidden_chars" != x; then
60698    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60699    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60700    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60701    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60702      # Going to short mode and back again did indeed matter. Since short mode is
60703      # case insensitive, let's make it lowercase to improve readability.
60704      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60705      # Now convert it back to Unix-style (cygpath)
60706      input_path=`$CYGPATH -u "$shortmode_path"`
60707      new_path="$input_path"
60708    fi
60709  fi
60710
60711  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60712  if test "x$test_cygdrive_prefix" = x; then
60713    # As a simple fix, exclude /usr/bin since it's not a real path.
60714    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60715      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60716      # a path prefixed by /cygdrive for fixpath to work.
60717      new_path="$CYGWIN_ROOT_PATH$input_path"
60718    fi
60719  fi
60720
60721
60722  if test "x$path" != "x$new_path"; then
60723    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60724    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60725$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60726  fi
60727
60728    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60729
60730  path="$POTENTIAL_FREETYPE_LIB_PATH"
60731  has_colon=`$ECHO $path | $GREP ^.:`
60732  new_path="$path"
60733  if test "x$has_colon" = x; then
60734    # Not in mixed or Windows style, start by that.
60735    new_path=`cmd //c echo $path`
60736  fi
60737
60738
60739  input_path="$new_path"
60740  # Check if we need to convert this using DOS-style short mode. If the path
60741  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60742  # take no chances and rewrite it.
60743  # Note: m4 eats our [], so we need to use [ and ] instead.
60744  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60745  if test "x$has_forbidden_chars" != x; then
60746    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60747    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60748  fi
60749
60750
60751  windows_path="$new_path"
60752  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60753    unix_path=`$CYGPATH -u "$windows_path"`
60754    new_path="$unix_path"
60755  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60756    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60757    new_path="$unix_path"
60758  fi
60759
60760  if test "x$path" != "x$new_path"; then
60761    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
60762    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
60763$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
60764  fi
60765
60766  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60767  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60768
60769    else
60770      # We're on a unix platform. Hooray! :)
60771      path="$POTENTIAL_FREETYPE_LIB_PATH"
60772      has_space=`$ECHO "$path" | $GREP " "`
60773      if test "x$has_space" != x; then
60774        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
60775$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
60776        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60777      fi
60778
60779      # Use eval to expand a potential ~
60780      eval path="$path"
60781      if test ! -f "$path" && test ! -d "$path"; then
60782        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60783      fi
60784
60785      if test -d "$path"; then
60786        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
60787      else
60788        dir="`$DIRNAME "$path"`"
60789        base="`$BASENAME "$path"`"
60790        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
60791      fi
60792    fi
60793  fi
60794
60795
60796    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60797    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
60798$as_echo_n "checking for freetype includes... " >&6; }
60799    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
60800$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
60801    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
60802    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
60803$as_echo_n "checking for freetype libraries... " >&6; }
60804    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
60805$as_echo "$FREETYPE_LIB_PATH" >&6; }
60806  fi
60807
60808          fi
60809
60810          if test "x$OPENJDK_TARGET_OS" = xmacosx; then
60811            if test "x$FOUND_FREETYPE" != xyes; then
60812              # Due to changes in OSX 10.11 XQuartz now installs to /opt/X11
60813              FREETYPE_BASE_DIR="$SYSROOT/opt/X11"
60814
60815  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
60816  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
60817  METHOD="well-known location"
60818
60819  # Let's start with an optimistic view of the world :-)
60820  FOUND_FREETYPE=yes
60821
60822  # First look for the canonical freetype main include file ft2build.h.
60823  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60824    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
60825    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
60826    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
60827      # Fail.
60828      FOUND_FREETYPE=no
60829    fi
60830  fi
60831
60832  if test "x$FOUND_FREETYPE" = xyes; then
60833    # Include file found, let's continue the sanity check.
60834    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
60835$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
60836
60837    # Reset to default value
60838    FREETYPE_BASE_NAME=freetype
60839    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60840    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
60841      if test "x$OPENJDK_TARGET_OS" = xmacosx \
60842          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
60843        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
60844        # for the .6 version explicitly.
60845        FREETYPE_BASE_NAME=freetype.6
60846        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
60847        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
60848$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
60849      else
60850        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
60851$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
60852        FOUND_FREETYPE=no
60853      fi
60854    else
60855      if test "x$OPENJDK_TARGET_OS" = xwindows; then
60856        # On Windows, we will need both .lib and .dll file.
60857        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
60858          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
60859$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
60860          FOUND_FREETYPE=no
60861        fi
60862      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
60863          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
60864        # Found lib in isa dir, use that instead.
60865        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
60866        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
60867$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
60868      fi
60869    fi
60870  fi
60871
60872  if test "x$FOUND_FREETYPE" = xyes; then
60873
60874  # Only process if variable expands to non-empty
60875
60876  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
60877    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60878
60879  # Input might be given as Windows format, start by converting to
60880  # unix format.
60881  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60882  new_path=`$CYGPATH -u "$path"`
60883
60884  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
60885  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
60886  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
60887  # "foo.exe" is OK but "foo" is an error.
60888  #
60889  # This test is therefore slightly more accurate than "test -f" to check for file precense.
60890  # It is also a way to make sure we got the proper file name for the real test later on.
60891  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
60892  if test "x$test_shortpath" = x; then
60893    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60894$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60895    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
60896  fi
60897
60898  # Call helper function which possibly converts this using DOS-style short mode.
60899  # If so, the updated path is stored in $new_path.
60900
60901  input_path="$new_path"
60902  # Check if we need to convert this using DOS-style short mode. If the path
60903  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60904  # take no chances and rewrite it.
60905  # Note: m4 eats our [], so we need to use [ and ] instead.
60906  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
60907  if test "x$has_forbidden_chars" != x; then
60908    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60909    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
60910    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
60911    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
60912      # Going to short mode and back again did indeed matter. Since short mode is
60913      # case insensitive, let's make it lowercase to improve readability.
60914      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60915      # Now convert it back to Unix-style (cygpath)
60916      input_path=`$CYGPATH -u "$shortmode_path"`
60917      new_path="$input_path"
60918    fi
60919  fi
60920
60921  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
60922  if test "x$test_cygdrive_prefix" = x; then
60923    # As a simple fix, exclude /usr/bin since it's not a real path.
60924    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
60925      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
60926      # a path prefixed by /cygdrive for fixpath to work.
60927      new_path="$CYGWIN_ROOT_PATH$input_path"
60928    fi
60929  fi
60930
60931
60932  if test "x$path" != "x$new_path"; then
60933    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60934    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60935$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60936  fi
60937
60938    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60939
60940  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60941  has_colon=`$ECHO $path | $GREP ^.:`
60942  new_path="$path"
60943  if test "x$has_colon" = x; then
60944    # Not in mixed or Windows style, start by that.
60945    new_path=`cmd //c echo $path`
60946  fi
60947
60948
60949  input_path="$new_path"
60950  # Check if we need to convert this using DOS-style short mode. If the path
60951  # contains just simple characters, use it. Otherwise (spaces, weird characters),
60952  # take no chances and rewrite it.
60953  # Note: m4 eats our [], so we need to use [ and ] instead.
60954  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
60955  if test "x$has_forbidden_chars" != x; then
60956    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
60957    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
60958  fi
60959
60960
60961  windows_path="$new_path"
60962  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
60963    unix_path=`$CYGPATH -u "$windows_path"`
60964    new_path="$unix_path"
60965  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
60966    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
60967    new_path="$unix_path"
60968  fi
60969
60970  if test "x$path" != "x$new_path"; then
60971    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
60972    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
60973$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
60974  fi
60975
60976  # Save the first 10 bytes of this path to the storage, so fixpath can work.
60977  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
60978
60979    else
60980      # We're on a unix platform. Hooray! :)
60981      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
60982      has_space=`$ECHO "$path" | $GREP " "`
60983      if test "x$has_space" != x; then
60984        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
60985$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
60986        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
60987      fi
60988
60989      # Use eval to expand a potential ~
60990      eval path="$path"
60991      if test ! -f "$path" && test ! -d "$path"; then
60992        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
60993      fi
60994
60995      if test -d "$path"; then
60996        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
60997      else
60998        dir="`$DIRNAME "$path"`"
60999        base="`$BASENAME "$path"`"
61000        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61001      fi
61002    fi
61003  fi
61004
61005
61006  # Only process if variable expands to non-empty
61007
61008  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61009    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61010
61011  # Input might be given as Windows format, start by converting to
61012  # unix format.
61013  path="$POTENTIAL_FREETYPE_LIB_PATH"
61014  new_path=`$CYGPATH -u "$path"`
61015
61016  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61017  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61018  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61019  # "foo.exe" is OK but "foo" is an error.
61020  #
61021  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61022  # It is also a way to make sure we got the proper file name for the real test later on.
61023  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61024  if test "x$test_shortpath" = x; then
61025    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61026$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61027    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61028  fi
61029
61030  # Call helper function which possibly converts this using DOS-style short mode.
61031  # If so, the updated path is stored in $new_path.
61032
61033  input_path="$new_path"
61034  # Check if we need to convert this using DOS-style short mode. If the path
61035  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61036  # take no chances and rewrite it.
61037  # Note: m4 eats our [], so we need to use [ and ] instead.
61038  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61039  if test "x$has_forbidden_chars" != x; then
61040    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61041    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61042    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61043    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61044      # Going to short mode and back again did indeed matter. Since short mode is
61045      # case insensitive, let's make it lowercase to improve readability.
61046      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61047      # Now convert it back to Unix-style (cygpath)
61048      input_path=`$CYGPATH -u "$shortmode_path"`
61049      new_path="$input_path"
61050    fi
61051  fi
61052
61053  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61054  if test "x$test_cygdrive_prefix" = x; then
61055    # As a simple fix, exclude /usr/bin since it's not a real path.
61056    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61057      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61058      # a path prefixed by /cygdrive for fixpath to work.
61059      new_path="$CYGWIN_ROOT_PATH$input_path"
61060    fi
61061  fi
61062
61063
61064  if test "x$path" != "x$new_path"; then
61065    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61066    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61067$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61068  fi
61069
61070    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61071
61072  path="$POTENTIAL_FREETYPE_LIB_PATH"
61073  has_colon=`$ECHO $path | $GREP ^.:`
61074  new_path="$path"
61075  if test "x$has_colon" = x; then
61076    # Not in mixed or Windows style, start by that.
61077    new_path=`cmd //c echo $path`
61078  fi
61079
61080
61081  input_path="$new_path"
61082  # Check if we need to convert this using DOS-style short mode. If the path
61083  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61084  # take no chances and rewrite it.
61085  # Note: m4 eats our [], so we need to use [ and ] instead.
61086  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61087  if test "x$has_forbidden_chars" != x; then
61088    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61089    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61090  fi
61091
61092
61093  windows_path="$new_path"
61094  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61095    unix_path=`$CYGPATH -u "$windows_path"`
61096    new_path="$unix_path"
61097  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61098    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61099    new_path="$unix_path"
61100  fi
61101
61102  if test "x$path" != "x$new_path"; then
61103    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61104    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61105$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61106  fi
61107
61108  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61109  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61110
61111    else
61112      # We're on a unix platform. Hooray! :)
61113      path="$POTENTIAL_FREETYPE_LIB_PATH"
61114      has_space=`$ECHO "$path" | $GREP " "`
61115      if test "x$has_space" != x; then
61116        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61117$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61118        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61119      fi
61120
61121      # Use eval to expand a potential ~
61122      eval path="$path"
61123      if test ! -f "$path" && test ! -d "$path"; then
61124        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61125      fi
61126
61127      if test -d "$path"; then
61128        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61129      else
61130        dir="`$DIRNAME "$path"`"
61131        base="`$BASENAME "$path"`"
61132        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61133      fi
61134    fi
61135  fi
61136
61137
61138    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61139    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61140$as_echo_n "checking for freetype includes... " >&6; }
61141    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61142$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61143    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61144    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61145$as_echo_n "checking for freetype libraries... " >&6; }
61146    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61147$as_echo "$FREETYPE_LIB_PATH" >&6; }
61148  fi
61149
61150            fi
61151          fi
61152
61153          if test "x$FOUND_FREETYPE" != xyes; then
61154            FREETYPE_BASE_DIR="$SYSROOT/usr/sfw"
61155
61156  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61157  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib"
61158  METHOD="well-known location"
61159
61160  # Let's start with an optimistic view of the world :-)
61161  FOUND_FREETYPE=yes
61162
61163  # First look for the canonical freetype main include file ft2build.h.
61164  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61165    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61166    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61167    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61168      # Fail.
61169      FOUND_FREETYPE=no
61170    fi
61171  fi
61172
61173  if test "x$FOUND_FREETYPE" = xyes; then
61174    # Include file found, let's continue the sanity check.
61175    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61176$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61177
61178    # Reset to default value
61179    FREETYPE_BASE_NAME=freetype
61180    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61181    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61182      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61183          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61184        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61185        # for the .6 version explicitly.
61186        FREETYPE_BASE_NAME=freetype.6
61187        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61188        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61189$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61190      else
61191        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61192$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61193        FOUND_FREETYPE=no
61194      fi
61195    else
61196      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61197        # On Windows, we will need both .lib and .dll file.
61198        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61199          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61200$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61201          FOUND_FREETYPE=no
61202        fi
61203      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61204          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61205        # Found lib in isa dir, use that instead.
61206        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61207        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61208$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61209      fi
61210    fi
61211  fi
61212
61213  if test "x$FOUND_FREETYPE" = xyes; then
61214
61215  # Only process if variable expands to non-empty
61216
61217  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61218    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61219
61220  # Input might be given as Windows format, start by converting to
61221  # unix format.
61222  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61223  new_path=`$CYGPATH -u "$path"`
61224
61225  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61226  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61227  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61228  # "foo.exe" is OK but "foo" is an error.
61229  #
61230  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61231  # It is also a way to make sure we got the proper file name for the real test later on.
61232  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61233  if test "x$test_shortpath" = x; then
61234    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61235$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61236    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61237  fi
61238
61239  # Call helper function which possibly converts this using DOS-style short mode.
61240  # If so, the updated path is stored in $new_path.
61241
61242  input_path="$new_path"
61243  # Check if we need to convert this using DOS-style short mode. If the path
61244  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61245  # take no chances and rewrite it.
61246  # Note: m4 eats our [], so we need to use [ and ] instead.
61247  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61248  if test "x$has_forbidden_chars" != x; then
61249    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61250    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61251    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61252    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61253      # Going to short mode and back again did indeed matter. Since short mode is
61254      # case insensitive, let's make it lowercase to improve readability.
61255      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61256      # Now convert it back to Unix-style (cygpath)
61257      input_path=`$CYGPATH -u "$shortmode_path"`
61258      new_path="$input_path"
61259    fi
61260  fi
61261
61262  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61263  if test "x$test_cygdrive_prefix" = x; then
61264    # As a simple fix, exclude /usr/bin since it's not a real path.
61265    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61266      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61267      # a path prefixed by /cygdrive for fixpath to work.
61268      new_path="$CYGWIN_ROOT_PATH$input_path"
61269    fi
61270  fi
61271
61272
61273  if test "x$path" != "x$new_path"; then
61274    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61275    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61276$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61277  fi
61278
61279    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61280
61281  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61282  has_colon=`$ECHO $path | $GREP ^.:`
61283  new_path="$path"
61284  if test "x$has_colon" = x; then
61285    # Not in mixed or Windows style, start by that.
61286    new_path=`cmd //c echo $path`
61287  fi
61288
61289
61290  input_path="$new_path"
61291  # Check if we need to convert this using DOS-style short mode. If the path
61292  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61293  # take no chances and rewrite it.
61294  # Note: m4 eats our [], so we need to use [ and ] instead.
61295  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61296  if test "x$has_forbidden_chars" != x; then
61297    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61298    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61299  fi
61300
61301
61302  windows_path="$new_path"
61303  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61304    unix_path=`$CYGPATH -u "$windows_path"`
61305    new_path="$unix_path"
61306  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61307    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61308    new_path="$unix_path"
61309  fi
61310
61311  if test "x$path" != "x$new_path"; then
61312    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61313    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61314$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61315  fi
61316
61317  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61318  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61319
61320    else
61321      # We're on a unix platform. Hooray! :)
61322      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61323      has_space=`$ECHO "$path" | $GREP " "`
61324      if test "x$has_space" != x; then
61325        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61326$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61327        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61328      fi
61329
61330      # Use eval to expand a potential ~
61331      eval path="$path"
61332      if test ! -f "$path" && test ! -d "$path"; then
61333        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61334      fi
61335
61336      if test -d "$path"; then
61337        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61338      else
61339        dir="`$DIRNAME "$path"`"
61340        base="`$BASENAME "$path"`"
61341        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61342      fi
61343    fi
61344  fi
61345
61346
61347  # Only process if variable expands to non-empty
61348
61349  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61350    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61351
61352  # Input might be given as Windows format, start by converting to
61353  # unix format.
61354  path="$POTENTIAL_FREETYPE_LIB_PATH"
61355  new_path=`$CYGPATH -u "$path"`
61356
61357  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61358  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61359  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61360  # "foo.exe" is OK but "foo" is an error.
61361  #
61362  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61363  # It is also a way to make sure we got the proper file name for the real test later on.
61364  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61365  if test "x$test_shortpath" = x; then
61366    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61367$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61368    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61369  fi
61370
61371  # Call helper function which possibly converts this using DOS-style short mode.
61372  # If so, the updated path is stored in $new_path.
61373
61374  input_path="$new_path"
61375  # Check if we need to convert this using DOS-style short mode. If the path
61376  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61377  # take no chances and rewrite it.
61378  # Note: m4 eats our [], so we need to use [ and ] instead.
61379  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61380  if test "x$has_forbidden_chars" != x; then
61381    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61382    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61383    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61384    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61385      # Going to short mode and back again did indeed matter. Since short mode is
61386      # case insensitive, let's make it lowercase to improve readability.
61387      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61388      # Now convert it back to Unix-style (cygpath)
61389      input_path=`$CYGPATH -u "$shortmode_path"`
61390      new_path="$input_path"
61391    fi
61392  fi
61393
61394  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61395  if test "x$test_cygdrive_prefix" = x; then
61396    # As a simple fix, exclude /usr/bin since it's not a real path.
61397    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61398      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61399      # a path prefixed by /cygdrive for fixpath to work.
61400      new_path="$CYGWIN_ROOT_PATH$input_path"
61401    fi
61402  fi
61403
61404
61405  if test "x$path" != "x$new_path"; then
61406    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61407    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61408$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61409  fi
61410
61411    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61412
61413  path="$POTENTIAL_FREETYPE_LIB_PATH"
61414  has_colon=`$ECHO $path | $GREP ^.:`
61415  new_path="$path"
61416  if test "x$has_colon" = x; then
61417    # Not in mixed or Windows style, start by that.
61418    new_path=`cmd //c echo $path`
61419  fi
61420
61421
61422  input_path="$new_path"
61423  # Check if we need to convert this using DOS-style short mode. If the path
61424  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61425  # take no chances and rewrite it.
61426  # Note: m4 eats our [], so we need to use [ and ] instead.
61427  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61428  if test "x$has_forbidden_chars" != x; then
61429    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61430    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61431  fi
61432
61433
61434  windows_path="$new_path"
61435  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61436    unix_path=`$CYGPATH -u "$windows_path"`
61437    new_path="$unix_path"
61438  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61439    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61440    new_path="$unix_path"
61441  fi
61442
61443  if test "x$path" != "x$new_path"; then
61444    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61445    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61446$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61447  fi
61448
61449  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61450  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61451
61452    else
61453      # We're on a unix platform. Hooray! :)
61454      path="$POTENTIAL_FREETYPE_LIB_PATH"
61455      has_space=`$ECHO "$path" | $GREP " "`
61456      if test "x$has_space" != x; then
61457        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61458$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61459        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61460      fi
61461
61462      # Use eval to expand a potential ~
61463      eval path="$path"
61464      if test ! -f "$path" && test ! -d "$path"; then
61465        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61466      fi
61467
61468      if test -d "$path"; then
61469        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61470      else
61471        dir="`$DIRNAME "$path"`"
61472        base="`$BASENAME "$path"`"
61473        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61474      fi
61475    fi
61476  fi
61477
61478
61479    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61480    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61481$as_echo_n "checking for freetype includes... " >&6; }
61482    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61483$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61484    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61485    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61486$as_echo_n "checking for freetype libraries... " >&6; }
61487    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61488$as_echo "$FREETYPE_LIB_PATH" >&6; }
61489  fi
61490
61491          fi
61492
61493          if test "x$FOUND_FREETYPE" != xyes; then
61494            FREETYPE_BASE_DIR="$SYSROOT/usr"
61495            if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
61496
61497  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61498  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/x86_64-linux-gnu"
61499  METHOD="well-known location"
61500
61501  # Let's start with an optimistic view of the world :-)
61502  FOUND_FREETYPE=yes
61503
61504  # First look for the canonical freetype main include file ft2build.h.
61505  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61506    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61507    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61508    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61509      # Fail.
61510      FOUND_FREETYPE=no
61511    fi
61512  fi
61513
61514  if test "x$FOUND_FREETYPE" = xyes; then
61515    # Include file found, let's continue the sanity check.
61516    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61517$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61518
61519    # Reset to default value
61520    FREETYPE_BASE_NAME=freetype
61521    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61522    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61523      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61524          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61525        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61526        # for the .6 version explicitly.
61527        FREETYPE_BASE_NAME=freetype.6
61528        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61529        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61530$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61531      else
61532        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61533$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61534        FOUND_FREETYPE=no
61535      fi
61536    else
61537      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61538        # On Windows, we will need both .lib and .dll file.
61539        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61540          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61541$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61542          FOUND_FREETYPE=no
61543        fi
61544      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61545          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61546        # Found lib in isa dir, use that instead.
61547        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61548        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61549$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61550      fi
61551    fi
61552  fi
61553
61554  if test "x$FOUND_FREETYPE" = xyes; then
61555
61556  # Only process if variable expands to non-empty
61557
61558  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61559    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61560
61561  # Input might be given as Windows format, start by converting to
61562  # unix format.
61563  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61564  new_path=`$CYGPATH -u "$path"`
61565
61566  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61567  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61568  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61569  # "foo.exe" is OK but "foo" is an error.
61570  #
61571  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61572  # It is also a way to make sure we got the proper file name for the real test later on.
61573  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61574  if test "x$test_shortpath" = x; then
61575    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61576$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61577    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61578  fi
61579
61580  # Call helper function which possibly converts this using DOS-style short mode.
61581  # If so, the updated path is stored in $new_path.
61582
61583  input_path="$new_path"
61584  # Check if we need to convert this using DOS-style short mode. If the path
61585  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61586  # take no chances and rewrite it.
61587  # Note: m4 eats our [], so we need to use [ and ] instead.
61588  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61589  if test "x$has_forbidden_chars" != x; then
61590    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61591    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61592    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61593    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61594      # Going to short mode and back again did indeed matter. Since short mode is
61595      # case insensitive, let's make it lowercase to improve readability.
61596      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61597      # Now convert it back to Unix-style (cygpath)
61598      input_path=`$CYGPATH -u "$shortmode_path"`
61599      new_path="$input_path"
61600    fi
61601  fi
61602
61603  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61604  if test "x$test_cygdrive_prefix" = x; then
61605    # As a simple fix, exclude /usr/bin since it's not a real path.
61606    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61607      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61608      # a path prefixed by /cygdrive for fixpath to work.
61609      new_path="$CYGWIN_ROOT_PATH$input_path"
61610    fi
61611  fi
61612
61613
61614  if test "x$path" != "x$new_path"; then
61615    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61616    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61617$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61618  fi
61619
61620    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61621
61622  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61623  has_colon=`$ECHO $path | $GREP ^.:`
61624  new_path="$path"
61625  if test "x$has_colon" = x; then
61626    # Not in mixed or Windows style, start by that.
61627    new_path=`cmd //c echo $path`
61628  fi
61629
61630
61631  input_path="$new_path"
61632  # Check if we need to convert this using DOS-style short mode. If the path
61633  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61634  # take no chances and rewrite it.
61635  # Note: m4 eats our [], so we need to use [ and ] instead.
61636  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61637  if test "x$has_forbidden_chars" != x; then
61638    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61639    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61640  fi
61641
61642
61643  windows_path="$new_path"
61644  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61645    unix_path=`$CYGPATH -u "$windows_path"`
61646    new_path="$unix_path"
61647  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61648    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61649    new_path="$unix_path"
61650  fi
61651
61652  if test "x$path" != "x$new_path"; then
61653    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61654    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61655$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61656  fi
61657
61658  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61659  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61660
61661    else
61662      # We're on a unix platform. Hooray! :)
61663      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61664      has_space=`$ECHO "$path" | $GREP " "`
61665      if test "x$has_space" != x; then
61666        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61667$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61668        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61669      fi
61670
61671      # Use eval to expand a potential ~
61672      eval path="$path"
61673      if test ! -f "$path" && test ! -d "$path"; then
61674        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61675      fi
61676
61677      if test -d "$path"; then
61678        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
61679      else
61680        dir="`$DIRNAME "$path"`"
61681        base="`$BASENAME "$path"`"
61682        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61683      fi
61684    fi
61685  fi
61686
61687
61688  # Only process if variable expands to non-empty
61689
61690  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
61691    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61692
61693  # Input might be given as Windows format, start by converting to
61694  # unix format.
61695  path="$POTENTIAL_FREETYPE_LIB_PATH"
61696  new_path=`$CYGPATH -u "$path"`
61697
61698  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61699  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61700  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61701  # "foo.exe" is OK but "foo" is an error.
61702  #
61703  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61704  # It is also a way to make sure we got the proper file name for the real test later on.
61705  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61706  if test "x$test_shortpath" = x; then
61707    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61708$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61709    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
61710  fi
61711
61712  # Call helper function which possibly converts this using DOS-style short mode.
61713  # If so, the updated path is stored in $new_path.
61714
61715  input_path="$new_path"
61716  # Check if we need to convert this using DOS-style short mode. If the path
61717  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61718  # take no chances and rewrite it.
61719  # Note: m4 eats our [], so we need to use [ and ] instead.
61720  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61721  if test "x$has_forbidden_chars" != x; then
61722    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61723    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61724    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61725    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61726      # Going to short mode and back again did indeed matter. Since short mode is
61727      # case insensitive, let's make it lowercase to improve readability.
61728      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61729      # Now convert it back to Unix-style (cygpath)
61730      input_path=`$CYGPATH -u "$shortmode_path"`
61731      new_path="$input_path"
61732    fi
61733  fi
61734
61735  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61736  if test "x$test_cygdrive_prefix" = x; then
61737    # As a simple fix, exclude /usr/bin since it's not a real path.
61738    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61739      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61740      # a path prefixed by /cygdrive for fixpath to work.
61741      new_path="$CYGWIN_ROOT_PATH$input_path"
61742    fi
61743  fi
61744
61745
61746  if test "x$path" != "x$new_path"; then
61747    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61748    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61749$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61750  fi
61751
61752    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61753
61754  path="$POTENTIAL_FREETYPE_LIB_PATH"
61755  has_colon=`$ECHO $path | $GREP ^.:`
61756  new_path="$path"
61757  if test "x$has_colon" = x; then
61758    # Not in mixed or Windows style, start by that.
61759    new_path=`cmd //c echo $path`
61760  fi
61761
61762
61763  input_path="$new_path"
61764  # Check if we need to convert this using DOS-style short mode. If the path
61765  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61766  # take no chances and rewrite it.
61767  # Note: m4 eats our [], so we need to use [ and ] instead.
61768  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61769  if test "x$has_forbidden_chars" != x; then
61770    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61771    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61772  fi
61773
61774
61775  windows_path="$new_path"
61776  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61777    unix_path=`$CYGPATH -u "$windows_path"`
61778    new_path="$unix_path"
61779  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61780    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61781    new_path="$unix_path"
61782  fi
61783
61784  if test "x$path" != "x$new_path"; then
61785    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
61786    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
61787$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
61788  fi
61789
61790  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61791  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61792
61793    else
61794      # We're on a unix platform. Hooray! :)
61795      path="$POTENTIAL_FREETYPE_LIB_PATH"
61796      has_space=`$ECHO "$path" | $GREP " "`
61797      if test "x$has_space" != x; then
61798        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
61799$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
61800        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
61801      fi
61802
61803      # Use eval to expand a potential ~
61804      eval path="$path"
61805      if test ! -f "$path" && test ! -d "$path"; then
61806        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
61807      fi
61808
61809      if test -d "$path"; then
61810        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
61811      else
61812        dir="`$DIRNAME "$path"`"
61813        base="`$BASENAME "$path"`"
61814        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
61815      fi
61816    fi
61817  fi
61818
61819
61820    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61821    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
61822$as_echo_n "checking for freetype includes... " >&6; }
61823    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
61824$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
61825    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
61826    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
61827$as_echo_n "checking for freetype libraries... " >&6; }
61828    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
61829$as_echo "$FREETYPE_LIB_PATH" >&6; }
61830  fi
61831
61832            else
61833
61834  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
61835  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib/i386-linux-gnu"
61836  METHOD="well-known location"
61837
61838  # Let's start with an optimistic view of the world :-)
61839  FOUND_FREETYPE=yes
61840
61841  # First look for the canonical freetype main include file ft2build.h.
61842  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61843    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
61844    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
61845    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
61846      # Fail.
61847      FOUND_FREETYPE=no
61848    fi
61849  fi
61850
61851  if test "x$FOUND_FREETYPE" = xyes; then
61852    # Include file found, let's continue the sanity check.
61853    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
61854$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
61855
61856    # Reset to default value
61857    FREETYPE_BASE_NAME=freetype
61858    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61859    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
61860      if test "x$OPENJDK_TARGET_OS" = xmacosx \
61861          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
61862        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
61863        # for the .6 version explicitly.
61864        FREETYPE_BASE_NAME=freetype.6
61865        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
61866        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
61867$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
61868      else
61869        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
61870$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
61871        FOUND_FREETYPE=no
61872      fi
61873    else
61874      if test "x$OPENJDK_TARGET_OS" = xwindows; then
61875        # On Windows, we will need both .lib and .dll file.
61876        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
61877          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
61878$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
61879          FOUND_FREETYPE=no
61880        fi
61881      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
61882          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
61883        # Found lib in isa dir, use that instead.
61884        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
61885        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
61886$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
61887      fi
61888    fi
61889  fi
61890
61891  if test "x$FOUND_FREETYPE" = xyes; then
61892
61893  # Only process if variable expands to non-empty
61894
61895  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
61896    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61897
61898  # Input might be given as Windows format, start by converting to
61899  # unix format.
61900  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61901  new_path=`$CYGPATH -u "$path"`
61902
61903  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
61904  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
61905  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
61906  # "foo.exe" is OK but "foo" is an error.
61907  #
61908  # This test is therefore slightly more accurate than "test -f" to check for file precense.
61909  # It is also a way to make sure we got the proper file name for the real test later on.
61910  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
61911  if test "x$test_shortpath" = x; then
61912    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
61913$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
61914    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
61915  fi
61916
61917  # Call helper function which possibly converts this using DOS-style short mode.
61918  # If so, the updated path is stored in $new_path.
61919
61920  input_path="$new_path"
61921  # Check if we need to convert this using DOS-style short mode. If the path
61922  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61923  # take no chances and rewrite it.
61924  # Note: m4 eats our [], so we need to use [ and ] instead.
61925  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
61926  if test "x$has_forbidden_chars" != x; then
61927    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61928    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
61929    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
61930    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
61931      # Going to short mode and back again did indeed matter. Since short mode is
61932      # case insensitive, let's make it lowercase to improve readability.
61933      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61934      # Now convert it back to Unix-style (cygpath)
61935      input_path=`$CYGPATH -u "$shortmode_path"`
61936      new_path="$input_path"
61937    fi
61938  fi
61939
61940  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
61941  if test "x$test_cygdrive_prefix" = x; then
61942    # As a simple fix, exclude /usr/bin since it's not a real path.
61943    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
61944      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
61945      # a path prefixed by /cygdrive for fixpath to work.
61946      new_path="$CYGWIN_ROOT_PATH$input_path"
61947    fi
61948  fi
61949
61950
61951  if test "x$path" != "x$new_path"; then
61952    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61953    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61954$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61955  fi
61956
61957    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61958
61959  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
61960  has_colon=`$ECHO $path | $GREP ^.:`
61961  new_path="$path"
61962  if test "x$has_colon" = x; then
61963    # Not in mixed or Windows style, start by that.
61964    new_path=`cmd //c echo $path`
61965  fi
61966
61967
61968  input_path="$new_path"
61969  # Check if we need to convert this using DOS-style short mode. If the path
61970  # contains just simple characters, use it. Otherwise (spaces, weird characters),
61971  # take no chances and rewrite it.
61972  # Note: m4 eats our [], so we need to use [ and ] instead.
61973  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
61974  if test "x$has_forbidden_chars" != x; then
61975    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
61976    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
61977  fi
61978
61979
61980  windows_path="$new_path"
61981  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
61982    unix_path=`$CYGPATH -u "$windows_path"`
61983    new_path="$unix_path"
61984  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
61985    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
61986    new_path="$unix_path"
61987  fi
61988
61989  if test "x$path" != "x$new_path"; then
61990    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
61991    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
61992$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
61993  fi
61994
61995  # Save the first 10 bytes of this path to the storage, so fixpath can work.
61996  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
61997
61998    else
61999      # We're on a unix platform. Hooray! :)
62000      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62001      has_space=`$ECHO "$path" | $GREP " "`
62002      if test "x$has_space" != x; then
62003        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62004$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62005        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62006      fi
62007
62008      # Use eval to expand a potential ~
62009      eval path="$path"
62010      if test ! -f "$path" && test ! -d "$path"; then
62011        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62012      fi
62013
62014      if test -d "$path"; then
62015        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62016      else
62017        dir="`$DIRNAME "$path"`"
62018        base="`$BASENAME "$path"`"
62019        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62020      fi
62021    fi
62022  fi
62023
62024
62025  # Only process if variable expands to non-empty
62026
62027  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62028    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62029
62030  # Input might be given as Windows format, start by converting to
62031  # unix format.
62032  path="$POTENTIAL_FREETYPE_LIB_PATH"
62033  new_path=`$CYGPATH -u "$path"`
62034
62035  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62036  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62037  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62038  # "foo.exe" is OK but "foo" is an error.
62039  #
62040  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62041  # It is also a way to make sure we got the proper file name for the real test later on.
62042  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62043  if test "x$test_shortpath" = x; then
62044    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62045$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62046    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62047  fi
62048
62049  # Call helper function which possibly converts this using DOS-style short mode.
62050  # If so, the updated path is stored in $new_path.
62051
62052  input_path="$new_path"
62053  # Check if we need to convert this using DOS-style short mode. If the path
62054  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62055  # take no chances and rewrite it.
62056  # Note: m4 eats our [], so we need to use [ and ] instead.
62057  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62058  if test "x$has_forbidden_chars" != x; then
62059    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62060    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62061    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62062    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62063      # Going to short mode and back again did indeed matter. Since short mode is
62064      # case insensitive, let's make it lowercase to improve readability.
62065      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62066      # Now convert it back to Unix-style (cygpath)
62067      input_path=`$CYGPATH -u "$shortmode_path"`
62068      new_path="$input_path"
62069    fi
62070  fi
62071
62072  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62073  if test "x$test_cygdrive_prefix" = x; then
62074    # As a simple fix, exclude /usr/bin since it's not a real path.
62075    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62076      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62077      # a path prefixed by /cygdrive for fixpath to work.
62078      new_path="$CYGWIN_ROOT_PATH$input_path"
62079    fi
62080  fi
62081
62082
62083  if test "x$path" != "x$new_path"; then
62084    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62085    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62086$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62087  fi
62088
62089    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62090
62091  path="$POTENTIAL_FREETYPE_LIB_PATH"
62092  has_colon=`$ECHO $path | $GREP ^.:`
62093  new_path="$path"
62094  if test "x$has_colon" = x; then
62095    # Not in mixed or Windows style, start by that.
62096    new_path=`cmd //c echo $path`
62097  fi
62098
62099
62100  input_path="$new_path"
62101  # Check if we need to convert this using DOS-style short mode. If the path
62102  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62103  # take no chances and rewrite it.
62104  # Note: m4 eats our [], so we need to use [ and ] instead.
62105  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62106  if test "x$has_forbidden_chars" != x; then
62107    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62108    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62109  fi
62110
62111
62112  windows_path="$new_path"
62113  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62114    unix_path=`$CYGPATH -u "$windows_path"`
62115    new_path="$unix_path"
62116  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62117    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62118    new_path="$unix_path"
62119  fi
62120
62121  if test "x$path" != "x$new_path"; then
62122    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62123    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62124$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62125  fi
62126
62127  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62128  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62129
62130    else
62131      # We're on a unix platform. Hooray! :)
62132      path="$POTENTIAL_FREETYPE_LIB_PATH"
62133      has_space=`$ECHO "$path" | $GREP " "`
62134      if test "x$has_space" != x; then
62135        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62136$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62137        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62138      fi
62139
62140      # Use eval to expand a potential ~
62141      eval path="$path"
62142      if test ! -f "$path" && test ! -d "$path"; then
62143        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62144      fi
62145
62146      if test -d "$path"; then
62147        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62148      else
62149        dir="`$DIRNAME "$path"`"
62150        base="`$BASENAME "$path"`"
62151        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62152      fi
62153    fi
62154  fi
62155
62156
62157    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62158    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62159$as_echo_n "checking for freetype includes... " >&6; }
62160    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62161$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62162    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62163    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62164$as_echo_n "checking for freetype libraries... " >&6; }
62165    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62166$as_echo "$FREETYPE_LIB_PATH" >&6; }
62167  fi
62168
62169              if test "x$FOUND_FREETYPE" != xyes; then
62170
62171  POTENTIAL_FREETYPE_INCLUDE_PATH="$FREETYPE_BASE_DIR/include"
62172  POTENTIAL_FREETYPE_LIB_PATH="$FREETYPE_BASE_DIR/lib32"
62173  METHOD="well-known location"
62174
62175  # Let's start with an optimistic view of the world :-)
62176  FOUND_FREETYPE=yes
62177
62178  # First look for the canonical freetype main include file ft2build.h.
62179  if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62180    # Oh no! Let's try in the freetype2 directory. This is needed at least at Mac OS X Yosemite.
62181    POTENTIAL_FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH/freetype2"
62182    if ! test -s "$POTENTIAL_FREETYPE_INCLUDE_PATH/ft2build.h"; then
62183      # Fail.
62184      FOUND_FREETYPE=no
62185    fi
62186  fi
62187
62188  if test "x$FOUND_FREETYPE" = xyes; then
62189    # Include file found, let's continue the sanity check.
62190    { $as_echo "$as_me:${as_lineno-$LINENO}: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&5
62191$as_echo "$as_me: Found freetype include files at $POTENTIAL_FREETYPE_INCLUDE_PATH using $METHOD" >&6;}
62192
62193    # Reset to default value
62194    FREETYPE_BASE_NAME=freetype
62195    FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62196    if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME"; then
62197      if test "x$OPENJDK_TARGET_OS" = xmacosx \
62198          && test -s "$POTENTIAL_FREETYPE_LIB_PATH/${LIBRARY_PREFIX}freetype.6${SHARED_LIBRARY_SUFFIX}"; then
62199        # On Mac OS X Yosemite, the symlink from libfreetype.dylib to libfreetype.6.dylib disappeared. Check
62200        # for the .6 version explicitly.
62201        FREETYPE_BASE_NAME=freetype.6
62202        FREETYPE_LIB_NAME="${LIBRARY_PREFIX}${FREETYPE_BASE_NAME}${SHARED_LIBRARY_SUFFIX}"
62203        { $as_echo "$as_me:${as_lineno-$LINENO}: Compensating for missing symlink by using version 6 explicitly" >&5
62204$as_echo "$as_me: Compensating for missing symlink by using version 6 explicitly" >&6;}
62205      else
62206        { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&5
62207$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/$FREETYPE_LIB_NAME. Ignoring location." >&6;}
62208        FOUND_FREETYPE=no
62209      fi
62210    else
62211      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62212        # On Windows, we will need both .lib and .dll file.
62213        if ! test -s "$POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib"; then
62214          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&5
62215$as_echo "$as_me: Could not find $POTENTIAL_FREETYPE_LIB_PATH/${FREETYPE_BASE_NAME}.lib. Ignoring location." >&6;}
62216          FOUND_FREETYPE=no
62217        fi
62218      elif test "x$OPENJDK_TARGET_OS" = xsolaris \
62219          && test -s "$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR/$FREETYPE_LIB_NAME"; then
62220        # Found lib in isa dir, use that instead.
62221        POTENTIAL_FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH$OPENJDK_TARGET_CPU_ISADIR"
62222        { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&5
62223$as_echo "$as_me: Rewriting to use $POTENTIAL_FREETYPE_LIB_PATH instead" >&6;}
62224      fi
62225    fi
62226  fi
62227
62228  if test "x$FOUND_FREETYPE" = xyes; then
62229
62230  # Only process if variable expands to non-empty
62231
62232  if test "x$POTENTIAL_FREETYPE_INCLUDE_PATH" != x; then
62233    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62234
62235  # Input might be given as Windows format, start by converting to
62236  # unix format.
62237  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62238  new_path=`$CYGPATH -u "$path"`
62239
62240  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62241  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62242  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62243  # "foo.exe" is OK but "foo" is an error.
62244  #
62245  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62246  # It is also a way to make sure we got the proper file name for the real test later on.
62247  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62248  if test "x$test_shortpath" = x; then
62249    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62250$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62251    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_INCLUDE_PATH" "$LINENO" 5
62252  fi
62253
62254  # Call helper function which possibly converts this using DOS-style short mode.
62255  # If so, the updated path is stored in $new_path.
62256
62257  input_path="$new_path"
62258  # Check if we need to convert this using DOS-style short mode. If the path
62259  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62260  # take no chances and rewrite it.
62261  # Note: m4 eats our [], so we need to use [ and ] instead.
62262  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62263  if test "x$has_forbidden_chars" != x; then
62264    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62265    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62266    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62267    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62268      # Going to short mode and back again did indeed matter. Since short mode is
62269      # case insensitive, let's make it lowercase to improve readability.
62270      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62271      # Now convert it back to Unix-style (cygpath)
62272      input_path=`$CYGPATH -u "$shortmode_path"`
62273      new_path="$input_path"
62274    fi
62275  fi
62276
62277  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62278  if test "x$test_cygdrive_prefix" = x; then
62279    # As a simple fix, exclude /usr/bin since it's not a real path.
62280    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62281      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62282      # a path prefixed by /cygdrive for fixpath to work.
62283      new_path="$CYGWIN_ROOT_PATH$input_path"
62284    fi
62285  fi
62286
62287
62288  if test "x$path" != "x$new_path"; then
62289    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62290    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62291$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62292  fi
62293
62294    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62295
62296  path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62297  has_colon=`$ECHO $path | $GREP ^.:`
62298  new_path="$path"
62299  if test "x$has_colon" = x; then
62300    # Not in mixed or Windows style, start by that.
62301    new_path=`cmd //c echo $path`
62302  fi
62303
62304
62305  input_path="$new_path"
62306  # Check if we need to convert this using DOS-style short mode. If the path
62307  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62308  # take no chances and rewrite it.
62309  # Note: m4 eats our [], so we need to use [ and ] instead.
62310  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62311  if test "x$has_forbidden_chars" != x; then
62312    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62313    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62314  fi
62315
62316
62317  windows_path="$new_path"
62318  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62319    unix_path=`$CYGPATH -u "$windows_path"`
62320    new_path="$unix_path"
62321  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62322    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62323    new_path="$unix_path"
62324  fi
62325
62326  if test "x$path" != "x$new_path"; then
62327    POTENTIAL_FREETYPE_INCLUDE_PATH="$new_path"
62328    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62329$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62330  fi
62331
62332  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62333  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62334
62335    else
62336      # We're on a unix platform. Hooray! :)
62337      path="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62338      has_space=`$ECHO "$path" | $GREP " "`
62339      if test "x$has_space" != x; then
62340        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62341$as_echo "$as_me: The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62342        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62343      fi
62344
62345      # Use eval to expand a potential ~
62346      eval path="$path"
62347      if test ! -f "$path" && test ! -d "$path"; then
62348        as_fn_error $? "The path of POTENTIAL_FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62349      fi
62350
62351      if test -d "$path"; then
62352        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62353      else
62354        dir="`$DIRNAME "$path"`"
62355        base="`$BASENAME "$path"`"
62356        POTENTIAL_FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62357      fi
62358    fi
62359  fi
62360
62361
62362  # Only process if variable expands to non-empty
62363
62364  if test "x$POTENTIAL_FREETYPE_LIB_PATH" != x; then
62365    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62366
62367  # Input might be given as Windows format, start by converting to
62368  # unix format.
62369  path="$POTENTIAL_FREETYPE_LIB_PATH"
62370  new_path=`$CYGPATH -u "$path"`
62371
62372  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62373  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62374  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62375  # "foo.exe" is OK but "foo" is an error.
62376  #
62377  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62378  # It is also a way to make sure we got the proper file name for the real test later on.
62379  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62380  if test "x$test_shortpath" = x; then
62381    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62382$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62383    as_fn_error $? "Cannot locate the the path of POTENTIAL_FREETYPE_LIB_PATH" "$LINENO" 5
62384  fi
62385
62386  # Call helper function which possibly converts this using DOS-style short mode.
62387  # If so, the updated path is stored in $new_path.
62388
62389  input_path="$new_path"
62390  # Check if we need to convert this using DOS-style short mode. If the path
62391  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62392  # take no chances and rewrite it.
62393  # Note: m4 eats our [], so we need to use [ and ] instead.
62394  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62395  if test "x$has_forbidden_chars" != x; then
62396    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62397    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62398    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62399    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62400      # Going to short mode and back again did indeed matter. Since short mode is
62401      # case insensitive, let's make it lowercase to improve readability.
62402      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62403      # Now convert it back to Unix-style (cygpath)
62404      input_path=`$CYGPATH -u "$shortmode_path"`
62405      new_path="$input_path"
62406    fi
62407  fi
62408
62409  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62410  if test "x$test_cygdrive_prefix" = x; then
62411    # As a simple fix, exclude /usr/bin since it's not a real path.
62412    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62413      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62414      # a path prefixed by /cygdrive for fixpath to work.
62415      new_path="$CYGWIN_ROOT_PATH$input_path"
62416    fi
62417  fi
62418
62419
62420  if test "x$path" != "x$new_path"; then
62421    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62422    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62423$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62424  fi
62425
62426    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62427
62428  path="$POTENTIAL_FREETYPE_LIB_PATH"
62429  has_colon=`$ECHO $path | $GREP ^.:`
62430  new_path="$path"
62431  if test "x$has_colon" = x; then
62432    # Not in mixed or Windows style, start by that.
62433    new_path=`cmd //c echo $path`
62434  fi
62435
62436
62437  input_path="$new_path"
62438  # Check if we need to convert this using DOS-style short mode. If the path
62439  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62440  # take no chances and rewrite it.
62441  # Note: m4 eats our [], so we need to use [ and ] instead.
62442  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62443  if test "x$has_forbidden_chars" != x; then
62444    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62445    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62446  fi
62447
62448
62449  windows_path="$new_path"
62450  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62451    unix_path=`$CYGPATH -u "$windows_path"`
62452    new_path="$unix_path"
62453  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62454    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62455    new_path="$unix_path"
62456  fi
62457
62458  if test "x$path" != "x$new_path"; then
62459    POTENTIAL_FREETYPE_LIB_PATH="$new_path"
62460    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&5
62461$as_echo "$as_me: Rewriting POTENTIAL_FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62462  fi
62463
62464  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62465  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62466
62467    else
62468      # We're on a unix platform. Hooray! :)
62469      path="$POTENTIAL_FREETYPE_LIB_PATH"
62470      has_space=`$ECHO "$path" | $GREP " "`
62471      if test "x$has_space" != x; then
62472        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62473$as_echo "$as_me: The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62474        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62475      fi
62476
62477      # Use eval to expand a potential ~
62478      eval path="$path"
62479      if test ! -f "$path" && test ! -d "$path"; then
62480        as_fn_error $? "The path of POTENTIAL_FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62481      fi
62482
62483      if test -d "$path"; then
62484        POTENTIAL_FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62485      else
62486        dir="`$DIRNAME "$path"`"
62487        base="`$BASENAME "$path"`"
62488        POTENTIAL_FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62489      fi
62490    fi
62491  fi
62492
62493
62494    FREETYPE_INCLUDE_PATH="$POTENTIAL_FREETYPE_INCLUDE_PATH"
62495    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype includes" >&5
62496$as_echo_n "checking for freetype includes... " >&6; }
62497    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_INCLUDE_PATH" >&5
62498$as_echo "$FREETYPE_INCLUDE_PATH" >&6; }
62499    FREETYPE_LIB_PATH="$POTENTIAL_FREETYPE_LIB_PATH"
62500    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for freetype libraries" >&5
62501$as_echo_n "checking for freetype libraries... " >&6; }
62502    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $FREETYPE_LIB_PATH" >&5
62503$as_echo "$FREETYPE_LIB_PATH" >&6; }
62504  fi
62505
62506              fi
62507            fi
62508          fi
62509        fi
62510      fi # end check in well-known locations
62511
62512      if test "x$FOUND_FREETYPE" != xyes; then
62513
62514  # Print a helpful message on how to acquire the necessary build dependency.
62515  # freetype is the help tag: freetype, cups, alsa etc
62516  MISSING_DEPENDENCY=freetype
62517
62518  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62519    cygwin_help $MISSING_DEPENDENCY
62520  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62521    msys_help $MISSING_DEPENDENCY
62522  else
62523    PKGHANDLER_COMMAND=
62524
62525    case $PKGHANDLER in
62526      apt-get)
62527        apt_help     $MISSING_DEPENDENCY ;;
62528      yum)
62529        yum_help     $MISSING_DEPENDENCY ;;
62530      port)
62531        port_help    $MISSING_DEPENDENCY ;;
62532      pkgutil)
62533        pkgutil_help $MISSING_DEPENDENCY ;;
62534      pkgadd)
62535        pkgadd_help  $MISSING_DEPENDENCY ;;
62536    esac
62537
62538    if test "x$PKGHANDLER_COMMAND" != x; then
62539      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62540    fi
62541  fi
62542
62543        as_fn_error $? "Could not find freetype! $HELP_MSG " "$LINENO" 5
62544      fi
62545    fi # end user specified settings
62546
62547    # Set FREETYPE_CFLAGS, _LIBS and _LIB_PATH from include and lib dir.
62548    if test "x$FREETYPE_CFLAGS" = x; then
62549
62550  # Only process if variable expands to non-empty
62551
62552  if test "x$FREETYPE_INCLUDE_PATH" != x; then
62553    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62554
62555  # Input might be given as Windows format, start by converting to
62556  # unix format.
62557  path="$FREETYPE_INCLUDE_PATH"
62558  new_path=`$CYGPATH -u "$path"`
62559
62560  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62561  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62562  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62563  # "foo.exe" is OK but "foo" is an error.
62564  #
62565  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62566  # It is also a way to make sure we got the proper file name for the real test later on.
62567  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62568  if test "x$test_shortpath" = x; then
62569    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62570$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62571    as_fn_error $? "Cannot locate the the path of FREETYPE_INCLUDE_PATH" "$LINENO" 5
62572  fi
62573
62574  # Call helper function which possibly converts this using DOS-style short mode.
62575  # If so, the updated path is stored in $new_path.
62576
62577  input_path="$new_path"
62578  # Check if we need to convert this using DOS-style short mode. If the path
62579  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62580  # take no chances and rewrite it.
62581  # Note: m4 eats our [], so we need to use [ and ] instead.
62582  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62583  if test "x$has_forbidden_chars" != x; then
62584    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62585    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62586    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62587    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62588      # Going to short mode and back again did indeed matter. Since short mode is
62589      # case insensitive, let's make it lowercase to improve readability.
62590      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62591      # Now convert it back to Unix-style (cygpath)
62592      input_path=`$CYGPATH -u "$shortmode_path"`
62593      new_path="$input_path"
62594    fi
62595  fi
62596
62597  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62598  if test "x$test_cygdrive_prefix" = x; then
62599    # As a simple fix, exclude /usr/bin since it's not a real path.
62600    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62601      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62602      # a path prefixed by /cygdrive for fixpath to work.
62603      new_path="$CYGWIN_ROOT_PATH$input_path"
62604    fi
62605  fi
62606
62607
62608  if test "x$path" != "x$new_path"; then
62609    FREETYPE_INCLUDE_PATH="$new_path"
62610    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62611$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62612  fi
62613
62614    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62615
62616  path="$FREETYPE_INCLUDE_PATH"
62617  has_colon=`$ECHO $path | $GREP ^.:`
62618  new_path="$path"
62619  if test "x$has_colon" = x; then
62620    # Not in mixed or Windows style, start by that.
62621    new_path=`cmd //c echo $path`
62622  fi
62623
62624
62625  input_path="$new_path"
62626  # Check if we need to convert this using DOS-style short mode. If the path
62627  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62628  # take no chances and rewrite it.
62629  # Note: m4 eats our [], so we need to use [ and ] instead.
62630  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62631  if test "x$has_forbidden_chars" != x; then
62632    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62633    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62634  fi
62635
62636
62637  windows_path="$new_path"
62638  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62639    unix_path=`$CYGPATH -u "$windows_path"`
62640    new_path="$unix_path"
62641  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62642    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62643    new_path="$unix_path"
62644  fi
62645
62646  if test "x$path" != "x$new_path"; then
62647    FREETYPE_INCLUDE_PATH="$new_path"
62648    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&5
62649$as_echo "$as_me: Rewriting FREETYPE_INCLUDE_PATH to \"$new_path\"" >&6;}
62650  fi
62651
62652  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62653  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62654
62655    else
62656      # We're on a unix platform. Hooray! :)
62657      path="$FREETYPE_INCLUDE_PATH"
62658      has_space=`$ECHO "$path" | $GREP " "`
62659      if test "x$has_space" != x; then
62660        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&5
62661$as_echo "$as_me: The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is invalid." >&6;}
62662        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62663      fi
62664
62665      # Use eval to expand a potential ~
62666      eval path="$path"
62667      if test ! -f "$path" && test ! -d "$path"; then
62668        as_fn_error $? "The path of FREETYPE_INCLUDE_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62669      fi
62670
62671      if test -d "$path"; then
62672        FREETYPE_INCLUDE_PATH="`cd "$path"; $THEPWDCMD -L`"
62673      else
62674        dir="`$DIRNAME "$path"`"
62675        base="`$BASENAME "$path"`"
62676        FREETYPE_INCLUDE_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62677      fi
62678    fi
62679  fi
62680
62681      if test -d $FREETYPE_INCLUDE_PATH/freetype2/freetype; then
62682        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH/freetype2 -I$FREETYPE_INCLUDE_PATH"
62683      else
62684        FREETYPE_CFLAGS="-I$FREETYPE_INCLUDE_PATH"
62685      fi
62686    fi
62687
62688    if test "x$FREETYPE_LIBS" = x; then
62689
62690  # Only process if variable expands to non-empty
62691
62692  if test "x$FREETYPE_LIB_PATH" != x; then
62693    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62694
62695  # Input might be given as Windows format, start by converting to
62696  # unix format.
62697  path="$FREETYPE_LIB_PATH"
62698  new_path=`$CYGPATH -u "$path"`
62699
62700  # Cygwin tries to hide some aspects of the Windows file system, such that binaries are
62701  # named .exe but called without that suffix. Therefore, "foo" and "foo.exe" are considered
62702  # the same file, most of the time (as in "test -f"). But not when running cygpath -s, then
62703  # "foo.exe" is OK but "foo" is an error.
62704  #
62705  # This test is therefore slightly more accurate than "test -f" to check for file precense.
62706  # It is also a way to make sure we got the proper file name for the real test later on.
62707  test_shortpath=`$CYGPATH -s -m "$new_path" 2> /dev/null`
62708  if test "x$test_shortpath" = x; then
62709    { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62710$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62711    as_fn_error $? "Cannot locate the the path of FREETYPE_LIB_PATH" "$LINENO" 5
62712  fi
62713
62714  # Call helper function which possibly converts this using DOS-style short mode.
62715  # If so, the updated path is stored in $new_path.
62716
62717  input_path="$new_path"
62718  # Check if we need to convert this using DOS-style short mode. If the path
62719  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62720  # take no chances and rewrite it.
62721  # Note: m4 eats our [], so we need to use [ and ] instead.
62722  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-._/a-zA-Z0-9]`
62723  if test "x$has_forbidden_chars" != x; then
62724    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62725    shortmode_path=`$CYGPATH -s -m -a "$input_path"`
62726    path_after_shortmode=`$CYGPATH -u "$shortmode_path"`
62727    if test "x$path_after_shortmode" != "x$input_to_shortpath"; then
62728      # Going to short mode and back again did indeed matter. Since short mode is
62729      # case insensitive, let's make it lowercase to improve readability.
62730      shortmode_path=`$ECHO "$shortmode_path" | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62731      # Now convert it back to Unix-style (cygpath)
62732      input_path=`$CYGPATH -u "$shortmode_path"`
62733      new_path="$input_path"
62734    fi
62735  fi
62736
62737  test_cygdrive_prefix=`$ECHO $input_path | $GREP ^/cygdrive/`
62738  if test "x$test_cygdrive_prefix" = x; then
62739    # As a simple fix, exclude /usr/bin since it's not a real path.
62740    if test "x`$ECHO $new_path | $GREP ^/usr/bin/`" = x; then
62741      # The path is in a Cygwin special directory (e.g. /home). We need this converted to
62742      # a path prefixed by /cygdrive for fixpath to work.
62743      new_path="$CYGWIN_ROOT_PATH$input_path"
62744    fi
62745  fi
62746
62747
62748  if test "x$path" != "x$new_path"; then
62749    FREETYPE_LIB_PATH="$new_path"
62750    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62751$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62752  fi
62753
62754    elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62755
62756  path="$FREETYPE_LIB_PATH"
62757  has_colon=`$ECHO $path | $GREP ^.:`
62758  new_path="$path"
62759  if test "x$has_colon" = x; then
62760    # Not in mixed or Windows style, start by that.
62761    new_path=`cmd //c echo $path`
62762  fi
62763
62764
62765  input_path="$new_path"
62766  # Check if we need to convert this using DOS-style short mode. If the path
62767  # contains just simple characters, use it. Otherwise (spaces, weird characters),
62768  # take no chances and rewrite it.
62769  # Note: m4 eats our [], so we need to use [ and ] instead.
62770  has_forbidden_chars=`$ECHO "$input_path" | $GREP [^-_/:a-zA-Z0-9]`
62771  if test "x$has_forbidden_chars" != x; then
62772    # Now convert it to mixed DOS-style, short mode (no spaces, and / instead of \)
62773    new_path=`cmd /c "for %A in (\"$input_path\") do @echo %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'`
62774  fi
62775
62776
62777  windows_path="$new_path"
62778  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62779    unix_path=`$CYGPATH -u "$windows_path"`
62780    new_path="$unix_path"
62781  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62782    unix_path=`$ECHO "$windows_path" | $SED -e 's,^\\(.\\):,/\\1,g' -e 's,\\\\,/,g'`
62783    new_path="$unix_path"
62784  fi
62785
62786  if test "x$path" != "x$new_path"; then
62787    FREETYPE_LIB_PATH="$new_path"
62788    { $as_echo "$as_me:${as_lineno-$LINENO}: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&5
62789$as_echo "$as_me: Rewriting FREETYPE_LIB_PATH to \"$new_path\"" >&6;}
62790  fi
62791
62792  # Save the first 10 bytes of this path to the storage, so fixpath can work.
62793  all_fixpath_prefixes=("${all_fixpath_prefixes[@]}" "${new_path:0:10}")
62794
62795    else
62796      # We're on a unix platform. Hooray! :)
62797      path="$FREETYPE_LIB_PATH"
62798      has_space=`$ECHO "$path" | $GREP " "`
62799      if test "x$has_space" != x; then
62800        { $as_echo "$as_me:${as_lineno-$LINENO}: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&5
62801$as_echo "$as_me: The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is invalid." >&6;}
62802        as_fn_error $? "Spaces are not allowed in this path." "$LINENO" 5
62803      fi
62804
62805      # Use eval to expand a potential ~
62806      eval path="$path"
62807      if test ! -f "$path" && test ! -d "$path"; then
62808        as_fn_error $? "The path of FREETYPE_LIB_PATH, which resolves as \"$path\", is not found." "$LINENO" 5
62809      fi
62810
62811      if test -d "$path"; then
62812        FREETYPE_LIB_PATH="`cd "$path"; $THEPWDCMD -L`"
62813      else
62814        dir="`$DIRNAME "$path"`"
62815        base="`$BASENAME "$path"`"
62816        FREETYPE_LIB_PATH="`cd "$dir"; $THEPWDCMD -L`/$base"
62817      fi
62818    fi
62819  fi
62820
62821      if test "x$OPENJDK_TARGET_OS" = xwindows; then
62822        FREETYPE_LIBS="$FREETYPE_LIB_PATH/$FREETYPE_BASE_NAME.lib"
62823      else
62824        FREETYPE_LIBS="-L$FREETYPE_LIB_PATH -l$FREETYPE_BASE_NAME"
62825      fi
62826    fi
62827
62828    # Try to compile it
62829    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can compile and link with freetype" >&5
62830$as_echo_n "checking if we can compile and link with freetype... " >&6; }
62831    ac_ext=cpp
62832ac_cpp='$CXXCPP $CPPFLAGS'
62833ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62834ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62835ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62836
62837    PREV_CXXCFLAGS="$CXXFLAGS"
62838    PREV_LIBS="$LIBS"
62839    PREV_CXX="$CXX"
62840    CXXFLAGS="$CXXFLAGS $FREETYPE_CFLAGS"
62841    LIBS="$LIBS $FREETYPE_LIBS"
62842    CXX="$FIXPATH $CXX"
62843    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
62844/* end confdefs.h.  */
62845
62846          #include<ft2build.h>
62847          #include FT_FREETYPE_H
62848          int main () {
62849            FT_Init_FreeType(NULL);
62850            return 0;
62851          }
62852
62853_ACEOF
62854if ac_fn_cxx_try_link "$LINENO"; then :
62855
62856          { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
62857$as_echo "yes" >&6; }
62858
62859else
62860
62861          { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
62862$as_echo "no" >&6; }
62863          { $as_echo "$as_me:${as_lineno-$LINENO}: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&5
62864$as_echo "$as_me: Could not compile and link with freetype. This might be a 32/64-bit mismatch." >&6;}
62865          { $as_echo "$as_me:${as_lineno-$LINENO}: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&5
62866$as_echo "$as_me: Using FREETYPE_CFLAGS=$FREETYPE_CFLAGS and FREETYPE_LIBS=$FREETYPE_LIBS" >&6;}
62867
62868
62869  # Print a helpful message on how to acquire the necessary build dependency.
62870  # freetype is the help tag: freetype, cups, alsa etc
62871  MISSING_DEPENDENCY=freetype
62872
62873  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
62874    cygwin_help $MISSING_DEPENDENCY
62875  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
62876    msys_help $MISSING_DEPENDENCY
62877  else
62878    PKGHANDLER_COMMAND=
62879
62880    case $PKGHANDLER in
62881      apt-get)
62882        apt_help     $MISSING_DEPENDENCY ;;
62883      yum)
62884        yum_help     $MISSING_DEPENDENCY ;;
62885      port)
62886        port_help    $MISSING_DEPENDENCY ;;
62887      pkgutil)
62888        pkgutil_help $MISSING_DEPENDENCY ;;
62889      pkgadd)
62890        pkgadd_help  $MISSING_DEPENDENCY ;;
62891    esac
62892
62893    if test "x$PKGHANDLER_COMMAND" != x; then
62894      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
62895    fi
62896  fi
62897
62898
62899          as_fn_error $? "Can not continue without freetype. $HELP_MSG" "$LINENO" 5
62900
62901
62902fi
62903rm -f core conftest.err conftest.$ac_objext \
62904    conftest$ac_exeext conftest.$ac_ext
62905    CXXCFLAGS="$PREV_CXXFLAGS"
62906    LIBS="$PREV_LIBS"
62907    CXX="$PREV_CXX"
62908    ac_ext=cpp
62909ac_cpp='$CXXCPP $CPPFLAGS'
62910ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
62911ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
62912ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
62913
62914
62915    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we should bundle freetype" >&5
62916$as_echo_n "checking if we should bundle freetype... " >&6; }
62917    if test "x$BUNDLE_FREETYPE" = xyes; then
62918      FREETYPE_BUNDLE_LIB_PATH="$FREETYPE_LIB_PATH"
62919    fi
62920    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $BUNDLE_FREETYPE" >&5
62921$as_echo "$BUNDLE_FREETYPE" >&6; }
62922
62923  fi # end freetype needed
62924
62925
62926
62927
62928
62929
62930
62931# Check whether --with-alsa was given.
62932if test "${with_alsa+set}" = set; then :
62933  withval=$with_alsa;
62934fi
62935
62936
62937# Check whether --with-alsa-include was given.
62938if test "${with_alsa_include+set}" = set; then :
62939  withval=$with_alsa_include;
62940fi
62941
62942
62943# Check whether --with-alsa-lib was given.
62944if test "${with_alsa_lib+set}" = set; then :
62945  withval=$with_alsa_lib;
62946fi
62947
62948
62949  if test "x$NEEDS_LIB_ALSA" = xfalse; then
62950    if (test "x${with_alsa}" != x && test "x${with_alsa}" != xno) || \
62951        (test "x${with_alsa_include}" != x && test "x${with_alsa_include}" != xno) || \
62952        (test "x${with_alsa_lib}" != x && test "x${with_alsa_lib}" != xno); then
62953      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&5
62954$as_echo "$as_me: WARNING: alsa not used, so --with-alsa[-*] is ignored" >&2;}
62955    fi
62956    ALSA_CFLAGS=
62957    ALSA_LIBS=
62958  else
62959    ALSA_FOUND=no
62960
62961    if test "x${with_alsa}" = xno || test "x${with_alsa_include}" = xno || test "x${with_alsa_lib}" = xno; then
62962      as_fn_error $? "It is not possible to disable the use of alsa. Remove the --without-alsa option." "$LINENO" 5
62963    fi
62964
62965    if test "x${with_alsa}" != x; then
62966      ALSA_LIBS="-L${with_alsa}/lib -lasound"
62967      ALSA_CFLAGS="-I${with_alsa}/include"
62968      ALSA_FOUND=yes
62969    fi
62970    if test "x${with_alsa_include}" != x; then
62971      ALSA_CFLAGS="-I${with_alsa_include}"
62972      ALSA_FOUND=yes
62973    fi
62974    if test "x${with_alsa_lib}" != x; then
62975      ALSA_LIBS="-L${with_alsa_lib} -lasound"
62976      ALSA_FOUND=yes
62977    fi
62978    # Do not try pkg-config if we have a sysroot set.
62979    if test "x$SYSROOT" = x; then
62980      if test "x$ALSA_FOUND" = xno; then
62981
62982pkg_failed=no
62983{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for ALSA" >&5
62984$as_echo_n "checking for ALSA... " >&6; }
62985
62986if test -n "$ALSA_CFLAGS"; then
62987    pkg_cv_ALSA_CFLAGS="$ALSA_CFLAGS"
62988 elif test -n "$PKG_CONFIG"; then
62989    if test -n "$PKG_CONFIG" && \
62990    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
62991  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
62992  ac_status=$?
62993  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
62994  test $ac_status = 0; }; then
62995  pkg_cv_ALSA_CFLAGS=`$PKG_CONFIG --cflags "alsa" 2>/dev/null`
62996else
62997  pkg_failed=yes
62998fi
62999 else
63000    pkg_failed=untried
63001fi
63002if test -n "$ALSA_LIBS"; then
63003    pkg_cv_ALSA_LIBS="$ALSA_LIBS"
63004 elif test -n "$PKG_CONFIG"; then
63005    if test -n "$PKG_CONFIG" && \
63006    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"alsa\""; } >&5
63007  ($PKG_CONFIG --exists --print-errors "alsa") 2>&5
63008  ac_status=$?
63009  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63010  test $ac_status = 0; }; then
63011  pkg_cv_ALSA_LIBS=`$PKG_CONFIG --libs "alsa" 2>/dev/null`
63012else
63013  pkg_failed=yes
63014fi
63015 else
63016    pkg_failed=untried
63017fi
63018
63019
63020
63021if test $pkg_failed = yes; then
63022
63023if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63024        _pkg_short_errors_supported=yes
63025else
63026        _pkg_short_errors_supported=no
63027fi
63028        if test $_pkg_short_errors_supported = yes; then
63029	        ALSA_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "alsa" 2>&1`
63030        else
63031	        ALSA_PKG_ERRORS=`$PKG_CONFIG --print-errors "alsa" 2>&1`
63032        fi
63033	# Put the nasty error message in config.log where it belongs
63034	echo "$ALSA_PKG_ERRORS" >&5
63035
63036	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63037$as_echo "no" >&6; }
63038                ALSA_FOUND=no
63039elif test $pkg_failed = untried; then
63040	ALSA_FOUND=no
63041else
63042	ALSA_CFLAGS=$pkg_cv_ALSA_CFLAGS
63043	ALSA_LIBS=$pkg_cv_ALSA_LIBS
63044        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63045$as_echo "yes" >&6; }
63046	ALSA_FOUND=yes
63047fi
63048      fi
63049    fi
63050    if test "x$ALSA_FOUND" = xno; then
63051      for ac_header in alsa/asoundlib.h
63052do :
63053  ac_fn_cxx_check_header_mongrel "$LINENO" "alsa/asoundlib.h" "ac_cv_header_alsa_asoundlib_h" "$ac_includes_default"
63054if test "x$ac_cv_header_alsa_asoundlib_h" = xyes; then :
63055  cat >>confdefs.h <<_ACEOF
63056#define HAVE_ALSA_ASOUNDLIB_H 1
63057_ACEOF
63058
63059            ALSA_FOUND=yes
63060            ALSA_CFLAGS=-Iignoreme
63061            ALSA_LIBS=-lasound
63062            DEFAULT_ALSA=yes
63063
63064else
63065  ALSA_FOUND=no
63066
63067fi
63068
63069done
63070
63071    fi
63072    if test "x$ALSA_FOUND" = xno; then
63073
63074  # Print a helpful message on how to acquire the necessary build dependency.
63075  # alsa is the help tag: freetype, cups, alsa etc
63076  MISSING_DEPENDENCY=alsa
63077
63078  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63079    cygwin_help $MISSING_DEPENDENCY
63080  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63081    msys_help $MISSING_DEPENDENCY
63082  else
63083    PKGHANDLER_COMMAND=
63084
63085    case $PKGHANDLER in
63086      apt-get)
63087        apt_help     $MISSING_DEPENDENCY ;;
63088      yum)
63089        yum_help     $MISSING_DEPENDENCY ;;
63090      port)
63091        port_help    $MISSING_DEPENDENCY ;;
63092      pkgutil)
63093        pkgutil_help $MISSING_DEPENDENCY ;;
63094      pkgadd)
63095        pkgadd_help  $MISSING_DEPENDENCY ;;
63096    esac
63097
63098    if test "x$PKGHANDLER_COMMAND" != x; then
63099      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63100    fi
63101  fi
63102
63103      as_fn_error $? "Could not find alsa! $HELP_MSG" "$LINENO" 5
63104    fi
63105  fi
63106
63107
63108
63109
63110
63111
63112# Check whether --with-libffi was given.
63113if test "${with_libffi+set}" = set; then :
63114  withval=$with_libffi;
63115fi
63116
63117
63118# Check whether --with-libffi-include was given.
63119if test "${with_libffi_include+set}" = set; then :
63120  withval=$with_libffi_include;
63121fi
63122
63123
63124# Check whether --with-libffi-lib was given.
63125if test "${with_libffi_lib+set}" = set; then :
63126  withval=$with_libffi_lib;
63127fi
63128
63129
63130  if test "x$NEEDS_LIB_FFI" = xfalse; then
63131    if (test "x${with_libffi}" != x && test "x${with_libffi}" != xno) || \
63132        (test "x${with_libffi_include}" != x && test "x${with_libffi_include}" != xno) || \
63133        (test "x${with_libffi_lib}" != x && test "x${with_libffi_lib}" != xno); then
63134      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&5
63135$as_echo "$as_me: WARNING: libffi not used, so --with-libffi[-*] is ignored" >&2;}
63136    fi
63137    LIBFFI_CFLAGS=
63138    LIBFFI_LIBS=
63139  else
63140    LIBFFI_FOUND=no
63141
63142    if test "x${with_libffi}" = xno || test "x${with_libffi_include}" = xno || test "x${with_libffi_lib}" = xno; then
63143      as_fn_error $? "It is not possible to disable the use of libffi. Remove the --without-libffi option." "$LINENO" 5
63144    fi
63145
63146    if test "x${with_libffi}" != x; then
63147      LIBFFI_LIBS="-L${with_libffi}/lib -lffi"
63148      LIBFFI_CFLAGS="-I${with_libffi}/include"
63149      LIBFFI_FOUND=yes
63150    fi
63151    if test "x${with_libffi_include}" != x; then
63152      LIBFFI_CFLAGS="-I${with_libffi_include}"
63153      LIBFFI_FOUND=yes
63154    fi
63155    if test "x${with_libffi_lib}" != x; then
63156      LIBFFI_LIBS="-L${with_libffi_lib} -lffi"
63157      LIBFFI_FOUND=yes
63158    fi
63159    # Do not try pkg-config if we have a sysroot set.
63160    if test "x$SYSROOT" = x; then
63161      if test "x$LIBFFI_FOUND" = xno; then
63162        # Figure out LIBFFI_CFLAGS and LIBFFI_LIBS
63163
63164pkg_failed=no
63165{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LIBFFI" >&5
63166$as_echo_n "checking for LIBFFI... " >&6; }
63167
63168if test -n "$LIBFFI_CFLAGS"; then
63169    pkg_cv_LIBFFI_CFLAGS="$LIBFFI_CFLAGS"
63170 elif test -n "$PKG_CONFIG"; then
63171    if test -n "$PKG_CONFIG" && \
63172    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63173  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63174  ac_status=$?
63175  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63176  test $ac_status = 0; }; then
63177  pkg_cv_LIBFFI_CFLAGS=`$PKG_CONFIG --cflags "libffi" 2>/dev/null`
63178else
63179  pkg_failed=yes
63180fi
63181 else
63182    pkg_failed=untried
63183fi
63184if test -n "$LIBFFI_LIBS"; then
63185    pkg_cv_LIBFFI_LIBS="$LIBFFI_LIBS"
63186 elif test -n "$PKG_CONFIG"; then
63187    if test -n "$PKG_CONFIG" && \
63188    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libffi\""; } >&5
63189  ($PKG_CONFIG --exists --print-errors "libffi") 2>&5
63190  ac_status=$?
63191  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63192  test $ac_status = 0; }; then
63193  pkg_cv_LIBFFI_LIBS=`$PKG_CONFIG --libs "libffi" 2>/dev/null`
63194else
63195  pkg_failed=yes
63196fi
63197 else
63198    pkg_failed=untried
63199fi
63200
63201
63202
63203if test $pkg_failed = yes; then
63204
63205if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63206        _pkg_short_errors_supported=yes
63207else
63208        _pkg_short_errors_supported=no
63209fi
63210        if test $_pkg_short_errors_supported = yes; then
63211	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libffi" 2>&1`
63212        else
63213	        LIBFFI_PKG_ERRORS=`$PKG_CONFIG --print-errors "libffi" 2>&1`
63214        fi
63215	# Put the nasty error message in config.log where it belongs
63216	echo "$LIBFFI_PKG_ERRORS" >&5
63217
63218	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63219$as_echo "no" >&6; }
63220                LIBFFI_FOUND=no
63221elif test $pkg_failed = untried; then
63222	LIBFFI_FOUND=no
63223else
63224	LIBFFI_CFLAGS=$pkg_cv_LIBFFI_CFLAGS
63225	LIBFFI_LIBS=$pkg_cv_LIBFFI_LIBS
63226        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63227$as_echo "yes" >&6; }
63228	LIBFFI_FOUND=yes
63229fi
63230      fi
63231    fi
63232    if test "x$LIBFFI_FOUND" = xno; then
63233      for ac_header in ffi.h
63234do :
63235  ac_fn_cxx_check_header_mongrel "$LINENO" "ffi.h" "ac_cv_header_ffi_h" "$ac_includes_default"
63236if test "x$ac_cv_header_ffi_h" = xyes; then :
63237  cat >>confdefs.h <<_ACEOF
63238#define HAVE_FFI_H 1
63239_ACEOF
63240
63241            LIBFFI_FOUND=yes
63242            LIBFFI_CFLAGS=
63243            LIBFFI_LIBS=-lffi
63244
63245else
63246  LIBFFI_FOUND=no
63247
63248fi
63249
63250done
63251
63252    fi
63253    if test "x$LIBFFI_FOUND" = xno; then
63254
63255  # Print a helpful message on how to acquire the necessary build dependency.
63256  # ffi is the help tag: freetype, cups, alsa etc
63257  MISSING_DEPENDENCY=ffi
63258
63259  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63260    cygwin_help $MISSING_DEPENDENCY
63261  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63262    msys_help $MISSING_DEPENDENCY
63263  else
63264    PKGHANDLER_COMMAND=
63265
63266    case $PKGHANDLER in
63267      apt-get)
63268        apt_help     $MISSING_DEPENDENCY ;;
63269      yum)
63270        yum_help     $MISSING_DEPENDENCY ;;
63271      port)
63272        port_help    $MISSING_DEPENDENCY ;;
63273      pkgutil)
63274        pkgutil_help $MISSING_DEPENDENCY ;;
63275      pkgadd)
63276        pkgadd_help  $MISSING_DEPENDENCY ;;
63277    esac
63278
63279    if test "x$PKGHANDLER_COMMAND" != x; then
63280      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63281    fi
63282  fi
63283
63284      as_fn_error $? "Could not find libffi! $HELP_MSG" "$LINENO" 5
63285    fi
63286
63287    { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libffi works" >&5
63288$as_echo_n "checking if libffi works... " >&6; }
63289    ac_ext=c
63290ac_cpp='$CPP $CPPFLAGS'
63291ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63292ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63293ac_compiler_gnu=$ac_cv_c_compiler_gnu
63294
63295    OLD_CFLAGS="$CFLAGS"
63296    CFLAGS="$CFLAGS $LIBFFI_CFLAGS"
63297    OLD_LIBS="$LIBS"
63298    LIBS="$LIBS $LIBFFI_LIBS"
63299    cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63300/* end confdefs.h.  */
63301#include <ffi.h>
63302int
63303main ()
63304{
63305
63306          ffi_call(NULL, NULL, NULL, NULL);
63307          return 0;
63308
63309  ;
63310  return 0;
63311}
63312_ACEOF
63313if ac_fn_c_try_link "$LINENO"; then :
63314  LIBFFI_WORKS=yes
63315else
63316  LIBFFI_WORKS=no
63317
63318fi
63319rm -f core conftest.err conftest.$ac_objext \
63320    conftest$ac_exeext conftest.$ac_ext
63321    CFLAGS="$OLD_CFLAGS"
63322    LIBS="$OLD_LIBS"
63323    ac_ext=cpp
63324ac_cpp='$CXXCPP $CPPFLAGS'
63325ac_compile='$CXX -c $CXXFLAGS $CPPFLAGS conftest.$ac_ext >&5'
63326ac_link='$CXX -o conftest$ac_exeext $CXXFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
63327ac_compiler_gnu=$ac_cv_cxx_compiler_gnu
63328
63329    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIBFFI_WORKS" >&5
63330$as_echo "$LIBFFI_WORKS" >&6; }
63331
63332    if test "x$LIBFFI_WORKS" = xno; then
63333
63334  # Print a helpful message on how to acquire the necessary build dependency.
63335  # ffi is the help tag: freetype, cups, alsa etc
63336  MISSING_DEPENDENCY=ffi
63337
63338  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
63339    cygwin_help $MISSING_DEPENDENCY
63340  elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
63341    msys_help $MISSING_DEPENDENCY
63342  else
63343    PKGHANDLER_COMMAND=
63344
63345    case $PKGHANDLER in
63346      apt-get)
63347        apt_help     $MISSING_DEPENDENCY ;;
63348      yum)
63349        yum_help     $MISSING_DEPENDENCY ;;
63350      port)
63351        port_help    $MISSING_DEPENDENCY ;;
63352      pkgutil)
63353        pkgutil_help $MISSING_DEPENDENCY ;;
63354      pkgadd)
63355        pkgadd_help  $MISSING_DEPENDENCY ;;
63356    esac
63357
63358    if test "x$PKGHANDLER_COMMAND" != x; then
63359      HELP_MSG="You might be able to fix this by running '$PKGHANDLER_COMMAND'."
63360    fi
63361  fi
63362
63363      as_fn_error $? "Found libffi but could not link and compile with it. $HELP_MSG" "$LINENO" 5
63364    fi
63365  fi
63366
63367
63368
63369
63370
63371  if   [[ " $JVM_VARIANTS " =~ " zeroshark " ]]  ; then
63372    # Extract the first word of "llvm-config", so it can be a program name with args.
63373set dummy llvm-config; ac_word=$2
63374{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
63375$as_echo_n "checking for $ac_word... " >&6; }
63376if ${ac_cv_prog_LLVM_CONFIG+:} false; then :
63377  $as_echo_n "(cached) " >&6
63378else
63379  if test -n "$LLVM_CONFIG"; then
63380  ac_cv_prog_LLVM_CONFIG="$LLVM_CONFIG" # Let the user override the test.
63381else
63382as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
63383for as_dir in $PATH
63384do
63385  IFS=$as_save_IFS
63386  test -z "$as_dir" && as_dir=.
63387    for ac_exec_ext in '' $ac_executable_extensions; do
63388  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
63389    ac_cv_prog_LLVM_CONFIG="llvm-config"
63390    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
63391    break 2
63392  fi
63393done
63394  done
63395IFS=$as_save_IFS
63396
63397fi
63398fi
63399LLVM_CONFIG=$ac_cv_prog_LLVM_CONFIG
63400if test -n "$LLVM_CONFIG"; then
63401  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LLVM_CONFIG" >&5
63402$as_echo "$LLVM_CONFIG" >&6; }
63403else
63404  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63405$as_echo "no" >&6; }
63406fi
63407
63408
63409
63410    if test "x$LLVM_CONFIG" != xllvm-config; then
63411      as_fn_error $? "llvm-config not found in $PATH." "$LINENO" 5
63412    fi
63413
63414    llvm_components="jit mcjit engine nativecodegen native"
63415    unset LLVM_CFLAGS
63416    for flag in $("$LLVM_CONFIG" --cxxflags); do
63417      if echo "${flag}" | grep -q '^-[ID]'; then
63418        if test "${flag}" != "-D_DEBUG" ; then
63419          if test "${LLVM_CFLAGS}" != "" ; then
63420            LLVM_CFLAGS="${LLVM_CFLAGS} "
63421          fi
63422          LLVM_CFLAGS="${LLVM_CFLAGS}${flag}"
63423        fi
63424      fi
63425    done
63426    llvm_version=$("${LLVM_CONFIG}" --version | sed 's/\.//; s/svn.*//')
63427    LLVM_CFLAGS="${LLVM_CFLAGS} -DSHARK_LLVM_VERSION=${llvm_version}"
63428
63429    unset LLVM_LDFLAGS
63430    for flag in $("${LLVM_CONFIG}" --ldflags); do
63431      if echo "${flag}" | grep -q '^-L'; then
63432        if test "${LLVM_LDFLAGS}" != ""; then
63433          LLVM_LDFLAGS="${LLVM_LDFLAGS} "
63434        fi
63435        LLVM_LDFLAGS="${LLVM_LDFLAGS}${flag}"
63436      fi
63437    done
63438
63439    unset LLVM_LIBS
63440    for flag in $("${LLVM_CONFIG}" --libs ${llvm_components}); do
63441      if echo "${flag}" | grep -q '^-l'; then
63442        if test "${LLVM_LIBS}" != ""; then
63443          LLVM_LIBS="${LLVM_LIBS} "
63444        fi
63445        LLVM_LIBS="${LLVM_LIBS}${flag}"
63446      fi
63447    done
63448
63449    # Due to https://llvm.org/bugs/show_bug.cgi?id=16902, llvm does not
63450    # always properly detect -ltinfo
63451    LLVM_LIBS="${LLVM_LIBS} -ltinfo"
63452
63453
63454
63455
63456  fi
63457
63458
63459
63460# Check whether --with-libjpeg was given.
63461if test "${with_libjpeg+set}" = set; then :
63462  withval=$with_libjpeg;
63463fi
63464
63465
63466  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libjpeg to use" >&5
63467$as_echo_n "checking for which libjpeg to use... " >&6; }
63468  # default is bundled
63469  DEFAULT_LIBJPEG=bundled
63470  # if user didn't specify, use DEFAULT_LIBJPEG
63471  if test "x${with_libjpeg}" = "x"; then
63472    with_libjpeg=${DEFAULT_LIBJPEG}
63473  fi
63474  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_libjpeg}" >&5
63475$as_echo "${with_libjpeg}" >&6; }
63476
63477  if test "x${with_libjpeg}" = "xbundled"; then
63478    USE_EXTERNAL_LIBJPEG=false
63479  elif test "x${with_libjpeg}" = "xsystem"; then
63480    ac_fn_cxx_check_header_mongrel "$LINENO" "jpeglib.h" "ac_cv_header_jpeglib_h" "$ac_includes_default"
63481if test "x$ac_cv_header_jpeglib_h" = xyes; then :
63482
63483else
63484   as_fn_error $? "--with-libjpeg=system specified, but jpeglib.h not found!" "$LINENO" 5
63485fi
63486
63487
63488    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for jpeg_CreateDecompress in -ljpeg" >&5
63489$as_echo_n "checking for jpeg_CreateDecompress in -ljpeg... " >&6; }
63490if ${ac_cv_lib_jpeg_jpeg_CreateDecompress+:} false; then :
63491  $as_echo_n "(cached) " >&6
63492else
63493  ac_check_lib_save_LIBS=$LIBS
63494LIBS="-ljpeg  $LIBS"
63495cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63496/* end confdefs.h.  */
63497
63498/* Override any GCC internal prototype to avoid an error.
63499   Use char because int might match the return type of a GCC
63500   builtin and then its argument prototype would still apply.  */
63501#ifdef __cplusplus
63502extern "C"
63503#endif
63504char jpeg_CreateDecompress ();
63505int
63506main ()
63507{
63508return jpeg_CreateDecompress ();
63509  ;
63510  return 0;
63511}
63512_ACEOF
63513if ac_fn_cxx_try_link "$LINENO"; then :
63514  ac_cv_lib_jpeg_jpeg_CreateDecompress=yes
63515else
63516  ac_cv_lib_jpeg_jpeg_CreateDecompress=no
63517fi
63518rm -f core conftest.err conftest.$ac_objext \
63519    conftest$ac_exeext conftest.$ac_ext
63520LIBS=$ac_check_lib_save_LIBS
63521fi
63522{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_jpeg_jpeg_CreateDecompress" >&5
63523$as_echo "$ac_cv_lib_jpeg_jpeg_CreateDecompress" >&6; }
63524if test "x$ac_cv_lib_jpeg_jpeg_CreateDecompress" = xyes; then :
63525  cat >>confdefs.h <<_ACEOF
63526#define HAVE_LIBJPEG 1
63527_ACEOF
63528
63529  LIBS="-ljpeg $LIBS"
63530
63531else
63532   as_fn_error $? "--with-libjpeg=system specified, but no libjpeg found" "$LINENO" 5
63533fi
63534
63535
63536    USE_EXTERNAL_LIBJPEG=true
63537  else
63538    as_fn_error $? "Invalid use of --with-libjpeg: ${with_libjpeg}, use 'system' or 'bundled'" "$LINENO" 5
63539  fi
63540
63541
63542
63543
63544
63545# Check whether --with-giflib was given.
63546if test "${with_giflib+set}" = set; then :
63547  withval=$with_giflib;
63548fi
63549
63550
63551  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which giflib to use" >&5
63552$as_echo_n "checking for which giflib to use... " >&6; }
63553  # default is bundled
63554  DEFAULT_GIFLIB=bundled
63555  # if user didn't specify, use DEFAULT_GIFLIB
63556  if test "x${with_giflib}" = "x"; then
63557    with_giflib=${DEFAULT_GIFLIB}
63558  fi
63559  { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_giflib}" >&5
63560$as_echo "${with_giflib}" >&6; }
63561
63562  if test "x${with_giflib}" = "xbundled"; then
63563    USE_EXTERNAL_LIBGIF=false
63564  elif test "x${with_giflib}" = "xsystem"; then
63565    ac_fn_cxx_check_header_mongrel "$LINENO" "gif_lib.h" "ac_cv_header_gif_lib_h" "$ac_includes_default"
63566if test "x$ac_cv_header_gif_lib_h" = xyes; then :
63567
63568else
63569   as_fn_error $? "--with-giflib=system specified, but gif_lib.h not found!" "$LINENO" 5
63570fi
63571
63572
63573    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for DGifGetCode in -lgif" >&5
63574$as_echo_n "checking for DGifGetCode in -lgif... " >&6; }
63575if ${ac_cv_lib_gif_DGifGetCode+:} false; then :
63576  $as_echo_n "(cached) " >&6
63577else
63578  ac_check_lib_save_LIBS=$LIBS
63579LIBS="-lgif  $LIBS"
63580cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63581/* end confdefs.h.  */
63582
63583/* Override any GCC internal prototype to avoid an error.
63584   Use char because int might match the return type of a GCC
63585   builtin and then its argument prototype would still apply.  */
63586#ifdef __cplusplus
63587extern "C"
63588#endif
63589char DGifGetCode ();
63590int
63591main ()
63592{
63593return DGifGetCode ();
63594  ;
63595  return 0;
63596}
63597_ACEOF
63598if ac_fn_cxx_try_link "$LINENO"; then :
63599  ac_cv_lib_gif_DGifGetCode=yes
63600else
63601  ac_cv_lib_gif_DGifGetCode=no
63602fi
63603rm -f core conftest.err conftest.$ac_objext \
63604    conftest$ac_exeext conftest.$ac_ext
63605LIBS=$ac_check_lib_save_LIBS
63606fi
63607{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gif_DGifGetCode" >&5
63608$as_echo "$ac_cv_lib_gif_DGifGetCode" >&6; }
63609if test "x$ac_cv_lib_gif_DGifGetCode" = xyes; then :
63610  cat >>confdefs.h <<_ACEOF
63611#define HAVE_LIBGIF 1
63612_ACEOF
63613
63614  LIBS="-lgif $LIBS"
63615
63616else
63617   as_fn_error $? "--with-giflib=system specified, but no giflib found!" "$LINENO" 5
63618fi
63619
63620
63621    USE_EXTERNAL_LIBGIF=true
63622  else
63623    as_fn_error $? "Invalid value of --with-giflib: ${with_giflib}, use 'system' or 'bundled'" "$LINENO" 5
63624  fi
63625
63626
63627
63628
63629
63630# Check whether --with-libpng was given.
63631if test "${with_libpng+set}" = set; then :
63632  withval=$with_libpng;
63633fi
63634
63635
63636  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which libpng to use" >&5
63637$as_echo_n "checking for which libpng to use... " >&6; }
63638
63639  # default is bundled
63640  DEFAULT_LIBPNG=bundled
63641  # if user didn't specify, use DEFAULT_LIBPNG
63642  if test "x${with_libpng}" = "x"; then
63643      with_libpng=${DEFAULT_LIBPNG}
63644  fi
63645
63646  if test "x${with_libpng}" = "xbundled"; then
63647      USE_EXTERNAL_LIBPNG=false
63648      { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63649$as_echo "bundled" >&6; }
63650  elif test "x${with_libpng}" = "xsystem"; then
63651
63652pkg_failed=no
63653{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for PNG" >&5
63654$as_echo_n "checking for PNG... " >&6; }
63655
63656if test -n "$PNG_CFLAGS"; then
63657    pkg_cv_PNG_CFLAGS="$PNG_CFLAGS"
63658 elif test -n "$PKG_CONFIG"; then
63659    if test -n "$PKG_CONFIG" && \
63660    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63661  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63662  ac_status=$?
63663  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63664  test $ac_status = 0; }; then
63665  pkg_cv_PNG_CFLAGS=`$PKG_CONFIG --cflags "libpng" 2>/dev/null`
63666else
63667  pkg_failed=yes
63668fi
63669 else
63670    pkg_failed=untried
63671fi
63672if test -n "$PNG_LIBS"; then
63673    pkg_cv_PNG_LIBS="$PNG_LIBS"
63674 elif test -n "$PKG_CONFIG"; then
63675    if test -n "$PKG_CONFIG" && \
63676    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"libpng\""; } >&5
63677  ($PKG_CONFIG --exists --print-errors "libpng") 2>&5
63678  ac_status=$?
63679  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63680  test $ac_status = 0; }; then
63681  pkg_cv_PNG_LIBS=`$PKG_CONFIG --libs "libpng" 2>/dev/null`
63682else
63683  pkg_failed=yes
63684fi
63685 else
63686    pkg_failed=untried
63687fi
63688
63689
63690
63691if test $pkg_failed = yes; then
63692
63693if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63694        _pkg_short_errors_supported=yes
63695else
63696        _pkg_short_errors_supported=no
63697fi
63698        if test $_pkg_short_errors_supported = yes; then
63699	        PNG_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "libpng" 2>&1`
63700        else
63701	        PNG_PKG_ERRORS=`$PKG_CONFIG --print-errors "libpng" 2>&1`
63702        fi
63703	# Put the nasty error message in config.log where it belongs
63704	echo "$PNG_PKG_ERRORS" >&5
63705
63706	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63707$as_echo "no" >&6; }
63708                 LIBPNG_FOUND=no
63709elif test $pkg_failed = untried; then
63710	 LIBPNG_FOUND=no
63711else
63712	PNG_CFLAGS=$pkg_cv_PNG_CFLAGS
63713	PNG_LIBS=$pkg_cv_PNG_LIBS
63714        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63715$as_echo "yes" >&6; }
63716	 LIBPNG_FOUND=yes
63717fi
63718      if test "x${LIBPNG_FOUND}" = "xyes"; then
63719          USE_EXTERNAL_LIBPNG=true
63720          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63721$as_echo "system" >&6; }
63722      else
63723          { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63724$as_echo "system not found" >&6; }
63725          as_fn_error $? "--with-libpng=system specified, but no libpng found!" "$LINENO" 5
63726      fi
63727  else
63728      as_fn_error $? "Invalid value of --with-libpng: ${with_libpng}, use 'system' or 'bundled'" "$LINENO" 5
63729  fi
63730
63731
63732
63733
63734
63735# Check whether --with-zlib was given.
63736if test "${with_zlib+set}" = set; then :
63737  withval=$with_zlib;
63738fi
63739
63740
63741  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for compress in -lz" >&5
63742$as_echo_n "checking for compress in -lz... " >&6; }
63743if ${ac_cv_lib_z_compress+:} false; then :
63744  $as_echo_n "(cached) " >&6
63745else
63746  ac_check_lib_save_LIBS=$LIBS
63747LIBS="-lz  $LIBS"
63748cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63749/* end confdefs.h.  */
63750
63751/* Override any GCC internal prototype to avoid an error.
63752   Use char because int might match the return type of a GCC
63753   builtin and then its argument prototype would still apply.  */
63754#ifdef __cplusplus
63755extern "C"
63756#endif
63757char compress ();
63758int
63759main ()
63760{
63761return compress ();
63762  ;
63763  return 0;
63764}
63765_ACEOF
63766if ac_fn_cxx_try_link "$LINENO"; then :
63767  ac_cv_lib_z_compress=yes
63768else
63769  ac_cv_lib_z_compress=no
63770fi
63771rm -f core conftest.err conftest.$ac_objext \
63772    conftest$ac_exeext conftest.$ac_ext
63773LIBS=$ac_check_lib_save_LIBS
63774fi
63775{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_z_compress" >&5
63776$as_echo "$ac_cv_lib_z_compress" >&6; }
63777if test "x$ac_cv_lib_z_compress" = xyes; then :
63778   ZLIB_FOUND=yes
63779else
63780   ZLIB_FOUND=no
63781fi
63782
63783
63784  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which zlib to use" >&5
63785$as_echo_n "checking for which zlib to use... " >&6; }
63786
63787  DEFAULT_ZLIB=system
63788  if test "x$OPENJDK_TARGET_OS" = xwindows; then
63789    # On windows default is bundled...on others default is system
63790    DEFAULT_ZLIB=bundled
63791  fi
63792
63793  if test "x${ZLIB_FOUND}" != "xyes"; then
63794    # If we don't find any system...set default to bundled
63795    DEFAULT_ZLIB=bundled
63796  fi
63797
63798  # If user didn't specify, use DEFAULT_ZLIB
63799  if test "x${with_zlib}" = "x"; then
63800    with_zlib=${DEFAULT_ZLIB}
63801  fi
63802
63803  if test "x${with_zlib}" = "xbundled"; then
63804    USE_EXTERNAL_LIBZ=false
63805    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63806$as_echo "bundled" >&6; }
63807  elif test "x${with_zlib}" = "xsystem"; then
63808    if test "x${ZLIB_FOUND}" = "xyes"; then
63809      USE_EXTERNAL_LIBZ=true
63810      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63811$as_echo "system" >&6; }
63812    else
63813      { $as_echo "$as_me:${as_lineno-$LINENO}: result: system not found" >&5
63814$as_echo "system not found" >&6; }
63815      as_fn_error $? "--with-zlib=system specified, but no zlib found!" "$LINENO" 5
63816    fi
63817  else
63818    as_fn_error $? "Invalid value for --with-zlib: ${with_zlib}, use 'system' or 'bundled'" "$LINENO" 5
63819  fi
63820
63821
63822
63823
63824
63825# Check whether --with-lcms was given.
63826if test "${with_lcms+set}" = set; then :
63827  withval=$with_lcms;
63828fi
63829
63830
63831  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for which lcms to use" >&5
63832$as_echo_n "checking for which lcms to use... " >&6; }
63833
63834  DEFAULT_LCMS=bundled
63835  # If user didn't specify, use DEFAULT_LCMS
63836  if test "x${with_lcms}" = "x"; then
63837      with_lcms=${DEFAULT_LCMS}
63838  fi
63839
63840  if test "x${with_lcms}" = "xbundled"; then
63841    USE_EXTERNAL_LCMS=false
63842    { $as_echo "$as_me:${as_lineno-$LINENO}: result: bundled" >&5
63843$as_echo "bundled" >&6; }
63844  elif test "x${with_lcms}" = "xsystem"; then
63845    { $as_echo "$as_me:${as_lineno-$LINENO}: result: system" >&5
63846$as_echo "system" >&6; }
63847
63848pkg_failed=no
63849{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for LCMS" >&5
63850$as_echo_n "checking for LCMS... " >&6; }
63851
63852if test -n "$LCMS_CFLAGS"; then
63853    pkg_cv_LCMS_CFLAGS="$LCMS_CFLAGS"
63854 elif test -n "$PKG_CONFIG"; then
63855    if test -n "$PKG_CONFIG" && \
63856    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63857  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63858  ac_status=$?
63859  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63860  test $ac_status = 0; }; then
63861  pkg_cv_LCMS_CFLAGS=`$PKG_CONFIG --cflags "lcms2" 2>/dev/null`
63862else
63863  pkg_failed=yes
63864fi
63865 else
63866    pkg_failed=untried
63867fi
63868if test -n "$LCMS_LIBS"; then
63869    pkg_cv_LCMS_LIBS="$LCMS_LIBS"
63870 elif test -n "$PKG_CONFIG"; then
63871    if test -n "$PKG_CONFIG" && \
63872    { { $as_echo "$as_me:${as_lineno-$LINENO}: \$PKG_CONFIG --exists --print-errors \"lcms2\""; } >&5
63873  ($PKG_CONFIG --exists --print-errors "lcms2") 2>&5
63874  ac_status=$?
63875  $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
63876  test $ac_status = 0; }; then
63877  pkg_cv_LCMS_LIBS=`$PKG_CONFIG --libs "lcms2" 2>/dev/null`
63878else
63879  pkg_failed=yes
63880fi
63881 else
63882    pkg_failed=untried
63883fi
63884
63885
63886
63887if test $pkg_failed = yes; then
63888
63889if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then
63890        _pkg_short_errors_supported=yes
63891else
63892        _pkg_short_errors_supported=no
63893fi
63894        if test $_pkg_short_errors_supported = yes; then
63895	        LCMS_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors "lcms2" 2>&1`
63896        else
63897	        LCMS_PKG_ERRORS=`$PKG_CONFIG --print-errors "lcms2" 2>&1`
63898        fi
63899	# Put the nasty error message in config.log where it belongs
63900	echo "$LCMS_PKG_ERRORS" >&5
63901
63902	{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
63903$as_echo "no" >&6; }
63904                LCMS_FOUND=no
63905elif test $pkg_failed = untried; then
63906	LCMS_FOUND=no
63907else
63908	LCMS_CFLAGS=$pkg_cv_LCMS_CFLAGS
63909	LCMS_LIBS=$pkg_cv_LCMS_LIBS
63910        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
63911$as_echo "yes" >&6; }
63912	LCMS_FOUND=yes
63913fi
63914    if test "x${LCMS_FOUND}" = "xyes"; then
63915      USE_EXTERNAL_LCMS=true
63916    else
63917      as_fn_error $? "--with-lcms=system specified, but no lcms found!" "$LINENO" 5
63918    fi
63919  else
63920    as_fn_error $? "Invalid value for --with-lcms: ${with_lcms}, use 'system' or 'bundled'" "$LINENO" 5
63921  fi
63922
63923
63924
63925
63926
63927
63928
63929
63930
63931
63932
63933  # Setup libm (the maths library)
63934  if test "x$OPENJDK_TARGET_OS" != "xwindows"; then
63935    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for cos in -lm" >&5
63936$as_echo_n "checking for cos in -lm... " >&6; }
63937if ${ac_cv_lib_m_cos+:} false; then :
63938  $as_echo_n "(cached) " >&6
63939else
63940  ac_check_lib_save_LIBS=$LIBS
63941LIBS="-lm  $LIBS"
63942cat confdefs.h - <<_ACEOF >conftest.$ac_ext
63943/* end confdefs.h.  */
63944
63945/* Override any GCC internal prototype to avoid an error.
63946   Use char because int might match the return type of a GCC
63947   builtin and then its argument prototype would still apply.  */
63948#ifdef __cplusplus
63949extern "C"
63950#endif
63951char cos ();
63952int
63953main ()
63954{
63955return cos ();
63956  ;
63957  return 0;
63958}
63959_ACEOF
63960if ac_fn_cxx_try_link "$LINENO"; then :
63961  ac_cv_lib_m_cos=yes
63962else
63963  ac_cv_lib_m_cos=no
63964fi
63965rm -f core conftest.err conftest.$ac_objext \
63966    conftest$ac_exeext conftest.$ac_ext
63967LIBS=$ac_check_lib_save_LIBS
63968fi
63969{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_cos" >&5
63970$as_echo "$ac_cv_lib_m_cos" >&6; }
63971if test "x$ac_cv_lib_m_cos" = xyes; then :
63972  cat >>confdefs.h <<_ACEOF
63973#define HAVE_LIBM 1
63974_ACEOF
63975
63976  LIBS="-lm $LIBS"
63977
63978else
63979
63980        { $as_echo "$as_me:${as_lineno-$LINENO}: Maths library was not found" >&5
63981$as_echo "$as_me: Maths library was not found" >&6;}
63982
63983fi
63984
63985    LIBM="-lm"
63986  else
63987    LIBM=""
63988  fi
63989
63990
63991  # Setup libdl (for dynamic library loading)
63992  save_LIBS="$LIBS"
63993  LIBS=""
63994  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5
63995$as_echo_n "checking for dlopen in -ldl... " >&6; }
63996if ${ac_cv_lib_dl_dlopen+:} false; then :
63997  $as_echo_n "(cached) " >&6
63998else
63999  ac_check_lib_save_LIBS=$LIBS
64000LIBS="-ldl  $LIBS"
64001cat confdefs.h - <<_ACEOF >conftest.$ac_ext
64002/* end confdefs.h.  */
64003
64004/* Override any GCC internal prototype to avoid an error.
64005   Use char because int might match the return type of a GCC
64006   builtin and then its argument prototype would still apply.  */
64007#ifdef __cplusplus
64008extern "C"
64009#endif
64010char dlopen ();
64011int
64012main ()
64013{
64014return dlopen ();
64015  ;
64016  return 0;
64017}
64018_ACEOF
64019if ac_fn_cxx_try_link "$LINENO"; then :
64020  ac_cv_lib_dl_dlopen=yes
64021else
64022  ac_cv_lib_dl_dlopen=no
64023fi
64024rm -f core conftest.err conftest.$ac_objext \
64025    conftest$ac_exeext conftest.$ac_ext
64026LIBS=$ac_check_lib_save_LIBS
64027fi
64028{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5
64029$as_echo "$ac_cv_lib_dl_dlopen" >&6; }
64030if test "x$ac_cv_lib_dl_dlopen" = xyes; then :
64031  cat >>confdefs.h <<_ACEOF
64032#define HAVE_LIBDL 1
64033_ACEOF
64034
64035  LIBS="-ldl $LIBS"
64036
64037fi
64038
64039  LIBDL="$LIBS"
64040
64041  LIBS="$save_LIBS"
64042
64043  # Deprecated libraries, keep the flags for backwards compatibility
64044  if test "x$OPENJDK_TARGET_OS" = "xwindows"; then
64045
64046
64047# Check whether --with-dxsdk was given.
64048if test "${with_dxsdk+set}" = set; then :
64049  withval=$with_dxsdk; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&5
64050$as_echo "$as_me: WARNING: Option --with-dxsdk is deprecated and will be ignored." >&2;}
64051fi
64052
64053
64054
64055
64056# Check whether --with-dxsdk-lib was given.
64057if test "${with_dxsdk_lib+set}" = set; then :
64058  withval=$with_dxsdk_lib; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&5
64059$as_echo "$as_me: WARNING: Option --with-dxsdk-lib is deprecated and will be ignored." >&2;}
64060fi
64061
64062
64063
64064
64065# Check whether --with-dxsdk-include was given.
64066if test "${with_dxsdk_include+set}" = set; then :
64067  withval=$with_dxsdk_include; { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&5
64068$as_echo "$as_me: WARNING: Option --with-dxsdk-include is deprecated and will be ignored." >&2;}
64069fi
64070
64071
64072  fi
64073
64074  # Control if libzip can use mmap. Available for purposes of overriding.
64075  LIBZIP_CAN_USE_MMAP=true
64076
64077
64078
64079
64080
64081
64082
64083
64084
64085
64086
64087
64088
64089
64090###############################################################################
64091#
64092# We need to do some final tweaking, when everything else is done.
64093#
64094###############################################################################
64095
64096
64097  # Check whether --enable-new-hotspot-build was given.
64098if test "${enable_new_hotspot_build+set}" = set; then :
64099  enableval=$enable_new_hotspot_build;
64100fi
64101
64102
64103   if test "x$enable_new_hotspot_build" = "x" || test "x$enable_new_hotspot_build" = "xyes"; then
64104     USE_NEW_HOTSPOT_BUILD=true
64105   else
64106     USE_NEW_HOTSPOT_BUILD=false
64107   fi
64108
64109
64110  case $HOTSPOT_DEBUG_LEVEL in
64111    product )
64112      VARIANT="OPT"
64113      FASTDEBUG="false"
64114      DEBUG_CLASSFILES="false"
64115      ;;
64116    fastdebug )
64117      VARIANT="DBG"
64118      FASTDEBUG="true"
64119      DEBUG_CLASSFILES="true"
64120      ;;
64121    debug )
64122      VARIANT="DBG"
64123      FASTDEBUG="false"
64124      DEBUG_CLASSFILES="true"
64125      ;;
64126    optimized )
64127      VARIANT="OPT"
64128      FASTDEBUG="false"
64129      DEBUG_CLASSFILES="false"
64130      ;;
64131  esac
64132
64133
64134
64135
64136  if test "x$OPENJDK_TARGET_OS" = "xmacosx"; then
64137    MACOSX_UNIVERSAL="true"
64138  fi
64139
64140
64141
64142  # Make sure JVM_VARIANTS_COMMA use minimal1 for backwards compatibility
64143  JVM_VARIANTS_COMMA=`$ECHO ,$JVM_VARIANTS_OPT, | $SED -e 's/,minimal,/,minimal1,/'`
64144
64145  JVM_VARIANT_SERVER=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,server,/!s/.*/false/g' -e '/,server,/s/.*/true/g'`
64146  JVM_VARIANT_CLIENT=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,client,/!s/.*/false/g' -e '/,client,/s/.*/true/g'`
64147  JVM_VARIANT_MINIMAL1=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,minimal1\?,/!s/.*/false/g' -e '/,minimal1\?,/s/.*/true/g'`
64148  JVM_VARIANT_CORE=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,core,/!s/.*/false/g' -e '/,core,/s/.*/true/g'`
64149  JVM_VARIANT_ZERO=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zero,/!s/.*/false/g' -e '/,zero,/s/.*/true/g'`
64150  JVM_VARIANT_ZEROSHARK=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,zeroshark,/!s/.*/false/g' -e '/,zeroshark,/s/.*/true/g'`
64151  JVM_VARIANT_CUSTOM=`$ECHO "$JVM_VARIANTS_COMMA" | $SED -e '/,custom,/!s/.*/false/g' -e '/,custom,/s/.*/true/g'`
64152
64153  #####
64154  # Generate the legacy makefile targets for hotspot.
64155  HOTSPOT_TARGET=""
64156
64157  if test "x$JVM_VARIANT_SERVER" = xtrue; then
64158    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL} "
64159  fi
64160
64161  if test "x$JVM_VARIANT_CLIENT" = xtrue; then
64162    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}1 "
64163  fi
64164
64165  if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
64166    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}minimal1 "
64167  fi
64168
64169  if test "x$JVM_VARIANT_ZERO" = xtrue; then
64170    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}zero "
64171  fi
64172
64173  if test "x$JVM_VARIANT_ZEROSHARK" = xtrue; then
64174    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}shark "
64175  fi
64176
64177  if test "x$JVM_VARIANT_CORE" = xtrue; then
64178    HOTSPOT_TARGET="$HOTSPOT_TARGET${HOTSPOT_DEBUG_LEVEL}core "
64179  fi
64180
64181  HOTSPOT_TARGET="$HOTSPOT_TARGET docs export_$HOTSPOT_DEBUG_LEVEL"
64182
64183  # On Macosx universal binaries are produced, but they only contain
64184  # 64 bit intel. This invalidates control of which jvms are built
64185  # from configure, but only server is valid anyway. Fix this
64186  # when hotspot makefiles are rewritten.
64187  if test "x$MACOSX_UNIVERSAL" = xtrue; then
64188    HOTSPOT_TARGET=universal_${HOTSPOT_DEBUG_LEVEL}
64189  fi
64190
64191  HOTSPOT_MAKE_ARGS="$HOTSPOT_TARGET"
64192
64193
64194  # Control wether Hotspot runs Queens test after build.
64195  # Check whether --enable-hotspot-test-in-build was given.
64196if test "${enable_hotspot_test_in_build+set}" = set; then :
64197  enableval=$enable_hotspot_test_in_build;
64198else
64199  enable_hotspot_test_in_build=no
64200fi
64201
64202  if test "x$enable_hotspot_test_in_build" = "xyes"; then
64203    TEST_IN_BUILD=true
64204  else
64205    TEST_IN_BUILD=false
64206  fi
64207
64208
64209  if test "x$USE_NEW_HOTSPOT_BUILD" = xfalse; then
64210    if test "x$JVM_VARIANT_CLIENT" = xtrue; then
64211      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
64212        as_fn_error $? "You cannot build a client JVM for a 64-bit machine." "$LINENO" 5
64213      fi
64214    fi
64215    if test "x$JVM_VARIANT_MINIMAL1" = xtrue; then
64216      if test "x$OPENJDK_TARGET_CPU_BITS" = x64; then
64217        as_fn_error $? "You cannot build a minimal JVM for a 64-bit machine." "$LINENO" 5
64218      fi
64219    fi
64220    if test "x$JVM_VARIANT_CUSTOM" = xtrue; then
64221        as_fn_error $? "You cannot build a custom JVM using the old hotspot build system." "$LINENO" 5
64222    fi
64223  fi
64224
64225
64226
64227
64228
64229
64230
64231
64232
64233
64234
64235  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if elliptic curve crypto implementation is present" >&5
64236$as_echo_n "checking if elliptic curve crypto implementation is present... " >&6; }
64237
64238  if test -d "${SRC_ROOT}/jdk/src/jdk.crypto.ec/share/native/libsunec/impl"; then
64239    ENABLE_INTREE_EC=yes
64240    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
64241$as_echo "yes" >&6; }
64242  else
64243    ENABLE_INTREE_EC=no
64244    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64245$as_echo "no" >&6; }
64246  fi
64247
64248
64249
64250
64251  # Check whether --enable-jtreg-failure-handler was given.
64252if test "${enable_jtreg_failure_handler+set}" = set; then :
64253  enableval=$enable_jtreg_failure_handler;
64254fi
64255
64256
64257  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if jtreg failure handler should be built" >&5
64258$as_echo_n "checking if jtreg failure handler should be built... " >&6; }
64259
64260  if test "x$enable_jtreg_failure_handler" = "xyes"; then
64261    if test "x$JT_HOME" = "x"; then
64262      as_fn_error $? "Cannot enable jtreg failure handler without jtreg." "$LINENO" 5
64263    else
64264      BUILD_FAILURE_HANDLER=true
64265      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, forced" >&5
64266$as_echo "yes, forced" >&6; }
64267    fi
64268  elif test "x$enable_jtreg_failure_handler" = "xno"; then
64269    BUILD_FAILURE_HANDLER=false
64270    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
64271$as_echo "no, forced" >&6; }
64272  elif test "x$enable_jtreg_failure_handler" = "xauto" \
64273      || test "x$enable_jtreg_failure_handler" = "x"; then
64274    if test "x$JT_HOME" = "x"; then
64275      BUILD_FAILURE_HANDLER=false
64276      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, missing jtreg" >&5
64277$as_echo "no, missing jtreg" >&6; }
64278    else
64279      BUILD_FAILURE_HANDLER=true
64280      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes, jtreg present" >&5
64281$as_echo "yes, jtreg present" >&6; }
64282    fi
64283  else
64284    as_fn_error $? "Invalid value for --enable-jtreg-failure-handler: $enable_jtreg_failure_handler" "$LINENO" 5
64285  fi
64286
64287
64288
64289
64290###############################################################################
64291#
64292# Configure parts of the build that only affect the build performance,
64293# not the result.
64294#
64295###############################################################################
64296
64297
64298  # How many cores do we have on this build system?
64299
64300# Check whether --with-num-cores was given.
64301if test "${with_num_cores+set}" = set; then :
64302  withval=$with_num_cores;
64303fi
64304
64305  if test "x$with_num_cores" = x; then
64306    # The number of cores were not specified, try to probe them.
64307
64308  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for number of cores" >&5
64309$as_echo_n "checking for number of cores... " >&6; }
64310  NUM_CORES=1
64311  FOUND_CORES=no
64312
64313  if test -f /proc/cpuinfo; then
64314    # Looks like a Linux (or cygwin) system
64315    NUM_CORES=`cat /proc/cpuinfo  | grep -c processor`
64316    FOUND_CORES=yes
64317  elif test -x /usr/sbin/psrinfo; then
64318    # Looks like a Solaris system
64319    NUM_CORES=`LC_MESSAGES=C /usr/sbin/psrinfo -v | grep -c on-line`
64320    FOUND_CORES=yes
64321  elif test -x /usr/sbin/sysctl; then
64322    # Looks like a MacOSX system
64323    NUM_CORES=`/usr/sbin/sysctl -n hw.ncpu`
64324    FOUND_CORES=yes
64325  elif test "x$OPENJDK_BUILD_OS" = xaix ; then
64326    NUM_CORES=`/usr/sbin/prtconf | grep "^Number Of Processors" | awk '{ print $4 }'`
64327    FOUND_CORES=yes
64328  elif test -n "$NUMBER_OF_PROCESSORS"; then
64329    # On windows, look in the env
64330    NUM_CORES=$NUMBER_OF_PROCESSORS
64331    FOUND_CORES=yes
64332  fi
64333
64334  if test "x$FOUND_CORES" = xyes; then
64335    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NUM_CORES" >&5
64336$as_echo "$NUM_CORES" >&6; }
64337  else
64338    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect number of cores, defaulting to 1" >&5
64339$as_echo "could not detect number of cores, defaulting to 1" >&6; }
64340    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This will disable all parallelism from build!" >&5
64341$as_echo "$as_me: WARNING: This will disable all parallelism from build!" >&2;}
64342  fi
64343
64344  else
64345    NUM_CORES=$with_num_cores
64346  fi
64347
64348
64349
64350  # How much memory do we have on this build system?
64351
64352# Check whether --with-memory-size was given.
64353if test "${with_memory_size+set}" = set; then :
64354  withval=$with_memory_size;
64355fi
64356
64357  if test "x$with_memory_size" = x; then
64358    # The memory size was not specified, try to probe it.
64359
64360  { $as_echo "$as_me:${as_lineno-$LINENO}: checking for memory size" >&5
64361$as_echo_n "checking for memory size... " >&6; }
64362  # Default to 1024 MB
64363  MEMORY_SIZE=1024
64364  FOUND_MEM=no
64365
64366  if test -f /proc/meminfo; then
64367    # Looks like a Linux (or cygwin) system
64368    MEMORY_SIZE=`cat /proc/meminfo | grep MemTotal | awk '{print $2}'`
64369    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024`
64370    FOUND_MEM=yes
64371  elif test -x /usr/sbin/prtconf; then
64372    # Looks like a Solaris or AIX system
64373    MEMORY_SIZE=`/usr/sbin/prtconf 2> /dev/null | grep "^Memory [Ss]ize" | awk '{ print $3 }'`
64374    FOUND_MEM=yes
64375  elif test -x /usr/sbin/sysctl; then
64376    # Looks like a MacOSX system
64377    MEMORY_SIZE=`/usr/sbin/sysctl -n hw.memsize`
64378    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64379    FOUND_MEM=yes
64380  elif test "x$OPENJDK_BUILD_OS" = xwindows; then
64381    # Windows, but without cygwin
64382    MEMORY_SIZE=`wmic computersystem get totalphysicalmemory -value | grep = | cut -d "=" -f 2-`
64383    MEMORY_SIZE=`expr $MEMORY_SIZE / 1024 / 1024`
64384    FOUND_MEM=yes
64385  fi
64386
64387  if test "x$FOUND_MEM" = xyes; then
64388    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MEMORY_SIZE MB" >&5
64389$as_echo "$MEMORY_SIZE MB" >&6; }
64390  else
64391    { $as_echo "$as_me:${as_lineno-$LINENO}: result: could not detect memory size, defaulting to $MEMORY_SIZE MB" >&5
64392$as_echo "could not detect memory size, defaulting to $MEMORY_SIZE MB" >&6; }
64393    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: This might seriously impact build performance!" >&5
64394$as_echo "$as_me: WARNING: This might seriously impact build performance!" >&2;}
64395  fi
64396
64397  else
64398    MEMORY_SIZE=$with_memory_size
64399  fi
64400
64401
64402
64403  # Provide a decent default number of parallel jobs for make depending on
64404  # number of cores, amount of memory and machine architecture.
64405
64406# Check whether --with-jobs was given.
64407if test "${with_jobs+set}" = set; then :
64408  withval=$with_jobs;
64409fi
64410
64411  if test "x$with_jobs" = x; then
64412    # Number of jobs was not specified, calculate.
64413    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for appropriate number of jobs to run in parallel" >&5
64414$as_echo_n "checking for appropriate number of jobs to run in parallel... " >&6; }
64415    # Approximate memory in GB.
64416    memory_gb=`expr $MEMORY_SIZE / 1024`
64417    # Pick the lowest of memory in gb and number of cores.
64418    if test "$memory_gb" -lt "$NUM_CORES"; then
64419      JOBS="$memory_gb"
64420    else
64421      JOBS="$NUM_CORES"
64422    fi
64423    if test "$JOBS" -eq "0"; then
64424      JOBS=1
64425    fi
64426    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JOBS" >&5
64427$as_echo "$JOBS" >&6; }
64428  else
64429    JOBS=$with_jobs
64430  fi
64431
64432
64433
64434  # The number of test jobs will be chosen automatically if TEST_JOBS is 0
64435
64436# Check whether --with-test-jobs was given.
64437if test "${with_test_jobs+set}" = set; then :
64438  withval=$with_test_jobs;
64439fi
64440
64441  if test "x$with_test_jobs" = x; then
64442      TEST_JOBS=0
64443  else
64444      TEST_JOBS=$with_test_jobs
64445  fi
64446
64447
64448
64449# Setup arguments for the boot jdk (after cores and memory have been setup)
64450
64451  ##############################################################################
64452  #
64453  # Specify jvm options for anything that is run with the Boot JDK.
64454  # Not all JVM:s accept the same arguments on the command line.
64455  #
64456
64457# Check whether --with-boot-jdk-jvmargs was given.
64458if test "${with_boot_jdk_jvmargs+set}" = set; then :
64459  withval=$with_boot_jdk_jvmargs;
64460fi
64461
64462
64463  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command " >&5
64464$as_echo_n "checking flags for boot jdk java command ... " >&6; }
64465
64466  # Disable special log output when a debug build is used as Boot JDK...
64467
64468  $ECHO "Check if jvm arg is ok: -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput" >&5
64469  $ECHO "Command: $JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version" >&5
64470  OUTPUT=`$JAVA -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput -version 2>&1`
64471  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64472  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64473  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64474    boot_jdk_jvmargs="$boot_jdk_jvmargs -XX:-PrintVMOptions -XX:-UnlockDiagnosticVMOptions -XX:-LogVMOutput"
64475    JVM_ARG_OK=true
64476  else
64477    $ECHO "Arg failed:" >&5
64478    $ECHO "$OUTPUT" >&5
64479    JVM_ARG_OK=false
64480  fi
64481
64482
64483  # Apply user provided options.
64484
64485  $ECHO "Check if jvm arg is ok: $with_boot_jdk_jvmargs" >&5
64486  $ECHO "Command: $JAVA $with_boot_jdk_jvmargs -version" >&5
64487  OUTPUT=`$JAVA $with_boot_jdk_jvmargs -version 2>&1`
64488  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64489  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64490  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64491    boot_jdk_jvmargs="$boot_jdk_jvmargs $with_boot_jdk_jvmargs"
64492    JVM_ARG_OK=true
64493  else
64494    $ECHO "Arg failed:" >&5
64495    $ECHO "$OUTPUT" >&5
64496    JVM_ARG_OK=false
64497  fi
64498
64499
64500  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs" >&5
64501$as_echo "$boot_jdk_jvmargs" >&6; }
64502
64503  # For now, general JAVA_FLAGS are the same as the boot jdk jvmargs
64504  JAVA_FLAGS=$boot_jdk_jvmargs
64505
64506
64507
64508  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for big workloads" >&5
64509$as_echo_n "checking flags for boot jdk java command for big workloads... " >&6; }
64510
64511  # Starting amount of heap memory.
64512
64513  $ECHO "Check if jvm arg is ok: -Xms64M" >&5
64514  $ECHO "Command: $JAVA -Xms64M -version" >&5
64515  OUTPUT=`$JAVA -Xms64M -version 2>&1`
64516  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64517  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64518  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64519    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xms64M"
64520    JVM_ARG_OK=true
64521  else
64522    $ECHO "Arg failed:" >&5
64523    $ECHO "$OUTPUT" >&5
64524    JVM_ARG_OK=false
64525  fi
64526
64527
64528  # Maximum amount of heap memory.
64529  # Maximum stack size.
64530  JVM_MAX_HEAP=`expr $MEMORY_SIZE / 2`
64531  if test "x$BOOT_JDK_BITS" = "x32"; then
64532    if test "$JVM_MAX_HEAP" -gt "1100"; then
64533      JVM_MAX_HEAP=1100
64534    elif test "$JVM_MAX_HEAP" -lt "512"; then
64535      JVM_MAX_HEAP=512
64536    fi
64537    STACK_SIZE=768
64538  else
64539    # Running a 64 bit JVM allows for and requires a bigger heap
64540    if test "$JVM_MAX_HEAP" -gt "1600"; then
64541      JVM_MAX_HEAP=1600
64542    elif test "$JVM_MAX_HEAP" -lt "512"; then
64543      JVM_MAX_HEAP=512
64544    fi
64545    STACK_SIZE=1536
64546  fi
64547
64548  $ECHO "Check if jvm arg is ok: -Xmx${JVM_MAX_HEAP}M" >&5
64549  $ECHO "Command: $JAVA -Xmx${JVM_MAX_HEAP}M -version" >&5
64550  OUTPUT=`$JAVA -Xmx${JVM_MAX_HEAP}M -version 2>&1`
64551  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64552  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64553  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64554    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -Xmx${JVM_MAX_HEAP}M"
64555    JVM_ARG_OK=true
64556  else
64557    $ECHO "Arg failed:" >&5
64558    $ECHO "$OUTPUT" >&5
64559    JVM_ARG_OK=false
64560  fi
64561
64562
64563  $ECHO "Check if jvm arg is ok: -XX:ThreadStackSize=$STACK_SIZE" >&5
64564  $ECHO "Command: $JAVA -XX:ThreadStackSize=$STACK_SIZE -version" >&5
64565  OUTPUT=`$JAVA -XX:ThreadStackSize=$STACK_SIZE -version 2>&1`
64566  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64567  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64568  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64569    boot_jdk_jvmargs_big="$boot_jdk_jvmargs_big -XX:ThreadStackSize=$STACK_SIZE"
64570    JVM_ARG_OK=true
64571  else
64572    $ECHO "Arg failed:" >&5
64573    $ECHO "$OUTPUT" >&5
64574    JVM_ARG_OK=false
64575  fi
64576
64577
64578  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_big" >&5
64579$as_echo "$boot_jdk_jvmargs_big" >&6; }
64580
64581  JAVA_FLAGS_BIG=$boot_jdk_jvmargs_big
64582
64583
64584  # By default, the main javac compilations use big
64585  JAVA_FLAGS_JAVAC="$JAVA_FLAGS_BIG"
64586
64587
64588  { $as_echo "$as_me:${as_lineno-$LINENO}: checking flags for boot jdk java command for small workloads" >&5
64589$as_echo_n "checking flags for boot jdk java command for small workloads... " >&6; }
64590
64591  # Use serial gc for small short lived tools if possible
64592
64593  $ECHO "Check if jvm arg is ok: -XX:+UseSerialGC" >&5
64594  $ECHO "Command: $JAVA -XX:+UseSerialGC -version" >&5
64595  OUTPUT=`$JAVA -XX:+UseSerialGC -version 2>&1`
64596  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64597  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64598  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64599    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:+UseSerialGC"
64600    JVM_ARG_OK=true
64601  else
64602    $ECHO "Arg failed:" >&5
64603    $ECHO "$OUTPUT" >&5
64604    JVM_ARG_OK=false
64605  fi
64606
64607
64608  $ECHO "Check if jvm arg is ok: -Xms32M" >&5
64609  $ECHO "Command: $JAVA -Xms32M -version" >&5
64610  OUTPUT=`$JAVA -Xms32M -version 2>&1`
64611  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64612  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64613  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64614    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xms32M"
64615    JVM_ARG_OK=true
64616  else
64617    $ECHO "Arg failed:" >&5
64618    $ECHO "$OUTPUT" >&5
64619    JVM_ARG_OK=false
64620  fi
64621
64622
64623  $ECHO "Check if jvm arg is ok: -Xmx512M" >&5
64624  $ECHO "Command: $JAVA -Xmx512M -version" >&5
64625  OUTPUT=`$JAVA -Xmx512M -version 2>&1`
64626  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64627  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64628  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64629    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -Xmx512M"
64630    JVM_ARG_OK=true
64631  else
64632    $ECHO "Arg failed:" >&5
64633    $ECHO "$OUTPUT" >&5
64634    JVM_ARG_OK=false
64635  fi
64636
64637
64638  $ECHO "Check if jvm arg is ok: -XX:TieredStopAtLevel=1" >&5
64639  $ECHO "Command: $JAVA -XX:TieredStopAtLevel=1 -version" >&5
64640  OUTPUT=`$JAVA -XX:TieredStopAtLevel=1 -version 2>&1`
64641  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64642  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64643  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64644    boot_jdk_jvmargs_small="$boot_jdk_jvmargs_small -XX:TieredStopAtLevel=1"
64645    JVM_ARG_OK=true
64646  else
64647    $ECHO "Arg failed:" >&5
64648    $ECHO "$OUTPUT" >&5
64649    JVM_ARG_OK=false
64650  fi
64651
64652
64653  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $boot_jdk_jvmargs_small" >&5
64654$as_echo "$boot_jdk_jvmargs_small" >&6; }
64655
64656  JAVA_FLAGS_SMALL=$boot_jdk_jvmargs_small
64657
64658
64659  JAVA_TOOL_FLAGS_SMALL=""
64660  for f in $JAVA_FLAGS_SMALL; do
64661    JAVA_TOOL_FLAGS_SMALL="$JAVA_TOOL_FLAGS_SMALL -J$f"
64662  done
64663
64664
64665
64666# Setup smart javac (after cores and memory have been setup)
64667
64668
64669# Check whether --with-sjavac-server-java was given.
64670if test "${with_sjavac_server_java+set}" = set; then :
64671  withval=$with_sjavac_server_java;
64672fi
64673
64674
64675  if test "x$with_sjavac_server_java" != x; then
64676    SJAVAC_SERVER_JAVA="$with_sjavac_server_java"
64677    FOUND_VERSION=`$SJAVAC_SERVER_JAVA -version 2>&1 | grep " version \""`
64678    if test "x$FOUND_VERSION" = x; then
64679      as_fn_error $? "Could not execute server java: $SJAVAC_SERVER_JAVA" "$LINENO" 5
64680    fi
64681  else
64682    SJAVAC_SERVER_JAVA="$JAVA"
64683  fi
64684
64685
64686  if test "$MEMORY_SIZE" -gt "3000"; then
64687
64688  $ECHO "Check if jvm arg is ok: -d64" >&5
64689  $ECHO "Command: $SJAVAC_SERVER_JAVA -d64 -version" >&5
64690  OUTPUT=`$SJAVAC_SERVER_JAVA -d64 -version 2>&1`
64691  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64692  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64693  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64694    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -d64"
64695    JVM_ARG_OK=true
64696  else
64697    $ECHO "Arg failed:" >&5
64698    $ECHO "$OUTPUT" >&5
64699    JVM_ARG_OK=false
64700  fi
64701
64702    if test "$JVM_ARG_OK" = true; then
64703      JVM_64BIT=true
64704      JVM_ARG_OK=false
64705    fi
64706  fi
64707
64708  MX_VALUE=`expr $MEMORY_SIZE / 2`
64709  if test "$JVM_64BIT" = true; then
64710    # Set ms lower than mx since more than one instance of the server might
64711    # get launched at the same time before they figure out which instance won.
64712    MS_VALUE=512
64713    if test "$MX_VALUE" -gt "2048"; then
64714      MX_VALUE=2048
64715    fi
64716  else
64717    MS_VALUE=256
64718    if test "$MX_VALUE" -gt "1500"; then
64719      MX_VALUE=1500
64720    fi
64721  fi
64722  if test "$MX_VALUE" -lt "512"; then
64723    MX_VALUE=512
64724  fi
64725
64726  $ECHO "Check if jvm arg is ok: -Xms${MS_VALUE}M -Xmx${MX_VALUE}M" >&5
64727  $ECHO "Command: $SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version" >&5
64728  OUTPUT=`$SJAVAC_SERVER_JAVA -Xms${MS_VALUE}M -Xmx${MX_VALUE}M -version 2>&1`
64729  FOUND_WARN=`$ECHO "$OUTPUT" | grep -i warn`
64730  FOUND_VERSION=`$ECHO $OUTPUT | grep " version \""`
64731  if test "x$FOUND_VERSION" != x && test "x$FOUND_WARN" = x; then
64732    SJAVAC_SERVER_JAVA_FLAGS="$SJAVAC_SERVER_JAVA_FLAGS -Xms${MS_VALUE}M -Xmx${MX_VALUE}M"
64733    JVM_ARG_OK=true
64734  else
64735    $ECHO "Arg failed:" >&5
64736    $ECHO "$OUTPUT" >&5
64737    JVM_ARG_OK=false
64738  fi
64739
64740
64741
64742  # Check whether --enable-sjavac was given.
64743if test "${enable_sjavac+set}" = set; then :
64744  enableval=$enable_sjavac; ENABLE_SJAVAC="${enableval}"
64745else
64746  ENABLE_SJAVAC="no"
64747fi
64748
64749  if test "x$JVM_ARG_OK" = "xfalse"; then
64750    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&5
64751$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling sjavac" >&2;}
64752    ENABLE_SJAVAC="no"
64753  fi
64754  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use sjavac" >&5
64755$as_echo_n "checking whether to use sjavac... " >&6; }
64756  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_SJAVAC" >&5
64757$as_echo "$ENABLE_SJAVAC" >&6; }
64758
64759
64760  # Check whether --enable-javac-server was given.
64761if test "${enable_javac_server+set}" = set; then :
64762  enableval=$enable_javac_server; ENABLE_JAVAC_SERVER="${enableval}"
64763else
64764  ENABLE_JAVAC_SERVER="yes"
64765fi
64766
64767  if test "x$JVM_ARG_OK" = "xfalse"; then
64768    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&5
64769$as_echo "$as_me: WARNING: Could not set -Xms${MS_VALUE}M -Xmx${MX_VALUE}M, disabling javac server" >&2;}
64770    ENABLE_JAVAC_SERVER="no"
64771  fi
64772  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use javac server" >&5
64773$as_echo_n "checking whether to use javac server... " >&6; }
64774  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ENABLE_JAVAC_SERVER" >&5
64775$as_echo "$ENABLE_JAVAC_SERVER" >&6; }
64776
64777
64778  if test "x$ENABLE_JAVAC_SERVER" = "xyes" || test "x$ENABLE_SJAVAC" = "xyes"; then
64779    # When using a server javac, the small client instances do not need much
64780    # resources.
64781    JAVA_FLAGS_JAVAC="$JAVA_FLAGS_SMALL"
64782  fi
64783
64784
64785# Setup use of icecc if requested
64786
64787  # Check whether --enable-icecc was given.
64788if test "${enable_icecc+set}" = set; then :
64789  enableval=$enable_icecc;
64790fi
64791
64792
64793  if test "x${enable_icecc}" = "xyes"; then
64794
64795
64796
64797  # Publish this variable in the help.
64798
64799
64800  if [ -z "${ICECC_CMD+x}" ]; then
64801    # The variable is not set by user, try to locate tool using the code snippet
64802    for ac_prog in icecc
64803do
64804  # Extract the first word of "$ac_prog", so it can be a program name with args.
64805set dummy $ac_prog; ac_word=$2
64806{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64807$as_echo_n "checking for $ac_word... " >&6; }
64808if ${ac_cv_path_ICECC_CMD+:} false; then :
64809  $as_echo_n "(cached) " >&6
64810else
64811  case $ICECC_CMD in
64812  [\\/]* | ?:[\\/]*)
64813  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64814  ;;
64815  *)
64816  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64817for as_dir in $PATH
64818do
64819  IFS=$as_save_IFS
64820  test -z "$as_dir" && as_dir=.
64821    for ac_exec_ext in '' $ac_executable_extensions; do
64822  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64823    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64824    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64825    break 2
64826  fi
64827done
64828  done
64829IFS=$as_save_IFS
64830
64831  ;;
64832esac
64833fi
64834ICECC_CMD=$ac_cv_path_ICECC_CMD
64835if test -n "$ICECC_CMD"; then
64836  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64837$as_echo "$ICECC_CMD" >&6; }
64838else
64839  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64840$as_echo "no" >&6; }
64841fi
64842
64843
64844  test -n "$ICECC_CMD" && break
64845done
64846
64847  else
64848    # The variable is set, but is it from the command line or the environment?
64849
64850    # Try to remove the string !ICECC_CMD! from our list.
64851    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CMD!/}
64852    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
64853      # If it failed, the variable was not from the command line. Ignore it,
64854      # but warn the user (except for BASH, which is always set by the calling BASH).
64855      if test "xICECC_CMD" != xBASH; then
64856        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&5
64857$as_echo "$as_me: WARNING: Ignoring value of ICECC_CMD from the environment. Use command line variables instead." >&2;}
64858      fi
64859      # Try to locate tool using the code snippet
64860      for ac_prog in icecc
64861do
64862  # Extract the first word of "$ac_prog", so it can be a program name with args.
64863set dummy $ac_prog; ac_word=$2
64864{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64865$as_echo_n "checking for $ac_word... " >&6; }
64866if ${ac_cv_path_ICECC_CMD+:} false; then :
64867  $as_echo_n "(cached) " >&6
64868else
64869  case $ICECC_CMD in
64870  [\\/]* | ?:[\\/]*)
64871  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64872  ;;
64873  *)
64874  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64875for as_dir in $PATH
64876do
64877  IFS=$as_save_IFS
64878  test -z "$as_dir" && as_dir=.
64879    for ac_exec_ext in '' $ac_executable_extensions; do
64880  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64881    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64882    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64883    break 2
64884  fi
64885done
64886  done
64887IFS=$as_save_IFS
64888
64889  ;;
64890esac
64891fi
64892ICECC_CMD=$ac_cv_path_ICECC_CMD
64893if test -n "$ICECC_CMD"; then
64894  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64895$as_echo "$ICECC_CMD" >&6; }
64896else
64897  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64898$as_echo "no" >&6; }
64899fi
64900
64901
64902  test -n "$ICECC_CMD" && break
64903done
64904
64905    else
64906      # If it succeeded, then it was overridden by the user. We will use it
64907      # for the tool.
64908
64909      # First remove it from the list of overridden variables, so we can test
64910      # for unknown variables in the end.
64911      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
64912
64913      # Check if we try to supply an empty value
64914      if test "x$ICECC_CMD" = x; then
64915        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CMD= (no value)" >&5
64916$as_echo "$as_me: Setting user supplied tool ICECC_CMD= (no value)" >&6;}
64917        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64918$as_echo_n "checking for ICECC_CMD... " >&6; }
64919        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
64920$as_echo "disabled" >&6; }
64921      else
64922        # Check if the provided tool contains a complete path.
64923        tool_specified="$ICECC_CMD"
64924        tool_basename="${tool_specified##*/}"
64925        if test "x$tool_basename" = "x$tool_specified"; then
64926          # A command without a complete path is provided, search $PATH.
64927          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CMD=$tool_basename" >&5
64928$as_echo "$as_me: Will search for user supplied tool ICECC_CMD=$tool_basename" >&6;}
64929          # Extract the first word of "$tool_basename", so it can be a program name with args.
64930set dummy $tool_basename; ac_word=$2
64931{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
64932$as_echo_n "checking for $ac_word... " >&6; }
64933if ${ac_cv_path_ICECC_CMD+:} false; then :
64934  $as_echo_n "(cached) " >&6
64935else
64936  case $ICECC_CMD in
64937  [\\/]* | ?:[\\/]*)
64938  ac_cv_path_ICECC_CMD="$ICECC_CMD" # Let the user override the test with a path.
64939  ;;
64940  *)
64941  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
64942for as_dir in $PATH
64943do
64944  IFS=$as_save_IFS
64945  test -z "$as_dir" && as_dir=.
64946    for ac_exec_ext in '' $ac_executable_extensions; do
64947  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
64948    ac_cv_path_ICECC_CMD="$as_dir/$ac_word$ac_exec_ext"
64949    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
64950    break 2
64951  fi
64952done
64953  done
64954IFS=$as_save_IFS
64955
64956  ;;
64957esac
64958fi
64959ICECC_CMD=$ac_cv_path_ICECC_CMD
64960if test -n "$ICECC_CMD"; then
64961  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CMD" >&5
64962$as_echo "$ICECC_CMD" >&6; }
64963else
64964  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
64965$as_echo "no" >&6; }
64966fi
64967
64968
64969          if test "x$ICECC_CMD" = x; then
64970            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
64971          fi
64972        else
64973          # Otherwise we believe it is a complete path. Use it as it is.
64974          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CMD=$tool_specified" >&5
64975$as_echo "$as_me: Will use user supplied tool ICECC_CMD=$tool_specified" >&6;}
64976          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CMD" >&5
64977$as_echo_n "checking for ICECC_CMD... " >&6; }
64978          if test ! -x "$tool_specified"; then
64979            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
64980$as_echo "not found" >&6; }
64981            as_fn_error $? "User supplied tool ICECC_CMD=$tool_specified does not exist or is not executable" "$LINENO" 5
64982          fi
64983          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
64984$as_echo "$tool_specified" >&6; }
64985        fi
64986      fi
64987    fi
64988
64989  fi
64990
64991
64992
64993  if test "x$ICECC_CMD" = x; then
64994    as_fn_error $? "Could not find required tool for ICECC_CMD" "$LINENO" 5
64995  fi
64996
64997
64998    old_path="$PATH"
64999
65000    # Look for icecc-create-env in some known places
65001    PATH="$PATH:/usr/lib/icecc:/usr/lib64/icecc"
65002
65003
65004
65005  # Publish this variable in the help.
65006
65007
65008  if [ -z "${ICECC_CREATE_ENV+x}" ]; then
65009    # The variable is not set by user, try to locate tool using the code snippet
65010    for ac_prog in icecc-create-env
65011do
65012  # Extract the first word of "$ac_prog", so it can be a program name with args.
65013set dummy $ac_prog; ac_word=$2
65014{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65015$as_echo_n "checking for $ac_word... " >&6; }
65016if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65017  $as_echo_n "(cached) " >&6
65018else
65019  case $ICECC_CREATE_ENV in
65020  [\\/]* | ?:[\\/]*)
65021  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65022  ;;
65023  *)
65024  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65025for as_dir in $PATH
65026do
65027  IFS=$as_save_IFS
65028  test -z "$as_dir" && as_dir=.
65029    for ac_exec_ext in '' $ac_executable_extensions; do
65030  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65031    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65032    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65033    break 2
65034  fi
65035done
65036  done
65037IFS=$as_save_IFS
65038
65039  ;;
65040esac
65041fi
65042ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65043if test -n "$ICECC_CREATE_ENV"; then
65044  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65045$as_echo "$ICECC_CREATE_ENV" >&6; }
65046else
65047  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65048$as_echo "no" >&6; }
65049fi
65050
65051
65052  test -n "$ICECC_CREATE_ENV" && break
65053done
65054
65055  else
65056    # The variable is set, but is it from the command line or the environment?
65057
65058    # Try to remove the string !ICECC_CREATE_ENV! from our list.
65059    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_CREATE_ENV!/}
65060    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65061      # If it failed, the variable was not from the command line. Ignore it,
65062      # but warn the user (except for BASH, which is always set by the calling BASH).
65063      if test "xICECC_CREATE_ENV" != xBASH; then
65064        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&5
65065$as_echo "$as_me: WARNING: Ignoring value of ICECC_CREATE_ENV from the environment. Use command line variables instead." >&2;}
65066      fi
65067      # Try to locate tool using the code snippet
65068      for ac_prog in icecc-create-env
65069do
65070  # Extract the first word of "$ac_prog", so it can be a program name with args.
65071set dummy $ac_prog; ac_word=$2
65072{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65073$as_echo_n "checking for $ac_word... " >&6; }
65074if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65075  $as_echo_n "(cached) " >&6
65076else
65077  case $ICECC_CREATE_ENV in
65078  [\\/]* | ?:[\\/]*)
65079  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65080  ;;
65081  *)
65082  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65083for as_dir in $PATH
65084do
65085  IFS=$as_save_IFS
65086  test -z "$as_dir" && as_dir=.
65087    for ac_exec_ext in '' $ac_executable_extensions; do
65088  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65089    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65090    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65091    break 2
65092  fi
65093done
65094  done
65095IFS=$as_save_IFS
65096
65097  ;;
65098esac
65099fi
65100ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65101if test -n "$ICECC_CREATE_ENV"; then
65102  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65103$as_echo "$ICECC_CREATE_ENV" >&6; }
65104else
65105  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65106$as_echo "no" >&6; }
65107fi
65108
65109
65110  test -n "$ICECC_CREATE_ENV" && break
65111done
65112
65113    else
65114      # If it succeeded, then it was overridden by the user. We will use it
65115      # for the tool.
65116
65117      # First remove it from the list of overridden variables, so we can test
65118      # for unknown variables in the end.
65119      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65120
65121      # Check if we try to supply an empty value
65122      if test "x$ICECC_CREATE_ENV" = x; then
65123        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&5
65124$as_echo "$as_me: Setting user supplied tool ICECC_CREATE_ENV= (no value)" >&6;}
65125        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65126$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65127        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65128$as_echo "disabled" >&6; }
65129      else
65130        # Check if the provided tool contains a complete path.
65131        tool_specified="$ICECC_CREATE_ENV"
65132        tool_basename="${tool_specified##*/}"
65133        if test "x$tool_basename" = "x$tool_specified"; then
65134          # A command without a complete path is provided, search $PATH.
65135          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&5
65136$as_echo "$as_me: Will search for user supplied tool ICECC_CREATE_ENV=$tool_basename" >&6;}
65137          # Extract the first word of "$tool_basename", so it can be a program name with args.
65138set dummy $tool_basename; ac_word=$2
65139{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65140$as_echo_n "checking for $ac_word... " >&6; }
65141if ${ac_cv_path_ICECC_CREATE_ENV+:} false; then :
65142  $as_echo_n "(cached) " >&6
65143else
65144  case $ICECC_CREATE_ENV in
65145  [\\/]* | ?:[\\/]*)
65146  ac_cv_path_ICECC_CREATE_ENV="$ICECC_CREATE_ENV" # Let the user override the test with a path.
65147  ;;
65148  *)
65149  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65150for as_dir in $PATH
65151do
65152  IFS=$as_save_IFS
65153  test -z "$as_dir" && as_dir=.
65154    for ac_exec_ext in '' $ac_executable_extensions; do
65155  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65156    ac_cv_path_ICECC_CREATE_ENV="$as_dir/$ac_word$ac_exec_ext"
65157    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65158    break 2
65159  fi
65160done
65161  done
65162IFS=$as_save_IFS
65163
65164  ;;
65165esac
65166fi
65167ICECC_CREATE_ENV=$ac_cv_path_ICECC_CREATE_ENV
65168if test -n "$ICECC_CREATE_ENV"; then
65169  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_CREATE_ENV" >&5
65170$as_echo "$ICECC_CREATE_ENV" >&6; }
65171else
65172  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65173$as_echo "no" >&6; }
65174fi
65175
65176
65177          if test "x$ICECC_CREATE_ENV" = x; then
65178            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65179          fi
65180        else
65181          # Otherwise we believe it is a complete path. Use it as it is.
65182          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&5
65183$as_echo "$as_me: Will use user supplied tool ICECC_CREATE_ENV=$tool_specified" >&6;}
65184          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_CREATE_ENV" >&5
65185$as_echo_n "checking for ICECC_CREATE_ENV... " >&6; }
65186          if test ! -x "$tool_specified"; then
65187            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65188$as_echo "not found" >&6; }
65189            as_fn_error $? "User supplied tool ICECC_CREATE_ENV=$tool_specified does not exist or is not executable" "$LINENO" 5
65190          fi
65191          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65192$as_echo "$tool_specified" >&6; }
65193        fi
65194      fi
65195    fi
65196
65197  fi
65198
65199
65200
65201  if test "x$ICECC_CREATE_ENV" = x; then
65202    as_fn_error $? "Could not find required tool for ICECC_CREATE_ENV" "$LINENO" 5
65203  fi
65204
65205
65206    # Use icecc-create-env to create a minimal compilation environment that can
65207    # be sent to the other hosts in the icecream cluster.
65208    icecc_create_env_log="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env.log"
65209    ${MKDIR} -p ${CONFIGURESUPPORT_OUTPUTDIR}/icecc
65210    # Older versions of icecc does not have the --gcc parameter
65211    if ${ICECC_CREATE_ENV} | $GREP -q -e --gcc; then
65212      icecc_gcc_arg="--gcc"
65213    fi
65214    if test "x${TOOLCHAIN_TYPE}" = "xgcc"; then
65215
65216  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65217      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${CC} ${CXX} > \
65218          ${icecc_create_env_log} 2>&1 )
65219  if test "$?" != "0"; then
65220    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65221$as_echo "$as_me: icecc-create-env output:" >&6;}
65222    cat \
65223          ${icecc_create_env_log}
65224    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65225  fi
65226
65227    elif test "x$TOOLCHAIN_TYPE" = "xclang"; then
65228      # For clang, the icecc compilerwrapper is needed. It usually resides next
65229      # to icecc-create-env.
65230
65231
65232
65233  # Publish this variable in the help.
65234
65235
65236  if [ -z "${ICECC_WRAPPER+x}" ]; then
65237    # The variable is not set by user, try to locate tool using the code snippet
65238    for ac_prog in compilerwrapper
65239do
65240  # Extract the first word of "$ac_prog", so it can be a program name with args.
65241set dummy $ac_prog; ac_word=$2
65242{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65243$as_echo_n "checking for $ac_word... " >&6; }
65244if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65245  $as_echo_n "(cached) " >&6
65246else
65247  case $ICECC_WRAPPER in
65248  [\\/]* | ?:[\\/]*)
65249  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65250  ;;
65251  *)
65252  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65253for as_dir in $PATH
65254do
65255  IFS=$as_save_IFS
65256  test -z "$as_dir" && as_dir=.
65257    for ac_exec_ext in '' $ac_executable_extensions; do
65258  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65259    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65260    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65261    break 2
65262  fi
65263done
65264  done
65265IFS=$as_save_IFS
65266
65267  ;;
65268esac
65269fi
65270ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65271if test -n "$ICECC_WRAPPER"; then
65272  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65273$as_echo "$ICECC_WRAPPER" >&6; }
65274else
65275  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65276$as_echo "no" >&6; }
65277fi
65278
65279
65280  test -n "$ICECC_WRAPPER" && break
65281done
65282
65283  else
65284    # The variable is set, but is it from the command line or the environment?
65285
65286    # Try to remove the string !ICECC_WRAPPER! from our list.
65287    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!ICECC_WRAPPER!/}
65288    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65289      # If it failed, the variable was not from the command line. Ignore it,
65290      # but warn the user (except for BASH, which is always set by the calling BASH).
65291      if test "xICECC_WRAPPER" != xBASH; then
65292        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&5
65293$as_echo "$as_me: WARNING: Ignoring value of ICECC_WRAPPER from the environment. Use command line variables instead." >&2;}
65294      fi
65295      # Try to locate tool using the code snippet
65296      for ac_prog in compilerwrapper
65297do
65298  # Extract the first word of "$ac_prog", so it can be a program name with args.
65299set dummy $ac_prog; ac_word=$2
65300{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65301$as_echo_n "checking for $ac_word... " >&6; }
65302if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65303  $as_echo_n "(cached) " >&6
65304else
65305  case $ICECC_WRAPPER in
65306  [\\/]* | ?:[\\/]*)
65307  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65308  ;;
65309  *)
65310  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65311for as_dir in $PATH
65312do
65313  IFS=$as_save_IFS
65314  test -z "$as_dir" && as_dir=.
65315    for ac_exec_ext in '' $ac_executable_extensions; do
65316  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65317    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65318    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65319    break 2
65320  fi
65321done
65322  done
65323IFS=$as_save_IFS
65324
65325  ;;
65326esac
65327fi
65328ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65329if test -n "$ICECC_WRAPPER"; then
65330  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65331$as_echo "$ICECC_WRAPPER" >&6; }
65332else
65333  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65334$as_echo "no" >&6; }
65335fi
65336
65337
65338  test -n "$ICECC_WRAPPER" && break
65339done
65340
65341    else
65342      # If it succeeded, then it was overridden by the user. We will use it
65343      # for the tool.
65344
65345      # First remove it from the list of overridden variables, so we can test
65346      # for unknown variables in the end.
65347      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65348
65349      # Check if we try to supply an empty value
65350      if test "x$ICECC_WRAPPER" = x; then
65351        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool ICECC_WRAPPER= (no value)" >&5
65352$as_echo "$as_me: Setting user supplied tool ICECC_WRAPPER= (no value)" >&6;}
65353        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65354$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65355        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65356$as_echo "disabled" >&6; }
65357      else
65358        # Check if the provided tool contains a complete path.
65359        tool_specified="$ICECC_WRAPPER"
65360        tool_basename="${tool_specified##*/}"
65361        if test "x$tool_basename" = "x$tool_specified"; then
65362          # A command without a complete path is provided, search $PATH.
65363          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&5
65364$as_echo "$as_me: Will search for user supplied tool ICECC_WRAPPER=$tool_basename" >&6;}
65365          # Extract the first word of "$tool_basename", so it can be a program name with args.
65366set dummy $tool_basename; ac_word=$2
65367{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65368$as_echo_n "checking for $ac_word... " >&6; }
65369if ${ac_cv_path_ICECC_WRAPPER+:} false; then :
65370  $as_echo_n "(cached) " >&6
65371else
65372  case $ICECC_WRAPPER in
65373  [\\/]* | ?:[\\/]*)
65374  ac_cv_path_ICECC_WRAPPER="$ICECC_WRAPPER" # Let the user override the test with a path.
65375  ;;
65376  *)
65377  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65378for as_dir in $PATH
65379do
65380  IFS=$as_save_IFS
65381  test -z "$as_dir" && as_dir=.
65382    for ac_exec_ext in '' $ac_executable_extensions; do
65383  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65384    ac_cv_path_ICECC_WRAPPER="$as_dir/$ac_word$ac_exec_ext"
65385    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65386    break 2
65387  fi
65388done
65389  done
65390IFS=$as_save_IFS
65391
65392  ;;
65393esac
65394fi
65395ICECC_WRAPPER=$ac_cv_path_ICECC_WRAPPER
65396if test -n "$ICECC_WRAPPER"; then
65397  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ICECC_WRAPPER" >&5
65398$as_echo "$ICECC_WRAPPER" >&6; }
65399else
65400  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65401$as_echo "no" >&6; }
65402fi
65403
65404
65405          if test "x$ICECC_WRAPPER" = x; then
65406            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65407          fi
65408        else
65409          # Otherwise we believe it is a complete path. Use it as it is.
65410          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&5
65411$as_echo "$as_me: Will use user supplied tool ICECC_WRAPPER=$tool_specified" >&6;}
65412          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ICECC_WRAPPER" >&5
65413$as_echo_n "checking for ICECC_WRAPPER... " >&6; }
65414          if test ! -x "$tool_specified"; then
65415            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65416$as_echo "not found" >&6; }
65417            as_fn_error $? "User supplied tool ICECC_WRAPPER=$tool_specified does not exist or is not executable" "$LINENO" 5
65418          fi
65419          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65420$as_echo "$tool_specified" >&6; }
65421        fi
65422      fi
65423    fi
65424
65425  fi
65426
65427
65428
65429  if test "x$ICECC_WRAPPER" = x; then
65430    as_fn_error $? "Could not find required tool for ICECC_WRAPPER" "$LINENO" 5
65431  fi
65432
65433
65434
65435  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65436      && ${ICECC_CREATE_ENV} --clang ${CC} ${ICECC_WRAPPER} > ${icecc_create_env_log} 2>&1 )
65437  if test "$?" != "0"; then
65438    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65439$as_echo "$as_me: icecc-create-env output:" >&6;}
65440    cat ${icecc_create_env_log}
65441    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65442  fi
65443
65444    else
65445      as_fn_error $? "Can only create icecc compiler packages for toolchain types gcc and clang" "$LINENO" 5
65446    fi
65447    PATH="$old_path"
65448    # The bundle with the compiler gets a name based on checksums. Parse log file
65449    # to find it.
65450    ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log}`"
65451    ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65452    if test ! -f ${ICECC_ENV_BUNDLE}; then
65453      as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65454    fi
65455    { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for target compiler" >&5
65456$as_echo_n "checking for icecc build environment for target compiler... " >&6; }
65457    { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65458$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65459    ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${CC} ICECC_CXX=${CXX} ${ICECC_CMD}"
65460
65461    if test "x${COMPILE_TYPE}" = "xcross"; then
65462      # If cross compiling, create a separate env package for the build compiler
65463      # Assume "gcc" or "cc" is gcc and "clang" is clang. Otherwise bail.
65464      icecc_create_env_log_build="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/icecc_create_env_build.log"
65465      if test "x${BUILD_CC##*/}" = "xgcc" ||  test "x${BUILD_CC##*/}" = "xcc"; then
65466
65467  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65468      && ${ICECC_CREATE_ENV} ${icecc_gcc_arg} ${BUILD_CC} ${BUILD_CXX} > \
65469            ${icecc_create_env_log_build} 2>&1 )
65470  if test "$?" != "0"; then
65471    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65472$as_echo "$as_me: icecc-create-env output:" >&6;}
65473    cat \
65474            ${icecc_create_env_log_build}
65475    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65476  fi
65477
65478      elif test "x${BUILD_CC##*/}" = "xclang"; then
65479
65480  ( cd ${CONFIGURESUPPORT_OUTPUTDIR}/icecc \
65481      && ${ICECC_CREATE_ENV} --clang ${BUILD_CC} ${ICECC_WRAPPER} > ${icecc_create_env_log_build} 2>&1 )
65482  if test "$?" != "0"; then
65483    { $as_echo "$as_me:${as_lineno-$LINENO}: icecc-create-env output:" >&5
65484$as_echo "$as_me: icecc-create-env output:" >&6;}
65485    cat ${icecc_create_env_log_build}
65486    as_fn_error $? "Failed to create icecc compiler environment" "$LINENO" 5
65487  fi
65488
65489      else
65490        as_fn_error $? "Cannot create icecc compiler package for ${BUILD_CC}" "$LINENO" 5
65491      fi
65492      ICECC_ENV_BUNDLE_BASENAME="`${SED} -n '/^creating/s/creating //p' ${icecc_create_env_log_build}`"
65493      ICECC_ENV_BUNDLE="${CONFIGURESUPPORT_OUTPUTDIR}/icecc/${ICECC_ENV_BUNDLE_BASENAME}"
65494      if test ! -f ${ICECC_ENV_BUNDLE}; then
65495        as_fn_error $? "icecc-create-env did not produce an environment ${ICECC_ENV_BUNDLE}" "$LINENO" 5
65496      fi
65497      { $as_echo "$as_me:${as_lineno-$LINENO}: checking for icecc build environment for build compiler" >&5
65498$as_echo_n "checking for icecc build environment for build compiler... " >&6; }
65499      { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ICECC_ENV_BUNDLE}" >&5
65500$as_echo "${ICECC_ENV_BUNDLE}" >&6; }
65501      BUILD_ICECC="ICECC_VERSION=${ICECC_ENV_BUNDLE} ICECC_CC=${BUILD_CC} \
65502          ICECC_CXX=${BUILD_CXX} ${ICECC_CMD}"
65503    else
65504      BUILD_ICECC="${ICECC}"
65505    fi
65506
65507
65508  fi
65509
65510
65511# Can the C/C++ compiler use precompiled headers?
65512
65513
65514  ###############################################################################
65515  #
65516  # Can the C/C++ compiler use precompiled headers?
65517  #
65518  # Check whether --enable-precompiled-headers was given.
65519if test "${enable_precompiled_headers+set}" = set; then :
65520  enableval=$enable_precompiled_headers; ENABLE_PRECOMPH=${enable_precompiled_headers}
65521else
65522  ENABLE_PRECOMPH=yes
65523fi
65524
65525
65526  USE_PRECOMPILED_HEADER=1
65527  { $as_echo "$as_me:${as_lineno-$LINENO}: checking If precompiled header is enabled" >&5
65528$as_echo_n "checking If precompiled header is enabled... " >&6; }
65529  if test "x$ENABLE_PRECOMPH" = xno; then
65530    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, forced" >&5
65531$as_echo "no, forced" >&6; }
65532    USE_PRECOMPILED_HEADER=0
65533  elif test "x$ICECC" != "x"; then
65534    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work effectively with icecc" >&5
65535$as_echo "no, does not work effectively with icecc" >&6; }
65536    USE_PRECOMPILED_HEADER=0
65537  elif test "x$TOOLCHAIN_TYPE" = xsolstudio; then
65538    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, does not work with Solaris Studio" >&5
65539$as_echo "no, does not work with Solaris Studio" >&6; }
65540    USE_PRECOMPILED_HEADER=0
65541  else
65542    { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65543$as_echo "yes" >&6; }
65544  fi
65545
65546  if test "x$ENABLE_PRECOMPH" = xyes; then
65547    # Check that the compiler actually supports precomp headers.
65548    if test "x$TOOLCHAIN_TYPE" = xgcc; then
65549      { $as_echo "$as_me:${as_lineno-$LINENO}: checking that precompiled headers work" >&5
65550$as_echo_n "checking that precompiled headers work... " >&6; }
65551      echo "int alfa();" > conftest.h
65552      $CXX -x c++-header conftest.h -o conftest.hpp.gch 2>&5 >&5
65553      if test ! -f conftest.hpp.gch; then
65554        USE_PRECOMPILED_HEADER=0
65555        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65556$as_echo "no" >&6; }
65557      else
65558        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65559$as_echo "yes" >&6; }
65560      fi
65561      rm -f conftest.h conftest.hpp.gch
65562    fi
65563  fi
65564
65565
65566
65567
65568# Setup use of ccache, if available
65569
65570  # Check whether --enable-ccache was given.
65571if test "${enable_ccache+set}" = set; then :
65572  enableval=$enable_ccache;
65573fi
65574
65575
65576  CCACHE=
65577  CCACHE_STATUS=
65578  { $as_echo "$as_me:${as_lineno-$LINENO}: checking is ccache enabled" >&5
65579$as_echo_n "checking is ccache enabled... " >&6; }
65580  if test "x$enable_ccache" = xyes; then
65581    if test "x$TOOLCHAIN_TYPE" = "xgcc" -o "x$TOOLCHAIN_TYPE" = "xclang"; then
65582      { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65583$as_echo "yes" >&6; }
65584      OLD_PATH="$PATH"
65585      if test "x$TOOLCHAIN_PATH" != x; then
65586        PATH=$TOOLCHAIN_PATH:$PATH
65587      fi
65588
65589
65590
65591  # Publish this variable in the help.
65592
65593
65594  if [ -z "${CCACHE+x}" ]; then
65595    # The variable is not set by user, try to locate tool using the code snippet
65596    for ac_prog in ccache
65597do
65598  # Extract the first word of "$ac_prog", so it can be a program name with args.
65599set dummy $ac_prog; ac_word=$2
65600{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65601$as_echo_n "checking for $ac_word... " >&6; }
65602if ${ac_cv_path_CCACHE+:} false; then :
65603  $as_echo_n "(cached) " >&6
65604else
65605  case $CCACHE in
65606  [\\/]* | ?:[\\/]*)
65607  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65608  ;;
65609  *)
65610  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65611for as_dir in $PATH
65612do
65613  IFS=$as_save_IFS
65614  test -z "$as_dir" && as_dir=.
65615    for ac_exec_ext in '' $ac_executable_extensions; do
65616  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65617    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65618    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65619    break 2
65620  fi
65621done
65622  done
65623IFS=$as_save_IFS
65624
65625  ;;
65626esac
65627fi
65628CCACHE=$ac_cv_path_CCACHE
65629if test -n "$CCACHE"; then
65630  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65631$as_echo "$CCACHE" >&6; }
65632else
65633  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65634$as_echo "no" >&6; }
65635fi
65636
65637
65638  test -n "$CCACHE" && break
65639done
65640
65641  else
65642    # The variable is set, but is it from the command line or the environment?
65643
65644    # Try to remove the string !CCACHE! from our list.
65645    try_remove_var=${CONFIGURE_OVERRIDDEN_VARIABLES//!CCACHE!/}
65646    if test "x$try_remove_var" = "x$CONFIGURE_OVERRIDDEN_VARIABLES"; then
65647      # If it failed, the variable was not from the command line. Ignore it,
65648      # but warn the user (except for BASH, which is always set by the calling BASH).
65649      if test "xCCACHE" != xBASH; then
65650        { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&5
65651$as_echo "$as_me: WARNING: Ignoring value of CCACHE from the environment. Use command line variables instead." >&2;}
65652      fi
65653      # Try to locate tool using the code snippet
65654      for ac_prog in ccache
65655do
65656  # Extract the first word of "$ac_prog", so it can be a program name with args.
65657set dummy $ac_prog; ac_word=$2
65658{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65659$as_echo_n "checking for $ac_word... " >&6; }
65660if ${ac_cv_path_CCACHE+:} false; then :
65661  $as_echo_n "(cached) " >&6
65662else
65663  case $CCACHE in
65664  [\\/]* | ?:[\\/]*)
65665  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65666  ;;
65667  *)
65668  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65669for as_dir in $PATH
65670do
65671  IFS=$as_save_IFS
65672  test -z "$as_dir" && as_dir=.
65673    for ac_exec_ext in '' $ac_executable_extensions; do
65674  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65675    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65676    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65677    break 2
65678  fi
65679done
65680  done
65681IFS=$as_save_IFS
65682
65683  ;;
65684esac
65685fi
65686CCACHE=$ac_cv_path_CCACHE
65687if test -n "$CCACHE"; then
65688  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65689$as_echo "$CCACHE" >&6; }
65690else
65691  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65692$as_echo "no" >&6; }
65693fi
65694
65695
65696  test -n "$CCACHE" && break
65697done
65698
65699    else
65700      # If it succeeded, then it was overridden by the user. We will use it
65701      # for the tool.
65702
65703      # First remove it from the list of overridden variables, so we can test
65704      # for unknown variables in the end.
65705      CONFIGURE_OVERRIDDEN_VARIABLES="$try_remove_var"
65706
65707      # Check if we try to supply an empty value
65708      if test "x$CCACHE" = x; then
65709        { $as_echo "$as_me:${as_lineno-$LINENO}: Setting user supplied tool CCACHE= (no value)" >&5
65710$as_echo "$as_me: Setting user supplied tool CCACHE= (no value)" >&6;}
65711        { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65712$as_echo_n "checking for CCACHE... " >&6; }
65713        { $as_echo "$as_me:${as_lineno-$LINENO}: result: disabled" >&5
65714$as_echo "disabled" >&6; }
65715      else
65716        # Check if the provided tool contains a complete path.
65717        tool_specified="$CCACHE"
65718        tool_basename="${tool_specified##*/}"
65719        if test "x$tool_basename" = "x$tool_specified"; then
65720          # A command without a complete path is provided, search $PATH.
65721          { $as_echo "$as_me:${as_lineno-$LINENO}: Will search for user supplied tool CCACHE=$tool_basename" >&5
65722$as_echo "$as_me: Will search for user supplied tool CCACHE=$tool_basename" >&6;}
65723          # Extract the first word of "$tool_basename", so it can be a program name with args.
65724set dummy $tool_basename; ac_word=$2
65725{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
65726$as_echo_n "checking for $ac_word... " >&6; }
65727if ${ac_cv_path_CCACHE+:} false; then :
65728  $as_echo_n "(cached) " >&6
65729else
65730  case $CCACHE in
65731  [\\/]* | ?:[\\/]*)
65732  ac_cv_path_CCACHE="$CCACHE" # Let the user override the test with a path.
65733  ;;
65734  *)
65735  as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
65736for as_dir in $PATH
65737do
65738  IFS=$as_save_IFS
65739  test -z "$as_dir" && as_dir=.
65740    for ac_exec_ext in '' $ac_executable_extensions; do
65741  if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
65742    ac_cv_path_CCACHE="$as_dir/$ac_word$ac_exec_ext"
65743    $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5
65744    break 2
65745  fi
65746done
65747  done
65748IFS=$as_save_IFS
65749
65750  ;;
65751esac
65752fi
65753CCACHE=$ac_cv_path_CCACHE
65754if test -n "$CCACHE"; then
65755  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CCACHE" >&5
65756$as_echo "$CCACHE" >&6; }
65757else
65758  { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65759$as_echo "no" >&6; }
65760fi
65761
65762
65763          if test "x$CCACHE" = x; then
65764            as_fn_error $? "User supplied tool $tool_basename could not be found" "$LINENO" 5
65765          fi
65766        else
65767          # Otherwise we believe it is a complete path. Use it as it is.
65768          { $as_echo "$as_me:${as_lineno-$LINENO}: Will use user supplied tool CCACHE=$tool_specified" >&5
65769$as_echo "$as_me: Will use user supplied tool CCACHE=$tool_specified" >&6;}
65770          { $as_echo "$as_me:${as_lineno-$LINENO}: checking for CCACHE" >&5
65771$as_echo_n "checking for CCACHE... " >&6; }
65772          if test ! -x "$tool_specified"; then
65773            { $as_echo "$as_me:${as_lineno-$LINENO}: result: not found" >&5
65774$as_echo "not found" >&6; }
65775            as_fn_error $? "User supplied tool CCACHE=$tool_specified does not exist or is not executable" "$LINENO" 5
65776          fi
65777          { $as_echo "$as_me:${as_lineno-$LINENO}: result: $tool_specified" >&5
65778$as_echo "$tool_specified" >&6; }
65779        fi
65780      fi
65781    fi
65782
65783  fi
65784
65785
65786
65787  if test "x$CCACHE" = x; then
65788    as_fn_error $? "Could not find required tool for CCACHE" "$LINENO" 5
65789  fi
65790
65791
65792      PATH="$OLD_PATH"
65793      CCACHE_VERSION=`$CCACHE --version | head -n1 | $SED 's/[A-Za-z ]*//'`
65794      CCACHE_STATUS="Active ($CCACHE_VERSION)"
65795    else
65796      { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65797$as_echo "no" >&6; }
65798      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&5
65799$as_echo "$as_me: WARNING: ccache is not supported with toolchain type $TOOLCHAIN_TYPE" >&2;}
65800    fi
65801  elif test "x$enable_ccache" = xno; then
65802    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, explicitly disabled" >&5
65803$as_echo "no, explicitly disabled" >&6; }
65804    CCACHE_STATUS="Disabled"
65805  elif test "x$enable_ccache" = x; then
65806    { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65807$as_echo "no" >&6; }
65808  else
65809    { $as_echo "$as_me:${as_lineno-$LINENO}: result: unknown" >&5
65810$as_echo "unknown" >&6; }
65811    as_fn_error $? "--enable-ccache does not accept any parameters" "$LINENO" 5
65812  fi
65813
65814
65815
65816# Check whether --with-ccache-dir was given.
65817if test "${with_ccache_dir+set}" = set; then :
65818  withval=$with_ccache_dir;
65819fi
65820
65821
65822  if test "x$with_ccache_dir" != x; then
65823    # When using a non home ccache directory, assume the use is to share ccache files
65824    # with other users. Thus change the umask.
65825    SET_CCACHE_DIR="CCACHE_DIR=$with_ccache_dir CCACHE_UMASK=002"
65826    if test "x$CCACHE" = x; then
65827      { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&5
65828$as_echo "$as_me: WARNING: --with-ccache-dir has no meaning when ccache is not enabled" >&2;}
65829    fi
65830  fi
65831
65832  if test "x$CCACHE" != x; then
65833
65834  if test "x$CCACHE" != x; then
65835    if test "x$USE_PRECOMPILED_HEADER" = "x1"; then
65836      HAS_BAD_CCACHE=`$ECHO $CCACHE_VERSION | \
65837          $GREP -e '^1.*' -e '^2.*' -e '^3\.0.*' -e '^3\.1\.[0123]$'`
65838      if test "x$HAS_BAD_CCACHE" != "x"; then
65839        as_fn_error $? "Precompiled headers requires ccache 3.1.4 or later, found $CCACHE_VERSION" "$LINENO" 5
65840      fi
65841      { $as_echo "$as_me:${as_lineno-$LINENO}: checking if C-compiler supports ccache precompiled headers" >&5
65842$as_echo_n "checking if C-compiler supports ccache precompiled headers... " >&6; }
65843      CCACHE_PRECOMP_FLAG="-fpch-preprocess"
65844      PUSHED_FLAGS="$CXXFLAGS"
65845      CXXFLAGS="$CCACHE_PRECOMP_FLAG $CXXFLAGS"
65846      cat confdefs.h - <<_ACEOF >conftest.$ac_ext
65847/* end confdefs.h.  */
65848
65849int
65850main ()
65851{
65852
65853  ;
65854  return 0;
65855}
65856_ACEOF
65857if ac_fn_cxx_try_compile "$LINENO"; then :
65858  CC_KNOWS_CCACHE_TRICK=yes
65859else
65860  CC_KNOWS_CCACHE_TRICK=no
65861fi
65862rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
65863      CXXFLAGS="$PUSHED_FLAGS"
65864      if test "x$CC_KNOWS_CCACHE_TRICK" = xyes; then
65865        { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
65866$as_echo "yes" >&6; }
65867        CFLAGS_CCACHE="$CCACHE_PRECOMP_FLAG"
65868
65869        CCACHE_SLOPPINESS=pch_defines,time_macros
65870      else
65871        { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
65872$as_echo "no" >&6; }
65873        as_fn_error $? "Cannot use ccache with precompiled headers without compiler support for $CCACHE_PRECOMP_FLAG" "$LINENO" 5
65874      fi
65875    fi
65876
65877    CCACHE="CCACHE_COMPRESS=1 $SET_CCACHE_DIR \
65878        CCACHE_SLOPPINESS=$CCACHE_SLOPPINESS CCACHE_BASEDIR=$TOPDIR $CCACHE"
65879
65880    if test "x$SET_CCACHE_DIR" != x; then
65881      mkdir -p $CCACHE_DIR > /dev/null 2>&1
65882      chmod a+rwxs $CCACHE_DIR > /dev/null 2>&1
65883    fi
65884  fi
65885
65886  fi
65887
65888
65889###############################################################################
65890#
65891# And now the finish...
65892#
65893###############################################################################
65894
65895# Check for some common pitfalls
65896
65897  if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.cygwin"; then
65898    file_to_test="$SRC_ROOT/LICENSE"
65899    if test `$STAT -c '%a' "$file_to_test"` -lt 400; then
65900      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
65901    fi
65902  fi
65903
65904
65905  # Did user specify any unknown variables?
65906
65907  if test "x$CONFIGURE_OVERRIDDEN_VARIABLES" != x; then
65908    # Replace the separating ! with spaces before presenting for end user.
65909    unknown_variables=${CONFIGURE_OVERRIDDEN_VARIABLES//!/ }
65910    { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: The following variables might be unknown to configure: $unknown_variables" >&5
65911$as_echo "$as_me: WARNING: The following variables might be unknown to configure: $unknown_variables" >&2;}
65912  fi
65913
65914
65915  { $as_echo "$as_me:${as_lineno-$LINENO}: checking if build directory is on local disk" >&5
65916$as_echo_n "checking if build directory is on local disk... " >&6; }
65917
65918  # df -l lists only local disks; if the given directory is not found then
65919  # a non-zero exit code is given
65920  if test "x$DF" = x; then
65921    if test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.msys"; then
65922      # msys does not have df; use Windows "net use" instead.
65923      IS_NETWORK_DISK=`net use | grep \`pwd -W | cut -d ":" -f 1 | tr a-z A-Z\`:`
65924      if test "x$IS_NETWORK_DISK" = x; then
65925        OUTPUT_DIR_IS_LOCAL="yes"
65926      else
65927        OUTPUT_DIR_IS_LOCAL="no"
65928      fi
65929    else
65930      # No df here, say it's local
65931      OUTPUT_DIR_IS_LOCAL="yes"
65932    fi
65933  else
65934    if $DF -l $OUTPUT_ROOT > /dev/null 2>&1; then
65935      OUTPUT_DIR_IS_LOCAL="yes"
65936    else
65937      OUTPUT_DIR_IS_LOCAL="no"
65938    fi
65939  fi
65940
65941  { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OUTPUT_DIR_IS_LOCAL" >&5
65942$as_echo "$OUTPUT_DIR_IS_LOCAL" >&6; }
65943
65944
65945
65946  # Check if the user has any old-style ALT_ variables set.
65947  FOUND_ALT_VARIABLES=`env | grep ^ALT_`
65948
65949  # Before generating output files, test if they exist. If they do, this is a reconfigure.
65950  # Since we can't properly handle the dependencies for this, warn the user about the situation
65951  if test -e $OUTPUT_ROOT/spec.gmk; then
65952    IS_RECONFIGURE=yes
65953  else
65954    IS_RECONFIGURE=no
65955  fi
65956
65957
65958# At the end, call the custom hook. (Dummy macro if no custom sources available)
65959
65960
65961# This needs to be done after CUSTOM_LATE_HOOK since we can setup custom features.
65962
65963  # Keep feature lists sorted and free of duplicates
65964  JVM_FEATURES_server="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_server | $SORT -u))"
65965  JVM_FEATURES_client="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_client | $SORT -u))"
65966  JVM_FEATURES_core="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_core | $SORT -u))"
65967  JVM_FEATURES_minimal="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_minimal | $SORT -u))"
65968  JVM_FEATURES_zero="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zero | $SORT -u))"
65969  JVM_FEATURES_zeroshark="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_zeroshark | $SORT -u))"
65970  JVM_FEATURES_custom="$($ECHO $($PRINTF '%s\n' $JVM_FEATURES_custom | $SORT -u))"
65971
65972  # Validate features
65973  for variant in $JVM_VARIANTS; do
65974    { $as_echo "$as_me:${as_lineno-$LINENO}: checking JVM features for JVM variant '$variant'" >&5
65975$as_echo_n "checking JVM features for JVM variant '$variant'... " >&6; }
65976    features_var_name=JVM_FEATURES_$variant
65977    JVM_FEATURES_TO_TEST=${!features_var_name}
65978    { $as_echo "$as_me:${as_lineno-$LINENO}: result: $JVM_FEATURES_TO_TEST" >&5
65979$as_echo "$JVM_FEATURES_TO_TEST" >&6; }
65980    INVALID_FEATURES=`$GREP -Fvx "${VALID_JVM_FEATURES// /$'\n'}" <<< "${JVM_FEATURES_TO_TEST// /$'\n'}"`
65981    if test "x$INVALID_FEATURES" != x; then
65982      as_fn_error $? "Invalid JVM feature(s): $INVALID_FEATURES" "$LINENO" 5
65983    fi
65984  done
65985
65986
65987# We're messing a bit with internal autoconf variables to put the config.status
65988# in the output directory instead of the current directory.
65989CONFIG_STATUS="$CONFIGURESUPPORT_OUTPUTDIR/config.status"
65990
65991# Create the actual output files. Now the main work of configure is done.
65992cat >confcache <<\_ACEOF
65993# This file is a shell script that caches the results of configure
65994# tests run on this system so they can be shared between configure
65995# scripts and configure runs, see configure's option --config-cache.
65996# It is not useful on other systems.  If it contains results you don't
65997# want to keep, you may remove or edit it.
65998#
65999# config.status only pays attention to the cache file if you give it
66000# the --recheck option to rerun configure.
66001#
66002# `ac_cv_env_foo' variables (set or unset) will be overridden when
66003# loading this file, other *unset* `ac_cv_foo' will be assigned the
66004# following values.
66005
66006_ACEOF
66007
66008# The following way of writing the cache mishandles newlines in values,
66009# but we know of no workaround that is simple, portable, and efficient.
66010# So, we kill variables containing newlines.
66011# Ultrix sh set writes to stderr and can't be redirected directly,
66012# and sets the high bit in the cache file unless we assign to the vars.
66013(
66014  for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do
66015    eval ac_val=\$$ac_var
66016    case $ac_val in #(
66017    *${as_nl}*)
66018      case $ac_var in #(
66019      *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5
66020$as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;;
66021      esac
66022      case $ac_var in #(
66023      _ | IFS | as_nl) ;; #(
66024      BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #(
66025      *) { eval $ac_var=; unset $ac_var;} ;;
66026      esac ;;
66027    esac
66028  done
66029
66030  (set) 2>&1 |
66031    case $as_nl`(ac_space=' '; set) 2>&1` in #(
66032    *${as_nl}ac_space=\ *)
66033      # `set' does not quote correctly, so add quotes: double-quote
66034      # substitution turns \\\\ into \\, and sed turns \\ into \.
66035      sed -n \
66036	"s/'/'\\\\''/g;
66037	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
66038      ;; #(
66039    *)
66040      # `set' quotes correctly as required by POSIX, so do not add quotes.
66041      sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p"
66042      ;;
66043    esac |
66044    sort
66045) |
66046  sed '
66047     /^ac_cv_env_/b end
66048     t clear
66049     :clear
66050     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
66051     t end
66052     s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
66053     :end' >>confcache
66054if diff "$cache_file" confcache >/dev/null 2>&1; then :; else
66055  if test -w "$cache_file"; then
66056    if test "x$cache_file" != "x/dev/null"; then
66057      { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5
66058$as_echo "$as_me: updating cache $cache_file" >&6;}
66059      if test ! -f "$cache_file" || test -h "$cache_file"; then
66060	cat confcache >"$cache_file"
66061      else
66062        case $cache_file in #(
66063        */* | ?:*)
66064	  mv -f confcache "$cache_file"$$ &&
66065	  mv -f "$cache_file"$$ "$cache_file" ;; #(
66066        *)
66067	  mv -f confcache "$cache_file" ;;
66068	esac
66069      fi
66070    fi
66071  else
66072    { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5
66073$as_echo "$as_me: not updating unwritable cache $cache_file" >&6;}
66074  fi
66075fi
66076rm -f confcache
66077
66078test "x$prefix" = xNONE && prefix=$ac_default_prefix
66079# Let make expand exec_prefix.
66080test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
66081
66082# Transform confdefs.h into DEFS.
66083# Protect against shell expansion while executing Makefile rules.
66084# Protect against Makefile macro expansion.
66085#
66086# If the first sed substitution is executed (which looks for macros that
66087# take arguments), then branch to the quote section.  Otherwise,
66088# look for a macro that doesn't take arguments.
66089ac_script='
66090:mline
66091/\\$/{
66092 N
66093 s,\\\n,,
66094 b mline
66095}
66096t clear
66097:clear
66098s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 (][^	 (]*([^)]*)\)[	 ]*\(.*\)/-D\1=\2/g
66099t quote
66100s/^[	 ]*#[	 ]*define[	 ][	 ]*\([^	 ][^	 ]*\)[	 ]*\(.*\)/-D\1=\2/g
66101t quote
66102b any
66103:quote
66104s/[	 `~#$^&*(){}\\|;'\''"<>?]/\\&/g
66105s/\[/\\&/g
66106s/\]/\\&/g
66107s/\$/$$/g
66108H
66109:any
66110${
66111	g
66112	s/^\n//
66113	s/\n/ /g
66114	p
66115}
66116'
66117DEFS=`sed -n "$ac_script" confdefs.h`
66118
66119
66120ac_libobjs=
66121ac_ltlibobjs=
66122U=
66123for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue
66124  # 1. Remove the extension, and $U if already installed.
66125  ac_script='s/\$U\././;s/\.o$//;s/\.obj$//'
66126  ac_i=`$as_echo "$ac_i" | sed "$ac_script"`
66127  # 2. Prepend LIBOBJDIR.  When used with automake>=1.10 LIBOBJDIR
66128  #    will be set to the directory where LIBOBJS objects are built.
66129  as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext"
66130  as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo'
66131done
66132LIBOBJS=$ac_libobjs
66133
66134LTLIBOBJS=$ac_ltlibobjs
66135
66136
66137
66138: "${CONFIG_STATUS=./config.status}"
66139ac_write_fail=0
66140ac_clean_files_save=$ac_clean_files
66141ac_clean_files="$ac_clean_files $CONFIG_STATUS"
66142{ $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5
66143$as_echo "$as_me: creating $CONFIG_STATUS" >&6;}
66144as_write_fail=0
66145cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1
66146#! $SHELL
66147# Generated by $as_me.
66148# Run this file to recreate the current configuration.
66149# Compiler output produced by configure, useful for debugging
66150# configure, is in config.log if it exists.
66151
66152debug=false
66153ac_cs_recheck=false
66154ac_cs_silent=false
66155
66156SHELL=\${CONFIG_SHELL-$SHELL}
66157export SHELL
66158_ASEOF
66159cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1
66160## -------------------- ##
66161## M4sh Initialization. ##
66162## -------------------- ##
66163
66164# Be more Bourne compatible
66165DUALCASE=1; export DUALCASE # for MKS sh
66166if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then :
66167  emulate sh
66168  NULLCMD=:
66169  # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which
66170  # is contrary to our usage.  Disable this feature.
66171  alias -g '${1+"$@"}'='"$@"'
66172  setopt NO_GLOB_SUBST
66173else
66174  case `(set -o) 2>/dev/null` in #(
66175  *posix*) :
66176    set -o posix ;; #(
66177  *) :
66178     ;;
66179esac
66180fi
66181
66182
66183as_nl='
66184'
66185export as_nl
66186# Printing a long string crashes Solaris 7 /usr/bin/printf.
66187as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\'
66188as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo
66189as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo
66190# Prefer a ksh shell builtin over an external printf program on Solaris,
66191# but without wasting forks for bash or zsh.
66192if test -z "$BASH_VERSION$ZSH_VERSION" \
66193    && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then
66194  as_echo='print -r --'
66195  as_echo_n='print -rn --'
66196elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then
66197  as_echo='printf %s\n'
66198  as_echo_n='printf %s'
66199else
66200  if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then
66201    as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"'
66202    as_echo_n='/usr/ucb/echo -n'
66203  else
66204    as_echo_body='eval expr "X$1" : "X\\(.*\\)"'
66205    as_echo_n_body='eval
66206      arg=$1;
66207      case $arg in #(
66208      *"$as_nl"*)
66209	expr "X$arg" : "X\\(.*\\)$as_nl";
66210	arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;;
66211      esac;
66212      expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl"
66213    '
66214    export as_echo_n_body
66215    as_echo_n='sh -c $as_echo_n_body as_echo'
66216  fi
66217  export as_echo_body
66218  as_echo='sh -c $as_echo_body as_echo'
66219fi
66220
66221# The user is always right.
66222if test "${PATH_SEPARATOR+set}" != set; then
66223  PATH_SEPARATOR=:
66224  (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && {
66225    (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 ||
66226      PATH_SEPARATOR=';'
66227  }
66228fi
66229
66230
66231# IFS
66232# We need space, tab and new line, in precisely that order.  Quoting is
66233# there to prevent editors from complaining about space-tab.
66234# (If _AS_PATH_WALK were called with IFS unset, it would disable word
66235# splitting by setting IFS to empty value.)
66236IFS=" ""	$as_nl"
66237
66238# Find who we are.  Look in the path if we contain no directory separator.
66239as_myself=
66240case $0 in #((
66241  *[\\/]* ) as_myself=$0 ;;
66242  *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
66243for as_dir in $PATH
66244do
66245  IFS=$as_save_IFS
66246  test -z "$as_dir" && as_dir=.
66247    test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
66248  done
66249IFS=$as_save_IFS
66250
66251     ;;
66252esac
66253# We did not find ourselves, most probably we were run as `sh COMMAND'
66254# in which case we are not to be found in the path.
66255if test "x$as_myself" = x; then
66256  as_myself=$0
66257fi
66258if test ! -f "$as_myself"; then
66259  $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2
66260  exit 1
66261fi
66262
66263# Unset variables that we do not need and which cause bugs (e.g. in
66264# pre-3.0 UWIN ksh).  But do not cause bugs in bash 2.01; the "|| exit 1"
66265# suppresses any "Segmentation fault" message there.  '((' could
66266# trigger a bug in pdksh 5.2.14.
66267for as_var in BASH_ENV ENV MAIL MAILPATH
66268do eval test x\${$as_var+set} = xset \
66269  && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || :
66270done
66271PS1='$ '
66272PS2='> '
66273PS4='+ '
66274
66275# NLS nuisances.
66276LC_ALL=C
66277export LC_ALL
66278LANGUAGE=C
66279export LANGUAGE
66280
66281# CDPATH.
66282(unset CDPATH) >/dev/null 2>&1 && unset CDPATH
66283
66284
66285# as_fn_error STATUS ERROR [LINENO LOG_FD]
66286# ----------------------------------------
66287# Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are
66288# provided, also output the error to LOG_FD, referencing LINENO. Then exit the
66289# script with STATUS, using 1 if that was 0.
66290as_fn_error ()
66291{
66292  as_status=$1; test $as_status -eq 0 && as_status=1
66293  if test "$4"; then
66294    as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack
66295    $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4
66296  fi
66297  $as_echo "$as_me: error: $2" >&2
66298  as_fn_exit $as_status
66299} # as_fn_error
66300
66301
66302# as_fn_set_status STATUS
66303# -----------------------
66304# Set $? to STATUS, without forking.
66305as_fn_set_status ()
66306{
66307  return $1
66308} # as_fn_set_status
66309
66310# as_fn_exit STATUS
66311# -----------------
66312# Exit the shell with STATUS, even in a "trap 0" or "set -e" context.
66313as_fn_exit ()
66314{
66315  set +e
66316  as_fn_set_status $1
66317  exit $1
66318} # as_fn_exit
66319
66320# as_fn_unset VAR
66321# ---------------
66322# Portably unset VAR.
66323as_fn_unset ()
66324{
66325  { eval $1=; unset $1;}
66326}
66327as_unset=as_fn_unset
66328# as_fn_append VAR VALUE
66329# ----------------------
66330# Append the text in VALUE to the end of the definition contained in VAR. Take
66331# advantage of any shell optimizations that allow amortized linear growth over
66332# repeated appends, instead of the typical quadratic growth present in naive
66333# implementations.
66334if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then :
66335  eval 'as_fn_append ()
66336  {
66337    eval $1+=\$2
66338  }'
66339else
66340  as_fn_append ()
66341  {
66342    eval $1=\$$1\$2
66343  }
66344fi # as_fn_append
66345
66346# as_fn_arith ARG...
66347# ------------------
66348# Perform arithmetic evaluation on the ARGs, and store the result in the
66349# global $as_val. Take advantage of shells that can avoid forks. The arguments
66350# must be portable across $(()) and expr.
66351if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then :
66352  eval 'as_fn_arith ()
66353  {
66354    as_val=$(( $* ))
66355  }'
66356else
66357  as_fn_arith ()
66358  {
66359    as_val=`expr "$@" || test $? -eq 1`
66360  }
66361fi # as_fn_arith
66362
66363
66364if expr a : '\(a\)' >/dev/null 2>&1 &&
66365   test "X`expr 00001 : '.*\(...\)'`" = X001; then
66366  as_expr=expr
66367else
66368  as_expr=false
66369fi
66370
66371if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then
66372  as_basename=basename
66373else
66374  as_basename=false
66375fi
66376
66377if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then
66378  as_dirname=dirname
66379else
66380  as_dirname=false
66381fi
66382
66383as_me=`$as_basename -- "$0" ||
66384$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
66385	 X"$0" : 'X\(//\)$' \| \
66386	 X"$0" : 'X\(/\)' \| . 2>/dev/null ||
66387$as_echo X/"$0" |
66388    sed '/^.*\/\([^/][^/]*\)\/*$/{
66389	    s//\1/
66390	    q
66391	  }
66392	  /^X\/\(\/\/\)$/{
66393	    s//\1/
66394	    q
66395	  }
66396	  /^X\/\(\/\).*/{
66397	    s//\1/
66398	    q
66399	  }
66400	  s/.*/./; q'`
66401
66402# Avoid depending upon Character Ranges.
66403as_cr_letters='abcdefghijklmnopqrstuvwxyz'
66404as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
66405as_cr_Letters=$as_cr_letters$as_cr_LETTERS
66406as_cr_digits='0123456789'
66407as_cr_alnum=$as_cr_Letters$as_cr_digits
66408
66409ECHO_C= ECHO_N= ECHO_T=
66410case `echo -n x` in #(((((
66411-n*)
66412  case `echo 'xy\c'` in
66413  *c*) ECHO_T='	';;	# ECHO_T is single tab character.
66414  xy)  ECHO_C='\c';;
66415  *)   echo `echo ksh88 bug on AIX 6.1` > /dev/null
66416       ECHO_T='	';;
66417  esac;;
66418*)
66419  ECHO_N='-n';;
66420esac
66421
66422rm -f conf$$ conf$$.exe conf$$.file
66423if test -d conf$$.dir; then
66424  rm -f conf$$.dir/conf$$.file
66425else
66426  rm -f conf$$.dir
66427  mkdir conf$$.dir 2>/dev/null
66428fi
66429if (echo >conf$$.file) 2>/dev/null; then
66430  if ln -s conf$$.file conf$$ 2>/dev/null; then
66431    as_ln_s='ln -s'
66432    # ... but there are two gotchas:
66433    # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail.
66434    # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable.
66435    # In both cases, we have to default to `cp -pR'.
66436    ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe ||
66437      as_ln_s='cp -pR'
66438  elif ln conf$$.file conf$$ 2>/dev/null; then
66439    as_ln_s=ln
66440  else
66441    as_ln_s='cp -pR'
66442  fi
66443else
66444  as_ln_s='cp -pR'
66445fi
66446rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file
66447rmdir conf$$.dir 2>/dev/null
66448
66449
66450# as_fn_mkdir_p
66451# -------------
66452# Create "$as_dir" as a directory, including parents if necessary.
66453as_fn_mkdir_p ()
66454{
66455
66456  case $as_dir in #(
66457  -*) as_dir=./$as_dir;;
66458  esac
66459  test -d "$as_dir" || eval $as_mkdir_p || {
66460    as_dirs=
66461    while :; do
66462      case $as_dir in #(
66463      *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'(
66464      *) as_qdir=$as_dir;;
66465      esac
66466      as_dirs="'$as_qdir' $as_dirs"
66467      as_dir=`$as_dirname -- "$as_dir" ||
66468$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66469	 X"$as_dir" : 'X\(//\)[^/]' \| \
66470	 X"$as_dir" : 'X\(//\)$' \| \
66471	 X"$as_dir" : 'X\(/\)' \| . 2>/dev/null ||
66472$as_echo X"$as_dir" |
66473    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66474	    s//\1/
66475	    q
66476	  }
66477	  /^X\(\/\/\)[^/].*/{
66478	    s//\1/
66479	    q
66480	  }
66481	  /^X\(\/\/\)$/{
66482	    s//\1/
66483	    q
66484	  }
66485	  /^X\(\/\).*/{
66486	    s//\1/
66487	    q
66488	  }
66489	  s/.*/./; q'`
66490      test -d "$as_dir" && break
66491    done
66492    test -z "$as_dirs" || eval "mkdir $as_dirs"
66493  } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir"
66494
66495
66496} # as_fn_mkdir_p
66497if mkdir -p . 2>/dev/null; then
66498  as_mkdir_p='mkdir -p "$as_dir"'
66499else
66500  test -d ./-p && rmdir ./-p
66501  as_mkdir_p=false
66502fi
66503
66504
66505# as_fn_executable_p FILE
66506# -----------------------
66507# Test if FILE is an executable regular file.
66508as_fn_executable_p ()
66509{
66510  test -f "$1" && test -x "$1"
66511} # as_fn_executable_p
66512as_test_x='test -x'
66513as_executable_p=as_fn_executable_p
66514
66515# Sed expression to map a string onto a valid CPP name.
66516as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
66517
66518# Sed expression to map a string onto a valid variable name.
66519as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
66520
66521
66522exec 6>&1
66523## ----------------------------------- ##
66524## Main body of $CONFIG_STATUS script. ##
66525## ----------------------------------- ##
66526_ASEOF
66527test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1
66528
66529cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66530# Save the log message, to keep $0 and so on meaningful, and to
66531# report actual input values of CONFIG_FILES etc. instead of their
66532# values after options handling.
66533ac_log="
66534This file was extended by OpenJDK $as_me jdk9, which was
66535generated by GNU Autoconf 2.69.  Invocation command line was
66536
66537  CONFIG_FILES    = $CONFIG_FILES
66538  CONFIG_HEADERS  = $CONFIG_HEADERS
66539  CONFIG_LINKS    = $CONFIG_LINKS
66540  CONFIG_COMMANDS = $CONFIG_COMMANDS
66541  $ $0 $@
66542
66543on `(hostname || uname -n) 2>/dev/null | sed 1q`
66544"
66545
66546_ACEOF
66547
66548case $ac_config_files in *"
66549"*) set x $ac_config_files; shift; ac_config_files=$*;;
66550esac
66551
66552
66553
66554cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66555# Files that config.status was made for.
66556config_files="$ac_config_files"
66557
66558_ACEOF
66559
66560cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66561ac_cs_usage="\
66562\`$as_me' instantiates files and other configuration actions
66563from templates according to the current configuration.  Unless the files
66564and actions are specified as TAGs, all are instantiated by default.
66565
66566Usage: $0 [OPTION]... [TAG]...
66567
66568  -h, --help       print this help, then exit
66569  -V, --version    print version number and configuration settings, then exit
66570      --config     print configuration, then exit
66571  -q, --quiet, --silent
66572                   do not print progress messages
66573  -d, --debug      don't remove temporary files
66574      --recheck    update $as_me by reconfiguring in the same conditions
66575      --file=FILE[:TEMPLATE]
66576                   instantiate the configuration file FILE
66577
66578Configuration files:
66579$config_files
66580
66581Report bugs to <build-dev@openjdk.java.net>.
66582OpenJDK home page: <http://openjdk.java.net>."
66583
66584_ACEOF
66585cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66586ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
66587ac_cs_version="\\
66588OpenJDK config.status jdk9
66589configured by $0, generated by GNU Autoconf 2.69,
66590  with options \\"\$ac_cs_config\\"
66591
66592Copyright (C) 2012 Free Software Foundation, Inc.
66593This config.status script is free software; the Free Software Foundation
66594gives unlimited permission to copy, distribute and modify it."
66595
66596ac_pwd='$ac_pwd'
66597srcdir='$srcdir'
66598AWK='$AWK'
66599test -n "\$AWK" || AWK=awk
66600_ACEOF
66601
66602cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66603# The default lists apply if the user does not specify any file.
66604ac_need_defaults=:
66605while test $# != 0
66606do
66607  case $1 in
66608  --*=?*)
66609    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66610    ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'`
66611    ac_shift=:
66612    ;;
66613  --*=)
66614    ac_option=`expr "X$1" : 'X\([^=]*\)='`
66615    ac_optarg=
66616    ac_shift=:
66617    ;;
66618  *)
66619    ac_option=$1
66620    ac_optarg=$2
66621    ac_shift=shift
66622    ;;
66623  esac
66624
66625  case $ac_option in
66626  # Handling of the options.
66627  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
66628    ac_cs_recheck=: ;;
66629  --version | --versio | --versi | --vers | --ver | --ve | --v | -V )
66630    $as_echo "$ac_cs_version"; exit ;;
66631  --config | --confi | --conf | --con | --co | --c )
66632    $as_echo "$ac_cs_config"; exit ;;
66633  --debug | --debu | --deb | --de | --d | -d )
66634    debug=: ;;
66635  --file | --fil | --fi | --f )
66636    $ac_shift
66637    case $ac_optarg in
66638    *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;;
66639    '') as_fn_error $? "missing file argument" ;;
66640    esac
66641    as_fn_append CONFIG_FILES " '$ac_optarg'"
66642    ac_need_defaults=false;;
66643  --he | --h |  --help | --hel | -h )
66644    $as_echo "$ac_cs_usage"; exit ;;
66645  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
66646  | -silent | --silent | --silen | --sile | --sil | --si | --s)
66647    ac_cs_silent=: ;;
66648
66649  # This is an error.
66650  -*) as_fn_error $? "unrecognized option: \`$1'
66651Try \`$0 --help' for more information." ;;
66652
66653  *) as_fn_append ac_config_targets " $1"
66654     ac_need_defaults=false ;;
66655
66656  esac
66657  shift
66658done
66659
66660ac_configure_extra_args=
66661
66662if $ac_cs_silent; then
66663  exec 6>/dev/null
66664  ac_configure_extra_args="$ac_configure_extra_args --silent"
66665fi
66666
66667_ACEOF
66668cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66669if \$ac_cs_recheck; then
66670  set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion
66671  shift
66672  \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6
66673  CONFIG_SHELL='$SHELL'
66674  export CONFIG_SHELL
66675  exec "\$@"
66676fi
66677
66678_ACEOF
66679cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66680exec 5>>config.log
66681{
66682  echo
66683  sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
66684## Running $as_me. ##
66685_ASBOX
66686  $as_echo "$ac_log"
66687} >&5
66688
66689_ACEOF
66690cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66691_ACEOF
66692
66693cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66694
66695# Handling of arguments.
66696for ac_config_target in $ac_config_targets
66697do
66698  case $ac_config_target in
66699    "$OUTPUT_ROOT/spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/spec.gmk:$AUTOCONF_DIR/spec.gmk.in" ;;
66700    "$OUTPUT_ROOT/hotspot-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/hotspot-spec.gmk:$AUTOCONF_DIR/hotspot-spec.gmk.in" ;;
66701    "$OUTPUT_ROOT/bootcycle-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/bootcycle-spec.gmk:$AUTOCONF_DIR/bootcycle-spec.gmk.in" ;;
66702    "$OUTPUT_ROOT/buildjdk-spec.gmk") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/buildjdk-spec.gmk:$AUTOCONF_DIR/buildjdk-spec.gmk.in" ;;
66703    "$OUTPUT_ROOT/compare.sh") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/compare.sh:$AUTOCONF_DIR/compare.sh.in" ;;
66704    "$OUTPUT_ROOT/Makefile") CONFIG_FILES="$CONFIG_FILES $OUTPUT_ROOT/Makefile:$AUTOCONF_DIR/Makefile.in" ;;
66705
66706  *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;;
66707  esac
66708done
66709
66710
66711# If the user did not use the arguments to specify the items to instantiate,
66712# then the envvar interface is used.  Set only those that are not.
66713# We use the long form for the default assignment because of an extremely
66714# bizarre bug on SunOS 4.1.3.
66715if $ac_need_defaults; then
66716  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
66717fi
66718
66719# Have a temporary directory for convenience.  Make it in the build tree
66720# simply because there is no reason against having it here, and in addition,
66721# creating and moving files from /tmp can sometimes cause problems.
66722# Hook for its removal unless debugging.
66723# Note that there is a small window in which the directory will not be cleaned:
66724# after its creation but before its name has been assigned to `$tmp'.
66725$debug ||
66726{
66727  tmp= ac_tmp=
66728  trap 'exit_status=$?
66729  : "${ac_tmp:=$tmp}"
66730  { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status
66731' 0
66732  trap 'as_fn_exit 1' 1 2 13 15
66733}
66734# Create a (secure) tmp directory for tmp files.
66735
66736{
66737  tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` &&
66738  test -d "$tmp"
66739}  ||
66740{
66741  tmp=./conf$$-$RANDOM
66742  (umask 077 && mkdir "$tmp")
66743} || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5
66744ac_tmp=$tmp
66745
66746# Set up the scripts for CONFIG_FILES section.
66747# No need to generate them if there are no CONFIG_FILES.
66748# This happens for instance with `./config.status config.h'.
66749if test -n "$CONFIG_FILES"; then
66750
66751
66752ac_cr=`echo X | tr X '\015'`
66753# On cygwin, bash can eat \r inside `` if the user requested igncr.
66754# But we know of no other shell where ac_cr would be empty at this
66755# point, so we can use a bashism as a fallback.
66756if test "x$ac_cr" = x; then
66757  eval ac_cr=\$\'\\r\'
66758fi
66759ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' </dev/null 2>/dev/null`
66760if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then
66761  ac_cs_awk_cr='\\r'
66762else
66763  ac_cs_awk_cr=$ac_cr
66764fi
66765
66766echo 'BEGIN {' >"$ac_tmp/subs1.awk" &&
66767_ACEOF
66768
66769
66770{
66771  echo "cat >conf$$subs.awk <<_ACEOF" &&
66772  echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' &&
66773  echo "_ACEOF"
66774} >conf$$subs.sh ||
66775  as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66776ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'`
66777ac_delim='%!_!# '
66778for ac_last_try in false false false false false :; do
66779  . ./conf$$subs.sh ||
66780    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66781
66782  ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X`
66783  if test $ac_delim_n = $ac_delim_num; then
66784    break
66785  elif $ac_last_try; then
66786    as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5
66787  else
66788    ac_delim="$ac_delim!$ac_delim _$ac_delim!! "
66789  fi
66790done
66791rm -f conf$$subs.sh
66792
66793cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66794cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK &&
66795_ACEOF
66796sed -n '
66797h
66798s/^/S["/; s/!.*/"]=/
66799p
66800g
66801s/^[^!]*!//
66802:repl
66803t repl
66804s/'"$ac_delim"'$//
66805t delim
66806:nl
66807h
66808s/\(.\{148\}\)..*/\1/
66809t more1
66810s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/
66811p
66812n
66813b repl
66814:more1
66815s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66816p
66817g
66818s/.\{148\}//
66819t nl
66820:delim
66821h
66822s/\(.\{148\}\)..*/\1/
66823t more2
66824s/["\\]/\\&/g; s/^/"/; s/$/"/
66825p
66826b
66827:more2
66828s/["\\]/\\&/g; s/^/"/; s/$/"\\/
66829p
66830g
66831s/.\{148\}//
66832t delim
66833' <conf$$subs.awk | sed '
66834/^[^""]/{
66835  N
66836  s/\n//
66837}
66838' >>$CONFIG_STATUS || ac_write_fail=1
66839rm -f conf$$subs.awk
66840cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
66841_ACAWK
66842cat >>"\$ac_tmp/subs1.awk" <<_ACAWK &&
66843  for (key in S) S_is_set[key] = 1
66844  FS = ""
66845
66846}
66847{
66848  line = $ 0
66849  nfields = split(line, field, "@")
66850  substed = 0
66851  len = length(field[1])
66852  for (i = 2; i < nfields; i++) {
66853    key = field[i]
66854    keylen = length(key)
66855    if (S_is_set[key]) {
66856      value = S[key]
66857      line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3)
66858      len += length(value) + length(field[++i])
66859      substed = 1
66860    } else
66861      len += 1 + keylen
66862  }
66863
66864  print line
66865}
66866
66867_ACAWK
66868_ACEOF
66869cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66870if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then
66871  sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g"
66872else
66873  cat
66874fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \
66875  || as_fn_error $? "could not setup config files machinery" "$LINENO" 5
66876_ACEOF
66877
66878# VPATH may cause trouble with some makes, so we remove sole $(srcdir),
66879# ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and
66880# trailing colons and then remove the whole line if VPATH becomes empty
66881# (actually we leave an empty line to preserve line numbers).
66882if test "x$srcdir" = x.; then
66883  ac_vpsub='/^[	 ]*VPATH[	 ]*=[	 ]*/{
66884h
66885s///
66886s/^/:/
66887s/[	 ]*$/:/
66888s/:\$(srcdir):/:/g
66889s/:\${srcdir}:/:/g
66890s/:@srcdir@:/:/g
66891s/^:*//
66892s/:*$//
66893x
66894s/\(=[	 ]*\).*/\1/
66895G
66896s/\n//
66897s/^[^=]*=[	 ]*$//
66898}'
66899fi
66900
66901cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
66902fi # test -n "$CONFIG_FILES"
66903
66904
66905eval set X "  :F $CONFIG_FILES      "
66906shift
66907for ac_tag
66908do
66909  case $ac_tag in
66910  :[FHLC]) ac_mode=$ac_tag; continue;;
66911  esac
66912  case $ac_mode$ac_tag in
66913  :[FHL]*:*);;
66914  :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;;
66915  :[FH]-) ac_tag=-:-;;
66916  :[FH]*) ac_tag=$ac_tag:$ac_tag.in;;
66917  esac
66918  ac_save_IFS=$IFS
66919  IFS=:
66920  set x $ac_tag
66921  IFS=$ac_save_IFS
66922  shift
66923  ac_file=$1
66924  shift
66925
66926  case $ac_mode in
66927  :L) ac_source=$1;;
66928  :[FH])
66929    ac_file_inputs=
66930    for ac_f
66931    do
66932      case $ac_f in
66933      -) ac_f="$ac_tmp/stdin";;
66934      *) # Look for the file first in the build tree, then in the source tree
66935	 # (if the path is not absolute).  The absolute path cannot be DOS-style,
66936	 # because $ac_f cannot contain `:'.
66937	 test -f "$ac_f" ||
66938	   case $ac_f in
66939	   [\\/$]*) false;;
66940	   *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";;
66941	   esac ||
66942	   as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;;
66943      esac
66944      case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac
66945      as_fn_append ac_file_inputs " '$ac_f'"
66946    done
66947
66948    # Let's still pretend it is `configure' which instantiates (i.e., don't
66949    # use $as_me), people would be surprised to read:
66950    #    /* config.h.  Generated by config.status.  */
66951    configure_input='Generated from '`
66952	  $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g'
66953	`' by configure.'
66954    if test x"$ac_file" != x-; then
66955      configure_input="$ac_file.  $configure_input"
66956      { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5
66957$as_echo "$as_me: creating $ac_file" >&6;}
66958    fi
66959    # Neutralize special characters interpreted by sed in replacement strings.
66960    case $configure_input in #(
66961    *\&* | *\|* | *\\* )
66962       ac_sed_conf_input=`$as_echo "$configure_input" |
66963       sed 's/[\\\\&|]/\\\\&/g'`;; #(
66964    *) ac_sed_conf_input=$configure_input;;
66965    esac
66966
66967    case $ac_tag in
66968    *:-:* | *:-) cat >"$ac_tmp/stdin" \
66969      || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;;
66970    esac
66971    ;;
66972  esac
66973
66974  ac_dir=`$as_dirname -- "$ac_file" ||
66975$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
66976	 X"$ac_file" : 'X\(//\)[^/]' \| \
66977	 X"$ac_file" : 'X\(//\)$' \| \
66978	 X"$ac_file" : 'X\(/\)' \| . 2>/dev/null ||
66979$as_echo X"$ac_file" |
66980    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{
66981	    s//\1/
66982	    q
66983	  }
66984	  /^X\(\/\/\)[^/].*/{
66985	    s//\1/
66986	    q
66987	  }
66988	  /^X\(\/\/\)$/{
66989	    s//\1/
66990	    q
66991	  }
66992	  /^X\(\/\).*/{
66993	    s//\1/
66994	    q
66995	  }
66996	  s/.*/./; q'`
66997  as_dir="$ac_dir"; as_fn_mkdir_p
66998  ac_builddir=.
66999
67000case "$ac_dir" in
67001.) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;;
67002*)
67003  ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'`
67004  # A ".." for each directory in $ac_dir_suffix.
67005  ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'`
67006  case $ac_top_builddir_sub in
67007  "") ac_top_builddir_sub=. ac_top_build_prefix= ;;
67008  *)  ac_top_build_prefix=$ac_top_builddir_sub/ ;;
67009  esac ;;
67010esac
67011ac_abs_top_builddir=$ac_pwd
67012ac_abs_builddir=$ac_pwd$ac_dir_suffix
67013# for backward compatibility:
67014ac_top_builddir=$ac_top_build_prefix
67015
67016case $srcdir in
67017  .)  # We are building in place.
67018    ac_srcdir=.
67019    ac_top_srcdir=$ac_top_builddir_sub
67020    ac_abs_top_srcdir=$ac_pwd ;;
67021  [\\/]* | ?:[\\/]* )  # Absolute name.
67022    ac_srcdir=$srcdir$ac_dir_suffix;
67023    ac_top_srcdir=$srcdir
67024    ac_abs_top_srcdir=$srcdir ;;
67025  *) # Relative name.
67026    ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix
67027    ac_top_srcdir=$ac_top_build_prefix$srcdir
67028    ac_abs_top_srcdir=$ac_pwd/$srcdir ;;
67029esac
67030ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix
67031
67032
67033  case $ac_mode in
67034  :F)
67035  #
67036  # CONFIG_FILE
67037  #
67038
67039_ACEOF
67040
67041cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67042# If the template does not know about datarootdir, expand it.
67043# FIXME: This hack should be removed a few years after 2.60.
67044ac_datarootdir_hack=; ac_datarootdir_seen=
67045ac_sed_dataroot='
67046/datarootdir/ {
67047  p
67048  q
67049}
67050/@datadir@/p
67051/@docdir@/p
67052/@infodir@/p
67053/@localedir@/p
67054/@mandir@/p'
67055case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in
67056*datarootdir*) ac_datarootdir_seen=yes;;
67057*@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*)
67058  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5
67059$as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;}
67060_ACEOF
67061cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67062  ac_datarootdir_hack='
67063  s&@datadir@&$datadir&g
67064  s&@docdir@&$docdir&g
67065  s&@infodir@&$infodir&g
67066  s&@localedir@&$localedir&g
67067  s&@mandir@&$mandir&g
67068  s&\\\${datarootdir}&$datarootdir&g' ;;
67069esac
67070_ACEOF
67071
67072# Neutralize VPATH when `$srcdir' = `.'.
67073# Shell code in configure.ac might set extrasub.
67074# FIXME: do we really want to maintain this feature?
67075cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
67076ac_sed_extra="$ac_vpsub
67077$extrasub
67078_ACEOF
67079cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
67080:t
67081/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
67082s|@configure_input@|$ac_sed_conf_input|;t t
67083s&@top_builddir@&$ac_top_builddir_sub&;t t
67084s&@top_build_prefix@&$ac_top_build_prefix&;t t
67085s&@srcdir@&$ac_srcdir&;t t
67086s&@abs_srcdir@&$ac_abs_srcdir&;t t
67087s&@top_srcdir@&$ac_top_srcdir&;t t
67088s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t
67089s&@builddir@&$ac_builddir&;t t
67090s&@abs_builddir@&$ac_abs_builddir&;t t
67091s&@abs_top_builddir@&$ac_abs_top_builddir&;t t
67092$ac_datarootdir_hack
67093"
67094eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \
67095  >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67096
67097test -z "$ac_datarootdir_hack$ac_datarootdir_seen" &&
67098  { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } &&
67099  { ac_out=`sed -n '/^[	 ]*datarootdir[	 ]*:*=/p' \
67100      "$ac_tmp/out"`; test -z "$ac_out"; } &&
67101  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67102which seems to be undefined.  Please make sure it is defined" >&5
67103$as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir'
67104which seems to be undefined.  Please make sure it is defined" >&2;}
67105
67106  rm -f "$ac_tmp/stdin"
67107  case $ac_file in
67108  -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";;
67109  *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";;
67110  esac \
67111  || as_fn_error $? "could not create $ac_file" "$LINENO" 5
67112 ;;
67113
67114
67115
67116  esac
67117
67118done # for ac_tag
67119
67120
67121as_fn_exit 0
67122_ACEOF
67123ac_clean_files=$ac_clean_files_save
67124
67125test $ac_write_fail = 0 ||
67126  as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5
67127
67128
67129# configure is writing to config.log, and then calls config.status.
67130# config.status does its own redirection, appending to config.log.
67131# Unfortunately, on DOS this fails, as config.log is still kept open
67132# by configure, so config.status won't be able to write to it; its
67133# output is simply discarded.  So we exec the FD to /dev/null,
67134# effectively closing config.log, so it can be properly (re)opened and
67135# appended to by config.status.  When coming back to configure, we
67136# need to make the FD available again.
67137if test "$no_create" != yes; then
67138  ac_cs_success=:
67139  ac_config_status_args=
67140  test "$silent" = yes &&
67141    ac_config_status_args="$ac_config_status_args --quiet"
67142  exec 5>/dev/null
67143  $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false
67144  exec 5>>config.log
67145  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
67146  # would make configure fail if this is the last instruction.
67147  $ac_cs_success || as_fn_exit 1
67148fi
67149if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then
67150  { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5
67151$as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;}
67152fi
67153
67154
67155# After AC_OUTPUT, we need to do final work
67156
67157
67158  # Try to move config.log (generated by autoconf) to the configure-support directory.
67159  if test -e ./config.log; then
67160    $MV -f ./config.log "$CONFIGURESUPPORT_OUTPUTDIR/config.log" 2> /dev/null
67161  fi
67162
67163  # Rotate our log file (configure.log)
67164  if test -e "$OUTPUT_ROOT/configure.log.old"; then
67165    $RM -f "$OUTPUT_ROOT/configure.log.old"
67166  fi
67167  if test -e "$OUTPUT_ROOT/configure.log"; then
67168    $MV -f "$OUTPUT_ROOT/configure.log" "$OUTPUT_ROOT/configure.log.old" 2> /dev/null
67169  fi
67170
67171  # Move configure.log from current directory to the build output root
67172  if test -e ./configure.log; then
67173    $MV -f ./configure.log "$OUTPUT_ROOT/configure.log" 2> /dev/null
67174  fi
67175
67176  # Make the compare script executable
67177  $CHMOD +x $OUTPUT_ROOT/compare.sh
67178
67179
67180# Finally output some useful information to the user
67181
67182  # Finally output some useful information to the user
67183
67184  printf "\n"
67185  printf "====================================================\n"
67186  if test "x$no_create" != "xyes"; then
67187    if test "x$IS_RECONFIGURE" != "xyes"; then
67188      printf "A new configuration has been successfully created in\n%s\n" "$OUTPUT_ROOT"
67189    else
67190      printf "The existing configuration has been successfully updated in\n%s\n" "$OUTPUT_ROOT"
67191    fi
67192  else
67193    if test "x$IS_RECONFIGURE" != "xyes"; then
67194      printf "A configuration has been successfully checked but not created\n"
67195    else
67196      printf "The existing configuration has been successfully checked in\n%s\n" "$OUTPUT_ROOT"
67197    fi
67198  fi
67199  if test "x$CONFIGURE_COMMAND_LINE" != x; then
67200    printf "using configure arguments '$CONFIGURE_COMMAND_LINE'.\n"
67201  else
67202    printf "using default settings.\n"
67203  fi
67204
67205  printf "\n"
67206  printf "Configuration summary:\n"
67207  printf "* Debug level:    $DEBUG_LEVEL\n"
67208  printf "* HS debug level: $HOTSPOT_DEBUG_LEVEL\n"
67209  printf "* JDK variant:    $JDK_VARIANT\n"
67210  printf "* JVM variants:   $JVM_VARIANTS\n"
67211  printf "* OpenJDK target: OS: $OPENJDK_TARGET_OS, CPU architecture: $OPENJDK_TARGET_CPU_ARCH, address length: $OPENJDK_TARGET_CPU_BITS\n"
67212  printf "* Version string: $VERSION_STRING ($VERSION_SHORT)\n"
67213
67214  printf "\n"
67215  printf "Tools summary:\n"
67216  if test "x$OPENJDK_BUILD_OS" = "xwindows"; then
67217    printf "* Environment:    $WINDOWS_ENV_VENDOR version $WINDOWS_ENV_VERSION (root at $WINDOWS_ENV_ROOT_PATH)\n"
67218  fi
67219  printf "* Boot JDK:       $BOOT_JDK_VERSION (at $BOOT_JDK)\n"
67220  if test "x$TOOLCHAIN_VERSION" != "x"; then
67221    print_version=" $TOOLCHAIN_VERSION"
67222  fi
67223  printf "* Toolchain:      $TOOLCHAIN_TYPE ($TOOLCHAIN_DESCRIPTION$print_version)\n"
67224  printf "* C Compiler:     Version $CC_VERSION_NUMBER (at $CC)\n"
67225  printf "* C++ Compiler:   Version $CXX_VERSION_NUMBER (at $CXX)\n"
67226
67227  printf "\n"
67228  printf "Build performance summary:\n"
67229  printf "* Cores to use:   $JOBS\n"
67230  printf "* Memory limit:   $MEMORY_SIZE MB\n"
67231  if test "x$CCACHE_STATUS" != "x"; then
67232    printf "* ccache status:  $CCACHE_STATUS\n"
67233  fi
67234  printf "\n"
67235
67236  if test "x$BUILDING_MULTIPLE_JVM_VARIANTS" = "xtrue"; then
67237    printf "NOTE: You have requested to build more than one version of the JVM, which\n"
67238    printf "will result in longer build times.\n"
67239    printf "\n"
67240  fi
67241
67242  if test "x$FOUND_ALT_VARIABLES" != "x"; then
67243    printf "WARNING: You have old-style ALT_ environment variables set.\n"
67244    printf "These are not respected, and will be ignored. It is recommended\n"
67245    printf "that you clean your environment. The following variables are set:\n"
67246    printf "$FOUND_ALT_VARIABLES\n"
67247    printf "\n"
67248  fi
67249
67250  if test "x$OUTPUT_DIR_IS_LOCAL" != "xyes"; then
67251    printf "WARNING: Your build output directory is not on a local disk.\n"
67252    printf "This will severely degrade build performance!\n"
67253    printf "It is recommended that you create an output directory on a local disk,\n"
67254    printf "and run the configure script again from that directory.\n"
67255    printf "\n"
67256  fi
67257
67258  if test "x$IS_RECONFIGURE" = "xyes" && test "x$no_create" != "xyes"; then
67259    printf "WARNING: The result of this configuration has overridden an older\n"
67260    printf "configuration. You *should* run 'make clean' to make sure you get a\n"
67261    printf "proper build. Failure to do so might result in strange build problems.\n"
67262    printf "\n"
67263  fi
67264
67265  if test "x$IS_RECONFIGURE" != "xyes" && test "x$no_create" = "xyes"; then
67266    printf "WARNING: The result of this configuration was not saved.\n"
67267    printf "You should run without '--no-create | -n' to create the configuration.\n"
67268    printf "\n"
67269  fi
67270
67271
67272
67273  # Locate config.log.
67274  if test -e "$CONFIGURESUPPORT_OUTPUTDIR/config.log"; then
67275    CONFIG_LOG_PATH="$CONFIGURESUPPORT_OUTPUTDIR"
67276  elif test -e "./config.log"; then
67277    CONFIG_LOG_PATH="."
67278  fi
67279
67280  if test -e "$CONFIG_LOG_PATH/config.log"; then
67281    $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" > /dev/null 2>&1
67282    if test $? -eq 0; then
67283      printf "The following warnings were produced. Repeated here for convenience:\n"
67284      # We must quote sed expression (using []) to stop m4 from eating the [].
67285      $GREP '^configure:.*: WARNING:' "$CONFIG_LOG_PATH/config.log" | $SED -e  's/^configure:[0-9]*: //'
67286      printf "\n"
67287    fi
67288  fi
67289
67290